exa-js 1.8.12 → 1.8.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +912 -115
- package/dist/index.d.ts +912 -115
- package/dist/index.js +324 -110
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +317 -112
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/index.ts
|
|
2
|
-
import
|
|
2
|
+
import fetch2, { Headers } from "cross-fetch";
|
|
3
3
|
|
|
4
4
|
// src/errors.ts
|
|
5
5
|
var HttpStatusCode = /* @__PURE__ */ ((HttpStatusCode2) => {
|
|
@@ -155,6 +155,311 @@ var EventsClient = class extends WebsetsBaseClient {
|
|
|
155
155
|
}
|
|
156
156
|
};
|
|
157
157
|
|
|
158
|
+
// src/websets/openapi.ts
|
|
159
|
+
var CreateEnrichmentParametersFormat = /* @__PURE__ */ ((CreateEnrichmentParametersFormat2) => {
|
|
160
|
+
CreateEnrichmentParametersFormat2["text"] = "text";
|
|
161
|
+
CreateEnrichmentParametersFormat2["date"] = "date";
|
|
162
|
+
CreateEnrichmentParametersFormat2["number"] = "number";
|
|
163
|
+
CreateEnrichmentParametersFormat2["options"] = "options";
|
|
164
|
+
CreateEnrichmentParametersFormat2["email"] = "email";
|
|
165
|
+
CreateEnrichmentParametersFormat2["phone"] = "phone";
|
|
166
|
+
return CreateEnrichmentParametersFormat2;
|
|
167
|
+
})(CreateEnrichmentParametersFormat || {});
|
|
168
|
+
var CreateImportParametersFormat = /* @__PURE__ */ ((CreateImportParametersFormat2) => {
|
|
169
|
+
CreateImportParametersFormat2["csv"] = "csv";
|
|
170
|
+
return CreateImportParametersFormat2;
|
|
171
|
+
})(CreateImportParametersFormat || {});
|
|
172
|
+
var CreateWebsetParametersImportSource = /* @__PURE__ */ ((CreateWebsetParametersImportSource2) => {
|
|
173
|
+
CreateWebsetParametersImportSource2["import"] = "import";
|
|
174
|
+
CreateWebsetParametersImportSource2["webset"] = "webset";
|
|
175
|
+
return CreateWebsetParametersImportSource2;
|
|
176
|
+
})(CreateWebsetParametersImportSource || {});
|
|
177
|
+
var CreateWebsetParametersSearchExcludeSource = /* @__PURE__ */ ((CreateWebsetParametersSearchExcludeSource2) => {
|
|
178
|
+
CreateWebsetParametersSearchExcludeSource2["import"] = "import";
|
|
179
|
+
CreateWebsetParametersSearchExcludeSource2["webset"] = "webset";
|
|
180
|
+
return CreateWebsetParametersSearchExcludeSource2;
|
|
181
|
+
})(CreateWebsetParametersSearchExcludeSource || {});
|
|
182
|
+
var CreateWebsetSearchParametersExcludeSource = /* @__PURE__ */ ((CreateWebsetSearchParametersExcludeSource2) => {
|
|
183
|
+
CreateWebsetSearchParametersExcludeSource2["import"] = "import";
|
|
184
|
+
CreateWebsetSearchParametersExcludeSource2["webset"] = "webset";
|
|
185
|
+
return CreateWebsetSearchParametersExcludeSource2;
|
|
186
|
+
})(CreateWebsetSearchParametersExcludeSource || {});
|
|
187
|
+
var EventType = /* @__PURE__ */ ((EventType2) => {
|
|
188
|
+
EventType2["webset_created"] = "webset.created";
|
|
189
|
+
EventType2["webset_deleted"] = "webset.deleted";
|
|
190
|
+
EventType2["webset_paused"] = "webset.paused";
|
|
191
|
+
EventType2["webset_idle"] = "webset.idle";
|
|
192
|
+
EventType2["webset_search_created"] = "webset.search.created";
|
|
193
|
+
EventType2["webset_search_canceled"] = "webset.search.canceled";
|
|
194
|
+
EventType2["webset_search_completed"] = "webset.search.completed";
|
|
195
|
+
EventType2["webset_search_updated"] = "webset.search.updated";
|
|
196
|
+
EventType2["import_created"] = "import.created";
|
|
197
|
+
EventType2["import_completed"] = "import.completed";
|
|
198
|
+
EventType2["import_processing"] = "import.processing";
|
|
199
|
+
EventType2["webset_item_created"] = "webset.item.created";
|
|
200
|
+
EventType2["webset_item_enriched"] = "webset.item.enriched";
|
|
201
|
+
EventType2["webset_export_created"] = "webset.export.created";
|
|
202
|
+
EventType2["webset_export_completed"] = "webset.export.completed";
|
|
203
|
+
return EventType2;
|
|
204
|
+
})(EventType || {});
|
|
205
|
+
var ImportFailedReason = /* @__PURE__ */ ((ImportFailedReason2) => {
|
|
206
|
+
ImportFailedReason2["invalid_format"] = "invalid_format";
|
|
207
|
+
ImportFailedReason2["invalid_file_content"] = "invalid_file_content";
|
|
208
|
+
ImportFailedReason2["missing_identifier"] = "missing_identifier";
|
|
209
|
+
return ImportFailedReason2;
|
|
210
|
+
})(ImportFailedReason || {});
|
|
211
|
+
var ImportFormat = /* @__PURE__ */ ((ImportFormat2) => {
|
|
212
|
+
ImportFormat2["csv"] = "csv";
|
|
213
|
+
ImportFormat2["webset"] = "webset";
|
|
214
|
+
return ImportFormat2;
|
|
215
|
+
})(ImportFormat || {});
|
|
216
|
+
var ImportObject = /* @__PURE__ */ ((ImportObject2) => {
|
|
217
|
+
ImportObject2["import"] = "import";
|
|
218
|
+
return ImportObject2;
|
|
219
|
+
})(ImportObject || {});
|
|
220
|
+
var ImportStatus = /* @__PURE__ */ ((ImportStatus2) => {
|
|
221
|
+
ImportStatus2["pending"] = "pending";
|
|
222
|
+
ImportStatus2["processing"] = "processing";
|
|
223
|
+
ImportStatus2["completed"] = "completed";
|
|
224
|
+
ImportStatus2["failed"] = "failed";
|
|
225
|
+
return ImportStatus2;
|
|
226
|
+
})(ImportStatus || {});
|
|
227
|
+
var MonitorObject = /* @__PURE__ */ ((MonitorObject2) => {
|
|
228
|
+
MonitorObject2["monitor"] = "monitor";
|
|
229
|
+
return MonitorObject2;
|
|
230
|
+
})(MonitorObject || {});
|
|
231
|
+
var MonitorStatus = /* @__PURE__ */ ((MonitorStatus2) => {
|
|
232
|
+
MonitorStatus2["enabled"] = "enabled";
|
|
233
|
+
MonitorStatus2["disabled"] = "disabled";
|
|
234
|
+
return MonitorStatus2;
|
|
235
|
+
})(MonitorStatus || {});
|
|
236
|
+
var MonitorRunObject = /* @__PURE__ */ ((MonitorRunObject2) => {
|
|
237
|
+
MonitorRunObject2["monitor_run"] = "monitor_run";
|
|
238
|
+
return MonitorRunObject2;
|
|
239
|
+
})(MonitorRunObject || {});
|
|
240
|
+
var MonitorRunStatus = /* @__PURE__ */ ((MonitorRunStatus2) => {
|
|
241
|
+
MonitorRunStatus2["created"] = "created";
|
|
242
|
+
MonitorRunStatus2["running"] = "running";
|
|
243
|
+
MonitorRunStatus2["completed"] = "completed";
|
|
244
|
+
MonitorRunStatus2["canceled"] = "canceled";
|
|
245
|
+
return MonitorRunStatus2;
|
|
246
|
+
})(MonitorRunStatus || {});
|
|
247
|
+
var MonitorRunType = /* @__PURE__ */ ((MonitorRunType2) => {
|
|
248
|
+
MonitorRunType2["search"] = "search";
|
|
249
|
+
MonitorRunType2["refresh"] = "refresh";
|
|
250
|
+
return MonitorRunType2;
|
|
251
|
+
})(MonitorRunType || {});
|
|
252
|
+
var UpdateMonitorStatus = /* @__PURE__ */ ((UpdateMonitorStatus2) => {
|
|
253
|
+
UpdateMonitorStatus2["enabled"] = "enabled";
|
|
254
|
+
UpdateMonitorStatus2["disabled"] = "disabled";
|
|
255
|
+
return UpdateMonitorStatus2;
|
|
256
|
+
})(UpdateMonitorStatus || {});
|
|
257
|
+
var WebhookStatus = /* @__PURE__ */ ((WebhookStatus2) => {
|
|
258
|
+
WebhookStatus2["active"] = "active";
|
|
259
|
+
WebhookStatus2["inactive"] = "inactive";
|
|
260
|
+
return WebhookStatus2;
|
|
261
|
+
})(WebhookStatus || {});
|
|
262
|
+
var WebsetStatus = /* @__PURE__ */ ((WebsetStatus2) => {
|
|
263
|
+
WebsetStatus2["idle"] = "idle";
|
|
264
|
+
WebsetStatus2["running"] = "running";
|
|
265
|
+
WebsetStatus2["paused"] = "paused";
|
|
266
|
+
return WebsetStatus2;
|
|
267
|
+
})(WebsetStatus || {});
|
|
268
|
+
var WebsetEnrichmentStatus = /* @__PURE__ */ ((WebsetEnrichmentStatus2) => {
|
|
269
|
+
WebsetEnrichmentStatus2["pending"] = "pending";
|
|
270
|
+
WebsetEnrichmentStatus2["canceled"] = "canceled";
|
|
271
|
+
WebsetEnrichmentStatus2["completed"] = "completed";
|
|
272
|
+
return WebsetEnrichmentStatus2;
|
|
273
|
+
})(WebsetEnrichmentStatus || {});
|
|
274
|
+
var WebsetEnrichmentFormat = /* @__PURE__ */ ((WebsetEnrichmentFormat2) => {
|
|
275
|
+
WebsetEnrichmentFormat2["text"] = "text";
|
|
276
|
+
WebsetEnrichmentFormat2["date"] = "date";
|
|
277
|
+
WebsetEnrichmentFormat2["number"] = "number";
|
|
278
|
+
WebsetEnrichmentFormat2["options"] = "options";
|
|
279
|
+
WebsetEnrichmentFormat2["email"] = "email";
|
|
280
|
+
WebsetEnrichmentFormat2["phone"] = "phone";
|
|
281
|
+
return WebsetEnrichmentFormat2;
|
|
282
|
+
})(WebsetEnrichmentFormat || {});
|
|
283
|
+
var WebsetItemSource = /* @__PURE__ */ ((WebsetItemSource2) => {
|
|
284
|
+
WebsetItemSource2["search"] = "search";
|
|
285
|
+
WebsetItemSource2["import"] = "import";
|
|
286
|
+
return WebsetItemSource2;
|
|
287
|
+
})(WebsetItemSource || {});
|
|
288
|
+
var WebsetItemEvaluationSatisfied = /* @__PURE__ */ ((WebsetItemEvaluationSatisfied2) => {
|
|
289
|
+
WebsetItemEvaluationSatisfied2["yes"] = "yes";
|
|
290
|
+
WebsetItemEvaluationSatisfied2["no"] = "no";
|
|
291
|
+
WebsetItemEvaluationSatisfied2["unclear"] = "unclear";
|
|
292
|
+
return WebsetItemEvaluationSatisfied2;
|
|
293
|
+
})(WebsetItemEvaluationSatisfied || {});
|
|
294
|
+
var WebsetSearchStatus = /* @__PURE__ */ ((WebsetSearchStatus2) => {
|
|
295
|
+
WebsetSearchStatus2["created"] = "created";
|
|
296
|
+
WebsetSearchStatus2["running"] = "running";
|
|
297
|
+
WebsetSearchStatus2["completed"] = "completed";
|
|
298
|
+
WebsetSearchStatus2["canceled"] = "canceled";
|
|
299
|
+
return WebsetSearchStatus2;
|
|
300
|
+
})(WebsetSearchStatus || {});
|
|
301
|
+
var WebsetSearchBehavior = /* @__PURE__ */ ((WebsetSearchBehavior2) => {
|
|
302
|
+
WebsetSearchBehavior2["override"] = "override";
|
|
303
|
+
WebsetSearchBehavior2["append"] = "append";
|
|
304
|
+
return WebsetSearchBehavior2;
|
|
305
|
+
})(WebsetSearchBehavior || {});
|
|
306
|
+
var WebsetSearchCanceledReason = /* @__PURE__ */ ((WebsetSearchCanceledReason2) => {
|
|
307
|
+
WebsetSearchCanceledReason2["webset_deleted"] = "webset_deleted";
|
|
308
|
+
WebsetSearchCanceledReason2["webset_canceled"] = "webset_canceled";
|
|
309
|
+
return WebsetSearchCanceledReason2;
|
|
310
|
+
})(WebsetSearchCanceledReason || {});
|
|
311
|
+
|
|
312
|
+
// src/websets/imports.ts
|
|
313
|
+
var ImportsClient = class extends WebsetsBaseClient {
|
|
314
|
+
async create(params, csv) {
|
|
315
|
+
if (csv === void 0) {
|
|
316
|
+
return this.request(
|
|
317
|
+
"/v0/imports",
|
|
318
|
+
"POST",
|
|
319
|
+
params
|
|
320
|
+
);
|
|
321
|
+
}
|
|
322
|
+
let csvBuffer;
|
|
323
|
+
if (typeof csv === "string") {
|
|
324
|
+
csvBuffer = Buffer.from(csv, "utf8");
|
|
325
|
+
} else if (Buffer.isBuffer(csv)) {
|
|
326
|
+
csvBuffer = csv;
|
|
327
|
+
} else {
|
|
328
|
+
throw new ExaError(
|
|
329
|
+
"Invalid CSV data input. Must be string or Buffer",
|
|
330
|
+
400 /* BadRequest */
|
|
331
|
+
);
|
|
332
|
+
}
|
|
333
|
+
const sizeInBytes = csvBuffer.length;
|
|
334
|
+
const sizeInMB = Math.max(1, Math.ceil(sizeInBytes / (1024 * 1024)));
|
|
335
|
+
const csvText = csvBuffer.toString("utf8");
|
|
336
|
+
const lines = csvText.split("\n").filter((line) => line.trim().length > 0);
|
|
337
|
+
const recordCount = Math.max(0, lines.length - 1);
|
|
338
|
+
if (sizeInMB > 50) {
|
|
339
|
+
throw new ExaError(
|
|
340
|
+
`CSV file too large: ${sizeInMB}MB. Maximum size is 50MB.`,
|
|
341
|
+
400 /* BadRequest */
|
|
342
|
+
);
|
|
343
|
+
}
|
|
344
|
+
if (recordCount === 0) {
|
|
345
|
+
throw new ExaError(
|
|
346
|
+
"CSV file appears to have no data records (only header or empty)",
|
|
347
|
+
400 /* BadRequest */
|
|
348
|
+
);
|
|
349
|
+
}
|
|
350
|
+
const createParams = {
|
|
351
|
+
title: params.title,
|
|
352
|
+
format: "csv" /* csv */,
|
|
353
|
+
entity: params.entity,
|
|
354
|
+
size: sizeInBytes,
|
|
355
|
+
count: recordCount,
|
|
356
|
+
metadata: params.metadata,
|
|
357
|
+
csv: params.csv
|
|
358
|
+
};
|
|
359
|
+
const importResponse = await this.request(
|
|
360
|
+
"/v0/imports",
|
|
361
|
+
"POST",
|
|
362
|
+
createParams
|
|
363
|
+
);
|
|
364
|
+
try {
|
|
365
|
+
const uploadResponse = await fetch(importResponse.uploadUrl, {
|
|
366
|
+
method: "PUT",
|
|
367
|
+
body: csvBuffer
|
|
368
|
+
});
|
|
369
|
+
if (!uploadResponse.ok) {
|
|
370
|
+
const errorText = await uploadResponse.text();
|
|
371
|
+
throw new ExaError(
|
|
372
|
+
`Upload failed: ${uploadResponse.status} ${uploadResponse.statusText}. ${errorText}`,
|
|
373
|
+
400 /* BadRequest */
|
|
374
|
+
);
|
|
375
|
+
}
|
|
376
|
+
} catch (error) {
|
|
377
|
+
if (error instanceof ExaError) {
|
|
378
|
+
throw error;
|
|
379
|
+
}
|
|
380
|
+
throw new ExaError(
|
|
381
|
+
`Failed to upload CSV data: ${error.message}`,
|
|
382
|
+
400 /* BadRequest */
|
|
383
|
+
);
|
|
384
|
+
}
|
|
385
|
+
return importResponse;
|
|
386
|
+
}
|
|
387
|
+
/**
|
|
388
|
+
* Get an Import by ID
|
|
389
|
+
* @param id The ID of the Import
|
|
390
|
+
* @returns The Import
|
|
391
|
+
*/
|
|
392
|
+
async get(id) {
|
|
393
|
+
return this.request(`/v0/imports/${id}`, "GET");
|
|
394
|
+
}
|
|
395
|
+
/**
|
|
396
|
+
* List all Imports
|
|
397
|
+
* @param options Pagination options
|
|
398
|
+
* @returns The list of Imports
|
|
399
|
+
*/
|
|
400
|
+
async list(options) {
|
|
401
|
+
const params = this.buildPaginationParams(options);
|
|
402
|
+
return this.request(
|
|
403
|
+
"/v0/imports",
|
|
404
|
+
"GET",
|
|
405
|
+
void 0,
|
|
406
|
+
params
|
|
407
|
+
);
|
|
408
|
+
}
|
|
409
|
+
/**
|
|
410
|
+
* Update an Import
|
|
411
|
+
* @param id The ID of the Import
|
|
412
|
+
* @param params The import update parameters
|
|
413
|
+
* @returns The updated Import
|
|
414
|
+
*/
|
|
415
|
+
async update(id, params) {
|
|
416
|
+
return this.request(`/v0/imports/${id}`, "PATCH", params);
|
|
417
|
+
}
|
|
418
|
+
/**
|
|
419
|
+
* Delete an Import
|
|
420
|
+
* @param id The ID of the Import
|
|
421
|
+
* @returns The deleted Import
|
|
422
|
+
*/
|
|
423
|
+
async delete(id) {
|
|
424
|
+
return this.request(`/v0/imports/${id}`, "DELETE");
|
|
425
|
+
}
|
|
426
|
+
/**
|
|
427
|
+
* Wait until an Import is completed or failed
|
|
428
|
+
* @param id The ID of the Import
|
|
429
|
+
* @param options Configuration options for timeout and polling
|
|
430
|
+
* @returns The Import once it reaches a final state (completed or failed)
|
|
431
|
+
* @throws Error if the Import does not complete within the timeout or fails
|
|
432
|
+
*/
|
|
433
|
+
async waitUntilCompleted(id, options) {
|
|
434
|
+
const timeout = options?.timeout ?? 30 * 60 * 1e3;
|
|
435
|
+
const pollInterval = options?.pollInterval ?? 2e3;
|
|
436
|
+
const onPoll = options?.onPoll;
|
|
437
|
+
const startTime = Date.now();
|
|
438
|
+
while (true) {
|
|
439
|
+
const importItem = await this.get(id);
|
|
440
|
+
if (onPoll) {
|
|
441
|
+
onPoll(importItem.status);
|
|
442
|
+
}
|
|
443
|
+
if (importItem.status === "completed" /* completed */) {
|
|
444
|
+
return importItem;
|
|
445
|
+
}
|
|
446
|
+
if (importItem.status === "failed" /* failed */) {
|
|
447
|
+
throw new ExaError(
|
|
448
|
+
`Import ${id} failed: ${importItem.failedMessage || "Unknown error"}`,
|
|
449
|
+
400 /* BadRequest */
|
|
450
|
+
);
|
|
451
|
+
}
|
|
452
|
+
if (Date.now() - startTime > timeout) {
|
|
453
|
+
throw new ExaError(
|
|
454
|
+
`Import ${id} did not complete within ${timeout}ms. Current status: ${importItem.status}`,
|
|
455
|
+
408 /* RequestTimeout */
|
|
456
|
+
);
|
|
457
|
+
}
|
|
458
|
+
await new Promise((resolve) => setTimeout(resolve, pollInterval));
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
};
|
|
462
|
+
|
|
158
463
|
// src/websets/items.ts
|
|
159
464
|
var WebsetItemsClient = class extends WebsetsBaseClient {
|
|
160
465
|
/**
|
|
@@ -320,116 +625,6 @@ var WebsetMonitorsClient = class extends WebsetsBaseClient {
|
|
|
320
625
|
}
|
|
321
626
|
};
|
|
322
627
|
|
|
323
|
-
// src/websets/openapi.ts
|
|
324
|
-
var CreateEnrichmentParametersFormat = /* @__PURE__ */ ((CreateEnrichmentParametersFormat2) => {
|
|
325
|
-
CreateEnrichmentParametersFormat2["text"] = "text";
|
|
326
|
-
CreateEnrichmentParametersFormat2["date"] = "date";
|
|
327
|
-
CreateEnrichmentParametersFormat2["number"] = "number";
|
|
328
|
-
CreateEnrichmentParametersFormat2["options"] = "options";
|
|
329
|
-
CreateEnrichmentParametersFormat2["email"] = "email";
|
|
330
|
-
CreateEnrichmentParametersFormat2["phone"] = "phone";
|
|
331
|
-
return CreateEnrichmentParametersFormat2;
|
|
332
|
-
})(CreateEnrichmentParametersFormat || {});
|
|
333
|
-
var EventType = /* @__PURE__ */ ((EventType2) => {
|
|
334
|
-
EventType2["webset_created"] = "webset.created";
|
|
335
|
-
EventType2["webset_deleted"] = "webset.deleted";
|
|
336
|
-
EventType2["webset_paused"] = "webset.paused";
|
|
337
|
-
EventType2["webset_idle"] = "webset.idle";
|
|
338
|
-
EventType2["webset_search_created"] = "webset.search.created";
|
|
339
|
-
EventType2["webset_search_canceled"] = "webset.search.canceled";
|
|
340
|
-
EventType2["webset_search_completed"] = "webset.search.completed";
|
|
341
|
-
EventType2["webset_search_updated"] = "webset.search.updated";
|
|
342
|
-
EventType2["webset_export_created"] = "webset.export.created";
|
|
343
|
-
EventType2["webset_export_completed"] = "webset.export.completed";
|
|
344
|
-
EventType2["webset_item_created"] = "webset.item.created";
|
|
345
|
-
EventType2["webset_item_enriched"] = "webset.item.enriched";
|
|
346
|
-
return EventType2;
|
|
347
|
-
})(EventType || {});
|
|
348
|
-
var MonitorObject = /* @__PURE__ */ ((MonitorObject2) => {
|
|
349
|
-
MonitorObject2["monitor"] = "monitor";
|
|
350
|
-
return MonitorObject2;
|
|
351
|
-
})(MonitorObject || {});
|
|
352
|
-
var MonitorStatus = /* @__PURE__ */ ((MonitorStatus2) => {
|
|
353
|
-
MonitorStatus2["enabled"] = "enabled";
|
|
354
|
-
MonitorStatus2["disabled"] = "disabled";
|
|
355
|
-
return MonitorStatus2;
|
|
356
|
-
})(MonitorStatus || {});
|
|
357
|
-
var MonitorRunObject = /* @__PURE__ */ ((MonitorRunObject2) => {
|
|
358
|
-
MonitorRunObject2["monitor_run"] = "monitor_run";
|
|
359
|
-
return MonitorRunObject2;
|
|
360
|
-
})(MonitorRunObject || {});
|
|
361
|
-
var MonitorRunStatus = /* @__PURE__ */ ((MonitorRunStatus2) => {
|
|
362
|
-
MonitorRunStatus2["created"] = "created";
|
|
363
|
-
MonitorRunStatus2["running"] = "running";
|
|
364
|
-
MonitorRunStatus2["completed"] = "completed";
|
|
365
|
-
MonitorRunStatus2["canceled"] = "canceled";
|
|
366
|
-
return MonitorRunStatus2;
|
|
367
|
-
})(MonitorRunStatus || {});
|
|
368
|
-
var MonitorRunType = /* @__PURE__ */ ((MonitorRunType2) => {
|
|
369
|
-
MonitorRunType2["search"] = "search";
|
|
370
|
-
MonitorRunType2["refresh"] = "refresh";
|
|
371
|
-
return MonitorRunType2;
|
|
372
|
-
})(MonitorRunType || {});
|
|
373
|
-
var UpdateMonitorStatus = /* @__PURE__ */ ((UpdateMonitorStatus2) => {
|
|
374
|
-
UpdateMonitorStatus2["enabled"] = "enabled";
|
|
375
|
-
UpdateMonitorStatus2["disabled"] = "disabled";
|
|
376
|
-
return UpdateMonitorStatus2;
|
|
377
|
-
})(UpdateMonitorStatus || {});
|
|
378
|
-
var WebhookStatus = /* @__PURE__ */ ((WebhookStatus2) => {
|
|
379
|
-
WebhookStatus2["active"] = "active";
|
|
380
|
-
WebhookStatus2["inactive"] = "inactive";
|
|
381
|
-
return WebhookStatus2;
|
|
382
|
-
})(WebhookStatus || {});
|
|
383
|
-
var WebsetStatus = /* @__PURE__ */ ((WebsetStatus2) => {
|
|
384
|
-
WebsetStatus2["idle"] = "idle";
|
|
385
|
-
WebsetStatus2["running"] = "running";
|
|
386
|
-
WebsetStatus2["paused"] = "paused";
|
|
387
|
-
return WebsetStatus2;
|
|
388
|
-
})(WebsetStatus || {});
|
|
389
|
-
var WebsetEnrichmentStatus = /* @__PURE__ */ ((WebsetEnrichmentStatus2) => {
|
|
390
|
-
WebsetEnrichmentStatus2["pending"] = "pending";
|
|
391
|
-
WebsetEnrichmentStatus2["canceled"] = "canceled";
|
|
392
|
-
WebsetEnrichmentStatus2["completed"] = "completed";
|
|
393
|
-
return WebsetEnrichmentStatus2;
|
|
394
|
-
})(WebsetEnrichmentStatus || {});
|
|
395
|
-
var WebsetEnrichmentFormat = /* @__PURE__ */ ((WebsetEnrichmentFormat2) => {
|
|
396
|
-
WebsetEnrichmentFormat2["text"] = "text";
|
|
397
|
-
WebsetEnrichmentFormat2["date"] = "date";
|
|
398
|
-
WebsetEnrichmentFormat2["number"] = "number";
|
|
399
|
-
WebsetEnrichmentFormat2["options"] = "options";
|
|
400
|
-
WebsetEnrichmentFormat2["email"] = "email";
|
|
401
|
-
WebsetEnrichmentFormat2["phone"] = "phone";
|
|
402
|
-
return WebsetEnrichmentFormat2;
|
|
403
|
-
})(WebsetEnrichmentFormat || {});
|
|
404
|
-
var WebsetItemSource = /* @__PURE__ */ ((WebsetItemSource2) => {
|
|
405
|
-
WebsetItemSource2["search"] = "search";
|
|
406
|
-
WebsetItemSource2["import"] = "import";
|
|
407
|
-
return WebsetItemSource2;
|
|
408
|
-
})(WebsetItemSource || {});
|
|
409
|
-
var WebsetItemEvaluationSatisfied = /* @__PURE__ */ ((WebsetItemEvaluationSatisfied2) => {
|
|
410
|
-
WebsetItemEvaluationSatisfied2["yes"] = "yes";
|
|
411
|
-
WebsetItemEvaluationSatisfied2["no"] = "no";
|
|
412
|
-
WebsetItemEvaluationSatisfied2["unclear"] = "unclear";
|
|
413
|
-
return WebsetItemEvaluationSatisfied2;
|
|
414
|
-
})(WebsetItemEvaluationSatisfied || {});
|
|
415
|
-
var WebsetSearchStatus = /* @__PURE__ */ ((WebsetSearchStatus2) => {
|
|
416
|
-
WebsetSearchStatus2["created"] = "created";
|
|
417
|
-
WebsetSearchStatus2["running"] = "running";
|
|
418
|
-
WebsetSearchStatus2["completed"] = "completed";
|
|
419
|
-
WebsetSearchStatus2["canceled"] = "canceled";
|
|
420
|
-
return WebsetSearchStatus2;
|
|
421
|
-
})(WebsetSearchStatus || {});
|
|
422
|
-
var WebsetSearchBehavior = /* @__PURE__ */ ((WebsetSearchBehavior2) => {
|
|
423
|
-
WebsetSearchBehavior2["override"] = "override";
|
|
424
|
-
WebsetSearchBehavior2["append"] = "append";
|
|
425
|
-
return WebsetSearchBehavior2;
|
|
426
|
-
})(WebsetSearchBehavior || {});
|
|
427
|
-
var WebsetSearchCanceledReason = /* @__PURE__ */ ((WebsetSearchCanceledReason2) => {
|
|
428
|
-
WebsetSearchCanceledReason2["webset_deleted"] = "webset_deleted";
|
|
429
|
-
WebsetSearchCanceledReason2["webset_canceled"] = "webset_canceled";
|
|
430
|
-
return WebsetSearchCanceledReason2;
|
|
431
|
-
})(WebsetSearchCanceledReason || {});
|
|
432
|
-
|
|
433
628
|
// src/websets/searches.ts
|
|
434
629
|
var WebsetSearchesClient = class extends WebsetsBaseClient {
|
|
435
630
|
/**
|
|
@@ -616,6 +811,7 @@ var WebsetsClient = class extends WebsetsBaseClient {
|
|
|
616
811
|
constructor(client) {
|
|
617
812
|
super(client);
|
|
618
813
|
this.events = new EventsClient(client);
|
|
814
|
+
this.imports = new ImportsClient(client);
|
|
619
815
|
this.items = new WebsetItemsClient(client);
|
|
620
816
|
this.searches = new WebsetSearchesClient(client);
|
|
621
817
|
this.enrichments = new WebsetEnrichmentsClient(client);
|
|
@@ -942,7 +1138,7 @@ var ResearchClient = class extends ResearchBaseClient {
|
|
|
942
1138
|
};
|
|
943
1139
|
|
|
944
1140
|
// src/index.ts
|
|
945
|
-
var fetchImpl = typeof global !== "undefined" && global.fetch ? global.fetch :
|
|
1141
|
+
var fetchImpl = typeof global !== "undefined" && global.fetch ? global.fetch : fetch2;
|
|
946
1142
|
var HeadersImpl = typeof global !== "undefined" && global.Headers ? global.Headers : Headers;
|
|
947
1143
|
var Exa2 = class {
|
|
948
1144
|
/**
|
|
@@ -1380,11 +1576,20 @@ var Exa2 = class {
|
|
|
1380
1576
|
var index_default = Exa2;
|
|
1381
1577
|
export {
|
|
1382
1578
|
CreateEnrichmentParametersFormat,
|
|
1579
|
+
CreateImportParametersFormat,
|
|
1580
|
+
CreateWebsetParametersImportSource,
|
|
1581
|
+
CreateWebsetParametersSearchExcludeSource,
|
|
1582
|
+
CreateWebsetSearchParametersExcludeSource,
|
|
1383
1583
|
EventType,
|
|
1384
1584
|
EventsClient,
|
|
1385
1585
|
Exa2 as Exa,
|
|
1386
1586
|
ExaError,
|
|
1387
1587
|
HttpStatusCode,
|
|
1588
|
+
ImportFailedReason,
|
|
1589
|
+
ImportFormat,
|
|
1590
|
+
ImportObject,
|
|
1591
|
+
ImportStatus,
|
|
1592
|
+
ImportsClient,
|
|
1388
1593
|
MonitorObject,
|
|
1389
1594
|
MonitorRunObject,
|
|
1390
1595
|
MonitorRunStatus,
|