ProviderConnector

ProviderConnector is a junction table that links a Provider (a product/service catalog entry, e.g. Qonto, Stripe) to a Connector (a configured integration transport, e.g. the Qonto MCP connector). Each Connector may be linked to at most one Provider โ€” the unique constraint on connector_pk enforces this 1:1 upper-bound on the connector side, while a single Provider may own multiple connectors. Soft-deletion via deleted_at deactivates the pairing without destroying history; the derived is_active getter reflects this state. The table is seeded at boot time by npm run mikro:seed:provider-connectors and owned entirely by the platform seed pipeline.

NamingValue
ObjectProviderConnector
Resource type (JSON:API type)provider_connector
Collection / records rootโ€” (not a records root)
REST base/v1/provider-connectors
Entity classProviderConnector

Internal object. Not currently exposed on the public REST API. The operations below describe the intended contract.

API operations

OperationMethod & pathStatus
ListGET /v1/provider-connectors๐ŸŸก Planned
RetrieveGET /v1/provider-connectors/{id}๐ŸŸก Planned
CreatePOST /v1/provider-connectors๐ŸŸก Planned
UpdatePATCH /v1/provider-connectors/{id}๐ŸŸก Planned
DeleteDELETE /v1/provider-connectors/{id}๐ŸŸก Planned

Data model

Attributes

FieldTypeRequiredConstraintsAllowed valuesDescription
is_activeboolean ๐Ÿ”’ system (computed, not persisted)โ€”โ€”โ€”Derived getter: true when deleted_at is null, false otherwise. Declared with @Property({ persist: false }) โ€” never stored in the database, computed on every read.
created_attimestamptz ๐Ÿ”’ systemโœ… YesDEFAULT now(); set once via MikroORM onCreate hook; no onUpdateโ€”Timestamp when the provider-connector pairing was first created. Set automatically by the ORM onCreate hook and the database DEFAULT. Never updated.
deleted_attimestamptzโšช NoNullable; indexed (provider_connectors_deleted_at_index)โ€”Soft-delete timestamp. When set, the pairing is considered inactive and is_active returns false. Null means the link is live.

Relationships

NameTypeRequiredDescription
providerto-one (ManyToOne)โœ… YesThe Provider catalog entry this link belongs to (e.g. Qonto, Stripe). Foreign key provider_pk โ†’ core_api.providers.pk. ON DELETE CASCADE: deleting the provider removes all its junction rows. Indexed via provider_connectors_provider_pk_index.
connectorto-one (ManyToOne)โœ… YesThe Connector transport record this link points to (e.g. the Qonto MCP connector). Foreign key connector_pk โ†’ core_api.connectors.pk. UNIQUE constraint provider_connectors_connector_pk_unique ensures each connector is assigned to at most one provider. ON DELETE CASCADE.

System-computed

  • is_active: non-persisted computed getter โ€” returns !deleted_at at read time; declared @Property({ persist: false })
  • created_at: set once via MikroORM onCreate: () => new Date() hook combined with database DEFAULT now(); never mutated after creation
  • deleted_at: soft-delete field; when set the ORM and application layer treat the row as inactive; the is_active getter derives from it
  • Unique-per-connector constraint: enforced at the database level (constraint provider_connectors_connector_pk_unique on connector_pk) โ€” a connector can belong to at most one provider at any point in time
  • Cascade deletion: both FKs are ON DELETE CASCADE โ€” deleting a Provider or Connector automatically removes all ProviderConnector junction rows
  • Seeded by platform pipeline: rows are created by npm run mikro:seed:provider-connectors at boot; no user-facing PATCH endpoint exists for this entity

Example

{
  "data": {
    "type": "provider_connector",
    "id": "3f8a0c12-1e4b-4d7a-92f3-bc9e01234567",
    "attributes": {
      "is_active": true,
      "created_at": "2026-02-25T14:26:27.000Z",
      "deleted_at": null
    },
    "relationships": {
      "provider": {
        "data": { "type": "provider", "id": "a1b2c3d4-0001-0001-0001-000000000001" }
      },
      "connector": {
        "data": { "type": "connector", "id": "c9d8e7f6-0002-0002-0002-000000000002" }
      }
    }
  }
}
Source: /Users/maximechampoux/platform/apps/api/src/database/entities/ProviderConnector.ts ยท domain: ingestion ยท tier: Platform