@talonic/docs 0.21.23 → 0.21.25

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/index.js CHANGED
@@ -520,6 +520,16 @@ var NAV_SECTIONS = [
520
520
  { id: "delete-schema", label: "Delete Schema" }
521
521
  ]
522
522
  },
523
+ {
524
+ id: "specs",
525
+ label: "Specs",
526
+ children: [
527
+ { id: "spec-vs-schema", label: "Specs vs Schemas" },
528
+ { id: "list-specs", label: "List Specs" },
529
+ { id: "get-spec", label: "Get a Spec" },
530
+ { id: "spec-published-versions", label: "Published Versions" }
531
+ ]
532
+ },
523
533
  {
524
534
  id: "jobs",
525
535
  label: "Jobs",
@@ -1797,6 +1807,215 @@ function ApiReference({ LinkComponent }) {
1797
1807
  }` })
1798
1808
  }
1799
1809
  ) }),
1810
+ /* @__PURE__ */ jsx5(SectionHeading, { id: "specs", children: "Specs" }),
1811
+ /* @__PURE__ */ jsxs5("p", { className: "text-[15px] text-void-text-secondary leading-relaxed mb-6", children: [
1812
+ "A Spec is the authoring document behind ",
1813
+ /* @__PURE__ */ jsx5(InlineCode, { children: "/specs/:id" }),
1814
+ " in the app \u2014 the pipeline you compose and publish. Publishing it materializes it onto a schema, which is what runs. These endpoints are read-only: they report a Spec's identity, its published versions, and its stages with the live IDs each one points at."
1815
+ ] }),
1816
+ /* @__PURE__ */ jsxs5("div", { id: "spec-vs-schema", className: "scroll-mt-6", children: [
1817
+ /* @__PURE__ */ jsx5(SubHeading, { id: "spec-vs-schema-heading", children: "Specs vs Schemas" }),
1818
+ /* @__PURE__ */ jsxs5("p", { className: "text-[15px] text-void-text-secondary leading-relaxed mb-4", children: [
1819
+ "A Spec and its schema are ",
1820
+ /* @__PURE__ */ jsx5("strong", { children: "two records with two different IDs" }),
1821
+ ". The UUID in a ",
1822
+ /* @__PURE__ */ jsx5(InlineCode, { children: "/specs/..." }),
1823
+ " browser URL is the Spec ID; ",
1824
+ /* @__PURE__ */ jsx5(InlineCode, { children: "/v1/schemas/:id" }),
1825
+ " is keyed on schema IDs. Looking one up under the other returns 404."
1826
+ ] }),
1827
+ /* @__PURE__ */ jsxs5(Callout, { type: "warning", children: [
1828
+ "Two counters are also easy to confuse. ",
1829
+ /* @__PURE__ */ jsx5(InlineCode, { children: "version" }),
1830
+ " on a schema is the legacy schema-version counter, which a Spec-authored schema never advances \u2014 it stays at 1. A Spec's own published version is ",
1831
+ /* @__PURE__ */ jsx5(InlineCode, { children: "version" }),
1832
+ " here (and",
1833
+ " ",
1834
+ /* @__PURE__ */ jsx5(InlineCode, { children: "spec_version" }),
1835
+ " on ",
1836
+ /* @__PURE__ */ jsx5(InlineCode, { children: "/v1/schemas" }),
1837
+ "), with the full history at ",
1838
+ /* @__PURE__ */ jsx5(InlineCode, { children: "/v1/specs/:id/versions" }),
1839
+ "."
1840
+ ] }),
1841
+ /* @__PURE__ */ jsx5(
1842
+ ParamTable,
1843
+ {
1844
+ title: "Crossing between them",
1845
+ params: [
1846
+ { name: "Spec \u2192 schema", type: "GET /v1/specs/:id", description: "Read schema_id from the response." },
1847
+ { name: "schema \u2192 Spec", type: "GET /v1/schemas/:id", description: "Read spec_id from the response. Null for a directly-created schema." }
1848
+ ]
1849
+ }
1850
+ )
1851
+ ] }),
1852
+ /* @__PURE__ */ jsx5("div", { id: "list-specs", className: "scroll-mt-6", children: /* @__PURE__ */ jsxs5(
1853
+ EndpointBlock,
1854
+ {
1855
+ method: "GET",
1856
+ path: "/v1/specs",
1857
+ summary: "List Specs, newest first.",
1858
+ children: [
1859
+ /* @__PURE__ */ jsx5(
1860
+ ParamTable,
1861
+ {
1862
+ title: "Query parameters",
1863
+ params: [
1864
+ { name: "limit", type: "integer", description: "Page size, 1-100.", default: "20" },
1865
+ { name: "cursor", type: "string", description: "Opaque cursor from the previous page's next_cursor." },
1866
+ { name: "order", type: "string", description: "desc or asc, by creation time.", default: '"desc"' },
1867
+ { name: "search", type: "string", description: "Case-insensitive name search." }
1868
+ ]
1869
+ }
1870
+ ),
1871
+ /* @__PURE__ */ jsx5(CodeBlock, { title: "Response", children: `{
1872
+ "data": [
1873
+ {
1874
+ "id": "e2144027-39c0-44e8-a196-72be1e360749",
1875
+ "name": "Order Intake V25",
1876
+ "schema_id": "2e3ddf8c-b9ab-4934-bb11-a371e9c5d7a8",
1877
+ "version": 3,
1878
+ "materialized_version": 3,
1879
+ "materialized_at": "2026-04-25T14:30:00.000Z",
1880
+ "field_count": 60,
1881
+ "node_count": 7,
1882
+ "links": {
1883
+ "self": "/v1/specs/e2144027-39c0-44e8-a196-72be1e360749",
1884
+ "versions": "/v1/specs/e2144027-39c0-44e8-a196-72be1e360749/versions",
1885
+ "schema": "/v1/schemas/2e3ddf8c-b9ab-4934-bb11-a371e9c5d7a8"
1886
+ }
1887
+ }
1888
+ ],
1889
+ "pagination": { "total": 6, "limit": 20, "has_more": false, "next_cursor": null }
1890
+ }` }),
1891
+ /* @__PURE__ */ jsx5(
1892
+ ParamTable,
1893
+ {
1894
+ title: "Row fields",
1895
+ params: [
1896
+ { name: "version", type: "integer | null", description: "Published head \u2014 the number the Spec editor shows." },
1897
+ { name: "materialized_version", type: "integer | null", description: "The version live on the schema, i.e. what a run executes. Normally equal to version." },
1898
+ { name: "field_count", type: "integer", description: "Fields declared by the Spec." },
1899
+ { name: "node_count", type: "integer", description: "Stages in the rail. Not the number of executable phases \u2014 see Get a Spec." }
1900
+ ]
1901
+ }
1902
+ )
1903
+ ]
1904
+ }
1905
+ ) }),
1906
+ /* @__PURE__ */ jsx5("div", { id: "get-spec", className: "scroll-mt-6", children: /* @__PURE__ */ jsxs5(
1907
+ EndpointBlock,
1908
+ {
1909
+ method: "GET",
1910
+ path: "/v1/specs/:id",
1911
+ summary: "Get a Spec's structure: stages, live IDs, and the field mapping.",
1912
+ children: [
1913
+ /* @__PURE__ */ jsxs5("p", { className: "text-[14px] text-void-text-secondary leading-relaxed mb-4", children: [
1914
+ "The stages come back ",
1915
+ /* @__PURE__ */ jsx5("strong", { children: "twice" }),
1916
+ ", because \u201Cthe stages of a Spec\u201D has two legitimate answers. ",
1917
+ /* @__PURE__ */ jsx5(InlineCode, { children: "nodes" }),
1918
+ " is the rail as authored, in editing order, including markers like Source and Data Product. ",
1919
+ /* @__PURE__ */ jsx5(InlineCode, { children: "phases" }),
1920
+ " is the compiled execution plan, in run order \u2014 those markers produce no phase, and a validation checkpoint expands to one phase per member gate. Join them on ",
1921
+ /* @__PURE__ */ jsx5(InlineCode, { children: "rail_stage_id" }),
1922
+ "."
1923
+ ] }),
1924
+ /* @__PURE__ */ jsx5(CodeBlock, { title: "Response (abridged)", children: `{
1925
+ "id": "e2144027-39c0-44e8-a196-72be1e360749",
1926
+ "name": "Order Intake V25",
1927
+ "schema_id": "2e3ddf8c-b9ab-4934-bb11-a371e9c5d7a8",
1928
+ "version": 3,
1929
+ "materialized_version": 3,
1930
+
1931
+ "nodes": [
1932
+ { "node_id": "s-source", "position": 0, "type": "source", "name": "Source" },
1933
+ { "node_id": "s-schema", "position": 1, "type": "schema", "name": "Extraction" },
1934
+ { "node_id": "res-1", "position": 2, "type": "resolve", "name": "Resolution",
1935
+ "policy_ids": ["fadfb451-7c2e-4849-a6f1-1f5d20116336"] },
1936
+ { "node_id": "rec-1", "position": 3, "type": "reconcile", "name": "Matching",
1937
+ "matcher_stage_id": "d055b6f8-b324-4bc2-98ef-048e893ba762" },
1938
+ { "node_id": "s-deliver", "position": 4, "type": "deliver", "name": "Data Product" }
1939
+ ],
1940
+
1941
+ "phases": [
1942
+ { "number": 1, "phase_id": "phase-1", "type": "extraction",
1943
+ "name": "Extraction", "rail_stage_id": "s-schema" },
1944
+ { "number": 2, "phase_id": "phase-2", "type": "resolution",
1945
+ "name": "Resolution", "rail_stage_id": "res-1",
1946
+ "policy_id": "fadfb451-7c2e-4849-a6f1-1f5d20116336" },
1947
+ { "number": 3, "phase_id": "phase-3", "type": "matching",
1948
+ "name": "Matching", "rail_stage_id": "rec-1",
1949
+ "matcher_stage_id": "d055b6f8-b324-4bc2-98ef-048e893ba762" }
1950
+ ],
1951
+
1952
+ "fields": [
1953
+ { "field_id": "c086cb2d-06bf-4c22-9007-c6e455531133",
1954
+ "user_schema_field_id": "a3952c40-9f78-41a3-975f-57c5c79c3fae",
1955
+ "name": "shipper_number", "type": "string" }
1956
+ ]
1957
+ }` }),
1958
+ /* @__PURE__ */ jsx5(
1959
+ ParamTable,
1960
+ {
1961
+ title: "Key fields",
1962
+ params: [
1963
+ { name: "nodes[].node_id", type: "string | null", description: "Stage ID within the Spec. Null on a legacy rail that keyed stages by position." },
1964
+ { name: "nodes[].policy_ids", type: "string[]", description: "Data policy IDs \u2014 resolve stages." },
1965
+ { name: "nodes[].validation_stage_ids", type: "string[]", description: "Validation stage IDs \u2014 the gates a checkpoint contains." },
1966
+ { name: "nodes[].matcher_stage_id", type: "string", description: "Matcher stage ID \u2014 reconcile stages." },
1967
+ { name: "phases[].rail_stage_id", type: "string | null", description: "The rail stage this phase compiled from. Join key to nodes[].node_id, and the per-step cost key on /v1/usage/pipelines/:id." },
1968
+ { name: "fields[].field_id", type: "string", description: "The Spec document's immutable field identity \u2014 what lane conditions, assembly anchors and gate scopes reference." },
1969
+ { name: "fields[].user_schema_field_id", type: "string", description: "The schema field row that holds the extracted values." }
1970
+ ]
1971
+ }
1972
+ ),
1973
+ /* @__PURE__ */ jsxs5(Callout, { type: "info", children: [
1974
+ /* @__PURE__ */ jsx5(InlineCode, { children: "phases" }),
1975
+ " is what a ",
1976
+ /* @__PURE__ */ jsx5("strong", { children: "new" }),
1977
+ " run would execute, compiled from the current rail. For what a specific run actually executed, read its frozen plan with",
1978
+ " ",
1979
+ /* @__PURE__ */ jsx5(InlineCode, { children: "GET /v1/pipelines/:id?include=phases" }),
1980
+ " \u2014 same shape, same join key. Diffing the two shows configuration drift since that run."
1981
+ ] })
1982
+ ]
1983
+ }
1984
+ ) }),
1985
+ /* @__PURE__ */ jsx5("div", { id: "spec-published-versions", className: "scroll-mt-6", children: /* @__PURE__ */ jsxs5(
1986
+ EndpointBlock,
1987
+ {
1988
+ method: "GET",
1989
+ path: "/v1/specs/:id/versions",
1990
+ summary: "List a Spec's published versions, newest first.",
1991
+ children: [
1992
+ /* @__PURE__ */ jsx5(CodeBlock, { title: "Response", children: `{
1993
+ "data": [
1994
+ { "version": 3, "content_hash": "9f2c...",
1995
+ "created_at": "2026-04-25T14:30:00.000Z", "is_materialized": true },
1996
+ { "version": 2, "content_hash": "41ab...",
1997
+ "created_at": "2026-04-22T10:05:00.000Z", "is_materialized": false }
1998
+ ]
1999
+ }` }),
2000
+ /* @__PURE__ */ jsx5(
2001
+ ParamTable,
2002
+ {
2003
+ title: "Response fields",
2004
+ params: [
2005
+ { name: "version", type: "integer", description: "Version number. Publishes only ever append." },
2006
+ { name: "content_hash", type: "string", description: "sha256 of the canonical Spec document. Identical hashes are identical Specs." },
2007
+ { name: "is_materialized", type: "boolean", description: "Whether this is the version currently live on the schema." }
2008
+ ]
2009
+ }
2010
+ ),
2011
+ /* @__PURE__ */ jsxs5(Callout, { type: "warning", children: [
2012
+ "Not the same as ",
2013
+ /* @__PURE__ */ jsx5(InlineCode, { children: "GET /v1/schemas/:id/versions" }),
2014
+ ", which reads the legacy schema-version counter. A Spec-authored schema never writes that one, so it is normally empty."
2015
+ ] })
2016
+ ]
2017
+ }
2018
+ ) }),
1800
2019
  /* @__PURE__ */ jsx5(SectionHeading, { id: "jobs", children: "Jobs" }),
1801
2020
  /* @__PURE__ */ jsx5("p", { className: "text-[15px] text-void-text-secondary leading-relaxed mb-6", children: "Jobs track asynchronous extraction work. Create a job with a schema and document set, then poll for progress. Each job runs the full 4-phase extraction pipeline." }),
1802
2021
  /* @__PURE__ */ jsx5("div", { id: "create-job", className: "scroll-mt-6", children: /* @__PURE__ */ jsxs5(
@@ -7991,6 +8210,11 @@ var API_NAV_SECTIONS = [
7991
8210
  { id: "field-review-triage", label: "Triage Breakdown" },
7992
8211
  { id: "field-review-value-clusters", label: "Value Clusters" }
7993
8212
  ] },
8213
+ { id: "specs", label: "Specs", children: [
8214
+ { id: "list-specs", label: "List Specs" },
8215
+ { id: "get-spec", label: "Get a Spec" },
8216
+ { id: "spec-published-versions", label: "Published Versions" }
8217
+ ] },
7994
8218
  { id: "spec-config", label: "Spec Config", children: [
7995
8219
  { id: "get-spec-rail", label: "Get Rail" },
7996
8220
  { id: "set-spec-rail", label: "Set Rail" },