@cernisdata/sdk 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +94 -2
- package/dist/cjs/index.d.ts +1940 -0
- package/dist/cjs/index.js +600 -0
- package/dist/cjs/package.json +1 -0
- package/dist/index.d.ts +1940 -0
- package/dist/index.js +577 -0
- package/package.json +38 -4
|
@@ -0,0 +1,1940 @@
|
|
|
1
|
+
/** Fallback API base URL, from APP_URL in wrangler.jsonc at build time. Empty until a domain is set: pass baseUrl or set CERNIS_DATA_BASE_URL. */
|
|
2
|
+
export declare const DEFAULT_BASE_URL: string;
|
|
3
|
+
/** Include/exclude list filter. A string or an array means include. */
|
|
4
|
+
export type IncludeExclude = string | string[] | {
|
|
5
|
+
include?: string | string[];
|
|
6
|
+
exclude?: string | string[];
|
|
7
|
+
};
|
|
8
|
+
/** Whole number range. Set min, max or both. */
|
|
9
|
+
export interface Range {
|
|
10
|
+
min?: number;
|
|
11
|
+
max?: number;
|
|
12
|
+
}
|
|
13
|
+
/** Fields of each filters object, and which of them are include/exclude lists. */
|
|
14
|
+
export declare const FILTERS: {
|
|
15
|
+
readonly PeopleFilters: {
|
|
16
|
+
readonly fields: readonly ['first_names', 'last_names', 'job_titles', 'past_job_titles', 'keywords', 'locations', 'languages', 'schools', 'skills', 'company_names', 'company_domains', 'company_linkedin_urls', 'company_industries', 'company_locations', 'company_keywords', 'company_headcount', 'years_of_experience'];
|
|
17
|
+
readonly lists: readonly ['first_names', 'last_names', 'job_titles', 'past_job_titles', 'keywords', 'locations', 'languages', 'schools', 'skills', 'company_names', 'company_domains', 'company_linkedin_urls', 'company_industries', 'company_locations', 'company_keywords'];
|
|
18
|
+
};
|
|
19
|
+
readonly CompanyFilters: {
|
|
20
|
+
readonly fields: readonly ['names', 'domains', 'industries', 'locations', 'keywords', 'types', 'headcount'];
|
|
21
|
+
readonly lists: readonly ['names', 'domains', 'industries', 'locations', 'keywords', 'types'];
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export declare const ENDPOINTS: readonly [{
|
|
25
|
+
readonly id: 'people.search';
|
|
26
|
+
readonly name: "People Search";
|
|
27
|
+
readonly category: 'people';
|
|
28
|
+
readonly fn: 'search';
|
|
29
|
+
readonly method: 'POST';
|
|
30
|
+
readonly path: '/v1/people/search';
|
|
31
|
+
readonly mode: 'sync';
|
|
32
|
+
readonly status: 'live';
|
|
33
|
+
readonly typed: true;
|
|
34
|
+
readonly paginated: true;
|
|
35
|
+
readonly filters: 'PeopleFilters';
|
|
36
|
+
}, {
|
|
37
|
+
readonly id: 'people.search_count';
|
|
38
|
+
readonly name: "People Search Count";
|
|
39
|
+
readonly category: 'people';
|
|
40
|
+
readonly fn: 'searchCount';
|
|
41
|
+
readonly method: 'POST';
|
|
42
|
+
readonly path: '/v1/people/search/count';
|
|
43
|
+
readonly mode: 'sync';
|
|
44
|
+
readonly status: 'live';
|
|
45
|
+
readonly typed: true;
|
|
46
|
+
readonly filters: 'PeopleFilters';
|
|
47
|
+
}, {
|
|
48
|
+
readonly id: 'people.decision_makers';
|
|
49
|
+
readonly name: "Decision-Maker Search";
|
|
50
|
+
readonly category: 'people';
|
|
51
|
+
readonly fn: 'decisionMakers';
|
|
52
|
+
readonly method: 'POST';
|
|
53
|
+
readonly path: '/v1/people/decision-makers';
|
|
54
|
+
readonly mode: 'sync';
|
|
55
|
+
readonly status: 'live';
|
|
56
|
+
readonly typed: true;
|
|
57
|
+
readonly paginated: true;
|
|
58
|
+
readonly lists: readonly ['locations'];
|
|
59
|
+
}, {
|
|
60
|
+
readonly id: 'people.employees';
|
|
61
|
+
readonly name: "Employee Finder";
|
|
62
|
+
readonly category: 'people';
|
|
63
|
+
readonly fn: 'employees';
|
|
64
|
+
readonly method: 'POST';
|
|
65
|
+
readonly path: '/v1/people/employees';
|
|
66
|
+
readonly mode: 'sync';
|
|
67
|
+
readonly status: 'live';
|
|
68
|
+
readonly typed: true;
|
|
69
|
+
readonly paginated: true;
|
|
70
|
+
readonly lists: readonly ['job_titles', 'locations'];
|
|
71
|
+
}, {
|
|
72
|
+
readonly id: 'people.profile_basic';
|
|
73
|
+
readonly name: "Basic Professional Profile";
|
|
74
|
+
readonly category: 'people';
|
|
75
|
+
readonly fn: 'profileBasic';
|
|
76
|
+
readonly method: 'GET';
|
|
77
|
+
readonly path: '/v1/people/profile/basic';
|
|
78
|
+
readonly mode: 'sync';
|
|
79
|
+
readonly status: 'live';
|
|
80
|
+
readonly typed: true;
|
|
81
|
+
}, {
|
|
82
|
+
readonly id: 'people.profile';
|
|
83
|
+
readonly name: "Full Professional Profile";
|
|
84
|
+
readonly category: 'people';
|
|
85
|
+
readonly fn: 'profile';
|
|
86
|
+
readonly method: 'GET';
|
|
87
|
+
readonly path: '/v1/people/profile';
|
|
88
|
+
readonly mode: 'sync';
|
|
89
|
+
readonly status: 'live';
|
|
90
|
+
readonly typed: true;
|
|
91
|
+
}, {
|
|
92
|
+
readonly id: 'people.employment_history';
|
|
93
|
+
readonly name: "Employment History";
|
|
94
|
+
readonly category: 'people';
|
|
95
|
+
readonly fn: 'employmentHistory';
|
|
96
|
+
readonly method: 'GET';
|
|
97
|
+
readonly path: '/v1/people/employment-history';
|
|
98
|
+
readonly mode: 'sync';
|
|
99
|
+
readonly status: 'live';
|
|
100
|
+
readonly typed: true;
|
|
101
|
+
}, {
|
|
102
|
+
readonly id: 'people.profile_url';
|
|
103
|
+
readonly name: "Professional Profile URL Finder";
|
|
104
|
+
readonly category: 'people';
|
|
105
|
+
readonly fn: 'profileUrl';
|
|
106
|
+
readonly method: 'POST';
|
|
107
|
+
readonly path: '/v1/people/profile-url';
|
|
108
|
+
readonly mode: 'sync';
|
|
109
|
+
readonly status: 'live';
|
|
110
|
+
readonly typed: true;
|
|
111
|
+
}, {
|
|
112
|
+
readonly id: 'people.current_role';
|
|
113
|
+
readonly name: "Current Role";
|
|
114
|
+
readonly category: 'people';
|
|
115
|
+
readonly fn: 'currentRole';
|
|
116
|
+
readonly method: 'GET';
|
|
117
|
+
readonly path: '/v1/people/current-role';
|
|
118
|
+
readonly mode: 'sync';
|
|
119
|
+
readonly status: 'live';
|
|
120
|
+
readonly typed: true;
|
|
121
|
+
}, {
|
|
122
|
+
readonly id: 'people.seniority';
|
|
123
|
+
readonly name: "Seniority Classification";
|
|
124
|
+
readonly category: 'people';
|
|
125
|
+
readonly fn: 'seniority';
|
|
126
|
+
readonly method: 'POST';
|
|
127
|
+
readonly path: '/v1/people/seniority';
|
|
128
|
+
readonly mode: 'sync';
|
|
129
|
+
readonly status: 'live';
|
|
130
|
+
readonly typed: true;
|
|
131
|
+
}, {
|
|
132
|
+
readonly id: 'company.search';
|
|
133
|
+
readonly name: "Company Search";
|
|
134
|
+
readonly category: 'company';
|
|
135
|
+
readonly fn: 'search';
|
|
136
|
+
readonly method: 'POST';
|
|
137
|
+
readonly path: '/v1/companies/search';
|
|
138
|
+
readonly mode: 'sync';
|
|
139
|
+
readonly status: 'live';
|
|
140
|
+
readonly typed: true;
|
|
141
|
+
readonly paginated: true;
|
|
142
|
+
readonly filters: 'CompanyFilters';
|
|
143
|
+
}, {
|
|
144
|
+
readonly id: 'company.search_count';
|
|
145
|
+
readonly name: "Company Search Count";
|
|
146
|
+
readonly category: 'company';
|
|
147
|
+
readonly fn: 'searchCount';
|
|
148
|
+
readonly method: 'POST';
|
|
149
|
+
readonly path: '/v1/companies/search/count';
|
|
150
|
+
readonly mode: 'sync';
|
|
151
|
+
readonly status: 'live';
|
|
152
|
+
readonly typed: true;
|
|
153
|
+
readonly filters: 'CompanyFilters';
|
|
154
|
+
}, {
|
|
155
|
+
readonly id: 'company.enrich';
|
|
156
|
+
readonly name: "Company Enrichment";
|
|
157
|
+
readonly category: 'company';
|
|
158
|
+
readonly fn: 'enrich';
|
|
159
|
+
readonly method: 'POST';
|
|
160
|
+
readonly path: '/v1/companies/enrich';
|
|
161
|
+
readonly mode: 'sync';
|
|
162
|
+
readonly status: 'live';
|
|
163
|
+
readonly typed: true;
|
|
164
|
+
}, {
|
|
165
|
+
readonly id: 'company.domain';
|
|
166
|
+
readonly name: "Company Domain Finder";
|
|
167
|
+
readonly category: 'company';
|
|
168
|
+
readonly fn: 'domain';
|
|
169
|
+
readonly method: 'POST';
|
|
170
|
+
readonly path: '/v1/companies/domain';
|
|
171
|
+
readonly mode: 'sync';
|
|
172
|
+
readonly status: 'live';
|
|
173
|
+
readonly typed: true;
|
|
174
|
+
}, {
|
|
175
|
+
readonly id: 'company.linkedin';
|
|
176
|
+
readonly name: "LinkedIn Company Profile";
|
|
177
|
+
readonly category: 'company';
|
|
178
|
+
readonly fn: 'linkedin';
|
|
179
|
+
readonly method: 'GET';
|
|
180
|
+
readonly path: '/v1/companies/linkedin';
|
|
181
|
+
readonly mode: 'sync';
|
|
182
|
+
readonly status: 'live';
|
|
183
|
+
readonly typed: true;
|
|
184
|
+
}, {
|
|
185
|
+
readonly id: 'company.profile_url';
|
|
186
|
+
readonly name: "Company Profile URL Finder";
|
|
187
|
+
readonly category: 'company';
|
|
188
|
+
readonly fn: 'profileUrl';
|
|
189
|
+
readonly method: 'POST';
|
|
190
|
+
readonly path: '/v1/companies/profile-url';
|
|
191
|
+
readonly mode: 'sync';
|
|
192
|
+
readonly status: 'live';
|
|
193
|
+
readonly typed: true;
|
|
194
|
+
}, {
|
|
195
|
+
readonly id: 'company.firmographics';
|
|
196
|
+
readonly name: "Company Firmographics";
|
|
197
|
+
readonly category: 'company';
|
|
198
|
+
readonly fn: 'firmographics';
|
|
199
|
+
readonly method: 'GET';
|
|
200
|
+
readonly path: '/v1/companies/firmographics';
|
|
201
|
+
readonly mode: 'sync';
|
|
202
|
+
readonly status: 'live';
|
|
203
|
+
readonly typed: true;
|
|
204
|
+
}, {
|
|
205
|
+
readonly id: 'company.headcount';
|
|
206
|
+
readonly name: "Company Headcount";
|
|
207
|
+
readonly category: 'company';
|
|
208
|
+
readonly fn: 'headcount';
|
|
209
|
+
readonly method: 'GET';
|
|
210
|
+
readonly path: '/v1/companies/headcount';
|
|
211
|
+
readonly mode: 'sync';
|
|
212
|
+
readonly status: 'live';
|
|
213
|
+
readonly typed: true;
|
|
214
|
+
}, {
|
|
215
|
+
readonly id: 'company.funding';
|
|
216
|
+
readonly name: "Company Funding";
|
|
217
|
+
readonly category: 'company';
|
|
218
|
+
readonly fn: 'funding';
|
|
219
|
+
readonly method: 'GET';
|
|
220
|
+
readonly path: '/v1/companies/funding';
|
|
221
|
+
readonly mode: 'sync';
|
|
222
|
+
readonly status: 'live';
|
|
223
|
+
readonly typed: true;
|
|
224
|
+
}, {
|
|
225
|
+
readonly id: 'company.technographics';
|
|
226
|
+
readonly name: "Technographics";
|
|
227
|
+
readonly category: 'company';
|
|
228
|
+
readonly fn: 'technographics';
|
|
229
|
+
readonly method: 'GET';
|
|
230
|
+
readonly path: '/v1/companies/technographics';
|
|
231
|
+
readonly mode: 'sync';
|
|
232
|
+
readonly status: 'live';
|
|
233
|
+
readonly typed: true;
|
|
234
|
+
}, {
|
|
235
|
+
readonly id: 'company.similar';
|
|
236
|
+
readonly name: "Similar Companies";
|
|
237
|
+
readonly category: 'company';
|
|
238
|
+
readonly fn: 'similar';
|
|
239
|
+
readonly method: 'POST';
|
|
240
|
+
readonly path: '/v1/companies/similar';
|
|
241
|
+
readonly mode: 'sync';
|
|
242
|
+
readonly status: 'live';
|
|
243
|
+
readonly typed: true;
|
|
244
|
+
}, {
|
|
245
|
+
readonly id: 'company.website_metadata';
|
|
246
|
+
readonly name: "Website Metadata";
|
|
247
|
+
readonly category: 'company';
|
|
248
|
+
readonly fn: 'websiteMetadata';
|
|
249
|
+
readonly method: 'GET';
|
|
250
|
+
readonly path: '/v1/companies/website-metadata';
|
|
251
|
+
readonly mode: 'sync';
|
|
252
|
+
readonly status: 'live';
|
|
253
|
+
readonly typed: true;
|
|
254
|
+
}, {
|
|
255
|
+
readonly id: 'contact.email';
|
|
256
|
+
readonly name: "Work Email Finder";
|
|
257
|
+
readonly category: 'contact';
|
|
258
|
+
readonly fn: 'email';
|
|
259
|
+
readonly method: 'POST';
|
|
260
|
+
readonly path: '/v1/contacts/email';
|
|
261
|
+
readonly mode: 'async';
|
|
262
|
+
readonly status: 'live';
|
|
263
|
+
readonly typed: true;
|
|
264
|
+
}, {
|
|
265
|
+
readonly id: 'contact.email_bulk';
|
|
266
|
+
readonly name: "Bulk Email Finder";
|
|
267
|
+
readonly category: 'contact';
|
|
268
|
+
readonly fn: 'emailBulk';
|
|
269
|
+
readonly method: 'POST';
|
|
270
|
+
readonly path: '/v1/contacts/email/bulk';
|
|
271
|
+
readonly mode: 'job';
|
|
272
|
+
readonly status: 'live';
|
|
273
|
+
readonly typed: true;
|
|
274
|
+
}, {
|
|
275
|
+
readonly id: 'contact.verify';
|
|
276
|
+
readonly name: "Email Verification";
|
|
277
|
+
readonly category: 'contact';
|
|
278
|
+
readonly fn: 'verify';
|
|
279
|
+
readonly method: 'POST';
|
|
280
|
+
readonly path: '/v1/contacts/verify';
|
|
281
|
+
readonly mode: 'async';
|
|
282
|
+
readonly status: 'live';
|
|
283
|
+
readonly typed: true;
|
|
284
|
+
}, {
|
|
285
|
+
readonly id: 'contact.verify_bulk';
|
|
286
|
+
readonly name: "Bulk Email Verification";
|
|
287
|
+
readonly category: 'contact';
|
|
288
|
+
readonly fn: 'verifyBulk';
|
|
289
|
+
readonly method: 'POST';
|
|
290
|
+
readonly path: '/v1/contacts/verify/bulk';
|
|
291
|
+
readonly mode: 'job';
|
|
292
|
+
readonly status: 'live';
|
|
293
|
+
readonly typed: true;
|
|
294
|
+
}, {
|
|
295
|
+
readonly id: 'contact.reverse';
|
|
296
|
+
readonly name: "Reverse Email Lookup";
|
|
297
|
+
readonly category: 'contact';
|
|
298
|
+
readonly fn: 'reverse';
|
|
299
|
+
readonly method: 'GET';
|
|
300
|
+
readonly path: '/v1/contacts/reverse';
|
|
301
|
+
readonly mode: 'sync';
|
|
302
|
+
readonly status: 'live';
|
|
303
|
+
readonly typed: true;
|
|
304
|
+
}, {
|
|
305
|
+
readonly id: 'contact.phone';
|
|
306
|
+
readonly name: "Mobile Phone Finder";
|
|
307
|
+
readonly category: 'contact';
|
|
308
|
+
readonly fn: 'phone';
|
|
309
|
+
readonly method: 'POST';
|
|
310
|
+
readonly path: '/v1/contacts/phone';
|
|
311
|
+
readonly mode: 'sync';
|
|
312
|
+
readonly status: 'live';
|
|
313
|
+
readonly typed: true;
|
|
314
|
+
}, {
|
|
315
|
+
readonly id: 'contact.domain_emails';
|
|
316
|
+
readonly name: "Domain Email Discovery";
|
|
317
|
+
readonly category: 'contact';
|
|
318
|
+
readonly fn: 'domainEmails';
|
|
319
|
+
readonly method: 'GET';
|
|
320
|
+
readonly path: '/v1/contacts/domain-emails';
|
|
321
|
+
readonly mode: 'sync';
|
|
322
|
+
readonly status: 'live';
|
|
323
|
+
readonly typed: true;
|
|
324
|
+
}, {
|
|
325
|
+
readonly id: 'contact.linkedin_email';
|
|
326
|
+
readonly name: "LinkedIn to Work Email";
|
|
327
|
+
readonly category: 'contact';
|
|
328
|
+
readonly fn: 'linkedinEmail';
|
|
329
|
+
readonly method: 'POST';
|
|
330
|
+
readonly path: '/v1/contacts/linkedin-email';
|
|
331
|
+
readonly mode: 'async';
|
|
332
|
+
readonly status: 'live';
|
|
333
|
+
readonly typed: true;
|
|
334
|
+
}, {
|
|
335
|
+
readonly id: 'contact.waterfall';
|
|
336
|
+
readonly name: "Email Waterfall";
|
|
337
|
+
readonly category: 'contact';
|
|
338
|
+
readonly fn: 'waterfall';
|
|
339
|
+
readonly method: 'POST';
|
|
340
|
+
readonly path: '/v1/contacts/email/waterfall';
|
|
341
|
+
readonly mode: 'async';
|
|
342
|
+
readonly status: 'live';
|
|
343
|
+
readonly typed: true;
|
|
344
|
+
}, {
|
|
345
|
+
readonly id: 'contact.validate_syntax';
|
|
346
|
+
readonly name: "Email Syntax Validation";
|
|
347
|
+
readonly category: 'contact';
|
|
348
|
+
readonly fn: 'validateSyntax';
|
|
349
|
+
readonly method: 'POST';
|
|
350
|
+
readonly path: '/v1/contacts/validate/syntax';
|
|
351
|
+
readonly mode: 'sync';
|
|
352
|
+
readonly status: 'live';
|
|
353
|
+
readonly typed: true;
|
|
354
|
+
}, {
|
|
355
|
+
readonly id: 'contact.validate_mx';
|
|
356
|
+
readonly name: "MX Record Validation";
|
|
357
|
+
readonly category: 'contact';
|
|
358
|
+
readonly fn: 'validateMx';
|
|
359
|
+
readonly method: 'GET';
|
|
360
|
+
readonly path: '/v1/contacts/validate/mx';
|
|
361
|
+
readonly mode: 'sync';
|
|
362
|
+
readonly status: 'live';
|
|
363
|
+
readonly typed: true;
|
|
364
|
+
}, {
|
|
365
|
+
readonly id: 'signals.jobs_search';
|
|
366
|
+
readonly name: "Job Search";
|
|
367
|
+
readonly category: 'signals';
|
|
368
|
+
readonly fn: 'jobsSearch';
|
|
369
|
+
readonly method: 'POST';
|
|
370
|
+
readonly path: '/v1/signals/jobs/search';
|
|
371
|
+
readonly mode: 'sync';
|
|
372
|
+
readonly status: 'live';
|
|
373
|
+
readonly typed: true;
|
|
374
|
+
readonly paginated: true;
|
|
375
|
+
}, {
|
|
376
|
+
readonly id: 'signals.job';
|
|
377
|
+
readonly name: "Job Details";
|
|
378
|
+
readonly category: 'signals';
|
|
379
|
+
readonly fn: 'job';
|
|
380
|
+
readonly method: 'GET';
|
|
381
|
+
readonly path: '/v1/signals/jobs';
|
|
382
|
+
readonly mode: 'sync';
|
|
383
|
+
readonly status: 'live';
|
|
384
|
+
readonly typed: true;
|
|
385
|
+
}, {
|
|
386
|
+
readonly id: 'signals.hiring';
|
|
387
|
+
readonly name: "Company Hiring Activity";
|
|
388
|
+
readonly category: 'signals';
|
|
389
|
+
readonly fn: 'hiring';
|
|
390
|
+
readonly method: 'GET';
|
|
391
|
+
readonly path: '/v1/signals/hiring';
|
|
392
|
+
readonly mode: 'sync';
|
|
393
|
+
readonly status: 'live';
|
|
394
|
+
readonly typed: true;
|
|
395
|
+
}, {
|
|
396
|
+
readonly id: 'signals.job_changes';
|
|
397
|
+
readonly name: "Job Change Detector";
|
|
398
|
+
readonly category: 'signals';
|
|
399
|
+
readonly fn: 'jobChanges';
|
|
400
|
+
readonly method: 'POST';
|
|
401
|
+
readonly path: '/v1/signals/job-changes';
|
|
402
|
+
readonly mode: 'sync';
|
|
403
|
+
readonly status: 'live';
|
|
404
|
+
readonly typed: true;
|
|
405
|
+
}, {
|
|
406
|
+
readonly id: 'signals.funding';
|
|
407
|
+
readonly name: "Funding Lookup";
|
|
408
|
+
readonly category: 'signals';
|
|
409
|
+
readonly fn: 'funding';
|
|
410
|
+
readonly method: 'GET';
|
|
411
|
+
readonly path: '/v1/signals/funding';
|
|
412
|
+
readonly mode: 'sync';
|
|
413
|
+
readonly status: 'live';
|
|
414
|
+
readonly typed: true;
|
|
415
|
+
}, {
|
|
416
|
+
readonly id: 'signals.funding_recent';
|
|
417
|
+
readonly name: "Recent Funding Events";
|
|
418
|
+
readonly category: 'signals';
|
|
419
|
+
readonly fn: 'fundingRecent';
|
|
420
|
+
readonly method: 'POST';
|
|
421
|
+
readonly path: '/v1/signals/funding/recent';
|
|
422
|
+
readonly mode: 'sync';
|
|
423
|
+
readonly status: 'live';
|
|
424
|
+
readonly typed: true;
|
|
425
|
+
}, {
|
|
426
|
+
readonly id: 'signals.leadership';
|
|
427
|
+
readonly name: "Leadership Changes";
|
|
428
|
+
readonly category: 'signals';
|
|
429
|
+
readonly fn: 'leadership';
|
|
430
|
+
readonly method: 'GET';
|
|
431
|
+
readonly path: '/v1/signals/leadership';
|
|
432
|
+
readonly mode: 'sync';
|
|
433
|
+
readonly status: 'live';
|
|
434
|
+
readonly typed: true;
|
|
435
|
+
}, {
|
|
436
|
+
readonly id: 'signals.news';
|
|
437
|
+
readonly name: "Company News";
|
|
438
|
+
readonly category: 'signals';
|
|
439
|
+
readonly fn: 'news';
|
|
440
|
+
readonly method: 'GET';
|
|
441
|
+
readonly path: '/v1/signals/news';
|
|
442
|
+
readonly mode: 'sync';
|
|
443
|
+
readonly status: 'live';
|
|
444
|
+
readonly typed: true;
|
|
445
|
+
}, {
|
|
446
|
+
readonly id: 'signals.website_changes';
|
|
447
|
+
readonly name: "Website Change Detection";
|
|
448
|
+
readonly category: 'signals';
|
|
449
|
+
readonly fn: 'websiteChanges';
|
|
450
|
+
readonly method: 'POST';
|
|
451
|
+
readonly path: '/v1/signals/website-changes';
|
|
452
|
+
readonly mode: 'sync';
|
|
453
|
+
readonly status: 'live';
|
|
454
|
+
readonly typed: true;
|
|
455
|
+
}, {
|
|
456
|
+
readonly id: 'signals.custom';
|
|
457
|
+
readonly name: "Custom Buying Signals";
|
|
458
|
+
readonly category: 'signals';
|
|
459
|
+
readonly fn: 'custom';
|
|
460
|
+
readonly method: 'POST';
|
|
461
|
+
readonly path: '/v1/signals/custom';
|
|
462
|
+
readonly mode: 'sync';
|
|
463
|
+
readonly status: 'live';
|
|
464
|
+
readonly typed: true;
|
|
465
|
+
}, {
|
|
466
|
+
readonly id: 'signals.linkedin_posts_search';
|
|
467
|
+
readonly name: "LinkedIn Post Search";
|
|
468
|
+
readonly category: 'signals';
|
|
469
|
+
readonly fn: 'linkedinPostsSearch';
|
|
470
|
+
readonly method: 'POST';
|
|
471
|
+
readonly path: '/v1/signals/linkedin/posts/search';
|
|
472
|
+
readonly mode: 'sync';
|
|
473
|
+
readonly status: 'live';
|
|
474
|
+
readonly typed: true;
|
|
475
|
+
}, {
|
|
476
|
+
readonly id: 'signals.linkedin_posts';
|
|
477
|
+
readonly name: "LinkedIn Posts by Profile or Company";
|
|
478
|
+
readonly category: 'signals';
|
|
479
|
+
readonly fn: 'linkedinPosts';
|
|
480
|
+
readonly method: 'GET';
|
|
481
|
+
readonly path: '/v1/signals/linkedin/posts';
|
|
482
|
+
readonly mode: 'sync';
|
|
483
|
+
readonly status: 'live';
|
|
484
|
+
readonly typed: true;
|
|
485
|
+
}, {
|
|
486
|
+
readonly id: 'signals.linkedin_post_engagers';
|
|
487
|
+
readonly name: "LinkedIn Post Engagers";
|
|
488
|
+
readonly category: 'signals';
|
|
489
|
+
readonly fn: 'linkedinPostEngagers';
|
|
490
|
+
readonly method: 'GET';
|
|
491
|
+
readonly path: '/v1/signals/linkedin/posts/engagers';
|
|
492
|
+
readonly mode: 'sync';
|
|
493
|
+
readonly status: 'live';
|
|
494
|
+
readonly typed: true;
|
|
495
|
+
}, {
|
|
496
|
+
readonly id: 'web.search';
|
|
497
|
+
readonly name: "Google Search";
|
|
498
|
+
readonly category: 'web';
|
|
499
|
+
readonly fn: 'search';
|
|
500
|
+
readonly method: 'POST';
|
|
501
|
+
readonly path: '/v1/web/search';
|
|
502
|
+
readonly mode: 'sync';
|
|
503
|
+
readonly status: 'live';
|
|
504
|
+
readonly typed: true;
|
|
505
|
+
}, {
|
|
506
|
+
readonly id: 'web.semantic_search';
|
|
507
|
+
readonly name: "Semantic Search";
|
|
508
|
+
readonly category: 'web';
|
|
509
|
+
readonly fn: 'semanticSearch';
|
|
510
|
+
readonly method: 'POST';
|
|
511
|
+
readonly path: '/v1/web/semantic-search';
|
|
512
|
+
readonly mode: 'sync';
|
|
513
|
+
readonly status: 'coming_soon';
|
|
514
|
+
readonly typed: false;
|
|
515
|
+
}, {
|
|
516
|
+
readonly id: 'web.news';
|
|
517
|
+
readonly name: "News Search";
|
|
518
|
+
readonly category: 'web';
|
|
519
|
+
readonly fn: 'news';
|
|
520
|
+
readonly method: 'POST';
|
|
521
|
+
readonly path: '/v1/web/news';
|
|
522
|
+
readonly mode: 'sync';
|
|
523
|
+
readonly status: 'live';
|
|
524
|
+
readonly typed: true;
|
|
525
|
+
}, {
|
|
526
|
+
readonly id: 'web.scrape';
|
|
527
|
+
readonly name: "Web Scraping";
|
|
528
|
+
readonly category: 'web';
|
|
529
|
+
readonly fn: 'scrape';
|
|
530
|
+
readonly method: 'POST';
|
|
531
|
+
readonly path: '/v1/web/scrape';
|
|
532
|
+
readonly mode: 'sync';
|
|
533
|
+
readonly status: 'live';
|
|
534
|
+
readonly typed: true;
|
|
535
|
+
}, {
|
|
536
|
+
readonly id: 'web.markdown';
|
|
537
|
+
readonly name: "Website to Markdown";
|
|
538
|
+
readonly category: 'web';
|
|
539
|
+
readonly fn: 'markdown';
|
|
540
|
+
readonly method: 'POST';
|
|
541
|
+
readonly path: '/v1/web/markdown';
|
|
542
|
+
readonly mode: 'sync';
|
|
543
|
+
readonly status: 'live';
|
|
544
|
+
readonly typed: true;
|
|
545
|
+
}, {
|
|
546
|
+
readonly id: 'web.extract';
|
|
547
|
+
readonly name: "Structured Data Extraction";
|
|
548
|
+
readonly category: 'web';
|
|
549
|
+
readonly fn: 'extract';
|
|
550
|
+
readonly method: 'POST';
|
|
551
|
+
readonly path: '/v1/web/extract';
|
|
552
|
+
readonly mode: 'sync';
|
|
553
|
+
readonly status: 'live';
|
|
554
|
+
readonly typed: true;
|
|
555
|
+
}, {
|
|
556
|
+
readonly id: 'web.sitemap';
|
|
557
|
+
readonly name: "Website Sitemap";
|
|
558
|
+
readonly category: 'web';
|
|
559
|
+
readonly fn: 'sitemap';
|
|
560
|
+
readonly method: 'GET';
|
|
561
|
+
readonly path: '/v1/web/sitemap';
|
|
562
|
+
readonly mode: 'sync';
|
|
563
|
+
readonly status: 'live';
|
|
564
|
+
readonly typed: true;
|
|
565
|
+
}, {
|
|
566
|
+
readonly id: 'web.crawl';
|
|
567
|
+
readonly name: "Website Crawling";
|
|
568
|
+
readonly category: 'web';
|
|
569
|
+
readonly fn: 'crawl';
|
|
570
|
+
readonly method: 'POST';
|
|
571
|
+
readonly path: '/v1/web/crawl';
|
|
572
|
+
readonly mode: 'job';
|
|
573
|
+
readonly status: 'live';
|
|
574
|
+
readonly typed: true;
|
|
575
|
+
}, {
|
|
576
|
+
readonly id: 'web.research_company';
|
|
577
|
+
readonly name: "Company Research";
|
|
578
|
+
readonly category: 'web';
|
|
579
|
+
readonly fn: 'researchCompany';
|
|
580
|
+
readonly method: 'POST';
|
|
581
|
+
readonly path: '/v1/web/research/company';
|
|
582
|
+
readonly mode: 'async';
|
|
583
|
+
readonly status: 'live';
|
|
584
|
+
readonly typed: true;
|
|
585
|
+
}, {
|
|
586
|
+
readonly id: 'web.research';
|
|
587
|
+
readonly name: "Deep Research";
|
|
588
|
+
readonly category: 'web';
|
|
589
|
+
readonly fn: 'research';
|
|
590
|
+
readonly method: 'POST';
|
|
591
|
+
readonly path: '/v1/web/research';
|
|
592
|
+
readonly mode: 'async';
|
|
593
|
+
readonly status: 'live';
|
|
594
|
+
readonly typed: true;
|
|
595
|
+
}, {
|
|
596
|
+
readonly id: 'web.qualify';
|
|
597
|
+
readonly name: "ICP Qualification";
|
|
598
|
+
readonly category: 'web';
|
|
599
|
+
readonly fn: 'qualify';
|
|
600
|
+
readonly method: 'POST';
|
|
601
|
+
readonly path: '/v1/web/qualify';
|
|
602
|
+
readonly mode: 'sync';
|
|
603
|
+
readonly status: 'live';
|
|
604
|
+
readonly typed: true;
|
|
605
|
+
}];
|
|
606
|
+
export interface PeopleFilters {
|
|
607
|
+
firstNames?: IncludeExclude;
|
|
608
|
+
lastNames?: IncludeExclude;
|
|
609
|
+
jobTitles?: IncludeExclude;
|
|
610
|
+
pastJobTitles?: IncludeExclude;
|
|
611
|
+
keywords?: IncludeExclude;
|
|
612
|
+
locations?: IncludeExclude;
|
|
613
|
+
languages?: IncludeExclude;
|
|
614
|
+
schools?: IncludeExclude;
|
|
615
|
+
skills?: IncludeExclude;
|
|
616
|
+
companyNames?: IncludeExclude;
|
|
617
|
+
companyDomains?: IncludeExclude;
|
|
618
|
+
companyLinkedinUrls?: IncludeExclude;
|
|
619
|
+
companyIndustries?: IncludeExclude;
|
|
620
|
+
companyLocations?: IncludeExclude;
|
|
621
|
+
companyKeywords?: IncludeExclude;
|
|
622
|
+
companyHeadcount?: Range;
|
|
623
|
+
yearsOfExperience?: Range;
|
|
624
|
+
}
|
|
625
|
+
export interface CompanyFilters {
|
|
626
|
+
names?: IncludeExclude;
|
|
627
|
+
domains?: IncludeExclude;
|
|
628
|
+
industries?: IncludeExclude;
|
|
629
|
+
locations?: IncludeExclude;
|
|
630
|
+
keywords?: IncludeExclude;
|
|
631
|
+
types?: IncludeExclude;
|
|
632
|
+
headcount?: Range;
|
|
633
|
+
}
|
|
634
|
+
/** Parameters for `people.search` (people.search). */
|
|
635
|
+
export interface PeopleSearchParams extends PeopleFilters {
|
|
636
|
+
/** The same filters nested. Flat fields at the top level work too. */
|
|
637
|
+
filters?: PeopleFilters | SnakeCased<PeopleFilters>;
|
|
638
|
+
/** Default: 25. */
|
|
639
|
+
limit?: number;
|
|
640
|
+
cursor?: string;
|
|
641
|
+
}
|
|
642
|
+
/** Parameters for `people.searchCount` (people.search_count). */
|
|
643
|
+
export interface PeopleSearchCountParams extends PeopleFilters {
|
|
644
|
+
/** The same filters nested. Flat fields at the top level work too. */
|
|
645
|
+
filters?: PeopleFilters | SnakeCased<PeopleFilters>;
|
|
646
|
+
}
|
|
647
|
+
/** Parameters for `people.decisionMakers` (people.decision_makers). */
|
|
648
|
+
export interface PeopleDecisionMakersParams {
|
|
649
|
+
/** Company domain or LinkedIn company URL. */
|
|
650
|
+
company: string;
|
|
651
|
+
/** Departments to find leaders in. */
|
|
652
|
+
functions: Array<"executive" | "sales" | "marketing" | "engineering" | "product" | "design" | "data" | "it" | "security" | "finance" | "operations" | "hr" | "legal" | "customer_success" | "procurement">;
|
|
653
|
+
/** Levels to include. Default: ["c_suite","founder","vp","head","director"]. */
|
|
654
|
+
seniority?: Array<"c_suite" | "founder" | "vp" | "head" | "director" | "manager" | "senior" | "entry" | "intern">;
|
|
655
|
+
locations?: IncludeExclude;
|
|
656
|
+
/** Default: 25. */
|
|
657
|
+
limit?: number;
|
|
658
|
+
cursor?: string;
|
|
659
|
+
}
|
|
660
|
+
/** Parameters for `people.employees` (people.employees). */
|
|
661
|
+
export interface PeopleEmployeesParams {
|
|
662
|
+
/** Company domain or LinkedIn company URL. */
|
|
663
|
+
company: string;
|
|
664
|
+
jobTitles?: IncludeExclude;
|
|
665
|
+
locations?: IncludeExclude;
|
|
666
|
+
/** Default: 25. */
|
|
667
|
+
limit?: number;
|
|
668
|
+
cursor?: string;
|
|
669
|
+
}
|
|
670
|
+
/** Parameters for `people.profileBasic` (people.profile_basic). */
|
|
671
|
+
export interface PeopleProfileBasicParams {
|
|
672
|
+
url: string;
|
|
673
|
+
}
|
|
674
|
+
/** Parameters for `people.profile` (people.profile). */
|
|
675
|
+
export interface PeopleProfileParams {
|
|
676
|
+
url: string;
|
|
677
|
+
}
|
|
678
|
+
/** Parameters for `people.employmentHistory` (people.employment_history). */
|
|
679
|
+
export interface PeopleEmploymentHistoryParams {
|
|
680
|
+
url: string;
|
|
681
|
+
}
|
|
682
|
+
/** Parameters for `people.profileUrl` (people.profile_url). */
|
|
683
|
+
export interface PeopleProfileUrlParams {
|
|
684
|
+
firstName: string;
|
|
685
|
+
lastName: string;
|
|
686
|
+
/** Company domain (preferred) or name. */
|
|
687
|
+
company?: string;
|
|
688
|
+
/** Job title, to tell people with the same name apart. */
|
|
689
|
+
title?: string;
|
|
690
|
+
}
|
|
691
|
+
/** Parameters for `people.currentRole` (people.current_role). */
|
|
692
|
+
export interface PeopleCurrentRoleParams {
|
|
693
|
+
url: string;
|
|
694
|
+
}
|
|
695
|
+
/** Parameters for `people.seniority` (people.seniority). */
|
|
696
|
+
export interface PeopleSeniorityParams {
|
|
697
|
+
title: string;
|
|
698
|
+
}
|
|
699
|
+
/** Parameters for `companies.search` (company.search). */
|
|
700
|
+
export interface CompaniesSearchParams extends CompanyFilters {
|
|
701
|
+
/** The same filters nested. Flat fields at the top level work too. */
|
|
702
|
+
filters?: CompanyFilters | SnakeCased<CompanyFilters>;
|
|
703
|
+
/** Default: 25. */
|
|
704
|
+
limit?: number;
|
|
705
|
+
cursor?: string;
|
|
706
|
+
}
|
|
707
|
+
/** Parameters for `companies.searchCount` (company.search_count). */
|
|
708
|
+
export interface CompaniesSearchCountParams extends CompanyFilters {
|
|
709
|
+
/** The same filters nested. Flat fields at the top level work too. */
|
|
710
|
+
filters?: CompanyFilters | SnakeCased<CompanyFilters>;
|
|
711
|
+
}
|
|
712
|
+
/** Parameters for `companies.enrich` (company.enrich). */
|
|
713
|
+
export interface CompaniesEnrichParams {
|
|
714
|
+
domain?: string;
|
|
715
|
+
linkedinUrl?: string;
|
|
716
|
+
}
|
|
717
|
+
/** Parameters for `companies.domain` (company.domain). */
|
|
718
|
+
export interface CompaniesDomainParams {
|
|
719
|
+
name: string;
|
|
720
|
+
/** City or country, to tell companies with the same name apart. */
|
|
721
|
+
location?: string;
|
|
722
|
+
}
|
|
723
|
+
/** Parameters for `companies.linkedin` (company.linkedin). */
|
|
724
|
+
export interface CompaniesLinkedinParams {
|
|
725
|
+
url: string;
|
|
726
|
+
}
|
|
727
|
+
/** Parameters for `companies.profileUrl` (company.profile_url). */
|
|
728
|
+
export interface CompaniesProfileUrlParams {
|
|
729
|
+
domain?: string;
|
|
730
|
+
name?: string;
|
|
731
|
+
}
|
|
732
|
+
/** Parameters for `companies.firmographics` (company.firmographics). */
|
|
733
|
+
export interface CompaniesFirmographicsParams {
|
|
734
|
+
domain?: string;
|
|
735
|
+
linkedinUrl?: string;
|
|
736
|
+
}
|
|
737
|
+
/** Parameters for `companies.headcount` (company.headcount). */
|
|
738
|
+
export interface CompaniesHeadcountParams {
|
|
739
|
+
/** Company domain or LinkedIn company URL. */
|
|
740
|
+
company: string;
|
|
741
|
+
}
|
|
742
|
+
/** Parameters for `companies.funding` (company.funding). */
|
|
743
|
+
export interface CompaniesFundingParams {
|
|
744
|
+
domain: string;
|
|
745
|
+
/** Company name to search for. Defaults to the name on its website. */
|
|
746
|
+
company?: string;
|
|
747
|
+
}
|
|
748
|
+
/** Parameters for `companies.technographics` (company.technographics). */
|
|
749
|
+
export interface CompaniesTechnographicsParams {
|
|
750
|
+
domain: string;
|
|
751
|
+
}
|
|
752
|
+
/** Parameters for `companies.similar` (company.similar). */
|
|
753
|
+
export interface CompaniesSimilarParams {
|
|
754
|
+
domain: string;
|
|
755
|
+
/** Default: 10. */
|
|
756
|
+
limit?: number;
|
|
757
|
+
}
|
|
758
|
+
/** Parameters for `companies.websiteMetadata` (company.website_metadata). */
|
|
759
|
+
export interface CompaniesWebsiteMetadataParams {
|
|
760
|
+
url: string;
|
|
761
|
+
}
|
|
762
|
+
/** Parameters for `contacts.email` (contact.email). */
|
|
763
|
+
export interface ContactsEmailParams {
|
|
764
|
+
firstName: string;
|
|
765
|
+
lastName: string;
|
|
766
|
+
/** Company domain (preferred) or name. */
|
|
767
|
+
company: string;
|
|
768
|
+
}
|
|
769
|
+
/** Parameters for `contacts.emailBulk` (contact.email_bulk). */
|
|
770
|
+
export interface ContactsEmailBulkParams {
|
|
771
|
+
items: Array<{
|
|
772
|
+
firstName: string;
|
|
773
|
+
lastName: string;
|
|
774
|
+
company: string;
|
|
775
|
+
externalId?: string;
|
|
776
|
+
}>;
|
|
777
|
+
webhookUrl?: string;
|
|
778
|
+
}
|
|
779
|
+
/** Parameters for `contacts.verify` (contact.verify). */
|
|
780
|
+
export interface ContactsVerifyParams {
|
|
781
|
+
email: string;
|
|
782
|
+
}
|
|
783
|
+
/** Parameters for `contacts.verifyBulk` (contact.verify_bulk). */
|
|
784
|
+
export interface ContactsVerifyBulkParams {
|
|
785
|
+
emails: Array<string>;
|
|
786
|
+
webhookUrl?: string;
|
|
787
|
+
}
|
|
788
|
+
/** Parameters for `contacts.reverse` (contact.reverse). */
|
|
789
|
+
export interface ContactsReverseParams {
|
|
790
|
+
email: string;
|
|
791
|
+
}
|
|
792
|
+
/** Parameters for `contacts.phone` (contact.phone). */
|
|
793
|
+
export interface ContactsPhoneParams {
|
|
794
|
+
email?: string;
|
|
795
|
+
url?: string;
|
|
796
|
+
}
|
|
797
|
+
/** Parameters for `contacts.domainEmails` (contact.domain_emails). */
|
|
798
|
+
export interface ContactsDomainEmailsParams {
|
|
799
|
+
domain: string;
|
|
800
|
+
}
|
|
801
|
+
/** Parameters for `contacts.linkedinEmail` (contact.linkedin_email). */
|
|
802
|
+
export interface ContactsLinkedinEmailParams {
|
|
803
|
+
url: string;
|
|
804
|
+
}
|
|
805
|
+
/** Parameters for `contacts.waterfall` (contact.waterfall). */
|
|
806
|
+
export interface ContactsWaterfallParams {
|
|
807
|
+
firstName: string;
|
|
808
|
+
lastName: string;
|
|
809
|
+
/** Company domain (preferred) or name. */
|
|
810
|
+
company: string;
|
|
811
|
+
}
|
|
812
|
+
/** Parameters for `contacts.validateSyntax` (contact.validate_syntax). */
|
|
813
|
+
export interface ContactsValidateSyntaxParams {
|
|
814
|
+
email: string;
|
|
815
|
+
}
|
|
816
|
+
/** Parameters for `contacts.validateMx` (contact.validate_mx). */
|
|
817
|
+
export interface ContactsValidateMxParams {
|
|
818
|
+
domain: string;
|
|
819
|
+
}
|
|
820
|
+
/** Parameters for `signals.jobsSearch` (signals.jobs_search). */
|
|
821
|
+
export interface SignalsJobsSearchParams {
|
|
822
|
+
query: string;
|
|
823
|
+
location?: string;
|
|
824
|
+
datePosted?: "last-24-hours" | "last-week";
|
|
825
|
+
/** Default: 25. */
|
|
826
|
+
limit?: number;
|
|
827
|
+
/** thin: title, company, location, date, link. full: adds description, salary, seniority, applicants. Priced per job. Default: "thin". */
|
|
828
|
+
detail?: "thin" | "full";
|
|
829
|
+
companyId?: string;
|
|
830
|
+
cursor?: string;
|
|
831
|
+
}
|
|
832
|
+
/** Parameters for `signals.job` (signals.job). */
|
|
833
|
+
export interface SignalsJobParams {
|
|
834
|
+
url: string;
|
|
835
|
+
}
|
|
836
|
+
/** Parameters for `signals.hiring` (signals.hiring). */
|
|
837
|
+
export interface SignalsHiringParams {
|
|
838
|
+
companyId: string;
|
|
839
|
+
/** Default: "*". */
|
|
840
|
+
query?: string;
|
|
841
|
+
datePosted?: "last-24-hours" | "last-week";
|
|
842
|
+
/** Default: 25. */
|
|
843
|
+
limit?: number;
|
|
844
|
+
/** thin: title, company, location, date, link. full: adds description, salary, seniority, applicants. Priced per job. Default: "thin". */
|
|
845
|
+
detail?: "thin" | "full";
|
|
846
|
+
}
|
|
847
|
+
/** Parameters for `signals.jobChanges` (signals.job_changes). */
|
|
848
|
+
export interface SignalsJobChangesParams {
|
|
849
|
+
url: string;
|
|
850
|
+
/** What you last knew. Without it the last check for this profile on your account is the baseline; the first check only records one. */
|
|
851
|
+
previous?: {
|
|
852
|
+
company?: string;
|
|
853
|
+
companyDomain?: string;
|
|
854
|
+
title?: string;
|
|
855
|
+
};
|
|
856
|
+
}
|
|
857
|
+
/** Parameters for `signals.funding` (signals.funding). */
|
|
858
|
+
export interface SignalsFundingParams {
|
|
859
|
+
domain: string;
|
|
860
|
+
/** Company name to search for. Defaults to the name on its website. */
|
|
861
|
+
company?: string;
|
|
862
|
+
}
|
|
863
|
+
/** Parameters for `signals.fundingRecent` (signals.funding_recent). */
|
|
864
|
+
export interface SignalsFundingRecentParams {
|
|
865
|
+
/** Market or industry, like "AI scheduling" or "fintech London". */
|
|
866
|
+
query: string;
|
|
867
|
+
/** Look back this many days. Default: 30. */
|
|
868
|
+
days?: number;
|
|
869
|
+
/** One results page holds up to 10. Default: 10. */
|
|
870
|
+
limit?: number;
|
|
871
|
+
}
|
|
872
|
+
/** Parameters for `signals.leadership` (signals.leadership). */
|
|
873
|
+
export interface SignalsLeadershipParams {
|
|
874
|
+
domain: string;
|
|
875
|
+
/** Company name to search for. Defaults to the name on its website. */
|
|
876
|
+
company?: string;
|
|
877
|
+
/** Look back this many days. Default: 180. */
|
|
878
|
+
days?: number;
|
|
879
|
+
}
|
|
880
|
+
/** Parameters for `signals.news` (signals.news). */
|
|
881
|
+
export interface SignalsNewsParams {
|
|
882
|
+
domain: string;
|
|
883
|
+
/** Company name to search for. Defaults to the name on its website. */
|
|
884
|
+
company?: string;
|
|
885
|
+
/** Look back this many days. Default: 30. */
|
|
886
|
+
days?: number;
|
|
887
|
+
/** One results page holds up to 10. Default: 10. */
|
|
888
|
+
limit?: number;
|
|
889
|
+
}
|
|
890
|
+
/** Parameters for `signals.websiteChanges` (signals.website_changes). */
|
|
891
|
+
export interface SignalsWebsiteChangesParams {
|
|
892
|
+
url: string;
|
|
893
|
+
}
|
|
894
|
+
/** Parameters for `signals.custom` (signals.custom). */
|
|
895
|
+
export interface SignalsCustomParams {
|
|
896
|
+
domain: string;
|
|
897
|
+
/** Company name to search for. Defaults to the name on its website. */
|
|
898
|
+
company?: string;
|
|
899
|
+
/** The buying signal to look for, in plain words, like "is migrating off Salesforce". */
|
|
900
|
+
signal: string;
|
|
901
|
+
/** Look back this many days. Default: 90. */
|
|
902
|
+
days?: number;
|
|
903
|
+
}
|
|
904
|
+
/** Parameters for `signals.linkedinPostsSearch` (signals.linkedin_posts_search). */
|
|
905
|
+
export interface SignalsLinkedinPostsSearchParams {
|
|
906
|
+
/** Keywords, like `sales automation`. Supports AND, OR and "quoted phrases". */
|
|
907
|
+
query: string;
|
|
908
|
+
/** Default: "past-week". */
|
|
909
|
+
datePosted?: "past-24h" | "past-week" | "past-month";
|
|
910
|
+
/** date: newest first. relevance: best match first, often more results. Default: "date". */
|
|
911
|
+
sort?: "date" | "relevance";
|
|
912
|
+
/** Default: 25. */
|
|
913
|
+
limit?: number;
|
|
914
|
+
}
|
|
915
|
+
/** Parameters for `signals.linkedinPosts` (signals.linkedin_posts). */
|
|
916
|
+
export interface SignalsLinkedinPostsParams {
|
|
917
|
+
/** LinkedIn profile or company page URL. */
|
|
918
|
+
url: string;
|
|
919
|
+
/** Default: 10. */
|
|
920
|
+
limit?: number;
|
|
921
|
+
}
|
|
922
|
+
/** Parameters for `signals.linkedinPostEngagers` (signals.linkedin_post_engagers). */
|
|
923
|
+
export interface SignalsLinkedinPostEngagersParams {
|
|
924
|
+
url: string;
|
|
925
|
+
/** all: comments first (stronger intent), then reactions. Default: "all". */
|
|
926
|
+
type?: "all" | "reactions" | "comments";
|
|
927
|
+
/** Default: 25. */
|
|
928
|
+
limit?: number;
|
|
929
|
+
}
|
|
930
|
+
/** Parameters for `web.search` (web.search). */
|
|
931
|
+
export interface WebSearchParams {
|
|
932
|
+
query: string;
|
|
933
|
+
country?: string;
|
|
934
|
+
/** Default: 1. */
|
|
935
|
+
page?: number;
|
|
936
|
+
}
|
|
937
|
+
/** Parameters for `web.news` (web.news). */
|
|
938
|
+
export interface WebNewsParams {
|
|
939
|
+
query: string;
|
|
940
|
+
/** Look back this many days. Default: 7. */
|
|
941
|
+
days?: number;
|
|
942
|
+
/** One results page holds up to 10. Default: 10. */
|
|
943
|
+
limit?: number;
|
|
944
|
+
}
|
|
945
|
+
/** Parameters for `web.scrape` (web.scrape). */
|
|
946
|
+
export interface WebScrapeParams {
|
|
947
|
+
url: string;
|
|
948
|
+
/** Strip scripts, styles and tracking from the returned HTML. Default: false. */
|
|
949
|
+
clean?: boolean;
|
|
950
|
+
/** Skip the cache and fetch the page now. Default: false. */
|
|
951
|
+
fresh?: boolean;
|
|
952
|
+
}
|
|
953
|
+
/** Parameters for `web.markdown` (web.markdown). */
|
|
954
|
+
export interface WebMarkdownParams {
|
|
955
|
+
url: string;
|
|
956
|
+
/** Default: false. */
|
|
957
|
+
includeImages?: boolean;
|
|
958
|
+
/** Default: true. */
|
|
959
|
+
includeLinks?: boolean;
|
|
960
|
+
/** Default: false. */
|
|
961
|
+
fresh?: boolean;
|
|
962
|
+
}
|
|
963
|
+
/** Parameters for `web.extract` (web.extract). */
|
|
964
|
+
export interface WebExtractParams {
|
|
965
|
+
url: string;
|
|
966
|
+
/** Fields to pull from the page: name to description, or name to {type, description}. */
|
|
967
|
+
fields: unknown;
|
|
968
|
+
instructions?: string;
|
|
969
|
+
/** Default: false. */
|
|
970
|
+
fresh?: boolean;
|
|
971
|
+
}
|
|
972
|
+
/** Parameters for `web.sitemap` (web.sitemap). */
|
|
973
|
+
export interface WebSitemapParams {
|
|
974
|
+
url: string;
|
|
975
|
+
pattern?: string;
|
|
976
|
+
/** Default: false. */
|
|
977
|
+
fresh?: boolean;
|
|
978
|
+
}
|
|
979
|
+
/** Parameters for `web.crawl` (web.crawl). */
|
|
980
|
+
export interface WebCrawlParams {
|
|
981
|
+
/** Start page. Pages on the same site that it links to are crawled. */
|
|
982
|
+
url: string;
|
|
983
|
+
/** Most pages to crawl, the start page included. Billed per page delivered. Default: 25. */
|
|
984
|
+
limit?: number;
|
|
985
|
+
/** Only follow links whose URL matches this pattern. */
|
|
986
|
+
pattern?: string;
|
|
987
|
+
/** Default: false. */
|
|
988
|
+
includeImages?: boolean;
|
|
989
|
+
/** Default: true. */
|
|
990
|
+
includeLinks?: boolean;
|
|
991
|
+
/** Default: false. */
|
|
992
|
+
fresh?: boolean;
|
|
993
|
+
webhookUrl?: string;
|
|
994
|
+
}
|
|
995
|
+
/** Parameters for `web.researchCompany` (web.research_company). */
|
|
996
|
+
export interface WebResearchCompanyParams {
|
|
997
|
+
domain: string;
|
|
998
|
+
/** Company name to search for. Defaults to the name on its website. */
|
|
999
|
+
company?: string;
|
|
1000
|
+
/** Questions to answer from public sources. */
|
|
1001
|
+
questions?: Array<string>;
|
|
1002
|
+
}
|
|
1003
|
+
/** Parameters for `web.research` (web.research). */
|
|
1004
|
+
export interface WebResearchParams {
|
|
1005
|
+
query: string;
|
|
1006
|
+
/** Pages to read before answering. Default: 5. */
|
|
1007
|
+
maxSources?: number;
|
|
1008
|
+
}
|
|
1009
|
+
/** Parameters for `web.qualify` (web.qualify). */
|
|
1010
|
+
export interface WebQualifyParams {
|
|
1011
|
+
/** Company website domain. Optional when lead.email is on a company domain. */
|
|
1012
|
+
domain?: string;
|
|
1013
|
+
/** An inbound lead to qualify along with their company. */
|
|
1014
|
+
lead?: {
|
|
1015
|
+
name?: string;
|
|
1016
|
+
email?: string;
|
|
1017
|
+
title?: string;
|
|
1018
|
+
company?: string;
|
|
1019
|
+
/** What the lead wrote, like a demo request form message. */
|
|
1020
|
+
message?: string;
|
|
1021
|
+
};
|
|
1022
|
+
icp: {
|
|
1023
|
+
/** Your ideal customer in plain words. */
|
|
1024
|
+
description?: string;
|
|
1025
|
+
industries?: Array<string>;
|
|
1026
|
+
excludeIndustries?: Array<string>;
|
|
1027
|
+
/** Employee count range. */
|
|
1028
|
+
headcount?: Range;
|
|
1029
|
+
/** Countries, states or regions. */
|
|
1030
|
+
geos?: Array<string>;
|
|
1031
|
+
/** Things the company must show, like "sells to enterprises". */
|
|
1032
|
+
requiredSignals?: Array<string>;
|
|
1033
|
+
/** Anything that rules a company out. */
|
|
1034
|
+
disqualifiers?: Array<string>;
|
|
1035
|
+
};
|
|
1036
|
+
/** Read the homepage as extra evidence. Default: true. */
|
|
1037
|
+
includeWebsite?: boolean;
|
|
1038
|
+
}
|
|
1039
|
+
export interface PeopleResource {
|
|
1040
|
+
/**
|
|
1041
|
+
* People Search.
|
|
1042
|
+
*
|
|
1043
|
+
* Find professionals by title, location, skills, schools and employer. Send at least one filter.
|
|
1044
|
+
*
|
|
1045
|
+
* From $0.00035 per person.
|
|
1046
|
+
* 50 free requests on the free tier.
|
|
1047
|
+
* Main fields: total, first_name, last_name, headline, current_role, company, location.
|
|
1048
|
+
*/
|
|
1049
|
+
search: PaginatedMethod<PeopleSearchParams>;
|
|
1050
|
+
/**
|
|
1051
|
+
* People Search Count.
|
|
1052
|
+
*
|
|
1053
|
+
* Count matching people before you pull a list. Takes the same filters as People Search.
|
|
1054
|
+
*
|
|
1055
|
+
* Free.
|
|
1056
|
+
* Main fields: total.
|
|
1057
|
+
*/
|
|
1058
|
+
searchCount: Method<PeopleSearchCountParams>;
|
|
1059
|
+
/**
|
|
1060
|
+
* Decision-Maker Search.
|
|
1061
|
+
*
|
|
1062
|
+
* The likely buyers for a function at a company.
|
|
1063
|
+
*
|
|
1064
|
+
* From $0.00035 per person.
|
|
1065
|
+
* 50 free requests on the free tier.
|
|
1066
|
+
* Main fields: full_name, title, function, seniority, confidence.
|
|
1067
|
+
*/
|
|
1068
|
+
decisionMakers: PaginatedMethod<PeopleDecisionMakersParams>;
|
|
1069
|
+
/**
|
|
1070
|
+
* Employee Finder.
|
|
1071
|
+
*
|
|
1072
|
+
* Current employees at a company, filtered by title and location.
|
|
1073
|
+
*
|
|
1074
|
+
* From $0.00035 per employee.
|
|
1075
|
+
* 50 free requests on the free tier.
|
|
1076
|
+
* Main fields: total, first_name, last_name, headline, current_role, location.
|
|
1077
|
+
*/
|
|
1078
|
+
employees: PaginatedMethod<PeopleEmployeesParams>;
|
|
1079
|
+
/**
|
|
1080
|
+
* Basic Professional Profile.
|
|
1081
|
+
*
|
|
1082
|
+
* Name, headline, current role, location and recent activity from a profile URL.
|
|
1083
|
+
*
|
|
1084
|
+
* From $0.00075 per profile.
|
|
1085
|
+
* 50 free requests on the free tier.
|
|
1086
|
+
* Main fields: name, headline, current_title, current_company, location.
|
|
1087
|
+
*/
|
|
1088
|
+
profileBasic: Method<PeopleProfileBasicParams>;
|
|
1089
|
+
/**
|
|
1090
|
+
* Full Professional Profile.
|
|
1091
|
+
*
|
|
1092
|
+
* The complete profile: every current and past role, education, skills and languages.
|
|
1093
|
+
*
|
|
1094
|
+
* From $0.0022 per profile.
|
|
1095
|
+
* 5 free requests on the free tier.
|
|
1096
|
+
* Main fields: first_name, last_name, headline, current_roles[], past_roles[], education[], skills[].
|
|
1097
|
+
*/
|
|
1098
|
+
profile: Method<PeopleProfileParams>;
|
|
1099
|
+
/**
|
|
1100
|
+
* Employment History.
|
|
1101
|
+
*
|
|
1102
|
+
* Past and current positions with dates.
|
|
1103
|
+
*
|
|
1104
|
+
* From $0.0022 per profile.
|
|
1105
|
+
* Main fields: positions[], company, title, start_date, end_date.
|
|
1106
|
+
*/
|
|
1107
|
+
employmentHistory: Method<PeopleEmploymentHistoryParams>;
|
|
1108
|
+
/**
|
|
1109
|
+
* Professional Profile URL Finder.
|
|
1110
|
+
*
|
|
1111
|
+
* Find a profile URL from a name and company.
|
|
1112
|
+
*
|
|
1113
|
+
* From $0.001 per match.
|
|
1114
|
+
* Main fields: profile_url, full_name, company, confidence.
|
|
1115
|
+
*/
|
|
1116
|
+
profileUrl: Method<PeopleProfileUrlParams>;
|
|
1117
|
+
/**
|
|
1118
|
+
* Current Role.
|
|
1119
|
+
*
|
|
1120
|
+
* A person’s current title and employer.
|
|
1121
|
+
*
|
|
1122
|
+
* From $0.0022 per profile.
|
|
1123
|
+
* Main fields: title, company, start_date, seniority.
|
|
1124
|
+
*/
|
|
1125
|
+
currentRole: Method<PeopleCurrentRoleParams>;
|
|
1126
|
+
/**
|
|
1127
|
+
* Seniority Classification.
|
|
1128
|
+
*
|
|
1129
|
+
* Turn a job title into a seniority level and function.
|
|
1130
|
+
*
|
|
1131
|
+
* From $0.001 per classification.
|
|
1132
|
+
* Main fields: title, seniority, function, confidence.
|
|
1133
|
+
*/
|
|
1134
|
+
seniority: Method<PeopleSeniorityParams>;
|
|
1135
|
+
}
|
|
1136
|
+
export interface CompaniesResource {
|
|
1137
|
+
/**
|
|
1138
|
+
* Company Search.
|
|
1139
|
+
*
|
|
1140
|
+
* Find companies by industry, location, size, type and keywords. Send at least one filter.
|
|
1141
|
+
*
|
|
1142
|
+
* From $0.00035 per company.
|
|
1143
|
+
* 50 free requests on the free tier.
|
|
1144
|
+
* Main fields: total, name, domain, industry, employee_range, location.
|
|
1145
|
+
*/
|
|
1146
|
+
search: PaginatedMethod<CompaniesSearchParams>;
|
|
1147
|
+
/**
|
|
1148
|
+
* Company Search Count.
|
|
1149
|
+
*
|
|
1150
|
+
* Count matching companies before you pull a list. Takes the same filters as Company Search.
|
|
1151
|
+
*
|
|
1152
|
+
* Free.
|
|
1153
|
+
* Main fields: total.
|
|
1154
|
+
*/
|
|
1155
|
+
searchCount: Method<CompaniesSearchCountParams>;
|
|
1156
|
+
/**
|
|
1157
|
+
* Company Enrichment.
|
|
1158
|
+
*
|
|
1159
|
+
* A full company record from a domain or LinkedIn company URL.
|
|
1160
|
+
*
|
|
1161
|
+
* From $0.00105 per company.
|
|
1162
|
+
* 20 free requests on the free tier.
|
|
1163
|
+
* Main fields: name, domain, industry, employee_count, employee_range, location, founded_year, revenue_range.
|
|
1164
|
+
*/
|
|
1165
|
+
enrich: Method<CompaniesEnrichParams>;
|
|
1166
|
+
/**
|
|
1167
|
+
* Company Domain Finder.
|
|
1168
|
+
*
|
|
1169
|
+
* Find a company’s website domain from its name.
|
|
1170
|
+
*
|
|
1171
|
+
* From $0.001 per match.
|
|
1172
|
+
* Main fields: name, domain, confidence.
|
|
1173
|
+
*/
|
|
1174
|
+
domain: Method<CompaniesDomainParams>;
|
|
1175
|
+
/**
|
|
1176
|
+
* LinkedIn Company Profile.
|
|
1177
|
+
*
|
|
1178
|
+
* Company page details, size, specialties and followers, plus the numeric company id.
|
|
1179
|
+
*
|
|
1180
|
+
* From $0.00105 per profile.
|
|
1181
|
+
* 50 free requests on the free tier.
|
|
1182
|
+
* Main fields: name, linkedin_id, industry, company_size, specialties, followers.
|
|
1183
|
+
*/
|
|
1184
|
+
linkedin: Method<CompaniesLinkedinParams>;
|
|
1185
|
+
/**
|
|
1186
|
+
* Company Profile URL Finder.
|
|
1187
|
+
*
|
|
1188
|
+
* Find a company’s profile URL from its name or domain.
|
|
1189
|
+
*
|
|
1190
|
+
* From $0.001 per match.
|
|
1191
|
+
* Main fields: profile_url, name, domain, confidence.
|
|
1192
|
+
*/
|
|
1193
|
+
profileUrl: Method<CompaniesProfileUrlParams>;
|
|
1194
|
+
/**
|
|
1195
|
+
* Company Firmographics.
|
|
1196
|
+
*
|
|
1197
|
+
* Industry, type, size, revenue range, location, founding year and headcount growth.
|
|
1198
|
+
*
|
|
1199
|
+
* From $0.00105 per company.
|
|
1200
|
+
* 20 free requests on the free tier.
|
|
1201
|
+
* Main fields: industry, type, employee_count, employee_range, revenue_range, location, founded_year.
|
|
1202
|
+
*/
|
|
1203
|
+
firmographics: Method<CompaniesFirmographicsParams>;
|
|
1204
|
+
/**
|
|
1205
|
+
* Company Headcount.
|
|
1206
|
+
*
|
|
1207
|
+
* Headcount and growth by department over time.
|
|
1208
|
+
*
|
|
1209
|
+
* From $0.005 per company.
|
|
1210
|
+
* Main fields: total, by_department, growth_6m, growth_12m.
|
|
1211
|
+
*/
|
|
1212
|
+
headcount: Method<CompaniesHeadcountParams>;
|
|
1213
|
+
/**
|
|
1214
|
+
* Company Funding.
|
|
1215
|
+
*
|
|
1216
|
+
* Funding history: total raised, last round, stage and investors, with the news it was found in.
|
|
1217
|
+
*
|
|
1218
|
+
* From $0.005 per company.
|
|
1219
|
+
* Main fields: total_raised, last_round, stage, investors[], confidence, evidence[].
|
|
1220
|
+
*/
|
|
1221
|
+
funding: Method<CompaniesFundingParams>;
|
|
1222
|
+
/**
|
|
1223
|
+
* Technographics.
|
|
1224
|
+
*
|
|
1225
|
+
* Technologies detected on a company website, each with a category.
|
|
1226
|
+
*
|
|
1227
|
+
* From $0.005 per website.
|
|
1228
|
+
* 50 free requests on the free tier.
|
|
1229
|
+
* Main fields: domain, technologies[].
|
|
1230
|
+
*/
|
|
1231
|
+
technographics: Method<CompaniesTechnographicsParams>;
|
|
1232
|
+
/**
|
|
1233
|
+
* Similar Companies.
|
|
1234
|
+
*
|
|
1235
|
+
* Lookalike companies for a domain.
|
|
1236
|
+
*
|
|
1237
|
+
* From $0.01 per search.
|
|
1238
|
+
* Main fields: name, domain, similarity, industry.
|
|
1239
|
+
*/
|
|
1240
|
+
similar: Method<CompaniesSimilarParams>;
|
|
1241
|
+
/**
|
|
1242
|
+
* Website Metadata.
|
|
1243
|
+
*
|
|
1244
|
+
* Title, description, language, favicon, Open Graph and Twitter tags, and social profile links for a website.
|
|
1245
|
+
*
|
|
1246
|
+
* From $0.001 per website.
|
|
1247
|
+
* 300 free requests on the free tier.
|
|
1248
|
+
* Main fields: title, description, favicon_url, og, twitter, social_profiles.
|
|
1249
|
+
*/
|
|
1250
|
+
websiteMetadata: Method<CompaniesWebsiteMetadataParams>;
|
|
1251
|
+
}
|
|
1252
|
+
export interface ContactsResource {
|
|
1253
|
+
/**
|
|
1254
|
+
* Work Email Finder.
|
|
1255
|
+
*
|
|
1256
|
+
* Find a work email from a name and company domain.
|
|
1257
|
+
*
|
|
1258
|
+
* From $0.00975 per email found.
|
|
1259
|
+
* 20 free requests on the free tier.
|
|
1260
|
+
* May return 202 with a job_id when the answer takes longer. Poll GET /v1/jobs/{id}.
|
|
1261
|
+
* Main fields: email, certainty, mx_provider, alternatives[].
|
|
1262
|
+
*/
|
|
1263
|
+
email: AsyncMethod<ContactsEmailParams>;
|
|
1264
|
+
/**
|
|
1265
|
+
* Bulk Email Finder.
|
|
1266
|
+
*
|
|
1267
|
+
* Find work emails for up to 500 people in one job. You pay only for emails found.
|
|
1268
|
+
*
|
|
1269
|
+
* From $0.00975 per email found.
|
|
1270
|
+
* Runs as a job: returns 202 with a job_id, then poll GET /v1/jobs/{id}.
|
|
1271
|
+
* Main fields: job_id, status, total, reserved_usd.
|
|
1272
|
+
*/
|
|
1273
|
+
emailBulk: JobMethod<ContactsEmailBulkParams>;
|
|
1274
|
+
/**
|
|
1275
|
+
* Email Verification.
|
|
1276
|
+
*
|
|
1277
|
+
* Check whether an email will be delivered: deliverable, undeliverable or unknown.
|
|
1278
|
+
*
|
|
1279
|
+
* From $0.00195 per verification.
|
|
1280
|
+
* 50 free requests on the free tier.
|
|
1281
|
+
* May return 202 with a job_id when the answer takes longer. Poll GET /v1/jobs/{id}.
|
|
1282
|
+
* Main fields: email, result, certainty, mx_provider.
|
|
1283
|
+
*/
|
|
1284
|
+
verify: AsyncMethod<ContactsVerifyParams>;
|
|
1285
|
+
/**
|
|
1286
|
+
* Bulk Email Verification.
|
|
1287
|
+
*
|
|
1288
|
+
* Verify up to 500 emails in one job.
|
|
1289
|
+
*
|
|
1290
|
+
* From $0.00195 per verification.
|
|
1291
|
+
* Runs as a job: returns 202 with a job_id, then poll GET /v1/jobs/{id}.
|
|
1292
|
+
* Main fields: job_id, status, total, reserved_usd.
|
|
1293
|
+
*/
|
|
1294
|
+
verifyBulk: JobMethod<ContactsVerifyBulkParams>;
|
|
1295
|
+
/**
|
|
1296
|
+
* Reverse Email Lookup.
|
|
1297
|
+
*
|
|
1298
|
+
* The person and company behind an email address.
|
|
1299
|
+
*
|
|
1300
|
+
* From $0.007 per matched profile.
|
|
1301
|
+
* Main fields: full_name, title, company, linkedin_url.
|
|
1302
|
+
*/
|
|
1303
|
+
reverse: Method<ContactsReverseParams>;
|
|
1304
|
+
/**
|
|
1305
|
+
* Mobile Phone Finder.
|
|
1306
|
+
*
|
|
1307
|
+
* A mobile number from a work email or a LinkedIn profile URL. You pay only when a number is found.
|
|
1308
|
+
*
|
|
1309
|
+
* From $0.22 per phone found.
|
|
1310
|
+
* Main fields: phone, alternatives[].
|
|
1311
|
+
*/
|
|
1312
|
+
phone: Method<ContactsPhoneParams>;
|
|
1313
|
+
/**
|
|
1314
|
+
* Domain Email Discovery.
|
|
1315
|
+
*
|
|
1316
|
+
* Email addresses published on a company website, each marked generic (like sales@) or personal.
|
|
1317
|
+
*
|
|
1318
|
+
* From $0.005 per search.
|
|
1319
|
+
* 50 free requests on the free tier.
|
|
1320
|
+
* Main fields: domain, emails[].
|
|
1321
|
+
*/
|
|
1322
|
+
domainEmails: Method<ContactsDomainEmailsParams>;
|
|
1323
|
+
/**
|
|
1324
|
+
* LinkedIn to Work Email.
|
|
1325
|
+
*
|
|
1326
|
+
* A work email from a LinkedIn profile URL.
|
|
1327
|
+
*
|
|
1328
|
+
* From $0.012 per email found.
|
|
1329
|
+
* 20 free requests on the free tier.
|
|
1330
|
+
* May return 202 with a job_id when the answer takes longer. Poll GET /v1/jobs/{id}.
|
|
1331
|
+
* Main fields: email, certainty, mx_provider, alternatives[].
|
|
1332
|
+
*/
|
|
1333
|
+
linkedinEmail: AsyncMethod<ContactsLinkedinEmailParams>;
|
|
1334
|
+
/**
|
|
1335
|
+
* Email Waterfall.
|
|
1336
|
+
*
|
|
1337
|
+
* Tries several providers in order until an email is found.
|
|
1338
|
+
*
|
|
1339
|
+
* From $0.02 per email found.
|
|
1340
|
+
* May return 202 with a job_id when the answer takes longer. Poll GET /v1/jobs/{id}.
|
|
1341
|
+
* Main fields: email, certainty, mx_provider, alternatives[].
|
|
1342
|
+
*/
|
|
1343
|
+
waterfall: AsyncMethod<ContactsWaterfallParams>;
|
|
1344
|
+
/**
|
|
1345
|
+
* Email Syntax Validation.
|
|
1346
|
+
*
|
|
1347
|
+
* Check that an email address is well formed, and whether it is a role address or a free mail provider.
|
|
1348
|
+
*
|
|
1349
|
+
* Free.
|
|
1350
|
+
* Main fields: email, valid, reasons[], is_role, is_free_provider.
|
|
1351
|
+
*/
|
|
1352
|
+
validateSyntax: Method<ContactsValidateSyntaxParams>;
|
|
1353
|
+
/**
|
|
1354
|
+
* MX Record Validation.
|
|
1355
|
+
*
|
|
1356
|
+
* Check that a domain exists and can receive email, and which mail provider it uses.
|
|
1357
|
+
*
|
|
1358
|
+
* Free.
|
|
1359
|
+
* Main fields: domain, exists, has_mx, records[], provider.
|
|
1360
|
+
*/
|
|
1361
|
+
validateMx: Method<ContactsValidateMxParams>;
|
|
1362
|
+
}
|
|
1363
|
+
export interface SignalsResource {
|
|
1364
|
+
/**
|
|
1365
|
+
* Job Search.
|
|
1366
|
+
*
|
|
1367
|
+
* Open job posts by keywords, location, date and company. Priced per job: from $0.00012, or $0.00057 with description and salary.
|
|
1368
|
+
*
|
|
1369
|
+
* From $0.00012 per job. Full detail: $0.00057 per job.
|
|
1370
|
+
* 50 free requests on the free tier.
|
|
1371
|
+
* Main fields: id, title, company, location, posted_at, url.
|
|
1372
|
+
*/
|
|
1373
|
+
jobsSearch: PaginatedMethod<SignalsJobsSearchParams>;
|
|
1374
|
+
/**
|
|
1375
|
+
* Job Details.
|
|
1376
|
+
*
|
|
1377
|
+
* A full job posting by URL: description, salary, seniority, type and applicants.
|
|
1378
|
+
*
|
|
1379
|
+
* From $0.00024 per job.
|
|
1380
|
+
* 50 free requests on the free tier.
|
|
1381
|
+
* Main fields: title, company, description, salary, seniority, posted_at.
|
|
1382
|
+
*/
|
|
1383
|
+
job: Method<SignalsJobParams>;
|
|
1384
|
+
/**
|
|
1385
|
+
* Company Hiring Activity.
|
|
1386
|
+
*
|
|
1387
|
+
* What one company is hiring for right now, from its open job posts. Priced per job: from $0.00012, or $0.00057 with description and salary.
|
|
1388
|
+
*
|
|
1389
|
+
* From $0.00012 per job. Full detail: $0.00057 per job.
|
|
1390
|
+
* 50 free requests on the free tier.
|
|
1391
|
+
* Main fields: company_id, open_jobs_sampled, has_more, jobs[].
|
|
1392
|
+
*/
|
|
1393
|
+
hiring: Method<SignalsHiringParams>;
|
|
1394
|
+
/**
|
|
1395
|
+
* Job Change Detector.
|
|
1396
|
+
*
|
|
1397
|
+
* Whether a contact has moved to a new company or a new title.
|
|
1398
|
+
*
|
|
1399
|
+
* From $0.005 per check.
|
|
1400
|
+
* Main fields: full_name, changed, change_type, old_company, new_company, new_title, changed_at.
|
|
1401
|
+
*/
|
|
1402
|
+
jobChanges: Method<SignalsJobChangesParams>;
|
|
1403
|
+
/**
|
|
1404
|
+
* Funding Lookup.
|
|
1405
|
+
*
|
|
1406
|
+
* The latest funding round for a company, with the news it was found in.
|
|
1407
|
+
*
|
|
1408
|
+
* From $0.005 per company.
|
|
1409
|
+
* Main fields: last_round, amount, announced_at, investors[], confidence.
|
|
1410
|
+
*/
|
|
1411
|
+
funding: Method<SignalsFundingParams>;
|
|
1412
|
+
/**
|
|
1413
|
+
* Recent Funding Events.
|
|
1414
|
+
*
|
|
1415
|
+
* Funding rounds announced recently in a market you describe.
|
|
1416
|
+
*
|
|
1417
|
+
* From $0.005 per search.
|
|
1418
|
+
* Main fields: query, results[].
|
|
1419
|
+
*/
|
|
1420
|
+
fundingRecent: Method<SignalsFundingRecentParams>;
|
|
1421
|
+
/**
|
|
1422
|
+
* Leadership Changes.
|
|
1423
|
+
*
|
|
1424
|
+
* Executives who joined or left a company recently, from public news.
|
|
1425
|
+
*
|
|
1426
|
+
* From $0.005 per check.
|
|
1427
|
+
* Main fields: changes[], confidence, evidence[].
|
|
1428
|
+
*/
|
|
1429
|
+
leadership: Method<SignalsLeadershipParams>;
|
|
1430
|
+
/**
|
|
1431
|
+
* Company News.
|
|
1432
|
+
*
|
|
1433
|
+
* Recent news articles that mention a company.
|
|
1434
|
+
*
|
|
1435
|
+
* From $0.00083 per search.
|
|
1436
|
+
* Main fields: results[], title, url, source, published_at.
|
|
1437
|
+
*/
|
|
1438
|
+
news: Method<SignalsNewsParams>;
|
|
1439
|
+
/**
|
|
1440
|
+
* Website Change Detection.
|
|
1441
|
+
*
|
|
1442
|
+
* What changed on a page since the last check.
|
|
1443
|
+
*
|
|
1444
|
+
* From $0.005 per check.
|
|
1445
|
+
* Main fields: url, changed, diff, detected_at.
|
|
1446
|
+
*/
|
|
1447
|
+
websiteChanges: Method<SignalsWebsiteChangesParams>;
|
|
1448
|
+
/**
|
|
1449
|
+
* Custom Buying Signals.
|
|
1450
|
+
*
|
|
1451
|
+
* Your own signal definition, checked against an account.
|
|
1452
|
+
*
|
|
1453
|
+
* From $0.005 per check.
|
|
1454
|
+
* Main fields: company, signal, matched, evidence.
|
|
1455
|
+
*/
|
|
1456
|
+
custom: Method<SignalsCustomParams>;
|
|
1457
|
+
/**
|
|
1458
|
+
* LinkedIn Post Search.
|
|
1459
|
+
*
|
|
1460
|
+
* Recent LinkedIn posts that match your keywords, with the author and engagement counts. Finds people talking about a problem you solve.
|
|
1461
|
+
*
|
|
1462
|
+
* From $0.001 per post.
|
|
1463
|
+
* 20 free requests on the free tier.
|
|
1464
|
+
* Main fields: query, results[], author, posted_at, stats.
|
|
1465
|
+
*/
|
|
1466
|
+
linkedinPostsSearch: Method<SignalsLinkedinPostsSearchParams>;
|
|
1467
|
+
/**
|
|
1468
|
+
* LinkedIn Posts by Profile or Company.
|
|
1469
|
+
*
|
|
1470
|
+
* The latest posts from a LinkedIn profile or company page.
|
|
1471
|
+
*
|
|
1472
|
+
* From $0.0007 per post.
|
|
1473
|
+
* 20 free requests on the free tier.
|
|
1474
|
+
* Main fields: url, results[], text, posted_at, stats.
|
|
1475
|
+
*/
|
|
1476
|
+
linkedinPosts: Method<SignalsLinkedinPostsParams>;
|
|
1477
|
+
/**
|
|
1478
|
+
* LinkedIn Post Engagers.
|
|
1479
|
+
*
|
|
1480
|
+
* People who commented on or reacted to a LinkedIn post, like a competitor's launch. Comments first.
|
|
1481
|
+
*
|
|
1482
|
+
* From $0.003 per engager.
|
|
1483
|
+
* Main fields: url, results[], name, headline, linkedin_url, engagement.
|
|
1484
|
+
*/
|
|
1485
|
+
linkedinPostEngagers: Method<SignalsLinkedinPostEngagersParams>;
|
|
1486
|
+
}
|
|
1487
|
+
export interface WebResource {
|
|
1488
|
+
/**
|
|
1489
|
+
* Google Search.
|
|
1490
|
+
*
|
|
1491
|
+
* Live Google results for any query.
|
|
1492
|
+
*
|
|
1493
|
+
* From $0.00075 per search.
|
|
1494
|
+
* Main fields: title, url, snippet, position.
|
|
1495
|
+
*/
|
|
1496
|
+
search: Method<WebSearchParams>;
|
|
1497
|
+
/**
|
|
1498
|
+
* News Search.
|
|
1499
|
+
*
|
|
1500
|
+
* Recent news articles for any query.
|
|
1501
|
+
*
|
|
1502
|
+
* From $0.00083 per search.
|
|
1503
|
+
* Main fields: title, url, source, published_at.
|
|
1504
|
+
*/
|
|
1505
|
+
news: Method<WebNewsParams>;
|
|
1506
|
+
/**
|
|
1507
|
+
* Web Scraping.
|
|
1508
|
+
*
|
|
1509
|
+
* Raw HTML and text from any page.
|
|
1510
|
+
*
|
|
1511
|
+
* From $0.0007 per page.
|
|
1512
|
+
* Main fields: url, status, html, text.
|
|
1513
|
+
*/
|
|
1514
|
+
scrape: Method<WebScrapeParams>;
|
|
1515
|
+
/**
|
|
1516
|
+
* Website to Markdown.
|
|
1517
|
+
*
|
|
1518
|
+
* Clean, LLM-ready markdown from any URL.
|
|
1519
|
+
*
|
|
1520
|
+
* From $0.0005 per page.
|
|
1521
|
+
* 300 free requests on the free tier.
|
|
1522
|
+
* Main fields: url, title, markdown, word_count, token_estimate.
|
|
1523
|
+
*/
|
|
1524
|
+
markdown: Method<WebMarkdownParams>;
|
|
1525
|
+
/**
|
|
1526
|
+
* Structured Data Extraction.
|
|
1527
|
+
*
|
|
1528
|
+
* Pull the fields you define out of any page.
|
|
1529
|
+
*
|
|
1530
|
+
* From $0.005 per page.
|
|
1531
|
+
* Main fields: url, data, schema.
|
|
1532
|
+
*/
|
|
1533
|
+
extract: Method<WebExtractParams>;
|
|
1534
|
+
/**
|
|
1535
|
+
* Website Sitemap.
|
|
1536
|
+
*
|
|
1537
|
+
* Every URL on a website, optionally filtered by a pattern.
|
|
1538
|
+
*
|
|
1539
|
+
* From $0.0005 per request.
|
|
1540
|
+
* 300 free requests on the free tier.
|
|
1541
|
+
* Main fields: url, count, urls[].
|
|
1542
|
+
*/
|
|
1543
|
+
sitemap: Method<WebSitemapParams>;
|
|
1544
|
+
/**
|
|
1545
|
+
* Website Crawling.
|
|
1546
|
+
*
|
|
1547
|
+
* Crawl a site and get each page as markdown.
|
|
1548
|
+
*
|
|
1549
|
+
* From $0.0005 per page.
|
|
1550
|
+
* Runs as a job: returns 202 with a job_id, then poll GET /v1/jobs/{id}.
|
|
1551
|
+
* Main fields: job_id, pages[], markdown, status.
|
|
1552
|
+
*/
|
|
1553
|
+
crawl: JobMethod<WebCrawlParams>;
|
|
1554
|
+
/**
|
|
1555
|
+
* Company Research.
|
|
1556
|
+
*
|
|
1557
|
+
* A researched brief on a company, with sources.
|
|
1558
|
+
*
|
|
1559
|
+
* From $0.008 per research task.
|
|
1560
|
+
* May return 202 with a job_id when the answer takes longer. Poll GET /v1/jobs/{id}.
|
|
1561
|
+
* Main fields: summary, products, customers, sources[].
|
|
1562
|
+
*/
|
|
1563
|
+
researchCompany: AsyncMethod<WebResearchCompanyParams>;
|
|
1564
|
+
/**
|
|
1565
|
+
* Deep Research.
|
|
1566
|
+
*
|
|
1567
|
+
* Multi-step research with cited sources.
|
|
1568
|
+
*
|
|
1569
|
+
* From $0.025 per research task.
|
|
1570
|
+
* May return 202 with a job_id when the answer takes longer. Poll GET /v1/jobs/{id}.
|
|
1571
|
+
* Main fields: answer, sources[], confidence.
|
|
1572
|
+
*/
|
|
1573
|
+
research: AsyncMethod<WebResearchParams>;
|
|
1574
|
+
/**
|
|
1575
|
+
* ICP Qualification.
|
|
1576
|
+
*
|
|
1577
|
+
* Whether an account fits your ICP, with reasons.
|
|
1578
|
+
*
|
|
1579
|
+
* From $0.002 per decision.
|
|
1580
|
+
* Main fields: company, fit, score, reasons[].
|
|
1581
|
+
*/
|
|
1582
|
+
qualify: Method<WebQualifyParams>;
|
|
1583
|
+
}
|
|
1584
|
+
export interface Resources {
|
|
1585
|
+
people: PeopleResource;
|
|
1586
|
+
companies: CompaniesResource;
|
|
1587
|
+
contacts: ContactsResource;
|
|
1588
|
+
signals: SignalsResource;
|
|
1589
|
+
web: WebResource;
|
|
1590
|
+
}
|
|
1591
|
+
export type EndpointId = (typeof ENDPOINTS)[number]['id'];
|
|
1592
|
+
export type Endpoint = (typeof ENDPOINTS)[number];
|
|
1593
|
+
export interface Meta {
|
|
1594
|
+
billing_unit: string;
|
|
1595
|
+
billed_units: number;
|
|
1596
|
+
charged_usd: string;
|
|
1597
|
+
price_version: string;
|
|
1598
|
+
/** Pass back as `cursor` for the next page. Null on the last page. */
|
|
1599
|
+
next_cursor: string | null;
|
|
1600
|
+
retrieved_at: string;
|
|
1601
|
+
free_requests_remaining: number | null;
|
|
1602
|
+
endpoint_free_remaining: number | null;
|
|
1603
|
+
}
|
|
1604
|
+
/** Every endpoint answers with this envelope. Keys are snake_case, exactly as the API sends them. */
|
|
1605
|
+
export interface Envelope<T = any> {
|
|
1606
|
+
request_id: string;
|
|
1607
|
+
status: 'completed' | 'pending' | 'failed';
|
|
1608
|
+
data: T | null;
|
|
1609
|
+
meta: Meta;
|
|
1610
|
+
/** Set while an async request is pending. Poll it with `client.requests.wait(job_id)`. */
|
|
1611
|
+
job_id?: string;
|
|
1612
|
+
}
|
|
1613
|
+
/** `data` of a paginated endpoint (people.search, companies.search, people.employees, signals.jobsSearch). */
|
|
1614
|
+
export interface Page<T = any> {
|
|
1615
|
+
total?: number | null;
|
|
1616
|
+
results: T[];
|
|
1617
|
+
}
|
|
1618
|
+
export interface Wallet {
|
|
1619
|
+
available_usd: string;
|
|
1620
|
+
cash_usd: string;
|
|
1621
|
+
promo_usd: string;
|
|
1622
|
+
held_usd: string;
|
|
1623
|
+
free_tier: boolean;
|
|
1624
|
+
free_requests: {
|
|
1625
|
+
limit: number;
|
|
1626
|
+
used: number;
|
|
1627
|
+
remaining: number;
|
|
1628
|
+
};
|
|
1629
|
+
}
|
|
1630
|
+
export interface JobItem<T = any> {
|
|
1631
|
+
index: number;
|
|
1632
|
+
status: string;
|
|
1633
|
+
input: Record<string, unknown>;
|
|
1634
|
+
data: T | null;
|
|
1635
|
+
}
|
|
1636
|
+
export interface JobStatus<T = any> {
|
|
1637
|
+
job_id: string;
|
|
1638
|
+
endpoint: string;
|
|
1639
|
+
status: string;
|
|
1640
|
+
total: number;
|
|
1641
|
+
done: number;
|
|
1642
|
+
billed_units: number;
|
|
1643
|
+
charged_usd: string | null;
|
|
1644
|
+
export_url: string | null;
|
|
1645
|
+
items: JobItem<T>[];
|
|
1646
|
+
next_after: number | null;
|
|
1647
|
+
}
|
|
1648
|
+
export interface RequestRecord {
|
|
1649
|
+
id: string;
|
|
1650
|
+
endpoint: string;
|
|
1651
|
+
status: string;
|
|
1652
|
+
http_status: number | null;
|
|
1653
|
+
error_code: string | null;
|
|
1654
|
+
free: boolean;
|
|
1655
|
+
billed_units: number;
|
|
1656
|
+
charged_usd: string;
|
|
1657
|
+
created_at: string;
|
|
1658
|
+
}
|
|
1659
|
+
type SnakeKey<S extends string> = S extends `${infer H}${infer T}` ? `${H extends Lowercase<H> ? H : `_${Lowercase<H>}`}${SnakeKey<T>}` : S;
|
|
1660
|
+
/** The same object with snake_case keys. Every method takes camelCase or snake_case. */
|
|
1661
|
+
export type SnakeCased<T> = {
|
|
1662
|
+
[K in keyof T as K extends string ? SnakeKey<K> : K]: T[K];
|
|
1663
|
+
};
|
|
1664
|
+
export type Params<P> = P | SnakeCased<P>;
|
|
1665
|
+
export interface ClientOptions {
|
|
1666
|
+
/** Defaults to the CERNIS_DATA_API_KEY environment variable. */
|
|
1667
|
+
apiKey?: string;
|
|
1668
|
+
/** Defaults to CERNIS_DATA_BASE_URL, then DEFAULT_BASE_URL. */
|
|
1669
|
+
baseUrl?: string;
|
|
1670
|
+
/** Which client is calling: sdk, mcp or cli. */
|
|
1671
|
+
surface?: string;
|
|
1672
|
+
/** Custom fetch, for tests or proxies. */
|
|
1673
|
+
fetch?: typeof fetch;
|
|
1674
|
+
/** Per attempt timeout in ms. Default 60000. */
|
|
1675
|
+
timeoutMs?: number;
|
|
1676
|
+
/** Retries on 429, 5xx and network errors. Default 2. */
|
|
1677
|
+
maxRetries?: number;
|
|
1678
|
+
/** How long async requests and jobs are polled before giving up, in ms. Default 300000. */
|
|
1679
|
+
waitTimeoutMs?: number;
|
|
1680
|
+
/** First poll interval in ms. Grows 1.5x per poll up to 5000. Default 1000. */
|
|
1681
|
+
pollIntervalMs?: number;
|
|
1682
|
+
/** Extra headers on every request. */
|
|
1683
|
+
headers?: Record<string, string>;
|
|
1684
|
+
}
|
|
1685
|
+
/** @deprecated Use ClientOptions. */
|
|
1686
|
+
export type CernisDataOptions = ClientOptions;
|
|
1687
|
+
export interface RequestOptions {
|
|
1688
|
+
/** Replays the first response for the same key instead of charging twice. Generated per call when unset. */
|
|
1689
|
+
idempotencyKey?: string;
|
|
1690
|
+
/** Time budget for this call in ms. Also sent as X-Timeout-Ms (clamped to 1000..120000) so the API stops in time. */
|
|
1691
|
+
timeoutMs?: number;
|
|
1692
|
+
maxRetries?: number;
|
|
1693
|
+
signal?: AbortSignal;
|
|
1694
|
+
headers?: Record<string, string>;
|
|
1695
|
+
}
|
|
1696
|
+
/** @deprecated Use RequestOptions. */
|
|
1697
|
+
export type CallOptions = RequestOptions & {
|
|
1698
|
+
wait?: boolean;
|
|
1699
|
+
};
|
|
1700
|
+
export interface WaitOptions extends RequestOptions {
|
|
1701
|
+
/** Poll until the answer is ready (default). False returns the pending envelope with its job_id. */
|
|
1702
|
+
wait?: boolean;
|
|
1703
|
+
pollIntervalMs?: number;
|
|
1704
|
+
waitTimeoutMs?: number;
|
|
1705
|
+
}
|
|
1706
|
+
export interface IterOptions extends Omit<RequestOptions, 'idempotencyKey'> {
|
|
1707
|
+
/** Stop after this many items. Every page is billed, so set this on big searches. */
|
|
1708
|
+
maxItems?: number;
|
|
1709
|
+
maxPages?: number;
|
|
1710
|
+
}
|
|
1711
|
+
export type Method<P> = <T = any>(params: Params<P>, options?: RequestOptions) => Promise<Envelope<T>>;
|
|
1712
|
+
export type AsyncMethod<P> = <T = any>(params: Params<P>, options?: WaitOptions) => Promise<Envelope<T>>;
|
|
1713
|
+
export type JobMethod<P> = (params: Params<P>, options?: RequestOptions) => Promise<Job>;
|
|
1714
|
+
export type PaginatedMethod<P> = (<T = any>(params: Params<P>, options?: RequestOptions) => Promise<Envelope<Page<T>>>) & {
|
|
1715
|
+
/** Every item across pages. Fetches the next page only when you reach it. */
|
|
1716
|
+
iter<T = any>(params: Params<P>, options?: IterOptions): AsyncGenerator<T, void, undefined>;
|
|
1717
|
+
};
|
|
1718
|
+
/** Base class for every error the SDK throws. `code` is the API error code (see the error table in the docs). */
|
|
1719
|
+
export declare class CernisDataError extends Error {
|
|
1720
|
+
status: number;
|
|
1721
|
+
code: string;
|
|
1722
|
+
requestId: string | null;
|
|
1723
|
+
details: unknown;
|
|
1724
|
+
checkoutUrl: string | null;
|
|
1725
|
+
constructor(status: number, body: any, message?: string);
|
|
1726
|
+
}
|
|
1727
|
+
/** 400: the input failed validation. `details` lists `{ field, message }`. */
|
|
1728
|
+
export declare class InvalidInputError extends CernisDataError {
|
|
1729
|
+
}
|
|
1730
|
+
/** 401: missing, wrong or revoked API key. */
|
|
1731
|
+
export declare class AuthenticationError extends CernisDataError {
|
|
1732
|
+
}
|
|
1733
|
+
/** 402: not enough balance. `checkoutUrl` tops up the wallet. */
|
|
1734
|
+
export declare class InsufficientBalanceError extends CernisDataError {
|
|
1735
|
+
}
|
|
1736
|
+
/** 403: the key's scopes do not allow this call. */
|
|
1737
|
+
export declare class PermissionDeniedError extends CernisDataError {
|
|
1738
|
+
}
|
|
1739
|
+
/** 404 */
|
|
1740
|
+
export declare class NotFoundError extends CernisDataError {
|
|
1741
|
+
}
|
|
1742
|
+
/** 409 / 422: an idempotency key conflict or an expired quote. */
|
|
1743
|
+
export declare class ConflictError extends CernisDataError {
|
|
1744
|
+
}
|
|
1745
|
+
/** 429: slow down. `retryAfter` is in seconds when the API sent one. */
|
|
1746
|
+
export declare class RateLimitError extends CernisDataError {
|
|
1747
|
+
retryAfter: number | null;
|
|
1748
|
+
}
|
|
1749
|
+
/** 501: the endpoint has no live data route yet. */
|
|
1750
|
+
export declare class EndpointNotAvailableError extends CernisDataError {
|
|
1751
|
+
}
|
|
1752
|
+
/** 504 from the API, or the SDK gave up waiting (status 0). */
|
|
1753
|
+
export declare class TimeoutError extends CernisDataError {
|
|
1754
|
+
}
|
|
1755
|
+
/** 5xx: provider unavailable, no qualified route, or an internal error. You were not charged. */
|
|
1756
|
+
export declare class ServerError extends CernisDataError {
|
|
1757
|
+
}
|
|
1758
|
+
/** The request never got an answer: DNS, TLS, connection reset. */
|
|
1759
|
+
export declare class APIConnectionError extends CernisDataError {
|
|
1760
|
+
}
|
|
1761
|
+
/** A webhook failed signature verification. */
|
|
1762
|
+
export declare class WebhookVerificationError extends CernisDataError {
|
|
1763
|
+
}
|
|
1764
|
+
/** Build the right error subclass from an API error response. */
|
|
1765
|
+
export declare function errorFromResponse(status: number, body: any, headers?: Headers): CernisDataError;
|
|
1766
|
+
/** camelCase keys to snake_case, deep. Drops undefined values. Strings and other values are left alone. */
|
|
1767
|
+
export declare function snakeKeys(v: unknown): any;
|
|
1768
|
+
/**
|
|
1769
|
+
* What goes on the wire for an endpoint: snake_case keys, flat filter fields moved into `filters`, and
|
|
1770
|
+
* include/exclude lists given as a string turned into arrays.
|
|
1771
|
+
*/
|
|
1772
|
+
export declare function prepareInput(endpoint: Endpoint | undefined, params: unknown): Record<string, any>;
|
|
1773
|
+
export declare const findEndpoint: (id: string) => Endpoint | undefined;
|
|
1774
|
+
/**
|
|
1775
|
+
* Verify a job webhook and return its parsed payload. Pass the raw request body (not re-serialized JSON), the
|
|
1776
|
+
* CernisData-Signature header and your secret from `client.webhooks.secret()`. Throws WebhookVerificationError.
|
|
1777
|
+
*/
|
|
1778
|
+
export declare function verifyWebhook<T = any>(payload: string | Uint8Array | ArrayBuffer, signature: string | null | undefined, secret: string, options?: {
|
|
1779
|
+
toleranceSec?: number;
|
|
1780
|
+
now?: number;
|
|
1781
|
+
}): Promise<T>;
|
|
1782
|
+
/** A bulk job. `await job.wait()` then `for await (const item of job.results())`. */
|
|
1783
|
+
export declare class Job<T = any> {
|
|
1784
|
+
#private;
|
|
1785
|
+
readonly id: string;
|
|
1786
|
+
status: string;
|
|
1787
|
+
total: number;
|
|
1788
|
+
done: number;
|
|
1789
|
+
/** The last raw response for this job. */
|
|
1790
|
+
raw: any;
|
|
1791
|
+
constructor(client: CernisData, raw: any);
|
|
1792
|
+
get finished(): boolean;
|
|
1793
|
+
/** Fetch the current status. */
|
|
1794
|
+
refresh(): Promise<this>;
|
|
1795
|
+
/** Poll until the job is no longer running. */
|
|
1796
|
+
wait(o?: {
|
|
1797
|
+
pollIntervalMs?: number;
|
|
1798
|
+
waitTimeoutMs?: number;
|
|
1799
|
+
signal?: AbortSignal;
|
|
1800
|
+
}): Promise<this>;
|
|
1801
|
+
/** Every item with its result, 100 per request. Works while the job runs too (finished items only). */
|
|
1802
|
+
results(): AsyncGenerator<JobItem<T>, void, undefined>;
|
|
1803
|
+
toJSON(): any;
|
|
1804
|
+
}
|
|
1805
|
+
interface SendOptions extends RequestOptions {
|
|
1806
|
+
query?: Record<string, unknown>;
|
|
1807
|
+
body?: unknown;
|
|
1808
|
+
/** Safe to retry after the request may have reached the server. */
|
|
1809
|
+
idempotent?: boolean;
|
|
1810
|
+
}
|
|
1811
|
+
export declare class CernisData implements Resources {
|
|
1812
|
+
apiKey: string | undefined;
|
|
1813
|
+
/** Empty when no base URL is configured; calls then throw a CernisDataError explaining how to set one. */
|
|
1814
|
+
baseUrl: string;
|
|
1815
|
+
surface: string;
|
|
1816
|
+
timeoutMs: number;
|
|
1817
|
+
maxRetries: number;
|
|
1818
|
+
waitTimeoutMs: number;
|
|
1819
|
+
pollIntervalMs: number;
|
|
1820
|
+
private fetcher;
|
|
1821
|
+
private extraHeaders;
|
|
1822
|
+
readonly people: PeopleResource;
|
|
1823
|
+
readonly companies: CompaniesResource;
|
|
1824
|
+
readonly contacts: ContactsResource;
|
|
1825
|
+
readonly signals: SignalsResource;
|
|
1826
|
+
readonly web: WebResource;
|
|
1827
|
+
static verifyWebhook: typeof verifyWebhook;
|
|
1828
|
+
constructor(o?: ClientOptions);
|
|
1829
|
+
/** Raw request against the API. Returns the parsed JSON body and throws a CernisDataError subclass on any non 2xx answer. */
|
|
1830
|
+
request<T = any>(method: 'GET' | 'POST' | 'DELETE', path: string, o?: SendOptions): Promise<T>;
|
|
1831
|
+
/** Call an endpoint by id with its input, e.g. `call('company.enrich', { domain: 'stripe.com' })`. Returns the envelope as sent (no waiting). */
|
|
1832
|
+
call<T = any>(id: EndpointId | (string & {}), input?: Record<string, unknown>, o?: CallOptions): Promise<Envelope<T>>;
|
|
1833
|
+
private callEndpoint;
|
|
1834
|
+
private invoke;
|
|
1835
|
+
private paginate;
|
|
1836
|
+
/** Repeat `check` with growing intervals until it returns a value. Throws TimeoutError after waitTimeoutMs. */
|
|
1837
|
+
poll<R>(check: () => Promise<R | null>, o?: {
|
|
1838
|
+
pollIntervalMs?: number;
|
|
1839
|
+
waitTimeoutMs?: number;
|
|
1840
|
+
signal?: AbortSignal;
|
|
1841
|
+
what?: string;
|
|
1842
|
+
}): Promise<R>;
|
|
1843
|
+
private waitForRequest;
|
|
1844
|
+
private send;
|
|
1845
|
+
/** Every endpoint with its price and status. No key needed. */
|
|
1846
|
+
catalog(): Promise<any>;
|
|
1847
|
+
/** Balance and the free allowance (`free_requests: { limit, used, remaining }`). */
|
|
1848
|
+
wallet(): Promise<Wallet>;
|
|
1849
|
+
/** Requests and spend per endpoint per day. */
|
|
1850
|
+
usage(o?: {
|
|
1851
|
+
days?: number;
|
|
1852
|
+
}): Promise<{
|
|
1853
|
+
days: number;
|
|
1854
|
+
usage: {
|
|
1855
|
+
endpoint: string;
|
|
1856
|
+
date: string;
|
|
1857
|
+
requests: number;
|
|
1858
|
+
billed_units: number;
|
|
1859
|
+
charged_usd: string;
|
|
1860
|
+
errors: number;
|
|
1861
|
+
}[];
|
|
1862
|
+
}>;
|
|
1863
|
+
/** Raw status of a job or pending request. `after` pages through job items. */
|
|
1864
|
+
job(id: string, after?: number): Promise<any>;
|
|
1865
|
+
/** Poll a job or pending request until it is no longer pending and return its last raw response. */
|
|
1866
|
+
wait(id: string, o?: {
|
|
1867
|
+
pollIntervalMs?: number;
|
|
1868
|
+
timeoutMs?: number;
|
|
1869
|
+
waitTimeoutMs?: number;
|
|
1870
|
+
signal?: AbortSignal;
|
|
1871
|
+
}): Promise<any>;
|
|
1872
|
+
readonly requests: {
|
|
1873
|
+
/** Recent requests, newest first. Pass `before: next_before` for the next page. */
|
|
1874
|
+
list: (o?: {
|
|
1875
|
+
limit?: number;
|
|
1876
|
+
before?: number;
|
|
1877
|
+
}) => Promise<{
|
|
1878
|
+
requests: RequestRecord[];
|
|
1879
|
+
next_before: number | null;
|
|
1880
|
+
}>;
|
|
1881
|
+
/** Every request, newest first, across pages. */
|
|
1882
|
+
iter: (o?: {
|
|
1883
|
+
limit?: number;
|
|
1884
|
+
maxItems?: number;
|
|
1885
|
+
}) => AsyncGenerator<RequestRecord, void, undefined>;
|
|
1886
|
+
/** The stored answer of a request (async requests: the envelope once ready). */
|
|
1887
|
+
retrieve: (id: string) => Promise<any>;
|
|
1888
|
+
/** Wait for a pending async request and return its envelope. Throws its error if it failed. */
|
|
1889
|
+
wait: (id: string, o?: Omit<WaitOptions, 'wait'>) => Promise<Envelope>;
|
|
1890
|
+
};
|
|
1891
|
+
private iterRequests;
|
|
1892
|
+
readonly jobs: {
|
|
1893
|
+
/** A bulk job by id, as a Job you can wait on and read results from. */
|
|
1894
|
+
retrieve: (id: string) => Promise<Job>;
|
|
1895
|
+
};
|
|
1896
|
+
readonly keys: {
|
|
1897
|
+
list: () => Promise<{
|
|
1898
|
+
keys: any[];
|
|
1899
|
+
}>;
|
|
1900
|
+
/** Create a key. Scopes: '*' or categories ('people', 'company', 'contact', 'signals', 'web'). The key is shown once. */
|
|
1901
|
+
create: (o?: {
|
|
1902
|
+
name?: string;
|
|
1903
|
+
scopes?: string[];
|
|
1904
|
+
}) => Promise<{
|
|
1905
|
+
id: string;
|
|
1906
|
+
key: string;
|
|
1907
|
+
prefix: string;
|
|
1908
|
+
note: string;
|
|
1909
|
+
}>;
|
|
1910
|
+
revoke: (id: string) => Promise<{
|
|
1911
|
+
revoked: boolean;
|
|
1912
|
+
}>;
|
|
1913
|
+
};
|
|
1914
|
+
readonly billing: {
|
|
1915
|
+
/** A checkout link to add credits. */
|
|
1916
|
+
checkout: (o: {
|
|
1917
|
+
amountUsd: number;
|
|
1918
|
+
}) => Promise<{
|
|
1919
|
+
checkout_url: string;
|
|
1920
|
+
session_id: string;
|
|
1921
|
+
}>;
|
|
1922
|
+
};
|
|
1923
|
+
readonly webhooks: {
|
|
1924
|
+
/** The signing secret for job webhooks. Needs a full-access key. */
|
|
1925
|
+
secret: () => Promise<{
|
|
1926
|
+
secret: string;
|
|
1927
|
+
header: string;
|
|
1928
|
+
scheme: string;
|
|
1929
|
+
}>;
|
|
1930
|
+
rotateSecret: () => Promise<{
|
|
1931
|
+
secret: string;
|
|
1932
|
+
}>;
|
|
1933
|
+
deliveries: () => Promise<{
|
|
1934
|
+
deliveries: any[];
|
|
1935
|
+
}>;
|
|
1936
|
+
/** Same as the exported verifyWebhook. */
|
|
1937
|
+
verify: typeof verifyWebhook;
|
|
1938
|
+
};
|
|
1939
|
+
}
|
|
1940
|
+
export default CernisData;
|