@corsair-dev/exa 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.
Files changed (47) hide show
  1. package/LICENSE +191 -0
  2. package/dist/client.d.ts +10 -0
  3. package/dist/client.d.ts.map +1 -0
  4. package/dist/endpoints/answer.d.ts +3 -0
  5. package/dist/endpoints/answer.d.ts.map +1 -0
  6. package/dist/endpoints/contents.d.ts +3 -0
  7. package/dist/endpoints/contents.d.ts.map +1 -0
  8. package/dist/endpoints/events.d.ts +4 -0
  9. package/dist/endpoints/events.d.ts.map +1 -0
  10. package/dist/endpoints/imports.d.ts +5 -0
  11. package/dist/endpoints/imports.d.ts.map +1 -0
  12. package/dist/endpoints/index.d.ts +360 -0
  13. package/dist/endpoints/index.d.ts.map +1 -0
  14. package/dist/endpoints/monitors.d.ts +3 -0
  15. package/dist/endpoints/monitors.d.ts.map +1 -0
  16. package/dist/endpoints/search.d.ts +4 -0
  17. package/dist/endpoints/search.d.ts.map +1 -0
  18. package/dist/endpoints/types.d.ts +2829 -0
  19. package/dist/endpoints/types.d.ts.map +1 -0
  20. package/dist/endpoints/webhooks-api.d.ts +3 -0
  21. package/dist/endpoints/webhooks-api.d.ts.map +1 -0
  22. package/dist/endpoints/websets.d.ts +5 -0
  23. package/dist/endpoints/websets.d.ts.map +1 -0
  24. package/dist/error-handlers.d.ts +46 -0
  25. package/dist/error-handlers.d.ts.map +1 -0
  26. package/dist/index.d.ts +1659 -0
  27. package/dist/index.d.ts.map +1 -0
  28. package/dist/index.js +1 -0
  29. package/dist/schema/database.d.ts +146 -0
  30. package/dist/schema/database.d.ts.map +1 -0
  31. package/dist/schema/index.d.ts +144 -0
  32. package/dist/schema/index.d.ts.map +1 -0
  33. package/dist/tsup.config.d.ts +3 -0
  34. package/dist/tsup.config.d.ts.map +1 -0
  35. package/dist/webhooks/content-indexed.d.ts +3 -0
  36. package/dist/webhooks/content-indexed.d.ts.map +1 -0
  37. package/dist/webhooks/index.d.ts +162 -0
  38. package/dist/webhooks/index.d.ts.map +1 -0
  39. package/dist/webhooks/search-alert.d.ts +3 -0
  40. package/dist/webhooks/search-alert.d.ts.map +1 -0
  41. package/dist/webhooks/types.d.ts +626 -0
  42. package/dist/webhooks/types.d.ts.map +1 -0
  43. package/dist/webhooks/webset-items-found.d.ts +3 -0
  44. package/dist/webhooks/webset-items-found.d.ts.map +1 -0
  45. package/dist/webhooks/webset-search-completed.d.ts +3 -0
  46. package/dist/webhooks/webset-search-completed.d.ts.map +1 -0
  47. package/package.json +40 -0
@@ -0,0 +1,626 @@
1
+ import { z } from 'zod';
2
+ import type { CorsairWebhookMatcher, WebhookRequest } from 'corsair/core';
3
+ export declare const ExaSearchAlertPayloadSchema: z.ZodObject<{
4
+ type: z.ZodLiteral<"search.alert">;
5
+ id: z.ZodString;
6
+ created_at: z.ZodString;
7
+ data: z.ZodObject<{
8
+ query: z.ZodString;
9
+ results: z.ZodArray<z.ZodObject<{
10
+ id: z.ZodString;
11
+ url: z.ZodString;
12
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13
+ publishedDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14
+ author: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15
+ score: z.ZodOptional<z.ZodNumber>;
16
+ text: z.ZodOptional<z.ZodString>;
17
+ highlights: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
18
+ summary: z.ZodOptional<z.ZodString>;
19
+ }, "strip", z.ZodTypeAny, {
20
+ id: string;
21
+ url: string;
22
+ text?: string | undefined;
23
+ highlights?: string[] | undefined;
24
+ summary?: string | undefined;
25
+ title?: string | null | undefined;
26
+ publishedDate?: string | null | undefined;
27
+ author?: string | null | undefined;
28
+ score?: number | undefined;
29
+ }, {
30
+ id: string;
31
+ url: string;
32
+ text?: string | undefined;
33
+ highlights?: string[] | undefined;
34
+ summary?: string | undefined;
35
+ title?: string | null | undefined;
36
+ publishedDate?: string | null | undefined;
37
+ author?: string | null | undefined;
38
+ score?: number | undefined;
39
+ }>, "many">;
40
+ }, "strip", z.ZodTypeAny, {
41
+ query: string;
42
+ results: {
43
+ id: string;
44
+ url: string;
45
+ text?: string | undefined;
46
+ highlights?: string[] | undefined;
47
+ summary?: string | undefined;
48
+ title?: string | null | undefined;
49
+ publishedDate?: string | null | undefined;
50
+ author?: string | null | undefined;
51
+ score?: number | undefined;
52
+ }[];
53
+ }, {
54
+ query: string;
55
+ results: {
56
+ id: string;
57
+ url: string;
58
+ text?: string | undefined;
59
+ highlights?: string[] | undefined;
60
+ summary?: string | undefined;
61
+ title?: string | null | undefined;
62
+ publishedDate?: string | null | undefined;
63
+ author?: string | null | undefined;
64
+ score?: number | undefined;
65
+ }[];
66
+ }>;
67
+ }, "strip", z.ZodTypeAny, {
68
+ id: string;
69
+ created_at: string;
70
+ type: "search.alert";
71
+ data: {
72
+ query: string;
73
+ results: {
74
+ id: string;
75
+ url: string;
76
+ text?: string | undefined;
77
+ highlights?: string[] | undefined;
78
+ summary?: string | undefined;
79
+ title?: string | null | undefined;
80
+ publishedDate?: string | null | undefined;
81
+ author?: string | null | undefined;
82
+ score?: number | undefined;
83
+ }[];
84
+ };
85
+ }, {
86
+ id: string;
87
+ created_at: string;
88
+ type: "search.alert";
89
+ data: {
90
+ query: string;
91
+ results: {
92
+ id: string;
93
+ url: string;
94
+ text?: string | undefined;
95
+ highlights?: string[] | undefined;
96
+ summary?: string | undefined;
97
+ title?: string | null | undefined;
98
+ publishedDate?: string | null | undefined;
99
+ author?: string | null | undefined;
100
+ score?: number | undefined;
101
+ }[];
102
+ };
103
+ }>;
104
+ export declare const ExaContentIndexedPayloadSchema: z.ZodObject<{
105
+ type: z.ZodLiteral<"content.indexed">;
106
+ id: z.ZodString;
107
+ created_at: z.ZodString;
108
+ data: z.ZodObject<{
109
+ url: z.ZodString;
110
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
111
+ publishedDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
112
+ author: z.ZodOptional<z.ZodNullable<z.ZodString>>;
113
+ }, "strip", z.ZodTypeAny, {
114
+ url: string;
115
+ title?: string | null | undefined;
116
+ publishedDate?: string | null | undefined;
117
+ author?: string | null | undefined;
118
+ }, {
119
+ url: string;
120
+ title?: string | null | undefined;
121
+ publishedDate?: string | null | undefined;
122
+ author?: string | null | undefined;
123
+ }>;
124
+ }, "strip", z.ZodTypeAny, {
125
+ id: string;
126
+ created_at: string;
127
+ type: "content.indexed";
128
+ data: {
129
+ url: string;
130
+ title?: string | null | undefined;
131
+ publishedDate?: string | null | undefined;
132
+ author?: string | null | undefined;
133
+ };
134
+ }, {
135
+ id: string;
136
+ created_at: string;
137
+ type: "content.indexed";
138
+ data: {
139
+ url: string;
140
+ title?: string | null | undefined;
141
+ publishedDate?: string | null | undefined;
142
+ author?: string | null | undefined;
143
+ };
144
+ }>;
145
+ export declare const ExaWebsetItemsFoundPayloadSchema: z.ZodObject<{
146
+ type: z.ZodLiteral<"webset.items_found">;
147
+ id: z.ZodString;
148
+ created_at: z.ZodString;
149
+ data: z.ZodObject<{
150
+ webset: z.ZodObject<{
151
+ id: z.ZodString;
152
+ object: z.ZodLiteral<"webset">;
153
+ status: z.ZodEnum<["idle", "running", "paused", "done"]>;
154
+ externalId: z.ZodOptional<z.ZodString>;
155
+ createdAt: z.ZodString;
156
+ updatedAt: z.ZodString;
157
+ }, "strip", z.ZodTypeAny, {
158
+ object: "webset";
159
+ id: string;
160
+ status: "idle" | "running" | "paused" | "done";
161
+ createdAt: string;
162
+ updatedAt: string;
163
+ externalId?: string | undefined;
164
+ }, {
165
+ object: "webset";
166
+ id: string;
167
+ status: "idle" | "running" | "paused" | "done";
168
+ createdAt: string;
169
+ updatedAt: string;
170
+ externalId?: string | undefined;
171
+ }>;
172
+ items: z.ZodArray<z.ZodObject<{
173
+ id: z.ZodString;
174
+ url: z.ZodString;
175
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
176
+ publishedDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
177
+ author: z.ZodOptional<z.ZodNullable<z.ZodString>>;
178
+ score: z.ZodOptional<z.ZodNumber>;
179
+ text: z.ZodOptional<z.ZodString>;
180
+ highlights: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
181
+ summary: z.ZodOptional<z.ZodString>;
182
+ }, "strip", z.ZodTypeAny, {
183
+ id: string;
184
+ url: string;
185
+ text?: string | undefined;
186
+ highlights?: string[] | undefined;
187
+ summary?: string | undefined;
188
+ title?: string | null | undefined;
189
+ publishedDate?: string | null | undefined;
190
+ author?: string | null | undefined;
191
+ score?: number | undefined;
192
+ }, {
193
+ id: string;
194
+ url: string;
195
+ text?: string | undefined;
196
+ highlights?: string[] | undefined;
197
+ summary?: string | undefined;
198
+ title?: string | null | undefined;
199
+ publishedDate?: string | null | undefined;
200
+ author?: string | null | undefined;
201
+ score?: number | undefined;
202
+ }>, "many">;
203
+ itemCount: z.ZodOptional<z.ZodNumber>;
204
+ }, "strip", z.ZodTypeAny, {
205
+ webset: {
206
+ object: "webset";
207
+ id: string;
208
+ status: "idle" | "running" | "paused" | "done";
209
+ createdAt: string;
210
+ updatedAt: string;
211
+ externalId?: string | undefined;
212
+ };
213
+ items: {
214
+ id: string;
215
+ url: string;
216
+ text?: string | undefined;
217
+ highlights?: string[] | undefined;
218
+ summary?: string | undefined;
219
+ title?: string | null | undefined;
220
+ publishedDate?: string | null | undefined;
221
+ author?: string | null | undefined;
222
+ score?: number | undefined;
223
+ }[];
224
+ itemCount?: number | undefined;
225
+ }, {
226
+ webset: {
227
+ object: "webset";
228
+ id: string;
229
+ status: "idle" | "running" | "paused" | "done";
230
+ createdAt: string;
231
+ updatedAt: string;
232
+ externalId?: string | undefined;
233
+ };
234
+ items: {
235
+ id: string;
236
+ url: string;
237
+ text?: string | undefined;
238
+ highlights?: string[] | undefined;
239
+ summary?: string | undefined;
240
+ title?: string | null | undefined;
241
+ publishedDate?: string | null | undefined;
242
+ author?: string | null | undefined;
243
+ score?: number | undefined;
244
+ }[];
245
+ itemCount?: number | undefined;
246
+ }>;
247
+ }, "strip", z.ZodTypeAny, {
248
+ id: string;
249
+ created_at: string;
250
+ type: "webset.items_found";
251
+ data: {
252
+ webset: {
253
+ object: "webset";
254
+ id: string;
255
+ status: "idle" | "running" | "paused" | "done";
256
+ createdAt: string;
257
+ updatedAt: string;
258
+ externalId?: string | undefined;
259
+ };
260
+ items: {
261
+ id: string;
262
+ url: string;
263
+ text?: string | undefined;
264
+ highlights?: string[] | undefined;
265
+ summary?: string | undefined;
266
+ title?: string | null | undefined;
267
+ publishedDate?: string | null | undefined;
268
+ author?: string | null | undefined;
269
+ score?: number | undefined;
270
+ }[];
271
+ itemCount?: number | undefined;
272
+ };
273
+ }, {
274
+ id: string;
275
+ created_at: string;
276
+ type: "webset.items_found";
277
+ data: {
278
+ webset: {
279
+ object: "webset";
280
+ id: string;
281
+ status: "idle" | "running" | "paused" | "done";
282
+ createdAt: string;
283
+ updatedAt: string;
284
+ externalId?: string | undefined;
285
+ };
286
+ items: {
287
+ id: string;
288
+ url: string;
289
+ text?: string | undefined;
290
+ highlights?: string[] | undefined;
291
+ summary?: string | undefined;
292
+ title?: string | null | undefined;
293
+ publishedDate?: string | null | undefined;
294
+ author?: string | null | undefined;
295
+ score?: number | undefined;
296
+ }[];
297
+ itemCount?: number | undefined;
298
+ };
299
+ }>;
300
+ export declare const ExaWebsetSearchCompletedPayloadSchema: z.ZodObject<{
301
+ type: z.ZodLiteral<"webset.search.completed">;
302
+ id: z.ZodString;
303
+ created_at: z.ZodString;
304
+ data: z.ZodObject<{
305
+ webset: z.ZodObject<{
306
+ id: z.ZodString;
307
+ object: z.ZodLiteral<"webset">;
308
+ status: z.ZodEnum<["idle", "running", "paused", "done"]>;
309
+ externalId: z.ZodOptional<z.ZodString>;
310
+ createdAt: z.ZodString;
311
+ updatedAt: z.ZodString;
312
+ }, "strip", z.ZodTypeAny, {
313
+ object: "webset";
314
+ id: string;
315
+ status: "idle" | "running" | "paused" | "done";
316
+ createdAt: string;
317
+ updatedAt: string;
318
+ externalId?: string | undefined;
319
+ }, {
320
+ object: "webset";
321
+ id: string;
322
+ status: "idle" | "running" | "paused" | "done";
323
+ createdAt: string;
324
+ updatedAt: string;
325
+ externalId?: string | undefined;
326
+ }>;
327
+ totalItems: z.ZodOptional<z.ZodNumber>;
328
+ }, "strip", z.ZodTypeAny, {
329
+ webset: {
330
+ object: "webset";
331
+ id: string;
332
+ status: "idle" | "running" | "paused" | "done";
333
+ createdAt: string;
334
+ updatedAt: string;
335
+ externalId?: string | undefined;
336
+ };
337
+ totalItems?: number | undefined;
338
+ }, {
339
+ webset: {
340
+ object: "webset";
341
+ id: string;
342
+ status: "idle" | "running" | "paused" | "done";
343
+ createdAt: string;
344
+ updatedAt: string;
345
+ externalId?: string | undefined;
346
+ };
347
+ totalItems?: number | undefined;
348
+ }>;
349
+ }, "strip", z.ZodTypeAny, {
350
+ id: string;
351
+ created_at: string;
352
+ type: "webset.search.completed";
353
+ data: {
354
+ webset: {
355
+ object: "webset";
356
+ id: string;
357
+ status: "idle" | "running" | "paused" | "done";
358
+ createdAt: string;
359
+ updatedAt: string;
360
+ externalId?: string | undefined;
361
+ };
362
+ totalItems?: number | undefined;
363
+ };
364
+ }, {
365
+ id: string;
366
+ created_at: string;
367
+ type: "webset.search.completed";
368
+ data: {
369
+ webset: {
370
+ object: "webset";
371
+ id: string;
372
+ status: "idle" | "running" | "paused" | "done";
373
+ createdAt: string;
374
+ updatedAt: string;
375
+ externalId?: string | undefined;
376
+ };
377
+ totalItems?: number | undefined;
378
+ };
379
+ }>;
380
+ export declare const SearchAlertEventSchema: z.ZodObject<{
381
+ query: z.ZodString;
382
+ results: z.ZodArray<z.ZodObject<{
383
+ id: z.ZodString;
384
+ url: z.ZodString;
385
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
386
+ publishedDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
387
+ author: z.ZodOptional<z.ZodNullable<z.ZodString>>;
388
+ score: z.ZodOptional<z.ZodNumber>;
389
+ text: z.ZodOptional<z.ZodString>;
390
+ highlights: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
391
+ summary: z.ZodOptional<z.ZodString>;
392
+ }, "strip", z.ZodTypeAny, {
393
+ id: string;
394
+ url: string;
395
+ text?: string | undefined;
396
+ highlights?: string[] | undefined;
397
+ summary?: string | undefined;
398
+ title?: string | null | undefined;
399
+ publishedDate?: string | null | undefined;
400
+ author?: string | null | undefined;
401
+ score?: number | undefined;
402
+ }, {
403
+ id: string;
404
+ url: string;
405
+ text?: string | undefined;
406
+ highlights?: string[] | undefined;
407
+ summary?: string | undefined;
408
+ title?: string | null | undefined;
409
+ publishedDate?: string | null | undefined;
410
+ author?: string | null | undefined;
411
+ score?: number | undefined;
412
+ }>, "many">;
413
+ triggeredAt: z.ZodString;
414
+ }, "strip", z.ZodTypeAny, {
415
+ query: string;
416
+ results: {
417
+ id: string;
418
+ url: string;
419
+ text?: string | undefined;
420
+ highlights?: string[] | undefined;
421
+ summary?: string | undefined;
422
+ title?: string | null | undefined;
423
+ publishedDate?: string | null | undefined;
424
+ author?: string | null | undefined;
425
+ score?: number | undefined;
426
+ }[];
427
+ triggeredAt: string;
428
+ }, {
429
+ query: string;
430
+ results: {
431
+ id: string;
432
+ url: string;
433
+ text?: string | undefined;
434
+ highlights?: string[] | undefined;
435
+ summary?: string | undefined;
436
+ title?: string | null | undefined;
437
+ publishedDate?: string | null | undefined;
438
+ author?: string | null | undefined;
439
+ score?: number | undefined;
440
+ }[];
441
+ triggeredAt: string;
442
+ }>;
443
+ export declare const ContentIndexedEventSchema: z.ZodObject<{
444
+ url: z.ZodString;
445
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
446
+ publishedDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
447
+ author: z.ZodOptional<z.ZodNullable<z.ZodString>>;
448
+ indexedAt: z.ZodString;
449
+ }, "strip", z.ZodTypeAny, {
450
+ url: string;
451
+ indexedAt: string;
452
+ title?: string | null | undefined;
453
+ publishedDate?: string | null | undefined;
454
+ author?: string | null | undefined;
455
+ }, {
456
+ url: string;
457
+ indexedAt: string;
458
+ title?: string | null | undefined;
459
+ publishedDate?: string | null | undefined;
460
+ author?: string | null | undefined;
461
+ }>;
462
+ export declare const WebsetItemsFoundEventSchema: z.ZodObject<{
463
+ webset: z.ZodObject<{
464
+ id: z.ZodString;
465
+ object: z.ZodLiteral<"webset">;
466
+ status: z.ZodEnum<["idle", "running", "paused", "done"]>;
467
+ externalId: z.ZodOptional<z.ZodString>;
468
+ createdAt: z.ZodString;
469
+ updatedAt: z.ZodString;
470
+ }, "strip", z.ZodTypeAny, {
471
+ object: "webset";
472
+ id: string;
473
+ status: "idle" | "running" | "paused" | "done";
474
+ createdAt: string;
475
+ updatedAt: string;
476
+ externalId?: string | undefined;
477
+ }, {
478
+ object: "webset";
479
+ id: string;
480
+ status: "idle" | "running" | "paused" | "done";
481
+ createdAt: string;
482
+ updatedAt: string;
483
+ externalId?: string | undefined;
484
+ }>;
485
+ items: z.ZodArray<z.ZodObject<{
486
+ id: z.ZodString;
487
+ url: z.ZodString;
488
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
489
+ publishedDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
490
+ author: z.ZodOptional<z.ZodNullable<z.ZodString>>;
491
+ score: z.ZodOptional<z.ZodNumber>;
492
+ text: z.ZodOptional<z.ZodString>;
493
+ highlights: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
494
+ summary: z.ZodOptional<z.ZodString>;
495
+ }, "strip", z.ZodTypeAny, {
496
+ id: string;
497
+ url: string;
498
+ text?: string | undefined;
499
+ highlights?: string[] | undefined;
500
+ summary?: string | undefined;
501
+ title?: string | null | undefined;
502
+ publishedDate?: string | null | undefined;
503
+ author?: string | null | undefined;
504
+ score?: number | undefined;
505
+ }, {
506
+ id: string;
507
+ url: string;
508
+ text?: string | undefined;
509
+ highlights?: string[] | undefined;
510
+ summary?: string | undefined;
511
+ title?: string | null | undefined;
512
+ publishedDate?: string | null | undefined;
513
+ author?: string | null | undefined;
514
+ score?: number | undefined;
515
+ }>, "many">;
516
+ itemCount: z.ZodOptional<z.ZodNumber>;
517
+ triggeredAt: z.ZodString;
518
+ }, "strip", z.ZodTypeAny, {
519
+ webset: {
520
+ object: "webset";
521
+ id: string;
522
+ status: "idle" | "running" | "paused" | "done";
523
+ createdAt: string;
524
+ updatedAt: string;
525
+ externalId?: string | undefined;
526
+ };
527
+ items: {
528
+ id: string;
529
+ url: string;
530
+ text?: string | undefined;
531
+ highlights?: string[] | undefined;
532
+ summary?: string | undefined;
533
+ title?: string | null | undefined;
534
+ publishedDate?: string | null | undefined;
535
+ author?: string | null | undefined;
536
+ score?: number | undefined;
537
+ }[];
538
+ triggeredAt: string;
539
+ itemCount?: number | undefined;
540
+ }, {
541
+ webset: {
542
+ object: "webset";
543
+ id: string;
544
+ status: "idle" | "running" | "paused" | "done";
545
+ createdAt: string;
546
+ updatedAt: string;
547
+ externalId?: string | undefined;
548
+ };
549
+ items: {
550
+ id: string;
551
+ url: string;
552
+ text?: string | undefined;
553
+ highlights?: string[] | undefined;
554
+ summary?: string | undefined;
555
+ title?: string | null | undefined;
556
+ publishedDate?: string | null | undefined;
557
+ author?: string | null | undefined;
558
+ score?: number | undefined;
559
+ }[];
560
+ triggeredAt: string;
561
+ itemCount?: number | undefined;
562
+ }>;
563
+ export declare const WebsetSearchCompletedEventSchema: z.ZodObject<{
564
+ webset: z.ZodObject<{
565
+ id: z.ZodString;
566
+ object: z.ZodLiteral<"webset">;
567
+ status: z.ZodEnum<["idle", "running", "paused", "done"]>;
568
+ externalId: z.ZodOptional<z.ZodString>;
569
+ createdAt: z.ZodString;
570
+ updatedAt: z.ZodString;
571
+ }, "strip", z.ZodTypeAny, {
572
+ object: "webset";
573
+ id: string;
574
+ status: "idle" | "running" | "paused" | "done";
575
+ createdAt: string;
576
+ updatedAt: string;
577
+ externalId?: string | undefined;
578
+ }, {
579
+ object: "webset";
580
+ id: string;
581
+ status: "idle" | "running" | "paused" | "done";
582
+ createdAt: string;
583
+ updatedAt: string;
584
+ externalId?: string | undefined;
585
+ }>;
586
+ totalItems: z.ZodOptional<z.ZodNumber>;
587
+ completedAt: z.ZodString;
588
+ }, "strip", z.ZodTypeAny, {
589
+ webset: {
590
+ object: "webset";
591
+ id: string;
592
+ status: "idle" | "running" | "paused" | "done";
593
+ createdAt: string;
594
+ updatedAt: string;
595
+ externalId?: string | undefined;
596
+ };
597
+ completedAt: string;
598
+ totalItems?: number | undefined;
599
+ }, {
600
+ webset: {
601
+ object: "webset";
602
+ id: string;
603
+ status: "idle" | "running" | "paused" | "done";
604
+ createdAt: string;
605
+ updatedAt: string;
606
+ externalId?: string | undefined;
607
+ };
608
+ completedAt: string;
609
+ totalItems?: number | undefined;
610
+ }>;
611
+ export type SearchAlertEvent = z.infer<typeof ExaSearchAlertPayloadSchema>;
612
+ export type ContentIndexedEvent = z.infer<typeof ExaContentIndexedPayloadSchema>;
613
+ export type WebsetItemsFoundEvent = z.infer<typeof ExaWebsetItemsFoundPayloadSchema>;
614
+ export type WebsetSearchCompletedEvent = z.infer<typeof ExaWebsetSearchCompletedPayloadSchema>;
615
+ export type ExaWebhookOutputs = {
616
+ searchAlert: SearchAlertEvent;
617
+ contentIndexed: ContentIndexedEvent;
618
+ websetItemsFound: WebsetItemsFoundEvent;
619
+ websetSearchCompleted: WebsetSearchCompletedEvent;
620
+ };
621
+ export declare function createExaEventMatch(eventType: string): CorsairWebhookMatcher;
622
+ export declare function verifyExaWebhookSignature(request: WebhookRequest<unknown>, secret: string | undefined): {
623
+ valid: boolean;
624
+ error?: string;
625
+ };
626
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../webhooks/types.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EACX,qBAAqB,EAErB,cAAc,EACd,MAAM,cAAc,CAAC;AA2BtB,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQtC,CAAC;AAEH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUzC,CAAC;AAEH,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAS3C,CAAC;AAEH,eAAO,MAAM,qCAAqC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQhD,CAAC;AAIH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIjC,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;EAMpC,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKtC,CAAC;AAEH,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAI3C,CAAC;AAIH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAC3E,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AACjF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AACrF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qCAAqC,CAAC,CAAC;AAE/F,MAAM,MAAM,iBAAiB,GAAG;IAC/B,WAAW,EAAE,gBAAgB,CAAC;IAC9B,cAAc,EAAE,mBAAmB,CAAC;IACpC,gBAAgB,EAAE,qBAAqB,CAAC;IACxC,qBAAqB,EAAE,0BAA0B,CAAC;CAClD,CAAC;AAUF,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,qBAAqB,CAM5E;AAID,wBAAgB,yBAAyB,CAExC,OAAO,EAAE,cAAc,CAAC,OAAO,CAAC,EAChC,MAAM,EAAE,MAAM,GAAG,SAAS,GACxB;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAiCpC"}
@@ -0,0 +1,3 @@
1
+ import type { ExaWebhooks } from '..';
2
+ export declare const websetItemsFound: ExaWebhooks['websetItemsFound'];
3
+ //# sourceMappingURL=webset-items-found.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webset-items-found.d.ts","sourceRoot":"","sources":["../../webhooks/webset-items-found.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,IAAI,CAAC;AAGtC,eAAO,MAAM,gBAAgB,EAAE,WAAW,CAAC,kBAAkB,CA0E5D,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { ExaWebhooks } from '..';
2
+ export declare const websetSearchCompleted: ExaWebhooks['websetSearchCompleted'];
3
+ //# sourceMappingURL=webset-search-completed.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webset-search-completed.d.ts","sourceRoot":"","sources":["../../webhooks/webset-search-completed.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,IAAI,CAAC;AAGtC,eAAO,MAAM,qBAAqB,EAAE,WAAW,CAAC,uBAAuB,CA2DtE,CAAC"}
package/package.json ADDED
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "@corsair-dev/exa",
3
+ "version": "0.1.0",
4
+ "description": "Exa plugin for Corsair",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "dev-source": "./index.ts",
12
+ "types": "./dist/index.d.ts",
13
+ "default": "./dist/index.js"
14
+ }
15
+ },
16
+ "peerDependencies": {
17
+ "corsair": ">=0.1.0",
18
+ "zod": "^3.0.0"
19
+ },
20
+ "devDependencies": {
21
+ "tsup": "^8.0.1",
22
+ "typescript": "^5.9.3",
23
+ "zod": "^3.25.76",
24
+ "corsair": "0.1.48"
25
+ },
26
+ "keywords": [
27
+ "corsair",
28
+ "exa",
29
+ "plugin"
30
+ ],
31
+ "author": "",
32
+ "license": "Apache-2.0",
33
+ "files": [
34
+ "dist"
35
+ ],
36
+ "scripts": {
37
+ "build": "rm -rf dist && tsc --build --force && tsup",
38
+ "typecheck": "tsc --noEmit"
39
+ }
40
+ }