Skip to main content
WorkspaceProvider is the join table that records which global Provider entries a specific workspace has explicitly selected and/or was auto-matched to, acting as the per-tenant provider bookmark layer. Each row links exactly one Workspace to one Provider and carries two boolean flags — is_selected (user explicitly added the provider via the API) and is_matched (system or explicit selection confirmed the relevance). The entity is owned by the WorkspaceProviderService, which upserts rows on explicit selection and soft-deletes them on removal. It is the authority for GET /v1/workspaces/:id/providers catalog responses and is read by the Vision Agent to resolve per-workspace provider scope.
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 integer primary key; internal only, never exposed in the API
  • created_at — set by MikroORM onCreate: () => new Date() hook
  • updated_at — set by both onCreate and onUpdate: () => new Date() hooks
  • deleted_at — null at creation; stamped with current timestamp by WorkspaceProviderRepository.softDelete() when the user removes the provider via DELETE /v1/workspaces/:id/providers/:providerId
  • is_matched — automatically forced to true by the repository upsert logic whenever is_selected is set to true (business rule: explicit user selection always counts as matched)
  • is_selected default — false at row creation; set to true by WorkspaceProviderService.createWorkspaceProvider() via WorkspaceProviderRepository.upsert(workspace, provider, true)

Example

Source: apps/api/src/database/entities/WorkspaceProvider.ts · domain: ingestion · tier: Platform