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.

PersonWebLink is a soft-deletable bridge (pivot) relation that attaches one or more web hyperlinks to a person record. It connects the People entity to the WebLink atomic entity, enabling a person to carry multiple URLs (e.g. LinkedIn profile, personal website) without denormalising the link data. The pivot follows the standard dual-direction indexing pattern: a composite index on (person, deleted_at) for the forward traversal and a single-column index on web_link for the reverse traversal.
NamingValue
ObjectPersonWebLink
Resource type (JSON:API type)person_web_link
Collection / records rootโ€” (not a records root)
REST base/v1/person-web-links
Entity classPersonWebLink
Internal object. Not currently exposed on the public REST API. The operations below describe the intended contract.

API operations

OperationMethod & pathStatus
ListGET /v1/person-web-links๐ŸŸก Planned
RetrieveGET /v1/person-web-links/{id}๐ŸŸก Planned
CreatePOST /v1/person-web-links๐ŸŸก Planned
UpdatePATCH /v1/person-web-links/{id}๐ŸŸก Planned
DeleteDELETE /v1/person-web-links/{id}๐ŸŸก Planned

Data model

Attributes

FieldTypeRequiredConstraintsAllowed valuesDescription
created_atDate (timestamptz) โ€” ๐Ÿ”’ systemโœ… Yesset once on INSERT via onCreate hook; never nullโ€”Timestamp at which the pivot row was created. Set automatically by the MikroORM onCreate hook; not editable by the user.
updated_atDate (timestamptz) | undefined โ€” ๐Ÿ”’ systemโšช Noset on INSERT and on every UPDATE via onCreate/onUpdate hooks; nullable in DB (timestamptz null)โ€”Timestamp of the last modification to this pivot row. Updated automatically by MikroORM; not editable by the user.
deleted_atDate (timestamptz) | null โ€” ๐Ÿ”’ systemโšช Nonullable; soft-delete sentinel; all active-record queries must filter deleted_at IS NULLโ€”Soft-delete timestamp. Null means the link is active. Set by the soft-delete cascade when the parent person is deleted or the link is explicitly removed. Not directly editable by the user.

Relationships

NameTypeRequiredDescription
personto-one (ManyToOne)โœ… YesThe People record to which this web link belongs. Foreign key: person_pk โ†’ core_api.peoples.pk. Cascade: ON UPDATE CASCADE. Indexed via the composite partial index idx_person_web_links_person_deleted (person_pk, deleted_at).
web_linkto-one (ManyToOne)โœ… YesThe WebLink atomic entity carrying the actual URL. Foreign key: web_link_pk โ†’ core_api.web_links.pk. Cascade: ON UPDATE CASCADE. Indexed via idx_person_web_links_web_link.

System-computed

  • created_at โ€” set on INSERT via MikroORM onCreate hook (new Date()); never written by API consumers
  • updated_at โ€” set on INSERT and refreshed on every UPDATE via onCreate/onUpdate hooks
  • deleted_at โ€” set by soft-delete cascade; never set directly by the user; queries must always predicate deleted_at IS NULL
  • No public UUID (*_id) column exists on this entity โ€” it is a pure pivot table identified by its two FK columns; the external API should reference it via the parent person_id + web_link_id pair
  • No workspace_pk column โ€” tenant isolation is inherited through the parent people โ†’ workspace relationship; queries must join through People to apply workspace scope

Example

{
  "data": {
    "type": "person_web_link",
    "id": "a3f7c912-08b4-4e61-bd2a-91c053e7f8d0",
    "attributes": {
      "created_at": "2025-10-14T09:22:00.000Z",
      "updated_at": "2025-10-14T09:22:00.000Z",
      "deleted_at": null
    },
    "relationships": {
      "person": {
        "data": { "type": "people", "id": "e8d22a41-3319-4c7e-b901-7714fce6a1b2" }
      },
      "web_link": {
        "data": { "type": "web_link", "id": "c14b89f3-5510-4df0-a823-003e8fa0d77c" }
      }
    }
  }
}
Source: apps/api/src/database/entities/PersonWebLink.ts ยท domain: financial-graph ยท tier: Supporting