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.
| Naming | Value |
|---|
| Object | PersonWebLink |
Resource type (JSON:API type) | person_web_link |
| Collection / records root | โ (not a records root) |
| REST base | /v1/person-web-links |
| Entity class | PersonWebLink |
Internal object. Not currently exposed on the public REST API. The operations below describe the intended contract.
API operations
| Operation | Method & path | Status |
|---|
| List | GET /v1/person-web-links | ๐ก Planned |
| Retrieve | GET /v1/person-web-links/{id} | ๐ก Planned |
| Create | POST /v1/person-web-links | ๐ก Planned |
| Update | PATCH /v1/person-web-links/{id} | ๐ก Planned |
| Delete | DELETE /v1/person-web-links/{id} | ๐ก Planned |
Data model
Attributes
| Field | Type | Required | Constraints | Allowed values | Description |
|---|
| created_at | Date (timestamptz) โ ๐ system | โ
Yes | set 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_at | Date (timestamptz) | undefined โ ๐ system | โช No | set 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_at | Date (timestamptz) | null โ ๐ system | โช No | nullable; 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
| Name | Type | Required | Description |
|---|
| person | to-one (ManyToOne) | โ
Yes | The 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_link | to-one (ManyToOne) | โ
Yes | The 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