@signaliz/sdk 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +98 -0
- package/dist/chunk-R657OZE7.mjs +543 -0
- package/dist/cli.d.mts +1 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +599 -0
- package/dist/cli.mjs +62 -0
- package/dist/index.d.mts +311 -0
- package/dist/index.d.ts +311 -0
- package/dist/index.js +570 -0
- package/dist/index.mjs +8 -0
- package/dist/mcp-config.d.mts +1 -0
- package/dist/mcp-config.d.ts +1 -0
- package/dist/mcp-config.js +687 -0
- package/dist/mcp-config.mjs +126 -0
- package/package.json +35 -0
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
interface SignalizConfig {
|
|
2
|
+
/** API key (sk_...) — simplest auth method */
|
|
3
|
+
apiKey?: string;
|
|
4
|
+
/** OAuth2 client ID for M2M auth */
|
|
5
|
+
clientId?: string;
|
|
6
|
+
/** OAuth2 client secret for M2M auth */
|
|
7
|
+
clientSecret?: string;
|
|
8
|
+
/** Base URL override (defaults to https://api.signaliz.com/functions/v1) */
|
|
9
|
+
baseUrl?: string;
|
|
10
|
+
/** Request timeout in ms (default: 120_000) */
|
|
11
|
+
timeout?: number;
|
|
12
|
+
/** Max retries on 429/5xx (default: 3) */
|
|
13
|
+
maxRetries?: number;
|
|
14
|
+
}
|
|
15
|
+
type ErrorType = 'validation' | 'not_found' | 'rate_limited' | 'provider_error' | 'timeout' | 'auth_expired' | 'insufficient_credits' | 'unknown';
|
|
16
|
+
interface SignalizErrorData {
|
|
17
|
+
code: string;
|
|
18
|
+
message: string;
|
|
19
|
+
errorType: ErrorType;
|
|
20
|
+
retryAfter?: number;
|
|
21
|
+
details?: Record<string, unknown>;
|
|
22
|
+
}
|
|
23
|
+
interface FindEmailParams {
|
|
24
|
+
fullName?: string;
|
|
25
|
+
firstName?: string;
|
|
26
|
+
lastName?: string;
|
|
27
|
+
companyDomain: string;
|
|
28
|
+
linkedinUrl?: string;
|
|
29
|
+
companyName?: string;
|
|
30
|
+
}
|
|
31
|
+
interface FindEmailResult {
|
|
32
|
+
email: string;
|
|
33
|
+
firstName?: string;
|
|
34
|
+
lastName?: string;
|
|
35
|
+
confidence: number;
|
|
36
|
+
verificationStatus: 'valid' | 'invalid' | 'catch_all' | 'unknown';
|
|
37
|
+
providerUsed: string;
|
|
38
|
+
}
|
|
39
|
+
interface VerifyEmailResult {
|
|
40
|
+
email: string;
|
|
41
|
+
isValid: boolean;
|
|
42
|
+
isDeliverable: boolean;
|
|
43
|
+
isCatchAll: boolean;
|
|
44
|
+
provider?: string;
|
|
45
|
+
confidenceScore: number;
|
|
46
|
+
verificationSource?: string;
|
|
47
|
+
}
|
|
48
|
+
interface EnrichSignalsParams {
|
|
49
|
+
companyName: string;
|
|
50
|
+
domain?: string;
|
|
51
|
+
researchPrompt?: string;
|
|
52
|
+
signalTypes?: string[];
|
|
53
|
+
}
|
|
54
|
+
interface Signal {
|
|
55
|
+
title: string;
|
|
56
|
+
signalType: string;
|
|
57
|
+
confidenceScore: number;
|
|
58
|
+
detectedAt: string;
|
|
59
|
+
url?: string;
|
|
60
|
+
content: string;
|
|
61
|
+
}
|
|
62
|
+
interface EnrichSignalsResult {
|
|
63
|
+
companyName: string;
|
|
64
|
+
signals: Signal[];
|
|
65
|
+
totalSignals: number;
|
|
66
|
+
fromCache: boolean;
|
|
67
|
+
}
|
|
68
|
+
interface EnrichSignalsV2Params {
|
|
69
|
+
companyName?: string;
|
|
70
|
+
domain?: string;
|
|
71
|
+
companyDomain?: string;
|
|
72
|
+
researchPrompt?: string;
|
|
73
|
+
signalTypes?: string[];
|
|
74
|
+
online?: boolean;
|
|
75
|
+
targetSignalCount?: number;
|
|
76
|
+
lookbackDays?: number;
|
|
77
|
+
model?: string;
|
|
78
|
+
enableDeepSearch?: boolean;
|
|
79
|
+
enableOutreachIntelligence?: boolean;
|
|
80
|
+
enablePredictiveIntelligence?: boolean;
|
|
81
|
+
icpId?: string;
|
|
82
|
+
cacheTtlHours?: number;
|
|
83
|
+
skipCache?: boolean;
|
|
84
|
+
}
|
|
85
|
+
interface SignalV2 {
|
|
86
|
+
id: string;
|
|
87
|
+
title: string;
|
|
88
|
+
type: string;
|
|
89
|
+
content: string;
|
|
90
|
+
date: string | null;
|
|
91
|
+
sourceUrl: string | null;
|
|
92
|
+
sourceType: string;
|
|
93
|
+
confidence: number | null;
|
|
94
|
+
}
|
|
95
|
+
interface OutreachIntelligence {
|
|
96
|
+
urgencyScore: number | null;
|
|
97
|
+
bestTiming: string | null;
|
|
98
|
+
primaryAngle: string | null;
|
|
99
|
+
ctas: {
|
|
100
|
+
soft?: string;
|
|
101
|
+
direct?: string;
|
|
102
|
+
valueFirst?: string;
|
|
103
|
+
} | null;
|
|
104
|
+
conversationStarters: string[];
|
|
105
|
+
}
|
|
106
|
+
interface Prediction {
|
|
107
|
+
prediction: string;
|
|
108
|
+
confidence: number;
|
|
109
|
+
targetPersona: string | null;
|
|
110
|
+
recommendedAction: string | null;
|
|
111
|
+
}
|
|
112
|
+
interface IntelligenceV2 {
|
|
113
|
+
executiveSummary: string | null;
|
|
114
|
+
keyThemes: string[];
|
|
115
|
+
relevanceScore: number | null;
|
|
116
|
+
outreach: OutreachIntelligence | null;
|
|
117
|
+
predictions: Prediction[];
|
|
118
|
+
}
|
|
119
|
+
interface EnrichSignalsV2Result {
|
|
120
|
+
success: boolean;
|
|
121
|
+
company: {
|
|
122
|
+
name: string | null;
|
|
123
|
+
domain: string | null;
|
|
124
|
+
};
|
|
125
|
+
signals: SignalV2[];
|
|
126
|
+
signalCount: number;
|
|
127
|
+
intelligence: IntelligenceV2 | null;
|
|
128
|
+
credits: {
|
|
129
|
+
charged: number;
|
|
130
|
+
billingType: string;
|
|
131
|
+
breakdown: {
|
|
132
|
+
signalCredits: number;
|
|
133
|
+
modelCostUsd: number;
|
|
134
|
+
modelCredits: number;
|
|
135
|
+
explanation: string;
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
metadata: {
|
|
139
|
+
version: string;
|
|
140
|
+
model: string;
|
|
141
|
+
online: boolean;
|
|
142
|
+
processingTimeMs: number;
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
interface CompanyIntelligenceParams {
|
|
146
|
+
companyName: string;
|
|
147
|
+
domain?: string;
|
|
148
|
+
websiteUrl?: string;
|
|
149
|
+
researchPrompt: string;
|
|
150
|
+
}
|
|
151
|
+
interface CompanyIntelligenceResult {
|
|
152
|
+
companyName: string;
|
|
153
|
+
insights: Array<{
|
|
154
|
+
title: string;
|
|
155
|
+
content: string;
|
|
156
|
+
sourceUrl?: string;
|
|
157
|
+
}>;
|
|
158
|
+
totalInsights: number;
|
|
159
|
+
creditsUsed: number;
|
|
160
|
+
}
|
|
161
|
+
interface CreateSystemParams {
|
|
162
|
+
name: string;
|
|
163
|
+
description?: string;
|
|
164
|
+
capabilities: string[];
|
|
165
|
+
fieldMappings?: Record<string, Record<string, string>>;
|
|
166
|
+
}
|
|
167
|
+
interface SystemResult {
|
|
168
|
+
id: string;
|
|
169
|
+
name: string;
|
|
170
|
+
status: string;
|
|
171
|
+
nodeCount: number;
|
|
172
|
+
createdAt: string;
|
|
173
|
+
}
|
|
174
|
+
interface RunSystemParams {
|
|
175
|
+
data: Record<string, unknown>[];
|
|
176
|
+
async?: boolean;
|
|
177
|
+
}
|
|
178
|
+
interface RunResult {
|
|
179
|
+
runId: string;
|
|
180
|
+
status: string;
|
|
181
|
+
totalRows?: number;
|
|
182
|
+
completedRows?: number;
|
|
183
|
+
creditsUsed?: number;
|
|
184
|
+
}
|
|
185
|
+
interface HttpRequestParams {
|
|
186
|
+
url: string;
|
|
187
|
+
method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
188
|
+
headers?: Record<string, string>;
|
|
189
|
+
body?: unknown;
|
|
190
|
+
}
|
|
191
|
+
interface HttpRequestResult {
|
|
192
|
+
statusCode: number;
|
|
193
|
+
headers: Record<string, string>;
|
|
194
|
+
body: unknown;
|
|
195
|
+
}
|
|
196
|
+
interface WorkspaceInfo {
|
|
197
|
+
id: string;
|
|
198
|
+
name: string;
|
|
199
|
+
creditsRemaining: number;
|
|
200
|
+
plan: string;
|
|
201
|
+
}
|
|
202
|
+
interface RunProgressEvent {
|
|
203
|
+
runId: string;
|
|
204
|
+
status: string;
|
|
205
|
+
completedRows: number;
|
|
206
|
+
totalRows: number;
|
|
207
|
+
creditsUsed: number;
|
|
208
|
+
errors?: string[];
|
|
209
|
+
}
|
|
210
|
+
interface MCPToolInfo {
|
|
211
|
+
name: string;
|
|
212
|
+
description: string;
|
|
213
|
+
category?: string;
|
|
214
|
+
costCredits?: number;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
declare class HttpClient {
|
|
218
|
+
private baseUrl;
|
|
219
|
+
private timeout;
|
|
220
|
+
private maxRetries;
|
|
221
|
+
private apiKey?;
|
|
222
|
+
private accessToken?;
|
|
223
|
+
private clientId?;
|
|
224
|
+
private clientSecret?;
|
|
225
|
+
constructor(config: SignalizConfig);
|
|
226
|
+
request<T = any>(functionName: string, body: Record<string, unknown>, method?: 'POST' | 'GET'): Promise<T>;
|
|
227
|
+
/** Convenience wrapper for POST-based edge function calls */
|
|
228
|
+
post<T = any>(functionName: string, body: Record<string, unknown>): Promise<T>;
|
|
229
|
+
/** JSON-RPC call to the MCP server */
|
|
230
|
+
mcp<T = any>(method: string, params?: Record<string, unknown>): Promise<T>;
|
|
231
|
+
private getToken;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
declare class Emails {
|
|
235
|
+
private client;
|
|
236
|
+
constructor(client: HttpClient);
|
|
237
|
+
/** Find and verify an email address for a person at a company */
|
|
238
|
+
find(params: FindEmailParams): Promise<FindEmailResult>;
|
|
239
|
+
/** Verify a single email address */
|
|
240
|
+
verify(email: string): Promise<VerifyEmailResult>;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
declare class Signals {
|
|
244
|
+
private client;
|
|
245
|
+
constructor(client: HttpClient);
|
|
246
|
+
/** Enrich a company with actionable signals (V1) */
|
|
247
|
+
enrich(params: EnrichSignalsParams): Promise<EnrichSignalsResult>;
|
|
248
|
+
/** Enrich a company with actionable signals (V2 — clean response + online mode) */
|
|
249
|
+
enrichV2(params: EnrichSignalsV2Params): Promise<EnrichSignalsV2Result>;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
declare class Systems {
|
|
253
|
+
private client;
|
|
254
|
+
constructor(client: HttpClient);
|
|
255
|
+
/** Create a new pipeline/system */
|
|
256
|
+
create(params: CreateSystemParams): Promise<SystemResult>;
|
|
257
|
+
/** Run a system with input data */
|
|
258
|
+
run(systemId: string, params: RunSystemParams): Promise<RunResult>;
|
|
259
|
+
/** Get a system by ID */
|
|
260
|
+
get(systemId: string): Promise<SystemResult>;
|
|
261
|
+
/** List all systems */
|
|
262
|
+
list(): Promise<SystemResult[]>;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
declare class Runs {
|
|
266
|
+
private client;
|
|
267
|
+
constructor(client: HttpClient);
|
|
268
|
+
/** Get run status */
|
|
269
|
+
get(runId: string): Promise<RunResult>;
|
|
270
|
+
/** Poll until a run completes. Returns final result. */
|
|
271
|
+
waitForCompletion(runId: string, pollIntervalMs?: number): Promise<RunResult>;
|
|
272
|
+
/**
|
|
273
|
+
* Stream run progress as an async iterator.
|
|
274
|
+
* Usage: for await (const event of signaliz.runs.stream(runId)) { ... }
|
|
275
|
+
*/
|
|
276
|
+
stream(runId: string, pollIntervalMs?: number): AsyncGenerator<RunProgressEvent>;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
declare class Http {
|
|
280
|
+
private client;
|
|
281
|
+
constructor(client: HttpClient);
|
|
282
|
+
/** Proxy an HTTP request through Signaliz */
|
|
283
|
+
request(params: HttpRequestParams): Promise<HttpRequestResult>;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
declare class SignalizError extends Error {
|
|
287
|
+
readonly code: string;
|
|
288
|
+
readonly errorType: ErrorType;
|
|
289
|
+
readonly retryAfter?: number;
|
|
290
|
+
readonly details?: Record<string, unknown>;
|
|
291
|
+
constructor(data: SignalizErrorData);
|
|
292
|
+
get isRetryable(): boolean;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
declare class Signaliz {
|
|
296
|
+
readonly emails: Emails;
|
|
297
|
+
readonly signals: Signals;
|
|
298
|
+
readonly systems: Systems;
|
|
299
|
+
readonly runs: Runs;
|
|
300
|
+
readonly http: Http;
|
|
301
|
+
private client;
|
|
302
|
+
constructor(config: SignalizConfig);
|
|
303
|
+
/** Get current workspace info including credits */
|
|
304
|
+
getWorkspace(): Promise<WorkspaceInfo>;
|
|
305
|
+
/** List all available MCP tools */
|
|
306
|
+
listTools(): Promise<MCPToolInfo[]>;
|
|
307
|
+
/** Discover tools by natural language query */
|
|
308
|
+
discover(query: string, category?: string): Promise<MCPToolInfo[]>;
|
|
309
|
+
}
|
|
310
|
+
|
|
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 };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
interface SignalizConfig {
|
|
2
|
+
/** API key (sk_...) — simplest auth method */
|
|
3
|
+
apiKey?: string;
|
|
4
|
+
/** OAuth2 client ID for M2M auth */
|
|
5
|
+
clientId?: string;
|
|
6
|
+
/** OAuth2 client secret for M2M auth */
|
|
7
|
+
clientSecret?: string;
|
|
8
|
+
/** Base URL override (defaults to https://api.signaliz.com/functions/v1) */
|
|
9
|
+
baseUrl?: string;
|
|
10
|
+
/** Request timeout in ms (default: 120_000) */
|
|
11
|
+
timeout?: number;
|
|
12
|
+
/** Max retries on 429/5xx (default: 3) */
|
|
13
|
+
maxRetries?: number;
|
|
14
|
+
}
|
|
15
|
+
type ErrorType = 'validation' | 'not_found' | 'rate_limited' | 'provider_error' | 'timeout' | 'auth_expired' | 'insufficient_credits' | 'unknown';
|
|
16
|
+
interface SignalizErrorData {
|
|
17
|
+
code: string;
|
|
18
|
+
message: string;
|
|
19
|
+
errorType: ErrorType;
|
|
20
|
+
retryAfter?: number;
|
|
21
|
+
details?: Record<string, unknown>;
|
|
22
|
+
}
|
|
23
|
+
interface FindEmailParams {
|
|
24
|
+
fullName?: string;
|
|
25
|
+
firstName?: string;
|
|
26
|
+
lastName?: string;
|
|
27
|
+
companyDomain: string;
|
|
28
|
+
linkedinUrl?: string;
|
|
29
|
+
companyName?: string;
|
|
30
|
+
}
|
|
31
|
+
interface FindEmailResult {
|
|
32
|
+
email: string;
|
|
33
|
+
firstName?: string;
|
|
34
|
+
lastName?: string;
|
|
35
|
+
confidence: number;
|
|
36
|
+
verificationStatus: 'valid' | 'invalid' | 'catch_all' | 'unknown';
|
|
37
|
+
providerUsed: string;
|
|
38
|
+
}
|
|
39
|
+
interface VerifyEmailResult {
|
|
40
|
+
email: string;
|
|
41
|
+
isValid: boolean;
|
|
42
|
+
isDeliverable: boolean;
|
|
43
|
+
isCatchAll: boolean;
|
|
44
|
+
provider?: string;
|
|
45
|
+
confidenceScore: number;
|
|
46
|
+
verificationSource?: string;
|
|
47
|
+
}
|
|
48
|
+
interface EnrichSignalsParams {
|
|
49
|
+
companyName: string;
|
|
50
|
+
domain?: string;
|
|
51
|
+
researchPrompt?: string;
|
|
52
|
+
signalTypes?: string[];
|
|
53
|
+
}
|
|
54
|
+
interface Signal {
|
|
55
|
+
title: string;
|
|
56
|
+
signalType: string;
|
|
57
|
+
confidenceScore: number;
|
|
58
|
+
detectedAt: string;
|
|
59
|
+
url?: string;
|
|
60
|
+
content: string;
|
|
61
|
+
}
|
|
62
|
+
interface EnrichSignalsResult {
|
|
63
|
+
companyName: string;
|
|
64
|
+
signals: Signal[];
|
|
65
|
+
totalSignals: number;
|
|
66
|
+
fromCache: boolean;
|
|
67
|
+
}
|
|
68
|
+
interface EnrichSignalsV2Params {
|
|
69
|
+
companyName?: string;
|
|
70
|
+
domain?: string;
|
|
71
|
+
companyDomain?: string;
|
|
72
|
+
researchPrompt?: string;
|
|
73
|
+
signalTypes?: string[];
|
|
74
|
+
online?: boolean;
|
|
75
|
+
targetSignalCount?: number;
|
|
76
|
+
lookbackDays?: number;
|
|
77
|
+
model?: string;
|
|
78
|
+
enableDeepSearch?: boolean;
|
|
79
|
+
enableOutreachIntelligence?: boolean;
|
|
80
|
+
enablePredictiveIntelligence?: boolean;
|
|
81
|
+
icpId?: string;
|
|
82
|
+
cacheTtlHours?: number;
|
|
83
|
+
skipCache?: boolean;
|
|
84
|
+
}
|
|
85
|
+
interface SignalV2 {
|
|
86
|
+
id: string;
|
|
87
|
+
title: string;
|
|
88
|
+
type: string;
|
|
89
|
+
content: string;
|
|
90
|
+
date: string | null;
|
|
91
|
+
sourceUrl: string | null;
|
|
92
|
+
sourceType: string;
|
|
93
|
+
confidence: number | null;
|
|
94
|
+
}
|
|
95
|
+
interface OutreachIntelligence {
|
|
96
|
+
urgencyScore: number | null;
|
|
97
|
+
bestTiming: string | null;
|
|
98
|
+
primaryAngle: string | null;
|
|
99
|
+
ctas: {
|
|
100
|
+
soft?: string;
|
|
101
|
+
direct?: string;
|
|
102
|
+
valueFirst?: string;
|
|
103
|
+
} | null;
|
|
104
|
+
conversationStarters: string[];
|
|
105
|
+
}
|
|
106
|
+
interface Prediction {
|
|
107
|
+
prediction: string;
|
|
108
|
+
confidence: number;
|
|
109
|
+
targetPersona: string | null;
|
|
110
|
+
recommendedAction: string | null;
|
|
111
|
+
}
|
|
112
|
+
interface IntelligenceV2 {
|
|
113
|
+
executiveSummary: string | null;
|
|
114
|
+
keyThemes: string[];
|
|
115
|
+
relevanceScore: number | null;
|
|
116
|
+
outreach: OutreachIntelligence | null;
|
|
117
|
+
predictions: Prediction[];
|
|
118
|
+
}
|
|
119
|
+
interface EnrichSignalsV2Result {
|
|
120
|
+
success: boolean;
|
|
121
|
+
company: {
|
|
122
|
+
name: string | null;
|
|
123
|
+
domain: string | null;
|
|
124
|
+
};
|
|
125
|
+
signals: SignalV2[];
|
|
126
|
+
signalCount: number;
|
|
127
|
+
intelligence: IntelligenceV2 | null;
|
|
128
|
+
credits: {
|
|
129
|
+
charged: number;
|
|
130
|
+
billingType: string;
|
|
131
|
+
breakdown: {
|
|
132
|
+
signalCredits: number;
|
|
133
|
+
modelCostUsd: number;
|
|
134
|
+
modelCredits: number;
|
|
135
|
+
explanation: string;
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
metadata: {
|
|
139
|
+
version: string;
|
|
140
|
+
model: string;
|
|
141
|
+
online: boolean;
|
|
142
|
+
processingTimeMs: number;
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
interface CompanyIntelligenceParams {
|
|
146
|
+
companyName: string;
|
|
147
|
+
domain?: string;
|
|
148
|
+
websiteUrl?: string;
|
|
149
|
+
researchPrompt: string;
|
|
150
|
+
}
|
|
151
|
+
interface CompanyIntelligenceResult {
|
|
152
|
+
companyName: string;
|
|
153
|
+
insights: Array<{
|
|
154
|
+
title: string;
|
|
155
|
+
content: string;
|
|
156
|
+
sourceUrl?: string;
|
|
157
|
+
}>;
|
|
158
|
+
totalInsights: number;
|
|
159
|
+
creditsUsed: number;
|
|
160
|
+
}
|
|
161
|
+
interface CreateSystemParams {
|
|
162
|
+
name: string;
|
|
163
|
+
description?: string;
|
|
164
|
+
capabilities: string[];
|
|
165
|
+
fieldMappings?: Record<string, Record<string, string>>;
|
|
166
|
+
}
|
|
167
|
+
interface SystemResult {
|
|
168
|
+
id: string;
|
|
169
|
+
name: string;
|
|
170
|
+
status: string;
|
|
171
|
+
nodeCount: number;
|
|
172
|
+
createdAt: string;
|
|
173
|
+
}
|
|
174
|
+
interface RunSystemParams {
|
|
175
|
+
data: Record<string, unknown>[];
|
|
176
|
+
async?: boolean;
|
|
177
|
+
}
|
|
178
|
+
interface RunResult {
|
|
179
|
+
runId: string;
|
|
180
|
+
status: string;
|
|
181
|
+
totalRows?: number;
|
|
182
|
+
completedRows?: number;
|
|
183
|
+
creditsUsed?: number;
|
|
184
|
+
}
|
|
185
|
+
interface HttpRequestParams {
|
|
186
|
+
url: string;
|
|
187
|
+
method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
188
|
+
headers?: Record<string, string>;
|
|
189
|
+
body?: unknown;
|
|
190
|
+
}
|
|
191
|
+
interface HttpRequestResult {
|
|
192
|
+
statusCode: number;
|
|
193
|
+
headers: Record<string, string>;
|
|
194
|
+
body: unknown;
|
|
195
|
+
}
|
|
196
|
+
interface WorkspaceInfo {
|
|
197
|
+
id: string;
|
|
198
|
+
name: string;
|
|
199
|
+
creditsRemaining: number;
|
|
200
|
+
plan: string;
|
|
201
|
+
}
|
|
202
|
+
interface RunProgressEvent {
|
|
203
|
+
runId: string;
|
|
204
|
+
status: string;
|
|
205
|
+
completedRows: number;
|
|
206
|
+
totalRows: number;
|
|
207
|
+
creditsUsed: number;
|
|
208
|
+
errors?: string[];
|
|
209
|
+
}
|
|
210
|
+
interface MCPToolInfo {
|
|
211
|
+
name: string;
|
|
212
|
+
description: string;
|
|
213
|
+
category?: string;
|
|
214
|
+
costCredits?: number;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
declare class HttpClient {
|
|
218
|
+
private baseUrl;
|
|
219
|
+
private timeout;
|
|
220
|
+
private maxRetries;
|
|
221
|
+
private apiKey?;
|
|
222
|
+
private accessToken?;
|
|
223
|
+
private clientId?;
|
|
224
|
+
private clientSecret?;
|
|
225
|
+
constructor(config: SignalizConfig);
|
|
226
|
+
request<T = any>(functionName: string, body: Record<string, unknown>, method?: 'POST' | 'GET'): Promise<T>;
|
|
227
|
+
/** Convenience wrapper for POST-based edge function calls */
|
|
228
|
+
post<T = any>(functionName: string, body: Record<string, unknown>): Promise<T>;
|
|
229
|
+
/** JSON-RPC call to the MCP server */
|
|
230
|
+
mcp<T = any>(method: string, params?: Record<string, unknown>): Promise<T>;
|
|
231
|
+
private getToken;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
declare class Emails {
|
|
235
|
+
private client;
|
|
236
|
+
constructor(client: HttpClient);
|
|
237
|
+
/** Find and verify an email address for a person at a company */
|
|
238
|
+
find(params: FindEmailParams): Promise<FindEmailResult>;
|
|
239
|
+
/** Verify a single email address */
|
|
240
|
+
verify(email: string): Promise<VerifyEmailResult>;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
declare class Signals {
|
|
244
|
+
private client;
|
|
245
|
+
constructor(client: HttpClient);
|
|
246
|
+
/** Enrich a company with actionable signals (V1) */
|
|
247
|
+
enrich(params: EnrichSignalsParams): Promise<EnrichSignalsResult>;
|
|
248
|
+
/** Enrich a company with actionable signals (V2 — clean response + online mode) */
|
|
249
|
+
enrichV2(params: EnrichSignalsV2Params): Promise<EnrichSignalsV2Result>;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
declare class Systems {
|
|
253
|
+
private client;
|
|
254
|
+
constructor(client: HttpClient);
|
|
255
|
+
/** Create a new pipeline/system */
|
|
256
|
+
create(params: CreateSystemParams): Promise<SystemResult>;
|
|
257
|
+
/** Run a system with input data */
|
|
258
|
+
run(systemId: string, params: RunSystemParams): Promise<RunResult>;
|
|
259
|
+
/** Get a system by ID */
|
|
260
|
+
get(systemId: string): Promise<SystemResult>;
|
|
261
|
+
/** List all systems */
|
|
262
|
+
list(): Promise<SystemResult[]>;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
declare class Runs {
|
|
266
|
+
private client;
|
|
267
|
+
constructor(client: HttpClient);
|
|
268
|
+
/** Get run status */
|
|
269
|
+
get(runId: string): Promise<RunResult>;
|
|
270
|
+
/** Poll until a run completes. Returns final result. */
|
|
271
|
+
waitForCompletion(runId: string, pollIntervalMs?: number): Promise<RunResult>;
|
|
272
|
+
/**
|
|
273
|
+
* Stream run progress as an async iterator.
|
|
274
|
+
* Usage: for await (const event of signaliz.runs.stream(runId)) { ... }
|
|
275
|
+
*/
|
|
276
|
+
stream(runId: string, pollIntervalMs?: number): AsyncGenerator<RunProgressEvent>;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
declare class Http {
|
|
280
|
+
private client;
|
|
281
|
+
constructor(client: HttpClient);
|
|
282
|
+
/** Proxy an HTTP request through Signaliz */
|
|
283
|
+
request(params: HttpRequestParams): Promise<HttpRequestResult>;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
declare class SignalizError extends Error {
|
|
287
|
+
readonly code: string;
|
|
288
|
+
readonly errorType: ErrorType;
|
|
289
|
+
readonly retryAfter?: number;
|
|
290
|
+
readonly details?: Record<string, unknown>;
|
|
291
|
+
constructor(data: SignalizErrorData);
|
|
292
|
+
get isRetryable(): boolean;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
declare class Signaliz {
|
|
296
|
+
readonly emails: Emails;
|
|
297
|
+
readonly signals: Signals;
|
|
298
|
+
readonly systems: Systems;
|
|
299
|
+
readonly runs: Runs;
|
|
300
|
+
readonly http: Http;
|
|
301
|
+
private client;
|
|
302
|
+
constructor(config: SignalizConfig);
|
|
303
|
+
/** Get current workspace info including credits */
|
|
304
|
+
getWorkspace(): Promise<WorkspaceInfo>;
|
|
305
|
+
/** List all available MCP tools */
|
|
306
|
+
listTools(): Promise<MCPToolInfo[]>;
|
|
307
|
+
/** Discover tools by natural language query */
|
|
308
|
+
discover(query: string, category?: string): Promise<MCPToolInfo[]>;
|
|
309
|
+
}
|
|
310
|
+
|
|
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 };
|