@specstream/sdk 1.0.0 → 1.1.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.
package/dist/index.d.ts CHANGED
@@ -205,6 +205,7 @@ export declare class Client {
205
205
  createSpecLink(specId: string, request: Schemas["SpecLinkRequest"]): Promise<Schemas["SpecLinkData"]>;
206
206
  getSharedSpec(token: string): Promise<Schemas["SharedSpec"]>;
207
207
  revokeSpecLink(specId: string, linkId: string): Promise<Schemas["SpecLinkRevoked"]>;
208
+ workspaceResearchInput(findId: string): Promise<Schemas["WorkspaceResearchInput"]>;
208
209
  workspaceSetScheduleDelivery(scheduleId: string, request: Schemas["ScheduleDeliveryInput"]): Promise<Schemas["ScheduleDeliveryData"]>;
209
210
  workspaceListCollections(query?: {
210
211
  "project_id"?: string;
@@ -298,6 +299,18 @@ export declare class Client {
298
299
  workspaceQuotePlacement(importId: string): Promise<Schemas["PlacementQuoteData"]>;
299
300
  workspaceStartPlacement(importId: string, request: Schemas["PlacementStartInput"]): Promise<Schemas["PlacementStatusData"]>;
300
301
  workspacePlacementStatus(importId: string, placementId: string): Promise<Schemas["PlacementStatusData"]>;
302
+ teachWebSource(request: Schemas["TeachWebSource"]): Promise<Schemas["WebSourcePreview"]>;
303
+ listWebSources(): Promise<Schemas["WebSourceList"]>;
304
+ getWebSource(sourceId: string): Promise<Schemas["WebSourceInfo"]>;
305
+ previewWebSource(sourceId: string): Promise<Schemas["WebSourcePreview"]>;
306
+ getWebSourcePreview(previewId: string): Promise<Schemas["WebSourcePreview"]>;
307
+ saveWebSourceList(request: Schemas["SaveWebSourceList"]): Promise<Schemas["WorkspaceImportData"]>;
308
+ getReconciliationFields(collectionId: string): Promise<Schemas["ReconciliationFields"]>;
309
+ listReconciliations(collectionId: string): Promise<Schemas["ReconciliationHistory"]>;
310
+ prepareReconciliation(request: Schemas["ReconciliationPrepare"]): Promise<Schemas["ReconciliationView"]>;
311
+ getReconciliation(comparisonId: string): Promise<Schemas["ReconciliationView"]>;
312
+ applyReconciliation(comparisonId: string, request: Schemas["ReconciliationApply"]): Promise<Schemas["WorkspaceImportData"]>;
313
+ getReconciledInput(importId: string): Promise<Schemas["ReconciliationReceipt"]>;
301
314
  private headers;
302
315
  private request;
303
316
  }
package/dist/index.js CHANGED
@@ -71,7 +71,7 @@ export class Client {
71
71
  this.baseUrl = (options.baseUrl || DEFAULT_BASE_URL).replace(/\/+$/, "");
72
72
  this.fetchFn = options.fetch ?? fetch;
73
73
  this.exportOrigin = options.exportOrigin;
74
- this.timeoutMs = options.timeoutMs ?? 60_000;
74
+ this.timeoutMs = options.timeoutMs ?? 150_000;
75
75
  if (!Number.isSafeInteger(this.timeoutMs) || this.timeoutMs <= 0 || this.timeoutMs > 2_147_483_647) {
76
76
  throw new SpecstreamError("timeoutMs must be a positive integer up to 2147483647");
77
77
  }
@@ -577,6 +577,10 @@ export class Client {
577
577
  let path = `/v1/specs/${encodeURIComponent(specId)}/links/${encodeURIComponent(linkId)}/revoke`;
578
578
  return this.request("POST", path);
579
579
  }
580
+ workspaceResearchInput(findId) {
581
+ let path = `/v1/workspace/collections/${encodeURIComponent(findId)}/input`;
582
+ return this.request("GET", path);
583
+ }
580
584
  workspaceSetScheduleDelivery(scheduleId, request) {
581
585
  let path = `/v1/workspace/schedules/${encodeURIComponent(scheduleId)}/delivery`;
582
586
  return this.request("PATCH", path, request);
@@ -905,6 +909,54 @@ export class Client {
905
909
  let path = `/v1/workspace/imports/${encodeURIComponent(importId)}/placement/${encodeURIComponent(placementId)}`;
906
910
  return this.request("GET", path);
907
911
  }
912
+ teachWebSource(request) {
913
+ let path = `/v1/imports/web/sources`;
914
+ return this.request("POST", path, request);
915
+ }
916
+ listWebSources() {
917
+ let path = `/v1/imports/web/sources`;
918
+ return this.request("GET", path);
919
+ }
920
+ getWebSource(sourceId) {
921
+ let path = `/v1/imports/web/sources/${encodeURIComponent(sourceId)}`;
922
+ return this.request("GET", path);
923
+ }
924
+ previewWebSource(sourceId) {
925
+ let path = `/v1/imports/web/sources/${encodeURIComponent(sourceId)}/previews`;
926
+ return this.request("POST", path);
927
+ }
928
+ getWebSourcePreview(previewId) {
929
+ let path = `/v1/imports/web/previews/${encodeURIComponent(previewId)}`;
930
+ return this.request("GET", path);
931
+ }
932
+ saveWebSourceList(request) {
933
+ let path = `/v1/imports/web/lists`;
934
+ return this.request("POST", path, request);
935
+ }
936
+ getReconciliationFields(collectionId) {
937
+ let path = `/v1/reconciliation/collections/${encodeURIComponent(collectionId)}/fields`;
938
+ return this.request("GET", path);
939
+ }
940
+ listReconciliations(collectionId) {
941
+ let path = `/v1/reconciliation/collections/${encodeURIComponent(collectionId)}/comparisons`;
942
+ return this.request("GET", path);
943
+ }
944
+ prepareReconciliation(request) {
945
+ let path = `/v1/reconciliation/comparisons`;
946
+ return this.request("POST", path, request);
947
+ }
948
+ getReconciliation(comparisonId) {
949
+ let path = `/v1/reconciliation/comparisons/${encodeURIComponent(comparisonId)}`;
950
+ return this.request("GET", path);
951
+ }
952
+ applyReconciliation(comparisonId, request) {
953
+ let path = `/v1/reconciliation/comparisons/${encodeURIComponent(comparisonId)}/apply`;
954
+ return this.request("POST", path, request);
955
+ }
956
+ getReconciledInput(importId) {
957
+ let path = `/v1/reconciliation/imports/${encodeURIComponent(importId)}`;
958
+ return this.request("GET", path);
959
+ }
908
960
  // END GENERATED LIFECYCLE
909
961
  headers() {
910
962
  const token = this.apiKey.toLowerCase().startsWith("bearer ")
@@ -914,7 +966,7 @@ export class Client {
914
966
  Authorization: token,
915
967
  Accept: "application/json",
916
968
  "Content-Type": "application/json",
917
- "User-Agent": "specstream-typescript/1.0.0",
969
+ "User-Agent": "specstream-typescript/1.1.0",
918
970
  };
919
971
  }
920
972
  async request(method, path, body) {
@@ -172,6 +172,8 @@ export interface Schemas {
172
172
  "plan_name": string;
173
173
  "members_limit": (number | null);
174
174
  "members_used": number;
175
+ "current_lists_limit": (number | null);
176
+ "current_lists_used": number;
175
177
  "finds_at_once": number;
176
178
  "finds_per_hour": number;
177
179
  "capabilities": Schemas["CapacityPlanCapabilities"];
@@ -783,6 +785,139 @@ export interface Schemas {
783
785
  "field_id": string;
784
786
  "reason": string;
785
787
  };
788
+ "InputIdentityAgreement": {
789
+ "field": string;
790
+ "supplied": string;
791
+ "observed": Schemas["FieldObservation"];
792
+ };
793
+ "InputIdentityCandidate": {
794
+ "name": string;
795
+ "website"?: (string | null);
796
+ "native_identity": {
797
+ [key: string]: string;
798
+ };
799
+ "agreements"?: Array<Schemas["InputIdentityAgreement"]>;
800
+ "conflicting_fields"?: Array<string>;
801
+ "missing_fields"?: Array<string>;
802
+ };
803
+ "InputIdentityResolution": {
804
+ "policy"?: "name-location.v1";
805
+ "status": "matched" | "ambiguous" | "needs_context" | "unresolved" | "unavailable";
806
+ "reason": string;
807
+ "candidates"?: Array<Schemas["InputIdentityCandidate"]>;
808
+ "candidates_considered": number;
809
+ "candidates_truncated"?: boolean;
810
+ "scope"?: "observed_source_candidates";
811
+ "native_identity"?: ({
812
+ [key: string]: string;
813
+ } | null);
814
+ };
815
+ "InvestigationBatch": {
816
+ "batch_id": string;
817
+ "function_id": string;
818
+ "name": string;
819
+ "collection_id": string;
820
+ "state": string;
821
+ "reason": (string | null);
822
+ "maximum_cents": number;
823
+ "currency": string;
824
+ "quote_hash": string;
825
+ "expires_at": string;
826
+ "counts": {
827
+ [key: string]: number;
828
+ };
829
+ "rows": Array<{
830
+ [key: string]: unknown;
831
+ }>;
832
+ "works": Array<{
833
+ [key: string]: unknown;
834
+ }>;
835
+ "created_at": string;
836
+ };
837
+ "InvestigationBatchApprove": {
838
+ "quote_hash": string;
839
+ "confirm_max_cents": number;
840
+ };
841
+ "InvestigationBatchPage": {
842
+ "batches": Array<Schemas["InvestigationBatch"]>;
843
+ };
844
+ "InvestigationBatchPrepare": {
845
+ "request_id": string;
846
+ "function_id": string;
847
+ "collection_id": string;
848
+ "record_ids": Array<string>;
849
+ "bindings": {
850
+ [key: string]: Schemas["InvestigationBinding"];
851
+ };
852
+ "reuse_completed"?: boolean;
853
+ };
854
+ "InvestigationBinding": {
855
+ "field"?: (string | null);
856
+ "value"?: (string | number | boolean | null);
857
+ };
858
+ "InvestigationFunction": {
859
+ "function_id": string;
860
+ "name": string;
861
+ "spec_id": string;
862
+ "revision_id": string;
863
+ "project_id": (string | null);
864
+ "contract_hash": string;
865
+ "parameters": Array<Schemas["InvestigationParameter"]>;
866
+ "request": string;
867
+ "output_fields": Array<string>;
868
+ "results_per_input": number;
869
+ "created_at": string;
870
+ };
871
+ "InvestigationFunctionCreate": {
872
+ "name": string;
873
+ "spec_id": string;
874
+ "revision_id": string;
875
+ "parameters": Array<Schemas["InvestigationParameter"]>;
876
+ };
877
+ "InvestigationFunctionPage": {
878
+ "functions": Array<Schemas["InvestigationFunction"]>;
879
+ };
880
+ "InvestigationInputCatalog": {
881
+ "collection_id": string;
882
+ "project_id": (string | null);
883
+ "fields": Array<Schemas["InvestigationInputColumn"]>;
884
+ "total_rows": number;
885
+ };
886
+ "InvestigationInputColumn": {
887
+ "field": string;
888
+ "nonempty_rows": number;
889
+ "examples": Array<unknown>;
890
+ };
891
+ "InvestigationParameter": {
892
+ "name": string;
893
+ "label": string;
894
+ "paths": Array<string>;
895
+ "value_type": "text" | "integer" | "number" | "boolean" | "url";
896
+ "prefix"?: string;
897
+ "suffix"?: string;
898
+ };
899
+ "InvestigationParameterOption": {
900
+ "path": string;
901
+ "label": string;
902
+ "value_type": "text" | "integer" | "number" | "boolean" | "url";
903
+ "value": unknown;
904
+ };
905
+ "InvestigationParameterPage": {
906
+ "spec_id": string;
907
+ "revision_id": string;
908
+ "parameters": Array<Schemas["InvestigationParameterOption"]>;
909
+ };
910
+ "InvestigationResults": {
911
+ "schema"?: "specstream.investigation-delivery.v1";
912
+ "batch_id": string;
913
+ "inputs_are_not_evidence_for_child_results"?: true;
914
+ "inputs": Array<{
915
+ [key: string]: unknown;
916
+ }>;
917
+ "deliveries": Array<{
918
+ [key: string]: unknown;
919
+ }>;
920
+ };
786
921
  "InvitationData": {
787
922
  "id": string;
788
923
  "email": string;
@@ -998,12 +1133,14 @@ export interface Schemas {
998
1133
  "operations": Array<Schemas["ChipOperation"]>;
999
1134
  };
1000
1135
  "ParseRequest": {
1136
+ "retained"?: (Schemas["RetainedRequest"] | null);
1001
1137
  "q": string;
1002
1138
  "kind"?: (Schemas["EntityType"] | null);
1003
1139
  "locale"?: string;
1004
1140
  "expected_source_hash"?: (string | null);
1005
1141
  };
1006
1142
  "ParseResult": {
1143
+ "retained"?: (Schemas["RetainedRequest"] | null);
1007
1144
  "grading"?: (Schemas["ReadingGrade"] | null);
1008
1145
  "understanding"?: (Schemas["Understanding"] | null);
1009
1146
  "decision_id"?: (string | null);
@@ -1141,6 +1278,9 @@ export interface Schemas {
1141
1278
  "response_sha256"?: (string | null);
1142
1279
  "source_time"?: (Schemas["EvidenceTime"] | null);
1143
1280
  };
1281
+ "PreviewWebSource": {
1282
+ "source_id": string;
1283
+ };
1144
1284
  "Project": {
1145
1285
  "project_id": string;
1146
1286
  "name": string;
@@ -1226,6 +1366,7 @@ export interface Schemas {
1226
1366
  "target_type"?: (string | null);
1227
1367
  "source_collection"?: (string | null);
1228
1368
  "operation"?: ("find" | "extend" | "add-facts" | "refresh" | null);
1369
+ "retained"?: (Schemas["RetainedRequest"] | null);
1229
1370
  };
1230
1371
  "ReadingGrade": {
1231
1372
  "kind": (Schemas["EntityType"] | null);
@@ -1276,6 +1417,162 @@ export interface Schemas {
1276
1417
  "ast_refs"?: Array<string>;
1277
1418
  "reason": string;
1278
1419
  };
1420
+ "ReconciliationAgreement": {
1421
+ "left_field": string;
1422
+ "right_field": string;
1423
+ "mode": "exact" | "edit";
1424
+ "normalization": "literal" | "nfkc_casefold_space";
1425
+ "minimum_bps": number;
1426
+ "score_bps": number;
1427
+ "edits": number;
1428
+ };
1429
+ "ReconciliationApply": {
1430
+ "comparison_hash": string;
1431
+ "import_id": string;
1432
+ "name": string;
1433
+ "choices": Array<Schemas["ReconciliationChoice"]>;
1434
+ };
1435
+ "ReconciliationBlocked": {
1436
+ "right_record_id": string;
1437
+ "right_name": string;
1438
+ "contradictions": Array<Schemas["ReconciliationContradiction"]>;
1439
+ };
1440
+ "ReconciliationCandidate": {
1441
+ "right_record_id": string;
1442
+ "right_name": string;
1443
+ "score_bps": number;
1444
+ "groups": Array<Schemas["ReconciliationEvidenceGroup"]>;
1445
+ "right_values": {
1446
+ [key: string]: unknown;
1447
+ };
1448
+ "references": {
1449
+ [key: string]: Array<{
1450
+ [key: string]: unknown;
1451
+ }>;
1452
+ };
1453
+ "unknown_guards": Array<Schemas["ReconciliationGuard"]>;
1454
+ "reference_candidate_for": number;
1455
+ };
1456
+ "ReconciliationChoice": {
1457
+ "left_record_id": string;
1458
+ "right_record_id": string;
1459
+ };
1460
+ "ReconciliationContradiction": {
1461
+ "left_field": string;
1462
+ "right_field": string;
1463
+ "left_value": unknown;
1464
+ "right_value": unknown;
1465
+ };
1466
+ "ReconciliationEvidenceGroup": {
1467
+ "group": number;
1468
+ "comparisons": Array<Schemas["ReconciliationAgreement"]>;
1469
+ };
1470
+ "ReconciliationField": {
1471
+ "field": string;
1472
+ "present": number;
1473
+ "comparable": number;
1474
+ "examples": Array<unknown>;
1475
+ };
1476
+ "ReconciliationFields": {
1477
+ "collection_id": string;
1478
+ "name": string;
1479
+ "records": number;
1480
+ "fields": Array<Schemas["ReconciliationField"]>;
1481
+ };
1482
+ "ReconciliationFill": {
1483
+ "right_field": string;
1484
+ "output_field": string;
1485
+ };
1486
+ "ReconciliationGroup": {
1487
+ "rules": Array<Schemas["ReconciliationRule"]>;
1488
+ };
1489
+ "ReconciliationGuard": {
1490
+ "left_field": string;
1491
+ "right_field": string;
1492
+ };
1493
+ "ReconciliationHistory": {
1494
+ "comparisons": Array<{
1495
+ [key: string]: unknown;
1496
+ }>;
1497
+ };
1498
+ "ReconciliationIncomplete": {
1499
+ "group": number;
1500
+ "fields": Array<string>;
1501
+ };
1502
+ "ReconciliationPrepare": {
1503
+ "request_id": string;
1504
+ "name": string;
1505
+ "project_id"?: (string | null);
1506
+ "left": Schemas["ReconciliationScope"];
1507
+ "right": Schemas["ReconciliationScope"];
1508
+ "groups": Array<Schemas["ReconciliationGroup"]>;
1509
+ "vetoes"?: Array<Schemas["ReconciliationVeto"]>;
1510
+ "fill": Array<Schemas["ReconciliationFill"]>;
1511
+ "assignment"?: "one_to_one" | "many_to_one";
1512
+ "include_private_fields"?: boolean;
1513
+ };
1514
+ "ReconciliationReceipt": {
1515
+ "import_id": string;
1516
+ "name": string;
1517
+ "comparison_id": string;
1518
+ "rows": Array<{
1519
+ [key: string]: unknown;
1520
+ }>;
1521
+ "qualification_authority"?: false;
1522
+ };
1523
+ "ReconciliationRow": {
1524
+ "left_record_id": string;
1525
+ "name": string;
1526
+ "left_values": {
1527
+ [key: string]: unknown;
1528
+ };
1529
+ "references": {
1530
+ [key: string]: Array<{
1531
+ [key: string]: unknown;
1532
+ }>;
1533
+ };
1534
+ "status": "one_candidate" | "ambiguous" | "needs_fields" | "no_candidate";
1535
+ "candidates": Array<Schemas["ReconciliationCandidate"]>;
1536
+ "incomplete_groups": Array<Schemas["ReconciliationIncomplete"]>;
1537
+ "blocked_candidates": Array<Schemas["ReconciliationBlocked"]>;
1538
+ "candidate_count": number;
1539
+ };
1540
+ "ReconciliationRule": {
1541
+ "left_field": string;
1542
+ "right_field": string;
1543
+ "mode"?: "exact" | "edit";
1544
+ "threshold_bps"?: number;
1545
+ "normalization"?: "literal" | "nfkc_casefold_space";
1546
+ };
1547
+ "ReconciliationScope": {
1548
+ "collection_id": string;
1549
+ "record_ids"?: (Array<string> | null);
1550
+ };
1551
+ "ReconciliationVeto": {
1552
+ "left_field": string;
1553
+ "right_field": string;
1554
+ "normalization"?: "literal" | "nfkc_casefold_space";
1555
+ };
1556
+ "ReconciliationView": {
1557
+ "comparison_id": string;
1558
+ "comparison_hash": string;
1559
+ "name": string;
1560
+ "project_id": (string | null);
1561
+ "request": Schemas["ReconciliationPrepare"];
1562
+ "created_at": string;
1563
+ "scopes": {
1564
+ [key: string]: unknown;
1565
+ };
1566
+ "summary": {
1567
+ [key: string]: number;
1568
+ };
1569
+ "metrics": {
1570
+ [key: string]: number;
1571
+ };
1572
+ "rows": Array<Schemas["ReconciliationRow"]>;
1573
+ "qualification_authority"?: false;
1574
+ "metric"?: "normalized_levenshtein_v1";
1575
+ };
1279
1576
  "RecordCountProof": {
1280
1577
  "spec_version"?: "record_count_proof.v1";
1281
1578
  "scope"?: "published_source_records";
@@ -1327,6 +1624,85 @@ export interface Schemas {
1327
1624
  "version"?: "request_templates.v1";
1328
1625
  "templates"?: Array<Schemas["RequestTemplate"]>;
1329
1626
  };
1627
+ "ResearchRuleApprove": {
1628
+ "review_hash": string;
1629
+ "confirm_total_cents": number;
1630
+ };
1631
+ "ResearchRuleCondition": {
1632
+ "field": string;
1633
+ "operator"?: "equals" | "not_equals" | "present" | "empty";
1634
+ "value"?: (string | number | boolean | null);
1635
+ };
1636
+ "ResearchRulePage": {
1637
+ "rules": Array<{
1638
+ [key: string]: unknown;
1639
+ }>;
1640
+ };
1641
+ "ResearchRulePatch": {
1642
+ "expected_version": number;
1643
+ "state": "active" | "paused" | "deleted";
1644
+ };
1645
+ "ResearchRulePrepare": {
1646
+ "request_id": string;
1647
+ "name": string;
1648
+ "collection_id": string;
1649
+ "function_id": string;
1650
+ "bindings": {
1651
+ [key: string]: Schemas["InvestigationBinding"];
1652
+ };
1653
+ "conditions"?: Array<Schemas["ResearchRuleCondition"]>;
1654
+ "trigger"?: "first_ready" | "input_changed";
1655
+ "include_existing"?: boolean;
1656
+ "reuse_completed"?: boolean;
1657
+ "batch_size"?: number;
1658
+ "per_batch_cents": number;
1659
+ "total_cents": number;
1660
+ "valid_until": string;
1661
+ };
1662
+ "ResearchRuleResults": {
1663
+ "rule_id": string;
1664
+ "original_deliveries_unchanged"?: true;
1665
+ "inputs_are_not_qualification_evidence"?: true;
1666
+ "runs": Array<{
1667
+ [key: string]: unknown;
1668
+ }>;
1669
+ "current_inputs": Array<{
1670
+ [key: string]: unknown;
1671
+ }>;
1672
+ };
1673
+ "ResearchRuleView": {
1674
+ "rule_id": string;
1675
+ "name": string;
1676
+ "collection_id": string;
1677
+ "function_id": string;
1678
+ "project_id": (string | null);
1679
+ "definition": Schemas["ResearchRulePrepare"];
1680
+ "request": string;
1681
+ "state": string;
1682
+ "reason": (string | null);
1683
+ "version": number;
1684
+ "review_hash": string;
1685
+ "review_expires_at": string;
1686
+ "currency": string;
1687
+ "committed_maximum_cents": number;
1688
+ "remaining_cents": number;
1689
+ "last_checked_at": (string | null);
1690
+ "created_at": string;
1691
+ "counts": {
1692
+ [key: string]: number;
1693
+ };
1694
+ "rows": Array<{
1695
+ [key: string]: unknown;
1696
+ }>;
1697
+ "rows_offset": number;
1698
+ "next_rows_offset": (number | null);
1699
+ "runs": Array<{
1700
+ [key: string]: unknown;
1701
+ }>;
1702
+ "total_runs": number;
1703
+ "automatic_execution"?: boolean;
1704
+ "original_deliveries_unchanged"?: true;
1705
+ };
1330
1706
  "ResultReportData": {
1331
1707
  "claim_id": string;
1332
1708
  "status": string;
@@ -1340,6 +1716,12 @@ export interface Schemas {
1340
1716
  "truth": string;
1341
1717
  "link"?: (string | null);
1342
1718
  };
1719
+ "RetainedRequest": {
1720
+ "parent_find_id": string;
1721
+ "operation": "extend" | "add-facts" | "refresh";
1722
+ "label"?: (string | null);
1723
+ "ast_hash"?: (string | null);
1724
+ };
1343
1725
  "RevisionPage": {
1344
1726
  "revisions": Array<Schemas["SpecRevision"]>;
1345
1727
  "next_cursor"?: (string | null);
@@ -1351,6 +1733,7 @@ export interface Schemas {
1351
1733
  "evaluated_at": string;
1352
1734
  "predicates"?: Array<Schemas["PredicateEvidence"]>;
1353
1735
  "match_proof"?: (Schemas["LogicalProof"] | null);
1736
+ "input_resolution"?: (Schemas["InputIdentityResolution"] | null);
1354
1737
  };
1355
1738
  "RevisitPage": {
1356
1739
  "find_id": string;
@@ -1444,6 +1827,15 @@ export interface Schemas {
1444
1827
  "domain": string;
1445
1828
  "enroll"?: boolean;
1446
1829
  };
1830
+ "SaveWebSourceList": {
1831
+ "preview_id": string;
1832
+ "preview_hash": string;
1833
+ "import_id": string;
1834
+ "name": string;
1835
+ "mapping"?: {
1836
+ [key: string]: string;
1837
+ };
1838
+ };
1447
1839
  "SavedSpec": {
1448
1840
  "spec_id": string;
1449
1841
  "project_id": (string | null);
@@ -1709,6 +2101,16 @@ export interface Schemas {
1709
2101
  "prior_knowledge_authority"?: false;
1710
2102
  "modifies_typed_predicates"?: false;
1711
2103
  };
2104
+ "TeachWebSource": {
2105
+ "url": string;
2106
+ "name": string;
2107
+ "name_column"?: string;
2108
+ "examples": Array<{
2109
+ [key: string]: string;
2110
+ }>;
2111
+ "exclude"?: Array<string>;
2112
+ "project_id"?: (string | null);
2113
+ };
1712
2114
  "TranscriptSegment": {
1713
2115
  "start": number;
1714
2116
  "end": number;
@@ -1764,6 +2166,72 @@ export interface Schemas {
1764
2166
  "expirationTime"?: ((number) | null);
1765
2167
  "name": string;
1766
2168
  };
2169
+ "WebSourceCell": {
2170
+ "source_url": string;
2171
+ "response_sha256": string;
2172
+ "pointer": string;
2173
+ "association": "anchor" | "same_element" | "within_record" | "positional_example";
2174
+ };
2175
+ "WebSourceExplanation": {
2176
+ "example_rows": number;
2177
+ "inferred_rows": number;
2178
+ "left_out"?: Array<string>;
2179
+ "fields": Array<Schemas["WebSourceFieldExplanation"]>;
2180
+ "on_change": string;
2181
+ "page_kept_until"?: (string | null);
2182
+ };
2183
+ "WebSourceFieldExplanation": {
2184
+ "column": string;
2185
+ "relationship": "anchor" | "same_element" | "within_record" | "positional_example";
2186
+ "how": string;
2187
+ "on_change": string;
2188
+ "pattern"?: string;
2189
+ "found"?: number;
2190
+ "missing"?: number;
2191
+ };
2192
+ "WebSourceInfo": {
2193
+ "source_id": string;
2194
+ "name": string;
2195
+ "source_url": string;
2196
+ "project_id"?: (string | null);
2197
+ "created_at": string;
2198
+ "reuse": "local_relationships" | "same_snapshot_only";
2199
+ "name_column": string;
2200
+ "headers": Array<string>;
2201
+ "fields"?: Array<Schemas["WebSourceFieldExplanation"]>;
2202
+ };
2203
+ "WebSourceList": {
2204
+ "sources": Array<Schemas["WebSourceInfo"]>;
2205
+ };
2206
+ "WebSourcePreview": {
2207
+ "source_id": string;
2208
+ "preview_id": string;
2209
+ "preview_hash": string;
2210
+ "name": string;
2211
+ "source_url": string;
2212
+ "source_sha256": string;
2213
+ "fetched_at": string;
2214
+ "headers": Array<string>;
2215
+ "name_column": string;
2216
+ "rows": Array<Schemas["WebSourceRow"]>;
2217
+ "count": number;
2218
+ "missing_cells": number;
2219
+ "reuse": "local_relationships" | "same_snapshot_only";
2220
+ "notice": string;
2221
+ "explanation"?: (Schemas["WebSourceExplanation"] | null);
2222
+ "qualification_authority"?: false;
2223
+ };
2224
+ "WebSourceRow": {
2225
+ "id": string;
2226
+ "provided": {
2227
+ [key: string]: (string | null);
2228
+ };
2229
+ "cells": {
2230
+ [key: string]: Schemas["WebSourceCell"];
2231
+ };
2232
+ "missing"?: Array<string>;
2233
+ "example"?: boolean;
2234
+ };
1767
2235
  "WordedCondition": {
1768
2236
  "condition_id": string;
1769
2237
  "words": string;
@@ -1815,6 +2283,8 @@ export interface Schemas {
1815
2283
  "source_snapshot_id"?: (string | null);
1816
2284
  "find_id"?: (string | null);
1817
2285
  "import_id"?: (string | null);
2286
+ "source_preview_id"?: (string | null);
2287
+ "source_program_id"?: (string | null);
1818
2288
  "combined_id"?: (string | null);
1819
2289
  "combined"?: boolean;
1820
2290
  "immutable"?: boolean;
@@ -1964,6 +2434,23 @@ export interface Schemas {
1964
2434
  "sourceCollectionId"?: (string | null);
1965
2435
  "sourceRecordId"?: (string | null);
1966
2436
  };
2437
+ "WorkspaceResearchInput": {
2438
+ "source_import_id": (string | null);
2439
+ "source_name"?: (string | null);
2440
+ "provenance"?: (string | null);
2441
+ "input_access"?: ("not_shared" | null);
2442
+ "rows": Array<Schemas["WorkspaceResearchInputRow"]>;
2443
+ };
2444
+ "WorkspaceResearchInputRow": {
2445
+ "id": string;
2446
+ "provided": {
2447
+ [key: string]: unknown;
2448
+ };
2449
+ "entity_id": (string | null);
2450
+ "status": "pending" | "verified" | "excluded" | "not_delivered" | "unresolved" | "unavailable";
2451
+ "resolution"?: (Schemas["InputIdentityResolution"] | null);
2452
+ "qualification_reason"?: (string | null);
2453
+ };
1967
2454
  "WorkspaceSavedView": {
1968
2455
  "id": string;
1969
2456
  "name": string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@specstream/sdk",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "TypeScript client for SpecStream: finished lists from the live web, every row with its source, priced before anything runs.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",