exa-js 1.8.1 → 1.8.4

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.mjs CHANGED
@@ -232,6 +232,94 @@ var WebsetItemsClient = class extends WebsetsBaseClient {
232
232
  }
233
233
  };
234
234
 
235
+ // src/websets/monitors.ts
236
+ var WebsetMonitorRunsClient = class extends WebsetsBaseClient {
237
+ /**
238
+ * List all runs for a Monitor
239
+ * @param monitorId The ID of the Monitor
240
+ * @param options Pagination options
241
+ * @returns The list of Monitor runs
242
+ */
243
+ async list(monitorId, options) {
244
+ const params = this.buildPaginationParams(options);
245
+ return this.request(
246
+ `/v0/monitors/${monitorId}/runs`,
247
+ "GET",
248
+ void 0,
249
+ params
250
+ );
251
+ }
252
+ /**
253
+ * Get a specific Monitor run
254
+ * @param monitorId The ID of the Monitor
255
+ * @param runId The ID of the Monitor run
256
+ * @returns The Monitor run
257
+ */
258
+ async get(monitorId, runId) {
259
+ return this.request(
260
+ `/v0/monitors/${monitorId}/runs/${runId}`,
261
+ "GET"
262
+ );
263
+ }
264
+ };
265
+ var WebsetMonitorsClient = class extends WebsetsBaseClient {
266
+ constructor(client) {
267
+ super(client);
268
+ this.runs = new WebsetMonitorRunsClient(client);
269
+ }
270
+ /**
271
+ * Create a Monitor
272
+ * @param params The monitor parameters
273
+ * @returns The created Monitor
274
+ */
275
+ async create(params) {
276
+ return this.request("/v0/monitors", "POST", params);
277
+ }
278
+ /**
279
+ * Get a Monitor by ID
280
+ * @param id The ID of the Monitor
281
+ * @returns The Monitor
282
+ */
283
+ async get(id) {
284
+ return this.request(`/v0/monitors/${id}`, "GET");
285
+ }
286
+ /**
287
+ * List all Monitors
288
+ * @param options Pagination and filtering options
289
+ * @returns The list of Monitors
290
+ */
291
+ async list(options) {
292
+ const params = {
293
+ cursor: options?.cursor,
294
+ limit: options?.limit,
295
+ websetId: options?.websetId
296
+ };
297
+ return this.request(
298
+ "/v0/monitors",
299
+ "GET",
300
+ void 0,
301
+ params
302
+ );
303
+ }
304
+ /**
305
+ * Update a Monitor
306
+ * @param id The ID of the Monitor
307
+ * @param params The monitor update parameters (status, metadata)
308
+ * @returns The updated Monitor
309
+ */
310
+ async update(id, params) {
311
+ return this.request(`/v0/monitors/${id}`, "PATCH", params);
312
+ }
313
+ /**
314
+ * Delete a Monitor
315
+ * @param id The ID of the Monitor
316
+ * @returns The deleted Monitor
317
+ */
318
+ async delete(id) {
319
+ return this.request(`/v0/monitors/${id}`, "DELETE");
320
+ }
321
+ };
322
+
235
323
  // src/websets/openapi.ts
236
324
  var CreateEnrichmentParametersFormat = /* @__PURE__ */ ((CreateEnrichmentParametersFormat2) => {
237
325
  CreateEnrichmentParametersFormat2["text"] = "text";
@@ -257,11 +345,36 @@ var EventType = /* @__PURE__ */ ((EventType2) => {
257
345
  EventType2["webset_item_enriched"] = "webset.item.enriched";
258
346
  return EventType2;
259
347
  })(EventType || {});
260
- var UpdateStreamStatus = /* @__PURE__ */ ((UpdateStreamStatus2) => {
261
- UpdateStreamStatus2["open"] = "open";
262
- UpdateStreamStatus2["closed"] = "closed";
263
- return UpdateStreamStatus2;
264
- })(UpdateStreamStatus || {});
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 || {});
265
378
  var WebhookStatus = /* @__PURE__ */ ((WebhookStatus2) => {
266
379
  WebhookStatus2["active"] = "active";
267
380
  WebhookStatus2["inactive"] = "inactive";
@@ -358,94 +471,6 @@ var WebsetSearchesClient = class extends WebsetsBaseClient {
358
471
  }
359
472
  };
360
473
 
361
- // src/websets/streams.ts
362
- var WebsetStreamRunsClient = class extends WebsetsBaseClient {
363
- /**
364
- * List all runs for a Stream
365
- * @param streamId The ID of the Stream
366
- * @param options Pagination options
367
- * @returns The list of Stream runs
368
- */
369
- async list(streamId, options) {
370
- const params = this.buildPaginationParams(options);
371
- return this.request(
372
- `/v0/streams/${streamId}/runs`,
373
- "GET",
374
- void 0,
375
- params
376
- );
377
- }
378
- /**
379
- * Get a specific Stream run
380
- * @param streamId The ID of the Stream
381
- * @param runId The ID of the Stream run
382
- * @returns The Stream run
383
- */
384
- async get(streamId, runId) {
385
- return this.request(
386
- `/v0/streams/${streamId}/runs/${runId}`,
387
- "GET"
388
- );
389
- }
390
- };
391
- var WebsetStreamsClient = class extends WebsetsBaseClient {
392
- constructor(client) {
393
- super(client);
394
- this.runs = new WebsetStreamRunsClient(client);
395
- }
396
- /**
397
- * Create a Stream
398
- * @param params The stream parameters
399
- * @returns The created Stream
400
- */
401
- async create(params) {
402
- return this.request("/v0/streams", "POST", params);
403
- }
404
- /**
405
- * Get a Stream by ID
406
- * @param id The ID of the Stream
407
- * @returns The Stream
408
- */
409
- async get(id) {
410
- return this.request(`/v0/streams/${id}`, "GET");
411
- }
412
- /**
413
- * List all Streams
414
- * @param options Pagination and filtering options
415
- * @returns The list of Streams
416
- */
417
- async list(options) {
418
- const params = {
419
- cursor: options?.cursor,
420
- limit: options?.limit,
421
- websetId: options?.websetId
422
- };
423
- return this.request(
424
- "/v0/streams",
425
- "GET",
426
- void 0,
427
- params
428
- );
429
- }
430
- /**
431
- * Update a Stream
432
- * @param id The ID of the Stream
433
- * @param params The stream update parameters (status, metadata)
434
- * @returns The updated Stream
435
- */
436
- async update(id, params) {
437
- return this.request(`/v0/streams/${id}`, "PATCH", params);
438
- }
439
- /**
440
- * Delete a Stream
441
- * @param id The ID of the Stream
442
- * @returns The deleted Stream
443
- */
444
- async delete(id) {
445
- return this.request(`/v0/streams/${id}`, "DELETE");
446
- }
447
- };
448
-
449
474
  // src/websets/webhooks.ts
450
475
  var WebsetWebhooksClient = class extends WebsetsBaseClient {
451
476
  /**
@@ -594,7 +619,7 @@ var WebsetsClient = class extends WebsetsBaseClient {
594
619
  this.items = new WebsetItemsClient(client);
595
620
  this.searches = new WebsetSearchesClient(client);
596
621
  this.enrichments = new WebsetEnrichmentsClient(client);
597
- this.streams = new WebsetStreamsClient(client);
622
+ this.monitors = new WebsetMonitorsClient(client);
598
623
  this.webhooks = new WebsetWebhooksClient(client);
599
624
  }
600
625
  /**
@@ -888,6 +913,7 @@ var Exa2 = class {
888
913
  extras,
889
914
  livecrawl,
890
915
  livecrawlTimeout,
916
+ context,
891
917
  ...rest
892
918
  } = options;
893
919
  const contentsOptions = {};
@@ -904,6 +930,7 @@ var Exa2 = class {
904
930
  if (livecrawl !== void 0) contentsOptions.livecrawl = livecrawl;
905
931
  if (livecrawlTimeout !== void 0)
906
932
  contentsOptions.livecrawlTimeout = livecrawlTimeout;
933
+ if (context !== void 0) contentsOptions.context = context;
907
934
  return {
908
935
  contentsOptions,
909
936
  restOptions: rest
@@ -1287,13 +1314,19 @@ var index_default = Exa2;
1287
1314
  export {
1288
1315
  CreateEnrichmentParametersFormat,
1289
1316
  EventType,
1317
+ EventsClient,
1290
1318
  Exa2 as Exa,
1291
1319
  ExaError,
1292
1320
  HttpStatusCode,
1321
+ MonitorObject,
1322
+ MonitorRunObject,
1323
+ MonitorRunStatus,
1324
+ MonitorRunType,
1325
+ MonitorStatus,
1293
1326
  ResearchClient,
1294
1327
  ResearchCreateTaskRequestDtoModel as ResearchModel,
1295
1328
  ResearchTaskDtoStatus as ResearchStatus,
1296
- UpdateStreamStatus,
1329
+ UpdateMonitorStatus,
1297
1330
  WebhookStatus,
1298
1331
  WebsetEnrichmentFormat,
1299
1332
  WebsetEnrichmentStatus,
@@ -1301,12 +1334,12 @@ export {
1301
1334
  WebsetItemEvaluationSatisfied,
1302
1335
  WebsetItemSource,
1303
1336
  WebsetItemsClient,
1337
+ WebsetMonitorsClient,
1304
1338
  WebsetSearchBehavior,
1305
1339
  WebsetSearchCanceledReason,
1306
1340
  WebsetSearchStatus,
1307
1341
  WebsetSearchesClient,
1308
1342
  WebsetStatus,
1309
- WebsetStreamsClient,
1310
1343
  WebsetWebhooksClient,
1311
1344
  WebsetsClient,
1312
1345
  index_default as default