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
apps/api/src/database/entities/WorkspaceProvider.ts · domain: ingestion · tier: Platform