@keystrokehq/exa 0.0.15 → 0.0.16-integration-id-canonicalization.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 +5 -0
- package/dist/contents.schema-BNgTB2DN.mjs +133 -0
- package/dist/credential-sets/index.d.mts +2 -0
- package/dist/credential-sets/index.mjs +3 -0
- package/dist/exa.credential-set-BGLENRlR.d.mts +14 -0
- package/dist/exa.credential-set-Ba-RsxL2.mjs +15 -0
- package/dist/index.d.mts +4 -1204
- package/dist/index.mjs +4 -577
- package/dist/operations/index.d.mts +2 -0
- package/dist/operations/index.mjs +3 -0
- package/dist/schemas/index.d.mts +2 -0
- package/dist/schemas/index.mjs +3 -0
- package/dist/search.schema-Cw-d91N6.d.mts +204 -0
- package/dist/update-monitor.operation-D-vWJFP3.mjs +478 -0
- package/dist/update-monitor.operation-Dm50YoS7.d.mts +570 -0
- package/package.json +16 -8
- package/dist/_official/index.d.mts +0 -2
- package/dist/_official/index.mjs +0 -3
- package/dist/integration-ByaB4Am0.mjs +0 -18
- package/dist/integration-Db0MsFXx.d.mts +0 -15
package/README.md
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# @keystrokehq/exa
|
|
2
|
+
|
|
3
|
+
Keystroke official integration for [Exa](https://exa.ai) — AI-native semantic web search, content extraction, and monitoring.
|
|
4
|
+
|
|
5
|
+
Credential sets live under [`./credential-sets`](./src/credential-sets/index.ts). Operations live under [`./operations`](./src/operations/index.ts).
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/schemas/common.schema.ts
|
|
4
|
+
const exaSearchResultSchema = z.object({
|
|
5
|
+
id: z.string(),
|
|
6
|
+
url: z.string(),
|
|
7
|
+
title: z.string().nullable(),
|
|
8
|
+
publishedDate: z.string().nullable().optional(),
|
|
9
|
+
author: z.string().nullable().optional(),
|
|
10
|
+
score: z.number().optional(),
|
|
11
|
+
image: z.string().nullable().optional(),
|
|
12
|
+
favicon: z.string().nullable().optional(),
|
|
13
|
+
text: z.string().optional(),
|
|
14
|
+
highlights: z.array(z.string()).optional(),
|
|
15
|
+
highlightScores: z.array(z.number()).optional(),
|
|
16
|
+
summary: z.string().optional(),
|
|
17
|
+
subpages: z.array(z.unknown()).optional(),
|
|
18
|
+
entities: z.array(z.unknown()).optional()
|
|
19
|
+
});
|
|
20
|
+
const exaCostSchema = z.record(z.string(), z.unknown());
|
|
21
|
+
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region src/schemas/answer.schema.ts
|
|
24
|
+
const exaAnswerCitationSchema = z.object({
|
|
25
|
+
id: z.string(),
|
|
26
|
+
url: z.string(),
|
|
27
|
+
title: z.string().nullable(),
|
|
28
|
+
author: z.string().nullable().optional(),
|
|
29
|
+
publishedDate: z.string().nullable().optional(),
|
|
30
|
+
text: z.string().optional(),
|
|
31
|
+
image: z.string().nullable().optional(),
|
|
32
|
+
favicon: z.string().nullable().optional()
|
|
33
|
+
});
|
|
34
|
+
const exaAnswerResponseSchema = z.object({
|
|
35
|
+
answer: z.union([z.string(), z.record(z.string(), z.unknown())]),
|
|
36
|
+
citations: z.array(exaAnswerCitationSchema),
|
|
37
|
+
requestId: z.string().optional(),
|
|
38
|
+
costDollars: exaCostSchema.optional()
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
//#endregion
|
|
42
|
+
//#region src/schemas/monitors.schema.ts
|
|
43
|
+
const exaMonitorSchema = z.object({
|
|
44
|
+
id: z.string(),
|
|
45
|
+
name: z.string().nullable().optional(),
|
|
46
|
+
status: z.string().optional(),
|
|
47
|
+
search: z.unknown().optional(),
|
|
48
|
+
trigger: z.unknown().optional(),
|
|
49
|
+
outputSchema: z.unknown().optional(),
|
|
50
|
+
metadata: z.unknown().optional(),
|
|
51
|
+
webhook: z.unknown().optional(),
|
|
52
|
+
webhookSecret: z.string().optional(),
|
|
53
|
+
nextRunAt: z.string().nullable().optional(),
|
|
54
|
+
createdAt: z.string().optional(),
|
|
55
|
+
updatedAt: z.string().optional()
|
|
56
|
+
});
|
|
57
|
+
const exaMonitorRunSchema = z.object({
|
|
58
|
+
id: z.string(),
|
|
59
|
+
monitorId: z.string(),
|
|
60
|
+
status: z.string().optional(),
|
|
61
|
+
output: z.unknown().optional(),
|
|
62
|
+
failReason: z.string().nullable().optional(),
|
|
63
|
+
startedAt: z.string().nullable().optional(),
|
|
64
|
+
completedAt: z.string().nullable().optional(),
|
|
65
|
+
durationMs: z.number().nullable().optional(),
|
|
66
|
+
createdAt: z.string().optional(),
|
|
67
|
+
updatedAt: z.string().optional()
|
|
68
|
+
});
|
|
69
|
+
const exaMonitorListResponseSchema = z.object({
|
|
70
|
+
data: z.array(exaMonitorSchema),
|
|
71
|
+
hasMore: z.boolean().optional(),
|
|
72
|
+
nextCursor: z.string().nullable().optional()
|
|
73
|
+
});
|
|
74
|
+
const exaMonitorRunListResponseSchema = z.object({
|
|
75
|
+
data: z.array(exaMonitorRunSchema),
|
|
76
|
+
hasMore: z.boolean().optional(),
|
|
77
|
+
nextCursor: z.string().nullable().optional()
|
|
78
|
+
});
|
|
79
|
+
const exaTriggerMonitorResponseSchema = z.object({ triggered: z.boolean() });
|
|
80
|
+
|
|
81
|
+
//#endregion
|
|
82
|
+
//#region src/schemas/search.schema.ts
|
|
83
|
+
const exaSearchResponseSchema = z.object({
|
|
84
|
+
requestId: z.string().optional(),
|
|
85
|
+
results: z.array(exaSearchResultSchema),
|
|
86
|
+
searchType: z.string().optional(),
|
|
87
|
+
output: z.unknown().optional(),
|
|
88
|
+
costDollars: exaCostSchema.optional()
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
//#endregion
|
|
92
|
+
//#region src/schemas/contents.schema.ts
|
|
93
|
+
const exaContentsResponseSchema = z.object({
|
|
94
|
+
requestId: z.string().optional(),
|
|
95
|
+
results: z.array(exaSearchResultSchema),
|
|
96
|
+
statuses: z.array(z.unknown()).optional(),
|
|
97
|
+
costDollars: exaCostSchema.optional()
|
|
98
|
+
});
|
|
99
|
+
const contentsOptionsSchema = z.object({
|
|
100
|
+
text: z.union([z.literal(true), z.object({
|
|
101
|
+
maxCharacters: z.number().optional(),
|
|
102
|
+
includeHtmlTags: z.boolean().optional(),
|
|
103
|
+
verbosity: z.enum([
|
|
104
|
+
"compact",
|
|
105
|
+
"standard",
|
|
106
|
+
"full"
|
|
107
|
+
]).optional()
|
|
108
|
+
})]).optional(),
|
|
109
|
+
highlights: z.union([z.literal(true), z.object({
|
|
110
|
+
maxCharacters: z.number().optional(),
|
|
111
|
+
query: z.string().optional()
|
|
112
|
+
})]).optional(),
|
|
113
|
+
summary: z.object({
|
|
114
|
+
query: z.string().optional(),
|
|
115
|
+
schema: z.record(z.string(), z.unknown()).optional()
|
|
116
|
+
}).optional(),
|
|
117
|
+
livecrawl: z.enum([
|
|
118
|
+
"always",
|
|
119
|
+
"fallback",
|
|
120
|
+
"never",
|
|
121
|
+
"auto",
|
|
122
|
+
"preferred"
|
|
123
|
+
]).optional(),
|
|
124
|
+
livecrawlTimeout: z.number().optional(),
|
|
125
|
+
maxAgeHours: z.number().optional(),
|
|
126
|
+
subpages: z.number().optional(),
|
|
127
|
+
subpageTarget: z.union([z.string(), z.array(z.string())]).optional(),
|
|
128
|
+
extras: z.record(z.string(), z.unknown()).optional(),
|
|
129
|
+
filterEmptyResults: z.boolean().optional()
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
//#endregion
|
|
133
|
+
export { exaMonitorRunListResponseSchema as a, exaTriggerMonitorResponseSchema as c, exaCostSchema as d, exaSearchResultSchema as f, exaMonitorListResponseSchema as i, exaAnswerCitationSchema as l, exaContentsResponseSchema as n, exaMonitorRunSchema as o, exaSearchResponseSchema as r, exaMonitorSchema as s, contentsOptionsSchema as t, exaAnswerResponseSchema as u };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CredentialSet } from "@keystrokehq/core";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
|
|
4
|
+
import { InferCredentialSetAuth } from "@keystrokehq/core/credential-set";
|
|
5
|
+
|
|
6
|
+
//#region src/credential-sets/exa.credential-set.d.ts
|
|
7
|
+
declare const exaCredentialSet: CredentialSet<"exa", z.ZodObject<{
|
|
8
|
+
EXA_API_KEY: z.ZodString;
|
|
9
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
10
|
+
EXA_API_KEY: z.ZodString;
|
|
11
|
+
}, z.core.$strip>>[] | undefined>;
|
|
12
|
+
type ExaCredentials = InferCredentialSetAuth<typeof exaCredentialSet>;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { exaCredentialSet as n, ExaCredentials as t };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CredentialSet } from "@keystrokehq/core";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
|
|
4
|
+
//#region src/credential-sets/exa.credential-set.ts
|
|
5
|
+
const exaAuthSchema = z.object({ EXA_API_KEY: z.string().min(1) });
|
|
6
|
+
const exaCredentialSet = new CredentialSet({
|
|
7
|
+
id: "exa",
|
|
8
|
+
name: "Exa",
|
|
9
|
+
description: "AI-native semantic web search, content extraction, and monitoring",
|
|
10
|
+
auth: exaAuthSchema,
|
|
11
|
+
proxy: { hosts: ["api.exa.ai"] }
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
export { exaCredentialSet as t };
|