@talonic/docs 0.20.33 → 0.21.1

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.
Files changed (4) hide show
  1. package/dist/content.js +6141 -3760
  2. package/dist/seo.js +762 -213
  3. package/openapi.json +762 -213
  4. package/package.json +1 -1
package/dist/seo.js CHANGED
@@ -173,6 +173,14 @@ var openapi_default = {
173
173
  {
174
174
  name: "Webhooks",
175
175
  description: "Outbound HMAC-signed event webhooks \u2014 configure endpoints and read the event catalog, delivery format, signature scheme, and retry policy."
176
+ },
177
+ {
178
+ name: "Events",
179
+ description: "The tenant event feed \u2014 the timeline of everything that happened (extractions, run completions, review verdicts, delivery outcomes). The same rows webhooks fan out from, so missed webhook deliveries can be reconciled against this feed."
180
+ },
181
+ {
182
+ name: "Provenance",
183
+ description: "Document-level provenance \u2014 deterministic (subject, predicate, object) claims synthesized from captured fields and spans, each carrying its evidence quote and grounded flag."
176
184
  }
177
185
  ],
178
186
  paths: {
@@ -369,6 +377,9 @@ var openapi_default = {
369
377
  "401": {
370
378
  $ref: "#/components/responses/Unauthorized"
371
379
  },
380
+ "402": {
381
+ $ref: "#/components/responses/InsufficientCredits"
382
+ },
372
383
  "403": {
373
384
  $ref: "#/components/responses/Forbidden"
374
385
  },
@@ -6125,6 +6136,42 @@ var openapi_default = {
6125
6136
  }
6126
6137
  }
6127
6138
  },
6139
+ "/v1/reference-data/{id}/csv": {
6140
+ get: {
6141
+ operationId: "downloadReferenceDataCsv",
6142
+ summary: "Download a reference dataset as CSV",
6143
+ description: "Returns the full dataset as a CSV file attachment.",
6144
+ tags: [
6145
+ "Reference Data"
6146
+ ],
6147
+ parameters: [
6148
+ {
6149
+ $ref: "#/components/parameters/ResourceId"
6150
+ }
6151
+ ],
6152
+ responses: {
6153
+ "200": {
6154
+ description: "CSV file (returned as an attachment via Content-Disposition).",
6155
+ content: {
6156
+ "text/csv": {
6157
+ schema: {
6158
+ type: "string"
6159
+ }
6160
+ }
6161
+ }
6162
+ },
6163
+ "401": {
6164
+ $ref: "#/components/responses/Unauthorized"
6165
+ },
6166
+ "404": {
6167
+ $ref: "#/components/responses/NotFound"
6168
+ },
6169
+ "429": {
6170
+ $ref: "#/components/responses/RateLimitExceeded"
6171
+ }
6172
+ }
6173
+ }
6174
+ },
6128
6175
  "/v1/usage": {
6129
6176
  get: {
6130
6177
  operationId: "getUsage",
@@ -7114,7 +7161,7 @@ var openapi_default = {
7114
7161
  post: {
7115
7162
  operationId: "nshotOverride",
7116
7163
  summary: "Override an N-Shot value",
7117
- description: "Manually override the N-Shot selected value for a document-field pair.",
7164
+ description: "Override an N-Shot cell for a document-field pair by selecting a specific shot's value.",
7118
7165
  tags: [
7119
7166
  "N-Shot"
7120
7167
  ],
@@ -7140,7 +7187,7 @@ var openapi_default = {
7140
7187
  required: [
7141
7188
  "document_id",
7142
7189
  "field_name",
7143
- "value"
7190
+ "selected_shot"
7144
7191
  ],
7145
7192
  properties: {
7146
7193
  document_id: {
@@ -7152,8 +7199,14 @@ var openapi_default = {
7152
7199
  type: "string",
7153
7200
  example: "invoice_number"
7154
7201
  },
7155
- value: {
7156
- description: "The override value to apply."
7202
+ selected_shot: {
7203
+ type: "integer",
7204
+ description: "Shot number (index) whose value should become the cell value.",
7205
+ example: 2
7206
+ },
7207
+ reason: {
7208
+ type: "string",
7209
+ description: "Optional human-readable reason for the override, stored in the audit trail."
7157
7210
  }
7158
7211
  }
7159
7212
  }
@@ -7162,16 +7215,12 @@ var openapi_default = {
7162
7215
  },
7163
7216
  responses: {
7164
7217
  "200": {
7165
- description: "Override applied.",
7218
+ description: "The full updated comparison object, including the applied `override`.",
7166
7219
  content: {
7167
7220
  "application/json": {
7168
7221
  schema: {
7169
7222
  type: "object",
7170
- properties: {
7171
- success: {
7172
- type: "boolean"
7173
- }
7174
- }
7223
+ additionalProperties: true
7175
7224
  }
7176
7225
  }
7177
7226
  }
@@ -7195,7 +7244,7 @@ var openapi_default = {
7195
7244
  post: {
7196
7245
  operationId: "nshotJudgeDecision",
7197
7246
  summary: "Submit a judge decision for N-Shot",
7198
- description: "Submit an AI or human judge decision on which N-Shot candidate is correct.",
7247
+ description: "Accept or decline the LLM judge's recommendation for an N-Shot cell. Accepting applies the judge's recommended shot as an override.\n",
7199
7248
  tags: [
7200
7249
  "N-Shot"
7201
7250
  ],
@@ -7221,7 +7270,7 @@ var openapi_default = {
7221
7270
  required: [
7222
7271
  "document_id",
7223
7272
  "field_name",
7224
- "decision"
7273
+ "accepted"
7225
7274
  ],
7226
7275
  properties: {
7227
7276
  document_id: {
@@ -7233,9 +7282,9 @@ var openapi_default = {
7233
7282
  type: "string",
7234
7283
  example: "invoice_number"
7235
7284
  },
7236
- decision: {
7237
- type: "string",
7238
- description: "The judge's selected value or verdict."
7285
+ accepted: {
7286
+ type: "boolean",
7287
+ description: "Whether the judge recommendation is accepted (true) or declined (false)."
7239
7288
  }
7240
7289
  }
7241
7290
  }
@@ -7244,16 +7293,12 @@ var openapi_default = {
7244
7293
  },
7245
7294
  responses: {
7246
7295
  "200": {
7247
- description: "Judge decision recorded.",
7296
+ description: "The full updated comparison object, including the recorded `judgement` (and `override` when accepted).",
7248
7297
  content: {
7249
7298
  "application/json": {
7250
7299
  schema: {
7251
7300
  type: "object",
7252
- properties: {
7253
- success: {
7254
- type: "boolean"
7255
- }
7256
- }
7301
+ additionalProperties: true
7257
7302
  }
7258
7303
  }
7259
7304
  }
@@ -9373,17 +9418,102 @@ var openapi_default = {
9373
9418
  }
9374
9419
  }
9375
9420
  },
9421
+ "/v1/billing/packs": {
9422
+ get: {
9423
+ operationId: "getBillingPacks",
9424
+ summary: "List purchasable credit packs",
9425
+ description: "The self-serve credit-purchase catalog: flat prepaid packs\n(1,000 credits = 1 EUR, no volume bonuses). Buy via the checkout URL\nfrom `GET /v1/billing/upgrade-link`.\n",
9426
+ tags: [
9427
+ "Billing"
9428
+ ],
9429
+ responses: {
9430
+ "200": {
9431
+ description: "Credit pack catalog.",
9432
+ content: {
9433
+ "application/json": {
9434
+ schema: {
9435
+ type: "object",
9436
+ required: [
9437
+ "currency",
9438
+ "packs"
9439
+ ],
9440
+ properties: {
9441
+ currency: {
9442
+ type: "string",
9443
+ example: "EUR"
9444
+ },
9445
+ packs: {
9446
+ type: "array",
9447
+ items: {
9448
+ type: "object",
9449
+ required: [
9450
+ "key",
9451
+ "eur",
9452
+ "credits"
9453
+ ],
9454
+ properties: {
9455
+ key: {
9456
+ type: "string",
9457
+ example: "50"
9458
+ },
9459
+ lookupKey: {
9460
+ type: "string",
9461
+ example: "credits_pack_50"
9462
+ },
9463
+ eur: {
9464
+ type: "number",
9465
+ example: 50
9466
+ },
9467
+ credits: {
9468
+ type: "integer",
9469
+ example: 5e4
9470
+ }
9471
+ }
9472
+ }
9473
+ }
9474
+ }
9475
+ }
9476
+ }
9477
+ }
9478
+ },
9479
+ "401": {
9480
+ $ref: "#/components/responses/Unauthorized"
9481
+ },
9482
+ "429": {
9483
+ $ref: "#/components/responses/RateLimitExceeded"
9484
+ }
9485
+ }
9486
+ }
9487
+ },
9376
9488
  "/v1/billing/upgrade-link": {
9377
9489
  get: {
9378
9490
  operationId: "getBillingUpgradeLink",
9379
- summary: "Get an upgrade link",
9380
- description: 'Returns a URL the agent can hand to a human to upgrade the plan or add\npayment. When a hosted billing portal exists this is a portal session\nURL; until then it is a deep link into the dashboard billing settings\n(`provider: "dashboard"`). A human must complete the upgrade.\n',
9491
+ summary: "Get a buy-credits link",
9492
+ description: 'Returns a URL the agent hands to a human to buy prepaid credits. With\nbilling configured this is a real Stripe hosted-Checkout session\n(`provider: "stripe"`) for the selected pack; credits are available\nseconds after the human completes payment. Falls back to a dashboard\nbilling deep link (`provider: "dashboard"`) on deployments without\nStripe. A human must complete the payment either way.\n',
9381
9493
  tags: [
9382
9494
  "Billing"
9383
9495
  ],
9496
+ parameters: [
9497
+ {
9498
+ name: "pack",
9499
+ in: "query",
9500
+ required: false,
9501
+ schema: {
9502
+ type: "string",
9503
+ enum: [
9504
+ "10",
9505
+ "50",
9506
+ "250",
9507
+ "1000"
9508
+ ],
9509
+ default: "50"
9510
+ },
9511
+ description: "Credit pack to check out (see `GET /v1/billing/packs`)."
9512
+ }
9513
+ ],
9384
9514
  responses: {
9385
9515
  "200": {
9386
- description: "Upgrade link.",
9516
+ description: "Buy-credits link.",
9387
9517
  content: {
9388
9518
  "application/json": {
9389
9519
  schema: {
@@ -9397,16 +9527,20 @@ var openapi_default = {
9397
9527
  url: {
9398
9528
  type: "string",
9399
9529
  format: "uri",
9400
- example: "https://app.talonic.com/settings/billing?upgrade=1"
9530
+ example: "https://checkout.stripe.com/c/pay/cs_test_..."
9401
9531
  },
9402
9532
  provider: {
9403
9533
  type: "string",
9404
- description: "'dashboard' (deep link) or 'stripe' (portal session) once a portal exists.",
9405
- example: "dashboard"
9534
+ description: "'stripe' (hosted Checkout session) or 'dashboard' (deep link fallback).",
9535
+ example: "stripe"
9406
9536
  },
9407
9537
  requires_human: {
9408
9538
  type: "boolean"
9409
9539
  },
9540
+ pack: {
9541
+ type: "object",
9542
+ description: "The selected pack (stripe provider only)."
9543
+ },
9410
9544
  message: {
9411
9545
  type: "string"
9412
9546
  }
@@ -9428,34 +9562,57 @@ var openapi_default = {
9428
9562
  get: {
9429
9563
  operationId: "getCreditsBalance",
9430
9564
  summary: "Get credit balance",
9431
- description: "Returns the current credit balance for the authenticated customer.",
9565
+ description: "Returns the enriched credit balance for the authenticated customer:\ncredit balance with EUR conversion, 30-day burn rate, projected runway,\nand API tier info.\n",
9432
9566
  tags: [
9433
9567
  "Credits"
9434
9568
  ],
9435
9569
  responses: {
9436
9570
  "200": {
9437
- description: "Credit balance.",
9571
+ description: "Enriched credit balance.",
9438
9572
  content: {
9439
9573
  "application/json": {
9440
9574
  schema: {
9441
9575
  type: "object",
9442
9576
  required: [
9443
- "balance",
9444
- "currency"
9577
+ "balance_credits",
9578
+ "balance_eur",
9579
+ "burn_rate_30d_credits",
9580
+ "projected_runway_days",
9581
+ "tier",
9582
+ "tier_resets_at"
9445
9583
  ],
9446
9584
  properties: {
9447
- balance: {
9585
+ balance_credits: {
9586
+ type: "integer",
9587
+ description: "Current credit balance.",
9588
+ example: 4200
9589
+ },
9590
+ balance_eur: {
9448
9591
  type: "number",
9449
- format: "float"
9592
+ format: "float",
9593
+ description: "Balance converted to EUR at the published credits-per-EUR rate.",
9594
+ example: 42
9450
9595
  },
9451
- currency: {
9596
+ burn_rate_30d_credits: {
9597
+ type: "integer",
9598
+ description: "Credits consumed over the last 30 days.",
9599
+ example: 1500
9600
+ },
9601
+ projected_runway_days: {
9602
+ type: "integer",
9603
+ description: "Projected days until the balance is exhausted at the 30-day burn rate. -1 when there is no recent consumption.",
9604
+ example: 84
9605
+ },
9606
+ tier: {
9452
9607
  type: "string",
9453
- example: "USD"
9608
+ description: "API tier of the organization.",
9609
+ example: "free"
9454
9610
  },
9455
- updated_at: {
9611
+ tier_resets_at: {
9456
9612
  type: "string",
9457
9613
  format: "date-time",
9458
- example: "2026-04-25T14:30:00.000Z"
9614
+ description: "Start of the next monthly tier period (1st of next month, UTC).",
9615
+ example: "2026-05-01T00:00:00.000Z"
9459
9616
  }
9460
9617
  }
9461
9618
  }
@@ -9475,19 +9632,31 @@ var openapi_default = {
9475
9632
  get: {
9476
9633
  operationId: "getCreditsHistory",
9477
9634
  summary: "Get credit history",
9478
- description: "Returns credit transaction history (purchases, deductions, adjustments).",
9635
+ description: "Returns credit transaction history (purchases, consumption, adjustments, bonuses), most recent first, with page/limit pagination.",
9479
9636
  tags: [
9480
9637
  "Credits"
9481
9638
  ],
9482
9639
  parameters: [
9483
9640
  {
9484
- $ref: "#/components/parameters/Limit"
9485
- },
9486
- {
9487
- $ref: "#/components/parameters/Cursor"
9641
+ name: "page",
9642
+ in: "query",
9643
+ schema: {
9644
+ type: "integer",
9645
+ minimum: 1,
9646
+ default: 1
9647
+ },
9648
+ description: "Page number (1-based)."
9488
9649
  },
9489
9650
  {
9490
- $ref: "#/components/parameters/Order"
9651
+ name: "limit",
9652
+ in: "query",
9653
+ schema: {
9654
+ type: "integer",
9655
+ minimum: 1,
9656
+ maximum: 100,
9657
+ default: 20
9658
+ },
9659
+ description: "Items per page (max 100)."
9491
9660
  }
9492
9661
  ],
9493
9662
  responses: {
@@ -9496,48 +9665,79 @@ var openapi_default = {
9496
9665
  content: {
9497
9666
  "application/json": {
9498
9667
  schema: {
9499
- allOf: [
9500
- {
9501
- $ref: "#/components/schemas/PaginatedResponse"
9502
- },
9503
- {
9504
- type: "object",
9505
- properties: {
9506
- data: {
9507
- type: "array",
9508
- items: {
9668
+ type: "object",
9669
+ required: [
9670
+ "items",
9671
+ "total",
9672
+ "page",
9673
+ "limit"
9674
+ ],
9675
+ properties: {
9676
+ items: {
9677
+ type: "array",
9678
+ items: {
9679
+ type: "object",
9680
+ properties: {
9681
+ id: {
9682
+ type: "string",
9683
+ format: "uuid",
9684
+ example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
9685
+ },
9686
+ customer_id: {
9687
+ type: "string",
9688
+ format: "uuid"
9689
+ },
9690
+ user_id: {
9691
+ type: [
9692
+ "string",
9693
+ "null"
9694
+ ],
9695
+ format: "uuid"
9696
+ },
9697
+ amount: {
9698
+ type: "integer",
9699
+ description: "Credit amount. Positive = credit, negative = debit."
9700
+ },
9701
+ type: {
9702
+ type: "string",
9703
+ description: "Transaction type: purchase, consumption, adjustment, bonus."
9704
+ },
9705
+ description: {
9706
+ type: [
9707
+ "string",
9708
+ "null"
9709
+ ]
9710
+ },
9711
+ operation_type: {
9712
+ type: [
9713
+ "string",
9714
+ "null"
9715
+ ],
9716
+ description: "Pipeline stage that consumed credits, if applicable."
9717
+ },
9718
+ metadata: {
9509
9719
  type: "object",
9510
- properties: {
9511
- id: {
9512
- type: "string",
9513
- format: "uuid",
9514
- example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
9515
- },
9516
- type: {
9517
- type: "string",
9518
- description: "Transaction type: purchase, deduction, adjustment, refund."
9519
- },
9520
- amount: {
9521
- type: "number",
9522
- format: "float"
9523
- },
9524
- description: {
9525
- type: [
9526
- "string",
9527
- "null"
9528
- ]
9529
- },
9530
- created_at: {
9531
- type: "string",
9532
- format: "date-time",
9533
- example: "2026-04-25T14:30:00.000Z"
9534
- }
9535
- }
9720
+ additionalProperties: true
9721
+ },
9722
+ created_at: {
9723
+ type: "string",
9724
+ format: "date-time",
9725
+ example: "2026-04-25T14:30:00.000Z"
9536
9726
  }
9537
9727
  }
9538
9728
  }
9729
+ },
9730
+ total: {
9731
+ type: "integer",
9732
+ description: "Total number of transactions."
9733
+ },
9734
+ page: {
9735
+ type: "integer"
9736
+ },
9737
+ limit: {
9738
+ type: "integer"
9539
9739
  }
9540
- ]
9740
+ }
9541
9741
  }
9542
9742
  }
9543
9743
  }
@@ -9554,60 +9754,73 @@ var openapi_default = {
9554
9754
  "/v1/credits/usage": {
9555
9755
  get: {
9556
9756
  operationId: "getCreditsUsage",
9557
- summary: "Get credit usage summary",
9558
- description: "Returns aggregate credit usage broken down by feature.",
9757
+ summary: "Get usage statistics",
9758
+ description: "Returns aggregated API usage stats grouped by operation type and model over the given period.",
9559
9759
  tags: [
9560
9760
  "Credits"
9561
9761
  ],
9562
9762
  parameters: [
9563
9763
  {
9564
- name: "from",
9565
- in: "query",
9566
- schema: {
9567
- type: "string",
9568
- format: "date-time"
9569
- },
9570
- description: "Start of the period (ISO 8601)."
9571
- },
9572
- {
9573
- name: "to",
9764
+ name: "days",
9574
9765
  in: "query",
9575
9766
  schema: {
9576
- type: "string",
9577
- format: "date-time"
9767
+ type: "integer",
9768
+ default: 30
9578
9769
  },
9579
- description: "End of the period (ISO 8601)."
9770
+ description: "Reporting window in days."
9580
9771
  }
9581
9772
  ],
9582
9773
  responses: {
9583
9774
  "200": {
9584
- description: "Credit usage summary.",
9775
+ description: "Aggregated usage stats.",
9585
9776
  content: {
9586
9777
  "application/json": {
9587
9778
  schema: {
9588
9779
  type: "object",
9780
+ required: [
9781
+ "stats",
9782
+ "period_days"
9783
+ ],
9589
9784
  properties: {
9590
- total_used: {
9591
- type: "number",
9592
- format: "float"
9593
- },
9594
- breakdown: {
9785
+ stats: {
9595
9786
  type: "array",
9596
9787
  items: {
9597
9788
  type: "object",
9598
9789
  properties: {
9599
- feature: {
9790
+ operation_type: {
9600
9791
  type: "string"
9601
9792
  },
9602
- credits_used: {
9603
- type: "number",
9604
- format: "float"
9793
+ model: {
9794
+ type: "string"
9605
9795
  },
9606
9796
  call_count: {
9607
9797
  type: "integer"
9798
+ },
9799
+ total_input_tokens: {
9800
+ type: "string",
9801
+ description: "Summed input tokens (serialized as a string)."
9802
+ },
9803
+ total_output_tokens: {
9804
+ type: "string",
9805
+ description: "Summed output tokens (serialized as a string)."
9806
+ },
9807
+ total_cache_read_tokens: {
9808
+ type: "string",
9809
+ description: "Summed cache-read tokens (serialized as a string)."
9810
+ },
9811
+ total_cost_usd: {
9812
+ type: [
9813
+ "string",
9814
+ "null"
9815
+ ],
9816
+ description: "Estimated total cost in USD (serialized as a string)."
9608
9817
  }
9609
9818
  }
9610
9819
  }
9820
+ },
9821
+ period_days: {
9822
+ type: "integer",
9823
+ example: 30
9611
9824
  }
9612
9825
  }
9613
9826
  }
@@ -9626,56 +9839,53 @@ var openapi_default = {
9626
9839
  "/v1/credits/usage/daily": {
9627
9840
  get: {
9628
9841
  operationId: "getCreditsUsageDaily",
9629
- summary: "Get daily credit usage",
9630
- description: "Returns per-day credit usage for the specified period (default last 30 days).",
9842
+ summary: "Get daily usage breakdown",
9843
+ description: "Returns per-day API usage for the specified period (default last 30 days) as a JSON array.",
9631
9844
  tags: [
9632
9845
  "Credits"
9633
9846
  ],
9634
9847
  parameters: [
9635
9848
  {
9636
- name: "from",
9637
- in: "query",
9638
- schema: {
9639
- type: "string",
9640
- format: "date-time"
9641
- },
9642
- description: "Start of the period (ISO 8601)."
9643
- },
9644
- {
9645
- name: "to",
9849
+ name: "days",
9646
9850
  in: "query",
9647
9851
  schema: {
9648
- type: "string",
9649
- format: "date-time"
9852
+ type: "integer",
9853
+ default: 30
9650
9854
  },
9651
- description: "End of the period (ISO 8601)."
9855
+ description: "Reporting window in days."
9652
9856
  }
9653
9857
  ],
9654
9858
  responses: {
9655
9859
  "200": {
9656
- description: "Daily credit usage.",
9860
+ description: "Daily usage breakdown.",
9657
9861
  content: {
9658
9862
  "application/json": {
9659
9863
  schema: {
9660
- type: "object",
9661
- properties: {
9662
- data: {
9663
- type: "array",
9664
- items: {
9665
- type: "object",
9666
- properties: {
9667
- date: {
9668
- type: "string",
9669
- format: "date"
9670
- },
9671
- credits_used: {
9672
- type: "number",
9673
- format: "float"
9674
- },
9675
- call_count: {
9676
- type: "integer"
9677
- }
9678
- }
9864
+ type: "array",
9865
+ items: {
9866
+ type: "object",
9867
+ properties: {
9868
+ date: {
9869
+ type: "string",
9870
+ format: "date"
9871
+ },
9872
+ calls: {
9873
+ type: "integer"
9874
+ },
9875
+ input_tokens: {
9876
+ type: "string",
9877
+ description: "Summed input tokens for the day (serialized as a string)."
9878
+ },
9879
+ output_tokens: {
9880
+ type: "string",
9881
+ description: "Summed output tokens for the day (serialized as a string)."
9882
+ },
9883
+ cost_usd: {
9884
+ type: [
9885
+ "string",
9886
+ "null"
9887
+ ],
9888
+ description: "Estimated cost in USD for the day (serialized as a string)."
9679
9889
  }
9680
9890
  }
9681
9891
  }
@@ -9696,19 +9906,31 @@ var openapi_default = {
9696
9906
  get: {
9697
9907
  operationId: "getCreditsUsageLog",
9698
9908
  summary: "Get credit usage log",
9699
- description: "Returns a detailed per-request usage log with model, tokens, and cost.",
9909
+ description: "Returns a detailed per-request usage log with model, tokens, and cost, most recent first, with page/limit pagination.",
9700
9910
  tags: [
9701
9911
  "Credits"
9702
9912
  ],
9703
9913
  parameters: [
9704
9914
  {
9705
- $ref: "#/components/parameters/Limit"
9706
- },
9707
- {
9708
- $ref: "#/components/parameters/Cursor"
9915
+ name: "page",
9916
+ in: "query",
9917
+ schema: {
9918
+ type: "integer",
9919
+ minimum: 1,
9920
+ default: 1
9921
+ },
9922
+ description: "Page number (1-based)."
9709
9923
  },
9710
9924
  {
9711
- $ref: "#/components/parameters/Order"
9925
+ name: "limit",
9926
+ in: "query",
9927
+ schema: {
9928
+ type: "integer",
9929
+ minimum: 1,
9930
+ maximum: 100,
9931
+ default: 20
9932
+ },
9933
+ description: "Items per page (max 100)."
9712
9934
  }
9713
9935
  ],
9714
9936
  responses: {
@@ -9717,48 +9939,75 @@ var openapi_default = {
9717
9939
  content: {
9718
9940
  "application/json": {
9719
9941
  schema: {
9720
- allOf: [
9721
- {
9722
- $ref: "#/components/schemas/PaginatedResponse"
9723
- },
9724
- {
9725
- type: "object",
9726
- properties: {
9727
- data: {
9728
- type: "array",
9729
- items: {
9730
- type: "object",
9731
- properties: {
9732
- id: {
9733
- type: "string"
9734
- },
9735
- operation_type: {
9736
- type: "string"
9737
- },
9738
- model: {
9739
- type: "string"
9740
- },
9741
- input_tokens: {
9742
- type: "integer"
9743
- },
9744
- output_tokens: {
9745
- type: "integer"
9746
- },
9747
- cost_credits: {
9748
- type: "number",
9749
- format: "float"
9750
- },
9751
- created_at: {
9752
- type: "string",
9753
- format: "date-time",
9754
- example: "2026-04-25T14:30:00.000Z"
9755
- }
9756
- }
9942
+ type: "object",
9943
+ required: [
9944
+ "items",
9945
+ "total",
9946
+ "page",
9947
+ "limit"
9948
+ ],
9949
+ properties: {
9950
+ items: {
9951
+ type: "array",
9952
+ items: {
9953
+ type: "object",
9954
+ properties: {
9955
+ id: {
9956
+ type: "string",
9957
+ format: "uuid"
9958
+ },
9959
+ customer_id: {
9960
+ type: "string",
9961
+ format: "uuid"
9962
+ },
9963
+ model: {
9964
+ type: "string"
9965
+ },
9966
+ input_tokens: {
9967
+ type: "integer"
9968
+ },
9969
+ output_tokens: {
9970
+ type: "integer"
9971
+ },
9972
+ cache_read_tokens: {
9973
+ type: "integer"
9974
+ },
9975
+ cost_estimate_usd: {
9976
+ type: [
9977
+ "string",
9978
+ "null"
9979
+ ],
9980
+ description: "Estimated cost in USD (serialized as a string)."
9981
+ },
9982
+ operation_type: {
9983
+ type: "string"
9984
+ },
9985
+ document_id: {
9986
+ type: [
9987
+ "string",
9988
+ "null"
9989
+ ],
9990
+ format: "uuid"
9991
+ },
9992
+ created_at: {
9993
+ type: "string",
9994
+ format: "date-time",
9995
+ example: "2026-04-25T14:30:00.000Z"
9757
9996
  }
9758
9997
  }
9759
9998
  }
9999
+ },
10000
+ total: {
10001
+ type: "integer",
10002
+ description: "Total number of log entries."
10003
+ },
10004
+ page: {
10005
+ type: "integer"
10006
+ },
10007
+ limit: {
10008
+ type: "integer"
9760
10009
  }
9761
- ]
10010
+ }
9762
10011
  }
9763
10012
  }
9764
10013
  }
@@ -11465,7 +11714,7 @@ var openapi_default = {
11465
11714
  get: {
11466
11715
  operationId: "getReviewStats",
11467
11716
  summary: "Get review queue statistics",
11468
- description: "Returns aggregate statistics about the review queue (pending, approved, rejected counts).",
11717
+ description: "Returns aggregate review queue counts grouped by status.",
11469
11718
  tags: [
11470
11719
  "Review"
11471
11720
  ],
@@ -11476,18 +11725,27 @@ var openapi_default = {
11476
11725
  "application/json": {
11477
11726
  schema: {
11478
11727
  type: "object",
11728
+ required: [
11729
+ "total",
11730
+ "by_status"
11731
+ ],
11479
11732
  properties: {
11480
- pending: {
11481
- type: "integer"
11482
- },
11483
- approved: {
11484
- type: "integer"
11485
- },
11486
- rejected: {
11487
- type: "integer"
11488
- },
11489
11733
  total: {
11490
- type: "integer"
11734
+ type: "integer",
11735
+ description: "Total number of review records.",
11736
+ example: 42
11737
+ },
11738
+ by_status: {
11739
+ type: "object",
11740
+ description: "Count of review records per status (e.g. pending, approved, rejected).",
11741
+ additionalProperties: {
11742
+ type: "integer"
11743
+ },
11744
+ example: {
11745
+ pending: 12,
11746
+ approved: 25,
11747
+ rejected: 5
11748
+ }
11491
11749
  }
11492
11750
  }
11493
11751
  }
@@ -12809,12 +13067,12 @@ var openapi_default = {
12809
13067
  description: "Filter by value layer"
12810
13068
  },
12811
13069
  {
12812
- name: "source_type",
13070
+ name: "kind",
12813
13071
  in: "query",
12814
13072
  schema: {
12815
13073
  type: "string"
12816
13074
  },
12817
- description: "Filter by source type (e.g. extraction, job, resolution)"
13075
+ description: "Filter by source kind (e.g. structuring_run, resolution_run, data_product)"
12818
13076
  },
12819
13077
  {
12820
13078
  $ref: "#/components/parameters/Limit"
@@ -12931,14 +13189,34 @@ var openapi_default = {
12931
13189
  field_key: {
12932
13190
  type: "string"
12933
13191
  },
12934
- field_type: {
13192
+ display_name: {
12935
13193
  type: "string"
12936
13194
  },
12937
- ordinal: {
13195
+ data_type: {
13196
+ type: "string"
13197
+ },
13198
+ position: {
12938
13199
  type: "integer"
13200
+ },
13201
+ is_required: {
13202
+ type: "boolean"
13203
+ },
13204
+ is_hidden: {
13205
+ type: "boolean"
12939
13206
  }
12940
13207
  }
12941
13208
  }
13209
+ },
13210
+ links: {
13211
+ type: "object",
13212
+ properties: {
13213
+ self: {
13214
+ type: "string"
13215
+ },
13216
+ record_set: {
13217
+ type: "string"
13218
+ }
13219
+ }
12942
13220
  }
12943
13221
  }
12944
13222
  }
@@ -12976,6 +13254,7 @@ var openapi_default = {
12976
13254
  in: "query",
12977
13255
  schema: {
12978
13256
  type: "integer",
13257
+ minimum: 1,
12979
13258
  default: 1
12980
13259
  }
12981
13260
  },
@@ -12984,9 +13263,21 @@ var openapi_default = {
12984
13263
  in: "query",
12985
13264
  schema: {
12986
13265
  type: "integer",
12987
- default: 50,
12988
- maximum: 200
13266
+ minimum: 1,
13267
+ maximum: 100,
13268
+ default: 20
12989
13269
  }
13270
+ },
13271
+ {
13272
+ name: "include",
13273
+ in: "query",
13274
+ schema: {
13275
+ type: "string",
13276
+ enum: [
13277
+ "values"
13278
+ ]
13279
+ },
13280
+ description: "Pass `include=values` to attach each record's latest-version cell values keyed by field key. A cell held for review (`pending_approval`) reports its status with a null value.\n"
12990
13281
  }
12991
13282
  ],
12992
13283
  responses: {
@@ -13001,7 +13292,58 @@ var openapi_default = {
13001
13292
  type: "array",
13002
13293
  items: {
13003
13294
  type: "object",
13004
- description: "Record with source_record_id and ordinal"
13295
+ properties: {
13296
+ id: {
13297
+ type: "string",
13298
+ format: "uuid"
13299
+ },
13300
+ document_id: {
13301
+ type: [
13302
+ "string",
13303
+ "null"
13304
+ ],
13305
+ format: "uuid"
13306
+ },
13307
+ ordinal: {
13308
+ type: "integer"
13309
+ },
13310
+ record_key: {
13311
+ type: [
13312
+ "string",
13313
+ "null"
13314
+ ]
13315
+ },
13316
+ status: {
13317
+ type: "string"
13318
+ },
13319
+ confidence: {
13320
+ type: [
13321
+ "number",
13322
+ "null"
13323
+ ]
13324
+ },
13325
+ values: {
13326
+ type: "object",
13327
+ description: "Only present with `include=values`. Map of field key to the record's latest cell value.\n",
13328
+ additionalProperties: {
13329
+ type: "object",
13330
+ properties: {
13331
+ value: {
13332
+ description: "Cell value. Null when the cell is held for review."
13333
+ },
13334
+ status: {
13335
+ type: "string"
13336
+ },
13337
+ confidence: {
13338
+ type: [
13339
+ "number",
13340
+ "null"
13341
+ ]
13342
+ }
13343
+ }
13344
+ }
13345
+ }
13346
+ }
13005
13347
  }
13006
13348
  },
13007
13349
  pagination: {
@@ -13020,6 +13362,17 @@ var openapi_default = {
13020
13362
  type: "boolean"
13021
13363
  }
13022
13364
  }
13365
+ },
13366
+ links: {
13367
+ type: "object",
13368
+ properties: {
13369
+ self: {
13370
+ type: "string"
13371
+ },
13372
+ record_set: {
13373
+ type: "string"
13374
+ }
13375
+ }
13023
13376
  }
13024
13377
  }
13025
13378
  }
@@ -13061,14 +13414,52 @@ var openapi_default = {
13061
13414
  schema: {
13062
13415
  type: "object",
13063
13416
  properties: {
13064
- data: {
13065
- type: "array",
13066
- items: {
13067
- type: "object"
13068
- }
13417
+ record_set_id: {
13418
+ type: "string",
13419
+ format: "uuid"
13420
+ },
13421
+ name: {
13422
+ type: "string"
13069
13423
  },
13070
13424
  total: {
13071
13425
  type: "integer"
13426
+ },
13427
+ records: {
13428
+ type: "array",
13429
+ items: {
13430
+ type: "object",
13431
+ properties: {
13432
+ id: {
13433
+ type: "string",
13434
+ format: "uuid"
13435
+ },
13436
+ document_id: {
13437
+ type: [
13438
+ "string",
13439
+ "null"
13440
+ ],
13441
+ format: "uuid"
13442
+ },
13443
+ ordinal: {
13444
+ type: "integer"
13445
+ },
13446
+ record_key: {
13447
+ type: [
13448
+ "string",
13449
+ "null"
13450
+ ]
13451
+ },
13452
+ status: {
13453
+ type: "string"
13454
+ },
13455
+ confidence: {
13456
+ type: [
13457
+ "number",
13458
+ "null"
13459
+ ]
13460
+ }
13461
+ }
13462
+ }
13072
13463
  }
13073
13464
  }
13074
13465
  }
@@ -17071,6 +17462,99 @@ var openapi_default = {
17071
17462
  }
17072
17463
  }
17073
17464
  },
17465
+ "/v1/events": {
17466
+ get: {
17467
+ tags: [
17468
+ "Events"
17469
+ ],
17470
+ summary: "List tenant events",
17471
+ description: "Newest-first feed of platform events (document.extracted, run.*.completed/failed, result.flagged/approved/rejected, delivery.item.*, case.resolved). Alias of /v1/delivery/events at the API root.\n",
17472
+ operationId: "listEvents",
17473
+ security: [
17474
+ {
17475
+ BearerAuth: []
17476
+ }
17477
+ ],
17478
+ parameters: [
17479
+ {
17480
+ name: "event_type",
17481
+ in: "query",
17482
+ required: false,
17483
+ schema: {
17484
+ type: "string"
17485
+ },
17486
+ description: "Filter by event type, e.g. document.extracted"
17487
+ },
17488
+ {
17489
+ name: "limit",
17490
+ in: "query",
17491
+ required: false,
17492
+ schema: {
17493
+ type: "integer",
17494
+ default: 50,
17495
+ maximum: 200
17496
+ }
17497
+ },
17498
+ {
17499
+ name: "offset",
17500
+ in: "query",
17501
+ required: false,
17502
+ schema: {
17503
+ type: "integer",
17504
+ default: 0
17505
+ }
17506
+ }
17507
+ ],
17508
+ responses: {
17509
+ "200": {
17510
+ description: "{ data: [{ id, event_type, payload, created_at }], total, limit, offset }"
17511
+ }
17512
+ }
17513
+ }
17514
+ },
17515
+ "/v1/documents/{id}/claims": {
17516
+ get: {
17517
+ tags: [
17518
+ "Provenance"
17519
+ ],
17520
+ summary: "List a document's provenance claims",
17521
+ description: "Deterministic atomic (subject, predicate, object) claims synthesized from the document's captured fields + provenance spans (no LLM). Each claim carries its evidence quote, grounded flag, and confidence. Field-level span detail lives on GET /v1/field-reviews/{docId}/{fieldKey}.\n",
17522
+ operationId: "listDocumentClaims",
17523
+ security: [
17524
+ {
17525
+ BearerAuth: []
17526
+ }
17527
+ ],
17528
+ parameters: [
17529
+ {
17530
+ name: "id",
17531
+ in: "path",
17532
+ required: true,
17533
+ schema: {
17534
+ type: "string",
17535
+ format: "uuid"
17536
+ }
17537
+ },
17538
+ {
17539
+ name: "grounded",
17540
+ in: "query",
17541
+ required: false,
17542
+ schema: {
17543
+ type: "boolean"
17544
+ },
17545
+ description: "true = only span-backed claims"
17546
+ }
17547
+ ],
17548
+ responses: {
17549
+ "200": {
17550
+ description: "{ data: [{ subject, predicate, object, qualifier, evidence, segment_id, grounded, confidence, origin }], total }"
17551
+ },
17552
+ "404": {
17553
+ description: "Document not found or not owned by the caller."
17554
+ }
17555
+ }
17556
+ }
17557
+ },
17074
17558
  "/v1/webhooks/events": {
17075
17559
  get: {
17076
17560
  tags: [
@@ -18237,7 +18721,7 @@ var openapi_default = {
18237
18721
  statusCode: 429,
18238
18722
  code: "QUOTA_EXCEEDED",
18239
18723
  error: "Too Many Requests",
18240
- message: "Daily extract request limit (50) reached. Resets at midnight UTC.",
18724
+ message: "Daily extract request ceiling reached. Resets at midnight UTC. Spend is governed by credits, not this abuse ceiling.",
18241
18725
  retryable: true,
18242
18726
  timestamp: "2026-04-25T23:45:00.000Z",
18243
18727
  path: "/v1/extract"
@@ -18245,6 +18729,48 @@ var openapi_default = {
18245
18729
  }
18246
18730
  }
18247
18731
  },
18732
+ InsufficientCredits: {
18733
+ description: "Insufficient credits (402). The body is the agent-actionable contract:\n`buy_credits_url` is where a human completes a purchase (see also\n`GET /v1/billing/upgrade-link` for a direct Stripe Checkout link), and\n`pricing_url` is the machine-readable rate catalog. Free workspaces\nreceive 5,000 credits monthly; purchased credits top up the same\nbalance.\n",
18734
+ content: {
18735
+ "application/json": {
18736
+ schema: {
18737
+ type: "object",
18738
+ required: [
18739
+ "error",
18740
+ "message",
18741
+ "required_credits",
18742
+ "balance_credits"
18743
+ ],
18744
+ properties: {
18745
+ error: {
18746
+ type: "string",
18747
+ example: "insufficient_credits"
18748
+ },
18749
+ message: {
18750
+ type: "string"
18751
+ },
18752
+ required_credits: {
18753
+ type: "integer",
18754
+ example: 100
18755
+ },
18756
+ balance_credits: {
18757
+ type: "integer",
18758
+ example: 0
18759
+ },
18760
+ buy_credits_url: {
18761
+ type: "string",
18762
+ format: "uri",
18763
+ example: "https://app.talonic.com/settings/billing?buy=1"
18764
+ },
18765
+ pricing_url: {
18766
+ type: "string",
18767
+ example: "/v1/pricing"
18768
+ }
18769
+ }
18770
+ }
18771
+ }
18772
+ }
18773
+ },
18248
18774
  InternalServerError: {
18249
18775
  description: "An unexpected error occurred.",
18250
18776
  content: {
@@ -24255,15 +24781,21 @@ var openapi_default = {
24255
24781
  "product"
24256
24782
  ]
24257
24783
  },
24258
- source_type: {
24259
- type: "string"
24784
+ kind: {
24785
+ type: "string",
24786
+ description: "Source kind (e.g. structuring_run, resolution_run, data_product)."
24260
24787
  },
24261
24788
  source_id: {
24262
- type: "string",
24263
- format: "uuid"
24789
+ type: [
24790
+ "string",
24791
+ "null"
24792
+ ],
24793
+ format: "uuid",
24794
+ description: "Owning run/product ID where applicable."
24264
24795
  },
24265
24796
  status: {
24266
- type: "string"
24797
+ type: "string",
24798
+ description: "Lifecycle state (e.g. active)."
24267
24799
  },
24268
24800
  record_count: {
24269
24801
  type: "integer"
@@ -24274,6 +24806,23 @@ var openapi_default = {
24274
24806
  created_at: {
24275
24807
  type: "string",
24276
24808
  format: "date-time"
24809
+ },
24810
+ links: {
24811
+ type: "object",
24812
+ properties: {
24813
+ self: {
24814
+ type: "string"
24815
+ },
24816
+ fields: {
24817
+ type: "string"
24818
+ },
24819
+ records: {
24820
+ type: "string"
24821
+ },
24822
+ export: {
24823
+ type: "string"
24824
+ }
24825
+ }
24277
24826
  }
24278
24827
  }
24279
24828
  }