@specstream/sdk 1.0.0 → 1.1.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.
- package/dist/index.d.ts +13 -0
- package/dist/index.js +54 -2
- package/dist/work-types.d.ts +488 -0
- package/package.json +2 -2
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 ??
|
|
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.
|
|
969
|
+
"User-Agent": "specstream-typescript/1.1.1",
|
|
918
970
|
};
|
|
919
971
|
}
|
|
920
972
|
async request(method, path, body) {
|
package/dist/work-types.d.ts
CHANGED
|
@@ -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;
|
|
@@ -888,6 +1023,7 @@ export interface Schemas {
|
|
|
888
1023
|
};
|
|
889
1024
|
"MeData": {
|
|
890
1025
|
"account_id"?: (string | null);
|
|
1026
|
+
"email"?: (string | null);
|
|
891
1027
|
"guest": boolean;
|
|
892
1028
|
"spend_ceiling_cents"?: number;
|
|
893
1029
|
"amount_spent_cents"?: number;
|
|
@@ -998,12 +1134,14 @@ export interface Schemas {
|
|
|
998
1134
|
"operations": Array<Schemas["ChipOperation"]>;
|
|
999
1135
|
};
|
|
1000
1136
|
"ParseRequest": {
|
|
1137
|
+
"retained"?: (Schemas["RetainedRequest"] | null);
|
|
1001
1138
|
"q": string;
|
|
1002
1139
|
"kind"?: (Schemas["EntityType"] | null);
|
|
1003
1140
|
"locale"?: string;
|
|
1004
1141
|
"expected_source_hash"?: (string | null);
|
|
1005
1142
|
};
|
|
1006
1143
|
"ParseResult": {
|
|
1144
|
+
"retained"?: (Schemas["RetainedRequest"] | null);
|
|
1007
1145
|
"grading"?: (Schemas["ReadingGrade"] | null);
|
|
1008
1146
|
"understanding"?: (Schemas["Understanding"] | null);
|
|
1009
1147
|
"decision_id"?: (string | null);
|
|
@@ -1141,6 +1279,9 @@ export interface Schemas {
|
|
|
1141
1279
|
"response_sha256"?: (string | null);
|
|
1142
1280
|
"source_time"?: (Schemas["EvidenceTime"] | null);
|
|
1143
1281
|
};
|
|
1282
|
+
"PreviewWebSource": {
|
|
1283
|
+
"source_id": string;
|
|
1284
|
+
};
|
|
1144
1285
|
"Project": {
|
|
1145
1286
|
"project_id": string;
|
|
1146
1287
|
"name": string;
|
|
@@ -1226,6 +1367,7 @@ export interface Schemas {
|
|
|
1226
1367
|
"target_type"?: (string | null);
|
|
1227
1368
|
"source_collection"?: (string | null);
|
|
1228
1369
|
"operation"?: ("find" | "extend" | "add-facts" | "refresh" | null);
|
|
1370
|
+
"retained"?: (Schemas["RetainedRequest"] | null);
|
|
1229
1371
|
};
|
|
1230
1372
|
"ReadingGrade": {
|
|
1231
1373
|
"kind": (Schemas["EntityType"] | null);
|
|
@@ -1276,6 +1418,162 @@ export interface Schemas {
|
|
|
1276
1418
|
"ast_refs"?: Array<string>;
|
|
1277
1419
|
"reason": string;
|
|
1278
1420
|
};
|
|
1421
|
+
"ReconciliationAgreement": {
|
|
1422
|
+
"left_field": string;
|
|
1423
|
+
"right_field": string;
|
|
1424
|
+
"mode": "exact" | "edit";
|
|
1425
|
+
"normalization": "literal" | "nfkc_casefold_space";
|
|
1426
|
+
"minimum_bps": number;
|
|
1427
|
+
"score_bps": number;
|
|
1428
|
+
"edits": number;
|
|
1429
|
+
};
|
|
1430
|
+
"ReconciliationApply": {
|
|
1431
|
+
"comparison_hash": string;
|
|
1432
|
+
"import_id": string;
|
|
1433
|
+
"name": string;
|
|
1434
|
+
"choices": Array<Schemas["ReconciliationChoice"]>;
|
|
1435
|
+
};
|
|
1436
|
+
"ReconciliationBlocked": {
|
|
1437
|
+
"right_record_id": string;
|
|
1438
|
+
"right_name": string;
|
|
1439
|
+
"contradictions": Array<Schemas["ReconciliationContradiction"]>;
|
|
1440
|
+
};
|
|
1441
|
+
"ReconciliationCandidate": {
|
|
1442
|
+
"right_record_id": string;
|
|
1443
|
+
"right_name": string;
|
|
1444
|
+
"score_bps": number;
|
|
1445
|
+
"groups": Array<Schemas["ReconciliationEvidenceGroup"]>;
|
|
1446
|
+
"right_values": {
|
|
1447
|
+
[key: string]: unknown;
|
|
1448
|
+
};
|
|
1449
|
+
"references": {
|
|
1450
|
+
[key: string]: Array<{
|
|
1451
|
+
[key: string]: unknown;
|
|
1452
|
+
}>;
|
|
1453
|
+
};
|
|
1454
|
+
"unknown_guards": Array<Schemas["ReconciliationGuard"]>;
|
|
1455
|
+
"reference_candidate_for": number;
|
|
1456
|
+
};
|
|
1457
|
+
"ReconciliationChoice": {
|
|
1458
|
+
"left_record_id": string;
|
|
1459
|
+
"right_record_id": string;
|
|
1460
|
+
};
|
|
1461
|
+
"ReconciliationContradiction": {
|
|
1462
|
+
"left_field": string;
|
|
1463
|
+
"right_field": string;
|
|
1464
|
+
"left_value": unknown;
|
|
1465
|
+
"right_value": unknown;
|
|
1466
|
+
};
|
|
1467
|
+
"ReconciliationEvidenceGroup": {
|
|
1468
|
+
"group": number;
|
|
1469
|
+
"comparisons": Array<Schemas["ReconciliationAgreement"]>;
|
|
1470
|
+
};
|
|
1471
|
+
"ReconciliationField": {
|
|
1472
|
+
"field": string;
|
|
1473
|
+
"present": number;
|
|
1474
|
+
"comparable": number;
|
|
1475
|
+
"examples": Array<unknown>;
|
|
1476
|
+
};
|
|
1477
|
+
"ReconciliationFields": {
|
|
1478
|
+
"collection_id": string;
|
|
1479
|
+
"name": string;
|
|
1480
|
+
"records": number;
|
|
1481
|
+
"fields": Array<Schemas["ReconciliationField"]>;
|
|
1482
|
+
};
|
|
1483
|
+
"ReconciliationFill": {
|
|
1484
|
+
"right_field": string;
|
|
1485
|
+
"output_field": string;
|
|
1486
|
+
};
|
|
1487
|
+
"ReconciliationGroup": {
|
|
1488
|
+
"rules": Array<Schemas["ReconciliationRule"]>;
|
|
1489
|
+
};
|
|
1490
|
+
"ReconciliationGuard": {
|
|
1491
|
+
"left_field": string;
|
|
1492
|
+
"right_field": string;
|
|
1493
|
+
};
|
|
1494
|
+
"ReconciliationHistory": {
|
|
1495
|
+
"comparisons": Array<{
|
|
1496
|
+
[key: string]: unknown;
|
|
1497
|
+
}>;
|
|
1498
|
+
};
|
|
1499
|
+
"ReconciliationIncomplete": {
|
|
1500
|
+
"group": number;
|
|
1501
|
+
"fields": Array<string>;
|
|
1502
|
+
};
|
|
1503
|
+
"ReconciliationPrepare": {
|
|
1504
|
+
"request_id": string;
|
|
1505
|
+
"name": string;
|
|
1506
|
+
"project_id"?: (string | null);
|
|
1507
|
+
"left": Schemas["ReconciliationScope"];
|
|
1508
|
+
"right": Schemas["ReconciliationScope"];
|
|
1509
|
+
"groups": Array<Schemas["ReconciliationGroup"]>;
|
|
1510
|
+
"vetoes"?: Array<Schemas["ReconciliationVeto"]>;
|
|
1511
|
+
"fill": Array<Schemas["ReconciliationFill"]>;
|
|
1512
|
+
"assignment"?: "one_to_one" | "many_to_one";
|
|
1513
|
+
"include_private_fields"?: boolean;
|
|
1514
|
+
};
|
|
1515
|
+
"ReconciliationReceipt": {
|
|
1516
|
+
"import_id": string;
|
|
1517
|
+
"name": string;
|
|
1518
|
+
"comparison_id": string;
|
|
1519
|
+
"rows": Array<{
|
|
1520
|
+
[key: string]: unknown;
|
|
1521
|
+
}>;
|
|
1522
|
+
"qualification_authority"?: false;
|
|
1523
|
+
};
|
|
1524
|
+
"ReconciliationRow": {
|
|
1525
|
+
"left_record_id": string;
|
|
1526
|
+
"name": string;
|
|
1527
|
+
"left_values": {
|
|
1528
|
+
[key: string]: unknown;
|
|
1529
|
+
};
|
|
1530
|
+
"references": {
|
|
1531
|
+
[key: string]: Array<{
|
|
1532
|
+
[key: string]: unknown;
|
|
1533
|
+
}>;
|
|
1534
|
+
};
|
|
1535
|
+
"status": "one_candidate" | "ambiguous" | "needs_fields" | "no_candidate";
|
|
1536
|
+
"candidates": Array<Schemas["ReconciliationCandidate"]>;
|
|
1537
|
+
"incomplete_groups": Array<Schemas["ReconciliationIncomplete"]>;
|
|
1538
|
+
"blocked_candidates": Array<Schemas["ReconciliationBlocked"]>;
|
|
1539
|
+
"candidate_count": number;
|
|
1540
|
+
};
|
|
1541
|
+
"ReconciliationRule": {
|
|
1542
|
+
"left_field": string;
|
|
1543
|
+
"right_field": string;
|
|
1544
|
+
"mode"?: "exact" | "edit";
|
|
1545
|
+
"threshold_bps"?: number;
|
|
1546
|
+
"normalization"?: "literal" | "nfkc_casefold_space";
|
|
1547
|
+
};
|
|
1548
|
+
"ReconciliationScope": {
|
|
1549
|
+
"collection_id": string;
|
|
1550
|
+
"record_ids"?: (Array<string> | null);
|
|
1551
|
+
};
|
|
1552
|
+
"ReconciliationVeto": {
|
|
1553
|
+
"left_field": string;
|
|
1554
|
+
"right_field": string;
|
|
1555
|
+
"normalization"?: "literal" | "nfkc_casefold_space";
|
|
1556
|
+
};
|
|
1557
|
+
"ReconciliationView": {
|
|
1558
|
+
"comparison_id": string;
|
|
1559
|
+
"comparison_hash": string;
|
|
1560
|
+
"name": string;
|
|
1561
|
+
"project_id": (string | null);
|
|
1562
|
+
"request": Schemas["ReconciliationPrepare"];
|
|
1563
|
+
"created_at": string;
|
|
1564
|
+
"scopes": {
|
|
1565
|
+
[key: string]: unknown;
|
|
1566
|
+
};
|
|
1567
|
+
"summary": {
|
|
1568
|
+
[key: string]: number;
|
|
1569
|
+
};
|
|
1570
|
+
"metrics": {
|
|
1571
|
+
[key: string]: number;
|
|
1572
|
+
};
|
|
1573
|
+
"rows": Array<Schemas["ReconciliationRow"]>;
|
|
1574
|
+
"qualification_authority"?: false;
|
|
1575
|
+
"metric"?: "normalized_levenshtein_v1";
|
|
1576
|
+
};
|
|
1279
1577
|
"RecordCountProof": {
|
|
1280
1578
|
"spec_version"?: "record_count_proof.v1";
|
|
1281
1579
|
"scope"?: "published_source_records";
|
|
@@ -1327,6 +1625,85 @@ export interface Schemas {
|
|
|
1327
1625
|
"version"?: "request_templates.v1";
|
|
1328
1626
|
"templates"?: Array<Schemas["RequestTemplate"]>;
|
|
1329
1627
|
};
|
|
1628
|
+
"ResearchRuleApprove": {
|
|
1629
|
+
"review_hash": string;
|
|
1630
|
+
"confirm_total_cents": number;
|
|
1631
|
+
};
|
|
1632
|
+
"ResearchRuleCondition": {
|
|
1633
|
+
"field": string;
|
|
1634
|
+
"operator"?: "equals" | "not_equals" | "present" | "empty";
|
|
1635
|
+
"value"?: (string | number | boolean | null);
|
|
1636
|
+
};
|
|
1637
|
+
"ResearchRulePage": {
|
|
1638
|
+
"rules": Array<{
|
|
1639
|
+
[key: string]: unknown;
|
|
1640
|
+
}>;
|
|
1641
|
+
};
|
|
1642
|
+
"ResearchRulePatch": {
|
|
1643
|
+
"expected_version": number;
|
|
1644
|
+
"state": "active" | "paused" | "deleted";
|
|
1645
|
+
};
|
|
1646
|
+
"ResearchRulePrepare": {
|
|
1647
|
+
"request_id": string;
|
|
1648
|
+
"name": string;
|
|
1649
|
+
"collection_id": string;
|
|
1650
|
+
"function_id": string;
|
|
1651
|
+
"bindings": {
|
|
1652
|
+
[key: string]: Schemas["InvestigationBinding"];
|
|
1653
|
+
};
|
|
1654
|
+
"conditions"?: Array<Schemas["ResearchRuleCondition"]>;
|
|
1655
|
+
"trigger"?: "first_ready" | "input_changed";
|
|
1656
|
+
"include_existing"?: boolean;
|
|
1657
|
+
"reuse_completed"?: boolean;
|
|
1658
|
+
"batch_size"?: number;
|
|
1659
|
+
"per_batch_cents": number;
|
|
1660
|
+
"total_cents": number;
|
|
1661
|
+
"valid_until": string;
|
|
1662
|
+
};
|
|
1663
|
+
"ResearchRuleResults": {
|
|
1664
|
+
"rule_id": string;
|
|
1665
|
+
"original_deliveries_unchanged"?: true;
|
|
1666
|
+
"inputs_are_not_qualification_evidence"?: true;
|
|
1667
|
+
"runs": Array<{
|
|
1668
|
+
[key: string]: unknown;
|
|
1669
|
+
}>;
|
|
1670
|
+
"current_inputs": Array<{
|
|
1671
|
+
[key: string]: unknown;
|
|
1672
|
+
}>;
|
|
1673
|
+
};
|
|
1674
|
+
"ResearchRuleView": {
|
|
1675
|
+
"rule_id": string;
|
|
1676
|
+
"name": string;
|
|
1677
|
+
"collection_id": string;
|
|
1678
|
+
"function_id": string;
|
|
1679
|
+
"project_id": (string | null);
|
|
1680
|
+
"definition": Schemas["ResearchRulePrepare"];
|
|
1681
|
+
"request": string;
|
|
1682
|
+
"state": string;
|
|
1683
|
+
"reason": (string | null);
|
|
1684
|
+
"version": number;
|
|
1685
|
+
"review_hash": string;
|
|
1686
|
+
"review_expires_at": string;
|
|
1687
|
+
"currency": string;
|
|
1688
|
+
"committed_maximum_cents": number;
|
|
1689
|
+
"remaining_cents": number;
|
|
1690
|
+
"last_checked_at": (string | null);
|
|
1691
|
+
"created_at": string;
|
|
1692
|
+
"counts": {
|
|
1693
|
+
[key: string]: number;
|
|
1694
|
+
};
|
|
1695
|
+
"rows": Array<{
|
|
1696
|
+
[key: string]: unknown;
|
|
1697
|
+
}>;
|
|
1698
|
+
"rows_offset": number;
|
|
1699
|
+
"next_rows_offset": (number | null);
|
|
1700
|
+
"runs": Array<{
|
|
1701
|
+
[key: string]: unknown;
|
|
1702
|
+
}>;
|
|
1703
|
+
"total_runs": number;
|
|
1704
|
+
"automatic_execution"?: boolean;
|
|
1705
|
+
"original_deliveries_unchanged"?: true;
|
|
1706
|
+
};
|
|
1330
1707
|
"ResultReportData": {
|
|
1331
1708
|
"claim_id": string;
|
|
1332
1709
|
"status": string;
|
|
@@ -1340,6 +1717,12 @@ export interface Schemas {
|
|
|
1340
1717
|
"truth": string;
|
|
1341
1718
|
"link"?: (string | null);
|
|
1342
1719
|
};
|
|
1720
|
+
"RetainedRequest": {
|
|
1721
|
+
"parent_find_id": string;
|
|
1722
|
+
"operation": "extend" | "add-facts" | "refresh";
|
|
1723
|
+
"label"?: (string | null);
|
|
1724
|
+
"ast_hash"?: (string | null);
|
|
1725
|
+
};
|
|
1343
1726
|
"RevisionPage": {
|
|
1344
1727
|
"revisions": Array<Schemas["SpecRevision"]>;
|
|
1345
1728
|
"next_cursor"?: (string | null);
|
|
@@ -1351,6 +1734,7 @@ export interface Schemas {
|
|
|
1351
1734
|
"evaluated_at": string;
|
|
1352
1735
|
"predicates"?: Array<Schemas["PredicateEvidence"]>;
|
|
1353
1736
|
"match_proof"?: (Schemas["LogicalProof"] | null);
|
|
1737
|
+
"input_resolution"?: (Schemas["InputIdentityResolution"] | null);
|
|
1354
1738
|
};
|
|
1355
1739
|
"RevisitPage": {
|
|
1356
1740
|
"find_id": string;
|
|
@@ -1444,6 +1828,15 @@ export interface Schemas {
|
|
|
1444
1828
|
"domain": string;
|
|
1445
1829
|
"enroll"?: boolean;
|
|
1446
1830
|
};
|
|
1831
|
+
"SaveWebSourceList": {
|
|
1832
|
+
"preview_id": string;
|
|
1833
|
+
"preview_hash": string;
|
|
1834
|
+
"import_id": string;
|
|
1835
|
+
"name": string;
|
|
1836
|
+
"mapping"?: {
|
|
1837
|
+
[key: string]: string;
|
|
1838
|
+
};
|
|
1839
|
+
};
|
|
1447
1840
|
"SavedSpec": {
|
|
1448
1841
|
"spec_id": string;
|
|
1449
1842
|
"project_id": (string | null);
|
|
@@ -1709,6 +2102,16 @@ export interface Schemas {
|
|
|
1709
2102
|
"prior_knowledge_authority"?: false;
|
|
1710
2103
|
"modifies_typed_predicates"?: false;
|
|
1711
2104
|
};
|
|
2105
|
+
"TeachWebSource": {
|
|
2106
|
+
"url": string;
|
|
2107
|
+
"name": string;
|
|
2108
|
+
"name_column"?: string;
|
|
2109
|
+
"examples": Array<{
|
|
2110
|
+
[key: string]: string;
|
|
2111
|
+
}>;
|
|
2112
|
+
"exclude"?: Array<string>;
|
|
2113
|
+
"project_id"?: (string | null);
|
|
2114
|
+
};
|
|
1712
2115
|
"TranscriptSegment": {
|
|
1713
2116
|
"start": number;
|
|
1714
2117
|
"end": number;
|
|
@@ -1764,6 +2167,72 @@ export interface Schemas {
|
|
|
1764
2167
|
"expirationTime"?: ((number) | null);
|
|
1765
2168
|
"name": string;
|
|
1766
2169
|
};
|
|
2170
|
+
"WebSourceCell": {
|
|
2171
|
+
"source_url": string;
|
|
2172
|
+
"response_sha256": string;
|
|
2173
|
+
"pointer": string;
|
|
2174
|
+
"association": "anchor" | "same_element" | "within_record" | "positional_example";
|
|
2175
|
+
};
|
|
2176
|
+
"WebSourceExplanation": {
|
|
2177
|
+
"example_rows": number;
|
|
2178
|
+
"inferred_rows": number;
|
|
2179
|
+
"left_out"?: Array<string>;
|
|
2180
|
+
"fields": Array<Schemas["WebSourceFieldExplanation"]>;
|
|
2181
|
+
"on_change": string;
|
|
2182
|
+
"page_kept_until"?: (string | null);
|
|
2183
|
+
};
|
|
2184
|
+
"WebSourceFieldExplanation": {
|
|
2185
|
+
"column": string;
|
|
2186
|
+
"relationship": "anchor" | "same_element" | "within_record" | "positional_example";
|
|
2187
|
+
"how": string;
|
|
2188
|
+
"on_change": string;
|
|
2189
|
+
"pattern"?: string;
|
|
2190
|
+
"found"?: number;
|
|
2191
|
+
"missing"?: number;
|
|
2192
|
+
};
|
|
2193
|
+
"WebSourceInfo": {
|
|
2194
|
+
"source_id": string;
|
|
2195
|
+
"name": string;
|
|
2196
|
+
"source_url": string;
|
|
2197
|
+
"project_id"?: (string | null);
|
|
2198
|
+
"created_at": string;
|
|
2199
|
+
"reuse": "local_relationships" | "same_snapshot_only";
|
|
2200
|
+
"name_column": string;
|
|
2201
|
+
"headers": Array<string>;
|
|
2202
|
+
"fields"?: Array<Schemas["WebSourceFieldExplanation"]>;
|
|
2203
|
+
};
|
|
2204
|
+
"WebSourceList": {
|
|
2205
|
+
"sources": Array<Schemas["WebSourceInfo"]>;
|
|
2206
|
+
};
|
|
2207
|
+
"WebSourcePreview": {
|
|
2208
|
+
"source_id": string;
|
|
2209
|
+
"preview_id": string;
|
|
2210
|
+
"preview_hash": string;
|
|
2211
|
+
"name": string;
|
|
2212
|
+
"source_url": string;
|
|
2213
|
+
"source_sha256": string;
|
|
2214
|
+
"fetched_at": string;
|
|
2215
|
+
"headers": Array<string>;
|
|
2216
|
+
"name_column": string;
|
|
2217
|
+
"rows": Array<Schemas["WebSourceRow"]>;
|
|
2218
|
+
"count": number;
|
|
2219
|
+
"missing_cells": number;
|
|
2220
|
+
"reuse": "local_relationships" | "same_snapshot_only";
|
|
2221
|
+
"notice": string;
|
|
2222
|
+
"explanation"?: (Schemas["WebSourceExplanation"] | null);
|
|
2223
|
+
"qualification_authority"?: false;
|
|
2224
|
+
};
|
|
2225
|
+
"WebSourceRow": {
|
|
2226
|
+
"id": string;
|
|
2227
|
+
"provided": {
|
|
2228
|
+
[key: string]: (string | null);
|
|
2229
|
+
};
|
|
2230
|
+
"cells": {
|
|
2231
|
+
[key: string]: Schemas["WebSourceCell"];
|
|
2232
|
+
};
|
|
2233
|
+
"missing"?: Array<string>;
|
|
2234
|
+
"example"?: boolean;
|
|
2235
|
+
};
|
|
1767
2236
|
"WordedCondition": {
|
|
1768
2237
|
"condition_id": string;
|
|
1769
2238
|
"words": string;
|
|
@@ -1815,6 +2284,8 @@ export interface Schemas {
|
|
|
1815
2284
|
"source_snapshot_id"?: (string | null);
|
|
1816
2285
|
"find_id"?: (string | null);
|
|
1817
2286
|
"import_id"?: (string | null);
|
|
2287
|
+
"source_preview_id"?: (string | null);
|
|
2288
|
+
"source_program_id"?: (string | null);
|
|
1818
2289
|
"combined_id"?: (string | null);
|
|
1819
2290
|
"combined"?: boolean;
|
|
1820
2291
|
"immutable"?: boolean;
|
|
@@ -1964,6 +2435,23 @@ export interface Schemas {
|
|
|
1964
2435
|
"sourceCollectionId"?: (string | null);
|
|
1965
2436
|
"sourceRecordId"?: (string | null);
|
|
1966
2437
|
};
|
|
2438
|
+
"WorkspaceResearchInput": {
|
|
2439
|
+
"source_import_id": (string | null);
|
|
2440
|
+
"source_name"?: (string | null);
|
|
2441
|
+
"provenance"?: (string | null);
|
|
2442
|
+
"input_access"?: ("not_shared" | null);
|
|
2443
|
+
"rows": Array<Schemas["WorkspaceResearchInputRow"]>;
|
|
2444
|
+
};
|
|
2445
|
+
"WorkspaceResearchInputRow": {
|
|
2446
|
+
"id": string;
|
|
2447
|
+
"provided": {
|
|
2448
|
+
[key: string]: unknown;
|
|
2449
|
+
};
|
|
2450
|
+
"entity_id": (string | null);
|
|
2451
|
+
"status": "pending" | "verified" | "excluded" | "not_delivered" | "unresolved" | "unavailable";
|
|
2452
|
+
"resolution"?: (Schemas["InputIdentityResolution"] | null);
|
|
2453
|
+
"qualification_reason"?: (string | null);
|
|
2454
|
+
};
|
|
1967
2455
|
"WorkspaceSavedView": {
|
|
1968
2456
|
"id": string;
|
|
1969
2457
|
"name": string;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@specstream/sdk",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "TypeScript client for
|
|
3
|
+
"version": "1.1.1",
|
|
4
|
+
"description": "TypeScript client for building lead lists and company lists from the live web. Every match comes with its source, priced before it runs.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|