@talonic/docs 0.21.31 → 0.21.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/content.js +72 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/seo.js +858 -21
- package/openapi.json +856 -20
- package/package.json +1 -1
package/dist/content.js
CHANGED
|
@@ -293,7 +293,8 @@ var API_NAV_SECTIONS = [
|
|
|
293
293
|
{ id: "fields", label: "Fields", children: [
|
|
294
294
|
{ id: "list-fields", label: "List Fields" },
|
|
295
295
|
{ id: "field-harmonization", label: "Harmonization" },
|
|
296
|
-
{ id: "get-field", label: "Get Field" }
|
|
296
|
+
{ id: "get-field", label: "Get Field" },
|
|
297
|
+
{ id: "field-contract", label: "Registry Contract" }
|
|
297
298
|
] },
|
|
298
299
|
{ id: "registry", label: "Registry", children: [
|
|
299
300
|
{ id: "registry-query", label: "Query" },
|
|
@@ -36650,6 +36651,76 @@ var sections63 = [
|
|
|
36650
36651
|
{ question: "What is the raw_field_name in occurrences?", answer: "The `raw_field_name` is the original field name as it appeared in the source document before canonicalization. For example, a field canonicalized as `invoice_number` might have raw names like `Inv. No.`, `Invoice #`, or `Rechnungsnummer` depending on the document. This helps you understand the naming variations the registry has normalized." }
|
|
36651
36652
|
],
|
|
36652
36653
|
mentions: ["field detail", "recent occurrences", "similar fields", "cosine similarity", "name embedding", "field merge", "raw field name"]
|
|
36654
|
+
},
|
|
36655
|
+
{
|
|
36656
|
+
slug: "field-contract",
|
|
36657
|
+
parentSlug: "fields",
|
|
36658
|
+
title: "Registry Contract: Resolve, Card, Values, History",
|
|
36659
|
+
seoTitle: "Field Registry Contract \u2014 Resolve, Concept Card, Values, History",
|
|
36660
|
+
description: "The Field Registry as a source of truth for agents and apps: stable ids under curation, name resolution, named maturity levels, the concept card, cross-document values with provenance, curation history and field.* events.",
|
|
36661
|
+
content: [
|
|
36662
|
+
{ type: "paragraph", text: "These reads make the Field Registry safe to build on: an id you stored keeps working after a merge, a name resolves to the live concept, every read names its **maturity** level, and curation is announced on the event feed so a cached vocabulary can invalidate instead of polling." },
|
|
36663
|
+
{ type: "heading", level: 2, id: "field-maturity", text: "Maturity levels" },
|
|
36664
|
+
{ type: "paragraph", text: "Every `/v1/fields*` response carries `maturity` beside the frozen numeric `tier`. Treat it as the contract for what you may rely on." },
|
|
36665
|
+
{ type: "param-table", title: "Levels", params: [
|
|
36666
|
+
{ name: "core", type: "tier 1", description: "Universal, fully trusted. Safe to bind schemas, dashboards and downstream models to. Demotion is hysteresis-guarded and always emits `field.demoted`." },
|
|
36667
|
+
{ name: "proven", type: "tier 2", description: "Recurring and useful. Stable id; the name may still be groomed, announced by `field.renamed` / `field.merged`." },
|
|
36668
|
+
{ name: "candidate", type: "tier 3", description: "Newly discovered. May be merged, renamed or expire with no notice beyond the event feed. Do not hard-code." }
|
|
36669
|
+
] },
|
|
36670
|
+
{ type: "paragraph", text: "`GET /v1/fields?maturity=core|proven|candidate` filters by level. The list hides rows merged into another concept unless `include_superseded=true`, so a cached vocabulary never carries two ids for one concept." },
|
|
36671
|
+
{ type: "heading", level: 2, id: "field-identity", text: "Stable identity under curation" },
|
|
36672
|
+
{ type: "paragraph", text: "When curation merges a concept into a survivor, the absorbed row stays readable with `superseded_by: { id, links.self }` \u2014 `GET /v1/fields/{id}` never 404s a stored id. Pass `follow_redirects=true` to receive the survivor instead; the hops are listed in `redirected_from` so you can rewrite your keys." },
|
|
36673
|
+
{ type: "endpoint", method: "GET", path: "/v1/fields/resolve", summary: "Resolve a NAME to the live concept.", blocks: [
|
|
36674
|
+
{ type: "param-table", title: "Query parameters", params: [
|
|
36675
|
+
{ name: "name", type: "string", required: true, description: "The field name, in any spelling you hold: `Invoice No`, `invoice_number`, `Rechnungsnummer`." },
|
|
36676
|
+
{ name: "follow_redirects", type: "boolean", description: "Walk `superseded_by` to the survivor.", default: "true" }
|
|
36677
|
+
] },
|
|
36678
|
+
{ type: "paragraph", text: "Lookup order, first hit wins: exact `canonical_name` \u2192 the registry `match_key` fold (separator, case, accent and plural insensitive \u2014 the same fold the resolver binds with) \u2192 a merge alias \u2192 exact `synonyms[]` containment (names folded in by merges and cleanup) \u2192 case-insensitive canonical name \u2192 case-insensitive synonym. The first four arms are index lookups; the last two scan the tenant registry and run only when everything indexed missed. The response says which arm matched; no match is `404 unknown_field`." },
|
|
36679
|
+
{ type: "code", language: "json", title: "Response", code: `{
|
|
36680
|
+
"name": "Invoice No",
|
|
36681
|
+
"matched_by": "synonym",
|
|
36682
|
+
"redirected_from": ["b7c1\u2026"],
|
|
36683
|
+
"field": { "id": "a1b2\u2026", "canonical_name": "invoice_number", "maturity": "proven", "tier": 2, "synonyms": ["inv_no", "invoice no"], "superseded_by": null, "links": { "card": "/v1/fields/a1b2\u2026/card" } }
|
|
36684
|
+
}` }
|
|
36685
|
+
] },
|
|
36686
|
+
{ type: "heading", level: 2, id: "field-card", text: "The concept card" },
|
|
36687
|
+
{ type: "endpoint", method: "GET", path: "/v1/fields/{id}/card", summary: "One read that says what a concept means and how it behaves.", blocks: [
|
|
36688
|
+
{ type: "param-table", title: "Response sections", params: [
|
|
36689
|
+
{ name: "definition", type: "object", description: "`description`, `instruction` (the master extraction instruction), `variance_notes`, `synonyms[]`, `aliases[]`." },
|
|
36690
|
+
{ name: "identity", type: "object", description: "`pinned`, `source`, `link_key`, `superseded_by`, `absorbed[]` (concepts merged INTO this one that still exist as redirect rows)." },
|
|
36691
|
+
{ name: "occurrence", type: "object", description: "`occurrence_count`, `document_count`, `occurrence_rate`, `first_seen_at`, `last_seen_at`, `promoted_at`, `document_type_distribution`." },
|
|
36692
|
+
{ name: "values", type: "object", description: "Sources-IAM filtered distribution over the concept and its absorbed redirects: `total`, `distinct_count`, `top[]` (value, count, share), `examples[]`." },
|
|
36693
|
+
{ name: "usage", type: "object", description: "`schema_count`, `schema_field_count` \u2014 how many Specs bind the concept." }
|
|
36694
|
+
] }
|
|
36695
|
+
] },
|
|
36696
|
+
{ type: "heading", level: 2, id: "field-values", text: "Values across documents" },
|
|
36697
|
+
{ type: "endpoint", method: "GET", path: "/v1/fields/{id}/values", summary: "Current values of the concept across documents, with provenance.", blocks: [
|
|
36698
|
+
{ type: "param-table", title: "Query parameters", params: [
|
|
36699
|
+
{ name: "document_id", type: "string", description: "Only occurrences on this document." },
|
|
36700
|
+
{ name: "value", type: "string", description: "Case-insensitive contains filter on the value text." },
|
|
36701
|
+
{ name: "include_redirected", type: "boolean", description: "Include occurrences still bound to concepts merged into this one (`provenance.via_redirect: true`).", default: "true" },
|
|
36702
|
+
{ name: "limit / cursor / order", type: "string", description: "Cursor pagination, newest first by default (max 100 per page)." }
|
|
36703
|
+
] },
|
|
36704
|
+
{ type: "paragraph", text: "One row per bound occurrence \u2014 a per-cell table column is several rows sharing `document_id`. Each row carries `value`, `confidence`, and `provenance` (`raw_field_name`, verbatim `source_text`, the `resolved_by` band, `needs_confirmation`). Rows and `pagination.total` are Sources-IAM filtered as the key's minting user." }
|
|
36705
|
+
] },
|
|
36706
|
+
{ type: "heading", level: 2, id: "field-history", text: "Curation history and events" },
|
|
36707
|
+
{ type: "endpoint", method: "GET", path: "/v1/fields/{id}/history", summary: "The curation trail, newest first.", blocks: [
|
|
36708
|
+
{ type: "paragraph", text: "Event kinds: `tier_changed` (with `from_maturity` / `to_maturity` and `direction`), `merge_log_absorbed` / `merge_log_merged_into`, `absorbed`, `superseded`, `renamed`, `rewritten`, `split`, `deleted`, `alias_added`. Never follows redirects \u2014 the trail belongs to the id asked for." }
|
|
36709
|
+
] },
|
|
36710
|
+
{ type: "paragraph", text: "The same changes arrive live on `GET /v1/events` (and to webhook / delivery bindings) as `field.graduated`, `field.promoted`, `field.demoted`, `field.merged` and `field.renamed`. Every payload names the concept by stable `field_id`; `field.merged` carries `merged_into_id` and `mode` (`redirect` keeps the absorbed row, `deleted` removes it). Events are published only after the curation write has committed." },
|
|
36711
|
+
{ type: "callout", variant: "info", text: "Caching the vocabulary? Store `id`, read `maturity`, subscribe to `field.*`, and re-resolve through `GET /v1/fields/resolve` when a name stops matching. Never key on `canonical_name` alone." }
|
|
36712
|
+
],
|
|
36713
|
+
related: [
|
|
36714
|
+
{ label: "List Fields", slug: "list-fields" },
|
|
36715
|
+
{ label: "Get Field", slug: "get-field" },
|
|
36716
|
+
{ label: "Webhook Events", slug: "webhook-events" }
|
|
36717
|
+
],
|
|
36718
|
+
faq: [
|
|
36719
|
+
{ question: "A field id I stored now returns superseded_by. Did I lose data?", answer: "No. The absorbed row stays readable and its occurrences move to the survivor. Read `superseded_by.id` (or call with `follow_redirects=true`) and rewrite your key; `GET /v1/fields/{id}/values` on the survivor includes the not-yet-repointed occurrences with `provenance.via_redirect: true`." },
|
|
36720
|
+
{ question: "Which maturity level is safe to hard-code?", answer: "`core`. A `proven` concept keeps its id but its name may still be groomed; a `candidate` may be merged or expire. Subscribe to the `field.*` events either way so a cache never goes stale silently." },
|
|
36721
|
+
{ question: "How do I go from a name in a user prompt to the right concept?", answer: "Call `GET /v1/fields/resolve?name=` with the wording you have. It tries the exact canonical name, the registry spelling fold, merge aliases and synonyms in that order (then case-insensitive fallbacks), follows redirects, and tells you which arm matched \u2014 then read `/card` to confirm the definition and example values before querying." }
|
|
36722
|
+
],
|
|
36723
|
+
mentions: ["field registry", "maturity", "core", "proven", "candidate", "superseded_by", "follow_redirects", "resolve field name", "concept card", "field values", "field history", "field.merged", "field.promoted", "field.graduated", "field.renamed", "field.demoted"]
|
|
36653
36724
|
}
|
|
36654
36725
|
];
|
|
36655
36726
|
|
package/dist/index.js
CHANGED
|
@@ -8126,7 +8126,8 @@ var API_NAV_SECTIONS = [
|
|
|
8126
8126
|
{ id: "fields", label: "Fields", children: [
|
|
8127
8127
|
{ id: "list-fields", label: "List Fields" },
|
|
8128
8128
|
{ id: "field-harmonization", label: "Harmonization" },
|
|
8129
|
-
{ id: "get-field", label: "Get Field" }
|
|
8129
|
+
{ id: "get-field", label: "Get Field" },
|
|
8130
|
+
{ id: "field-contract", label: "Registry Contract" }
|
|
8130
8131
|
] },
|
|
8131
8132
|
{ id: "registry", label: "Registry", children: [
|
|
8132
8133
|
{ id: "registry-query", label: "Query" },
|