@signaliz/sdk 1.0.60 → 1.0.62
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/README.md +63 -15
- package/dist/{chunk-MFY4KSQ6.mjs → chunk-6G2FALRZ.mjs} +883 -107
- package/dist/index.d.mts +132 -11
- package/dist/index.d.ts +132 -11
- package/dist/index.js +883 -107
- package/dist/index.mjs +1 -1
- package/dist/mcp-config.js +883 -107
- package/dist/mcp-config.mjs +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -15,6 +15,34 @@ interface BatchOptions {
|
|
|
15
15
|
compactDuplicates?: boolean;
|
|
16
16
|
/** Return one no-spend plan for the full batch without provider calls or jobs. */
|
|
17
17
|
dryRun?: boolean;
|
|
18
|
+
/** Return a durable Company Signals or Signal to Copy job handle immediately. */
|
|
19
|
+
waitForResult?: boolean;
|
|
20
|
+
/** Maximum time to poll a durable job. Company/Copy jobs wait without a fixed deadline when omitted. */
|
|
21
|
+
maxWaitMs?: number;
|
|
22
|
+
/** Override the server-provided polling delay for a durable job. */
|
|
23
|
+
pollIntervalMs?: number;
|
|
24
|
+
}
|
|
25
|
+
interface CoreBatchResumeOptions {
|
|
26
|
+
/** Requested result page size. The server caps email/Company pages at 25 and Copy pages at 100. */
|
|
27
|
+
pageSize?: number;
|
|
28
|
+
/** Maximum time to wait for the existing job. Company/Copy jobs wait without a fixed deadline when omitted. */
|
|
29
|
+
maxWaitMs?: number;
|
|
30
|
+
/** Override the server-provided polling delay while the existing job is active. */
|
|
31
|
+
pollIntervalMs?: number;
|
|
32
|
+
/** Return duplicate successes as duplicateOf references. Defaults to false. */
|
|
33
|
+
compactDuplicates?: boolean;
|
|
34
|
+
/** Original submission key, retained in any timeout recovery metadata. */
|
|
35
|
+
idempotencyKey?: string;
|
|
36
|
+
}
|
|
37
|
+
type CoreEmailBatchResumeOptions = CoreBatchResumeOptions;
|
|
38
|
+
interface RecoverableBatchJob {
|
|
39
|
+
success: true;
|
|
40
|
+
status: 'queued' | 'processing' | 'completed' | 'partial' | 'failed';
|
|
41
|
+
capability: 'company_signals' | 'signal_to_copy';
|
|
42
|
+
jobId: string;
|
|
43
|
+
idempotencyKey: string;
|
|
44
|
+
total: number;
|
|
45
|
+
nextPollAfterSeconds?: number;
|
|
18
46
|
}
|
|
19
47
|
interface BatchItemResult<T> {
|
|
20
48
|
index: number;
|
|
@@ -27,6 +55,22 @@ interface BatchItemResult<T> {
|
|
|
27
55
|
retryEligible?: boolean;
|
|
28
56
|
/** Server-provided delay before retrying the failed row. */
|
|
29
57
|
retryAfterSeconds?: number;
|
|
58
|
+
/** Explicit recovery strategy. A fresh key can repeat provider work and is never automatic. */
|
|
59
|
+
retryStrategy?: 'new_idempotency_key';
|
|
60
|
+
/** Present only when the server proves the failed row consumed zero Signaliz credits. */
|
|
61
|
+
creditsUsed?: 0;
|
|
62
|
+
/** Present only when the server proves the failed row charged zero Signaliz credits. */
|
|
63
|
+
creditsCharged?: 0;
|
|
64
|
+
/** Existing provider run that can be resumed without dispatching new work. */
|
|
65
|
+
runId?: string;
|
|
66
|
+
/** Existing Verify Email run that can be resumed without dispatching new work. */
|
|
67
|
+
verificationRunId?: string;
|
|
68
|
+
/** Existing recoverable batch job. */
|
|
69
|
+
jobId?: string;
|
|
70
|
+
/** Machine-readable recovery action returned by Signaliz. */
|
|
71
|
+
suggestedAction?: string;
|
|
72
|
+
cachePublicationStatus?: 'completed' | 'pending' | 'pending_safe_retry' | 'superseded_by_newer_verdict';
|
|
73
|
+
cachePublicationRetryEligible?: boolean;
|
|
30
74
|
/** Zero-based input index containing the full result for this exact duplicate. */
|
|
31
75
|
duplicateOf?: number;
|
|
32
76
|
}
|
|
@@ -66,8 +110,7 @@ interface CoreProductDryRunResult {
|
|
|
66
110
|
sideEffects: unknown[];
|
|
67
111
|
raw: Record<string, unknown>;
|
|
68
112
|
}
|
|
69
|
-
interface
|
|
70
|
-
companyDomain: string;
|
|
113
|
+
interface FindEmailCommonParams {
|
|
71
114
|
fullName?: string;
|
|
72
115
|
firstName?: string;
|
|
73
116
|
lastName?: string;
|
|
@@ -80,6 +123,15 @@ interface FindEmailParams {
|
|
|
80
123
|
/** Stable retry key for recovering the same request after an ambiguous response. */
|
|
81
124
|
idempotencyKey?: string;
|
|
82
125
|
}
|
|
126
|
+
type FindEmailParams = FindEmailCommonParams & ({
|
|
127
|
+
companyDomain: string;
|
|
128
|
+
/** Omit for a new lookup. */
|
|
129
|
+
runId?: undefined;
|
|
130
|
+
} | {
|
|
131
|
+
/** Resume one existing Find Email run without dispatching a new finder. */
|
|
132
|
+
runId: string;
|
|
133
|
+
companyDomain?: string;
|
|
134
|
+
});
|
|
83
135
|
interface FindEmailResult {
|
|
84
136
|
success: boolean;
|
|
85
137
|
found: boolean;
|
|
@@ -88,17 +140,26 @@ interface FindEmailResult {
|
|
|
88
140
|
lastName?: string;
|
|
89
141
|
confidence: number;
|
|
90
142
|
verificationStatus: string;
|
|
143
|
+
deliverabilityStatus: string;
|
|
144
|
+
verificationVerdict: string;
|
|
91
145
|
isVerified: boolean;
|
|
92
146
|
isVerifiedForSending: boolean;
|
|
147
|
+
isDeliverable: boolean;
|
|
93
148
|
isCatchAll: boolean;
|
|
94
149
|
verificationFreshness: 'fresh' | 'stale' | 'unknown';
|
|
95
150
|
verificationAgeDays: number | null;
|
|
96
151
|
verifiedAt: string | null;
|
|
97
152
|
needsReverification: boolean;
|
|
98
153
|
providerUsed: string;
|
|
154
|
+
verificationSource: string;
|
|
155
|
+
/** ISO timestamp when the provider observed the winning verdict. */
|
|
156
|
+
verificationObservedAt?: string;
|
|
157
|
+
failureReason: string;
|
|
99
158
|
creditsUsed?: number;
|
|
100
159
|
estimatedExternalCostUsd?: number;
|
|
101
160
|
billingMetadata?: Record<string, unknown>;
|
|
161
|
+
/** Original provider-work billing receipt when this request only recovered a completed run. */
|
|
162
|
+
historicalBillingMetadata?: Record<string, unknown>;
|
|
102
163
|
resultReturnedFrom?: string;
|
|
103
164
|
cacheHit?: boolean;
|
|
104
165
|
/** True when a definitive no-email result came from the short-lived negative cache. */
|
|
@@ -112,6 +173,14 @@ interface FindEmailResult {
|
|
|
112
173
|
byoOpenrouterUsed?: boolean;
|
|
113
174
|
error?: string;
|
|
114
175
|
errorCode?: string;
|
|
176
|
+
/** Processing while an existing provider run is still active; otherwise completed. */
|
|
177
|
+
status?: 'processing' | 'completed';
|
|
178
|
+
/** Durable Find Email run ID for polling without duplicate spend. */
|
|
179
|
+
runId?: string;
|
|
180
|
+
nextPollAfterSeconds?: number;
|
|
181
|
+
suggestedAction?: string;
|
|
182
|
+
cachePublicationStatus?: 'completed' | 'pending' | 'pending_safe_retry' | 'superseded_by_newer_verdict';
|
|
183
|
+
cachePublicationRetryEligible?: boolean;
|
|
115
184
|
raw: Record<string, unknown>;
|
|
116
185
|
}
|
|
117
186
|
interface VerifyEmailResult {
|
|
@@ -132,13 +201,25 @@ interface VerifyEmailResult {
|
|
|
132
201
|
isCatchAll: boolean;
|
|
133
202
|
/** Explicit send-safety verdict. Missing or false never becomes true by inference. */
|
|
134
203
|
verifiedForSending: boolean;
|
|
204
|
+
verificationStatus?: string;
|
|
205
|
+
deliverabilityStatus?: string;
|
|
135
206
|
verificationVerdict: string;
|
|
207
|
+
isRoleAccount?: boolean;
|
|
208
|
+
quality?: string | null;
|
|
209
|
+
recommendation?: string;
|
|
210
|
+
smtpStatus?: string;
|
|
211
|
+
providerStatus?: string;
|
|
212
|
+
failureReason?: string;
|
|
136
213
|
confidenceScore: number;
|
|
137
214
|
provider?: string;
|
|
138
215
|
verificationSource?: string;
|
|
216
|
+
/** ISO timestamp when the provider observed the winning verdict. */
|
|
217
|
+
verificationObservedAt?: string;
|
|
139
218
|
billingReplayed?: boolean;
|
|
140
219
|
creditsUsed?: number;
|
|
141
220
|
billingMetadata?: Record<string, unknown>;
|
|
221
|
+
/** Original provider-work billing receipt when this request only recovered a completed run. */
|
|
222
|
+
historicalBillingMetadata?: Record<string, unknown>;
|
|
142
223
|
resultReturnedFrom?: string;
|
|
143
224
|
cacheHit?: boolean;
|
|
144
225
|
/** True when a conclusive send-blocking verdict came from the short-lived rejection cache. */
|
|
@@ -150,6 +231,13 @@ interface VerifyEmailResult {
|
|
|
150
231
|
liveProviderCalled?: boolean;
|
|
151
232
|
openrouterCalled?: boolean;
|
|
152
233
|
byoOpenrouterUsed?: boolean;
|
|
234
|
+
estimatedExternalCostUsd?: number;
|
|
235
|
+
/** Canonical run ID alias returned alongside verificationRunId when available. */
|
|
236
|
+
runId?: string;
|
|
237
|
+
/** Whether the billed terminal verdict was durably published for Find Email reuse. */
|
|
238
|
+
cachePublicationStatus?: 'completed' | 'pending' | 'pending_safe_retry' | 'superseded_by_newer_verdict';
|
|
239
|
+
cachePublicationRetryEligible?: boolean;
|
|
240
|
+
suggestedAction?: string;
|
|
153
241
|
raw: Record<string, unknown>;
|
|
154
242
|
}
|
|
155
243
|
interface VerifyEmailOptions {
|
|
@@ -170,6 +258,13 @@ interface VerifyEmailOptions {
|
|
|
170
258
|
}
|
|
171
259
|
interface VerifyEmailBatchOptions extends BatchOptions, VerifyEmailOptions {
|
|
172
260
|
}
|
|
261
|
+
interface VerifyEmailBatchInput {
|
|
262
|
+
email: string;
|
|
263
|
+
/** Override the batch-level cache policy for this address. */
|
|
264
|
+
skipCache?: boolean;
|
|
265
|
+
/** Stable retry key scoped to this address. */
|
|
266
|
+
idempotencyKey?: string;
|
|
267
|
+
}
|
|
173
268
|
interface CompanySignalEnrichmentParams {
|
|
174
269
|
/** Resume an existing enrichment without creating another provider run. */
|
|
175
270
|
signalRunId?: string;
|
|
@@ -189,11 +284,11 @@ interface CompanySignalEnrichmentParams {
|
|
|
189
284
|
skipCache?: boolean;
|
|
190
285
|
/** Include all evaluated evidence candidates, including rejected diagnostics. Defaults to selected-signal evidence only. */
|
|
191
286
|
includeCandidateEvidence?: boolean;
|
|
192
|
-
/** @deprecated Company
|
|
287
|
+
/** @deprecated Single Company Signal calls are synchronous; batch recovery is managed automatically. */
|
|
193
288
|
waitForResult?: boolean;
|
|
194
289
|
/** Maximum server-side synchronous execution window. */
|
|
195
290
|
maxWaitMs?: number;
|
|
196
|
-
/** @deprecated Company
|
|
291
|
+
/** @deprecated Company Signal batch polling is managed automatically. */
|
|
197
292
|
pollIntervalMs?: number;
|
|
198
293
|
/** Return a no-spend plan without provider calls or jobs. */
|
|
199
294
|
dryRun?: boolean;
|
|
@@ -250,8 +345,10 @@ interface CompanySignalEnrichmentResult {
|
|
|
250
345
|
type SignalDiscoverySource = 'web' | 'news';
|
|
251
346
|
type SignalDiscoveryStatus = 'planned' | 'queued' | 'processing' | 'completed' | 'completed_with_warnings' | 'failed';
|
|
252
347
|
interface SignalDiscoveryParams {
|
|
253
|
-
/**
|
|
348
|
+
/** Any natural-language signal question. Required for a new search. */
|
|
254
349
|
query?: string;
|
|
350
|
+
/** Optional natural-language ICP, product, or pain context that returned signals must support. */
|
|
351
|
+
icpContext?: string;
|
|
255
352
|
/** Number of qualified company signals requested. Defaults to 100; allowed range is 1-1,000. */
|
|
256
353
|
limit?: number;
|
|
257
354
|
/** Restrict discovery to selected source families. */
|
|
@@ -300,7 +397,13 @@ interface SignalDiscoveryCostGuardrail {
|
|
|
300
397
|
maxSourceCostUsd?: number | null;
|
|
301
398
|
projectedCostPerRequestedCompanySignalUsd?: number | null;
|
|
302
399
|
sourceCostUsd?: number | null;
|
|
303
|
-
costSource?: 'observed' | 'catalog_bounded' | 'mixed' | 'unavailable';
|
|
400
|
+
costSource?: 'observed' | 'catalog_preflight' | 'catalog_bounded' | 'mixed' | 'unavailable';
|
|
401
|
+
/** Separately reported company identity-resolution cost; null when receipts are incomplete. */
|
|
402
|
+
identityResolutionCostUsd?: number | null;
|
|
403
|
+
/** Evidence used to account for company identity-resolution cost. */
|
|
404
|
+
identityCostSource?: 'observed_zero_credit_receipts' | 'contractual_zero_cost' | 'not_used' | 'unavailable';
|
|
405
|
+
/** Zero-cost fallback identity-provider requests covered by identityResolutionCostUsd. */
|
|
406
|
+
identityProviderRequests?: number;
|
|
304
407
|
qualifiedCompanySignalCount?: number;
|
|
305
408
|
returnedCompanySignalCount?: number;
|
|
306
409
|
/** Qualified signals retained on the same search run for later expansion. */
|
|
@@ -326,6 +429,10 @@ interface SignalDiscoveryResult {
|
|
|
326
429
|
availableCompanySignalCount?: number;
|
|
327
430
|
sourceLanes?: string[];
|
|
328
431
|
evidenceValidation?: Record<string, unknown>;
|
|
432
|
+
/** Search, reachability, date, classifier, and rejection counts for diagnosis. */
|
|
433
|
+
discoveryDiagnostics?: Record<string, unknown>;
|
|
434
|
+
/** Company-domain verification counts for the retained cohort. */
|
|
435
|
+
identityResolution?: Record<string, unknown>;
|
|
329
436
|
costGuardrail?: SignalDiscoveryCostGuardrail;
|
|
330
437
|
warnings?: string[];
|
|
331
438
|
raw: Record<string, unknown>;
|
|
@@ -336,15 +443,17 @@ interface SignalToCopyParams {
|
|
|
336
443
|
title?: string;
|
|
337
444
|
campaignOffer?: string;
|
|
338
445
|
researchPrompt?: string;
|
|
446
|
+
/** Maximum signal age used for cache reuse and fresh research. Defaults to 90 days. */
|
|
447
|
+
lookbackDays?: number;
|
|
339
448
|
signalRunId?: string;
|
|
340
449
|
/** Bypass cached company signals and start fresh research. */
|
|
341
450
|
skipCache?: boolean;
|
|
342
451
|
/** Use the full deep-research provider portfolio. The default uses bounded credit-free first-party and Bing grounding. */
|
|
343
452
|
enableDeepSearch?: boolean;
|
|
344
|
-
/** @deprecated Signal to Copy
|
|
453
|
+
/** @deprecated Single Signal to Copy calls are synchronous; batch recovery is managed automatically. */
|
|
345
454
|
waitForResult?: boolean;
|
|
346
455
|
maxWaitMs?: number;
|
|
347
|
-
/** @deprecated Signal
|
|
456
|
+
/** @deprecated Signal Copy batch polling is managed automatically. */
|
|
348
457
|
pollIntervalMs?: number;
|
|
349
458
|
/** Return a no-spend plan without provider calls or jobs. */
|
|
350
459
|
dryRun?: boolean;
|
|
@@ -420,14 +529,16 @@ declare class Signaliz {
|
|
|
420
529
|
dryRun: true;
|
|
421
530
|
}): Promise<CoreProductDryRunResult>;
|
|
422
531
|
findEmails(params: FindEmailParams[], options?: BatchOptions): Promise<BatchResult<FindEmailResult>>;
|
|
532
|
+
resumeFindEmailBatch(jobId: string, options?: CoreEmailBatchResumeOptions): Promise<BatchResult<FindEmailResult>>;
|
|
423
533
|
verifyEmail(email: string | undefined, options: VerifyEmailOptions & {
|
|
424
534
|
dryRun: true;
|
|
425
535
|
}): Promise<CoreProductDryRunResult>;
|
|
426
536
|
verifyEmail(email: string | undefined, options?: VerifyEmailOptions): Promise<VerifyEmailResult>;
|
|
427
|
-
verifyEmails(emails: string
|
|
537
|
+
verifyEmails(emails: Array<string | VerifyEmailBatchInput>, options: VerifyEmailBatchOptions & {
|
|
428
538
|
dryRun: true;
|
|
429
539
|
}): Promise<CoreProductDryRunResult>;
|
|
430
|
-
verifyEmails(emails: string
|
|
540
|
+
verifyEmails(emails: Array<string | VerifyEmailBatchInput>, options?: VerifyEmailBatchOptions): Promise<BatchResult<VerifyEmailResult>>;
|
|
541
|
+
resumeVerifyEmailBatch(jobId: string, options?: CoreEmailBatchResumeOptions): Promise<BatchResult<VerifyEmailResult>>;
|
|
431
542
|
enrichCompanySignals(params: CompanySignalEnrichmentParams & {
|
|
432
543
|
dryRun: true;
|
|
433
544
|
}): Promise<CoreProductDryRunResult>;
|
|
@@ -436,7 +547,11 @@ declare class Signaliz {
|
|
|
436
547
|
enrichCompanies(companies: CompanySignalEnrichmentParams[], options: BatchOptions & {
|
|
437
548
|
dryRun: true;
|
|
438
549
|
}): Promise<CoreProductDryRunResult>;
|
|
550
|
+
enrichCompanies(companies: CompanySignalEnrichmentParams[], options: BatchOptions & {
|
|
551
|
+
waitForResult: false;
|
|
552
|
+
}): Promise<RecoverableBatchJob>;
|
|
439
553
|
enrichCompanies(companies: CompanySignalEnrichmentParams[], options?: BatchOptions): Promise<BatchResult<CompanySignalEnrichmentResult>>;
|
|
554
|
+
resumeCompanySignalBatch(jobId: string, options?: CoreBatchResumeOptions): Promise<BatchResult<CompanySignalEnrichmentResult>>;
|
|
440
555
|
signalToCopy(params: SignalToCopyParams & {
|
|
441
556
|
dryRun: true;
|
|
442
557
|
}): Promise<CoreProductDryRunResult>;
|
|
@@ -444,14 +559,20 @@ declare class Signaliz {
|
|
|
444
559
|
createSignalCopyBatch(requests: SignalToCopyParams[], options: BatchOptions & {
|
|
445
560
|
dryRun: true;
|
|
446
561
|
}): Promise<CoreProductDryRunResult>;
|
|
562
|
+
createSignalCopyBatch(requests: SignalToCopyParams[], options: BatchOptions & {
|
|
563
|
+
waitForResult: false;
|
|
564
|
+
}): Promise<RecoverableBatchJob>;
|
|
447
565
|
createSignalCopyBatch(requests: SignalToCopyParams[], options?: BatchOptions): Promise<BatchResult<SignalToCopyResult>>;
|
|
566
|
+
resumeSignalCopyBatch(jobId: string, options?: CoreBatchResumeOptions): Promise<BatchResult<SignalToCopyResult>>;
|
|
448
567
|
private runCoreProductDryRun;
|
|
449
568
|
private runSignalCopyBatchChunks;
|
|
450
569
|
private runRecoverableCoreBatchJob;
|
|
570
|
+
private submitRecoverableCoreBatchJob;
|
|
571
|
+
private readRecoverableCoreBatchJob;
|
|
451
572
|
private runSignalCopyBatchChunk;
|
|
452
573
|
private runCoreBatchRound;
|
|
453
574
|
listTools(): Promise<MCPToolInfo[]>;
|
|
454
575
|
health(): Promise<PlatformHealth>;
|
|
455
576
|
}
|
|
456
577
|
|
|
457
|
-
export { type BatchItemResult, type BatchOptions, type BatchResult, type CompanySignal, type CompanySignalEnrichmentParams, type CompanySignalEnrichmentResult, type ErrorType, type FindEmailParams, type FindEmailResult, type MCPToolInfo, type PlatformHealth, type SignalDiscoveryParams, type SignalDiscoveryResult, type SignalDiscoverySignal, type SignalDiscoverySource, type SignalDiscoveryStatus, type SignalToCopyParams, type SignalToCopyResult, type SignalToCopyVariation, Signaliz, type SignalizConfig, SignalizError, type SignalizErrorData, type VerifyEmailBatchOptions, type VerifyEmailOptions, type VerifyEmailResult };
|
|
578
|
+
export { type BatchItemResult, type BatchOptions, type BatchResult, type CompanySignal, type CompanySignalEnrichmentParams, type CompanySignalEnrichmentResult, type CoreBatchResumeOptions, type CoreEmailBatchResumeOptions, type ErrorType, type FindEmailParams, type FindEmailResult, type MCPToolInfo, type PlatformHealth, type RecoverableBatchJob, type SignalDiscoveryParams, type SignalDiscoveryResult, type SignalDiscoverySignal, type SignalDiscoverySource, type SignalDiscoveryStatus, type SignalToCopyParams, type SignalToCopyResult, type SignalToCopyVariation, Signaliz, type SignalizConfig, SignalizError, type SignalizErrorData, type VerifyEmailBatchInput, type VerifyEmailBatchOptions, type VerifyEmailOptions, type VerifyEmailResult };
|
package/dist/index.d.ts
CHANGED
|
@@ -15,6 +15,34 @@ interface BatchOptions {
|
|
|
15
15
|
compactDuplicates?: boolean;
|
|
16
16
|
/** Return one no-spend plan for the full batch without provider calls or jobs. */
|
|
17
17
|
dryRun?: boolean;
|
|
18
|
+
/** Return a durable Company Signals or Signal to Copy job handle immediately. */
|
|
19
|
+
waitForResult?: boolean;
|
|
20
|
+
/** Maximum time to poll a durable job. Company/Copy jobs wait without a fixed deadline when omitted. */
|
|
21
|
+
maxWaitMs?: number;
|
|
22
|
+
/** Override the server-provided polling delay for a durable job. */
|
|
23
|
+
pollIntervalMs?: number;
|
|
24
|
+
}
|
|
25
|
+
interface CoreBatchResumeOptions {
|
|
26
|
+
/** Requested result page size. The server caps email/Company pages at 25 and Copy pages at 100. */
|
|
27
|
+
pageSize?: number;
|
|
28
|
+
/** Maximum time to wait for the existing job. Company/Copy jobs wait without a fixed deadline when omitted. */
|
|
29
|
+
maxWaitMs?: number;
|
|
30
|
+
/** Override the server-provided polling delay while the existing job is active. */
|
|
31
|
+
pollIntervalMs?: number;
|
|
32
|
+
/** Return duplicate successes as duplicateOf references. Defaults to false. */
|
|
33
|
+
compactDuplicates?: boolean;
|
|
34
|
+
/** Original submission key, retained in any timeout recovery metadata. */
|
|
35
|
+
idempotencyKey?: string;
|
|
36
|
+
}
|
|
37
|
+
type CoreEmailBatchResumeOptions = CoreBatchResumeOptions;
|
|
38
|
+
interface RecoverableBatchJob {
|
|
39
|
+
success: true;
|
|
40
|
+
status: 'queued' | 'processing' | 'completed' | 'partial' | 'failed';
|
|
41
|
+
capability: 'company_signals' | 'signal_to_copy';
|
|
42
|
+
jobId: string;
|
|
43
|
+
idempotencyKey: string;
|
|
44
|
+
total: number;
|
|
45
|
+
nextPollAfterSeconds?: number;
|
|
18
46
|
}
|
|
19
47
|
interface BatchItemResult<T> {
|
|
20
48
|
index: number;
|
|
@@ -27,6 +55,22 @@ interface BatchItemResult<T> {
|
|
|
27
55
|
retryEligible?: boolean;
|
|
28
56
|
/** Server-provided delay before retrying the failed row. */
|
|
29
57
|
retryAfterSeconds?: number;
|
|
58
|
+
/** Explicit recovery strategy. A fresh key can repeat provider work and is never automatic. */
|
|
59
|
+
retryStrategy?: 'new_idempotency_key';
|
|
60
|
+
/** Present only when the server proves the failed row consumed zero Signaliz credits. */
|
|
61
|
+
creditsUsed?: 0;
|
|
62
|
+
/** Present only when the server proves the failed row charged zero Signaliz credits. */
|
|
63
|
+
creditsCharged?: 0;
|
|
64
|
+
/** Existing provider run that can be resumed without dispatching new work. */
|
|
65
|
+
runId?: string;
|
|
66
|
+
/** Existing Verify Email run that can be resumed without dispatching new work. */
|
|
67
|
+
verificationRunId?: string;
|
|
68
|
+
/** Existing recoverable batch job. */
|
|
69
|
+
jobId?: string;
|
|
70
|
+
/** Machine-readable recovery action returned by Signaliz. */
|
|
71
|
+
suggestedAction?: string;
|
|
72
|
+
cachePublicationStatus?: 'completed' | 'pending' | 'pending_safe_retry' | 'superseded_by_newer_verdict';
|
|
73
|
+
cachePublicationRetryEligible?: boolean;
|
|
30
74
|
/** Zero-based input index containing the full result for this exact duplicate. */
|
|
31
75
|
duplicateOf?: number;
|
|
32
76
|
}
|
|
@@ -66,8 +110,7 @@ interface CoreProductDryRunResult {
|
|
|
66
110
|
sideEffects: unknown[];
|
|
67
111
|
raw: Record<string, unknown>;
|
|
68
112
|
}
|
|
69
|
-
interface
|
|
70
|
-
companyDomain: string;
|
|
113
|
+
interface FindEmailCommonParams {
|
|
71
114
|
fullName?: string;
|
|
72
115
|
firstName?: string;
|
|
73
116
|
lastName?: string;
|
|
@@ -80,6 +123,15 @@ interface FindEmailParams {
|
|
|
80
123
|
/** Stable retry key for recovering the same request after an ambiguous response. */
|
|
81
124
|
idempotencyKey?: string;
|
|
82
125
|
}
|
|
126
|
+
type FindEmailParams = FindEmailCommonParams & ({
|
|
127
|
+
companyDomain: string;
|
|
128
|
+
/** Omit for a new lookup. */
|
|
129
|
+
runId?: undefined;
|
|
130
|
+
} | {
|
|
131
|
+
/** Resume one existing Find Email run without dispatching a new finder. */
|
|
132
|
+
runId: string;
|
|
133
|
+
companyDomain?: string;
|
|
134
|
+
});
|
|
83
135
|
interface FindEmailResult {
|
|
84
136
|
success: boolean;
|
|
85
137
|
found: boolean;
|
|
@@ -88,17 +140,26 @@ interface FindEmailResult {
|
|
|
88
140
|
lastName?: string;
|
|
89
141
|
confidence: number;
|
|
90
142
|
verificationStatus: string;
|
|
143
|
+
deliverabilityStatus: string;
|
|
144
|
+
verificationVerdict: string;
|
|
91
145
|
isVerified: boolean;
|
|
92
146
|
isVerifiedForSending: boolean;
|
|
147
|
+
isDeliverable: boolean;
|
|
93
148
|
isCatchAll: boolean;
|
|
94
149
|
verificationFreshness: 'fresh' | 'stale' | 'unknown';
|
|
95
150
|
verificationAgeDays: number | null;
|
|
96
151
|
verifiedAt: string | null;
|
|
97
152
|
needsReverification: boolean;
|
|
98
153
|
providerUsed: string;
|
|
154
|
+
verificationSource: string;
|
|
155
|
+
/** ISO timestamp when the provider observed the winning verdict. */
|
|
156
|
+
verificationObservedAt?: string;
|
|
157
|
+
failureReason: string;
|
|
99
158
|
creditsUsed?: number;
|
|
100
159
|
estimatedExternalCostUsd?: number;
|
|
101
160
|
billingMetadata?: Record<string, unknown>;
|
|
161
|
+
/** Original provider-work billing receipt when this request only recovered a completed run. */
|
|
162
|
+
historicalBillingMetadata?: Record<string, unknown>;
|
|
102
163
|
resultReturnedFrom?: string;
|
|
103
164
|
cacheHit?: boolean;
|
|
104
165
|
/** True when a definitive no-email result came from the short-lived negative cache. */
|
|
@@ -112,6 +173,14 @@ interface FindEmailResult {
|
|
|
112
173
|
byoOpenrouterUsed?: boolean;
|
|
113
174
|
error?: string;
|
|
114
175
|
errorCode?: string;
|
|
176
|
+
/** Processing while an existing provider run is still active; otherwise completed. */
|
|
177
|
+
status?: 'processing' | 'completed';
|
|
178
|
+
/** Durable Find Email run ID for polling without duplicate spend. */
|
|
179
|
+
runId?: string;
|
|
180
|
+
nextPollAfterSeconds?: number;
|
|
181
|
+
suggestedAction?: string;
|
|
182
|
+
cachePublicationStatus?: 'completed' | 'pending' | 'pending_safe_retry' | 'superseded_by_newer_verdict';
|
|
183
|
+
cachePublicationRetryEligible?: boolean;
|
|
115
184
|
raw: Record<string, unknown>;
|
|
116
185
|
}
|
|
117
186
|
interface VerifyEmailResult {
|
|
@@ -132,13 +201,25 @@ interface VerifyEmailResult {
|
|
|
132
201
|
isCatchAll: boolean;
|
|
133
202
|
/** Explicit send-safety verdict. Missing or false never becomes true by inference. */
|
|
134
203
|
verifiedForSending: boolean;
|
|
204
|
+
verificationStatus?: string;
|
|
205
|
+
deliverabilityStatus?: string;
|
|
135
206
|
verificationVerdict: string;
|
|
207
|
+
isRoleAccount?: boolean;
|
|
208
|
+
quality?: string | null;
|
|
209
|
+
recommendation?: string;
|
|
210
|
+
smtpStatus?: string;
|
|
211
|
+
providerStatus?: string;
|
|
212
|
+
failureReason?: string;
|
|
136
213
|
confidenceScore: number;
|
|
137
214
|
provider?: string;
|
|
138
215
|
verificationSource?: string;
|
|
216
|
+
/** ISO timestamp when the provider observed the winning verdict. */
|
|
217
|
+
verificationObservedAt?: string;
|
|
139
218
|
billingReplayed?: boolean;
|
|
140
219
|
creditsUsed?: number;
|
|
141
220
|
billingMetadata?: Record<string, unknown>;
|
|
221
|
+
/** Original provider-work billing receipt when this request only recovered a completed run. */
|
|
222
|
+
historicalBillingMetadata?: Record<string, unknown>;
|
|
142
223
|
resultReturnedFrom?: string;
|
|
143
224
|
cacheHit?: boolean;
|
|
144
225
|
/** True when a conclusive send-blocking verdict came from the short-lived rejection cache. */
|
|
@@ -150,6 +231,13 @@ interface VerifyEmailResult {
|
|
|
150
231
|
liveProviderCalled?: boolean;
|
|
151
232
|
openrouterCalled?: boolean;
|
|
152
233
|
byoOpenrouterUsed?: boolean;
|
|
234
|
+
estimatedExternalCostUsd?: number;
|
|
235
|
+
/** Canonical run ID alias returned alongside verificationRunId when available. */
|
|
236
|
+
runId?: string;
|
|
237
|
+
/** Whether the billed terminal verdict was durably published for Find Email reuse. */
|
|
238
|
+
cachePublicationStatus?: 'completed' | 'pending' | 'pending_safe_retry' | 'superseded_by_newer_verdict';
|
|
239
|
+
cachePublicationRetryEligible?: boolean;
|
|
240
|
+
suggestedAction?: string;
|
|
153
241
|
raw: Record<string, unknown>;
|
|
154
242
|
}
|
|
155
243
|
interface VerifyEmailOptions {
|
|
@@ -170,6 +258,13 @@ interface VerifyEmailOptions {
|
|
|
170
258
|
}
|
|
171
259
|
interface VerifyEmailBatchOptions extends BatchOptions, VerifyEmailOptions {
|
|
172
260
|
}
|
|
261
|
+
interface VerifyEmailBatchInput {
|
|
262
|
+
email: string;
|
|
263
|
+
/** Override the batch-level cache policy for this address. */
|
|
264
|
+
skipCache?: boolean;
|
|
265
|
+
/** Stable retry key scoped to this address. */
|
|
266
|
+
idempotencyKey?: string;
|
|
267
|
+
}
|
|
173
268
|
interface CompanySignalEnrichmentParams {
|
|
174
269
|
/** Resume an existing enrichment without creating another provider run. */
|
|
175
270
|
signalRunId?: string;
|
|
@@ -189,11 +284,11 @@ interface CompanySignalEnrichmentParams {
|
|
|
189
284
|
skipCache?: boolean;
|
|
190
285
|
/** Include all evaluated evidence candidates, including rejected diagnostics. Defaults to selected-signal evidence only. */
|
|
191
286
|
includeCandidateEvidence?: boolean;
|
|
192
|
-
/** @deprecated Company
|
|
287
|
+
/** @deprecated Single Company Signal calls are synchronous; batch recovery is managed automatically. */
|
|
193
288
|
waitForResult?: boolean;
|
|
194
289
|
/** Maximum server-side synchronous execution window. */
|
|
195
290
|
maxWaitMs?: number;
|
|
196
|
-
/** @deprecated Company
|
|
291
|
+
/** @deprecated Company Signal batch polling is managed automatically. */
|
|
197
292
|
pollIntervalMs?: number;
|
|
198
293
|
/** Return a no-spend plan without provider calls or jobs. */
|
|
199
294
|
dryRun?: boolean;
|
|
@@ -250,8 +345,10 @@ interface CompanySignalEnrichmentResult {
|
|
|
250
345
|
type SignalDiscoverySource = 'web' | 'news';
|
|
251
346
|
type SignalDiscoveryStatus = 'planned' | 'queued' | 'processing' | 'completed' | 'completed_with_warnings' | 'failed';
|
|
252
347
|
interface SignalDiscoveryParams {
|
|
253
|
-
/**
|
|
348
|
+
/** Any natural-language signal question. Required for a new search. */
|
|
254
349
|
query?: string;
|
|
350
|
+
/** Optional natural-language ICP, product, or pain context that returned signals must support. */
|
|
351
|
+
icpContext?: string;
|
|
255
352
|
/** Number of qualified company signals requested. Defaults to 100; allowed range is 1-1,000. */
|
|
256
353
|
limit?: number;
|
|
257
354
|
/** Restrict discovery to selected source families. */
|
|
@@ -300,7 +397,13 @@ interface SignalDiscoveryCostGuardrail {
|
|
|
300
397
|
maxSourceCostUsd?: number | null;
|
|
301
398
|
projectedCostPerRequestedCompanySignalUsd?: number | null;
|
|
302
399
|
sourceCostUsd?: number | null;
|
|
303
|
-
costSource?: 'observed' | 'catalog_bounded' | 'mixed' | 'unavailable';
|
|
400
|
+
costSource?: 'observed' | 'catalog_preflight' | 'catalog_bounded' | 'mixed' | 'unavailable';
|
|
401
|
+
/** Separately reported company identity-resolution cost; null when receipts are incomplete. */
|
|
402
|
+
identityResolutionCostUsd?: number | null;
|
|
403
|
+
/** Evidence used to account for company identity-resolution cost. */
|
|
404
|
+
identityCostSource?: 'observed_zero_credit_receipts' | 'contractual_zero_cost' | 'not_used' | 'unavailable';
|
|
405
|
+
/** Zero-cost fallback identity-provider requests covered by identityResolutionCostUsd. */
|
|
406
|
+
identityProviderRequests?: number;
|
|
304
407
|
qualifiedCompanySignalCount?: number;
|
|
305
408
|
returnedCompanySignalCount?: number;
|
|
306
409
|
/** Qualified signals retained on the same search run for later expansion. */
|
|
@@ -326,6 +429,10 @@ interface SignalDiscoveryResult {
|
|
|
326
429
|
availableCompanySignalCount?: number;
|
|
327
430
|
sourceLanes?: string[];
|
|
328
431
|
evidenceValidation?: Record<string, unknown>;
|
|
432
|
+
/** Search, reachability, date, classifier, and rejection counts for diagnosis. */
|
|
433
|
+
discoveryDiagnostics?: Record<string, unknown>;
|
|
434
|
+
/** Company-domain verification counts for the retained cohort. */
|
|
435
|
+
identityResolution?: Record<string, unknown>;
|
|
329
436
|
costGuardrail?: SignalDiscoveryCostGuardrail;
|
|
330
437
|
warnings?: string[];
|
|
331
438
|
raw: Record<string, unknown>;
|
|
@@ -336,15 +443,17 @@ interface SignalToCopyParams {
|
|
|
336
443
|
title?: string;
|
|
337
444
|
campaignOffer?: string;
|
|
338
445
|
researchPrompt?: string;
|
|
446
|
+
/** Maximum signal age used for cache reuse and fresh research. Defaults to 90 days. */
|
|
447
|
+
lookbackDays?: number;
|
|
339
448
|
signalRunId?: string;
|
|
340
449
|
/** Bypass cached company signals and start fresh research. */
|
|
341
450
|
skipCache?: boolean;
|
|
342
451
|
/** Use the full deep-research provider portfolio. The default uses bounded credit-free first-party and Bing grounding. */
|
|
343
452
|
enableDeepSearch?: boolean;
|
|
344
|
-
/** @deprecated Signal to Copy
|
|
453
|
+
/** @deprecated Single Signal to Copy calls are synchronous; batch recovery is managed automatically. */
|
|
345
454
|
waitForResult?: boolean;
|
|
346
455
|
maxWaitMs?: number;
|
|
347
|
-
/** @deprecated Signal
|
|
456
|
+
/** @deprecated Signal Copy batch polling is managed automatically. */
|
|
348
457
|
pollIntervalMs?: number;
|
|
349
458
|
/** Return a no-spend plan without provider calls or jobs. */
|
|
350
459
|
dryRun?: boolean;
|
|
@@ -420,14 +529,16 @@ declare class Signaliz {
|
|
|
420
529
|
dryRun: true;
|
|
421
530
|
}): Promise<CoreProductDryRunResult>;
|
|
422
531
|
findEmails(params: FindEmailParams[], options?: BatchOptions): Promise<BatchResult<FindEmailResult>>;
|
|
532
|
+
resumeFindEmailBatch(jobId: string, options?: CoreEmailBatchResumeOptions): Promise<BatchResult<FindEmailResult>>;
|
|
423
533
|
verifyEmail(email: string | undefined, options: VerifyEmailOptions & {
|
|
424
534
|
dryRun: true;
|
|
425
535
|
}): Promise<CoreProductDryRunResult>;
|
|
426
536
|
verifyEmail(email: string | undefined, options?: VerifyEmailOptions): Promise<VerifyEmailResult>;
|
|
427
|
-
verifyEmails(emails: string
|
|
537
|
+
verifyEmails(emails: Array<string | VerifyEmailBatchInput>, options: VerifyEmailBatchOptions & {
|
|
428
538
|
dryRun: true;
|
|
429
539
|
}): Promise<CoreProductDryRunResult>;
|
|
430
|
-
verifyEmails(emails: string
|
|
540
|
+
verifyEmails(emails: Array<string | VerifyEmailBatchInput>, options?: VerifyEmailBatchOptions): Promise<BatchResult<VerifyEmailResult>>;
|
|
541
|
+
resumeVerifyEmailBatch(jobId: string, options?: CoreEmailBatchResumeOptions): Promise<BatchResult<VerifyEmailResult>>;
|
|
431
542
|
enrichCompanySignals(params: CompanySignalEnrichmentParams & {
|
|
432
543
|
dryRun: true;
|
|
433
544
|
}): Promise<CoreProductDryRunResult>;
|
|
@@ -436,7 +547,11 @@ declare class Signaliz {
|
|
|
436
547
|
enrichCompanies(companies: CompanySignalEnrichmentParams[], options: BatchOptions & {
|
|
437
548
|
dryRun: true;
|
|
438
549
|
}): Promise<CoreProductDryRunResult>;
|
|
550
|
+
enrichCompanies(companies: CompanySignalEnrichmentParams[], options: BatchOptions & {
|
|
551
|
+
waitForResult: false;
|
|
552
|
+
}): Promise<RecoverableBatchJob>;
|
|
439
553
|
enrichCompanies(companies: CompanySignalEnrichmentParams[], options?: BatchOptions): Promise<BatchResult<CompanySignalEnrichmentResult>>;
|
|
554
|
+
resumeCompanySignalBatch(jobId: string, options?: CoreBatchResumeOptions): Promise<BatchResult<CompanySignalEnrichmentResult>>;
|
|
440
555
|
signalToCopy(params: SignalToCopyParams & {
|
|
441
556
|
dryRun: true;
|
|
442
557
|
}): Promise<CoreProductDryRunResult>;
|
|
@@ -444,14 +559,20 @@ declare class Signaliz {
|
|
|
444
559
|
createSignalCopyBatch(requests: SignalToCopyParams[], options: BatchOptions & {
|
|
445
560
|
dryRun: true;
|
|
446
561
|
}): Promise<CoreProductDryRunResult>;
|
|
562
|
+
createSignalCopyBatch(requests: SignalToCopyParams[], options: BatchOptions & {
|
|
563
|
+
waitForResult: false;
|
|
564
|
+
}): Promise<RecoverableBatchJob>;
|
|
447
565
|
createSignalCopyBatch(requests: SignalToCopyParams[], options?: BatchOptions): Promise<BatchResult<SignalToCopyResult>>;
|
|
566
|
+
resumeSignalCopyBatch(jobId: string, options?: CoreBatchResumeOptions): Promise<BatchResult<SignalToCopyResult>>;
|
|
448
567
|
private runCoreProductDryRun;
|
|
449
568
|
private runSignalCopyBatchChunks;
|
|
450
569
|
private runRecoverableCoreBatchJob;
|
|
570
|
+
private submitRecoverableCoreBatchJob;
|
|
571
|
+
private readRecoverableCoreBatchJob;
|
|
451
572
|
private runSignalCopyBatchChunk;
|
|
452
573
|
private runCoreBatchRound;
|
|
453
574
|
listTools(): Promise<MCPToolInfo[]>;
|
|
454
575
|
health(): Promise<PlatformHealth>;
|
|
455
576
|
}
|
|
456
577
|
|
|
457
|
-
export { type BatchItemResult, type BatchOptions, type BatchResult, type CompanySignal, type CompanySignalEnrichmentParams, type CompanySignalEnrichmentResult, type ErrorType, type FindEmailParams, type FindEmailResult, type MCPToolInfo, type PlatformHealth, type SignalDiscoveryParams, type SignalDiscoveryResult, type SignalDiscoverySignal, type SignalDiscoverySource, type SignalDiscoveryStatus, type SignalToCopyParams, type SignalToCopyResult, type SignalToCopyVariation, Signaliz, type SignalizConfig, SignalizError, type SignalizErrorData, type VerifyEmailBatchOptions, type VerifyEmailOptions, type VerifyEmailResult };
|
|
578
|
+
export { type BatchItemResult, type BatchOptions, type BatchResult, type CompanySignal, type CompanySignalEnrichmentParams, type CompanySignalEnrichmentResult, type CoreBatchResumeOptions, type CoreEmailBatchResumeOptions, type ErrorType, type FindEmailParams, type FindEmailResult, type MCPToolInfo, type PlatformHealth, type RecoverableBatchJob, type SignalDiscoveryParams, type SignalDiscoveryResult, type SignalDiscoverySignal, type SignalDiscoverySource, type SignalDiscoveryStatus, type SignalToCopyParams, type SignalToCopyResult, type SignalToCopyVariation, Signaliz, type SignalizConfig, SignalizError, type SignalizErrorData, type VerifyEmailBatchInput, type VerifyEmailBatchOptions, type VerifyEmailOptions, type VerifyEmailResult };
|