@talonic/docs 0.20.33 → 0.21.0

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 +520 -206
  3. package/openapi.json +520 -206
  4. package/package.json +1 -1
package/openapi.json CHANGED
@@ -6105,6 +6105,42 @@
6105
6105
  }
6106
6106
  }
6107
6107
  },
6108
+ "/v1/reference-data/{id}/csv": {
6109
+ "get": {
6110
+ "operationId": "downloadReferenceDataCsv",
6111
+ "summary": "Download a reference dataset as CSV",
6112
+ "description": "Returns the full dataset as a CSV file attachment.",
6113
+ "tags": [
6114
+ "Reference Data"
6115
+ ],
6116
+ "parameters": [
6117
+ {
6118
+ "$ref": "#/components/parameters/ResourceId"
6119
+ }
6120
+ ],
6121
+ "responses": {
6122
+ "200": {
6123
+ "description": "CSV file (returned as an attachment via Content-Disposition).",
6124
+ "content": {
6125
+ "text/csv": {
6126
+ "schema": {
6127
+ "type": "string"
6128
+ }
6129
+ }
6130
+ }
6131
+ },
6132
+ "401": {
6133
+ "$ref": "#/components/responses/Unauthorized"
6134
+ },
6135
+ "404": {
6136
+ "$ref": "#/components/responses/NotFound"
6137
+ },
6138
+ "429": {
6139
+ "$ref": "#/components/responses/RateLimitExceeded"
6140
+ }
6141
+ }
6142
+ }
6143
+ },
6108
6144
  "/v1/usage": {
6109
6145
  "get": {
6110
6146
  "operationId": "getUsage",
@@ -7094,7 +7130,7 @@
7094
7130
  "post": {
7095
7131
  "operationId": "nshotOverride",
7096
7132
  "summary": "Override an N-Shot value",
7097
- "description": "Manually override the N-Shot selected value for a document-field pair.",
7133
+ "description": "Override an N-Shot cell for a document-field pair by selecting a specific shot's value.",
7098
7134
  "tags": [
7099
7135
  "N-Shot"
7100
7136
  ],
@@ -7120,7 +7156,7 @@
7120
7156
  "required": [
7121
7157
  "document_id",
7122
7158
  "field_name",
7123
- "value"
7159
+ "selected_shot"
7124
7160
  ],
7125
7161
  "properties": {
7126
7162
  "document_id": {
@@ -7132,8 +7168,14 @@
7132
7168
  "type": "string",
7133
7169
  "example": "invoice_number"
7134
7170
  },
7135
- "value": {
7136
- "description": "The override value to apply."
7171
+ "selected_shot": {
7172
+ "type": "integer",
7173
+ "description": "Shot number (index) whose value should become the cell value.",
7174
+ "example": 2
7175
+ },
7176
+ "reason": {
7177
+ "type": "string",
7178
+ "description": "Optional human-readable reason for the override, stored in the audit trail."
7137
7179
  }
7138
7180
  }
7139
7181
  }
@@ -7142,16 +7184,12 @@
7142
7184
  },
7143
7185
  "responses": {
7144
7186
  "200": {
7145
- "description": "Override applied.",
7187
+ "description": "The full updated comparison object, including the applied `override`.",
7146
7188
  "content": {
7147
7189
  "application/json": {
7148
7190
  "schema": {
7149
7191
  "type": "object",
7150
- "properties": {
7151
- "success": {
7152
- "type": "boolean"
7153
- }
7154
- }
7192
+ "additionalProperties": true
7155
7193
  }
7156
7194
  }
7157
7195
  }
@@ -7175,7 +7213,7 @@
7175
7213
  "post": {
7176
7214
  "operationId": "nshotJudgeDecision",
7177
7215
  "summary": "Submit a judge decision for N-Shot",
7178
- "description": "Submit an AI or human judge decision on which N-Shot candidate is correct.",
7216
+ "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",
7179
7217
  "tags": [
7180
7218
  "N-Shot"
7181
7219
  ],
@@ -7201,7 +7239,7 @@
7201
7239
  "required": [
7202
7240
  "document_id",
7203
7241
  "field_name",
7204
- "decision"
7242
+ "accepted"
7205
7243
  ],
7206
7244
  "properties": {
7207
7245
  "document_id": {
@@ -7213,9 +7251,9 @@
7213
7251
  "type": "string",
7214
7252
  "example": "invoice_number"
7215
7253
  },
7216
- "decision": {
7217
- "type": "string",
7218
- "description": "The judge's selected value or verdict."
7254
+ "accepted": {
7255
+ "type": "boolean",
7256
+ "description": "Whether the judge recommendation is accepted (true) or declined (false)."
7219
7257
  }
7220
7258
  }
7221
7259
  }
@@ -7224,16 +7262,12 @@
7224
7262
  },
7225
7263
  "responses": {
7226
7264
  "200": {
7227
- "description": "Judge decision recorded.",
7265
+ "description": "The full updated comparison object, including the recorded `judgement` (and `override` when accepted).",
7228
7266
  "content": {
7229
7267
  "application/json": {
7230
7268
  "schema": {
7231
7269
  "type": "object",
7232
- "properties": {
7233
- "success": {
7234
- "type": "boolean"
7235
- }
7236
- }
7270
+ "additionalProperties": true
7237
7271
  }
7238
7272
  }
7239
7273
  }
@@ -9408,34 +9442,57 @@
9408
9442
  "get": {
9409
9443
  "operationId": "getCreditsBalance",
9410
9444
  "summary": "Get credit balance",
9411
- "description": "Returns the current credit balance for the authenticated customer.",
9445
+ "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",
9412
9446
  "tags": [
9413
9447
  "Credits"
9414
9448
  ],
9415
9449
  "responses": {
9416
9450
  "200": {
9417
- "description": "Credit balance.",
9451
+ "description": "Enriched credit balance.",
9418
9452
  "content": {
9419
9453
  "application/json": {
9420
9454
  "schema": {
9421
9455
  "type": "object",
9422
9456
  "required": [
9423
- "balance",
9424
- "currency"
9457
+ "balance_credits",
9458
+ "balance_eur",
9459
+ "burn_rate_30d_credits",
9460
+ "projected_runway_days",
9461
+ "tier",
9462
+ "tier_resets_at"
9425
9463
  ],
9426
9464
  "properties": {
9427
- "balance": {
9465
+ "balance_credits": {
9466
+ "type": "integer",
9467
+ "description": "Current credit balance.",
9468
+ "example": 4200
9469
+ },
9470
+ "balance_eur": {
9428
9471
  "type": "number",
9429
- "format": "float"
9472
+ "format": "float",
9473
+ "description": "Balance converted to EUR at the published credits-per-EUR rate.",
9474
+ "example": 42
9430
9475
  },
9431
- "currency": {
9476
+ "burn_rate_30d_credits": {
9477
+ "type": "integer",
9478
+ "description": "Credits consumed over the last 30 days.",
9479
+ "example": 1500
9480
+ },
9481
+ "projected_runway_days": {
9482
+ "type": "integer",
9483
+ "description": "Projected days until the balance is exhausted at the 30-day burn rate. -1 when there is no recent consumption.",
9484
+ "example": 84
9485
+ },
9486
+ "tier": {
9432
9487
  "type": "string",
9433
- "example": "USD"
9488
+ "description": "API tier of the organization.",
9489
+ "example": "free"
9434
9490
  },
9435
- "updated_at": {
9491
+ "tier_resets_at": {
9436
9492
  "type": "string",
9437
9493
  "format": "date-time",
9438
- "example": "2026-04-25T14:30:00.000Z"
9494
+ "description": "Start of the next monthly tier period (1st of next month, UTC).",
9495
+ "example": "2026-05-01T00:00:00.000Z"
9439
9496
  }
9440
9497
  }
9441
9498
  }
@@ -9455,19 +9512,31 @@
9455
9512
  "get": {
9456
9513
  "operationId": "getCreditsHistory",
9457
9514
  "summary": "Get credit history",
9458
- "description": "Returns credit transaction history (purchases, deductions, adjustments).",
9515
+ "description": "Returns credit transaction history (purchases, consumption, adjustments, bonuses), most recent first, with page/limit pagination.",
9459
9516
  "tags": [
9460
9517
  "Credits"
9461
9518
  ],
9462
9519
  "parameters": [
9463
9520
  {
9464
- "$ref": "#/components/parameters/Limit"
9465
- },
9466
- {
9467
- "$ref": "#/components/parameters/Cursor"
9521
+ "name": "page",
9522
+ "in": "query",
9523
+ "schema": {
9524
+ "type": "integer",
9525
+ "minimum": 1,
9526
+ "default": 1
9527
+ },
9528
+ "description": "Page number (1-based)."
9468
9529
  },
9469
9530
  {
9470
- "$ref": "#/components/parameters/Order"
9531
+ "name": "limit",
9532
+ "in": "query",
9533
+ "schema": {
9534
+ "type": "integer",
9535
+ "minimum": 1,
9536
+ "maximum": 100,
9537
+ "default": 20
9538
+ },
9539
+ "description": "Items per page (max 100)."
9471
9540
  }
9472
9541
  ],
9473
9542
  "responses": {
@@ -9476,48 +9545,79 @@
9476
9545
  "content": {
9477
9546
  "application/json": {
9478
9547
  "schema": {
9479
- "allOf": [
9480
- {
9481
- "$ref": "#/components/schemas/PaginatedResponse"
9482
- },
9483
- {
9484
- "type": "object",
9485
- "properties": {
9486
- "data": {
9487
- "type": "array",
9488
- "items": {
9548
+ "type": "object",
9549
+ "required": [
9550
+ "items",
9551
+ "total",
9552
+ "page",
9553
+ "limit"
9554
+ ],
9555
+ "properties": {
9556
+ "items": {
9557
+ "type": "array",
9558
+ "items": {
9559
+ "type": "object",
9560
+ "properties": {
9561
+ "id": {
9562
+ "type": "string",
9563
+ "format": "uuid",
9564
+ "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
9565
+ },
9566
+ "customer_id": {
9567
+ "type": "string",
9568
+ "format": "uuid"
9569
+ },
9570
+ "user_id": {
9571
+ "type": [
9572
+ "string",
9573
+ "null"
9574
+ ],
9575
+ "format": "uuid"
9576
+ },
9577
+ "amount": {
9578
+ "type": "integer",
9579
+ "description": "Credit amount. Positive = credit, negative = debit."
9580
+ },
9581
+ "type": {
9582
+ "type": "string",
9583
+ "description": "Transaction type: purchase, consumption, adjustment, bonus."
9584
+ },
9585
+ "description": {
9586
+ "type": [
9587
+ "string",
9588
+ "null"
9589
+ ]
9590
+ },
9591
+ "operation_type": {
9592
+ "type": [
9593
+ "string",
9594
+ "null"
9595
+ ],
9596
+ "description": "Pipeline stage that consumed credits, if applicable."
9597
+ },
9598
+ "metadata": {
9489
9599
  "type": "object",
9490
- "properties": {
9491
- "id": {
9492
- "type": "string",
9493
- "format": "uuid",
9494
- "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
9495
- },
9496
- "type": {
9497
- "type": "string",
9498
- "description": "Transaction type: purchase, deduction, adjustment, refund."
9499
- },
9500
- "amount": {
9501
- "type": "number",
9502
- "format": "float"
9503
- },
9504
- "description": {
9505
- "type": [
9506
- "string",
9507
- "null"
9508
- ]
9509
- },
9510
- "created_at": {
9511
- "type": "string",
9512
- "format": "date-time",
9513
- "example": "2026-04-25T14:30:00.000Z"
9514
- }
9515
- }
9600
+ "additionalProperties": true
9601
+ },
9602
+ "created_at": {
9603
+ "type": "string",
9604
+ "format": "date-time",
9605
+ "example": "2026-04-25T14:30:00.000Z"
9516
9606
  }
9517
9607
  }
9518
9608
  }
9609
+ },
9610
+ "total": {
9611
+ "type": "integer",
9612
+ "description": "Total number of transactions."
9613
+ },
9614
+ "page": {
9615
+ "type": "integer"
9616
+ },
9617
+ "limit": {
9618
+ "type": "integer"
9519
9619
  }
9520
- ]
9620
+ }
9521
9621
  }
9522
9622
  }
9523
9623
  }
@@ -9534,60 +9634,73 @@
9534
9634
  "/v1/credits/usage": {
9535
9635
  "get": {
9536
9636
  "operationId": "getCreditsUsage",
9537
- "summary": "Get credit usage summary",
9538
- "description": "Returns aggregate credit usage broken down by feature.",
9637
+ "summary": "Get usage statistics",
9638
+ "description": "Returns aggregated API usage stats grouped by operation type and model over the given period.",
9539
9639
  "tags": [
9540
9640
  "Credits"
9541
9641
  ],
9542
9642
  "parameters": [
9543
9643
  {
9544
- "name": "from",
9545
- "in": "query",
9546
- "schema": {
9547
- "type": "string",
9548
- "format": "date-time"
9549
- },
9550
- "description": "Start of the period (ISO 8601)."
9551
- },
9552
- {
9553
- "name": "to",
9644
+ "name": "days",
9554
9645
  "in": "query",
9555
9646
  "schema": {
9556
- "type": "string",
9557
- "format": "date-time"
9647
+ "type": "integer",
9648
+ "default": 30
9558
9649
  },
9559
- "description": "End of the period (ISO 8601)."
9650
+ "description": "Reporting window in days."
9560
9651
  }
9561
9652
  ],
9562
9653
  "responses": {
9563
9654
  "200": {
9564
- "description": "Credit usage summary.",
9655
+ "description": "Aggregated usage stats.",
9565
9656
  "content": {
9566
9657
  "application/json": {
9567
9658
  "schema": {
9568
9659
  "type": "object",
9660
+ "required": [
9661
+ "stats",
9662
+ "period_days"
9663
+ ],
9569
9664
  "properties": {
9570
- "total_used": {
9571
- "type": "number",
9572
- "format": "float"
9573
- },
9574
- "breakdown": {
9665
+ "stats": {
9575
9666
  "type": "array",
9576
9667
  "items": {
9577
9668
  "type": "object",
9578
9669
  "properties": {
9579
- "feature": {
9670
+ "operation_type": {
9580
9671
  "type": "string"
9581
9672
  },
9582
- "credits_used": {
9583
- "type": "number",
9584
- "format": "float"
9673
+ "model": {
9674
+ "type": "string"
9585
9675
  },
9586
9676
  "call_count": {
9587
9677
  "type": "integer"
9678
+ },
9679
+ "total_input_tokens": {
9680
+ "type": "string",
9681
+ "description": "Summed input tokens (serialized as a string)."
9682
+ },
9683
+ "total_output_tokens": {
9684
+ "type": "string",
9685
+ "description": "Summed output tokens (serialized as a string)."
9686
+ },
9687
+ "total_cache_read_tokens": {
9688
+ "type": "string",
9689
+ "description": "Summed cache-read tokens (serialized as a string)."
9690
+ },
9691
+ "total_cost_usd": {
9692
+ "type": [
9693
+ "string",
9694
+ "null"
9695
+ ],
9696
+ "description": "Estimated total cost in USD (serialized as a string)."
9588
9697
  }
9589
9698
  }
9590
9699
  }
9700
+ },
9701
+ "period_days": {
9702
+ "type": "integer",
9703
+ "example": 30
9591
9704
  }
9592
9705
  }
9593
9706
  }
@@ -9606,56 +9719,53 @@
9606
9719
  "/v1/credits/usage/daily": {
9607
9720
  "get": {
9608
9721
  "operationId": "getCreditsUsageDaily",
9609
- "summary": "Get daily credit usage",
9610
- "description": "Returns per-day credit usage for the specified period (default last 30 days).",
9722
+ "summary": "Get daily usage breakdown",
9723
+ "description": "Returns per-day API usage for the specified period (default last 30 days) as a JSON array.",
9611
9724
  "tags": [
9612
9725
  "Credits"
9613
9726
  ],
9614
9727
  "parameters": [
9615
9728
  {
9616
- "name": "from",
9617
- "in": "query",
9618
- "schema": {
9619
- "type": "string",
9620
- "format": "date-time"
9621
- },
9622
- "description": "Start of the period (ISO 8601)."
9623
- },
9624
- {
9625
- "name": "to",
9729
+ "name": "days",
9626
9730
  "in": "query",
9627
9731
  "schema": {
9628
- "type": "string",
9629
- "format": "date-time"
9732
+ "type": "integer",
9733
+ "default": 30
9630
9734
  },
9631
- "description": "End of the period (ISO 8601)."
9735
+ "description": "Reporting window in days."
9632
9736
  }
9633
9737
  ],
9634
9738
  "responses": {
9635
9739
  "200": {
9636
- "description": "Daily credit usage.",
9740
+ "description": "Daily usage breakdown.",
9637
9741
  "content": {
9638
9742
  "application/json": {
9639
9743
  "schema": {
9640
- "type": "object",
9641
- "properties": {
9642
- "data": {
9643
- "type": "array",
9644
- "items": {
9645
- "type": "object",
9646
- "properties": {
9647
- "date": {
9648
- "type": "string",
9649
- "format": "date"
9650
- },
9651
- "credits_used": {
9652
- "type": "number",
9653
- "format": "float"
9654
- },
9655
- "call_count": {
9656
- "type": "integer"
9657
- }
9658
- }
9744
+ "type": "array",
9745
+ "items": {
9746
+ "type": "object",
9747
+ "properties": {
9748
+ "date": {
9749
+ "type": "string",
9750
+ "format": "date"
9751
+ },
9752
+ "calls": {
9753
+ "type": "integer"
9754
+ },
9755
+ "input_tokens": {
9756
+ "type": "string",
9757
+ "description": "Summed input tokens for the day (serialized as a string)."
9758
+ },
9759
+ "output_tokens": {
9760
+ "type": "string",
9761
+ "description": "Summed output tokens for the day (serialized as a string)."
9762
+ },
9763
+ "cost_usd": {
9764
+ "type": [
9765
+ "string",
9766
+ "null"
9767
+ ],
9768
+ "description": "Estimated cost in USD for the day (serialized as a string)."
9659
9769
  }
9660
9770
  }
9661
9771
  }
@@ -9676,19 +9786,31 @@
9676
9786
  "get": {
9677
9787
  "operationId": "getCreditsUsageLog",
9678
9788
  "summary": "Get credit usage log",
9679
- "description": "Returns a detailed per-request usage log with model, tokens, and cost.",
9789
+ "description": "Returns a detailed per-request usage log with model, tokens, and cost, most recent first, with page/limit pagination.",
9680
9790
  "tags": [
9681
9791
  "Credits"
9682
9792
  ],
9683
9793
  "parameters": [
9684
9794
  {
9685
- "$ref": "#/components/parameters/Limit"
9686
- },
9687
- {
9688
- "$ref": "#/components/parameters/Cursor"
9795
+ "name": "page",
9796
+ "in": "query",
9797
+ "schema": {
9798
+ "type": "integer",
9799
+ "minimum": 1,
9800
+ "default": 1
9801
+ },
9802
+ "description": "Page number (1-based)."
9689
9803
  },
9690
9804
  {
9691
- "$ref": "#/components/parameters/Order"
9805
+ "name": "limit",
9806
+ "in": "query",
9807
+ "schema": {
9808
+ "type": "integer",
9809
+ "minimum": 1,
9810
+ "maximum": 100,
9811
+ "default": 20
9812
+ },
9813
+ "description": "Items per page (max 100)."
9692
9814
  }
9693
9815
  ],
9694
9816
  "responses": {
@@ -9697,48 +9819,75 @@
9697
9819
  "content": {
9698
9820
  "application/json": {
9699
9821
  "schema": {
9700
- "allOf": [
9701
- {
9702
- "$ref": "#/components/schemas/PaginatedResponse"
9703
- },
9704
- {
9705
- "type": "object",
9706
- "properties": {
9707
- "data": {
9708
- "type": "array",
9709
- "items": {
9710
- "type": "object",
9711
- "properties": {
9712
- "id": {
9713
- "type": "string"
9714
- },
9715
- "operation_type": {
9716
- "type": "string"
9717
- },
9718
- "model": {
9719
- "type": "string"
9720
- },
9721
- "input_tokens": {
9722
- "type": "integer"
9723
- },
9724
- "output_tokens": {
9725
- "type": "integer"
9726
- },
9727
- "cost_credits": {
9728
- "type": "number",
9729
- "format": "float"
9730
- },
9731
- "created_at": {
9732
- "type": "string",
9733
- "format": "date-time",
9734
- "example": "2026-04-25T14:30:00.000Z"
9735
- }
9736
- }
9822
+ "type": "object",
9823
+ "required": [
9824
+ "items",
9825
+ "total",
9826
+ "page",
9827
+ "limit"
9828
+ ],
9829
+ "properties": {
9830
+ "items": {
9831
+ "type": "array",
9832
+ "items": {
9833
+ "type": "object",
9834
+ "properties": {
9835
+ "id": {
9836
+ "type": "string",
9837
+ "format": "uuid"
9838
+ },
9839
+ "customer_id": {
9840
+ "type": "string",
9841
+ "format": "uuid"
9842
+ },
9843
+ "model": {
9844
+ "type": "string"
9845
+ },
9846
+ "input_tokens": {
9847
+ "type": "integer"
9848
+ },
9849
+ "output_tokens": {
9850
+ "type": "integer"
9851
+ },
9852
+ "cache_read_tokens": {
9853
+ "type": "integer"
9854
+ },
9855
+ "cost_estimate_usd": {
9856
+ "type": [
9857
+ "string",
9858
+ "null"
9859
+ ],
9860
+ "description": "Estimated cost in USD (serialized as a string)."
9861
+ },
9862
+ "operation_type": {
9863
+ "type": "string"
9864
+ },
9865
+ "document_id": {
9866
+ "type": [
9867
+ "string",
9868
+ "null"
9869
+ ],
9870
+ "format": "uuid"
9871
+ },
9872
+ "created_at": {
9873
+ "type": "string",
9874
+ "format": "date-time",
9875
+ "example": "2026-04-25T14:30:00.000Z"
9737
9876
  }
9738
9877
  }
9739
9878
  }
9879
+ },
9880
+ "total": {
9881
+ "type": "integer",
9882
+ "description": "Total number of log entries."
9883
+ },
9884
+ "page": {
9885
+ "type": "integer"
9886
+ },
9887
+ "limit": {
9888
+ "type": "integer"
9740
9889
  }
9741
- ]
9890
+ }
9742
9891
  }
9743
9892
  }
9744
9893
  }
@@ -11445,7 +11594,7 @@
11445
11594
  "get": {
11446
11595
  "operationId": "getReviewStats",
11447
11596
  "summary": "Get review queue statistics",
11448
- "description": "Returns aggregate statistics about the review queue (pending, approved, rejected counts).",
11597
+ "description": "Returns aggregate review queue counts grouped by status.",
11449
11598
  "tags": [
11450
11599
  "Review"
11451
11600
  ],
@@ -11456,18 +11605,27 @@
11456
11605
  "application/json": {
11457
11606
  "schema": {
11458
11607
  "type": "object",
11608
+ "required": [
11609
+ "total",
11610
+ "by_status"
11611
+ ],
11459
11612
  "properties": {
11460
- "pending": {
11461
- "type": "integer"
11462
- },
11463
- "approved": {
11464
- "type": "integer"
11465
- },
11466
- "rejected": {
11467
- "type": "integer"
11468
- },
11469
11613
  "total": {
11470
- "type": "integer"
11614
+ "type": "integer",
11615
+ "description": "Total number of review records.",
11616
+ "example": 42
11617
+ },
11618
+ "by_status": {
11619
+ "type": "object",
11620
+ "description": "Count of review records per status (e.g. pending, approved, rejected).",
11621
+ "additionalProperties": {
11622
+ "type": "integer"
11623
+ },
11624
+ "example": {
11625
+ "pending": 12,
11626
+ "approved": 25,
11627
+ "rejected": 5
11628
+ }
11471
11629
  }
11472
11630
  }
11473
11631
  }
@@ -12789,12 +12947,12 @@
12789
12947
  "description": "Filter by value layer"
12790
12948
  },
12791
12949
  {
12792
- "name": "source_type",
12950
+ "name": "kind",
12793
12951
  "in": "query",
12794
12952
  "schema": {
12795
12953
  "type": "string"
12796
12954
  },
12797
- "description": "Filter by source type (e.g. extraction, job, resolution)"
12955
+ "description": "Filter by source kind (e.g. structuring_run, resolution_run, data_product)"
12798
12956
  },
12799
12957
  {
12800
12958
  "$ref": "#/components/parameters/Limit"
@@ -12911,14 +13069,34 @@
12911
13069
  "field_key": {
12912
13070
  "type": "string"
12913
13071
  },
12914
- "field_type": {
13072
+ "display_name": {
13073
+ "type": "string"
13074
+ },
13075
+ "data_type": {
12915
13076
  "type": "string"
12916
13077
  },
12917
- "ordinal": {
13078
+ "position": {
12918
13079
  "type": "integer"
13080
+ },
13081
+ "is_required": {
13082
+ "type": "boolean"
13083
+ },
13084
+ "is_hidden": {
13085
+ "type": "boolean"
12919
13086
  }
12920
13087
  }
12921
13088
  }
13089
+ },
13090
+ "links": {
13091
+ "type": "object",
13092
+ "properties": {
13093
+ "self": {
13094
+ "type": "string"
13095
+ },
13096
+ "record_set": {
13097
+ "type": "string"
13098
+ }
13099
+ }
12922
13100
  }
12923
13101
  }
12924
13102
  }
@@ -12956,6 +13134,7 @@
12956
13134
  "in": "query",
12957
13135
  "schema": {
12958
13136
  "type": "integer",
13137
+ "minimum": 1,
12959
13138
  "default": 1
12960
13139
  }
12961
13140
  },
@@ -12964,9 +13143,21 @@
12964
13143
  "in": "query",
12965
13144
  "schema": {
12966
13145
  "type": "integer",
12967
- "default": 50,
12968
- "maximum": 200
13146
+ "minimum": 1,
13147
+ "maximum": 100,
13148
+ "default": 20
12969
13149
  }
13150
+ },
13151
+ {
13152
+ "name": "include",
13153
+ "in": "query",
13154
+ "schema": {
13155
+ "type": "string",
13156
+ "enum": [
13157
+ "values"
13158
+ ]
13159
+ },
13160
+ "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"
12970
13161
  }
12971
13162
  ],
12972
13163
  "responses": {
@@ -12981,7 +13172,58 @@
12981
13172
  "type": "array",
12982
13173
  "items": {
12983
13174
  "type": "object",
12984
- "description": "Record with source_record_id and ordinal"
13175
+ "properties": {
13176
+ "id": {
13177
+ "type": "string",
13178
+ "format": "uuid"
13179
+ },
13180
+ "document_id": {
13181
+ "type": [
13182
+ "string",
13183
+ "null"
13184
+ ],
13185
+ "format": "uuid"
13186
+ },
13187
+ "ordinal": {
13188
+ "type": "integer"
13189
+ },
13190
+ "record_key": {
13191
+ "type": [
13192
+ "string",
13193
+ "null"
13194
+ ]
13195
+ },
13196
+ "status": {
13197
+ "type": "string"
13198
+ },
13199
+ "confidence": {
13200
+ "type": [
13201
+ "number",
13202
+ "null"
13203
+ ]
13204
+ },
13205
+ "values": {
13206
+ "type": "object",
13207
+ "description": "Only present with `include=values`. Map of field key to the record's latest cell value.\n",
13208
+ "additionalProperties": {
13209
+ "type": "object",
13210
+ "properties": {
13211
+ "value": {
13212
+ "description": "Cell value. Null when the cell is held for review."
13213
+ },
13214
+ "status": {
13215
+ "type": "string"
13216
+ },
13217
+ "confidence": {
13218
+ "type": [
13219
+ "number",
13220
+ "null"
13221
+ ]
13222
+ }
13223
+ }
13224
+ }
13225
+ }
13226
+ }
12985
13227
  }
12986
13228
  },
12987
13229
  "pagination": {
@@ -13000,6 +13242,17 @@
13000
13242
  "type": "boolean"
13001
13243
  }
13002
13244
  }
13245
+ },
13246
+ "links": {
13247
+ "type": "object",
13248
+ "properties": {
13249
+ "self": {
13250
+ "type": "string"
13251
+ },
13252
+ "record_set": {
13253
+ "type": "string"
13254
+ }
13255
+ }
13003
13256
  }
13004
13257
  }
13005
13258
  }
@@ -13041,14 +13294,52 @@
13041
13294
  "schema": {
13042
13295
  "type": "object",
13043
13296
  "properties": {
13044
- "data": {
13045
- "type": "array",
13046
- "items": {
13047
- "type": "object"
13048
- }
13297
+ "record_set_id": {
13298
+ "type": "string",
13299
+ "format": "uuid"
13300
+ },
13301
+ "name": {
13302
+ "type": "string"
13049
13303
  },
13050
13304
  "total": {
13051
13305
  "type": "integer"
13306
+ },
13307
+ "records": {
13308
+ "type": "array",
13309
+ "items": {
13310
+ "type": "object",
13311
+ "properties": {
13312
+ "id": {
13313
+ "type": "string",
13314
+ "format": "uuid"
13315
+ },
13316
+ "document_id": {
13317
+ "type": [
13318
+ "string",
13319
+ "null"
13320
+ ],
13321
+ "format": "uuid"
13322
+ },
13323
+ "ordinal": {
13324
+ "type": "integer"
13325
+ },
13326
+ "record_key": {
13327
+ "type": [
13328
+ "string",
13329
+ "null"
13330
+ ]
13331
+ },
13332
+ "status": {
13333
+ "type": "string"
13334
+ },
13335
+ "confidence": {
13336
+ "type": [
13337
+ "number",
13338
+ "null"
13339
+ ]
13340
+ }
13341
+ }
13342
+ }
13052
13343
  }
13053
13344
  }
13054
13345
  }
@@ -24235,15 +24526,21 @@
24235
24526
  "product"
24236
24527
  ]
24237
24528
  },
24238
- "source_type": {
24239
- "type": "string"
24529
+ "kind": {
24530
+ "type": "string",
24531
+ "description": "Source kind (e.g. structuring_run, resolution_run, data_product)."
24240
24532
  },
24241
24533
  "source_id": {
24242
- "type": "string",
24243
- "format": "uuid"
24534
+ "type": [
24535
+ "string",
24536
+ "null"
24537
+ ],
24538
+ "format": "uuid",
24539
+ "description": "Owning run/product ID where applicable."
24244
24540
  },
24245
24541
  "status": {
24246
- "type": "string"
24542
+ "type": "string",
24543
+ "description": "Lifecycle state (e.g. active)."
24247
24544
  },
24248
24545
  "record_count": {
24249
24546
  "type": "integer"
@@ -24254,6 +24551,23 @@
24254
24551
  "created_at": {
24255
24552
  "type": "string",
24256
24553
  "format": "date-time"
24554
+ },
24555
+ "links": {
24556
+ "type": "object",
24557
+ "properties": {
24558
+ "self": {
24559
+ "type": "string"
24560
+ },
24561
+ "fields": {
24562
+ "type": "string"
24563
+ },
24564
+ "records": {
24565
+ "type": "string"
24566
+ },
24567
+ "export": {
24568
+ "type": "string"
24569
+ }
24570
+ }
24257
24571
  }
24258
24572
  }
24259
24573
  }