@talonic/docs 0.20.7 → 0.20.9
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 +1563 -278
- package/dist/index.js +129 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -703,6 +703,7 @@ var NAV_SECTIONS = [
|
|
|
703
703
|
id: "webhooks",
|
|
704
704
|
label: "Webhooks",
|
|
705
705
|
children: [
|
|
706
|
+
{ id: "webhook-management", label: "Management" },
|
|
706
707
|
{ id: "webhook-events", label: "Events" },
|
|
707
708
|
{ id: "webhook-delivery", label: "Delivery Format" },
|
|
708
709
|
{ id: "webhook-verification", label: "Signature Verification" },
|
|
@@ -812,6 +813,13 @@ var NAV_SECTIONS = [
|
|
|
812
813
|
{ id: "credits-usage-log", label: "Usage Log" }
|
|
813
814
|
]
|
|
814
815
|
},
|
|
816
|
+
{
|
|
817
|
+
id: "billing",
|
|
818
|
+
label: "Billing",
|
|
819
|
+
children: [
|
|
820
|
+
{ id: "billing-settings", label: "Settings" }
|
|
821
|
+
]
|
|
822
|
+
},
|
|
815
823
|
{
|
|
816
824
|
id: "agent",
|
|
817
825
|
label: "Agent",
|
|
@@ -1008,7 +1016,8 @@ function ApiReference({ LinkComponent }) {
|
|
|
1008
1016
|
{ name: "schema_id", type: "string", description: "Use a previously saved schema by ID. Mutually exclusive with schema." },
|
|
1009
1017
|
{ name: "instructions", type: "string", description: 'Natural language instructions to guide extraction. E.g. "Focus on the billing section. Amounts are in EUR."' },
|
|
1010
1018
|
{ name: "options", type: "object", description: "Additional extraction options. See Options below." },
|
|
1011
|
-
{ name: "include_markdown", type: "string", description: 'Set to "true" to include the OCR-converted markdown of the document in the response. Useful for PDF-to-markdown conversion.' }
|
|
1019
|
+
{ name: "include_markdown", type: "string", description: 'Set to "true" to include the OCR-converted markdown of the document in the response. Useful for PDF-to-markdown conversion.' },
|
|
1020
|
+
{ name: "include_provenance", type: "string", description: 'Set to "true" to include per-field provenance in the response. Each field gets source_text (the text the value was extracted from), section (document section), and page (page number).' }
|
|
1012
1021
|
]
|
|
1013
1022
|
}
|
|
1014
1023
|
),
|
|
@@ -1366,6 +1375,10 @@ function ApiReference({ LinkComponent }) {
|
|
|
1366
1375
|
"line_items": 0.87
|
|
1367
1376
|
}
|
|
1368
1377
|
},
|
|
1378
|
+
"provenance": {
|
|
1379
|
+
"vendor_name": { "source_text": "Acme Corp Ltd.", "section": "Header", "page": 1 },
|
|
1380
|
+
"invoice_total": { "source_text": "$14,250.00", "section": "Summary", "page": 2 }
|
|
1381
|
+
},
|
|
1369
1382
|
"metadata": {
|
|
1370
1383
|
"pages": 2,
|
|
1371
1384
|
"language": "en",
|
|
@@ -3768,6 +3781,83 @@ function ApiReference({ LinkComponent }) {
|
|
|
3768
3781
|
/* @__PURE__ */ jsx5(InlineCode, { children: "webhook_url" }),
|
|
3769
3782
|
" option."
|
|
3770
3783
|
] }),
|
|
3784
|
+
/* @__PURE__ */ jsx5(SubHeading, { id: "webhook-management", children: "Management" }),
|
|
3785
|
+
/* @__PURE__ */ jsx5("p", { className: "text-[15px] text-void-text-secondary leading-relaxed mb-4", children: "Programmatically create, update, and delete webhook configurations. Each webhook can be scoped to specific event types and optionally to a single source connection." }),
|
|
3786
|
+
/* @__PURE__ */ jsx5(
|
|
3787
|
+
EndpointBlock,
|
|
3788
|
+
{
|
|
3789
|
+
method: "GET",
|
|
3790
|
+
path: "/v1/webhooks",
|
|
3791
|
+
summary: "List webhook configurations.",
|
|
3792
|
+
description: "Returns all webhook configurations for your organization.",
|
|
3793
|
+
children: /* @__PURE__ */ jsx5(CodeBlock, { title: "200 \u2014 Response", children: `{
|
|
3794
|
+
"data": [
|
|
3795
|
+
{
|
|
3796
|
+
"id": "whk_a1b2c3d4",
|
|
3797
|
+
"url": "https://example.com/webhook",
|
|
3798
|
+
"events": ["extraction.complete", "extraction.failed"],
|
|
3799
|
+
"is_active": true,
|
|
3800
|
+
"source_connection_id": null,
|
|
3801
|
+
"created_at": "2026-05-01T10:00:00.000Z",
|
|
3802
|
+
"updated_at": "2026-05-01T10:00:00.000Z"
|
|
3803
|
+
}
|
|
3804
|
+
]
|
|
3805
|
+
}` })
|
|
3806
|
+
}
|
|
3807
|
+
),
|
|
3808
|
+
/* @__PURE__ */ jsx5(
|
|
3809
|
+
EndpointBlock,
|
|
3810
|
+
{
|
|
3811
|
+
method: "POST",
|
|
3812
|
+
path: "/v1/webhooks",
|
|
3813
|
+
summary: "Create a webhook configuration.",
|
|
3814
|
+
description: "Creates a new webhook endpoint for your organization.",
|
|
3815
|
+
children: /* @__PURE__ */ jsx5(
|
|
3816
|
+
ParamTable,
|
|
3817
|
+
{
|
|
3818
|
+
title: "Body parameters",
|
|
3819
|
+
params: [
|
|
3820
|
+
{ name: "url", type: "string", required: true, description: "The HTTPS URL to deliver events to." },
|
|
3821
|
+
{ name: "secret", type: "string", description: "Shared secret for HMAC-SHA256 signature verification. Auto-generated if omitted." },
|
|
3822
|
+
{ name: "events", type: "string[]", description: 'Event types to subscribe to. Defaults to ["extraction.complete", "extraction.failed"].' },
|
|
3823
|
+
{ name: "source_connection_id", type: "string", description: "Scope deliveries to a specific source connection." },
|
|
3824
|
+
{ name: "is_active", type: "boolean", description: "Whether the webhook is active. Defaults to true." }
|
|
3825
|
+
]
|
|
3826
|
+
}
|
|
3827
|
+
)
|
|
3828
|
+
}
|
|
3829
|
+
),
|
|
3830
|
+
/* @__PURE__ */ jsx5(
|
|
3831
|
+
EndpointBlock,
|
|
3832
|
+
{
|
|
3833
|
+
method: "PATCH",
|
|
3834
|
+
path: "/v1/webhooks/:id",
|
|
3835
|
+
summary: "Update a webhook configuration.",
|
|
3836
|
+
description: "Partially update an existing webhook configuration.",
|
|
3837
|
+
children: /* @__PURE__ */ jsx5(
|
|
3838
|
+
ParamTable,
|
|
3839
|
+
{
|
|
3840
|
+
title: "Body parameters",
|
|
3841
|
+
params: [
|
|
3842
|
+
{ name: "url", type: "string", description: "Updated delivery URL." },
|
|
3843
|
+
{ name: "secret", type: "string", description: "Updated signing secret." },
|
|
3844
|
+
{ name: "events", type: "string[]", description: "Updated event filter." },
|
|
3845
|
+
{ name: "is_active", type: "boolean", description: "Enable or disable the webhook." }
|
|
3846
|
+
]
|
|
3847
|
+
}
|
|
3848
|
+
)
|
|
3849
|
+
}
|
|
3850
|
+
),
|
|
3851
|
+
/* @__PURE__ */ jsx5(
|
|
3852
|
+
EndpointBlock,
|
|
3853
|
+
{
|
|
3854
|
+
method: "DELETE",
|
|
3855
|
+
path: "/v1/webhooks/:id",
|
|
3856
|
+
summary: "Delete a webhook configuration.",
|
|
3857
|
+
description: "Permanently removes a webhook configuration. Pending deliveries are cancelled.",
|
|
3858
|
+
children: /* @__PURE__ */ jsx5(CodeBlock, { title: "200 \u2014 Response", children: `{ "deleted": true, "id": "whk_a1b2c3d4" }` })
|
|
3859
|
+
}
|
|
3860
|
+
),
|
|
3771
3861
|
/* @__PURE__ */ jsx5(SubHeading, { id: "webhook-events", children: "Events" }),
|
|
3772
3862
|
/* @__PURE__ */ jsx5("div", { className: "border border-void-border rounded-lg overflow-hidden my-4", children: /* @__PURE__ */ jsxs5("table", { className: "w-full text-sm", children: [
|
|
3773
3863
|
/* @__PURE__ */ jsx5("thead", { children: /* @__PURE__ */ jsxs5("tr", { className: "bg-void-surface-2/50", children: [
|
|
@@ -4843,6 +4933,43 @@ function verifyWebhook(payload, signature, secret) {
|
|
|
4843
4933
|
]
|
|
4844
4934
|
}
|
|
4845
4935
|
) }),
|
|
4936
|
+
/* @__PURE__ */ jsx5(SectionHeading, { id: "billing", children: "Billing" }),
|
|
4937
|
+
/* @__PURE__ */ jsx5(SubHeading, { id: "billing-settings", children: "Settings" }),
|
|
4938
|
+
/* @__PURE__ */ jsx5("p", { className: "text-[15px] text-void-text-secondary leading-relaxed mb-4", children: "Manage auto top-up configuration. When enabled, your credit balance is automatically replenished when it falls below the threshold." }),
|
|
4939
|
+
/* @__PURE__ */ jsx5(
|
|
4940
|
+
EndpointBlock,
|
|
4941
|
+
{
|
|
4942
|
+
method: "GET",
|
|
4943
|
+
path: "/v1/billing/settings",
|
|
4944
|
+
summary: "Get billing settings.",
|
|
4945
|
+
description: "Returns the current auto top-up configuration for your organization.",
|
|
4946
|
+
children: /* @__PURE__ */ jsx5(CodeBlock, { title: "200 \u2014 Response", children: `{
|
|
4947
|
+
"auto_topup_enabled": true,
|
|
4948
|
+
"auto_topup_threshold": 1000,
|
|
4949
|
+
"auto_topup_amount": 5000
|
|
4950
|
+
}` })
|
|
4951
|
+
}
|
|
4952
|
+
),
|
|
4953
|
+
/* @__PURE__ */ jsx5(
|
|
4954
|
+
EndpointBlock,
|
|
4955
|
+
{
|
|
4956
|
+
method: "PATCH",
|
|
4957
|
+
path: "/v1/billing/settings",
|
|
4958
|
+
summary: "Update billing settings.",
|
|
4959
|
+
description: "Update auto top-up configuration. All fields are optional.",
|
|
4960
|
+
children: /* @__PURE__ */ jsx5(
|
|
4961
|
+
ParamTable,
|
|
4962
|
+
{
|
|
4963
|
+
title: "Body parameters",
|
|
4964
|
+
params: [
|
|
4965
|
+
{ name: "auto_topup_enabled", type: "boolean", description: "Enable or disable automatic top-up." },
|
|
4966
|
+
{ name: "auto_topup_threshold", type: "number", description: "Credit balance threshold that triggers a top-up. Minimum: 1000." },
|
|
4967
|
+
{ name: "auto_topup_amount", type: "number", description: "Number of credits to add on each top-up. Minimum: 1000." }
|
|
4968
|
+
]
|
|
4969
|
+
}
|
|
4970
|
+
)
|
|
4971
|
+
}
|
|
4972
|
+
),
|
|
4846
4973
|
/* @__PURE__ */ jsx5(SectionHeading, { id: "agent", children: "Agent" }),
|
|
4847
4974
|
/* @__PURE__ */ jsx5("p", { className: "text-[15px] text-void-text-secondary leading-relaxed mb-6", children: "The Agent API provides programmatic access to the same AI assistant capabilities available in the Talonic platform UI. Use the context endpoint to retrieve a comprehensive workspace snapshot, and the tools endpoint to discover all available agent capabilities." }),
|
|
4848
4975
|
/* @__PURE__ */ jsx5("div", { id: "agent-context", className: "scroll-mt-6", children: /* @__PURE__ */ jsx5(
|
|
@@ -4932,7 +5059,7 @@ function verifyWebhook(payload, signature, secret) {
|
|
|
4932
5059
|
{ status: "403", code: "forbidden", desc: "The API key does not have permission for this operation." },
|
|
4933
5060
|
{ status: "404", code: "not_found", desc: "The requested resource does not exist." },
|
|
4934
5061
|
{ status: "409", code: "conflict", desc: "The resource has been modified. Retry with the latest version." },
|
|
4935
|
-
{ status: "413", code: "file_too_large", desc: "The uploaded file exceeds the
|
|
5062
|
+
{ status: "413", code: "file_too_large", desc: "The uploaded file exceeds the 50 MB per-request limit (up to 5 GB via source connectors)." },
|
|
4936
5063
|
{ status: "422", code: "unprocessable", desc: "The document could not be parsed. Try a different file format." },
|
|
4937
5064
|
{ status: "429", code: "rate_limited", desc: "Rate limit exceeded. Check response headers for reset time." },
|
|
4938
5065
|
{ status: "500", code: "internal_error", desc: "An unexpected error occurred. This is retryable." },
|