@orq-ai/node 4.16.0-rc.50 → 4.16.0-rc.52
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 +57 -41
- package/funcs/websearchSearch.d.ts +38 -0
- package/funcs/websearchSearch.d.ts.map +1 -0
- package/funcs/websearchSearch.js +142 -0
- package/funcs/websearchSearch.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/components/datapoint1.d.ts +3 -8
- package/models/components/datapoint1.d.ts.map +1 -1
- package/models/components/datapoint1.js +2 -9
- package/models/components/datapoint1.js.map +1 -1
- package/models/components/datapointinput.d.ts +6 -11
- package/models/components/datapointinput.d.ts.map +1 -1
- package/models/components/datapointinput.js +2 -8
- package/models/components/datapointinput.js.map +1 -1
- package/models/components/model.d.ts +6 -9
- package/models/components/model.d.ts.map +1 -1
- package/models/components/model.js +2 -2
- package/models/components/model.js.map +1 -1
- package/models/components/reasoningpart.js +1 -1
- package/models/components/updatedatapointrequest.d.ts +9 -8
- package/models/components/updatedatapointrequest.d.ts.map +1 -1
- package/models/components/updatedatapointrequest.js +2 -8
- package/models/components/updatedatapointrequest.js.map +1 -1
- package/models/errors/index.d.ts +1 -0
- package/models/errors/index.d.ts.map +1 -1
- package/models/errors/index.js +1 -0
- package/models/errors/index.js.map +1 -1
- package/models/errors/searchweb.d.ts +235 -0
- package/models/errors/searchweb.d.ts.map +1 -0
- package/models/errors/searchweb.js +351 -0
- package/models/errors/searchweb.js.map +1 -0
- package/models/operations/createtool.js +4 -4
- package/models/operations/deploymentinvoke.d.ts +4 -4
- package/models/operations/deploymentinvoke.d.ts.map +1 -1
- package/models/operations/deploymentinvoke.js +4 -5
- package/models/operations/deploymentinvoke.js.map +1 -1
- package/models/operations/getalltools.js +4 -4
- package/models/operations/getv2humanevalsets.js +2 -2
- package/models/operations/getv2humanevalsetsid.js +2 -2
- package/models/operations/index.d.ts +1 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +1 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/patchv2humanevalsetsid.js +2 -2
- package/models/operations/postv2feedbackevaluation.js +4 -4
- package/models/operations/postv2humanevalsets.js +2 -2
- package/models/operations/retrievetool.js +4 -4
- package/models/operations/runagent.js +1 -1
- package/models/operations/searchweb.d.ts +217 -0
- package/models/operations/searchweb.d.ts.map +1 -0
- package/models/operations/searchweb.js +161 -0
- package/models/operations/searchweb.js.map +1 -0
- package/models/operations/streamrunagent.js +1 -1
- package/models/operations/updatetool.js +4 -4
- package/package.json +1 -1
- package/sdk/sdk.d.ts +3 -0
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +4 -0
- package/sdk/sdk.js.map +1 -1
- package/sdk/websearch.d.ts +32 -0
- package/sdk/websearch.d.ts.map +1 -0
- package/sdk/websearch.js +42 -0
- package/sdk/websearch.js.map +1 -0
- package/src/funcs/websearchSearch.ts +258 -0
- package/src/lib/config.ts +2 -2
- package/src/models/components/datapoint1.ts +2 -21
- package/src/models/components/datapointinput.ts +3 -26
- package/src/models/components/model.ts +10 -11
- package/src/models/components/reasoningpart.ts +1 -1
- package/src/models/components/updatedatapointrequest.ts +6 -25
- package/src/models/errors/index.ts +1 -0
- package/src/models/errors/searchweb.ts +546 -0
- package/src/models/operations/createtool.ts +4 -4
- package/src/models/operations/deploymentinvoke.ts +9 -6
- package/src/models/operations/getalltools.ts +4 -4
- package/src/models/operations/getv2humanevalsets.ts +2 -2
- package/src/models/operations/getv2humanevalsetsid.ts +2 -2
- package/src/models/operations/index.ts +1 -0
- package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
- package/src/models/operations/postv2feedbackevaluation.ts +4 -4
- package/src/models/operations/postv2humanevalsets.ts +2 -2
- package/src/models/operations/retrievetool.ts +4 -4
- package/src/models/operations/runagent.ts +1 -1
- package/src/models/operations/searchweb.ts +366 -0
- package/src/models/operations/streamrunagent.ts +1 -1
- package/src/models/operations/updatetool.ts +4 -4
- package/src/sdk/sdk.ts +6 -0
- package/src/sdk/websearch.ts +47 -0
|
@@ -224,6 +224,7 @@ export * from "./routingrulelistusedmodels.js";
|
|
|
224
224
|
export * from "./routingruleupdate.js";
|
|
225
225
|
export * from "./runagent.js";
|
|
226
226
|
export * from "./searchknowledge.js";
|
|
227
|
+
export * from "./searchweb.js";
|
|
227
228
|
export * from "./searchwiki.js";
|
|
228
229
|
export * from "./skilldelete.js";
|
|
229
230
|
export * from "./skillget.js";
|
|
@@ -318,7 +318,7 @@ export const PatchV2HumanEvalSetsIdResponseBody2$inboundSchema: z.ZodType<
|
|
|
318
318
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
319
319
|
.optional(),
|
|
320
320
|
updated: z.string().datetime({ offset: true }).default(
|
|
321
|
-
"2026-10-
|
|
321
|
+
"2026-10-06T07:11:20.516Z",
|
|
322
322
|
).transform(v => new Date(v)),
|
|
323
323
|
filter_type: z.literal("name"),
|
|
324
324
|
filter_value: z.string(),
|
|
@@ -364,7 +364,7 @@ export const PatchV2HumanEvalSetsIdResponseBody1$inboundSchema: z.ZodType<
|
|
|
364
364
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
365
365
|
.optional(),
|
|
366
366
|
updated: z.string().datetime({ offset: true }).default(
|
|
367
|
-
"2026-10-
|
|
367
|
+
"2026-10-06T07:11:20.516Z",
|
|
368
368
|
).transform(v => new Date(v)),
|
|
369
369
|
filter_type: z.literal("span_type"),
|
|
370
370
|
filter_values: z.array(z.string()),
|
|
@@ -245,7 +245,7 @@ export const RequestBody4$outboundSchema: z.ZodType<
|
|
|
245
245
|
PostV2FeedbackEvaluationRequestBodyFeedbackRequestSource$outboundSchema
|
|
246
246
|
.default("orq"),
|
|
247
247
|
explanation: z.string().optional(),
|
|
248
|
-
reviewedAt: z.date().default(() => new Date("2026-10-
|
|
248
|
+
reviewedAt: z.date().default(() => new Date("2026-10-06T07:11:25.317Z"))
|
|
249
249
|
.transform(v => v.toISOString()),
|
|
250
250
|
type: z.literal("string_array"),
|
|
251
251
|
values: z.array(z.string()),
|
|
@@ -299,7 +299,7 @@ export const Three$outboundSchema: z.ZodType<
|
|
|
299
299
|
source: PostV2FeedbackEvaluationRequestBodyFeedbackSource$outboundSchema
|
|
300
300
|
.default("orq"),
|
|
301
301
|
explanation: z.string().optional(),
|
|
302
|
-
reviewedAt: z.date().default(() => new Date("2026-10-
|
|
302
|
+
reviewedAt: z.date().default(() => new Date("2026-10-06T07:11:25.316Z"))
|
|
303
303
|
.transform(v => v.toISOString()),
|
|
304
304
|
type: z.literal("boolean"),
|
|
305
305
|
value: z.boolean(),
|
|
@@ -353,7 +353,7 @@ export const RequestBody2$outboundSchema: z.ZodType<
|
|
|
353
353
|
"orq",
|
|
354
354
|
),
|
|
355
355
|
explanation: z.string().optional(),
|
|
356
|
-
reviewedAt: z.date().default(() => new Date("2026-10-
|
|
356
|
+
reviewedAt: z.date().default(() => new Date("2026-10-06T07:11:25.316Z"))
|
|
357
357
|
.transform(v => v.toISOString()),
|
|
358
358
|
type: z.literal("number"),
|
|
359
359
|
value: z.number(),
|
|
@@ -405,7 +405,7 @@ export const RequestBody1$outboundSchema: z.ZodType<
|
|
|
405
405
|
humanReviewId: z.string().optional(),
|
|
406
406
|
source: RequestBodySource$outboundSchema.default("orq"),
|
|
407
407
|
explanation: z.string().optional(),
|
|
408
|
-
reviewedAt: z.date().default(() => new Date("2026-10-
|
|
408
|
+
reviewedAt: z.date().default(() => new Date("2026-10-06T07:11:25.316Z"))
|
|
409
409
|
.transform(v => v.toISOString()),
|
|
410
410
|
type: z.literal("string"),
|
|
411
411
|
value: z.string(),
|
|
@@ -271,7 +271,7 @@ export const PostV2HumanEvalSetsResponseBody2$inboundSchema: z.ZodType<
|
|
|
271
271
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
272
272
|
.optional(),
|
|
273
273
|
updated: z.string().datetime({ offset: true }).default(
|
|
274
|
-
"2026-10-
|
|
274
|
+
"2026-10-06T07:11:20.516Z",
|
|
275
275
|
).transform(v => new Date(v)),
|
|
276
276
|
filter_type: z.literal("name"),
|
|
277
277
|
filter_value: z.string(),
|
|
@@ -316,7 +316,7 @@ export const PostV2HumanEvalSetsResponseBody1$inboundSchema: z.ZodType<
|
|
|
316
316
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
317
317
|
.optional(),
|
|
318
318
|
updated: z.string().datetime({ offset: true }).default(
|
|
319
|
-
"2026-10-
|
|
319
|
+
"2026-10-06T07:11:20.516Z",
|
|
320
320
|
).transform(v => new Date(v)),
|
|
321
321
|
filter_type: z.literal("span_type"),
|
|
322
322
|
filter_values: z.array(z.string()),
|
|
@@ -624,7 +624,7 @@ export const RetrieveToolResponseBodyCodeExecutionTool$inboundSchema: z.ZodType<
|
|
|
624
624
|
z.ZodTypeDef,
|
|
625
625
|
unknown
|
|
626
626
|
> = z.object({
|
|
627
|
-
_id: z.string().default("
|
|
627
|
+
_id: z.string().default("tool_01M480V2KEDETYDYQM6RR0D0EX"),
|
|
628
628
|
path: z.string(),
|
|
629
629
|
key: z.string(),
|
|
630
630
|
display_name: z.string().optional(),
|
|
@@ -820,7 +820,7 @@ export const RetrieveToolResponseBodyHTTPTool$inboundSchema: z.ZodType<
|
|
|
820
820
|
z.ZodTypeDef,
|
|
821
821
|
unknown
|
|
822
822
|
> = z.object({
|
|
823
|
-
_id: z.string().default("
|
|
823
|
+
_id: z.string().default("tool_01M480V2KDVMZM25A1Q6JWZKZM"),
|
|
824
824
|
path: z.string(),
|
|
825
825
|
key: z.string(),
|
|
826
826
|
display_name: z.string().optional(),
|
|
@@ -916,7 +916,7 @@ export const RetrieveToolResponseBodyJSONSchemaTool$inboundSchema: z.ZodType<
|
|
|
916
916
|
z.ZodTypeDef,
|
|
917
917
|
unknown
|
|
918
918
|
> = z.object({
|
|
919
|
-
_id: z.string().default("
|
|
919
|
+
_id: z.string().default("tool_01M480V2KD0NV1KCM3XHPY8VXS"),
|
|
920
920
|
path: z.string(),
|
|
921
921
|
key: z.string(),
|
|
922
922
|
display_name: z.string().optional(),
|
|
@@ -1022,7 +1022,7 @@ export const RetrieveToolResponseBodyFunctionTool$inboundSchema: z.ZodType<
|
|
|
1022
1022
|
z.ZodTypeDef,
|
|
1023
1023
|
unknown
|
|
1024
1024
|
> = z.object({
|
|
1025
|
-
_id: z.string().default("
|
|
1025
|
+
_id: z.string().default("tool_01M480V2KDRJH6AJY7K8J473J3"),
|
|
1026
1026
|
path: z.string(),
|
|
1027
1027
|
key: z.string(),
|
|
1028
1028
|
display_name: z.string().optional(),
|
|
@@ -3890,7 +3890,7 @@ export const Tools$outboundSchema: z.ZodType<
|
|
|
3890
3890
|
z.ZodTypeDef,
|
|
3891
3891
|
Tools
|
|
3892
3892
|
> = z.object({
|
|
3893
|
-
id: z.string().default("
|
|
3893
|
+
id: z.string().default("01M480V2HYEJV3GMJJHQWD89E6"),
|
|
3894
3894
|
name: z.string(),
|
|
3895
3895
|
description: z.string().optional(),
|
|
3896
3896
|
schema: z.lazy(() => AgentToolInputRunSchema$outboundSchema),
|
|
@@ -0,0 +1,366 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Customer or end-user identity for attributing this search and its usage.
|
|
14
|
+
*/
|
|
15
|
+
export type SearchWebIdentity = {
|
|
16
|
+
/**
|
|
17
|
+
* Customer or end-user identifier used consistently across API requests.
|
|
18
|
+
*/
|
|
19
|
+
id: string;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Plugin identifier. Must be pii_redaction.
|
|
24
|
+
*/
|
|
25
|
+
export const SearchWebId = {
|
|
26
|
+
PiiRedaction: "pii_redaction",
|
|
27
|
+
} as const;
|
|
28
|
+
/**
|
|
29
|
+
* Plugin identifier. Must be pii_redaction.
|
|
30
|
+
*/
|
|
31
|
+
export type SearchWebId = ClosedEnum<typeof SearchWebId>;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Redact detected personal information from the search query and result fields.
|
|
35
|
+
*/
|
|
36
|
+
export type SearchWebPlugins = {
|
|
37
|
+
/**
|
|
38
|
+
* Entity types to redact, using names supported by the PII detector. Used alone, this is an allowlist; combined with regions, both sets of detectors apply.
|
|
39
|
+
*/
|
|
40
|
+
entities?: Array<string> | null | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Per-entity confidence cutoffs from 0 to 1, applied in addition to threshold. Each key must also appear in entities.
|
|
43
|
+
*/
|
|
44
|
+
entityThresholds?: { [k: string]: number } | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* Plugin identifier. Must be pii_redaction.
|
|
47
|
+
*/
|
|
48
|
+
id: SearchWebId;
|
|
49
|
+
/**
|
|
50
|
+
* Language used by the PII detector. Defaults to en; supported languages depend on the detector capabilities.
|
|
51
|
+
*/
|
|
52
|
+
language?: string | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* Behavior when the PII detector fails: block rejects the request (default); passthrough continues with the original text. Workspace and rule requirements can enforce blocking.
|
|
55
|
+
*/
|
|
56
|
+
onFailure?: string | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* Country codes that select regional PII detectors. Use ["all"] on its own for all regions. Omitting both regions and entities enables all regions.
|
|
59
|
+
*/
|
|
60
|
+
regions?: Array<string> | null | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* Minimum detection confidence from 0 to 1. Omit to use the detector's default threshold.
|
|
63
|
+
*/
|
|
64
|
+
threshold?: number | undefined;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Provider to run this search. Exa uses auto, Linkup uses standard depth, and Tavily uses basic depth. Workspace credentials are selected automatically for this provider.
|
|
69
|
+
*/
|
|
70
|
+
export const Provider = {
|
|
71
|
+
Exa: "exa",
|
|
72
|
+
Ceramic: "ceramic",
|
|
73
|
+
Linkup: "linkup",
|
|
74
|
+
Tavily: "tavily",
|
|
75
|
+
Serper: "serper",
|
|
76
|
+
} as const;
|
|
77
|
+
/**
|
|
78
|
+
* Provider to run this search. Exa uses auto, Linkup uses standard depth, and Tavily uses basic depth. Workspace credentials are selected automatically for this provider.
|
|
79
|
+
*/
|
|
80
|
+
export type Provider = ClosedEnum<typeof Provider>;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Search query and provider, with optional result limit, customer identity, and PII settings.
|
|
84
|
+
*/
|
|
85
|
+
export type SearchWebRequestBody = {
|
|
86
|
+
/**
|
|
87
|
+
* Customer or end-user identity for attributing this search and its usage.
|
|
88
|
+
*/
|
|
89
|
+
identity?: SearchWebIdentity | undefined;
|
|
90
|
+
/**
|
|
91
|
+
* Maximum number of results to return, from 1 to 10. Defaults to 10. The provider may return fewer results.
|
|
92
|
+
*/
|
|
93
|
+
limit?: number | undefined;
|
|
94
|
+
/**
|
|
95
|
+
* Optional PII Redaction configuration. At most one plugin is accepted, with id pii_redaction. Workspace and matching rule requirements still apply when this field is omitted.
|
|
96
|
+
*/
|
|
97
|
+
plugins?: Array<SearchWebPlugins> | undefined;
|
|
98
|
+
/**
|
|
99
|
+
* Provider to run this search. Exa uses auto, Linkup uses standard depth, and Tavily uses basic depth. Workspace credentials are selected automatically for this provider.
|
|
100
|
+
*/
|
|
101
|
+
provider: Provider;
|
|
102
|
+
/**
|
|
103
|
+
* Search text. Must not be blank or exceed 10,000 characters. Ceramic accepts at most 50 words.
|
|
104
|
+
*/
|
|
105
|
+
query: string;
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
export type Items = {
|
|
109
|
+
/**
|
|
110
|
+
* Provider-supplied excerpt or description. May be empty.
|
|
111
|
+
*/
|
|
112
|
+
description: string;
|
|
113
|
+
/**
|
|
114
|
+
* Page title. May be empty if the provider supplies no title.
|
|
115
|
+
*/
|
|
116
|
+
title: string;
|
|
117
|
+
/**
|
|
118
|
+
* Page URL returned by the provider. PII redaction can replace sensitive parts of the URL.
|
|
119
|
+
*/
|
|
120
|
+
url: string;
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Provider that executed the search.
|
|
125
|
+
*/
|
|
126
|
+
export const SearchWebProvider = {
|
|
127
|
+
Exa: "exa",
|
|
128
|
+
Ceramic: "ceramic",
|
|
129
|
+
Linkup: "linkup",
|
|
130
|
+
Tavily: "tavily",
|
|
131
|
+
Serper: "serper",
|
|
132
|
+
} as const;
|
|
133
|
+
/**
|
|
134
|
+
* Provider that executed the search.
|
|
135
|
+
*/
|
|
136
|
+
export type SearchWebProvider = ClosedEnum<typeof SearchWebProvider>;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Details about this search request.
|
|
140
|
+
*/
|
|
141
|
+
export type SearchWebMetadata = {
|
|
142
|
+
/**
|
|
143
|
+
* Elapsed search processing time in milliseconds, including applied policies.
|
|
144
|
+
*/
|
|
145
|
+
latencyMs: number;
|
|
146
|
+
/**
|
|
147
|
+
* Provider that executed the search.
|
|
148
|
+
*/
|
|
149
|
+
provider: SearchWebProvider;
|
|
150
|
+
/**
|
|
151
|
+
* Query sent to the provider after any required PII redaction.
|
|
152
|
+
*/
|
|
153
|
+
query: string;
|
|
154
|
+
/**
|
|
155
|
+
* ORQ-generated identifier for this search request. Distinct from the trace ID in the response headers.
|
|
156
|
+
*/
|
|
157
|
+
requestId: string;
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Search completed. Results may be empty or fewer than the requested limit.
|
|
162
|
+
*/
|
|
163
|
+
export type SearchWebResponseBody = {
|
|
164
|
+
/**
|
|
165
|
+
* Results in the provider's order, after any required PII redaction. Empty when no results are found.
|
|
166
|
+
*/
|
|
167
|
+
items: Array<Items>;
|
|
168
|
+
/**
|
|
169
|
+
* Details about this search request.
|
|
170
|
+
*/
|
|
171
|
+
metadata: SearchWebMetadata;
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
export type SearchWebResponse = {
|
|
175
|
+
headers: { [k: string]: Array<string> };
|
|
176
|
+
result: SearchWebResponseBody;
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
/** @internal */
|
|
180
|
+
export type SearchWebIdentity$Outbound = {
|
|
181
|
+
id: string;
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
/** @internal */
|
|
185
|
+
export const SearchWebIdentity$outboundSchema: z.ZodType<
|
|
186
|
+
SearchWebIdentity$Outbound,
|
|
187
|
+
z.ZodTypeDef,
|
|
188
|
+
SearchWebIdentity
|
|
189
|
+
> = z.object({
|
|
190
|
+
id: z.string(),
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
export function searchWebIdentityToJSON(
|
|
194
|
+
searchWebIdentity: SearchWebIdentity,
|
|
195
|
+
): string {
|
|
196
|
+
return JSON.stringify(
|
|
197
|
+
SearchWebIdentity$outboundSchema.parse(searchWebIdentity),
|
|
198
|
+
);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/** @internal */
|
|
202
|
+
export const SearchWebId$outboundSchema: z.ZodNativeEnum<typeof SearchWebId> = z
|
|
203
|
+
.nativeEnum(SearchWebId);
|
|
204
|
+
|
|
205
|
+
/** @internal */
|
|
206
|
+
export type SearchWebPlugins$Outbound = {
|
|
207
|
+
entities?: Array<string> | null | undefined;
|
|
208
|
+
entity_thresholds?: { [k: string]: number } | undefined;
|
|
209
|
+
id: string;
|
|
210
|
+
language?: string | undefined;
|
|
211
|
+
on_failure?: string | undefined;
|
|
212
|
+
regions?: Array<string> | null | undefined;
|
|
213
|
+
threshold?: number | undefined;
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
/** @internal */
|
|
217
|
+
export const SearchWebPlugins$outboundSchema: z.ZodType<
|
|
218
|
+
SearchWebPlugins$Outbound,
|
|
219
|
+
z.ZodTypeDef,
|
|
220
|
+
SearchWebPlugins
|
|
221
|
+
> = z.object({
|
|
222
|
+
entities: z.nullable(z.array(z.string())).optional(),
|
|
223
|
+
entityThresholds: z.record(z.number()).optional(),
|
|
224
|
+
id: SearchWebId$outboundSchema,
|
|
225
|
+
language: z.string().optional(),
|
|
226
|
+
onFailure: z.string().optional(),
|
|
227
|
+
regions: z.nullable(z.array(z.string())).optional(),
|
|
228
|
+
threshold: z.number().optional(),
|
|
229
|
+
}).transform((v) => {
|
|
230
|
+
return remap$(v, {
|
|
231
|
+
entityThresholds: "entity_thresholds",
|
|
232
|
+
onFailure: "on_failure",
|
|
233
|
+
});
|
|
234
|
+
});
|
|
235
|
+
|
|
236
|
+
export function searchWebPluginsToJSON(
|
|
237
|
+
searchWebPlugins: SearchWebPlugins,
|
|
238
|
+
): string {
|
|
239
|
+
return JSON.stringify(
|
|
240
|
+
SearchWebPlugins$outboundSchema.parse(searchWebPlugins),
|
|
241
|
+
);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
/** @internal */
|
|
245
|
+
export const Provider$outboundSchema: z.ZodNativeEnum<typeof Provider> = z
|
|
246
|
+
.nativeEnum(Provider);
|
|
247
|
+
|
|
248
|
+
/** @internal */
|
|
249
|
+
export type SearchWebRequestBody$Outbound = {
|
|
250
|
+
identity?: SearchWebIdentity$Outbound | undefined;
|
|
251
|
+
limit: number;
|
|
252
|
+
plugins?: Array<SearchWebPlugins$Outbound> | undefined;
|
|
253
|
+
provider: string;
|
|
254
|
+
query: string;
|
|
255
|
+
};
|
|
256
|
+
|
|
257
|
+
/** @internal */
|
|
258
|
+
export const SearchWebRequestBody$outboundSchema: z.ZodType<
|
|
259
|
+
SearchWebRequestBody$Outbound,
|
|
260
|
+
z.ZodTypeDef,
|
|
261
|
+
SearchWebRequestBody
|
|
262
|
+
> = z.object({
|
|
263
|
+
identity: z.lazy(() => SearchWebIdentity$outboundSchema).optional(),
|
|
264
|
+
limit: z.number().int().default(10),
|
|
265
|
+
plugins: z.array(z.lazy(() => SearchWebPlugins$outboundSchema)).optional(),
|
|
266
|
+
provider: Provider$outboundSchema,
|
|
267
|
+
query: z.string(),
|
|
268
|
+
});
|
|
269
|
+
|
|
270
|
+
export function searchWebRequestBodyToJSON(
|
|
271
|
+
searchWebRequestBody: SearchWebRequestBody,
|
|
272
|
+
): string {
|
|
273
|
+
return JSON.stringify(
|
|
274
|
+
SearchWebRequestBody$outboundSchema.parse(searchWebRequestBody),
|
|
275
|
+
);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/** @internal */
|
|
279
|
+
export const Items$inboundSchema: z.ZodType<Items, z.ZodTypeDef, unknown> = z
|
|
280
|
+
.object({
|
|
281
|
+
description: z.string(),
|
|
282
|
+
title: z.string(),
|
|
283
|
+
url: z.string(),
|
|
284
|
+
});
|
|
285
|
+
|
|
286
|
+
export function itemsFromJSON(
|
|
287
|
+
jsonString: string,
|
|
288
|
+
): SafeParseResult<Items, SDKValidationError> {
|
|
289
|
+
return safeParse(
|
|
290
|
+
jsonString,
|
|
291
|
+
(x) => Items$inboundSchema.parse(JSON.parse(x)),
|
|
292
|
+
`Failed to parse 'Items' from JSON`,
|
|
293
|
+
);
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
/** @internal */
|
|
297
|
+
export const SearchWebProvider$inboundSchema: z.ZodNativeEnum<
|
|
298
|
+
typeof SearchWebProvider
|
|
299
|
+
> = z.nativeEnum(SearchWebProvider);
|
|
300
|
+
|
|
301
|
+
/** @internal */
|
|
302
|
+
export const SearchWebMetadata$inboundSchema: z.ZodType<
|
|
303
|
+
SearchWebMetadata,
|
|
304
|
+
z.ZodTypeDef,
|
|
305
|
+
unknown
|
|
306
|
+
> = z.object({
|
|
307
|
+
latencyMs: z.number().int(),
|
|
308
|
+
provider: SearchWebProvider$inboundSchema,
|
|
309
|
+
query: z.string(),
|
|
310
|
+
requestId: z.string(),
|
|
311
|
+
});
|
|
312
|
+
|
|
313
|
+
export function searchWebMetadataFromJSON(
|
|
314
|
+
jsonString: string,
|
|
315
|
+
): SafeParseResult<SearchWebMetadata, SDKValidationError> {
|
|
316
|
+
return safeParse(
|
|
317
|
+
jsonString,
|
|
318
|
+
(x) => SearchWebMetadata$inboundSchema.parse(JSON.parse(x)),
|
|
319
|
+
`Failed to parse 'SearchWebMetadata' from JSON`,
|
|
320
|
+
);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
/** @internal */
|
|
324
|
+
export const SearchWebResponseBody$inboundSchema: z.ZodType<
|
|
325
|
+
SearchWebResponseBody,
|
|
326
|
+
z.ZodTypeDef,
|
|
327
|
+
unknown
|
|
328
|
+
> = z.object({
|
|
329
|
+
items: z.array(z.lazy(() => Items$inboundSchema)),
|
|
330
|
+
metadata: z.lazy(() => SearchWebMetadata$inboundSchema),
|
|
331
|
+
});
|
|
332
|
+
|
|
333
|
+
export function searchWebResponseBodyFromJSON(
|
|
334
|
+
jsonString: string,
|
|
335
|
+
): SafeParseResult<SearchWebResponseBody, SDKValidationError> {
|
|
336
|
+
return safeParse(
|
|
337
|
+
jsonString,
|
|
338
|
+
(x) => SearchWebResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
339
|
+
`Failed to parse 'SearchWebResponseBody' from JSON`,
|
|
340
|
+
);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/** @internal */
|
|
344
|
+
export const SearchWebResponse$inboundSchema: z.ZodType<
|
|
345
|
+
SearchWebResponse,
|
|
346
|
+
z.ZodTypeDef,
|
|
347
|
+
unknown
|
|
348
|
+
> = z.object({
|
|
349
|
+
Headers: z.record(z.array(z.string())).default({}),
|
|
350
|
+
Result: z.lazy(() => SearchWebResponseBody$inboundSchema),
|
|
351
|
+
}).transform((v) => {
|
|
352
|
+
return remap$(v, {
|
|
353
|
+
"Headers": "headers",
|
|
354
|
+
"Result": "result",
|
|
355
|
+
});
|
|
356
|
+
});
|
|
357
|
+
|
|
358
|
+
export function searchWebResponseFromJSON(
|
|
359
|
+
jsonString: string,
|
|
360
|
+
): SafeParseResult<SearchWebResponse, SDKValidationError> {
|
|
361
|
+
return safeParse(
|
|
362
|
+
jsonString,
|
|
363
|
+
(x) => SearchWebResponse$inboundSchema.parse(JSON.parse(x)),
|
|
364
|
+
`Failed to parse 'SearchWebResponse' from JSON`,
|
|
365
|
+
);
|
|
366
|
+
}
|
|
@@ -3949,7 +3949,7 @@ export const AgentToolInputRunTools$outboundSchema: z.ZodType<
|
|
|
3949
3949
|
z.ZodTypeDef,
|
|
3950
3950
|
AgentToolInputRunTools
|
|
3951
3951
|
> = z.object({
|
|
3952
|
-
id: z.string().default("
|
|
3952
|
+
id: z.string().default("01M480V2J8H602JXKZN9B7A837"),
|
|
3953
3953
|
name: z.string(),
|
|
3954
3954
|
description: z.string().optional(),
|
|
3955
3955
|
schema: z.lazy(() =>
|
|
@@ -1764,7 +1764,7 @@ export const UpdateToolResponseBodyCodeExecutionTool$inboundSchema: z.ZodType<
|
|
|
1764
1764
|
z.ZodTypeDef,
|
|
1765
1765
|
unknown
|
|
1766
1766
|
> = z.object({
|
|
1767
|
-
_id: z.string().default("
|
|
1767
|
+
_id: z.string().default("tool_01M480V2K95NY12XAW1WWGRBHQ"),
|
|
1768
1768
|
path: z.string(),
|
|
1769
1769
|
key: z.string(),
|
|
1770
1770
|
display_name: z.string().optional(),
|
|
@@ -1959,7 +1959,7 @@ export const UpdateToolResponseBodyHTTPTool$inboundSchema: z.ZodType<
|
|
|
1959
1959
|
z.ZodTypeDef,
|
|
1960
1960
|
unknown
|
|
1961
1961
|
> = z.object({
|
|
1962
|
-
_id: z.string().default("
|
|
1962
|
+
_id: z.string().default("tool_01M480V2K978HHXQD3NWD38NX5"),
|
|
1963
1963
|
path: z.string(),
|
|
1964
1964
|
key: z.string(),
|
|
1965
1965
|
display_name: z.string().optional(),
|
|
@@ -2054,7 +2054,7 @@ export const UpdateToolResponseBodyJSONSchemaTool$inboundSchema: z.ZodType<
|
|
|
2054
2054
|
z.ZodTypeDef,
|
|
2055
2055
|
unknown
|
|
2056
2056
|
> = z.object({
|
|
2057
|
-
_id: z.string().default("
|
|
2057
|
+
_id: z.string().default("tool_01M480V2K9M2S8PE36KV2GCXRK"),
|
|
2058
2058
|
path: z.string(),
|
|
2059
2059
|
key: z.string(),
|
|
2060
2060
|
display_name: z.string().optional(),
|
|
@@ -2157,7 +2157,7 @@ export const UpdateToolResponseBodyFunctionTool$inboundSchema: z.ZodType<
|
|
|
2157
2157
|
z.ZodTypeDef,
|
|
2158
2158
|
unknown
|
|
2159
2159
|
> = z.object({
|
|
2160
|
-
_id: z.string().default("
|
|
2160
|
+
_id: z.string().default("tool_01M480V2K8AX8AW255HGCGS4HK"),
|
|
2161
2161
|
path: z.string(),
|
|
2162
2162
|
key: z.string(),
|
|
2163
2163
|
display_name: z.string().optional(),
|
package/src/sdk/sdk.ts
CHANGED
|
@@ -48,6 +48,7 @@ import { Tools } from "./tools.js";
|
|
|
48
48
|
import { Traces } from "./traces.js";
|
|
49
49
|
import { Views } from "./views.js";
|
|
50
50
|
import { Webhooks } from "./webhooks.js";
|
|
51
|
+
import { Websearch } from "./websearch.js";
|
|
51
52
|
import { Wikis } from "./wikis.js";
|
|
52
53
|
import { Workspaces } from "./workspaces.js";
|
|
53
54
|
import { WorkspaceSecurity } from "./workspacesecurity.js";
|
|
@@ -298,4 +299,9 @@ export class Orq extends ClientSDK {
|
|
|
298
299
|
get schedules(): Schedules {
|
|
299
300
|
return (this._schedules ??= new Schedules(this._options));
|
|
300
301
|
}
|
|
302
|
+
|
|
303
|
+
private _websearch?: Websearch;
|
|
304
|
+
get websearch(): Websearch {
|
|
305
|
+
return (this._websearch ??= new Websearch(this._options));
|
|
306
|
+
}
|
|
301
307
|
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { websearchSearch } from "../funcs/websearchSearch.js";
|
|
6
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
7
|
+
import * as operations from "../models/operations/index.js";
|
|
8
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
9
|
+
|
|
10
|
+
export class Websearch extends ClientSDK {
|
|
11
|
+
/**
|
|
12
|
+
* Search the web with a selected provider
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
* Search with Exa, Ceramic, Linkup, Tavily, or Serper and return page URLs, titles, and descriptions in one response format. Authenticate with an API key that grants **websearch.execute** and send **Content-Type: application/json**.
|
|
16
|
+
*
|
|
17
|
+
* ### Provider and credentials
|
|
18
|
+
*
|
|
19
|
+
* Each request uses the selected provider. Exa uses **auto** search, Linkup uses **standard** depth, and Tavily uses **basic** depth.
|
|
20
|
+
*
|
|
21
|
+
* Credentials are selected from the authenticated workspace. A configured provider integration takes precedence over ORQ-managed credentials: the default integration is used, or the first configured integration if no default is set. Configure BYOK in the workspace integrations settings. Invalid integration credentials cause an error.
|
|
22
|
+
*
|
|
23
|
+
* ### Billing
|
|
24
|
+
*
|
|
25
|
+
* Managed searches use the same credits as the **AI Gateway** and charge the provider cost plus **US$0.001 per search** (US$1 per 1,000 searches). BYOK searches consume no ORQ credits and add no ORQ markup; the provider bills the integration owner directly.
|
|
26
|
+
*
|
|
27
|
+
* Exa's published auto rate is **US$7 per 1,000 requests** for up to 10 results, or **US$8 per 1,000** including the ORQ markup. Exa charges use the actual cost reported by the provider.
|
|
28
|
+
*
|
|
29
|
+
* A successful managed search is billable even if an output guardrail or output redaction failure prevents the results from being returned.
|
|
30
|
+
*
|
|
31
|
+
* ### Policies and observability
|
|
32
|
+
*
|
|
33
|
+
* PII Redaction is the only supported request plugin. Workspace PII settings and matching guardrail rules also apply. Query redaction runs before input guardrails and the provider call; result redaction runs before output guardrails and the response.
|
|
34
|
+
*
|
|
35
|
+
* Search spans and metrics record the provider, latency, result count, and cost. Use the **x-orq-trace-id** response header to find the trace.
|
|
36
|
+
*/
|
|
37
|
+
async search(
|
|
38
|
+
request: operations.SearchWebRequestBody,
|
|
39
|
+
options?: RequestOptions,
|
|
40
|
+
): Promise<operations.SearchWebResponse> {
|
|
41
|
+
return unwrapAsync(websearchSearch(
|
|
42
|
+
this,
|
|
43
|
+
request,
|
|
44
|
+
options,
|
|
45
|
+
));
|
|
46
|
+
}
|
|
47
|
+
}
|