Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.wellapp.ai/llms.txt

Use this file to discover all available pages before exploring further.

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.
NamingValue
ObjectWorkspaceProvider
Resource type (JSON:API type)workspace_provider
Collection / records root(not a records root)
REST base/v1/workspace-providers
Entity classWorkspaceProvider
Internal object. Not currently exposed on the public REST API. The operations below describe the intended contract.

API operations

OperationMethod & pathStatus
ListGET /v1/workspace-providers🟡 Planned
RetrieveGET /v1/workspace-providers/{id}🟡 Planned
CreatePOST /v1/workspace-providers🟡 Planned
UpdatePATCH /v1/workspace-providers/{id}🟡 Planned
DeleteDELETE /v1/workspace-providers/{id}🟡 Planned

Data model

Attributes

FieldTypeRequiredConstraintsAllowed valuesDescription
is_selectedboolean⚪ NoDEFAULT falsetrue, falseWhether the workspace has explicitly selected this provider through the UI or API. Set to true via POST /v1/workspaces/:id/providers; set to false implicitly on soft-delete.
is_matchedboolean⚪ NoDEFAULT false; set to true automatically whenever is_selected is set to true (repository enforces: if isSelected → is_matched = true)true, falseWhether the provider was confirmed relevant to this workspace, either through explicit user selection (which auto-sets this flag) or via system matching logic such as the workspace-provider scoring pipeline.
created_at🔒 system — timestamptz⚪ NoonCreate hook; DEFAULT now()Timestamp of row creation. Set automatically by MikroORM onCreate hook.
updated_at🔒 system — timestamptz⚪ NoonCreate + onUpdate hooksTimestamp of last row modification. Refreshed automatically by MikroORM onUpdate hook.
deleted_attimestamptz | null⚪ Nonullable; set to current timestamp on soft-delete via WorkspaceProviderRepository.softDeletenull (active) or ISO 8601 timestamp (soft-deleted)Soft-delete marker. When non-null the provider is considered deselected for the workspace. All active-provider queries filter deleted_at IS NULL.

Relationships

NameTypeRequiredDescription
workspaceto-one (ManyToOne)✅ YesThe workspace that selected this provider. Foreign key workspace_pk → core_api.workspaces.pk. Every WorkspaceProvider row is strictly tenant-scoped to this workspace.
providerto-one (ManyToOne)✅ YesThe global provider catalog entry being bookmarked. Foreign key provider_pk → core_api.providers.pk. Carries provider name, slug, category, logo, URL, and Vision Agent skill fields.

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

{
  "data": {
    "type": "workspace_provider",
    "id": "a3f1c2d4-88e0-4b5a-9f3c-1d2e3f4a5b6c",
    "attributes": {
      "is_selected": true,
      "is_matched": true,
      "created_at": "2025-11-14T09:30:00.000Z",
      "updated_at": "2025-11-14T09:30:00.000Z",
      "deleted_at": null
    },
    "relationships": {
      "workspace": {
        "data": { "type": "workspace", "id": "d7e8f9a0-1234-4abc-8def-0123456789ab" }
      },
      "provider": {
        "data": { "type": "provider", "id": "b2c3d4e5-5678-4bcd-9ef0-1234567890bc" }
      }
    }
  }
}
Source: apps/api/src/database/entities/WorkspaceProvider.ts · domain: ingestion · tier: Platform