@talonic/docs 0.19.0 → 0.19.2
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 +308 -7
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/dist/seo.js +10 -0
- package/package.json +1 -1
- package/dist/tailwind-preset.d.cts +0 -45
- package/dist/tailwind-preset.d.ts +0 -45
package/dist/content.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
// src/content/helpers.ts
|
|
2
|
-
function deriveBreadcrumbs(
|
|
2
|
+
function deriveBreadcrumbs(sections45, leafId, domain) {
|
|
3
3
|
const root = {
|
|
4
4
|
label: domain === "api" ? "API Reference" : "Platform Guide",
|
|
5
5
|
slug: domain
|
|
6
6
|
};
|
|
7
|
-
for (const group of
|
|
7
|
+
for (const group of sections45) {
|
|
8
8
|
const child = group.children?.find((c) => c.id === leafId);
|
|
9
9
|
if (child) {
|
|
10
10
|
return [root, { label: group.label, slug: group.id }, { label: child.label, slug: child.id }];
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
|
-
const topLevel =
|
|
13
|
+
const topLevel = sections45.find((s) => s.id === leafId);
|
|
14
14
|
if (topLevel) {
|
|
15
15
|
return [root, { label: topLevel.label, slug: topLevel.id }];
|
|
16
16
|
}
|
|
17
17
|
return [root];
|
|
18
18
|
}
|
|
19
|
-
function derivePrevNext(
|
|
20
|
-
const flat =
|
|
19
|
+
function derivePrevNext(sections45, leafId) {
|
|
20
|
+
const flat = sections45.flatMap(
|
|
21
21
|
(s) => s.children ?? [{ id: s.id, label: s.label }]
|
|
22
22
|
);
|
|
23
23
|
const idx = flat.findIndex((c) => c.id === leafId);
|
|
@@ -221,6 +221,14 @@ var API_NAV_SECTIONS = [
|
|
|
221
221
|
{ id: "manage-routing-rule", label: "Manage Rule" },
|
|
222
222
|
{ id: "reorder-routing-rules", label: "Reorder" }
|
|
223
223
|
] },
|
|
224
|
+
{ id: "registry", label: "Registry", children: [
|
|
225
|
+
{ id: "registry-query", label: "Query" }
|
|
226
|
+
] },
|
|
227
|
+
{ id: "billing", label: "Billing", children: [
|
|
228
|
+
{ id: "billing-settings", label: "Settings" },
|
|
229
|
+
{ id: "billing-topup", label: "Auto Top-Up" },
|
|
230
|
+
{ id: "cost-headers", label: "Cost Headers" }
|
|
231
|
+
] },
|
|
224
232
|
{ id: "errors-rate-limits", label: "Errors & Rate Limits", children: [
|
|
225
233
|
{ id: "error-format", label: "Error Format" },
|
|
226
234
|
{ id: "error-codes", label: "Error Codes" },
|
|
@@ -10700,8 +10708,299 @@ var sections41 = [
|
|
|
10700
10708
|
}
|
|
10701
10709
|
];
|
|
10702
10710
|
|
|
10703
|
-
// src/content/api/
|
|
10711
|
+
// src/content/api/billing.ts
|
|
10704
10712
|
var sections42 = [
|
|
10713
|
+
{
|
|
10714
|
+
slug: "billing-settings",
|
|
10715
|
+
parentSlug: "billing",
|
|
10716
|
+
title: "Get / Update Settings",
|
|
10717
|
+
seoTitle: "Billing Settings Endpoint \u2014 Talonic Docs",
|
|
10718
|
+
description: "Get and update auto top-up billing settings. A human must enable auto top-up before agents can use the topup endpoint.",
|
|
10719
|
+
content: [
|
|
10720
|
+
{
|
|
10721
|
+
type: "paragraph",
|
|
10722
|
+
text: "Billing settings control whether AI agents can autonomously top up credits. A human must enable auto top-up and configure the threshold and amount before agents can call the topup endpoint."
|
|
10723
|
+
},
|
|
10724
|
+
{
|
|
10725
|
+
type: "endpoint",
|
|
10726
|
+
method: "GET",
|
|
10727
|
+
path: "/v1/billing/settings",
|
|
10728
|
+
summary: "Get current billing settings.",
|
|
10729
|
+
description: "Requires read scope.",
|
|
10730
|
+
blocks: [
|
|
10731
|
+
{
|
|
10732
|
+
type: "code",
|
|
10733
|
+
title: "Response",
|
|
10734
|
+
code: `{
|
|
10735
|
+
"auto_topup_enabled": false,
|
|
10736
|
+
"auto_topup_threshold": 5000,
|
|
10737
|
+
"auto_topup_amount": 50000
|
|
10738
|
+
}`
|
|
10739
|
+
}
|
|
10740
|
+
]
|
|
10741
|
+
},
|
|
10742
|
+
{
|
|
10743
|
+
type: "endpoint",
|
|
10744
|
+
method: "PATCH",
|
|
10745
|
+
path: "/v1/billing/settings",
|
|
10746
|
+
summary: "Update billing settings.",
|
|
10747
|
+
description: "Requires write scope. All fields are optional \u2014 only provided fields are updated.",
|
|
10748
|
+
blocks: [
|
|
10749
|
+
{
|
|
10750
|
+
type: "param-table",
|
|
10751
|
+
title: "Body parameters",
|
|
10752
|
+
params: [
|
|
10753
|
+
{ name: "auto_topup_enabled", type: "boolean", description: "Enable or disable auto top-up for agents." },
|
|
10754
|
+
{ name: "auto_topup_threshold", type: "integer", description: "Balance threshold (credits) below which agents can top up. Minimum 1,000.", default: "5000" },
|
|
10755
|
+
{ name: "auto_topup_amount", type: "integer", description: "Credits added per top-up. Minimum 1,000, maximum 500,000.", default: "50000" }
|
|
10756
|
+
]
|
|
10757
|
+
}
|
|
10758
|
+
]
|
|
10759
|
+
}
|
|
10760
|
+
],
|
|
10761
|
+
related: [
|
|
10762
|
+
{ label: "Auto Top-Up", slug: "billing-topup" },
|
|
10763
|
+
{ label: "Credits Balance", slug: "credits-balance" }
|
|
10764
|
+
],
|
|
10765
|
+
faq: [
|
|
10766
|
+
{
|
|
10767
|
+
question: "Who can enable auto top-up?",
|
|
10768
|
+
answer: "Only a human with write access can enable auto top-up via PATCH /v1/billing/settings. Agents cannot enable it themselves."
|
|
10769
|
+
}
|
|
10770
|
+
],
|
|
10771
|
+
mentions: ["billing settings", "auto top-up", "threshold", "credits"]
|
|
10772
|
+
},
|
|
10773
|
+
{
|
|
10774
|
+
slug: "billing-topup",
|
|
10775
|
+
parentSlug: "billing",
|
|
10776
|
+
title: "Auto Top-Up",
|
|
10777
|
+
seoTitle: "Auto Top-Up Endpoint \u2014 Talonic Docs",
|
|
10778
|
+
description: "Agent-callable endpoint to autonomously top up credits. Requires auto_topup_enabled to be set by a human. Returns 403 if not enabled.",
|
|
10779
|
+
content: [
|
|
10780
|
+
{
|
|
10781
|
+
type: "paragraph",
|
|
10782
|
+
text: "AI agents call this endpoint to autonomously add credits when the balance falls below the configured threshold. **A human must first enable auto top-up** via `PATCH /v1/billing/settings`."
|
|
10783
|
+
},
|
|
10784
|
+
{
|
|
10785
|
+
type: "endpoint",
|
|
10786
|
+
method: "POST",
|
|
10787
|
+
path: "/v1/billing/topup",
|
|
10788
|
+
summary: "Top up credits autonomously. Requires billing scope.",
|
|
10789
|
+
description: "Returns 403 if auto_topup_enabled is false. If balance is already above threshold, returns topped_up: false without adding credits.",
|
|
10790
|
+
blocks: [
|
|
10791
|
+
{
|
|
10792
|
+
type: "code",
|
|
10793
|
+
title: "Response (topped up)",
|
|
10794
|
+
code: `{
|
|
10795
|
+
"topped_up": true,
|
|
10796
|
+
"amount_credits": 50000,
|
|
10797
|
+
"new_balance_credits": 54930,
|
|
10798
|
+
"new_balance_eur": 54.93
|
|
10799
|
+
}`
|
|
10800
|
+
},
|
|
10801
|
+
{
|
|
10802
|
+
type: "code",
|
|
10803
|
+
title: "Response (not needed)",
|
|
10804
|
+
code: `{
|
|
10805
|
+
"topped_up": false,
|
|
10806
|
+
"reason": "balance_above_threshold",
|
|
10807
|
+
"balance_credits": 64930,
|
|
10808
|
+
"balance_eur": 64.93,
|
|
10809
|
+
"threshold_credits": 5000
|
|
10810
|
+
}`
|
|
10811
|
+
},
|
|
10812
|
+
{
|
|
10813
|
+
type: "callout",
|
|
10814
|
+
variant: "warning",
|
|
10815
|
+
text: "The `billing` scope must be explicitly granted to the API key. Existing keys do not have it by default."
|
|
10816
|
+
}
|
|
10817
|
+
]
|
|
10818
|
+
}
|
|
10819
|
+
],
|
|
10820
|
+
related: [
|
|
10821
|
+
{ label: "Billing Settings", slug: "billing-settings" },
|
|
10822
|
+
{ label: "Credits Balance", slug: "credits-balance" }
|
|
10823
|
+
],
|
|
10824
|
+
faq: [
|
|
10825
|
+
{
|
|
10826
|
+
question: "Can an agent enable auto top-up itself?",
|
|
10827
|
+
answer: "No. Auto top-up must be enabled by a human via PATCH /v1/billing/settings. The POST /v1/billing/topup endpoint returns 403 if it is not enabled."
|
|
10828
|
+
},
|
|
10829
|
+
{
|
|
10830
|
+
question: "What scope does the API key need?",
|
|
10831
|
+
answer: "The billing scope. This must be explicitly granted when creating the API key \u2014 existing keys do not have it by default."
|
|
10832
|
+
}
|
|
10833
|
+
],
|
|
10834
|
+
mentions: ["auto top-up", "agent", "billing scope", "credits", "autonomous"]
|
|
10835
|
+
},
|
|
10836
|
+
{
|
|
10837
|
+
slug: "cost-headers",
|
|
10838
|
+
parentSlug: "billing",
|
|
10839
|
+
title: "Cost Response Headers",
|
|
10840
|
+
seoTitle: "Cost Response Headers \u2014 Talonic Docs",
|
|
10841
|
+
description: "Every successful POST /v1/extract response includes X-Talonic-Cost-* headers showing credits consumed, EUR equivalent, remaining balance, and cell resolution breakdown.",
|
|
10842
|
+
content: [
|
|
10843
|
+
{
|
|
10844
|
+
type: "paragraph",
|
|
10845
|
+
text: "Every successful `POST /v1/extract` response includes cost headers so AI agents can track spending without a separate API call:"
|
|
10846
|
+
},
|
|
10847
|
+
{
|
|
10848
|
+
type: "param-table",
|
|
10849
|
+
title: "Response headers",
|
|
10850
|
+
params: [
|
|
10851
|
+
{ name: "X-Talonic-Cost-Credits", type: "integer", description: "Credits consumed for this extraction request." },
|
|
10852
|
+
{ name: "X-Talonic-Cost-EUR", type: "float", description: "EUR equivalent of credits consumed (at the configured rate)." },
|
|
10853
|
+
{ name: "X-Talonic-Balance-Credits", type: "integer", description: "Remaining credit balance after this request." },
|
|
10854
|
+
{ name: "X-Talonic-Cells-Resolved-Registry", type: "integer", description: "Number of fields resolved from the registry (no AI cost)." },
|
|
10855
|
+
{ name: "X-Talonic-Cells-Resolved-AI", type: "integer", description: "Number of fields resolved by AI extraction." }
|
|
10856
|
+
]
|
|
10857
|
+
},
|
|
10858
|
+
{
|
|
10859
|
+
type: "code",
|
|
10860
|
+
title: "Example response headers",
|
|
10861
|
+
language: "http",
|
|
10862
|
+
code: `HTTP/1.1 200 OK
|
|
10863
|
+
X-Talonic-Cost-Credits: 70
|
|
10864
|
+
X-Talonic-Cost-EUR: 0.07
|
|
10865
|
+
X-Talonic-Balance-Credits: 64930
|
|
10866
|
+
X-Talonic-Cells-Resolved-Registry: 0
|
|
10867
|
+
X-Talonic-Cells-Resolved-AI: 1`
|
|
10868
|
+
},
|
|
10869
|
+
{
|
|
10870
|
+
type: "paragraph",
|
|
10871
|
+
text: "Agents can read these headers after every extraction to decide whether to call `POST /v1/billing/topup` to replenish credits."
|
|
10872
|
+
}
|
|
10873
|
+
],
|
|
10874
|
+
related: [
|
|
10875
|
+
{ label: "POST /v1/extract", slug: "post-extract" },
|
|
10876
|
+
{ label: "Auto Top-Up", slug: "billing-topup" },
|
|
10877
|
+
{ label: "Credits Balance", slug: "credits-balance" }
|
|
10878
|
+
],
|
|
10879
|
+
faq: [
|
|
10880
|
+
{
|
|
10881
|
+
question: "Are cost headers included on async (202) responses?",
|
|
10882
|
+
answer: "No. Cost headers are only included on synchronous 200 responses where extraction completes immediately. Async responses return a poll URL instead."
|
|
10883
|
+
}
|
|
10884
|
+
],
|
|
10885
|
+
mentions: ["cost headers", "X-Talonic-Cost", "credits", "balance", "cells resolved"]
|
|
10886
|
+
}
|
|
10887
|
+
];
|
|
10888
|
+
|
|
10889
|
+
// src/content/api/registry.ts
|
|
10890
|
+
var sections43 = [
|
|
10891
|
+
{
|
|
10892
|
+
slug: "registry-query",
|
|
10893
|
+
parentSlug: "registry",
|
|
10894
|
+
title: "Query the Registry",
|
|
10895
|
+
seoTitle: "Registry Query \u2014 Ingest Once, Query Forever \u2014 Talonic Docs",
|
|
10896
|
+
description: "Query previously-extracted field values across all documents without re-extraction. Zero AI calls. Filter by field values and select which fields to return.",
|
|
10897
|
+
content: [
|
|
10898
|
+
{
|
|
10899
|
+
type: "paragraph",
|
|
10900
|
+
text: "The registry query endpoint searches across **all previously-extracted documents** by field values. No document upload, no re-extraction, no AI calls. Documents ingested days or months ago are queryable immediately."
|
|
10901
|
+
},
|
|
10902
|
+
{
|
|
10903
|
+
type: "endpoint",
|
|
10904
|
+
method: "POST",
|
|
10905
|
+
path: "/v1/registry/query",
|
|
10906
|
+
summary: "Query extracted field values across documents.",
|
|
10907
|
+
description: "Requires read scope. Returns flat rows with one entry per matching document. All `where` conditions are ANDed.",
|
|
10908
|
+
blocks: [
|
|
10909
|
+
{
|
|
10910
|
+
type: "param-table",
|
|
10911
|
+
title: "Body parameters",
|
|
10912
|
+
params: [
|
|
10913
|
+
{ name: "where", type: "object", required: true, description: "Field-value conditions. Keys are field names, values are the expected values. All conditions are ANDed." },
|
|
10914
|
+
{ name: "select", type: "string[]", description: "Field names to return in results. If omitted, returns all fields referenced in `where`." },
|
|
10915
|
+
{ name: "limit", type: "integer", description: "Maximum rows to return (default 100, max 500).", default: "100" }
|
|
10916
|
+
]
|
|
10917
|
+
},
|
|
10918
|
+
{
|
|
10919
|
+
type: "code",
|
|
10920
|
+
title: "Request",
|
|
10921
|
+
language: "json",
|
|
10922
|
+
code: `{
|
|
10923
|
+
"where": {
|
|
10924
|
+
"vendor_name": "Meridian Energy AG",
|
|
10925
|
+
"contract_year": "2026"
|
|
10926
|
+
},
|
|
10927
|
+
"select": ["contract_value", "auto_renew", "notice_period_days"],
|
|
10928
|
+
"limit": 50
|
|
10929
|
+
}`
|
|
10930
|
+
},
|
|
10931
|
+
{
|
|
10932
|
+
type: "code",
|
|
10933
|
+
title: "Response",
|
|
10934
|
+
language: "json",
|
|
10935
|
+
code: `{
|
|
10936
|
+
"data": [
|
|
10937
|
+
{
|
|
10938
|
+
"document_id": "d7a1b2c3-...",
|
|
10939
|
+
"filename": "meridian-framework-2026.pdf",
|
|
10940
|
+
"document_type": "Framework Agreement",
|
|
10941
|
+
"vendor_name": "Meridian Energy AG",
|
|
10942
|
+
"contract_year": "2026",
|
|
10943
|
+
"contract_value": "450000",
|
|
10944
|
+
"auto_renew": "true",
|
|
10945
|
+
"notice_period_days": "90"
|
|
10946
|
+
},
|
|
10947
|
+
{
|
|
10948
|
+
"document_id": "e8f4a5b6-...",
|
|
10949
|
+
"filename": "meridian-amendment-q2.pdf",
|
|
10950
|
+
"document_type": "Contract Amendment",
|
|
10951
|
+
"vendor_name": "Meridian Energy AG",
|
|
10952
|
+
"contract_year": "2026",
|
|
10953
|
+
"contract_value": "475000",
|
|
10954
|
+
"auto_renew": "true",
|
|
10955
|
+
"notice_period_days": "90"
|
|
10956
|
+
}
|
|
10957
|
+
],
|
|
10958
|
+
"total": 2
|
|
10959
|
+
}`
|
|
10960
|
+
},
|
|
10961
|
+
{
|
|
10962
|
+
type: "callout",
|
|
10963
|
+
text: "Field names in `where` and `select` are resolved against your workspace's field registry by canonical name (case-insensitive). Unknown field names return an error."
|
|
10964
|
+
},
|
|
10965
|
+
{
|
|
10966
|
+
type: "paragraph",
|
|
10967
|
+
text: "**How it works:** The query searches the `resolved_document_values` table \u2014 materialized field values produced by the extraction and jobs pipeline. Every field extracted from every document is queryable. No LLM calls are made."
|
|
10968
|
+
}
|
|
10969
|
+
]
|
|
10970
|
+
}
|
|
10971
|
+
],
|
|
10972
|
+
related: [
|
|
10973
|
+
{ label: "Field Registry", slug: "field-registry" },
|
|
10974
|
+
{ label: "Filter Documents", slug: "filter-documents" },
|
|
10975
|
+
{ label: "POST /v1/extract", slug: "post-extract" }
|
|
10976
|
+
],
|
|
10977
|
+
faq: [
|
|
10978
|
+
{
|
|
10979
|
+
question: "Does registry query re-extract documents?",
|
|
10980
|
+
answer: "No. It searches previously-extracted field values with zero AI calls. Documents can have been ingested days or months ago."
|
|
10981
|
+
},
|
|
10982
|
+
{
|
|
10983
|
+
question: "What field names can I use in where and select?",
|
|
10984
|
+
answer: "Any canonical field name from your workspace's field registry. Names are resolved case-insensitively. Use GET /v1/fields to discover available field names."
|
|
10985
|
+
},
|
|
10986
|
+
{
|
|
10987
|
+
question: "How is this different from POST /filter/documents?",
|
|
10988
|
+
answer: "Registry query returns flat rows (field name \u2192 value), shaped for agents and programmatic consumption. Filter documents returns document objects with nested field_values, shaped for UI consumption."
|
|
10989
|
+
}
|
|
10990
|
+
],
|
|
10991
|
+
mentions: [
|
|
10992
|
+
"registry query",
|
|
10993
|
+
"ingest once",
|
|
10994
|
+
"query forever",
|
|
10995
|
+
"field values",
|
|
10996
|
+
"zero re-extraction",
|
|
10997
|
+
"resolved_document_values"
|
|
10998
|
+
]
|
|
10999
|
+
}
|
|
11000
|
+
];
|
|
11001
|
+
|
|
11002
|
+
// src/content/api/errors-rate-limits.ts
|
|
11003
|
+
var sections44 = [
|
|
10705
11004
|
{
|
|
10706
11005
|
slug: "error-format",
|
|
10707
11006
|
parentSlug: "errors-rate-limits",
|
|
@@ -10853,7 +11152,9 @@ var ALL_API_RAW = [
|
|
|
10853
11152
|
...sections39,
|
|
10854
11153
|
...sections40,
|
|
10855
11154
|
...sections41,
|
|
10856
|
-
...sections42
|
|
11155
|
+
...sections42,
|
|
11156
|
+
...sections43,
|
|
11157
|
+
...sections44
|
|
10857
11158
|
];
|
|
10858
11159
|
function enrich(raw, navSections, domain) {
|
|
10859
11160
|
return raw.map((r) => {
|
package/dist/index.js
CHANGED
|
@@ -6565,6 +6565,14 @@ var API_NAV_SECTIONS = [
|
|
|
6565
6565
|
{ id: "manage-routing-rule", label: "Manage Rule" },
|
|
6566
6566
|
{ id: "reorder-routing-rules", label: "Reorder" }
|
|
6567
6567
|
] },
|
|
6568
|
+
{ id: "registry", label: "Registry", children: [
|
|
6569
|
+
{ id: "registry-query", label: "Query" }
|
|
6570
|
+
] },
|
|
6571
|
+
{ id: "billing", label: "Billing", children: [
|
|
6572
|
+
{ id: "billing-settings", label: "Settings" },
|
|
6573
|
+
{ id: "billing-topup", label: "Auto Top-Up" },
|
|
6574
|
+
{ id: "cost-headers", label: "Cost Headers" }
|
|
6575
|
+
] },
|
|
6568
6576
|
{ id: "errors-rate-limits", label: "Errors & Rate Limits", children: [
|
|
6569
6577
|
{ id: "error-format", label: "Error Format" },
|
|
6570
6578
|
{ id: "error-codes", label: "Error Codes" },
|
|
@@ -6710,6 +6718,8 @@ var API_SECTION_META = [
|
|
|
6710
6718
|
{ id: "review", title: "Review API", description: "Review queue for validation records \u2014 list items, stats, take action (approve/reject/flag), batch operations, and assignment." },
|
|
6711
6719
|
{ id: "quality", title: "Quality API", description: "Ground truth datasets, entries management with CSV import, benchmark runs, per-field accuracy results, and benchmark comparison." },
|
|
6712
6720
|
{ id: "routing-rules", title: "Routing Rules API", description: "Document routing rules \u2014 create, manage, and reorder priority-based rules for automatic document workflow assignment." },
|
|
6721
|
+
{ id: "registry", title: "Registry API", description: "Query previously-extracted field values across all documents \u2014 ingest once, query forever. Zero re-extraction, zero AI calls." },
|
|
6722
|
+
{ id: "billing", title: "Billing API", description: "Billing settings, auto top-up for AI agents, and cost response headers on extraction requests." },
|
|
6713
6723
|
{ id: "errors-rate-limits", title: "Errors & Rate Limits", description: "Error response format, error codes, rate limit tiers by plan, and rate limit headers." }
|
|
6714
6724
|
];
|
|
6715
6725
|
var PLATFORM_SECTION_META = [
|