@signaliz/sdk 1.0.1 → 1.0.3
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 +302 -21
- package/dist/chunk-L6XUFJJO.mjs +4405 -0
- package/dist/cli.js +3908 -65
- package/dist/cli.mjs +1 -1
- package/dist/index.d.mts +2586 -2
- package/dist/index.d.ts +2586 -2
- package/dist/index.js +3941 -67
- package/dist/index.mjs +27 -3
- package/dist/mcp-config.js +3957 -111
- package/dist/mcp-config.mjs +7 -4
- package/package.json +4 -3
- package/dist/chunk-R657OZE7.mjs +0 -543
package/dist/index.d.ts
CHANGED
|
@@ -45,6 +45,19 @@ interface VerifyEmailResult {
|
|
|
45
45
|
confidenceScore: number;
|
|
46
46
|
verificationSource?: string;
|
|
47
47
|
}
|
|
48
|
+
interface FindAndVerifyEmailContact extends FindEmailParams {
|
|
49
|
+
}
|
|
50
|
+
interface EmailBatchJobResult {
|
|
51
|
+
jobId: string;
|
|
52
|
+
status: string;
|
|
53
|
+
capability: string;
|
|
54
|
+
itemsTotal: number;
|
|
55
|
+
message: string;
|
|
56
|
+
estimatedTimeSeconds?: number;
|
|
57
|
+
skippedCount?: number;
|
|
58
|
+
queuePosition?: number;
|
|
59
|
+
estimatedStartTime?: string;
|
|
60
|
+
}
|
|
48
61
|
interface EnrichSignalsParams {
|
|
49
62
|
companyName: string;
|
|
50
63
|
domain?: string;
|
|
@@ -181,6 +194,14 @@ interface RunResult {
|
|
|
181
194
|
totalRows?: number;
|
|
182
195
|
completedRows?: number;
|
|
183
196
|
creditsUsed?: number;
|
|
197
|
+
completed?: boolean;
|
|
198
|
+
retryEligible?: boolean;
|
|
199
|
+
triggerStatus?: string;
|
|
200
|
+
output?: unknown;
|
|
201
|
+
error?: string;
|
|
202
|
+
message?: string;
|
|
203
|
+
recoveryGuidance?: string;
|
|
204
|
+
raw?: unknown;
|
|
184
205
|
}
|
|
185
206
|
interface HttpRequestParams {
|
|
186
207
|
url: string;
|
|
@@ -193,12 +214,90 @@ interface HttpRequestResult {
|
|
|
193
214
|
headers: Record<string, string>;
|
|
194
215
|
body: unknown;
|
|
195
216
|
}
|
|
217
|
+
interface CustomAiOutputField {
|
|
218
|
+
name: string;
|
|
219
|
+
type?: 'text' | 'string' | 'number' | 'boolean' | 'array' | 'json';
|
|
220
|
+
description?: string;
|
|
221
|
+
}
|
|
222
|
+
interface CustomAiAttachment {
|
|
223
|
+
type?: 'text' | 'image' | 'pdf' | 'file' | 'audio' | 'video';
|
|
224
|
+
url?: string;
|
|
225
|
+
data_url?: string;
|
|
226
|
+
base64?: string;
|
|
227
|
+
mime_type?: string;
|
|
228
|
+
filename?: string;
|
|
229
|
+
text?: string;
|
|
230
|
+
detail?: 'auto' | 'low' | 'high';
|
|
231
|
+
format?: string;
|
|
232
|
+
}
|
|
233
|
+
interface CustomAiFusionConfig {
|
|
234
|
+
required?: boolean;
|
|
235
|
+
analysis_models?: string[];
|
|
236
|
+
judge_model?: string;
|
|
237
|
+
include_raw_analysis?: boolean;
|
|
238
|
+
}
|
|
239
|
+
interface CustomAiMultiModelParams {
|
|
240
|
+
/** Simple prompt template. Equivalent to userTemplate. */
|
|
241
|
+
prompt?: string;
|
|
242
|
+
/** One record to enrich. */
|
|
243
|
+
input?: Record<string, unknown>;
|
|
244
|
+
/** Multiple records to enrich. Max 25 per request. */
|
|
245
|
+
inputs?: Record<string, unknown>[];
|
|
246
|
+
/** Alias for inputs. */
|
|
247
|
+
records?: Record<string, unknown>[];
|
|
248
|
+
/** OpenRouter model id, e.g. anthropic/claude-sonnet-4. */
|
|
249
|
+
model: string;
|
|
250
|
+
systemPrompt?: string;
|
|
251
|
+
system_prompt?: string;
|
|
252
|
+
userTemplate?: string;
|
|
253
|
+
user_template?: string;
|
|
254
|
+
temperature?: number;
|
|
255
|
+
maxConcurrency?: number;
|
|
256
|
+
max_concurrency?: number;
|
|
257
|
+
maxTokens?: number;
|
|
258
|
+
max_tokens?: number;
|
|
259
|
+
outputFields?: CustomAiOutputField[];
|
|
260
|
+
output_fields?: CustomAiOutputField[];
|
|
261
|
+
attachments?: CustomAiAttachment[];
|
|
262
|
+
attachmentFields?: string[];
|
|
263
|
+
attachment_fields?: string[];
|
|
264
|
+
pdfEngine?: 'cloudflare-ai' | 'mistral-ocr' | 'native';
|
|
265
|
+
pdf_engine?: 'cloudflare-ai' | 'mistral-ocr' | 'native';
|
|
266
|
+
fusion?: CustomAiFusionConfig;
|
|
267
|
+
}
|
|
268
|
+
interface CustomAiMultiModelResult {
|
|
269
|
+
success: boolean;
|
|
270
|
+
capability: string;
|
|
271
|
+
displayName: string;
|
|
272
|
+
results: Record<string, unknown>[];
|
|
273
|
+
creditsUsed: number;
|
|
274
|
+
model?: string;
|
|
275
|
+
fusion?: Record<string, unknown>;
|
|
276
|
+
multimodalCount: number;
|
|
277
|
+
tokensUsed: number;
|
|
278
|
+
costUsd: number;
|
|
279
|
+
billingMetadata?: Record<string, unknown>;
|
|
280
|
+
raw: Record<string, unknown>;
|
|
281
|
+
}
|
|
196
282
|
interface WorkspaceInfo {
|
|
197
283
|
id: string;
|
|
198
284
|
name: string;
|
|
199
285
|
creditsRemaining: number;
|
|
200
286
|
plan: string;
|
|
201
287
|
}
|
|
288
|
+
interface PlatformHealth {
|
|
289
|
+
status: string;
|
|
290
|
+
period?: string;
|
|
291
|
+
totalRequests: number;
|
|
292
|
+
errorRate: string;
|
|
293
|
+
latency: {
|
|
294
|
+
p50: number;
|
|
295
|
+
p95: number;
|
|
296
|
+
p99: number;
|
|
297
|
+
sampleCount?: number;
|
|
298
|
+
source?: string;
|
|
299
|
+
};
|
|
300
|
+
}
|
|
202
301
|
interface RunProgressEvent {
|
|
203
302
|
runId: string;
|
|
204
303
|
status: string;
|
|
@@ -212,6 +311,89 @@ interface MCPToolInfo {
|
|
|
212
311
|
description: string;
|
|
213
312
|
category?: string;
|
|
214
313
|
costCredits?: number;
|
|
314
|
+
contractVersion?: string;
|
|
315
|
+
permissionLevel?: string;
|
|
316
|
+
authScopes?: string[];
|
|
317
|
+
idempotent?: boolean;
|
|
318
|
+
destructive?: boolean;
|
|
319
|
+
retryable?: boolean;
|
|
320
|
+
rateLimitKey?: string;
|
|
321
|
+
observability?: Record<string, unknown>;
|
|
322
|
+
inputSchema?: {
|
|
323
|
+
required?: string[];
|
|
324
|
+
properties?: Record<string, unknown>;
|
|
325
|
+
[key: string]: unknown;
|
|
326
|
+
};
|
|
327
|
+
outputSchema?: {
|
|
328
|
+
required?: string[];
|
|
329
|
+
properties?: Record<string, unknown>;
|
|
330
|
+
[key: string]: unknown;
|
|
331
|
+
};
|
|
332
|
+
annotations?: Record<string, unknown>;
|
|
333
|
+
}
|
|
334
|
+
interface GenerateLeadsParams {
|
|
335
|
+
prompt: string;
|
|
336
|
+
maxLeads?: number;
|
|
337
|
+
verifyEmails?: boolean;
|
|
338
|
+
fileName?: string;
|
|
339
|
+
model?: string;
|
|
340
|
+
companyDomains?: string[];
|
|
341
|
+
completenessMode?: 'fast' | 'complete';
|
|
342
|
+
/** Net-new expansion mode for lookalike prompts. Bypasses recent lead cache and suppresses existing workspace leads. */
|
|
343
|
+
lookalikeExpansion?: boolean;
|
|
344
|
+
/** Required for spendful lead generation. Omit to receive an approval-required error with retry arguments. */
|
|
345
|
+
confirmSpend?: boolean;
|
|
346
|
+
}
|
|
347
|
+
interface GenerateLocalLeadsParams {
|
|
348
|
+
prompt: string;
|
|
349
|
+
/** Number of verified leads to return (auto-continues until target met). */
|
|
350
|
+
targetVerified?: number;
|
|
351
|
+
/** @deprecated Use targetVerified. */
|
|
352
|
+
maxLeads?: number;
|
|
353
|
+
verifyEmails?: boolean;
|
|
354
|
+
fileName?: string;
|
|
355
|
+
/** Required for spendful local lead generation. Omit to receive an approval-required error with retry arguments. */
|
|
356
|
+
confirmSpend?: boolean;
|
|
357
|
+
}
|
|
358
|
+
interface NativeGtmCapabilityInfo {
|
|
359
|
+
id: string;
|
|
360
|
+
label: string;
|
|
361
|
+
category: string;
|
|
362
|
+
description: string;
|
|
363
|
+
best_for: string[];
|
|
364
|
+
required_input: string;
|
|
365
|
+
default_results: number;
|
|
366
|
+
max_results: number;
|
|
367
|
+
credits_per_result: number;
|
|
368
|
+
quality: Record<string, unknown>;
|
|
369
|
+
api_call: Record<string, unknown>;
|
|
370
|
+
profitability_guardrail: Record<string, unknown>;
|
|
371
|
+
}
|
|
372
|
+
interface RunNativeGtmCapabilityParams {
|
|
373
|
+
capability: string;
|
|
374
|
+
query?: string;
|
|
375
|
+
urls?: string[];
|
|
376
|
+
placeIds?: string[];
|
|
377
|
+
maxResults?: number;
|
|
378
|
+
mode?: string;
|
|
379
|
+
since?: string;
|
|
380
|
+
location?: string;
|
|
381
|
+
countryCode?: string;
|
|
382
|
+
/** Required for spendful native GTM runs. Omit to receive an approval-required result with retry arguments. */
|
|
383
|
+
confirmSpend?: boolean;
|
|
384
|
+
}
|
|
385
|
+
interface LeadGenJobResult {
|
|
386
|
+
jobId: string;
|
|
387
|
+
status: string;
|
|
388
|
+
capability: string;
|
|
389
|
+
prompt: string;
|
|
390
|
+
source: string;
|
|
391
|
+
targetVerified?: number;
|
|
392
|
+
/** @deprecated */
|
|
393
|
+
maxLeads?: number;
|
|
394
|
+
verifyEmails: boolean;
|
|
395
|
+
message: string;
|
|
396
|
+
estimatedTimeSeconds: number;
|
|
215
397
|
}
|
|
216
398
|
|
|
217
399
|
declare class HttpClient {
|
|
@@ -226,6 +408,8 @@ declare class HttpClient {
|
|
|
226
408
|
request<T = any>(functionName: string, body: Record<string, unknown>, method?: 'POST' | 'GET'): Promise<T>;
|
|
227
409
|
/** Convenience wrapper for POST-based edge function calls */
|
|
228
410
|
post<T = any>(functionName: string, body: Record<string, unknown>): Promise<T>;
|
|
411
|
+
/** Convenience wrapper for GET-based edge function calls with query params */
|
|
412
|
+
get<T = any>(functionName: string, query?: Record<string, unknown>): Promise<T>;
|
|
229
413
|
/** JSON-RPC call to the MCP server */
|
|
230
414
|
mcp<T = any>(method: string, params?: Record<string, unknown>): Promise<T>;
|
|
231
415
|
private getToken;
|
|
@@ -238,6 +422,18 @@ declare class Emails {
|
|
|
238
422
|
find(params: FindEmailParams): Promise<FindEmailResult>;
|
|
239
423
|
/** Verify a single email address */
|
|
240
424
|
verify(email: string): Promise<VerifyEmailResult>;
|
|
425
|
+
/** Submit up to 5,000 contacts for async find + verify processing. */
|
|
426
|
+
findBatch(contacts: FindAndVerifyEmailContact[]): Promise<EmailBatchJobResult>;
|
|
427
|
+
/** Submit up to 5,000 email addresses for async verification. */
|
|
428
|
+
verifyBatch(emails: Array<string | {
|
|
429
|
+
email: string;
|
|
430
|
+
}>): Promise<EmailBatchJobResult>;
|
|
431
|
+
/** Poll a batch email job returned by findBatch or verifyBatch. */
|
|
432
|
+
checkStatus(jobId: string, opts?: {
|
|
433
|
+
page?: number;
|
|
434
|
+
pageSize?: number;
|
|
435
|
+
includePartialResults?: boolean;
|
|
436
|
+
}): Promise<Record<string, unknown>>;
|
|
241
437
|
}
|
|
242
438
|
|
|
243
439
|
declare class Signals {
|
|
@@ -265,7 +461,7 @@ declare class Systems {
|
|
|
265
461
|
declare class Runs {
|
|
266
462
|
private client;
|
|
267
463
|
constructor(client: HttpClient);
|
|
268
|
-
/** Get run status */
|
|
464
|
+
/** Get run status across Trigger, batch, and dataplane runs. */
|
|
269
465
|
get(runId: string): Promise<RunResult>;
|
|
270
466
|
/** Poll until a run completes. Returns final result. */
|
|
271
467
|
waitForCompletion(runId: string, pollIntervalMs?: number): Promise<RunResult>;
|
|
@@ -283,6 +479,2383 @@ declare class Http {
|
|
|
283
479
|
request(params: HttpRequestParams): Promise<HttpRequestResult>;
|
|
284
480
|
}
|
|
285
481
|
|
|
482
|
+
/** Allowed delivery output modes. */
|
|
483
|
+
type CampaignDeliveryMode = 'json' | 'csv' | 'webhook';
|
|
484
|
+
interface CampaignBuildRequest {
|
|
485
|
+
name: string;
|
|
486
|
+
prompt: string;
|
|
487
|
+
/** Existing GTM Kernel campaign object to link this build to. */
|
|
488
|
+
gtmCampaignId?: string;
|
|
489
|
+
description?: string;
|
|
490
|
+
icp?: {
|
|
491
|
+
personas?: string[];
|
|
492
|
+
industries?: string[];
|
|
493
|
+
companySizes?: string[];
|
|
494
|
+
geographies?: string[];
|
|
495
|
+
keywords?: string[];
|
|
496
|
+
exclusions?: string[];
|
|
497
|
+
requireVerifiedEmail?: boolean;
|
|
498
|
+
};
|
|
499
|
+
targetCount?: number;
|
|
500
|
+
/** Return a validated plan without launching spendful work. */
|
|
501
|
+
dryRun?: boolean;
|
|
502
|
+
/** Allow Signaliz to clamp oversized target counts to the supported max. */
|
|
503
|
+
allowDownscale?: boolean;
|
|
504
|
+
/** Explicitly acknowledge spendful campaign generation when the API asks for approval. */
|
|
505
|
+
confirmSpend?: boolean;
|
|
506
|
+
dedupKeys?: ('email' | 'linkedin_url' | 'company_domain')[];
|
|
507
|
+
policy?: {
|
|
508
|
+
maxCredits?: number;
|
|
509
|
+
verifyEmails?: boolean;
|
|
510
|
+
model?: string;
|
|
511
|
+
};
|
|
512
|
+
signals?: {
|
|
513
|
+
enabled?: boolean;
|
|
514
|
+
types?: string[];
|
|
515
|
+
customPrompt?: string;
|
|
516
|
+
confidenceThreshold?: number;
|
|
517
|
+
lookbackDays?: number;
|
|
518
|
+
};
|
|
519
|
+
qualification?: {
|
|
520
|
+
enabled?: boolean;
|
|
521
|
+
model?: string;
|
|
522
|
+
};
|
|
523
|
+
copy?: {
|
|
524
|
+
enabled?: boolean;
|
|
525
|
+
tone?: string;
|
|
526
|
+
maxBodyWords?: number;
|
|
527
|
+
senderContext?: string;
|
|
528
|
+
offerContext?: string;
|
|
529
|
+
model?: string;
|
|
530
|
+
};
|
|
531
|
+
delivery?: {
|
|
532
|
+
enabled?: boolean;
|
|
533
|
+
destinationType?: CampaignDeliveryMode;
|
|
534
|
+
approvalRequired?: boolean;
|
|
535
|
+
includeDisqualified?: boolean;
|
|
536
|
+
destinationConfig?: Record<string, unknown>;
|
|
537
|
+
};
|
|
538
|
+
enhancers?: {
|
|
539
|
+
clay?: {
|
|
540
|
+
enabled?: boolean;
|
|
541
|
+
mode?: 'if_available' | 'required';
|
|
542
|
+
tableId?: string;
|
|
543
|
+
enrichmentFields?: string[];
|
|
544
|
+
apiKeyEnv?: string;
|
|
545
|
+
};
|
|
546
|
+
octave?: {
|
|
547
|
+
enabled?: boolean;
|
|
548
|
+
mode?: 'if_available' | 'required';
|
|
549
|
+
copyAgentId?: string;
|
|
550
|
+
qualificationAgentId?: string;
|
|
551
|
+
apiKeyEnv?: string;
|
|
552
|
+
};
|
|
553
|
+
};
|
|
554
|
+
/** Brain preflight context returned by scope_campaign. */
|
|
555
|
+
brainPreflight?: Record<string, unknown>;
|
|
556
|
+
/** Optional output from gtm_brain_seed_defaults. */
|
|
557
|
+
brainDefaults?: Record<string, unknown>;
|
|
558
|
+
/** Optional output from gtm_brain_delivery_risk. */
|
|
559
|
+
deliveryRisk?: Record<string, unknown>;
|
|
560
|
+
}
|
|
561
|
+
type CampaignApproach = 'account_first_qualified_outbound' | 'lookalike_expansion' | 'local_services_verified_email' | 'named_account_signal_monitor' | 'list_enrichment_and_route';
|
|
562
|
+
interface CampaignScopeRequest {
|
|
563
|
+
prompt: string;
|
|
564
|
+
clientName?: string;
|
|
565
|
+
clientContext?: string;
|
|
566
|
+
campaignGoal?: string;
|
|
567
|
+
targetCount?: number;
|
|
568
|
+
destinations?: Array<{
|
|
569
|
+
type?: string;
|
|
570
|
+
config?: Record<string, unknown>;
|
|
571
|
+
[key: string]: unknown;
|
|
572
|
+
}>;
|
|
573
|
+
knownAccounts?: string[];
|
|
574
|
+
offers?: string[];
|
|
575
|
+
proofPoints?: string[];
|
|
576
|
+
sourceDocs?: string[];
|
|
577
|
+
approvalPolicy?: string;
|
|
578
|
+
}
|
|
579
|
+
interface CampaignScopeResult {
|
|
580
|
+
campaignScopeId: string;
|
|
581
|
+
clientName: string;
|
|
582
|
+
campaignName: string;
|
|
583
|
+
approach: CampaignApproach;
|
|
584
|
+
approachLabel: string;
|
|
585
|
+
goal: string;
|
|
586
|
+
targetCount: number;
|
|
587
|
+
icp: Record<string, unknown>;
|
|
588
|
+
personas: Array<Record<string, unknown>>;
|
|
589
|
+
sourceStrategy: Array<Record<string, unknown>>;
|
|
590
|
+
qualificationPlan: Array<Record<string, unknown>>;
|
|
591
|
+
signalPlan: Array<Record<string, unknown>>;
|
|
592
|
+
copyPlan: Record<string, unknown>;
|
|
593
|
+
deliveryPlan: Record<string, unknown>;
|
|
594
|
+
brainPreflight: Record<string, unknown>;
|
|
595
|
+
recommendedSignalizTools: string[];
|
|
596
|
+
buildCampaignArgs: Record<string, unknown>;
|
|
597
|
+
mcpFlow: Array<{
|
|
598
|
+
tool: string;
|
|
599
|
+
arguments: Record<string, unknown>;
|
|
600
|
+
}>;
|
|
601
|
+
missingInputs: string[];
|
|
602
|
+
estimatedCredits: number;
|
|
603
|
+
campaignMarkdown: string;
|
|
604
|
+
}
|
|
605
|
+
interface CampaignProviderRouteReadback {
|
|
606
|
+
plan?: Record<string, unknown> | null;
|
|
607
|
+
summary?: Record<string, unknown> | null;
|
|
608
|
+
ready: boolean | null;
|
|
609
|
+
label: string;
|
|
610
|
+
blockers: string[];
|
|
611
|
+
warnings: string[];
|
|
612
|
+
}
|
|
613
|
+
interface CampaignBuildResult {
|
|
614
|
+
campaignBuildId: string | null;
|
|
615
|
+
campaignId?: string | null;
|
|
616
|
+
campaignObject?: Record<string, unknown> | null;
|
|
617
|
+
status: string;
|
|
618
|
+
currentPhase: string | null;
|
|
619
|
+
nextPollAfterSeconds: number;
|
|
620
|
+
message: string;
|
|
621
|
+
dryRun?: boolean;
|
|
622
|
+
requestedTargetCount?: number;
|
|
623
|
+
plannedTargetCount?: number;
|
|
624
|
+
estimatedCredits?: number;
|
|
625
|
+
estimatedDurationSeconds?: number;
|
|
626
|
+
targetLimitApplied?: boolean;
|
|
627
|
+
targetLimitReason?: string | null;
|
|
628
|
+
maxSupportedTargetCount?: number;
|
|
629
|
+
brainContext?: Record<string, unknown>;
|
|
630
|
+
providerRoute?: CampaignProviderRouteReadback | null;
|
|
631
|
+
}
|
|
632
|
+
interface CampaignBuildStatus {
|
|
633
|
+
campaignBuildId: string;
|
|
634
|
+
campaignId?: string | null;
|
|
635
|
+
campaignObject?: Record<string, unknown> | null;
|
|
636
|
+
name: string;
|
|
637
|
+
status: string;
|
|
638
|
+
currentPhase: string | null;
|
|
639
|
+
currentPhaseStatus: string | null;
|
|
640
|
+
phases: {
|
|
641
|
+
phase: string;
|
|
642
|
+
status: string;
|
|
643
|
+
}[];
|
|
644
|
+
recordsTotal: number;
|
|
645
|
+
recordsProcessed: number;
|
|
646
|
+
recordsSucceeded: number;
|
|
647
|
+
recordsFailed: number;
|
|
648
|
+
warnings: string[];
|
|
649
|
+
errors: string[];
|
|
650
|
+
artifactCount: number;
|
|
651
|
+
providerRoute?: CampaignProviderRouteReadback | null;
|
|
652
|
+
nextAction: string;
|
|
653
|
+
createdAt: string;
|
|
654
|
+
updatedAt: string;
|
|
655
|
+
completedAt: string | null;
|
|
656
|
+
}
|
|
657
|
+
interface CampaignBuildRow {
|
|
658
|
+
/** Row index within the build */
|
|
659
|
+
index: number;
|
|
660
|
+
/** Row status: succeeded, failed, disqualified, etc. */
|
|
661
|
+
status: string;
|
|
662
|
+
/** Whether the row passed qualification */
|
|
663
|
+
qualified: boolean;
|
|
664
|
+
/** Row segment: signal, standard, disqualified */
|
|
665
|
+
segment: string | null;
|
|
666
|
+
/** Enriched row data */
|
|
667
|
+
data: Record<string, unknown>;
|
|
668
|
+
}
|
|
669
|
+
interface CampaignArtifact {
|
|
670
|
+
id: string;
|
|
671
|
+
campaignBuildId: string;
|
|
672
|
+
artifactType: string;
|
|
673
|
+
destination: string;
|
|
674
|
+
storagePath: string;
|
|
675
|
+
signedUrl: string | null;
|
|
676
|
+
rowCount: number;
|
|
677
|
+
checksum: string | null;
|
|
678
|
+
metadata: Record<string, unknown>;
|
|
679
|
+
createdAt: string;
|
|
680
|
+
}
|
|
681
|
+
interface CampaignRowsOptions {
|
|
682
|
+
/** Max rows per page (default: 50) */
|
|
683
|
+
limit?: number;
|
|
684
|
+
/** Pagination cursor from a previous response */
|
|
685
|
+
cursor?: string;
|
|
686
|
+
/** Filter by segment */
|
|
687
|
+
segment?: 'signal' | 'standard' | 'disqualified';
|
|
688
|
+
/** Filter by qualification status */
|
|
689
|
+
qualified?: boolean;
|
|
690
|
+
/** Filter by row processing status */
|
|
691
|
+
rowStatus?: string;
|
|
692
|
+
}
|
|
693
|
+
interface CampaignRowsResult {
|
|
694
|
+
campaignBuildId: string;
|
|
695
|
+
rows: CampaignBuildRow[];
|
|
696
|
+
count: number;
|
|
697
|
+
pageSize: number;
|
|
698
|
+
nextCursor: string | null;
|
|
699
|
+
hasMore: boolean;
|
|
700
|
+
}
|
|
701
|
+
interface ApproveDeliveryResult {
|
|
702
|
+
campaignBuildId: string;
|
|
703
|
+
destinationType: string;
|
|
704
|
+
status: string;
|
|
705
|
+
message: string;
|
|
706
|
+
deliveryId?: string;
|
|
707
|
+
deliveryIds?: string[];
|
|
708
|
+
approvedCount?: number;
|
|
709
|
+
}
|
|
710
|
+
interface CancelBuildResult {
|
|
711
|
+
campaignBuildId: string;
|
|
712
|
+
status: string;
|
|
713
|
+
reason: string;
|
|
714
|
+
message: string;
|
|
715
|
+
}
|
|
716
|
+
interface BuildOptions {
|
|
717
|
+
/** Idempotency key to prevent duplicate builds */
|
|
718
|
+
idempotencyKey?: string;
|
|
719
|
+
}
|
|
720
|
+
interface WaitOptions {
|
|
721
|
+
/** Polling interval in ms (default: 5000) */
|
|
722
|
+
intervalMs?: number;
|
|
723
|
+
/** Max wait time in ms (default: 600000 = 10 min) */
|
|
724
|
+
timeoutMs?: number;
|
|
725
|
+
/** Called on each poll with the latest status */
|
|
726
|
+
onProgress?: (status: CampaignBuildStatus) => void;
|
|
727
|
+
}
|
|
728
|
+
declare class Campaigns {
|
|
729
|
+
private client;
|
|
730
|
+
constructor(client: HttpClient);
|
|
731
|
+
/**
|
|
732
|
+
* Start an async Campaign Build.
|
|
733
|
+
* Returns immediately with a pollable campaign_build_id.
|
|
734
|
+
*
|
|
735
|
+
* ```ts
|
|
736
|
+
* const result = await signaliz.campaigns.build({ name: 'Q3 SaaS', prompt: '...' });
|
|
737
|
+
* console.log(result.campaignBuildId);
|
|
738
|
+
* ```
|
|
739
|
+
*/
|
|
740
|
+
build(request: CampaignBuildRequest, options?: BuildOptions): Promise<CampaignBuildResult>;
|
|
741
|
+
/** Scope an agency/client campaign into a markdown brief plus build_campaign dry-run args. */
|
|
742
|
+
scope(request: CampaignScopeRequest): Promise<CampaignScopeResult>;
|
|
743
|
+
/** Get a concise status snapshot — ideal for polling loops. */
|
|
744
|
+
status(campaignBuildId: string): Promise<CampaignBuildStatus>;
|
|
745
|
+
/** Get the full campaign build record including delivery details. */
|
|
746
|
+
get(campaignBuildId: string): Promise<CampaignBuildStatus>;
|
|
747
|
+
/** Retrieve paginated rows from a completed build. */
|
|
748
|
+
rows(campaignBuildId: string, options?: CampaignRowsOptions): Promise<CampaignRowsResult>;
|
|
749
|
+
/** List all artifacts (CSV exports, etc.) for a build. */
|
|
750
|
+
artifacts(campaignBuildId: string): Promise<CampaignArtifact[]>;
|
|
751
|
+
/** Cancel a queued or running build. */
|
|
752
|
+
cancel(campaignBuildId: string, reason?: string): Promise<CancelBuildResult>;
|
|
753
|
+
/**
|
|
754
|
+
* Poll until a campaign build reaches a terminal status.
|
|
755
|
+
*
|
|
756
|
+
* ```ts
|
|
757
|
+
* const final = await signaliz.campaigns.wait(buildId, {
|
|
758
|
+
* onProgress: (s) => console.log(`${s.recordsProcessed}/${s.recordsTotal}`),
|
|
759
|
+
* });
|
|
760
|
+
* ```
|
|
761
|
+
*/
|
|
762
|
+
wait(campaignBuildId: string, options?: WaitOptions): Promise<CampaignBuildStatus>;
|
|
763
|
+
scopeCampaign(request: CampaignScopeRequest): Promise<CampaignScopeResult>;
|
|
764
|
+
buildCampaign(request: CampaignBuildRequest, options?: BuildOptions): Promise<CampaignBuildResult>;
|
|
765
|
+
getCampaignBuildStatus(campaignBuildId: string): Promise<CampaignBuildStatus>;
|
|
766
|
+
listCampaignBuildArtifacts(campaignBuildId: string): Promise<CampaignArtifact[]>;
|
|
767
|
+
getCampaignBuildRows(campaignBuildId: string, options?: CampaignRowsOptions): Promise<CampaignRowsResult>;
|
|
768
|
+
approveCampaignDelivery(campaignBuildId: string, destinationType: CampaignDeliveryMode, options?: {
|
|
769
|
+
destinationId?: string;
|
|
770
|
+
destinationConfig?: Record<string, unknown>;
|
|
771
|
+
}): Promise<ApproveDeliveryResult>;
|
|
772
|
+
cancelCampaignBuild(campaignBuildId: string, reason?: string): Promise<CancelBuildResult>;
|
|
773
|
+
waitForCompletion(campaignBuildId: string, options?: {
|
|
774
|
+
intervalMs?: number;
|
|
775
|
+
timeoutMs?: number;
|
|
776
|
+
onStatus?: (status: CampaignBuildStatus) => void;
|
|
777
|
+
}): Promise<CampaignBuildStatus>;
|
|
778
|
+
private callMcp;
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
type UnknownRecord$1 = Record<string, unknown>;
|
|
782
|
+
type CampaignBuilderLayer = 'workspace_context' | 'memory' | 'source' | 'enrichment' | 'qualification' | 'copy' | 'delivery' | 'feedback' | 'approval';
|
|
783
|
+
type CampaignBuilderGtmLayer = 'icp' | 'find_company' | 'find_people' | 'lead_generation' | 'local_leads' | 'email_finding' | 'email_verification' | 'company_enrichment' | 'copy_enrichment' | 'qualification' | 'sender' | 'feedback' | 'approval' | 'source_import' | 'destination_export' | 'customer_data' | 'custom';
|
|
784
|
+
type CampaignBuilderProvider = 'signaliz' | 'octave' | 'apollo' | 'ai_ark' | 'clay_webhook' | 'airbyte' | 'nango' | 'instantly' | 'smartlead' | 'heyreach' | 'custom_mcp' | 'custom_api' | 'custom_webhook' | 'webhook' | 'csv';
|
|
785
|
+
type CampaignBuilderAgentProvider = CampaignBuilderProvider;
|
|
786
|
+
type CampaignBuilderRouteMode = 'required' | 'if_available' | 'fallback' | 'disabled';
|
|
787
|
+
type CampaignBuilderProviderRoutingMode = 'preferred' | 'fallback' | 'disabled';
|
|
788
|
+
type CampaignBuilderProviderInvocationType = 'signaliz_native' | 'mcp' | 'mcp_tool' | 'webhook' | 'api' | 'airbyte' | 'manual' | 'managed_integration';
|
|
789
|
+
type CampaignBuilderMemoryScope = 'workspace' | 'network_patterns' | 'customer_private' | 'operator_notes';
|
|
790
|
+
type CampaignBuilderApprovalType = 'memory_retrieval' | 'spend' | 'customer_tool' | 'external_write' | 'delivery' | 'launch';
|
|
791
|
+
interface CampaignBuilderWorkspaceContext {
|
|
792
|
+
workspaceId?: string;
|
|
793
|
+
workspaceName?: string;
|
|
794
|
+
plan?: string;
|
|
795
|
+
creditsRemaining?: number;
|
|
796
|
+
connectedTools?: string[];
|
|
797
|
+
defaultSender?: string;
|
|
798
|
+
brandVoice?: string;
|
|
799
|
+
suppressionRules?: string[];
|
|
800
|
+
operatorNotes?: string[];
|
|
801
|
+
[key: string]: unknown;
|
|
802
|
+
}
|
|
803
|
+
interface CampaignBuilderMemoryQuery {
|
|
804
|
+
query: string;
|
|
805
|
+
scopes?: CampaignBuilderMemoryScope[];
|
|
806
|
+
topK?: number;
|
|
807
|
+
required?: boolean;
|
|
808
|
+
rationale?: string;
|
|
809
|
+
}
|
|
810
|
+
interface CampaignBuilderMemoryPlan {
|
|
811
|
+
enabled?: boolean;
|
|
812
|
+
queries?: CampaignBuilderMemoryQuery[];
|
|
813
|
+
useWorkspaceHistory?: boolean;
|
|
814
|
+
useNetworkPatterns?: boolean;
|
|
815
|
+
privacyMode?: 'workspace_only' | 'anonymized_patterns' | 'opt_in_network';
|
|
816
|
+
summary?: string;
|
|
817
|
+
}
|
|
818
|
+
interface CampaignBuilderIntegrationRoute {
|
|
819
|
+
id?: string;
|
|
820
|
+
layer: CampaignBuilderLayer;
|
|
821
|
+
gtmLayer?: CampaignBuilderGtmLayer;
|
|
822
|
+
gtmLayers?: CampaignBuilderGtmLayer[];
|
|
823
|
+
provider: CampaignBuilderProvider;
|
|
824
|
+
mode?: CampaignBuilderRouteMode;
|
|
825
|
+
routingPolicy?: CampaignBuilderProviderRoutingPolicy;
|
|
826
|
+
toolName?: string;
|
|
827
|
+
mcpServerName?: string;
|
|
828
|
+
label?: string;
|
|
829
|
+
rationale?: string;
|
|
830
|
+
approvalRequired?: boolean;
|
|
831
|
+
config?: UnknownRecord$1;
|
|
832
|
+
fallbackProvider?: CampaignBuilderProvider;
|
|
833
|
+
providerCapability?: CampaignBuilderProviderCapabilityContract;
|
|
834
|
+
}
|
|
835
|
+
interface CampaignBuilderCustomerTool {
|
|
836
|
+
provider: CampaignBuilderProvider;
|
|
837
|
+
label?: string;
|
|
838
|
+
mcpServerName?: string;
|
|
839
|
+
availableTools?: string[];
|
|
840
|
+
useForLayers: CampaignBuilderLayer[];
|
|
841
|
+
gtmLayerCapabilities?: CampaignBuilderGtmLayer[];
|
|
842
|
+
mode?: CampaignBuilderRouteMode;
|
|
843
|
+
routingPolicy?: CampaignBuilderProviderRoutingPolicy;
|
|
844
|
+
approvalRequired?: boolean;
|
|
845
|
+
config?: UnknownRecord$1;
|
|
846
|
+
providerCapability?: CampaignBuilderProviderCapabilityContract;
|
|
847
|
+
}
|
|
848
|
+
interface CampaignBuilderProviderRoutingPolicy {
|
|
849
|
+
mode: CampaignBuilderProviderRoutingMode;
|
|
850
|
+
useSignalizFallback?: boolean;
|
|
851
|
+
workspaceScoped?: boolean;
|
|
852
|
+
dryRunRequired?: boolean;
|
|
853
|
+
confirmRequired?: boolean;
|
|
854
|
+
}
|
|
855
|
+
interface CampaignBuilderProviderCapabilityContract {
|
|
856
|
+
providerId?: CampaignBuilderProvider | string;
|
|
857
|
+
layerCapabilities: CampaignBuilderGtmLayer[];
|
|
858
|
+
invocationType?: CampaignBuilderProviderInvocationType;
|
|
859
|
+
setupRequirements?: Array<{
|
|
860
|
+
kind: string;
|
|
861
|
+
label: string;
|
|
862
|
+
required?: boolean;
|
|
863
|
+
guidance?: string;
|
|
864
|
+
}>;
|
|
865
|
+
exampleInputSchema?: UnknownRecord$1;
|
|
866
|
+
exampleOutputSchema?: UnknownRecord$1;
|
|
867
|
+
routingPolicy?: CampaignBuilderProviderRoutingPolicy;
|
|
868
|
+
workspaceConfiguration?: {
|
|
869
|
+
scope?: 'workspace';
|
|
870
|
+
storesSecretsByReferenceOnly?: boolean;
|
|
871
|
+
fields?: UnknownRecord$1[];
|
|
872
|
+
};
|
|
873
|
+
}
|
|
874
|
+
interface SignalizCampaignBuilderDefaults {
|
|
875
|
+
requireVerifiedEmail?: boolean;
|
|
876
|
+
dedupKeys?: Array<'email' | 'linkedin_url' | 'company_domain'>;
|
|
877
|
+
maxCredits?: number;
|
|
878
|
+
allowDownscale?: boolean;
|
|
879
|
+
signals?: {
|
|
880
|
+
enabled?: boolean;
|
|
881
|
+
types?: string[];
|
|
882
|
+
confidenceThreshold?: number;
|
|
883
|
+
lookbackDays?: number;
|
|
884
|
+
};
|
|
885
|
+
qualification?: {
|
|
886
|
+
enabled?: boolean;
|
|
887
|
+
model?: string;
|
|
888
|
+
};
|
|
889
|
+
copy?: {
|
|
890
|
+
enabled?: boolean;
|
|
891
|
+
tone?: string;
|
|
892
|
+
maxBodyWords?: number;
|
|
893
|
+
senderContext?: string;
|
|
894
|
+
offerContext?: string;
|
|
895
|
+
model?: string;
|
|
896
|
+
};
|
|
897
|
+
delivery?: {
|
|
898
|
+
enabled?: boolean;
|
|
899
|
+
destinationType?: CampaignDeliveryMode;
|
|
900
|
+
approvalRequired?: boolean;
|
|
901
|
+
destinationConfig?: UnknownRecord$1;
|
|
902
|
+
};
|
|
903
|
+
}
|
|
904
|
+
interface CampaignBuilderApprovalPolicy {
|
|
905
|
+
requireHumanApproval?: boolean;
|
|
906
|
+
maxCreditsWithoutApproval?: number;
|
|
907
|
+
requireApprovalFor?: CampaignBuilderApprovalType[];
|
|
908
|
+
approvedByDefault?: CampaignBuilderApprovalType[];
|
|
909
|
+
}
|
|
910
|
+
interface CampaignBuilderAgentRequest {
|
|
911
|
+
goal: string;
|
|
912
|
+
/** Existing committed GTM campaign object to execute through gtm_campaign_build_execution_prepare. */
|
|
913
|
+
gtmCampaignId?: string;
|
|
914
|
+
campaignName?: string;
|
|
915
|
+
clientName?: string;
|
|
916
|
+
clientContext?: string;
|
|
917
|
+
targetCount?: number;
|
|
918
|
+
icp?: CampaignBuildRequest['icp'];
|
|
919
|
+
/** Optional output from gtm_brain_seed_defaults to attach to build_campaign. */
|
|
920
|
+
brainDefaults?: UnknownRecord$1;
|
|
921
|
+
/** Optional output from gtm_brain_delivery_risk. Required before committed-campaign launch handoff. */
|
|
922
|
+
deliveryRisk?: UnknownRecord$1;
|
|
923
|
+
workspaceContext?: CampaignBuilderWorkspaceContext;
|
|
924
|
+
memory?: CampaignBuilderMemoryPlan;
|
|
925
|
+
integrations?: CampaignBuilderIntegrationRoute[];
|
|
926
|
+
customerTools?: CampaignBuilderCustomerTool[];
|
|
927
|
+
signalizDefaults?: SignalizCampaignBuilderDefaults;
|
|
928
|
+
approvalPolicy?: CampaignBuilderApprovalPolicy;
|
|
929
|
+
constraints?: {
|
|
930
|
+
geographies?: string[];
|
|
931
|
+
exclusions?: string[];
|
|
932
|
+
maxDailySends?: number;
|
|
933
|
+
deliverabilityNotes?: string[];
|
|
934
|
+
};
|
|
935
|
+
}
|
|
936
|
+
interface CampaignBuilderRequiredApproval {
|
|
937
|
+
id: string;
|
|
938
|
+
type: CampaignBuilderApprovalType;
|
|
939
|
+
label: string;
|
|
940
|
+
reason: string;
|
|
941
|
+
blocking: boolean;
|
|
942
|
+
routeId?: string;
|
|
943
|
+
provider?: CampaignBuilderProvider;
|
|
944
|
+
estimatedCredits?: number;
|
|
945
|
+
}
|
|
946
|
+
interface CampaignBuilderApproval {
|
|
947
|
+
planId: string;
|
|
948
|
+
approvedBy: string;
|
|
949
|
+
approvedAt?: string;
|
|
950
|
+
approvedTypes: CampaignBuilderApprovalType[];
|
|
951
|
+
spendLimitCredits?: number;
|
|
952
|
+
approvedRouteIds?: string[];
|
|
953
|
+
notes?: string;
|
|
954
|
+
}
|
|
955
|
+
interface CampaignBuilderMcpStep {
|
|
956
|
+
id: string;
|
|
957
|
+
phase: CampaignBuilderLayer | 'plan' | 'launch';
|
|
958
|
+
tool: string;
|
|
959
|
+
arguments: UnknownRecord$1;
|
|
960
|
+
readOnly: boolean;
|
|
961
|
+
approvalRequired: boolean;
|
|
962
|
+
}
|
|
963
|
+
interface CampaignBuilderAgentPlan {
|
|
964
|
+
planId: string;
|
|
965
|
+
campaignName: string;
|
|
966
|
+
goal: string;
|
|
967
|
+
targetCount: number;
|
|
968
|
+
workspaceContext: CampaignBuilderWorkspaceContext;
|
|
969
|
+
memory: Required<Pick<CampaignBuilderMemoryPlan, 'enabled' | 'queries' | 'useWorkspaceHistory' | 'useNetworkPatterns' | 'privacyMode'>>;
|
|
970
|
+
defaults: Required<Pick<SignalizCampaignBuilderDefaults, 'requireVerifiedEmail' | 'dedupKeys' | 'allowDownscale'>>;
|
|
971
|
+
routes: CampaignBuilderIntegrationRoute[];
|
|
972
|
+
approvals: CampaignBuilderRequiredApproval[];
|
|
973
|
+
buildRequest: CampaignBuildRequest;
|
|
974
|
+
brainPreflight: UnknownRecord$1;
|
|
975
|
+
mcpFlow: CampaignBuilderMcpStep[];
|
|
976
|
+
estimatedCredits: number;
|
|
977
|
+
warnings: string[];
|
|
978
|
+
}
|
|
979
|
+
interface CampaignBuilderPlanOptions {
|
|
980
|
+
discoverCapabilities?: boolean;
|
|
981
|
+
scopeCampaign?: boolean;
|
|
982
|
+
}
|
|
983
|
+
declare const DEFAULT_SIGNALIZ_CAMPAIGN_BUILDER_DEFAULTS: Required<Pick<SignalizCampaignBuilderDefaults, 'requireVerifiedEmail' | 'dedupKeys' | 'allowDownscale'>> & SignalizCampaignBuilderDefaults;
|
|
984
|
+
declare class CampaignBuilderAgent {
|
|
985
|
+
private client;
|
|
986
|
+
constructor(client: HttpClient);
|
|
987
|
+
createPlan(request: CampaignBuilderAgentRequest, options?: CampaignBuilderPlanOptions): Promise<CampaignBuilderAgentPlan>;
|
|
988
|
+
dryRunPlan(plan: CampaignBuilderAgentPlan, options?: BuildOptions): Promise<CampaignBuildResult>;
|
|
989
|
+
buildApprovedPlan(plan: CampaignBuilderAgentPlan, approval: CampaignBuilderApproval, options?: BuildOptions): Promise<CampaignBuildResult>;
|
|
990
|
+
private getWorkspaceContext;
|
|
991
|
+
private scopeCampaign;
|
|
992
|
+
private discoverPlannedRoutes;
|
|
993
|
+
private callMcp;
|
|
994
|
+
}
|
|
995
|
+
declare function createCampaignBuilderAgentPlan(request: CampaignBuilderAgentRequest, context?: {
|
|
996
|
+
workspaceContext?: CampaignBuilderWorkspaceContext;
|
|
997
|
+
scopeBuildArgs?: UnknownRecord$1;
|
|
998
|
+
scopeBrainPreflight?: UnknownRecord$1;
|
|
999
|
+
warnings?: string[];
|
|
1000
|
+
}): CampaignBuilderAgentPlan;
|
|
1001
|
+
declare function getMissingCampaignBuilderApprovals(plan: CampaignBuilderAgentPlan, approval: CampaignBuilderApproval): CampaignBuilderRequiredApproval[];
|
|
1002
|
+
declare function createCampaignBuilderApproval(plan: CampaignBuilderAgentPlan, input: Omit<CampaignBuilderApproval, 'planId' | 'approvedAt'>): CampaignBuilderApproval;
|
|
1003
|
+
|
|
1004
|
+
interface IcpSummary {
|
|
1005
|
+
id: string;
|
|
1006
|
+
name: string;
|
|
1007
|
+
description?: string;
|
|
1008
|
+
industry_focus?: string[];
|
|
1009
|
+
target_job_titles?: string[];
|
|
1010
|
+
target_departments?: string[];
|
|
1011
|
+
geography?: string[];
|
|
1012
|
+
has_source_playbook_data: boolean;
|
|
1013
|
+
/** @deprecated Use has_source_playbook_data. */
|
|
1014
|
+
has_octave_data?: boolean;
|
|
1015
|
+
created_at: string;
|
|
1016
|
+
}
|
|
1017
|
+
interface IcpDetail extends IcpSummary {
|
|
1018
|
+
pain_points?: string[];
|
|
1019
|
+
buying_triggers?: string[];
|
|
1020
|
+
tech_stack?: string[];
|
|
1021
|
+
revenue_range?: string;
|
|
1022
|
+
employee_count_range?: string[];
|
|
1023
|
+
deep_analysis?: Record<string, unknown>;
|
|
1024
|
+
source_playbook_data?: Record<string, unknown>;
|
|
1025
|
+
/** @deprecated Use source_playbook_data. */
|
|
1026
|
+
octave_playbook_data?: Record<string, unknown>;
|
|
1027
|
+
updated_at: string;
|
|
1028
|
+
}
|
|
1029
|
+
interface ImportPlaybooksResult {
|
|
1030
|
+
imported: number;
|
|
1031
|
+
skipped: number;
|
|
1032
|
+
icps: Array<{
|
|
1033
|
+
id: string;
|
|
1034
|
+
name: string;
|
|
1035
|
+
}>;
|
|
1036
|
+
}
|
|
1037
|
+
/** @deprecated Use ImportPlaybooksResult. */
|
|
1038
|
+
type ImportOctaveResult = ImportPlaybooksResult;
|
|
1039
|
+
declare class Icps {
|
|
1040
|
+
private client;
|
|
1041
|
+
constructor(client: HttpClient);
|
|
1042
|
+
/** List all ICPs in the workspace */
|
|
1043
|
+
list(opts?: {
|
|
1044
|
+
includeSourcePlaybookData?: boolean;
|
|
1045
|
+
includeOctaveData?: boolean;
|
|
1046
|
+
}): Promise<IcpSummary[]>;
|
|
1047
|
+
/** Get full ICP details by ID */
|
|
1048
|
+
get(icpId: string): Promise<IcpDetail>;
|
|
1049
|
+
/** Import connected source playbooks as ICPs */
|
|
1050
|
+
importFromPlaybooks(playbookIds?: string[]): Promise<ImportPlaybooksResult>;
|
|
1051
|
+
/** @deprecated Use importFromPlaybooks. */
|
|
1052
|
+
importFromOctave(playbookIds?: string[]): Promise<ImportPlaybooksResult>;
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
declare class Leads {
|
|
1056
|
+
private client;
|
|
1057
|
+
constructor(client: HttpClient);
|
|
1058
|
+
/**
|
|
1059
|
+
* Generate B2B leads from a natural-language prompt.
|
|
1060
|
+
* Returns a job_id — poll with `runs.get(jobId)` or `check_job_status`.
|
|
1061
|
+
*/
|
|
1062
|
+
generate(params: GenerateLeadsParams): Promise<LeadGenJobResult>;
|
|
1063
|
+
/**
|
|
1064
|
+
* Generate local business leads via Google Maps + email scraping.
|
|
1065
|
+
* Returns a job_id — poll with `runs.get(jobId)` or `check_job_status`.
|
|
1066
|
+
*/
|
|
1067
|
+
generateLocal(params: GenerateLocalLeadsParams): Promise<LeadGenJobResult>;
|
|
1068
|
+
/**
|
|
1069
|
+
* List curated native GTM data sources with data-cost guardrails.
|
|
1070
|
+
*/
|
|
1071
|
+
listNativeGtmCapabilities(category?: string): Promise<NativeGtmCapabilityInfo[]>;
|
|
1072
|
+
/**
|
|
1073
|
+
* Run a curated native GTM capability. Returns a job_id; poll with `runs.get(jobId)`
|
|
1074
|
+
* or `checkStatus(jobId)`.
|
|
1075
|
+
*/
|
|
1076
|
+
runNativeGtmCapability(params: RunNativeGtmCapabilityParams): Promise<LeadGenJobResult>;
|
|
1077
|
+
/**
|
|
1078
|
+
* Free-text router: pass an intent like "pull youtube subscribers of @joshwhitfieldai"
|
|
1079
|
+
* and get back the top GTM capability matches with suggested args ready to run.
|
|
1080
|
+
*/
|
|
1081
|
+
findGtmCapability(intent: string): Promise<{
|
|
1082
|
+
matches: Array<{
|
|
1083
|
+
capability_id: string;
|
|
1084
|
+
label: string;
|
|
1085
|
+
category: string;
|
|
1086
|
+
score: number;
|
|
1087
|
+
why_it_matched: string[];
|
|
1088
|
+
required_input: string;
|
|
1089
|
+
suggested_args: Record<string, unknown>;
|
|
1090
|
+
}>;
|
|
1091
|
+
intent: string;
|
|
1092
|
+
}>;
|
|
1093
|
+
/**
|
|
1094
|
+
* Check the status of a lead generation job.
|
|
1095
|
+
*/
|
|
1096
|
+
checkStatus(jobId: string): Promise<Record<string, unknown>>;
|
|
1097
|
+
}
|
|
1098
|
+
|
|
1099
|
+
type ExecutionReferenceKind = 'op' | 'routine' | 'routine_tick' | 'trigger_run' | 'dataplane_run' | 'queue_job' | 'execution_event' | 'replay_run' | 'unknown';
|
|
1100
|
+
interface ExecutionReference {
|
|
1101
|
+
kind: ExecutionReferenceKind;
|
|
1102
|
+
id: string;
|
|
1103
|
+
original: string;
|
|
1104
|
+
label: string;
|
|
1105
|
+
query_field: string;
|
|
1106
|
+
status_command?: string;
|
|
1107
|
+
replay_command?: string;
|
|
1108
|
+
}
|
|
1109
|
+
interface ExecutionReferenceInput {
|
|
1110
|
+
id: string;
|
|
1111
|
+
kind?: ExecutionReferenceKind;
|
|
1112
|
+
source_field?: string;
|
|
1113
|
+
}
|
|
1114
|
+
declare function normalizeExecutionReference(input: string | ExecutionReferenceInput): ExecutionReference;
|
|
1115
|
+
declare function collectExecutionReferences(payload: Record<string, unknown>): ExecutionReference[];
|
|
1116
|
+
|
|
1117
|
+
type OpsCadence = 'hourly' | 'daily' | 'weekly' | 'manual';
|
|
1118
|
+
type OpsRoutineStatus = 'draft' | 'active' | 'paused' | 'archived' | 'failed';
|
|
1119
|
+
type OpsSinkType = 'csv' | 'webhook' | 'airbyte' | 'nango' | 'slack' | 'google_sheets' | 'notion' | 'instantly' | 'routine';
|
|
1120
|
+
type OpsBlueprint = 'monitor_companies' | 'build_leads' | 'enrich_list' | 'route_signals' | 'launch_campaign';
|
|
1121
|
+
type SimpleOpStatus = 'draft' | 'ready' | 'running' | 'blocked' | 'needs_approval' | 'completed' | 'failed';
|
|
1122
|
+
type OpsPrimitivePermissionLevel = 'read' | 'write' | 'spend' | 'admin';
|
|
1123
|
+
type OpsPrimitiveWorkspaceScope = 'required';
|
|
1124
|
+
interface OpsPrimitiveRetryPolicy {
|
|
1125
|
+
max_retries: number;
|
|
1126
|
+
maxRetries?: number;
|
|
1127
|
+
initial_delay_ms: number;
|
|
1128
|
+
initialDelayMs?: number;
|
|
1129
|
+
max_delay_ms: number;
|
|
1130
|
+
maxDelayMs?: number;
|
|
1131
|
+
backoff_multiplier: number;
|
|
1132
|
+
backoffMultiplier?: number;
|
|
1133
|
+
jitter: boolean;
|
|
1134
|
+
retryable_errors: string[];
|
|
1135
|
+
retryableErrors?: string[];
|
|
1136
|
+
respect_retry_after: boolean;
|
|
1137
|
+
respectRetryAfter?: boolean;
|
|
1138
|
+
}
|
|
1139
|
+
interface OpsPrimitiveConcurrencyPolicy {
|
|
1140
|
+
workspace_key: string;
|
|
1141
|
+
workspaceKey?: string;
|
|
1142
|
+
provider_key?: string;
|
|
1143
|
+
providerKey?: string;
|
|
1144
|
+
max_concurrency: number;
|
|
1145
|
+
maxConcurrency?: number;
|
|
1146
|
+
}
|
|
1147
|
+
interface OpsPrimitiveDeadLetterPolicy {
|
|
1148
|
+
enabled: boolean;
|
|
1149
|
+
queue: string;
|
|
1150
|
+
include_input_hash: boolean;
|
|
1151
|
+
includeInputHash?: boolean;
|
|
1152
|
+
include_execution_refs: boolean;
|
|
1153
|
+
includeExecutionRefs?: boolean;
|
|
1154
|
+
}
|
|
1155
|
+
interface OpsPrimitiveObservabilityPolicy {
|
|
1156
|
+
emits_execution_refs: boolean;
|
|
1157
|
+
emitsExecutionRefs?: boolean;
|
|
1158
|
+
emits_progress_events: boolean;
|
|
1159
|
+
emitsProgressEvents?: boolean;
|
|
1160
|
+
event_fields: string[];
|
|
1161
|
+
eventFields?: string[];
|
|
1162
|
+
}
|
|
1163
|
+
interface OpsPrimitive {
|
|
1164
|
+
id: string;
|
|
1165
|
+
version: string;
|
|
1166
|
+
capability: string;
|
|
1167
|
+
permission_level: OpsPrimitivePermissionLevel;
|
|
1168
|
+
permissionLevel?: OpsPrimitivePermissionLevel;
|
|
1169
|
+
workspace_scope: OpsPrimitiveWorkspaceScope;
|
|
1170
|
+
workspaceScope?: OpsPrimitiveWorkspaceScope;
|
|
1171
|
+
input_schema: Record<string, unknown>;
|
|
1172
|
+
inputSchema?: Record<string, unknown>;
|
|
1173
|
+
output_schema: Record<string, unknown>;
|
|
1174
|
+
outputSchema?: Record<string, unknown>;
|
|
1175
|
+
retry_policy: OpsPrimitiveRetryPolicy;
|
|
1176
|
+
retryPolicy?: OpsPrimitiveRetryPolicy;
|
|
1177
|
+
concurrency_policy: OpsPrimitiveConcurrencyPolicy;
|
|
1178
|
+
concurrencyPolicy?: OpsPrimitiveConcurrencyPolicy;
|
|
1179
|
+
rate_limit_key?: string;
|
|
1180
|
+
rateLimitKey?: string;
|
|
1181
|
+
idempotency_key_fields: string[];
|
|
1182
|
+
idempotencyKeyFields?: string[];
|
|
1183
|
+
dead_letter_policy: OpsPrimitiveDeadLetterPolicy;
|
|
1184
|
+
deadLetterPolicy?: OpsPrimitiveDeadLetterPolicy;
|
|
1185
|
+
observability: OpsPrimitiveObservabilityPolicy;
|
|
1186
|
+
}
|
|
1187
|
+
interface OpsSink {
|
|
1188
|
+
id?: string;
|
|
1189
|
+
sinkId?: string;
|
|
1190
|
+
sink_id?: string;
|
|
1191
|
+
connectionId?: string;
|
|
1192
|
+
connection_id?: string;
|
|
1193
|
+
type: OpsSinkType;
|
|
1194
|
+
name?: string;
|
|
1195
|
+
connectorId?: string;
|
|
1196
|
+
connector_id?: string;
|
|
1197
|
+
category?: string;
|
|
1198
|
+
status?: string;
|
|
1199
|
+
syncStatus?: string | null;
|
|
1200
|
+
sync_status?: string | null;
|
|
1201
|
+
lastSyncedAt?: string | null;
|
|
1202
|
+
last_synced_at?: string | null;
|
|
1203
|
+
config?: Record<string, unknown>;
|
|
1204
|
+
enabled?: boolean;
|
|
1205
|
+
}
|
|
1206
|
+
interface OpsRoutine {
|
|
1207
|
+
id?: string;
|
|
1208
|
+
routine_id?: string;
|
|
1209
|
+
routineId?: string;
|
|
1210
|
+
name?: string;
|
|
1211
|
+
goal?: string;
|
|
1212
|
+
cadence?: OpsCadence | string;
|
|
1213
|
+
status?: OpsRoutineStatus | string;
|
|
1214
|
+
lastTickAt?: string | null;
|
|
1215
|
+
last_tick_at?: string | null;
|
|
1216
|
+
nextTickAt?: string | null;
|
|
1217
|
+
next_tick_at?: string | null;
|
|
1218
|
+
outputSinks?: OpsSink[];
|
|
1219
|
+
output_sinks?: OpsSink[];
|
|
1220
|
+
execution_refs?: ExecutionReference[];
|
|
1221
|
+
[key: string]: unknown;
|
|
1222
|
+
}
|
|
1223
|
+
interface OpsRoutinesResult {
|
|
1224
|
+
routines: OpsRoutine[];
|
|
1225
|
+
total?: number;
|
|
1226
|
+
next_cursor?: string | null;
|
|
1227
|
+
nextCursor?: string | null;
|
|
1228
|
+
has_more?: boolean;
|
|
1229
|
+
hasMore?: boolean;
|
|
1230
|
+
}
|
|
1231
|
+
interface OpsRoutineTick {
|
|
1232
|
+
id?: string;
|
|
1233
|
+
tick_id?: string;
|
|
1234
|
+
tickId?: string;
|
|
1235
|
+
routine_id?: string;
|
|
1236
|
+
routineId?: string;
|
|
1237
|
+
status?: string;
|
|
1238
|
+
state?: string;
|
|
1239
|
+
started_at?: string | null;
|
|
1240
|
+
startedAt?: string | null;
|
|
1241
|
+
completed_at?: string | null;
|
|
1242
|
+
completedAt?: string | null;
|
|
1243
|
+
error_message?: string | null;
|
|
1244
|
+
errorMessage?: string | null;
|
|
1245
|
+
execution_refs?: ExecutionReference[];
|
|
1246
|
+
[key: string]: unknown;
|
|
1247
|
+
}
|
|
1248
|
+
interface OpsRoutineTicksResult {
|
|
1249
|
+
ticks: OpsRoutineTick[];
|
|
1250
|
+
items?: OpsRoutineTick[];
|
|
1251
|
+
next_cursor?: string | null;
|
|
1252
|
+
nextCursor?: string | null;
|
|
1253
|
+
has_more?: boolean;
|
|
1254
|
+
hasMore?: boolean;
|
|
1255
|
+
[key: string]: unknown;
|
|
1256
|
+
}
|
|
1257
|
+
interface OpsRoutineTickItem {
|
|
1258
|
+
id?: string;
|
|
1259
|
+
item_id?: string;
|
|
1260
|
+
itemId?: string;
|
|
1261
|
+
tick_id?: string;
|
|
1262
|
+
tickId?: string;
|
|
1263
|
+
routine_id?: string;
|
|
1264
|
+
routineId?: string;
|
|
1265
|
+
state?: string;
|
|
1266
|
+
status?: string;
|
|
1267
|
+
error_message?: string | null;
|
|
1268
|
+
errorMessage?: string | null;
|
|
1269
|
+
payload?: Record<string, unknown>;
|
|
1270
|
+
row?: Record<string, unknown>;
|
|
1271
|
+
execution_refs?: ExecutionReference[];
|
|
1272
|
+
[key: string]: unknown;
|
|
1273
|
+
}
|
|
1274
|
+
interface OpsRoutineTickItemsResult {
|
|
1275
|
+
items: OpsRoutineTickItem[];
|
|
1276
|
+
rows?: OpsRoutineTickItem[];
|
|
1277
|
+
next_cursor?: string | null;
|
|
1278
|
+
nextCursor?: string | null;
|
|
1279
|
+
has_more?: boolean;
|
|
1280
|
+
hasMore?: boolean;
|
|
1281
|
+
[key: string]: unknown;
|
|
1282
|
+
}
|
|
1283
|
+
interface OpsReadinessOptions {
|
|
1284
|
+
windowHours?: number;
|
|
1285
|
+
includeDetails?: boolean;
|
|
1286
|
+
runAcquisitionProbe?: boolean;
|
|
1287
|
+
}
|
|
1288
|
+
interface OpsReadinessCheck {
|
|
1289
|
+
id: string;
|
|
1290
|
+
label: string;
|
|
1291
|
+
status: 'pass' | 'warn' | 'fail';
|
|
1292
|
+
detail: string;
|
|
1293
|
+
next_action?: string;
|
|
1294
|
+
nextAction?: string;
|
|
1295
|
+
}
|
|
1296
|
+
interface OpsReadinessResult {
|
|
1297
|
+
status: 'ready' | 'degraded' | 'blocked';
|
|
1298
|
+
checked_at?: string;
|
|
1299
|
+
checkedAt: string;
|
|
1300
|
+
credits_used?: 0;
|
|
1301
|
+
creditsUsed: 0;
|
|
1302
|
+
credits_charged?: 0;
|
|
1303
|
+
creditsCharged: 0;
|
|
1304
|
+
summary: {
|
|
1305
|
+
active_connections?: number;
|
|
1306
|
+
activeConnections: number;
|
|
1307
|
+
failing_connections?: number;
|
|
1308
|
+
failingConnections: number;
|
|
1309
|
+
active_routines?: number;
|
|
1310
|
+
activeRoutines: number;
|
|
1311
|
+
recent_failed_ticks?: number;
|
|
1312
|
+
recentFailedTicks: number;
|
|
1313
|
+
queued_deliveries?: number;
|
|
1314
|
+
queuedDeliveries: number;
|
|
1315
|
+
pending_approvals?: number;
|
|
1316
|
+
pendingApprovals: number;
|
|
1317
|
+
lead_records?: number;
|
|
1318
|
+
leadRecords: number;
|
|
1319
|
+
recent_acquisition_failures?: number;
|
|
1320
|
+
recentAcquisitionFailures: number;
|
|
1321
|
+
acquisition_probe_status?: string;
|
|
1322
|
+
acquisitionProbeStatus?: string;
|
|
1323
|
+
};
|
|
1324
|
+
checks: OpsReadinessCheck[];
|
|
1325
|
+
next_actions?: string[];
|
|
1326
|
+
nextActions: string[];
|
|
1327
|
+
raw?: Record<string, unknown>;
|
|
1328
|
+
}
|
|
1329
|
+
interface OpsProofOptions {
|
|
1330
|
+
windowHours?: number;
|
|
1331
|
+
}
|
|
1332
|
+
interface OpsProofDestination {
|
|
1333
|
+
type: string;
|
|
1334
|
+
label: string;
|
|
1335
|
+
connected: boolean;
|
|
1336
|
+
healthy: boolean;
|
|
1337
|
+
delivered: number;
|
|
1338
|
+
failed: number;
|
|
1339
|
+
proof: 'verified' | 'connected' | 'needs_attention' | 'not_connected' | string;
|
|
1340
|
+
}
|
|
1341
|
+
interface OpsProofResult {
|
|
1342
|
+
success?: boolean;
|
|
1343
|
+
status: 'ready' | 'partial' | 'unproven' | 'blocked' | string;
|
|
1344
|
+
proof_state?: string;
|
|
1345
|
+
proofState?: string;
|
|
1346
|
+
phase?: string;
|
|
1347
|
+
checked_at?: string;
|
|
1348
|
+
checkedAt?: string;
|
|
1349
|
+
window_hours?: number;
|
|
1350
|
+
windowHours?: number;
|
|
1351
|
+
label: string;
|
|
1352
|
+
ui_summary?: string;
|
|
1353
|
+
uiSummary?: string;
|
|
1354
|
+
founder_verdict?: string;
|
|
1355
|
+
founderVerdict?: string;
|
|
1356
|
+
description?: string;
|
|
1357
|
+
summary: {
|
|
1358
|
+
connected_destinations?: number;
|
|
1359
|
+
connectedDestinations: number;
|
|
1360
|
+
healthy_destinations?: number;
|
|
1361
|
+
healthyDestinations: number;
|
|
1362
|
+
failing_destinations?: number;
|
|
1363
|
+
failingDestinations: number;
|
|
1364
|
+
deliveries_30d?: number;
|
|
1365
|
+
deliveries30d: number;
|
|
1366
|
+
delivered_30d?: number;
|
|
1367
|
+
delivered30d: number;
|
|
1368
|
+
failed_30d?: number;
|
|
1369
|
+
failed30d: number;
|
|
1370
|
+
external_delivered_30d?: number;
|
|
1371
|
+
externalDelivered30d: number;
|
|
1372
|
+
airbyte_configured?: number;
|
|
1373
|
+
airbyteConfigured: number;
|
|
1374
|
+
airbyte_proofs_30d?: number;
|
|
1375
|
+
airbyteProofs30d: number;
|
|
1376
|
+
airbyte_failures_30d?: number;
|
|
1377
|
+
airbyteFailures30d: number;
|
|
1378
|
+
};
|
|
1379
|
+
destinations: OpsProofDestination[];
|
|
1380
|
+
blockers?: string[];
|
|
1381
|
+
next_action?: string;
|
|
1382
|
+
nextAction?: string;
|
|
1383
|
+
next_actions?: string[];
|
|
1384
|
+
nextActions?: string[];
|
|
1385
|
+
estimated_credits?: number;
|
|
1386
|
+
estimatedCredits?: number;
|
|
1387
|
+
approval_required?: boolean;
|
|
1388
|
+
approvalRequired?: boolean;
|
|
1389
|
+
credits_charged?: 0;
|
|
1390
|
+
creditsCharged?: 0;
|
|
1391
|
+
proof_mode?: boolean;
|
|
1392
|
+
proofMode?: boolean;
|
|
1393
|
+
query_errors?: string[];
|
|
1394
|
+
queryErrors?: string[];
|
|
1395
|
+
raw?: Record<string, unknown>;
|
|
1396
|
+
}
|
|
1397
|
+
interface OpsAutopilotOptions {
|
|
1398
|
+
windowHours?: number;
|
|
1399
|
+
}
|
|
1400
|
+
interface OpsAutopilotStep {
|
|
1401
|
+
tool: string;
|
|
1402
|
+
purpose?: string;
|
|
1403
|
+
arguments?: Record<string, unknown>;
|
|
1404
|
+
}
|
|
1405
|
+
interface OpsAutopilotMotion {
|
|
1406
|
+
id: string;
|
|
1407
|
+
blueprint: OpsBlueprint;
|
|
1408
|
+
title: string;
|
|
1409
|
+
outcome: string;
|
|
1410
|
+
prompt: string;
|
|
1411
|
+
target_count: number;
|
|
1412
|
+
targetCount?: number;
|
|
1413
|
+
cadence: OpsCadence | string;
|
|
1414
|
+
destinations: OpsSinkType[];
|
|
1415
|
+
estimated_credits: number;
|
|
1416
|
+
estimatedCredits?: number;
|
|
1417
|
+
proof_gate?: string;
|
|
1418
|
+
proofGate?: string;
|
|
1419
|
+
why_now?: string;
|
|
1420
|
+
whyNow?: string;
|
|
1421
|
+
agent_prompt?: string;
|
|
1422
|
+
agentPrompt?: string;
|
|
1423
|
+
cli_command?: string;
|
|
1424
|
+
cliCommand?: string;
|
|
1425
|
+
mcp_sequence?: OpsAutopilotStep[];
|
|
1426
|
+
mcpSequence?: OpsAutopilotStep[];
|
|
1427
|
+
}
|
|
1428
|
+
interface OpsAutopilotResult {
|
|
1429
|
+
success?: boolean;
|
|
1430
|
+
status?: string;
|
|
1431
|
+
phase?: string;
|
|
1432
|
+
stage: string;
|
|
1433
|
+
headline: string;
|
|
1434
|
+
verdict: string;
|
|
1435
|
+
next_action: string;
|
|
1436
|
+
nextAction?: string;
|
|
1437
|
+
primary_motion: OpsAutopilotMotion;
|
|
1438
|
+
primaryMotion?: OpsAutopilotMotion;
|
|
1439
|
+
motions: OpsAutopilotMotion[];
|
|
1440
|
+
scale_rule?: string;
|
|
1441
|
+
scaleRule?: string;
|
|
1442
|
+
agent_handoff?: string;
|
|
1443
|
+
agentHandoff?: string;
|
|
1444
|
+
proof_state?: string;
|
|
1445
|
+
proofState?: string;
|
|
1446
|
+
proof_summary?: Record<string, unknown>;
|
|
1447
|
+
proofSummary?: Record<string, unknown>;
|
|
1448
|
+
next_step?: Record<string, unknown>;
|
|
1449
|
+
nextStep?: Record<string, unknown>;
|
|
1450
|
+
query_errors?: string[];
|
|
1451
|
+
queryErrors?: string[];
|
|
1452
|
+
credits_charged?: 0;
|
|
1453
|
+
creditsCharged?: 0;
|
|
1454
|
+
}
|
|
1455
|
+
interface CreateRoutineRequest {
|
|
1456
|
+
name: string;
|
|
1457
|
+
goal: string;
|
|
1458
|
+
description?: string;
|
|
1459
|
+
cadence?: OpsCadence;
|
|
1460
|
+
timezone?: string;
|
|
1461
|
+
status?: Extract<OpsRoutineStatus, 'draft' | 'active' | 'paused'>;
|
|
1462
|
+
policy?: Record<string, unknown>;
|
|
1463
|
+
output_sinks?: OpsSink[];
|
|
1464
|
+
outputSinks?: OpsSink[];
|
|
1465
|
+
wake_on_events?: string[];
|
|
1466
|
+
wakeOnEvents?: string[];
|
|
1467
|
+
}
|
|
1468
|
+
interface UpdateRoutineRequest extends Partial<CreateRoutineRequest> {
|
|
1469
|
+
routine_id?: string;
|
|
1470
|
+
routineId?: string;
|
|
1471
|
+
}
|
|
1472
|
+
interface RunRoutineRequest {
|
|
1473
|
+
routine_id?: string;
|
|
1474
|
+
routineId?: string;
|
|
1475
|
+
instruction?: string;
|
|
1476
|
+
force?: boolean;
|
|
1477
|
+
}
|
|
1478
|
+
interface OpsRoutineRunResult {
|
|
1479
|
+
success?: boolean;
|
|
1480
|
+
routine_id?: string;
|
|
1481
|
+
routineId?: string;
|
|
1482
|
+
tick_id?: string;
|
|
1483
|
+
tickId?: string;
|
|
1484
|
+
run_id?: string | null;
|
|
1485
|
+
runId?: string | null;
|
|
1486
|
+
status?: string;
|
|
1487
|
+
state?: string;
|
|
1488
|
+
next_action?: string;
|
|
1489
|
+
nextAction?: string;
|
|
1490
|
+
execution_refs?: ExecutionReference[];
|
|
1491
|
+
[key: string]: unknown;
|
|
1492
|
+
}
|
|
1493
|
+
interface OpsRoutineDeleteResult {
|
|
1494
|
+
success?: boolean;
|
|
1495
|
+
routine_id?: string;
|
|
1496
|
+
routineId?: string;
|
|
1497
|
+
deleted?: boolean;
|
|
1498
|
+
permanent?: boolean;
|
|
1499
|
+
status?: string;
|
|
1500
|
+
next_action?: string;
|
|
1501
|
+
nextAction?: string;
|
|
1502
|
+
execution_refs?: ExecutionReference[];
|
|
1503
|
+
[key: string]: unknown;
|
|
1504
|
+
}
|
|
1505
|
+
interface OpsRoutineSinkResult {
|
|
1506
|
+
success?: boolean;
|
|
1507
|
+
routine_id?: string;
|
|
1508
|
+
routineId?: string;
|
|
1509
|
+
sink_id?: string;
|
|
1510
|
+
sinkId?: string;
|
|
1511
|
+
status?: string;
|
|
1512
|
+
next_action?: string;
|
|
1513
|
+
nextAction?: string;
|
|
1514
|
+
routine?: OpsRoutine;
|
|
1515
|
+
sink?: OpsSink;
|
|
1516
|
+
execution_refs?: ExecutionReference[];
|
|
1517
|
+
[key: string]: unknown;
|
|
1518
|
+
}
|
|
1519
|
+
interface ListOutputSinksOptions {
|
|
1520
|
+
status?: string;
|
|
1521
|
+
category?: string;
|
|
1522
|
+
include_inactive?: boolean;
|
|
1523
|
+
includeInactive?: boolean;
|
|
1524
|
+
}
|
|
1525
|
+
interface CreateOutputSinkRequest {
|
|
1526
|
+
type: Exclude<OpsSinkType, 'routine'>;
|
|
1527
|
+
name?: string;
|
|
1528
|
+
connection_id?: string;
|
|
1529
|
+
connectionId?: string;
|
|
1530
|
+
config?: Record<string, unknown>;
|
|
1531
|
+
webhook_url?: string;
|
|
1532
|
+
webhookUrl?: string;
|
|
1533
|
+
}
|
|
1534
|
+
interface OpsApproveRequest {
|
|
1535
|
+
token_id?: string;
|
|
1536
|
+
tokenId?: string;
|
|
1537
|
+
token_ids?: string[];
|
|
1538
|
+
tokenIds?: string[];
|
|
1539
|
+
decision?: 'approved' | 'rejected';
|
|
1540
|
+
reviewer_notes?: string;
|
|
1541
|
+
reviewerNotes?: string;
|
|
1542
|
+
}
|
|
1543
|
+
interface OpsApproveResult {
|
|
1544
|
+
success: boolean;
|
|
1545
|
+
decision?: 'approved' | 'rejected' | string;
|
|
1546
|
+
token_id?: string;
|
|
1547
|
+
tokenId?: string;
|
|
1548
|
+
token_ids?: string[];
|
|
1549
|
+
tokenIds?: string[];
|
|
1550
|
+
reviewer_notes?: string;
|
|
1551
|
+
reviewerNotes?: string;
|
|
1552
|
+
[key: string]: unknown;
|
|
1553
|
+
}
|
|
1554
|
+
interface OpsPlanRequest {
|
|
1555
|
+
prompt: string;
|
|
1556
|
+
blueprint?: OpsBlueprint;
|
|
1557
|
+
target_count?: number;
|
|
1558
|
+
targetCount?: number;
|
|
1559
|
+
cadence?: OpsCadence;
|
|
1560
|
+
destinations?: Array<Record<string, unknown>>;
|
|
1561
|
+
company_domains?: string[];
|
|
1562
|
+
companyDomains?: string[];
|
|
1563
|
+
custom_ai_prompt?: string;
|
|
1564
|
+
customAiPrompt?: string;
|
|
1565
|
+
signal_prompt?: string;
|
|
1566
|
+
signalPrompt?: string;
|
|
1567
|
+
output_prompt?: string;
|
|
1568
|
+
outputPrompt?: string;
|
|
1569
|
+
}
|
|
1570
|
+
interface OpsPlanResult {
|
|
1571
|
+
plan_id: string;
|
|
1572
|
+
planId?: string;
|
|
1573
|
+
blueprint: OpsBlueprint;
|
|
1574
|
+
title: string;
|
|
1575
|
+
goal: string;
|
|
1576
|
+
target_count: number;
|
|
1577
|
+
targetCount?: number;
|
|
1578
|
+
cadence: OpsCadence;
|
|
1579
|
+
status: SimpleOpStatus | string;
|
|
1580
|
+
estimated_credits: number;
|
|
1581
|
+
estimatedCredits?: number;
|
|
1582
|
+
approval_required: boolean;
|
|
1583
|
+
approvalRequired?: boolean;
|
|
1584
|
+
destinations: Array<Record<string, unknown>>;
|
|
1585
|
+
blockers: string[];
|
|
1586
|
+
expected_output?: string;
|
|
1587
|
+
expectedOutput?: string;
|
|
1588
|
+
next_action: string;
|
|
1589
|
+
nextAction?: string;
|
|
1590
|
+
ui_summary?: string;
|
|
1591
|
+
uiSummary?: string;
|
|
1592
|
+
review_steps?: Array<{
|
|
1593
|
+
label: string;
|
|
1594
|
+
value: string;
|
|
1595
|
+
status?: string;
|
|
1596
|
+
}>;
|
|
1597
|
+
reviewSteps?: Array<{
|
|
1598
|
+
label: string;
|
|
1599
|
+
value: string;
|
|
1600
|
+
status?: string;
|
|
1601
|
+
}>;
|
|
1602
|
+
fix_actions?: string[];
|
|
1603
|
+
fixActions?: string[];
|
|
1604
|
+
destination_status?: string;
|
|
1605
|
+
destinationStatus?: string;
|
|
1606
|
+
customization?: {
|
|
1607
|
+
custom_ai_prompt?: string;
|
|
1608
|
+
signal_prompt?: string;
|
|
1609
|
+
output_prompt?: string;
|
|
1610
|
+
[key: string]: unknown;
|
|
1611
|
+
};
|
|
1612
|
+
primitive_graph?: OpsPrimitive[];
|
|
1613
|
+
primitiveGraph?: OpsPrimitive[];
|
|
1614
|
+
advanced?: Record<string, unknown>;
|
|
1615
|
+
}
|
|
1616
|
+
interface OpsCreateRequest extends OpsPlanRequest {
|
|
1617
|
+
name?: string;
|
|
1618
|
+
description?: string;
|
|
1619
|
+
policy?: Record<string, unknown>;
|
|
1620
|
+
activate?: boolean;
|
|
1621
|
+
confirm_spend?: boolean;
|
|
1622
|
+
confirmSpend?: boolean;
|
|
1623
|
+
}
|
|
1624
|
+
interface OpsExecuteRequest extends OpsCreateRequest {
|
|
1625
|
+
auto_run?: boolean;
|
|
1626
|
+
autoRun?: boolean;
|
|
1627
|
+
dry_run?: boolean;
|
|
1628
|
+
dryRun?: boolean;
|
|
1629
|
+
output_format?: 'markdown' | 'json';
|
|
1630
|
+
outputFormat?: 'markdown' | 'json';
|
|
1631
|
+
}
|
|
1632
|
+
interface OpsCreateResult {
|
|
1633
|
+
success: boolean;
|
|
1634
|
+
op_id: string;
|
|
1635
|
+
opId?: string;
|
|
1636
|
+
routine_id?: string;
|
|
1637
|
+
routineId?: string;
|
|
1638
|
+
run_id?: string | null;
|
|
1639
|
+
runId?: string | null;
|
|
1640
|
+
status: SimpleOpStatus | string;
|
|
1641
|
+
phase: string;
|
|
1642
|
+
next_action: string;
|
|
1643
|
+
nextAction?: string;
|
|
1644
|
+
results_count: number;
|
|
1645
|
+
resultsCount?: number;
|
|
1646
|
+
results_url?: string;
|
|
1647
|
+
resultsUrl?: string;
|
|
1648
|
+
delivery_status?: string;
|
|
1649
|
+
deliveryStatus?: string;
|
|
1650
|
+
estimated_credits?: number;
|
|
1651
|
+
estimatedCredits?: number;
|
|
1652
|
+
plan?: OpsPlanResult;
|
|
1653
|
+
execution_refs?: ExecutionReference[];
|
|
1654
|
+
}
|
|
1655
|
+
interface OpsExecuteResult extends OpsCreateResult {
|
|
1656
|
+
error_code?: string;
|
|
1657
|
+
errorCode?: string;
|
|
1658
|
+
approval?: Record<string, unknown>;
|
|
1659
|
+
approval_required?: boolean;
|
|
1660
|
+
approvalRequired?: boolean;
|
|
1661
|
+
retry_arguments?: Record<string, unknown>;
|
|
1662
|
+
retryArguments?: Record<string, unknown>;
|
|
1663
|
+
next_step?: Record<string, unknown>;
|
|
1664
|
+
nextStep?: Record<string, unknown>;
|
|
1665
|
+
next_steps?: string[];
|
|
1666
|
+
nextSteps?: string[];
|
|
1667
|
+
blockers?: string[];
|
|
1668
|
+
}
|
|
1669
|
+
interface OpsRunOptions {
|
|
1670
|
+
op_id?: string;
|
|
1671
|
+
opId?: string;
|
|
1672
|
+
instruction?: string;
|
|
1673
|
+
force?: boolean;
|
|
1674
|
+
}
|
|
1675
|
+
interface OpsRunResult {
|
|
1676
|
+
success: boolean;
|
|
1677
|
+
op_id: string;
|
|
1678
|
+
opId?: string;
|
|
1679
|
+
routine_id?: string;
|
|
1680
|
+
routineId?: string;
|
|
1681
|
+
run_id?: string | null;
|
|
1682
|
+
runId?: string | null;
|
|
1683
|
+
status: SimpleOpStatus | string;
|
|
1684
|
+
phase: string;
|
|
1685
|
+
next_action: string;
|
|
1686
|
+
nextAction?: string;
|
|
1687
|
+
results_count?: number;
|
|
1688
|
+
resultsCount?: number;
|
|
1689
|
+
results_url?: string;
|
|
1690
|
+
resultsUrl?: string;
|
|
1691
|
+
delivery_status?: string;
|
|
1692
|
+
deliveryStatus?: string;
|
|
1693
|
+
execution_refs?: ExecutionReference[];
|
|
1694
|
+
}
|
|
1695
|
+
interface OpsStatusOptions {
|
|
1696
|
+
op_id?: string;
|
|
1697
|
+
opId?: string;
|
|
1698
|
+
}
|
|
1699
|
+
interface OpsStatusResult extends OpsRunResult {
|
|
1700
|
+
estimated_credits?: number | null;
|
|
1701
|
+
estimatedCredits?: number | null;
|
|
1702
|
+
latest_run?: Record<string, unknown> | null;
|
|
1703
|
+
latestRun?: Record<string, unknown> | null;
|
|
1704
|
+
diagnosis?: OpsDebugDiagnosis;
|
|
1705
|
+
}
|
|
1706
|
+
interface OpsResultsOptions {
|
|
1707
|
+
op_id?: string;
|
|
1708
|
+
opId?: string;
|
|
1709
|
+
limit?: number;
|
|
1710
|
+
cursor?: string;
|
|
1711
|
+
nextCursor?: string;
|
|
1712
|
+
state?: string;
|
|
1713
|
+
include_failed_runs?: boolean;
|
|
1714
|
+
includeFailedRuns?: boolean;
|
|
1715
|
+
}
|
|
1716
|
+
interface OpsResultsResult {
|
|
1717
|
+
success: boolean;
|
|
1718
|
+
op_id: string;
|
|
1719
|
+
opId?: string;
|
|
1720
|
+
routine_id?: string;
|
|
1721
|
+
routineId?: string;
|
|
1722
|
+
run_id?: string | null;
|
|
1723
|
+
runId?: string | null;
|
|
1724
|
+
status: SimpleOpStatus | string;
|
|
1725
|
+
phase: string;
|
|
1726
|
+
results_count: number;
|
|
1727
|
+
resultsCount?: number;
|
|
1728
|
+
results_total?: number | null;
|
|
1729
|
+
resultsTotal?: number | null;
|
|
1730
|
+
results: Array<Record<string, unknown>>;
|
|
1731
|
+
next_cursor?: string | null;
|
|
1732
|
+
nextCursor?: string | null;
|
|
1733
|
+
has_more: boolean;
|
|
1734
|
+
hasMore?: boolean;
|
|
1735
|
+
next_action: string;
|
|
1736
|
+
nextAction?: string;
|
|
1737
|
+
results_url?: string;
|
|
1738
|
+
resultsUrl?: string;
|
|
1739
|
+
delivery_status?: string;
|
|
1740
|
+
deliveryStatus?: string;
|
|
1741
|
+
execution_refs?: ExecutionReference[];
|
|
1742
|
+
}
|
|
1743
|
+
interface OpsTriggerRunStatus {
|
|
1744
|
+
success: boolean;
|
|
1745
|
+
run_id: string;
|
|
1746
|
+
runId?: string;
|
|
1747
|
+
status: string;
|
|
1748
|
+
output?: unknown;
|
|
1749
|
+
error?: unknown;
|
|
1750
|
+
costInCents?: number;
|
|
1751
|
+
baseCostInCents?: number;
|
|
1752
|
+
durationMs?: number;
|
|
1753
|
+
_note?: string;
|
|
1754
|
+
diagnosis?: OpsDebugDiagnosis;
|
|
1755
|
+
execution_refs?: ExecutionReference[];
|
|
1756
|
+
}
|
|
1757
|
+
interface OpsTriggerBatchRunStatus {
|
|
1758
|
+
success: boolean;
|
|
1759
|
+
runs: OpsTriggerRunStatus[];
|
|
1760
|
+
}
|
|
1761
|
+
type OpsTriggerRunStatusOptions = {
|
|
1762
|
+
run_id: string;
|
|
1763
|
+
runId?: never;
|
|
1764
|
+
run_ids?: never;
|
|
1765
|
+
runIds?: never;
|
|
1766
|
+
} | {
|
|
1767
|
+
runId: string;
|
|
1768
|
+
run_id?: never;
|
|
1769
|
+
run_ids?: never;
|
|
1770
|
+
runIds?: never;
|
|
1771
|
+
} | {
|
|
1772
|
+
run_ids: string[];
|
|
1773
|
+
run_id?: never;
|
|
1774
|
+
runId?: never;
|
|
1775
|
+
runIds?: never;
|
|
1776
|
+
} | {
|
|
1777
|
+
runIds: string[];
|
|
1778
|
+
run_id?: never;
|
|
1779
|
+
runId?: never;
|
|
1780
|
+
run_ids?: never;
|
|
1781
|
+
};
|
|
1782
|
+
interface OpsQueueStatusOptions {
|
|
1783
|
+
job_id?: string;
|
|
1784
|
+
jobId?: string;
|
|
1785
|
+
idempotency_key?: string;
|
|
1786
|
+
idempotencyKey?: string;
|
|
1787
|
+
summary?: boolean;
|
|
1788
|
+
}
|
|
1789
|
+
interface OpsQueueStatus {
|
|
1790
|
+
success: boolean;
|
|
1791
|
+
producer_envelope?: OpsQueueProducerEnvelope;
|
|
1792
|
+
producerEnvelope?: OpsQueueProducerEnvelope;
|
|
1793
|
+
queue?: {
|
|
1794
|
+
pending?: number;
|
|
1795
|
+
processing?: number;
|
|
1796
|
+
};
|
|
1797
|
+
summary?: {
|
|
1798
|
+
queue?: {
|
|
1799
|
+
pending?: number;
|
|
1800
|
+
processing?: number;
|
|
1801
|
+
completed_last_hour?: number;
|
|
1802
|
+
completedLastHour?: number;
|
|
1803
|
+
failed_last_hour?: number;
|
|
1804
|
+
failedLastHour?: number;
|
|
1805
|
+
pending_by_function?: Record<string, number>;
|
|
1806
|
+
pendingByFunction?: Record<string, number>;
|
|
1807
|
+
};
|
|
1808
|
+
providers?: Record<string, unknown>;
|
|
1809
|
+
provider_stats?: Record<string, unknown>;
|
|
1810
|
+
providerStats?: Record<string, unknown>;
|
|
1811
|
+
redis_status?: Record<string, unknown>;
|
|
1812
|
+
redisStatus?: Record<string, unknown>;
|
|
1813
|
+
recent_events?: Array<Record<string, unknown>>;
|
|
1814
|
+
recentEvents?: Array<Record<string, unknown>>;
|
|
1815
|
+
};
|
|
1816
|
+
job?: {
|
|
1817
|
+
id?: string;
|
|
1818
|
+
jobId?: string;
|
|
1819
|
+
status?: string;
|
|
1820
|
+
function_name?: string;
|
|
1821
|
+
functionName?: string;
|
|
1822
|
+
estimated_wait_ms?: number;
|
|
1823
|
+
estimatedWaitMs?: number;
|
|
1824
|
+
error_message?: string;
|
|
1825
|
+
errorMessage?: string;
|
|
1826
|
+
[key: string]: unknown;
|
|
1827
|
+
};
|
|
1828
|
+
error?: string;
|
|
1829
|
+
diagnosis?: OpsDebugDiagnosis;
|
|
1830
|
+
execution_refs?: ExecutionReference[];
|
|
1831
|
+
}
|
|
1832
|
+
interface OpsQueueProducerEnvelope {
|
|
1833
|
+
schema_version?: string;
|
|
1834
|
+
schemaVersion?: string;
|
|
1835
|
+
producer?: string;
|
|
1836
|
+
queue_name?: string;
|
|
1837
|
+
queueName?: string;
|
|
1838
|
+
status_source?: string;
|
|
1839
|
+
statusSource?: string;
|
|
1840
|
+
idempotency_key?: string | null;
|
|
1841
|
+
idempotencyKey?: string | null;
|
|
1842
|
+
job_id?: string | null;
|
|
1843
|
+
jobId?: string | null;
|
|
1844
|
+
summary_requested?: boolean;
|
|
1845
|
+
summaryRequested?: boolean;
|
|
1846
|
+
retry_after_ms?: number;
|
|
1847
|
+
retryAfterMs?: number;
|
|
1848
|
+
poll_after_seconds?: number;
|
|
1849
|
+
pollAfterSeconds?: number;
|
|
1850
|
+
emitted_at?: string;
|
|
1851
|
+
emittedAt?: string;
|
|
1852
|
+
[key: string]: unknown;
|
|
1853
|
+
}
|
|
1854
|
+
interface OpsReplayResult {
|
|
1855
|
+
success: boolean;
|
|
1856
|
+
replay_run_id: string;
|
|
1857
|
+
replayRunId?: string;
|
|
1858
|
+
original_run_id: string;
|
|
1859
|
+
originalRunId?: string;
|
|
1860
|
+
start_from_node: number;
|
|
1861
|
+
startFromNode?: number;
|
|
1862
|
+
total_nodes: number;
|
|
1863
|
+
totalNodes?: number;
|
|
1864
|
+
diagnosis?: OpsDebugDiagnosis;
|
|
1865
|
+
execution_refs?: ExecutionReference[];
|
|
1866
|
+
}
|
|
1867
|
+
interface OpsDashboardOptions {
|
|
1868
|
+
section?: 'summary' | 'functions' | 'workspaces' | 'timeseries' | 'sources' | 'recent';
|
|
1869
|
+
timeRangeDays?: number;
|
|
1870
|
+
granularity?: 'hour' | 'day' | 'week' | 'month';
|
|
1871
|
+
limit?: number;
|
|
1872
|
+
}
|
|
1873
|
+
interface OpsDashboardResult {
|
|
1874
|
+
today_executions?: number;
|
|
1875
|
+
todayExecutions?: number;
|
|
1876
|
+
today_credits?: number;
|
|
1877
|
+
todayCredits?: number;
|
|
1878
|
+
month_executions?: number;
|
|
1879
|
+
monthExecutions?: number;
|
|
1880
|
+
month_credits?: number;
|
|
1881
|
+
monthCredits?: number;
|
|
1882
|
+
avg_execution_time_ms?: number;
|
|
1883
|
+
avgExecutionTimeMs?: number;
|
|
1884
|
+
[key: string]: unknown;
|
|
1885
|
+
}
|
|
1886
|
+
interface OpsDebugOptions {
|
|
1887
|
+
op_id?: string;
|
|
1888
|
+
opId?: string;
|
|
1889
|
+
include_results?: boolean;
|
|
1890
|
+
includeResults?: boolean;
|
|
1891
|
+
results_limit?: number;
|
|
1892
|
+
resultsLimit?: number;
|
|
1893
|
+
include_queue?: boolean;
|
|
1894
|
+
includeQueue?: boolean;
|
|
1895
|
+
include_dashboard?: boolean;
|
|
1896
|
+
includeDashboard?: boolean;
|
|
1897
|
+
dashboard_limit?: number;
|
|
1898
|
+
dashboardLimit?: number;
|
|
1899
|
+
time_range_days?: number;
|
|
1900
|
+
timeRangeDays?: number;
|
|
1901
|
+
}
|
|
1902
|
+
interface OpsDebugDiagnosticError {
|
|
1903
|
+
step: string;
|
|
1904
|
+
message: string;
|
|
1905
|
+
}
|
|
1906
|
+
interface OpsDebugDiagnosis {
|
|
1907
|
+
state: 'healthy' | 'running' | 'failed' | 'degraded' | 'unknown';
|
|
1908
|
+
retryable: boolean;
|
|
1909
|
+
queue_pending: number;
|
|
1910
|
+
queuePending?: number;
|
|
1911
|
+
queue_processing: number;
|
|
1912
|
+
queueProcessing?: number;
|
|
1913
|
+
queue_failed_last_hour: number;
|
|
1914
|
+
queueFailedLastHour?: number;
|
|
1915
|
+
provider_pressure: 'none' | 'low' | 'medium' | 'high';
|
|
1916
|
+
providerPressure?: 'none' | 'low' | 'medium' | 'high';
|
|
1917
|
+
failed_run_count: number;
|
|
1918
|
+
failedRunCount?: number;
|
|
1919
|
+
primary_error?: string;
|
|
1920
|
+
primaryError?: string;
|
|
1921
|
+
summary: string;
|
|
1922
|
+
}
|
|
1923
|
+
interface OpsDebugResult {
|
|
1924
|
+
success: boolean;
|
|
1925
|
+
op_id: string;
|
|
1926
|
+
opId?: string;
|
|
1927
|
+
checked_at: string;
|
|
1928
|
+
checkedAt?: string;
|
|
1929
|
+
diagnosis: OpsDebugDiagnosis;
|
|
1930
|
+
status: OpsStatusResult;
|
|
1931
|
+
execution_refs: ExecutionReference[];
|
|
1932
|
+
executionRefs?: ExecutionReference[];
|
|
1933
|
+
run_statuses: OpsTriggerRunStatus[];
|
|
1934
|
+
runStatuses?: OpsTriggerRunStatus[];
|
|
1935
|
+
queue?: OpsQueueStatus;
|
|
1936
|
+
dashboard_recent?: unknown;
|
|
1937
|
+
dashboardRecent?: unknown;
|
|
1938
|
+
results?: OpsResultsResult;
|
|
1939
|
+
replay_candidates: ExecutionReference[];
|
|
1940
|
+
replayCandidates?: ExecutionReference[];
|
|
1941
|
+
next_actions: string[];
|
|
1942
|
+
nextActions?: string[];
|
|
1943
|
+
diagnostic_errors: OpsDebugDiagnosticError[];
|
|
1944
|
+
diagnosticErrors?: OpsDebugDiagnosticError[];
|
|
1945
|
+
}
|
|
1946
|
+
interface OpsQuickstartStep {
|
|
1947
|
+
step: number;
|
|
1948
|
+
tool?: string;
|
|
1949
|
+
action?: string;
|
|
1950
|
+
arguments?: Record<string, unknown>;
|
|
1951
|
+
description: string;
|
|
1952
|
+
primitive_id?: string;
|
|
1953
|
+
primitiveId?: string;
|
|
1954
|
+
primitive_version?: string;
|
|
1955
|
+
primitiveVersion?: string;
|
|
1956
|
+
}
|
|
1957
|
+
interface OpsQuickstartWorkflow {
|
|
1958
|
+
workflow_type: string;
|
|
1959
|
+
workflowType?: string;
|
|
1960
|
+
requested_workflow_type?: string;
|
|
1961
|
+
requestedWorkflowType?: string;
|
|
1962
|
+
name: string;
|
|
1963
|
+
description: string;
|
|
1964
|
+
credits_required: number;
|
|
1965
|
+
creditsRequired?: number;
|
|
1966
|
+
steps: OpsQuickstartStep[];
|
|
1967
|
+
primitive_graph?: OpsPrimitive[];
|
|
1968
|
+
primitiveGraph?: OpsPrimitive[];
|
|
1969
|
+
available_types: string[];
|
|
1970
|
+
availableTypes?: string[];
|
|
1971
|
+
}
|
|
1972
|
+
declare class Ops {
|
|
1973
|
+
private client;
|
|
1974
|
+
constructor(client: HttpClient);
|
|
1975
|
+
plan(params: OpsPlanRequest | string): Promise<OpsPlanResult>;
|
|
1976
|
+
autopilot(params?: OpsAutopilotOptions): Promise<OpsAutopilotResult>;
|
|
1977
|
+
create(params: OpsCreateRequest | string): Promise<OpsCreateResult>;
|
|
1978
|
+
execute(params: OpsExecuteRequest | string): Promise<OpsExecuteResult>;
|
|
1979
|
+
run(params: OpsRunOptions | string): Promise<OpsRunResult>;
|
|
1980
|
+
status(params: OpsStatusOptions | string): Promise<OpsStatusResult>;
|
|
1981
|
+
results(params: OpsResultsOptions | string): Promise<OpsResultsResult>;
|
|
1982
|
+
proof(params?: OpsProofOptions): Promise<OpsProofResult>;
|
|
1983
|
+
debug(params: OpsDebugOptions | string): Promise<OpsDebugResult>;
|
|
1984
|
+
quickstartWorkflow(workflowType?: string): Promise<OpsQuickstartWorkflow>;
|
|
1985
|
+
approve(params: OpsApproveRequest): Promise<OpsApproveResult>;
|
|
1986
|
+
createRoutine(params: CreateRoutineRequest): Promise<OpsRoutine>;
|
|
1987
|
+
listRoutines(params?: {
|
|
1988
|
+
status?: OpsRoutineStatus;
|
|
1989
|
+
limit?: number;
|
|
1990
|
+
cursor?: string;
|
|
1991
|
+
}): Promise<OpsRoutinesResult>;
|
|
1992
|
+
getRoutine(routineId: string): Promise<OpsRoutine>;
|
|
1993
|
+
updateRoutine(params: UpdateRoutineRequest): Promise<OpsRoutine>;
|
|
1994
|
+
runRoutineNow(params: RunRoutineRequest | string): Promise<OpsRoutineRunResult>;
|
|
1995
|
+
deleteRoutine(routineId: string, permanent?: boolean): Promise<OpsRoutineDeleteResult>;
|
|
1996
|
+
listOutputSinks(params?: ListOutputSinksOptions): Promise<OpsSink[]>;
|
|
1997
|
+
getReadiness(params?: OpsReadinessOptions): Promise<OpsReadinessResult>;
|
|
1998
|
+
doctor(params?: OpsReadinessOptions): Promise<OpsReadinessResult>;
|
|
1999
|
+
createOutputSink(params: CreateOutputSinkRequest): Promise<OpsSink>;
|
|
2000
|
+
attachSinkToRoutine(params: {
|
|
2001
|
+
routine_id?: string;
|
|
2002
|
+
routineId?: string;
|
|
2003
|
+
sink_id?: string;
|
|
2004
|
+
sinkId?: string;
|
|
2005
|
+
}): Promise<OpsRoutineSinkResult>;
|
|
2006
|
+
getRoutineTicks(params: {
|
|
2007
|
+
routine_id?: string;
|
|
2008
|
+
routineId?: string;
|
|
2009
|
+
limit?: number;
|
|
2010
|
+
cursor?: string;
|
|
2011
|
+
}): Promise<OpsRoutineTicksResult>;
|
|
2012
|
+
getLastTickItems(params: {
|
|
2013
|
+
routine_id?: string;
|
|
2014
|
+
routineId?: string;
|
|
2015
|
+
limit?: number;
|
|
2016
|
+
cursor?: string;
|
|
2017
|
+
state?: string;
|
|
2018
|
+
}): Promise<OpsRoutineTickItemsResult>;
|
|
2019
|
+
getTriggerRunStatus(params: OpsTriggerRunStatusOptions | string): Promise<OpsTriggerRunStatus | OpsTriggerBatchRunStatus>;
|
|
2020
|
+
getQueueStatus(params?: OpsQueueStatusOptions): Promise<OpsQueueStatus>;
|
|
2021
|
+
replayFromCheckpoint(executionEventId: string): Promise<OpsReplayResult>;
|
|
2022
|
+
normalizeExecutionReference(input: string | ExecutionReferenceInput): ExecutionReference;
|
|
2023
|
+
collectExecutionReferences(payload: Record<string, unknown>): ExecutionReference[];
|
|
2024
|
+
getDashboard(params?: OpsDashboardOptions): Promise<OpsDashboardResult>;
|
|
2025
|
+
private call;
|
|
2026
|
+
}
|
|
2027
|
+
|
|
2028
|
+
declare class Ai {
|
|
2029
|
+
private client;
|
|
2030
|
+
constructor(client: HttpClient);
|
|
2031
|
+
/**
|
|
2032
|
+
* Run Custom AI Enrichment - Multi Model.
|
|
2033
|
+
*
|
|
2034
|
+
* Uses OpenRouter Fusion for multi-model analysis with web search/fetch enabled
|
|
2035
|
+
* inside Fusion, then synthesizes the requested structured output fields.
|
|
2036
|
+
*/
|
|
2037
|
+
multiModel(params: CustomAiMultiModelParams): Promise<CustomAiMultiModelResult>;
|
|
2038
|
+
}
|
|
2039
|
+
|
|
2040
|
+
type UnknownRecord = Record<string, unknown>;
|
|
2041
|
+
type GtmCampaignStatus = 'draft' | 'building' | 'ready' | 'active' | 'paused' | 'completed' | 'archived' | 'failed';
|
|
2042
|
+
type GtmCampaignSource = 'mcp' | 'campaign_builder' | 'routine' | 'manual' | 'import' | 'api' | 'webhook';
|
|
2043
|
+
type GtmActorType = 'human' | 'agent' | 'system' | 'provider';
|
|
2044
|
+
type GtmPatternType = 'angle' | 'subject_line' | 'opener' | 'sequence_structure' | 'icp' | 'lead_source' | 'provider_chain' | 'verification' | 'failure' | 'default' | 'calibration' | 'other';
|
|
2045
|
+
type GtmMemoryType = 'subject_line' | 'opener' | 'sequence_step' | 'icp' | 'lead_source' | 'provider_chain' | 'verification' | 'reply' | 'objection' | 'meeting' | 'failure' | 'campaign_summary' | 'agent_note' | 'other';
|
|
2046
|
+
type GtmLayer = 'icp' | 'find_company' | 'find_people' | 'lead_generation' | 'local_leads' | 'email_finding' | 'email_verification' | 'company_enrichment' | 'copy_enrichment' | 'qualification' | 'sender' | 'feedback' | 'approval' | 'source_import' | 'destination_export' | 'customer_data' | 'custom';
|
|
2047
|
+
type GtmInvocationType = 'signaliz_native' | 'webhook' | 'mcp_tool' | 'airbyte' | 'api' | 'managed_integration' | 'manual';
|
|
2048
|
+
type GtmAuthStrategy = 'none' | 'integration_key' | 'mcp_auth' | 'webhook_secret' | 'session_vault' | 'byo_runtime';
|
|
2049
|
+
interface GtmWorkspaceContextOptions {
|
|
2050
|
+
includeCampaigns?: boolean;
|
|
2051
|
+
includeMemory?: boolean;
|
|
2052
|
+
includeBrain?: boolean;
|
|
2053
|
+
includeConnections?: boolean;
|
|
2054
|
+
limit?: number;
|
|
2055
|
+
}
|
|
2056
|
+
interface GtmWorkspaceBootstrapStatusOptions {
|
|
2057
|
+
campaignId?: string;
|
|
2058
|
+
days?: number;
|
|
2059
|
+
minSampleSize?: number;
|
|
2060
|
+
includeConnections?: boolean;
|
|
2061
|
+
includeSamples?: boolean;
|
|
2062
|
+
limit?: number;
|
|
2063
|
+
}
|
|
2064
|
+
interface GtmProviderLinkInput {
|
|
2065
|
+
provider: string;
|
|
2066
|
+
providerCampaignId: string;
|
|
2067
|
+
integrationId?: string;
|
|
2068
|
+
providerWorkspaceId?: string;
|
|
2069
|
+
providerAccountId?: string;
|
|
2070
|
+
status?: string;
|
|
2071
|
+
metadata?: UnknownRecord;
|
|
2072
|
+
}
|
|
2073
|
+
interface GtmCampaignCreateInput {
|
|
2074
|
+
name: string;
|
|
2075
|
+
description?: string;
|
|
2076
|
+
source?: GtmCampaignSource;
|
|
2077
|
+
status?: GtmCampaignStatus;
|
|
2078
|
+
campaignBuildId?: string;
|
|
2079
|
+
campaignBuilderJobId?: string;
|
|
2080
|
+
routineId?: string;
|
|
2081
|
+
targetIcp?: UnknownRecord;
|
|
2082
|
+
sequences?: UnknownRecord[];
|
|
2083
|
+
leadListRefs?: UnknownRecord[];
|
|
2084
|
+
sendConfig?: UnknownRecord;
|
|
2085
|
+
providerLinks?: GtmProviderLinkInput[];
|
|
2086
|
+
brainConfig?: UnknownRecord;
|
|
2087
|
+
metadata?: UnknownRecord;
|
|
2088
|
+
log?: GtmCampaignLogInput;
|
|
2089
|
+
}
|
|
2090
|
+
interface GtmCampaignHistoryMemoryInput {
|
|
2091
|
+
idempotencyKey?: string;
|
|
2092
|
+
memoryType?: GtmMemoryType;
|
|
2093
|
+
title: string;
|
|
2094
|
+
content: string;
|
|
2095
|
+
keywords?: string[];
|
|
2096
|
+
dimensions?: UnknownRecord;
|
|
2097
|
+
outcomeType?: string;
|
|
2098
|
+
outcomeValue?: number;
|
|
2099
|
+
sampleSize?: number;
|
|
2100
|
+
confidence?: number;
|
|
2101
|
+
shareable?: boolean;
|
|
2102
|
+
redactionState?: 'raw' | 'redacted' | 'abstracted';
|
|
2103
|
+
metadata?: UnknownRecord;
|
|
2104
|
+
recencyAt?: string;
|
|
2105
|
+
}
|
|
2106
|
+
interface GtmCampaignHistoryCampaignInput {
|
|
2107
|
+
campaignId?: string;
|
|
2108
|
+
idempotencyKey?: string;
|
|
2109
|
+
name?: string;
|
|
2110
|
+
description?: string;
|
|
2111
|
+
source?: GtmCampaignSource;
|
|
2112
|
+
status?: GtmCampaignStatus;
|
|
2113
|
+
campaignBuildId?: string;
|
|
2114
|
+
campaignBuilderJobId?: string;
|
|
2115
|
+
routineId?: string;
|
|
2116
|
+
targetIcp?: UnknownRecord;
|
|
2117
|
+
sequences?: UnknownRecord[];
|
|
2118
|
+
leadListRefs?: UnknownRecord[];
|
|
2119
|
+
sendConfig?: UnknownRecord;
|
|
2120
|
+
performanceMetrics?: UnknownRecord;
|
|
2121
|
+
brainConfig?: UnknownRecord;
|
|
2122
|
+
memorySummary?: UnknownRecord;
|
|
2123
|
+
metadata?: UnknownRecord;
|
|
2124
|
+
providerLinks?: GtmProviderLinkInput[];
|
|
2125
|
+
feedbackEvents?: UnknownRecord[];
|
|
2126
|
+
memoryItems?: GtmCampaignHistoryMemoryInput[];
|
|
2127
|
+
startedAt?: string;
|
|
2128
|
+
completedAt?: string;
|
|
2129
|
+
summary?: string;
|
|
2130
|
+
memorySummaryText?: string;
|
|
2131
|
+
}
|
|
2132
|
+
interface GtmCampaignHistoryImportInput {
|
|
2133
|
+
source?: GtmCampaignSource;
|
|
2134
|
+
dryRun?: boolean;
|
|
2135
|
+
createMemory?: boolean;
|
|
2136
|
+
campaigns: GtmCampaignHistoryCampaignInput[];
|
|
2137
|
+
}
|
|
2138
|
+
interface GtmCampaignHistoryImportBatchInput {
|
|
2139
|
+
batchId?: string;
|
|
2140
|
+
campaigns: GtmCampaignHistoryCampaignInput[];
|
|
2141
|
+
}
|
|
2142
|
+
interface GtmCampaignHistoryImportRunInput {
|
|
2143
|
+
source?: GtmCampaignSource;
|
|
2144
|
+
dryRun?: boolean;
|
|
2145
|
+
createMemory?: boolean;
|
|
2146
|
+
campaigns?: GtmCampaignHistoryCampaignInput[];
|
|
2147
|
+
batches?: GtmCampaignHistoryImportBatchInput[];
|
|
2148
|
+
batchSize?: number;
|
|
2149
|
+
continueOnError?: boolean;
|
|
2150
|
+
runBrainCycle?: boolean;
|
|
2151
|
+
brainCycleWriteMode?: 'dry_run' | 'write';
|
|
2152
|
+
brainCyclePhases?: GtmBrainLearningCyclePhase[];
|
|
2153
|
+
brainCycleDays?: number;
|
|
2154
|
+
brainCycleNetworkDays?: number;
|
|
2155
|
+
brainCycleMinSampleSize?: number;
|
|
2156
|
+
brainCycleLimit?: number;
|
|
2157
|
+
}
|
|
2158
|
+
interface GtmCampaignBuildBackfillPreviewOptions {
|
|
2159
|
+
campaignBuildId: string;
|
|
2160
|
+
includeSampleRows?: boolean;
|
|
2161
|
+
includeCopySamples?: boolean;
|
|
2162
|
+
sampleRowLimit?: number;
|
|
2163
|
+
createMemory?: boolean;
|
|
2164
|
+
includePayload?: boolean;
|
|
2165
|
+
}
|
|
2166
|
+
interface GtmCampaignBuildBackfillRunInput {
|
|
2167
|
+
campaignBuildIds: string[];
|
|
2168
|
+
source?: GtmCampaignSource;
|
|
2169
|
+
dryRun?: boolean;
|
|
2170
|
+
createMemory?: boolean;
|
|
2171
|
+
includeSampleRows?: boolean;
|
|
2172
|
+
includeCopySamples?: boolean;
|
|
2173
|
+
includePayload?: boolean;
|
|
2174
|
+
sampleRowLimit?: number;
|
|
2175
|
+
batchSize?: number;
|
|
2176
|
+
continueOnError?: boolean;
|
|
2177
|
+
runBrainCycle?: boolean;
|
|
2178
|
+
brainCycleWriteMode?: 'dry_run' | 'write';
|
|
2179
|
+
brainCyclePhases?: GtmBrainLearningCyclePhase[];
|
|
2180
|
+
brainCycleDays?: number;
|
|
2181
|
+
brainCycleNetworkDays?: number;
|
|
2182
|
+
brainCycleMinSampleSize?: number;
|
|
2183
|
+
brainCycleLimit?: number;
|
|
2184
|
+
}
|
|
2185
|
+
interface GtmCampaignBuildBackfillStatusOptions {
|
|
2186
|
+
campaignBuildId: string;
|
|
2187
|
+
includePhases?: boolean;
|
|
2188
|
+
includeLinkedCampaign?: boolean;
|
|
2189
|
+
}
|
|
2190
|
+
interface GtmCampaignListOptions {
|
|
2191
|
+
status?: GtmCampaignStatus;
|
|
2192
|
+
provider?: string;
|
|
2193
|
+
search?: string;
|
|
2194
|
+
limit?: number;
|
|
2195
|
+
includeArchived?: boolean;
|
|
2196
|
+
}
|
|
2197
|
+
interface GtmCampaignGetOptions {
|
|
2198
|
+
logLimit?: number;
|
|
2199
|
+
memoryLimit?: number;
|
|
2200
|
+
}
|
|
2201
|
+
interface GtmCampaignExecutionStatusOptions {
|
|
2202
|
+
campaignId?: string;
|
|
2203
|
+
campaignBuildId?: string;
|
|
2204
|
+
includeProviderReadiness?: boolean;
|
|
2205
|
+
includeFeedback?: boolean;
|
|
2206
|
+
includeMemory?: boolean;
|
|
2207
|
+
includeRecentLog?: boolean;
|
|
2208
|
+
logLimit?: number;
|
|
2209
|
+
memoryLimit?: number;
|
|
2210
|
+
}
|
|
2211
|
+
interface GtmCampaignLearningStatusOptions {
|
|
2212
|
+
campaignId?: string;
|
|
2213
|
+
campaignBuildId?: string;
|
|
2214
|
+
days?: number;
|
|
2215
|
+
networkDays?: number;
|
|
2216
|
+
minSampleSize?: number;
|
|
2217
|
+
minWorkspaceCount?: number;
|
|
2218
|
+
minPrivacyK?: number;
|
|
2219
|
+
includeMemory?: boolean;
|
|
2220
|
+
includeNetwork?: boolean;
|
|
2221
|
+
writeMode?: 'dry_run' | 'write';
|
|
2222
|
+
limit?: number;
|
|
2223
|
+
}
|
|
2224
|
+
interface GtmCampaignUpdateInput {
|
|
2225
|
+
campaignId: string;
|
|
2226
|
+
name?: string;
|
|
2227
|
+
description?: string;
|
|
2228
|
+
status?: GtmCampaignStatus;
|
|
2229
|
+
targetIcp?: UnknownRecord;
|
|
2230
|
+
sequences?: UnknownRecord[];
|
|
2231
|
+
leadListRefs?: UnknownRecord[];
|
|
2232
|
+
sendConfig?: UnknownRecord;
|
|
2233
|
+
performanceMetrics?: UnknownRecord;
|
|
2234
|
+
brainConfig?: UnknownRecord;
|
|
2235
|
+
memorySummary?: UnknownRecord;
|
|
2236
|
+
metadata?: UnknownRecord;
|
|
2237
|
+
providerLinks?: GtmProviderLinkInput[];
|
|
2238
|
+
log?: GtmCampaignLogInput;
|
|
2239
|
+
}
|
|
2240
|
+
interface GtmCampaignLogInput {
|
|
2241
|
+
campaignId?: string;
|
|
2242
|
+
actorType?: GtmActorType;
|
|
2243
|
+
actorId?: string;
|
|
2244
|
+
action?: string;
|
|
2245
|
+
rationale?: string;
|
|
2246
|
+
payload?: UnknownRecord;
|
|
2247
|
+
idempotencyKey?: string;
|
|
2248
|
+
}
|
|
2249
|
+
interface GtmFeedbackIngestInput {
|
|
2250
|
+
source: string;
|
|
2251
|
+
campaignId?: string;
|
|
2252
|
+
campaignBuildId?: string;
|
|
2253
|
+
providerCampaignId?: string;
|
|
2254
|
+
events?: UnknownRecord[];
|
|
2255
|
+
providerPayload?: UnknownRecord;
|
|
2256
|
+
createMemory?: boolean;
|
|
2257
|
+
writeRoutineOutcomes?: boolean;
|
|
2258
|
+
}
|
|
2259
|
+
interface GtmInstantlyFeedbackSyncInput {
|
|
2260
|
+
campaignId?: string;
|
|
2261
|
+
campaignBuildId?: string;
|
|
2262
|
+
providerCampaignId?: string;
|
|
2263
|
+
instantlyCampaignId?: string;
|
|
2264
|
+
syncMode?: 'webhook' | 'pull' | 'manual';
|
|
2265
|
+
events?: UnknownRecord[];
|
|
2266
|
+
providerPayload?: UnknownRecord;
|
|
2267
|
+
cursor?: string;
|
|
2268
|
+
since?: string;
|
|
2269
|
+
until?: string;
|
|
2270
|
+
aggregateSnapshot?: UnknownRecord;
|
|
2271
|
+
createMemory?: boolean;
|
|
2272
|
+
writeRoutineOutcomes?: boolean;
|
|
2273
|
+
}
|
|
2274
|
+
interface GtmInstantlyFeedbackPullInput {
|
|
2275
|
+
campaignId?: string;
|
|
2276
|
+
campaignBuildId?: string;
|
|
2277
|
+
providerLinkId?: string;
|
|
2278
|
+
providerCampaignId?: string;
|
|
2279
|
+
instantlyCampaignId?: string;
|
|
2280
|
+
integrationId?: string;
|
|
2281
|
+
cursor?: string;
|
|
2282
|
+
from?: string;
|
|
2283
|
+
to?: string;
|
|
2284
|
+
limit?: number;
|
|
2285
|
+
maxPages?: number;
|
|
2286
|
+
createMemory?: boolean;
|
|
2287
|
+
writeRoutineOutcomes?: boolean;
|
|
2288
|
+
dryRun?: boolean;
|
|
2289
|
+
runBrainCycle?: boolean;
|
|
2290
|
+
brainCycleWriteMode?: 'dry_run' | 'write';
|
|
2291
|
+
brainCyclePhases?: GtmBrainLearningCyclePhase[];
|
|
2292
|
+
brainCycleMinIngested?: number;
|
|
2293
|
+
brainCycleMinIntervalMinutes?: number;
|
|
2294
|
+
}
|
|
2295
|
+
interface GtmInstantlyFeedbackWebhookPrepareInput {
|
|
2296
|
+
campaignId?: string;
|
|
2297
|
+
campaignBuildId?: string;
|
|
2298
|
+
providerLinkId?: string;
|
|
2299
|
+
providerCampaignId?: string;
|
|
2300
|
+
instantlyCampaignId?: string;
|
|
2301
|
+
integrationId?: string;
|
|
2302
|
+
providerWorkspaceId?: string;
|
|
2303
|
+
providerAccountId?: string;
|
|
2304
|
+
rotateSecret?: boolean;
|
|
2305
|
+
runBrainCycle?: boolean;
|
|
2306
|
+
brainCycleWriteMode?: 'dry_run' | 'write';
|
|
2307
|
+
brainCyclePhases?: GtmBrainLearningCyclePhase[];
|
|
2308
|
+
brainCycleMinIngested?: number;
|
|
2309
|
+
brainCycleMinIntervalMinutes?: number;
|
|
2310
|
+
}
|
|
2311
|
+
interface GtmFeedbackWebhookPrepareInput {
|
|
2312
|
+
provider: string;
|
|
2313
|
+
campaignId?: string;
|
|
2314
|
+
campaignBuildId?: string;
|
|
2315
|
+
providerLinkId?: string;
|
|
2316
|
+
providerCampaignId?: string;
|
|
2317
|
+
integrationId?: string;
|
|
2318
|
+
providerWorkspaceId?: string;
|
|
2319
|
+
providerAccountId?: string;
|
|
2320
|
+
rotateSecret?: boolean;
|
|
2321
|
+
runBrainCycle?: boolean;
|
|
2322
|
+
brainCycleWriteMode?: 'dry_run' | 'write';
|
|
2323
|
+
brainCyclePhases?: GtmBrainLearningCyclePhase[];
|
|
2324
|
+
brainCycleMinIngested?: number;
|
|
2325
|
+
brainCycleMinIntervalMinutes?: number;
|
|
2326
|
+
}
|
|
2327
|
+
interface GtmMemorySearchOptions {
|
|
2328
|
+
query?: string;
|
|
2329
|
+
campaignId?: string;
|
|
2330
|
+
memoryType?: GtmMemoryType;
|
|
2331
|
+
keywords?: string[];
|
|
2332
|
+
outcomeType?: string;
|
|
2333
|
+
targetIcp?: UnknownRecord;
|
|
2334
|
+
layers?: GtmLayer[];
|
|
2335
|
+
providerChain?: string[];
|
|
2336
|
+
dimensionFilters?: UnknownRecord;
|
|
2337
|
+
requireDimensionMatch?: boolean;
|
|
2338
|
+
days?: number;
|
|
2339
|
+
limit?: number;
|
|
2340
|
+
}
|
|
2341
|
+
interface GtmBrainPatternsOptions {
|
|
2342
|
+
campaignId?: string;
|
|
2343
|
+
patternType?: GtmPatternType;
|
|
2344
|
+
segmentKey?: string;
|
|
2345
|
+
includeGlobal?: boolean;
|
|
2346
|
+
minConfidence?: number;
|
|
2347
|
+
limit?: number;
|
|
2348
|
+
}
|
|
2349
|
+
interface GtmBrainSeedDefaultsInput {
|
|
2350
|
+
campaignId?: string;
|
|
2351
|
+
campaignBrief?: string;
|
|
2352
|
+
targetIcp?: UnknownRecord;
|
|
2353
|
+
layers?: GtmLayer[];
|
|
2354
|
+
includeGlobal?: boolean;
|
|
2355
|
+
includeMemory?: boolean;
|
|
2356
|
+
minConfidence?: number;
|
|
2357
|
+
writeCampaign?: boolean;
|
|
2358
|
+
limit?: number;
|
|
2359
|
+
}
|
|
2360
|
+
interface GtmBrainLearningCyclePlanInput {
|
|
2361
|
+
campaignId?: string;
|
|
2362
|
+
campaignBrief?: string;
|
|
2363
|
+
targetIcp?: UnknownRecord;
|
|
2364
|
+
layers?: GtmLayer[];
|
|
2365
|
+
providerChain?: string[];
|
|
2366
|
+
leadSource?: string;
|
|
2367
|
+
days?: number;
|
|
2368
|
+
networkDays?: number;
|
|
2369
|
+
minSampleSize?: number;
|
|
2370
|
+
minWorkspaceCount?: number;
|
|
2371
|
+
minPrivacyK?: number;
|
|
2372
|
+
includeMemory?: boolean;
|
|
2373
|
+
includeNetwork?: boolean;
|
|
2374
|
+
writeMode?: 'dry_run' | 'write';
|
|
2375
|
+
limit?: number;
|
|
2376
|
+
}
|
|
2377
|
+
type GtmBrainLearningCyclePhase = 'workspace_pattern_extraction' | 'deliverability_calibration' | 'failure_pattern_detection' | 'aggregate_patterns' | 'aggregate_calibrations' | 'defaults_seed' | 'delivery_risk';
|
|
2378
|
+
type GtmBrainLearningLaneId = 'workspace_patterns' | 'network_patterns' | 'defaults_learning' | 'failure_detection' | 'deliverability_calibration';
|
|
2379
|
+
type GtmBrainLearningLaneState = 'ready' | 'attention' | 'blocked' | 'unknown';
|
|
2380
|
+
interface GtmBrainLearningLane {
|
|
2381
|
+
id: GtmBrainLearningLaneId;
|
|
2382
|
+
label: string;
|
|
2383
|
+
state: GtmBrainLearningLaneState;
|
|
2384
|
+
metric: string;
|
|
2385
|
+
detail: string;
|
|
2386
|
+
blockers: string[];
|
|
2387
|
+
warnings: string[];
|
|
2388
|
+
next_mcp_action: string;
|
|
2389
|
+
raw_data_policy?: string;
|
|
2390
|
+
}
|
|
2391
|
+
interface GtmBrainLearningLaneSummary {
|
|
2392
|
+
total_lanes: number;
|
|
2393
|
+
ready_lanes: number;
|
|
2394
|
+
blocked_lanes: number;
|
|
2395
|
+
attention_lanes: number;
|
|
2396
|
+
unknown_lanes: number;
|
|
2397
|
+
}
|
|
2398
|
+
interface GtmBrainLearningEvidenceCounts {
|
|
2399
|
+
feedback_events?: number;
|
|
2400
|
+
deliverability_events?: number;
|
|
2401
|
+
failure_events?: number;
|
|
2402
|
+
positive_events?: number;
|
|
2403
|
+
event_type_counts?: UnknownRecord;
|
|
2404
|
+
classification_counts?: UnknownRecord;
|
|
2405
|
+
memory_items?: number;
|
|
2406
|
+
memory_sample_size?: number;
|
|
2407
|
+
workspace_patterns?: number;
|
|
2408
|
+
workspace_calibrations?: number;
|
|
2409
|
+
global_patterns?: number;
|
|
2410
|
+
global_calibrations?: number;
|
|
2411
|
+
opted_in_workspaces?: number;
|
|
2412
|
+
}
|
|
2413
|
+
interface GtmBrainLearningPhaseStatus {
|
|
2414
|
+
phase: GtmBrainLearningCyclePhase | string;
|
|
2415
|
+
ready: boolean;
|
|
2416
|
+
blocked_by?: string[];
|
|
2417
|
+
}
|
|
2418
|
+
interface GtmBrainLearningPhaseReadiness {
|
|
2419
|
+
ready: boolean;
|
|
2420
|
+
blocked_by: string[];
|
|
2421
|
+
}
|
|
2422
|
+
interface GtmBrainLearningAction {
|
|
2423
|
+
tool: string;
|
|
2424
|
+
arguments?: UnknownRecord;
|
|
2425
|
+
reason?: string;
|
|
2426
|
+
}
|
|
2427
|
+
interface GtmBrainLearningRecommendedToolCall extends GtmBrainLearningAction {
|
|
2428
|
+
step?: number;
|
|
2429
|
+
phase?: GtmBrainLearningCyclePhase | string;
|
|
2430
|
+
ready?: boolean;
|
|
2431
|
+
blocked_by?: string[];
|
|
2432
|
+
}
|
|
2433
|
+
interface GtmCampaignLearningStatusResult {
|
|
2434
|
+
workspace_id?: string;
|
|
2435
|
+
learning_stage?: string;
|
|
2436
|
+
ready?: boolean;
|
|
2437
|
+
outcome_learning_ready?: boolean;
|
|
2438
|
+
campaign?: {
|
|
2439
|
+
id?: string;
|
|
2440
|
+
name?: string;
|
|
2441
|
+
status?: string;
|
|
2442
|
+
source?: string;
|
|
2443
|
+
campaign_build_id?: string | null;
|
|
2444
|
+
updated_at?: string;
|
|
2445
|
+
} | null;
|
|
2446
|
+
campaign_build?: {
|
|
2447
|
+
id?: string;
|
|
2448
|
+
name?: string;
|
|
2449
|
+
status?: string;
|
|
2450
|
+
requested_target_count?: number;
|
|
2451
|
+
planned_target_count?: number;
|
|
2452
|
+
completed_at?: string | null;
|
|
2453
|
+
updated_at?: string | null;
|
|
2454
|
+
} | null;
|
|
2455
|
+
evidence_counts?: GtmBrainLearningEvidenceCounts;
|
|
2456
|
+
learning_lanes?: GtmBrainLearningLane[];
|
|
2457
|
+
lane_summary?: GtmBrainLearningLaneSummary;
|
|
2458
|
+
feedback_brain_cycle?: UnknownRecord;
|
|
2459
|
+
thresholds?: UnknownRecord;
|
|
2460
|
+
phases?: GtmBrainLearningPhaseStatus[];
|
|
2461
|
+
ready_phases?: Array<GtmBrainLearningCyclePhase | string>;
|
|
2462
|
+
learning_cycle_plan_args?: UnknownRecord;
|
|
2463
|
+
learning_cycle_run_args?: UnknownRecord | null;
|
|
2464
|
+
last_learning_cycle_receipt?: UnknownRecord | null;
|
|
2465
|
+
recent_brain_log?: UnknownRecord[];
|
|
2466
|
+
blockers?: string[];
|
|
2467
|
+
warnings?: string[];
|
|
2468
|
+
next_actions?: GtmBrainLearningAction[];
|
|
2469
|
+
execution_policy?: string;
|
|
2470
|
+
privacy_policy?: string;
|
|
2471
|
+
}
|
|
2472
|
+
interface GtmBrainLearningCyclePlanResult {
|
|
2473
|
+
cycle?: UnknownRecord;
|
|
2474
|
+
evidence_counts?: GtmBrainLearningEvidenceCounts;
|
|
2475
|
+
readiness?: Record<string, GtmBrainLearningPhaseReadiness>;
|
|
2476
|
+
learning_lanes?: GtmBrainLearningLane[];
|
|
2477
|
+
lane_summary?: GtmBrainLearningLaneSummary;
|
|
2478
|
+
recommended_tool_calls?: GtmBrainLearningRecommendedToolCall[];
|
|
2479
|
+
next_ready_tools?: string[];
|
|
2480
|
+
queued_runner_tool?: string;
|
|
2481
|
+
execution_policy?: string;
|
|
2482
|
+
privacy_policy?: string;
|
|
2483
|
+
}
|
|
2484
|
+
interface GtmBrainLearningCycleRunInput extends GtmBrainLearningCyclePlanInput {
|
|
2485
|
+
phases?: GtmBrainLearningCyclePhase[];
|
|
2486
|
+
continueOnError?: boolean;
|
|
2487
|
+
}
|
|
2488
|
+
interface GtmBrainExtractPatternsInput {
|
|
2489
|
+
campaignId?: string;
|
|
2490
|
+
days?: number;
|
|
2491
|
+
patternTypes?: GtmPatternType[];
|
|
2492
|
+
minSampleSize?: number;
|
|
2493
|
+
includeMemory?: boolean;
|
|
2494
|
+
writePatterns?: boolean;
|
|
2495
|
+
dryRun?: boolean;
|
|
2496
|
+
replaceExisting?: boolean;
|
|
2497
|
+
limit?: number;
|
|
2498
|
+
}
|
|
2499
|
+
interface GtmBrainAggregatePatternsInput {
|
|
2500
|
+
days?: number;
|
|
2501
|
+
patternTypes?: GtmPatternType[];
|
|
2502
|
+
minWorkspaceCount?: number;
|
|
2503
|
+
minPrivacyK?: number;
|
|
2504
|
+
minConfidence?: number;
|
|
2505
|
+
includeLowConfidence?: boolean;
|
|
2506
|
+
writePatterns?: boolean;
|
|
2507
|
+
dryRun?: boolean;
|
|
2508
|
+
replaceExisting?: boolean;
|
|
2509
|
+
limit?: number;
|
|
2510
|
+
}
|
|
2511
|
+
interface GtmBrainAggregateCalibrationsInput {
|
|
2512
|
+
days?: number;
|
|
2513
|
+
dimensionTypes?: GtmCalibrationDimensionType[];
|
|
2514
|
+
minWorkspaceCount?: number;
|
|
2515
|
+
minPrivacyK?: number;
|
|
2516
|
+
minConfidence?: number;
|
|
2517
|
+
includeLowConfidence?: boolean;
|
|
2518
|
+
writeCalibrations?: boolean;
|
|
2519
|
+
dryRun?: boolean;
|
|
2520
|
+
replaceExisting?: boolean;
|
|
2521
|
+
limit?: number;
|
|
2522
|
+
}
|
|
2523
|
+
interface GtmBrainCalibrateDeliverabilityInput {
|
|
2524
|
+
campaignId?: string;
|
|
2525
|
+
days?: number;
|
|
2526
|
+
dimensionTypes?: GtmCalibrationDimensionType[];
|
|
2527
|
+
minSampleSize?: number;
|
|
2528
|
+
dryRun?: boolean;
|
|
2529
|
+
writeCalibrations?: boolean;
|
|
2530
|
+
writePatterns?: boolean;
|
|
2531
|
+
replaceExisting?: boolean;
|
|
2532
|
+
limit?: number;
|
|
2533
|
+
}
|
|
2534
|
+
interface GtmBrainDeliveryRiskInput {
|
|
2535
|
+
campaignId?: string;
|
|
2536
|
+
providerChain?: string[];
|
|
2537
|
+
leadSource?: string;
|
|
2538
|
+
targetIcp?: UnknownRecord;
|
|
2539
|
+
leadSamples?: UnknownRecord[];
|
|
2540
|
+
includeGlobal?: boolean;
|
|
2541
|
+
minConfidence?: number;
|
|
2542
|
+
limit?: number;
|
|
2543
|
+
}
|
|
2544
|
+
type GtmCalibrationDimensionType = 'email_domain' | 'email_provider' | 'verification_source' | 'lead_source' | 'provider_chain' | 'icp_shape' | 'copy_pattern' | 'other';
|
|
2545
|
+
type GtmFailurePatternDimension = 'provider_chain' | 'provider' | 'icp_shape' | 'lead_source' | 'copy_pattern' | 'sequence_step' | 'email_domain';
|
|
2546
|
+
interface GtmBrainFailurePatternsOptions {
|
|
2547
|
+
campaignId?: string;
|
|
2548
|
+
days?: number;
|
|
2549
|
+
minSampleSize?: number;
|
|
2550
|
+
dimensions?: GtmFailurePatternDimension[];
|
|
2551
|
+
includeExistingPatterns?: boolean;
|
|
2552
|
+
includeGlobal?: boolean;
|
|
2553
|
+
limit?: number;
|
|
2554
|
+
}
|
|
2555
|
+
interface GtmConnectionsListOptions {
|
|
2556
|
+
kind?: 'all' | 'integrations' | 'mcp_servers';
|
|
2557
|
+
includeDisconnected?: boolean;
|
|
2558
|
+
}
|
|
2559
|
+
interface GtmProviderCatalogOptions {
|
|
2560
|
+
providerId?: string;
|
|
2561
|
+
layer?: GtmLayer;
|
|
2562
|
+
includePlanned?: boolean;
|
|
2563
|
+
includeLayerCatalog?: boolean;
|
|
2564
|
+
}
|
|
2565
|
+
interface GtmIntegrationsActivationStatusOptions {
|
|
2566
|
+
campaignId?: string;
|
|
2567
|
+
layer?: GtmLayer;
|
|
2568
|
+
includePlanned?: boolean;
|
|
2569
|
+
includeConnections?: boolean;
|
|
2570
|
+
}
|
|
2571
|
+
interface GtmCampaignBuildPlanInput {
|
|
2572
|
+
campaignId?: string;
|
|
2573
|
+
campaignBuildId?: string;
|
|
2574
|
+
campaignBrief?: string;
|
|
2575
|
+
targetIcp?: UnknownRecord;
|
|
2576
|
+
leadCount?: number;
|
|
2577
|
+
layers?: GtmLayer[];
|
|
2578
|
+
preferredProviders?: string[];
|
|
2579
|
+
memoryDimensionFilters?: UnknownRecord;
|
|
2580
|
+
requireMemoryDimensionMatch?: boolean;
|
|
2581
|
+
includeMemory?: boolean;
|
|
2582
|
+
includeBrain?: boolean;
|
|
2583
|
+
includeProviderRoutes?: boolean;
|
|
2584
|
+
includeFailurePatterns?: boolean;
|
|
2585
|
+
includePlannedProviders?: boolean;
|
|
2586
|
+
days?: number;
|
|
2587
|
+
limit?: number;
|
|
2588
|
+
}
|
|
2589
|
+
interface GtmCampaignBuildPlanCommitInput {
|
|
2590
|
+
campaignId?: string;
|
|
2591
|
+
campaignBuildId?: string;
|
|
2592
|
+
name?: string;
|
|
2593
|
+
campaignBrief?: string;
|
|
2594
|
+
targetIcp?: UnknownRecord;
|
|
2595
|
+
leadCount?: number;
|
|
2596
|
+
layers?: GtmLayer[];
|
|
2597
|
+
preferredProviders?: string[];
|
|
2598
|
+
planSnapshot?: UnknownRecord;
|
|
2599
|
+
sequences?: UnknownRecord[];
|
|
2600
|
+
leadListRefs?: UnknownRecord[];
|
|
2601
|
+
sendConfig?: UnknownRecord;
|
|
2602
|
+
brainConfig?: UnknownRecord;
|
|
2603
|
+
metadata?: UnknownRecord;
|
|
2604
|
+
status?: Extract<GtmCampaignStatus, 'draft' | 'building' | 'ready'>;
|
|
2605
|
+
approvalRequired?: boolean;
|
|
2606
|
+
actorType?: GtmActorType;
|
|
2607
|
+
actorId?: string;
|
|
2608
|
+
rationale?: string;
|
|
2609
|
+
idempotencyKey?: string;
|
|
2610
|
+
dryRun?: boolean;
|
|
2611
|
+
confirm?: boolean;
|
|
2612
|
+
}
|
|
2613
|
+
interface GtmCampaignBuildExecutionPrepareInput {
|
|
2614
|
+
campaignId: string;
|
|
2615
|
+
targetCount?: number;
|
|
2616
|
+
allowDownscale?: boolean;
|
|
2617
|
+
dryRun?: boolean;
|
|
2618
|
+
confirmSpend?: boolean;
|
|
2619
|
+
includeBrainContext?: boolean;
|
|
2620
|
+
requireDeliveryRiskClearance?: boolean;
|
|
2621
|
+
/** Output from gtm_brain_delivery_risk. When omitted, the MCP tool returns exact risk-check next-action args unless a stored campaign snapshot is available. */
|
|
2622
|
+
deliveryRisk?: UnknownRecord;
|
|
2623
|
+
dedupKeys?: ('email' | 'linkedin_url' | 'company_domain')[];
|
|
2624
|
+
policy?: UnknownRecord;
|
|
2625
|
+
signals?: UnknownRecord;
|
|
2626
|
+
qualification?: UnknownRecord;
|
|
2627
|
+
copy?: UnknownRecord;
|
|
2628
|
+
delivery?: UnknownRecord;
|
|
2629
|
+
enhancers?: UnknownRecord;
|
|
2630
|
+
}
|
|
2631
|
+
interface GtmProviderRecipePrepareInput {
|
|
2632
|
+
providerId: string;
|
|
2633
|
+
providerName?: string;
|
|
2634
|
+
description?: string;
|
|
2635
|
+
layerCapabilities?: GtmLayer[];
|
|
2636
|
+
invocationType?: GtmInvocationType;
|
|
2637
|
+
authStrategy?: GtmAuthStrategy;
|
|
2638
|
+
endpointUrl?: string;
|
|
2639
|
+
httpMethod?: string;
|
|
2640
|
+
secretRef?: string;
|
|
2641
|
+
workspaceIntegrationId?: string;
|
|
2642
|
+
workspaceMcpServerId?: string;
|
|
2643
|
+
workspaceConnectionId?: string;
|
|
2644
|
+
requestTemplate?: UnknownRecord;
|
|
2645
|
+
responseMapping?: UnknownRecord;
|
|
2646
|
+
inputSchema?: UnknownRecord;
|
|
2647
|
+
outputSchema?: UnknownRecord;
|
|
2648
|
+
readiness?: UnknownRecord;
|
|
2649
|
+
metadata?: UnknownRecord;
|
|
2650
|
+
layer?: GtmLayer;
|
|
2651
|
+
campaignId?: string;
|
|
2652
|
+
useSignalizFallback?: boolean;
|
|
2653
|
+
priority?: number;
|
|
2654
|
+
status?: 'draft' | 'active' | 'needs_setup';
|
|
2655
|
+
sampleRecords?: UnknownRecord[];
|
|
2656
|
+
context?: UnknownRecord;
|
|
2657
|
+
}
|
|
2658
|
+
interface GtmClayWebhookPrepareInput {
|
|
2659
|
+
endpointUrl?: string;
|
|
2660
|
+
secretRef?: string;
|
|
2661
|
+
layer?: Extract<GtmLayer, 'find_company' | 'find_people' | 'lead_generation' | 'company_enrichment' | 'copy_enrichment' | 'approval' | 'destination_export' | 'custom'>;
|
|
2662
|
+
campaignId?: string;
|
|
2663
|
+
useSignalizFallback?: boolean;
|
|
2664
|
+
priority?: number;
|
|
2665
|
+
status?: 'draft' | 'active' | 'needs_setup';
|
|
2666
|
+
sampleRecords?: UnknownRecord[];
|
|
2667
|
+
context?: UnknownRecord;
|
|
2668
|
+
}
|
|
2669
|
+
interface GtmProviderRouteActivateInput {
|
|
2670
|
+
providerId: string;
|
|
2671
|
+
providerName?: string;
|
|
2672
|
+
description?: string;
|
|
2673
|
+
layer?: GtmLayer;
|
|
2674
|
+
layers?: GtmLayer[];
|
|
2675
|
+
campaignId?: string;
|
|
2676
|
+
invocationType?: GtmInvocationType;
|
|
2677
|
+
authStrategy?: GtmAuthStrategy;
|
|
2678
|
+
endpointUrl?: string;
|
|
2679
|
+
httpMethod?: string;
|
|
2680
|
+
secretRef?: string;
|
|
2681
|
+
workspaceIntegrationId?: string;
|
|
2682
|
+
workspaceMcpServerId?: string;
|
|
2683
|
+
workspaceConnectionId?: string;
|
|
2684
|
+
useSignalizFallback?: boolean;
|
|
2685
|
+
priority?: number;
|
|
2686
|
+
routeConfig?: UnknownRecord;
|
|
2687
|
+
requestTemplate?: UnknownRecord;
|
|
2688
|
+
responseMapping?: UnknownRecord;
|
|
2689
|
+
inputSchema?: UnknownRecord;
|
|
2690
|
+
outputSchema?: UnknownRecord;
|
|
2691
|
+
readiness?: UnknownRecord;
|
|
2692
|
+
metadata?: UnknownRecord;
|
|
2693
|
+
status?: 'draft' | 'active' | 'needs_setup' | 'paused' | 'archived' | 'failed';
|
|
2694
|
+
routeStatus?: 'active' | 'paused' | 'archived' | 'failed';
|
|
2695
|
+
replaceExistingRoutes?: boolean;
|
|
2696
|
+
dryRun?: boolean;
|
|
2697
|
+
confirm?: boolean;
|
|
2698
|
+
sampleRecords?: UnknownRecord[];
|
|
2699
|
+
context?: UnknownRecord;
|
|
2700
|
+
}
|
|
2701
|
+
interface GtmConnectionRegisterInput {
|
|
2702
|
+
connectionKind: 'mcp_server' | 'integration';
|
|
2703
|
+
name: string;
|
|
2704
|
+
serverUrl?: string;
|
|
2705
|
+
authType?: 'none' | 'api_key' | 'bearer' | 'oauth';
|
|
2706
|
+
authConfig?: UnknownRecord;
|
|
2707
|
+
enabledTools?: string[];
|
|
2708
|
+
presetId?: string;
|
|
2709
|
+
vendorId?: string;
|
|
2710
|
+
serviceCategory?: string;
|
|
2711
|
+
connectionType?: string;
|
|
2712
|
+
status?: string;
|
|
2713
|
+
metadata?: UnknownRecord;
|
|
2714
|
+
}
|
|
2715
|
+
interface GtmIntegrationRecipeCreateInput {
|
|
2716
|
+
providerId: string;
|
|
2717
|
+
providerName: string;
|
|
2718
|
+
description?: string;
|
|
2719
|
+
layerCapabilities?: GtmLayer[];
|
|
2720
|
+
invocationType: GtmInvocationType;
|
|
2721
|
+
authStrategy?: GtmAuthStrategy;
|
|
2722
|
+
workspaceIntegrationId?: string;
|
|
2723
|
+
workspaceMcpServerId?: string;
|
|
2724
|
+
workspaceConnectionId?: string;
|
|
2725
|
+
endpointUrl?: string;
|
|
2726
|
+
httpMethod?: string;
|
|
2727
|
+
requestTemplate?: UnknownRecord;
|
|
2728
|
+
responseMapping?: UnknownRecord;
|
|
2729
|
+
inputSchema?: UnknownRecord;
|
|
2730
|
+
outputSchema?: UnknownRecord;
|
|
2731
|
+
readiness?: UnknownRecord;
|
|
2732
|
+
metadata?: UnknownRecord;
|
|
2733
|
+
status?: 'draft' | 'active' | 'needs_setup' | 'paused' | 'archived' | 'failed';
|
|
2734
|
+
}
|
|
2735
|
+
interface GtmLayerRouteSetInput {
|
|
2736
|
+
layer: GtmLayer;
|
|
2737
|
+
providerId: string;
|
|
2738
|
+
campaignId?: string;
|
|
2739
|
+
recipeId?: string;
|
|
2740
|
+
priority?: number;
|
|
2741
|
+
useSignalizFallback?: boolean;
|
|
2742
|
+
routeConfig?: UnknownRecord;
|
|
2743
|
+
status?: 'active' | 'paused' | 'archived' | 'failed';
|
|
2744
|
+
}
|
|
2745
|
+
interface GtmLayerRoutesGetOptions {
|
|
2746
|
+
campaignId?: string;
|
|
2747
|
+
layer?: GtmLayer;
|
|
2748
|
+
}
|
|
2749
|
+
interface GtmLayerRoutePreviewInput {
|
|
2750
|
+
layer: GtmLayer;
|
|
2751
|
+
campaignId?: string;
|
|
2752
|
+
sampleRecords?: UnknownRecord[];
|
|
2753
|
+
context?: UnknownRecord;
|
|
2754
|
+
}
|
|
2755
|
+
interface GtmWebhookDeliverInput {
|
|
2756
|
+
recipeId: string;
|
|
2757
|
+
campaignId?: string;
|
|
2758
|
+
layer?: GtmLayer;
|
|
2759
|
+
records: UnknownRecord[];
|
|
2760
|
+
context?: UnknownRecord;
|
|
2761
|
+
idempotencyKey?: string;
|
|
2762
|
+
}
|
|
2763
|
+
declare class GtmKernel {
|
|
2764
|
+
private client;
|
|
2765
|
+
constructor(client: HttpClient);
|
|
2766
|
+
/** Load workspace context for an agent session: campaigns, memory, Brain, connections, and Signaliz primitives. */
|
|
2767
|
+
context(options?: GtmWorkspaceContextOptions): Promise<any>;
|
|
2768
|
+
/** Inspect whether the workspace has the Kernel + Brain substrate pieces needed to build, run, and improve campaigns. */
|
|
2769
|
+
bootstrapStatus(options?: GtmWorkspaceBootstrapStatusOptions): Promise<any>;
|
|
2770
|
+
/** Create a first-class GTM campaign object in the current workspace. */
|
|
2771
|
+
createCampaign(input: GtmCampaignCreateInput): Promise<any>;
|
|
2772
|
+
/** Backfill historical campaigns, provider links, feedback, and memory into the GTM Kernel substrate. */
|
|
2773
|
+
importCampaignHistory(input: GtmCampaignHistoryImportInput): Promise<any>;
|
|
2774
|
+
/** Queue a Trigger-backed campaign history import for larger CMM/client backfills. */
|
|
2775
|
+
importCampaignHistoryRun(input: GtmCampaignHistoryImportRunInput): Promise<any>;
|
|
2776
|
+
/** Preview a provider-neutral history import payload derived from an existing campaign build. */
|
|
2777
|
+
previewCampaignBuildBackfill(options: GtmCampaignBuildBackfillPreviewOptions): Promise<any>;
|
|
2778
|
+
/** Queue campaign-build history backfills through the Trigger-backed history import runner. */
|
|
2779
|
+
runCampaignBuildBackfill(input: GtmCampaignBuildBackfillRunInput): Promise<any>;
|
|
2780
|
+
/** Inspect Campaign Builder to Kernel backfill status for one build. */
|
|
2781
|
+
campaignBuildBackfillStatus(options: GtmCampaignBuildBackfillStatusOptions): Promise<any>;
|
|
2782
|
+
/** List first-class GTM campaign objects in the current workspace. */
|
|
2783
|
+
listCampaigns(options?: GtmCampaignListOptions): Promise<any>;
|
|
2784
|
+
/** Get one campaign with provider links, logs, feedback summary, memory, and Brain patterns. */
|
|
2785
|
+
getCampaign(campaignId: string, options?: GtmCampaignGetOptions): Promise<any>;
|
|
2786
|
+
/** Inspect campaign execution state, linked build progress, provider readiness, feedback, memory, and next actions. */
|
|
2787
|
+
campaignExecutionStatus(options: GtmCampaignExecutionStatusOptions): Promise<any>;
|
|
2788
|
+
/** Inspect whether a campaign/build is ready for Brain learning and return exact learning-cycle args. */
|
|
2789
|
+
campaignLearningStatus(options: GtmCampaignLearningStatusOptions): Promise<GtmCampaignLearningStatusResult>;
|
|
2790
|
+
/** Update a first-class GTM campaign and append the associated campaign log entry. */
|
|
2791
|
+
updateCampaign(input: GtmCampaignUpdateInput): Promise<any>;
|
|
2792
|
+
/** Append an auditable campaign action with actor, rationale, payload, and optional idempotency key. */
|
|
2793
|
+
logCampaign(campaignId: string, input: Omit<GtmCampaignLogInput, 'campaignId'>): Promise<any>;
|
|
2794
|
+
/** Ingest provider-neutral feedback from Instantly, Smartlead, HeyReach, webhook, or a custom MCP. */
|
|
2795
|
+
ingestFeedback(input: GtmFeedbackIngestInput): Promise<any>;
|
|
2796
|
+
/** Normalize Instantly webhook/pull payloads and ingest row-level feedback through the GTM Kernel. */
|
|
2797
|
+
syncInstantlyFeedback(input: GtmInstantlyFeedbackSyncInput): Promise<any>;
|
|
2798
|
+
/** Start a background Instantly webhook-events pull and route results into the GTM feedback loop. */
|
|
2799
|
+
pullInstantlyFeedback(input: GtmInstantlyFeedbackPullInput): Promise<any>;
|
|
2800
|
+
/** Prepare a secure Instantly feedback webhook URL for a campaign provider link. */
|
|
2801
|
+
prepareInstantlyFeedbackWebhook(input: GtmInstantlyFeedbackWebhookPrepareInput): Promise<any>;
|
|
2802
|
+
/** Prepare a provider-agnostic feedback webhook URL for Smartlead, HeyReach, Airbyte, or custom sender events. */
|
|
2803
|
+
prepareFeedbackWebhook(input: GtmFeedbackWebhookPrepareInput): Promise<any>;
|
|
2804
|
+
/** Search ranked workspace campaign memory instead of dumping raw history. */
|
|
2805
|
+
searchMemory(options?: GtmMemorySearchOptions): Promise<any>;
|
|
2806
|
+
/** Retrieve evidence-backed workspace and privacy-safe aggregate Brain patterns. */
|
|
2807
|
+
brainPatterns(options?: GtmBrainPatternsOptions): Promise<any>;
|
|
2808
|
+
/** Plan the closed-loop Brain learning sequence without recursively executing Edge Functions. */
|
|
2809
|
+
learningCyclePlan(input?: GtmBrainLearningCyclePlanInput): Promise<GtmBrainLearningCyclePlanResult>;
|
|
2810
|
+
/** Queue the closed-loop Brain learning sequence in Trigger. */
|
|
2811
|
+
learningCycleRun(input?: GtmBrainLearningCycleRunInput): Promise<any>;
|
|
2812
|
+
/** Seed campaign defaults from active Brain patterns and ranked workspace memory. */
|
|
2813
|
+
seedBrainDefaults(input?: GtmBrainSeedDefaultsInput): Promise<any>;
|
|
2814
|
+
/** Extract within-workspace Brain V1 patterns from feedback, provider links, campaigns, and memory. */
|
|
2815
|
+
extractBrainPatterns(input?: GtmBrainExtractPatternsInput): Promise<any>;
|
|
2816
|
+
/** Aggregate opted-in workspace Brain patterns into privacy-safe global defaults. */
|
|
2817
|
+
aggregateBrainPatterns(input?: GtmBrainAggregatePatternsInput): Promise<any>;
|
|
2818
|
+
/** Aggregate opted-in workspace deliverability calibrations into privacy-safe global calibration rows. */
|
|
2819
|
+
aggregateBrainCalibrations(input?: GtmBrainAggregateCalibrationsInput): Promise<any>;
|
|
2820
|
+
/** Calibrate workspace deliverability predictions against actual bounce feedback. */
|
|
2821
|
+
calibrateDeliverability(input?: GtmBrainCalibrateDeliverabilityInput): Promise<any>;
|
|
2822
|
+
/** Estimate pre-send delivery risk from campaign context, lead samples, and Brain calibrations. */
|
|
2823
|
+
deliveryRisk(input?: GtmBrainDeliveryRiskInput): Promise<any>;
|
|
2824
|
+
/** Rank provider-chain, ICP, source, copy, and sequence failure patterns without writing raw lead data. */
|
|
2825
|
+
failurePatterns(options?: GtmBrainFailurePatternsOptions): Promise<any>;
|
|
2826
|
+
/** List provider presets agents can wire into GTM campaign layers, including BYO and Signaliz fallback options. */
|
|
2827
|
+
providerCatalog(options?: GtmProviderCatalogOptions): Promise<any>;
|
|
2828
|
+
/** Inspect GTM integration activation cards for UI and agent routing without writing state. */
|
|
2829
|
+
integrationsActivationStatus(options?: GtmIntegrationsActivationStatusOptions): Promise<any>;
|
|
2830
|
+
/** Compose Memory, Brain defaults, failure intelligence, and provider routes into a read-only campaign build plan. */
|
|
2831
|
+
campaignBuildPlan(input?: GtmCampaignBuildPlanInput): Promise<any>;
|
|
2832
|
+
/** Persist a reviewed campaign build plan into a campaign object and audit log. Dry-run first by default. */
|
|
2833
|
+
commitCampaignBuildPlan(input?: GtmCampaignBuildPlanCommitInput): Promise<any>;
|
|
2834
|
+
/** Derive exact build_campaign arguments from a committed campaign object without creating a build. */
|
|
2835
|
+
prepareCampaignBuildExecution(input: GtmCampaignBuildExecutionPrepareInput): Promise<any>;
|
|
2836
|
+
/** Prepare exact recipe, route, preview, and delivery arguments for a provider without writing state. */
|
|
2837
|
+
prepareProviderRecipe(input: GtmProviderRecipePrepareInput): Promise<any>;
|
|
2838
|
+
/** Prepare exact Clay webhook recipe, route, preview, and delivery arguments without writing state. */
|
|
2839
|
+
prepareClayWebhook(input?: GtmClayWebhookPrepareInput): Promise<any>;
|
|
2840
|
+
/** Dry-run or confirm a one-call provider route activation across one or more GTM layers. */
|
|
2841
|
+
activateProviderRoute(input: GtmProviderRouteActivateInput): Promise<any>;
|
|
2842
|
+
/** List Signaliz-managed integrations, external MCP servers, app connections, recipes, and layer routes. */
|
|
2843
|
+
listConnections(options?: GtmConnectionsListOptions): Promise<any>;
|
|
2844
|
+
/** Register a workspace connection for the Kernel connection layer. */
|
|
2845
|
+
registerConnection(input: GtmConnectionRegisterInput): Promise<any>;
|
|
2846
|
+
/** Create a reusable integration recipe for BYO providers such as Clay webhooks, Apollo, AI Ark, Octave, or Airbyte. */
|
|
2847
|
+
createIntegrationRecipe(input: GtmIntegrationRecipeCreateInput): Promise<any>;
|
|
2848
|
+
/** Set a workspace or campaign provider route for one GTM layer. */
|
|
2849
|
+
setLayerRoute(input: GtmLayerRouteSetInput): Promise<any>;
|
|
2850
|
+
/** Get effective layer routes, including Signaliz fallback availability. */
|
|
2851
|
+
getLayerRoutes(options?: GtmLayerRoutesGetOptions): Promise<any>;
|
|
2852
|
+
/** Preview one effective layer route before external delivery or provider execution. */
|
|
2853
|
+
previewLayerRoute(input: GtmLayerRoutePreviewInput): Promise<any>;
|
|
2854
|
+
/** Deliver approved campaign-layer records to a webhook recipe, starting with Clay-style webhooks. */
|
|
2855
|
+
deliverWebhook(input: GtmWebhookDeliverInput): Promise<any>;
|
|
2856
|
+
private callMcp;
|
|
2857
|
+
}
|
|
2858
|
+
|
|
286
2859
|
declare class SignalizError extends Error {
|
|
287
2860
|
readonly code: string;
|
|
288
2861
|
readonly errorType: ErrorType;
|
|
@@ -298,14 +2871,25 @@ declare class Signaliz {
|
|
|
298
2871
|
readonly systems: Systems;
|
|
299
2872
|
readonly runs: Runs;
|
|
300
2873
|
readonly http: Http;
|
|
2874
|
+
readonly campaigns: Campaigns;
|
|
2875
|
+
readonly campaignBuilderAgent: CampaignBuilderAgent;
|
|
2876
|
+
readonly icps: Icps;
|
|
2877
|
+
readonly leads: Leads;
|
|
2878
|
+
readonly ops: Ops;
|
|
2879
|
+
readonly ai: Ai;
|
|
2880
|
+
readonly gtm: GtmKernel;
|
|
301
2881
|
private client;
|
|
302
2882
|
constructor(config: SignalizConfig);
|
|
303
2883
|
/** Get current workspace info including credits */
|
|
304
2884
|
getWorkspace(): Promise<WorkspaceInfo>;
|
|
2885
|
+
/** Get MCP platform health and recent latency/error-rate signals */
|
|
2886
|
+
getPlatformHealth(): Promise<PlatformHealth>;
|
|
2887
|
+
/** Alias for getPlatformHealth, useful in health-check scripts */
|
|
2888
|
+
health(): Promise<PlatformHealth>;
|
|
305
2889
|
/** List all available MCP tools */
|
|
306
2890
|
listTools(): Promise<MCPToolInfo[]>;
|
|
307
2891
|
/** Discover tools by natural language query */
|
|
308
2892
|
discover(query: string, category?: string): Promise<MCPToolInfo[]>;
|
|
309
2893
|
}
|
|
310
2894
|
|
|
311
|
-
export { type CompanyIntelligenceParams, type CompanyIntelligenceResult, type CreateSystemParams, type EnrichSignalsParams, type EnrichSignalsResult, type ErrorType, type FindEmailParams, type FindEmailResult, type HttpRequestParams, type HttpRequestResult, type MCPToolInfo, type RunProgressEvent, type RunResult, type RunSystemParams, type Signal, Signaliz, type SignalizConfig, SignalizError, type SignalizErrorData, type SystemResult, type VerifyEmailResult, type WorkspaceInfo };
|
|
2895
|
+
export { Ai, type ApproveDeliveryResult, type BuildOptions, type CampaignArtifact, type CampaignBuildRequest, type CampaignBuildResult, type CampaignBuildRow, type CampaignBuildStatus, CampaignBuilderAgent, type CampaignBuilderAgentPlan, type CampaignBuilderAgentProvider, type CampaignBuilderAgentRequest, type CampaignBuilderApproval, type CampaignBuilderApprovalPolicy, type CampaignBuilderApprovalType, type CampaignBuilderCustomerTool, type CampaignBuilderIntegrationRoute, type CampaignBuilderLayer, type CampaignBuilderMcpStep, type CampaignBuilderMemoryPlan, type CampaignBuilderMemoryQuery, type CampaignBuilderMemoryScope, type CampaignBuilderProvider, type CampaignBuilderRequiredApproval, type CampaignBuilderRouteMode, type CampaignBuilderWorkspaceContext, type CampaignDeliveryMode, type CampaignProviderRouteReadback, type CampaignRowsOptions, type CampaignRowsResult, Campaigns, type CancelBuildResult, type CompanyIntelligenceParams, type CompanyIntelligenceResult, type CreateOutputSinkRequest, type CreateRoutineRequest, type CreateSystemParams, type CustomAiAttachment, type CustomAiFusionConfig, type CustomAiMultiModelParams, type CustomAiMultiModelResult, type CustomAiOutputField, DEFAULT_SIGNALIZ_CAMPAIGN_BUILDER_DEFAULTS, type EmailBatchJobResult, type EnrichSignalsParams, type EnrichSignalsResult, type ErrorType, type ExecutionReference, type ExecutionReferenceInput, type ExecutionReferenceKind, type FindAndVerifyEmailContact, type FindEmailParams, type FindEmailResult, type GenerateLeadsParams, type GenerateLocalLeadsParams, type GtmActorType, type GtmAuthStrategy, type GtmBrainAggregateCalibrationsInput, type GtmBrainAggregatePatternsInput, type GtmBrainCalibrateDeliverabilityInput, type GtmBrainDeliveryRiskInput, type GtmBrainExtractPatternsInput, type GtmBrainFailurePatternsOptions, type GtmBrainLearningAction, type GtmBrainLearningCyclePhase, type GtmBrainLearningCyclePlanInput, type GtmBrainLearningCyclePlanResult, type GtmBrainLearningCycleRunInput, type GtmBrainLearningEvidenceCounts, type GtmBrainLearningLane, type GtmBrainLearningLaneId, type GtmBrainLearningLaneState, type GtmBrainLearningLaneSummary, type GtmBrainLearningPhaseReadiness, type GtmBrainLearningPhaseStatus, type GtmBrainLearningRecommendedToolCall, type GtmBrainPatternsOptions, type GtmBrainSeedDefaultsInput, type GtmCalibrationDimensionType, type GtmCampaignBuildPlanInput, type GtmCampaignCreateInput, type GtmCampaignGetOptions, type GtmCampaignHistoryCampaignInput, type GtmCampaignHistoryImportBatchInput, type GtmCampaignHistoryImportInput, type GtmCampaignHistoryImportRunInput, type GtmCampaignHistoryMemoryInput, type GtmCampaignLearningStatusResult, type GtmCampaignListOptions, type GtmCampaignLogInput, type GtmCampaignSource, type GtmCampaignStatus, type GtmCampaignUpdateInput, type GtmConnectionRegisterInput, type GtmConnectionsListOptions, type GtmFeedbackIngestInput, type GtmIntegrationRecipeCreateInput, type GtmInvocationType, GtmKernel, type GtmLayer, type GtmLayerRouteSetInput, type GtmLayerRoutesGetOptions, type GtmMemorySearchOptions, type GtmMemoryType, type GtmPatternType, type GtmProviderLinkInput, type GtmWebhookDeliverInput, type GtmWorkspaceBootstrapStatusOptions, type GtmWorkspaceContextOptions, type HttpRequestParams, type HttpRequestResult, type IcpDetail, type IcpSummary, Icps, type ImportOctaveResult, type LeadGenJobResult, type ListOutputSinksOptions, type MCPToolInfo, type NativeGtmCapabilityInfo, Ops, type OpsApproveRequest, type OpsApproveResult, type OpsBlueprint, type OpsCadence, type OpsCreateRequest, type OpsCreateResult, type OpsDashboardOptions, type OpsDashboardResult, type OpsDebugDiagnosticError, type OpsDebugOptions, type OpsDebugResult, type OpsPlanRequest, type OpsPlanResult, type OpsPrimitive, type OpsPrimitiveConcurrencyPolicy, type OpsPrimitiveDeadLetterPolicy, type OpsPrimitiveObservabilityPolicy, type OpsPrimitivePermissionLevel, type OpsPrimitiveRetryPolicy, type OpsPrimitiveWorkspaceScope, type OpsQueueStatus, type OpsQueueStatusOptions, type OpsQuickstartStep, type OpsQuickstartWorkflow, type OpsReadinessCheck, type OpsReadinessOptions, type OpsReadinessResult, type OpsReplayResult, type OpsResultsOptions, type OpsResultsResult, type OpsRoutine, type OpsRoutineDeleteResult, type OpsRoutineRunResult, type OpsRoutineSinkResult, type OpsRoutineStatus, type OpsRoutineTick, type OpsRoutineTickItem, type OpsRoutineTickItemsResult, type OpsRoutineTicksResult, type OpsRoutinesResult, type OpsRunOptions, type OpsRunResult, type OpsSink, type OpsSinkType, type OpsStatusOptions, type OpsStatusResult, type OpsTriggerBatchRunStatus, type OpsTriggerRunStatus, type OpsTriggerRunStatusOptions, type PlatformHealth, type RunNativeGtmCapabilityParams, type RunProgressEvent, type RunResult, type RunRoutineRequest, type RunSystemParams, type Signal, Signaliz, type SignalizCampaignBuilderDefaults, type SignalizConfig, SignalizError, type SignalizErrorData, type SimpleOpStatus, type SystemResult, type UpdateRoutineRequest, type VerifyEmailResult, type WaitOptions, type WorkspaceInfo, collectExecutionReferences, createCampaignBuilderAgentPlan, createCampaignBuilderApproval, getMissingCampaignBuilderApprovals, normalizeExecutionReference };
|