@orq-ai/node 4.16.0-rc.16 → 4.16.0-rc.18
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 +43 -38
- package/funcs/responsesCompact.d.ts +18 -0
- package/funcs/responsesCompact.d.ts.map +1 -0
- package/funcs/responsesCompact.js +119 -0
- package/funcs/responsesCompact.js.map +1 -0
- package/funcs/workspaceSecurityAddIPRange.js +1 -1
- package/funcs/workspaceSecurityAddIPRange.js.map +1 -1
- package/funcs/workspaceSecurityCreateDomain.js +1 -1
- package/funcs/workspaceSecurityCreateDomain.js.map +1 -1
- package/funcs/workspaceSecurityDeleteDomain.js +1 -1
- package/funcs/workspaceSecurityDeleteDomain.js.map +1 -1
- package/funcs/workspaceSecurityDeleteIPRange.js +1 -1
- package/funcs/workspaceSecurityDeleteIPRange.js.map +1 -1
- package/funcs/workspaceSecurityGetIPAllowlist.js +1 -1
- package/funcs/workspaceSecurityGetIPAllowlist.js.map +1 -1
- package/funcs/workspaceSecurityListDomains.js +1 -1
- package/funcs/workspaceSecurityListDomains.js.map +1 -1
- package/funcs/workspaceSecurityUpdateIPAllowlist.js +1 -1
- package/funcs/workspaceSecurityUpdateIPAllowlist.js.map +1 -1
- package/funcs/workspaceSecurityVerifyDomain.js +1 -1
- package/funcs/workspaceSecurityVerifyDomain.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/models/components/index.d.ts +1 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +1 -0
- package/models/components/index.js.map +1 -1
- package/models/components/publiccompactionitem.d.ts +42 -0
- package/models/components/publiccompactionitem.d.ts.map +1 -0
- package/models/components/publiccompactionitem.js +68 -0
- package/models/components/publiccompactionitem.js.map +1 -0
- package/models/components/querytelemetryrequest.d.ts +8 -0
- package/models/components/querytelemetryrequest.d.ts.map +1 -1
- package/models/components/querytelemetryrequest.js +4 -0
- package/models/components/querytelemetryrequest.js.map +1 -1
- package/models/components/reasoningpart.js +1 -1
- package/models/errors/compactresponse.d.ts +67 -0
- package/models/errors/compactresponse.d.ts.map +1 -0
- package/models/errors/compactresponse.js +127 -0
- package/models/errors/compactresponse.js.map +1 -0
- 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/operations/compactresponse.d.ts +149 -0
- package/models/operations/compactresponse.d.ts.map +1 -0
- package/models/operations/compactresponse.js +130 -0
- package/models/operations/compactresponse.js.map +1 -0
- package/models/operations/createannotation.d.ts +10 -10
- package/models/operations/createannotation.d.ts.map +1 -1
- package/models/operations/createannotation.js +10 -11
- package/models/operations/createannotation.js.map +1 -1
- package/models/operations/createembedding.d.ts +4 -4
- package/models/operations/createembedding.d.ts.map +1 -1
- package/models/operations/createembedding.js +5 -5
- package/models/operations/createembedding.js.map +1 -1
- package/models/operations/createrouterresponse.d.ts +8 -8
- package/models/operations/createrouterresponse.d.ts.map +1 -1
- package/models/operations/createrouterresponse.js +7 -9
- package/models/operations/createrouterresponse.js.map +1 -1
- package/models/operations/createtool.js +4 -4
- package/models/operations/deleteannotation.d.ts +2 -2
- package/models/operations/deleteannotation.d.ts.map +1 -1
- package/models/operations/deleteannotation.js +1 -2
- package/models/operations/deleteannotation.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/postv2feedback.d.ts +7 -7
- package/models/operations/postv2feedback.d.ts.map +1 -1
- package/models/operations/postv2feedback.js +9 -9
- package/models/operations/postv2feedback.js.map +1 -1
- 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/streamrunagent.js +1 -1
- package/models/operations/updatetool.js +4 -4
- package/package.json +6 -6
- package/sdk/responses.d.ts +7 -0
- package/sdk/responses.d.ts.map +1 -1
- package/sdk/responses.js +10 -0
- package/sdk/responses.js.map +1 -1
- package/sdk/sdk.d.ts +4 -4
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +6 -6
- package/sdk/sdk.js.map +1 -1
- package/src/funcs/responsesCompact.ts +183 -0
- package/src/funcs/workspaceSecurityAddIPRange.ts +3 -3
- package/src/funcs/workspaceSecurityCreateDomain.ts +1 -1
- package/src/funcs/workspaceSecurityDeleteDomain.ts +1 -1
- package/src/funcs/workspaceSecurityDeleteIPRange.ts +1 -1
- package/src/funcs/workspaceSecurityGetIPAllowlist.ts +3 -1
- package/src/funcs/workspaceSecurityListDomains.ts +1 -1
- package/src/funcs/workspaceSecurityUpdateIPAllowlist.ts +3 -1
- package/src/funcs/workspaceSecurityVerifyDomain.ts +3 -3
- package/src/lib/config.ts +3 -3
- package/src/models/components/index.ts +1 -0
- package/src/models/components/publiccompactionitem.ts +79 -0
- package/src/models/components/querytelemetryrequest.ts +12 -0
- package/src/models/components/reasoningpart.ts +1 -1
- package/src/models/errors/compactresponse.ts +155 -0
- package/src/models/errors/index.ts +1 -0
- package/src/models/operations/compactresponse.ts +244 -0
- package/src/models/operations/createannotation.ts +32 -19
- package/src/models/operations/createembedding.ts +11 -7
- package/src/models/operations/createrouterresponse.ts +18 -12
- package/src/models/operations/createtool.ts +4 -4
- package/src/models/operations/deleteannotation.ts +3 -4
- 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/postv2feedback.ts +14 -18
- 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/streamrunagent.ts +1 -1
- package/src/models/operations/updatetool.ts +4 -4
- package/src/sdk/responses.ts +18 -0
- package/src/sdk/sdk.ts +10 -10
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { OrqCore } from "../core.js";
|
|
6
|
+
import { encodeJSON } from "../lib/encodings.js";
|
|
7
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
8
|
+
import * as M from "../lib/matchers.js";
|
|
9
|
+
import { compactMap } from "../lib/primitives.js";
|
|
10
|
+
import { safeParse } from "../lib/schemas.js";
|
|
11
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
12
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
|
+
import { pathToFunc } from "../lib/url.js";
|
|
14
|
+
import {
|
|
15
|
+
ConnectionError,
|
|
16
|
+
InvalidRequestError,
|
|
17
|
+
RequestAbortedError,
|
|
18
|
+
RequestTimeoutError,
|
|
19
|
+
UnexpectedClientError,
|
|
20
|
+
} from "../models/errors/httpclienterrors.js";
|
|
21
|
+
import * as errors from "../models/errors/index.js";
|
|
22
|
+
import { OrqError } from "../models/errors/orqerror.js";
|
|
23
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
24
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
25
|
+
import * as operations from "../models/operations/index.js";
|
|
26
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
27
|
+
import { Result } from "../types/fp.js";
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Compact response
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* Compacts a conversation by summarizing older items to free up context window space. Returns a compaction item containing the generated summary.
|
|
34
|
+
*/
|
|
35
|
+
export function responsesCompact(
|
|
36
|
+
client: OrqCore,
|
|
37
|
+
request: operations.CompactResponseRequestBody,
|
|
38
|
+
options?: RequestOptions,
|
|
39
|
+
): APIPromise<
|
|
40
|
+
Result<
|
|
41
|
+
operations.CompactResponseResponseBody,
|
|
42
|
+
| errors.CompactResponseResponseBody
|
|
43
|
+
| errors.CompactResponseResponsesResponseBody
|
|
44
|
+
| errors.CompactResponseResponsesResponseResponseBody
|
|
45
|
+
| OrqError
|
|
46
|
+
| ResponseValidationError
|
|
47
|
+
| ConnectionError
|
|
48
|
+
| RequestAbortedError
|
|
49
|
+
| RequestTimeoutError
|
|
50
|
+
| InvalidRequestError
|
|
51
|
+
| UnexpectedClientError
|
|
52
|
+
| SDKValidationError
|
|
53
|
+
>
|
|
54
|
+
> {
|
|
55
|
+
return new APIPromise($do(
|
|
56
|
+
client,
|
|
57
|
+
request,
|
|
58
|
+
options,
|
|
59
|
+
));
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
async function $do(
|
|
63
|
+
client: OrqCore,
|
|
64
|
+
request: operations.CompactResponseRequestBody,
|
|
65
|
+
options?: RequestOptions,
|
|
66
|
+
): Promise<
|
|
67
|
+
[
|
|
68
|
+
Result<
|
|
69
|
+
operations.CompactResponseResponseBody,
|
|
70
|
+
| errors.CompactResponseResponseBody
|
|
71
|
+
| errors.CompactResponseResponsesResponseBody
|
|
72
|
+
| errors.CompactResponseResponsesResponseResponseBody
|
|
73
|
+
| OrqError
|
|
74
|
+
| ResponseValidationError
|
|
75
|
+
| ConnectionError
|
|
76
|
+
| RequestAbortedError
|
|
77
|
+
| RequestTimeoutError
|
|
78
|
+
| InvalidRequestError
|
|
79
|
+
| UnexpectedClientError
|
|
80
|
+
| SDKValidationError
|
|
81
|
+
>,
|
|
82
|
+
APICall,
|
|
83
|
+
]
|
|
84
|
+
> {
|
|
85
|
+
const parsed = safeParse(
|
|
86
|
+
request,
|
|
87
|
+
(value) =>
|
|
88
|
+
operations.CompactResponseRequestBody$outboundSchema.parse(value),
|
|
89
|
+
"Input validation failed",
|
|
90
|
+
);
|
|
91
|
+
if (!parsed.ok) {
|
|
92
|
+
return [parsed, { status: "invalid" }];
|
|
93
|
+
}
|
|
94
|
+
const payload = parsed.value;
|
|
95
|
+
const body = encodeJSON("body", payload, { explode: true });
|
|
96
|
+
|
|
97
|
+
const path = pathToFunc("/v1/responses/compact")();
|
|
98
|
+
|
|
99
|
+
const headers = new Headers(compactMap({
|
|
100
|
+
"Content-Type": "application/json",
|
|
101
|
+
Accept: "application/json",
|
|
102
|
+
}));
|
|
103
|
+
|
|
104
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
105
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
106
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
107
|
+
|
|
108
|
+
const context = {
|
|
109
|
+
options: client._options,
|
|
110
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
111
|
+
operationID: "compact-response",
|
|
112
|
+
oAuth2Scopes: null,
|
|
113
|
+
|
|
114
|
+
resolvedSecurity: requestSecurity,
|
|
115
|
+
|
|
116
|
+
securitySource: client._options.apiKey,
|
|
117
|
+
retryConfig: options?.retries
|
|
118
|
+
|| client._options.retryConfig
|
|
119
|
+
|| { strategy: "none" },
|
|
120
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
const requestRes = client._createRequest(context, {
|
|
124
|
+
security: requestSecurity,
|
|
125
|
+
method: "POST",
|
|
126
|
+
baseURL: options?.serverURL,
|
|
127
|
+
path: path,
|
|
128
|
+
headers: headers,
|
|
129
|
+
body: body,
|
|
130
|
+
userAgent: client._options.userAgent,
|
|
131
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
|
|
132
|
+
}, options);
|
|
133
|
+
if (!requestRes.ok) {
|
|
134
|
+
return [requestRes, { status: "invalid" }];
|
|
135
|
+
}
|
|
136
|
+
const req = requestRes.value;
|
|
137
|
+
|
|
138
|
+
const doResult = await client._do(req, {
|
|
139
|
+
context,
|
|
140
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
141
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
142
|
+
retryConfig: context.retryConfig,
|
|
143
|
+
retryCodes: context.retryCodes,
|
|
144
|
+
});
|
|
145
|
+
if (!doResult.ok) {
|
|
146
|
+
return [doResult, { status: "request-error", request: req }];
|
|
147
|
+
}
|
|
148
|
+
const response = doResult.value;
|
|
149
|
+
|
|
150
|
+
const responseFields = {
|
|
151
|
+
HttpMeta: { Response: response, Request: req },
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
const [result] = await M.match<
|
|
155
|
+
operations.CompactResponseResponseBody,
|
|
156
|
+
| errors.CompactResponseResponseBody
|
|
157
|
+
| errors.CompactResponseResponsesResponseBody
|
|
158
|
+
| errors.CompactResponseResponsesResponseResponseBody
|
|
159
|
+
| OrqError
|
|
160
|
+
| ResponseValidationError
|
|
161
|
+
| ConnectionError
|
|
162
|
+
| RequestAbortedError
|
|
163
|
+
| RequestTimeoutError
|
|
164
|
+
| InvalidRequestError
|
|
165
|
+
| UnexpectedClientError
|
|
166
|
+
| SDKValidationError
|
|
167
|
+
>(
|
|
168
|
+
M.json(200, operations.CompactResponseResponseBody$inboundSchema),
|
|
169
|
+
M.jsonErr(400, errors.CompactResponseResponseBody$inboundSchema),
|
|
170
|
+
M.jsonErr(401, errors.CompactResponseResponsesResponseBody$inboundSchema),
|
|
171
|
+
M.jsonErr(
|
|
172
|
+
502,
|
|
173
|
+
errors.CompactResponseResponsesResponseResponseBody$inboundSchema,
|
|
174
|
+
),
|
|
175
|
+
M.fail("4XX"),
|
|
176
|
+
M.fail("5XX"),
|
|
177
|
+
)(response, req, { extraFields: responseFields });
|
|
178
|
+
if (!result.ok) {
|
|
179
|
+
return [result, { status: "complete", request: req, response }];
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
return [result, { status: "complete", request: req, response }];
|
|
183
|
+
}
|
|
@@ -94,9 +94,9 @@ async function $do(
|
|
|
94
94
|
charEncoding: "percent",
|
|
95
95
|
}),
|
|
96
96
|
};
|
|
97
|
-
const path = pathToFunc(
|
|
98
|
-
|
|
99
|
-
);
|
|
97
|
+
const path = pathToFunc(
|
|
98
|
+
"/v2/workspaces/{workspace_key}/ip-allowlist/entries",
|
|
99
|
+
)(pathParams);
|
|
100
100
|
|
|
101
101
|
const headers = new Headers(compactMap({
|
|
102
102
|
"Content-Type": "application/json",
|
|
@@ -98,7 +98,7 @@ async function $do(
|
|
|
98
98
|
charEncoding: "percent",
|
|
99
99
|
}),
|
|
100
100
|
};
|
|
101
|
-
const path = pathToFunc("/v2/{workspace_key}/domains")(pathParams);
|
|
101
|
+
const path = pathToFunc("/v2/workspaces/{workspace_key}/domains")(pathParams);
|
|
102
102
|
|
|
103
103
|
const headers = new Headers(compactMap({
|
|
104
104
|
"Content-Type": "application/json",
|
|
@@ -101,7 +101,7 @@ async function $do(
|
|
|
101
101
|
}),
|
|
102
102
|
};
|
|
103
103
|
const path = pathToFunc(
|
|
104
|
-
"/v2/{workspace_key}/ip-allowlist/entries/{range_id}",
|
|
104
|
+
"/v2/workspaces/{workspace_key}/ip-allowlist/entries/{range_id}",
|
|
105
105
|
)(pathParams);
|
|
106
106
|
|
|
107
107
|
const headers = new Headers(compactMap({
|
|
@@ -96,7 +96,9 @@ async function $do(
|
|
|
96
96
|
charEncoding: "percent",
|
|
97
97
|
}),
|
|
98
98
|
};
|
|
99
|
-
const path = pathToFunc("/v2/{workspace_key}/ip-allowlist")(
|
|
99
|
+
const path = pathToFunc("/v2/workspaces/{workspace_key}/ip-allowlist")(
|
|
100
|
+
pathParams,
|
|
101
|
+
);
|
|
100
102
|
|
|
101
103
|
const headers = new Headers(compactMap({
|
|
102
104
|
Accept: "application/json",
|
|
@@ -96,7 +96,7 @@ async function $do(
|
|
|
96
96
|
charEncoding: "percent",
|
|
97
97
|
}),
|
|
98
98
|
};
|
|
99
|
-
const path = pathToFunc("/v2/{workspace_key}/domains")(pathParams);
|
|
99
|
+
const path = pathToFunc("/v2/workspaces/{workspace_key}/domains")(pathParams);
|
|
100
100
|
|
|
101
101
|
const headers = new Headers(compactMap({
|
|
102
102
|
Accept: "application/json",
|
|
@@ -98,7 +98,9 @@ async function $do(
|
|
|
98
98
|
charEncoding: "percent",
|
|
99
99
|
}),
|
|
100
100
|
};
|
|
101
|
-
const path = pathToFunc("/v2/{workspace_key}/ip-allowlist")(
|
|
101
|
+
const path = pathToFunc("/v2/workspaces/{workspace_key}/ip-allowlist")(
|
|
102
|
+
pathParams,
|
|
103
|
+
);
|
|
102
104
|
|
|
103
105
|
const headers = new Headers(compactMap({
|
|
104
106
|
"Content-Type": "application/json",
|
|
@@ -100,9 +100,9 @@ async function $do(
|
|
|
100
100
|
charEncoding: "percent",
|
|
101
101
|
}),
|
|
102
102
|
};
|
|
103
|
-
const path = pathToFunc(
|
|
104
|
-
|
|
105
|
-
);
|
|
103
|
+
const path = pathToFunc(
|
|
104
|
+
"/v2/workspaces/{workspace_key}/domains/{domain_id}/verify",
|
|
105
|
+
)(pathParams);
|
|
106
106
|
|
|
107
107
|
const headers = new Headers(compactMap({
|
|
108
108
|
Accept: "application/json",
|
package/src/lib/config.ts
CHANGED
|
@@ -58,7 +58,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
58
58
|
export const SDK_METADATA = {
|
|
59
59
|
language: "typescript",
|
|
60
60
|
openapiDocVersion: "2.0",
|
|
61
|
-
sdkVersion: "4.16.0-rc.
|
|
62
|
-
genVersion: "2.
|
|
63
|
-
userAgent: "speakeasy-sdk/typescript 4.16.0-rc.
|
|
61
|
+
sdkVersion: "4.16.0-rc.18",
|
|
62
|
+
genVersion: "2.941.0",
|
|
63
|
+
userAgent: "speakeasy-sdk/typescript 4.16.0-rc.18 2.941.0 2.0 @orq-ai/node",
|
|
64
64
|
} as const;
|
|
@@ -415,6 +415,7 @@ export * from "./projectbudgetscoperestresponse.js";
|
|
|
415
415
|
export * from "./projectscope.js";
|
|
416
416
|
export * from "./providerbudgetscope.js";
|
|
417
417
|
export * from "./providertoolinput.js";
|
|
418
|
+
export * from "./publiccompactionitem.js";
|
|
418
419
|
export * from "./publiccontact.js";
|
|
419
420
|
export * from "./publicembeddingdata.js";
|
|
420
421
|
export * from "./publicembeddingusage.js";
|
|
@@ -0,0 +1,79 @@
|
|
|
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
|
+
* Always "compaction".
|
|
14
|
+
*/
|
|
15
|
+
export const PublicCompactionItemType = {
|
|
16
|
+
Compaction: "compaction",
|
|
17
|
+
} as const;
|
|
18
|
+
/**
|
|
19
|
+
* Always "compaction".
|
|
20
|
+
*/
|
|
21
|
+
export type PublicCompactionItemType = ClosedEnum<
|
|
22
|
+
typeof PublicCompactionItemType
|
|
23
|
+
>;
|
|
24
|
+
|
|
25
|
+
export type PublicCompactionItem = {
|
|
26
|
+
/**
|
|
27
|
+
* Not populated by this endpoint.
|
|
28
|
+
*/
|
|
29
|
+
content?: string | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* The model that created this summary.
|
|
32
|
+
*/
|
|
33
|
+
createdBy?: string | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* The summary content generated by the model.
|
|
36
|
+
*/
|
|
37
|
+
encryptedContent?: string | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* The ID of the compaction item.
|
|
40
|
+
*/
|
|
41
|
+
id?: string | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Always "compaction".
|
|
44
|
+
*/
|
|
45
|
+
type: PublicCompactionItemType;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
/** @internal */
|
|
49
|
+
export const PublicCompactionItemType$inboundSchema: z.ZodNativeEnum<
|
|
50
|
+
typeof PublicCompactionItemType
|
|
51
|
+
> = z.nativeEnum(PublicCompactionItemType);
|
|
52
|
+
|
|
53
|
+
/** @internal */
|
|
54
|
+
export const PublicCompactionItem$inboundSchema: z.ZodType<
|
|
55
|
+
PublicCompactionItem,
|
|
56
|
+
z.ZodTypeDef,
|
|
57
|
+
unknown
|
|
58
|
+
> = z.object({
|
|
59
|
+
content: z.string().optional(),
|
|
60
|
+
created_by: z.string().optional(),
|
|
61
|
+
encrypted_content: z.string().optional(),
|
|
62
|
+
id: z.string().optional(),
|
|
63
|
+
type: PublicCompactionItemType$inboundSchema,
|
|
64
|
+
}).transform((v) => {
|
|
65
|
+
return remap$(v, {
|
|
66
|
+
"created_by": "createdBy",
|
|
67
|
+
"encrypted_content": "encryptedContent",
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
export function publicCompactionItemFromJSON(
|
|
72
|
+
jsonString: string,
|
|
73
|
+
): SafeParseResult<PublicCompactionItem, SDKValidationError> {
|
|
74
|
+
return safeParse(
|
|
75
|
+
jsonString,
|
|
76
|
+
(x) => PublicCompactionItem$inboundSchema.parse(JSON.parse(x)),
|
|
77
|
+
`Failed to parse 'PublicCompactionItem' from JSON`,
|
|
78
|
+
);
|
|
79
|
+
}
|
|
@@ -91,6 +91,13 @@ export type QueryTelemetryRequest = {
|
|
|
91
91
|
* The span originally selected, before live extended [from, to). `grain:"auto"` resolves bucket width from this span, independent of how far [from, to) has since grown.
|
|
92
92
|
*/
|
|
93
93
|
selectedRangeSeconds?: number | undefined;
|
|
94
|
+
/**
|
|
95
|
+
* Pins the read to one project the caller can reach. Omit to keep the
|
|
96
|
+
*
|
|
97
|
+
* @remarks
|
|
98
|
+
* caller's token scope.
|
|
99
|
+
*/
|
|
100
|
+
projectId?: string | undefined;
|
|
94
101
|
};
|
|
95
102
|
|
|
96
103
|
/** @internal */
|
|
@@ -134,6 +141,7 @@ export const QueryTelemetryRequest$inboundSchema: z.ZodType<
|
|
|
134
141
|
sort: QueryTelemetryRequestSort$inboundSchema.optional(),
|
|
135
142
|
interval_seconds: z.number().int().optional(),
|
|
136
143
|
selected_range_seconds: z.number().int().optional(),
|
|
144
|
+
project_id: z.string().optional(),
|
|
137
145
|
}).transform((v) => {
|
|
138
146
|
return remap$(v, {
|
|
139
147
|
"group_by": "groupBy",
|
|
@@ -142,6 +150,7 @@ export const QueryTelemetryRequest$inboundSchema: z.ZodType<
|
|
|
142
150
|
"include_totals": "includeTotals",
|
|
143
151
|
"interval_seconds": "intervalSeconds",
|
|
144
152
|
"selected_range_seconds": "selectedRangeSeconds",
|
|
153
|
+
"project_id": "projectId",
|
|
145
154
|
});
|
|
146
155
|
});
|
|
147
156
|
/** @internal */
|
|
@@ -161,6 +170,7 @@ export type QueryTelemetryRequest$Outbound = {
|
|
|
161
170
|
sort?: string | undefined;
|
|
162
171
|
interval_seconds?: number | undefined;
|
|
163
172
|
selected_range_seconds?: number | undefined;
|
|
173
|
+
project_id?: string | undefined;
|
|
164
174
|
};
|
|
165
175
|
|
|
166
176
|
/** @internal */
|
|
@@ -184,6 +194,7 @@ export const QueryTelemetryRequest$outboundSchema: z.ZodType<
|
|
|
184
194
|
sort: QueryTelemetryRequestSort$outboundSchema.optional(),
|
|
185
195
|
intervalSeconds: z.number().int().optional(),
|
|
186
196
|
selectedRangeSeconds: z.number().int().optional(),
|
|
197
|
+
projectId: z.string().optional(),
|
|
187
198
|
}).transform((v) => {
|
|
188
199
|
return remap$(v, {
|
|
189
200
|
groupBy: "group_by",
|
|
@@ -192,6 +203,7 @@ export const QueryTelemetryRequest$outboundSchema: z.ZodType<
|
|
|
192
203
|
includeTotals: "include_totals",
|
|
193
204
|
intervalSeconds: "interval_seconds",
|
|
194
205
|
selectedRangeSeconds: "selected_range_seconds",
|
|
206
|
+
projectId: "project_id",
|
|
195
207
|
});
|
|
196
208
|
});
|
|
197
209
|
|
|
@@ -40,7 +40,7 @@ export const ReasoningPart$inboundSchema: z.ZodType<
|
|
|
40
40
|
z.ZodTypeDef,
|
|
41
41
|
unknown
|
|
42
42
|
> = z.object({
|
|
43
|
-
_id: z.string().default("
|
|
43
|
+
_id: z.string().default("reasoning_01m3br6rhs6ssed8mm2k5rqxt7"),
|
|
44
44
|
metadata: z.record(z.any()).optional(),
|
|
45
45
|
kind: z.literal("reasoning"),
|
|
46
46
|
reasoning: z.string(),
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import * as components from "../components/index.js";
|
|
7
|
+
import { OrqError } from "./orqerror.js";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Failed to compact conversation.
|
|
11
|
+
*/
|
|
12
|
+
export type CompactResponseResponsesResponseResponseBodyData = {
|
|
13
|
+
error: components.APIError;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Failed to compact conversation.
|
|
18
|
+
*/
|
|
19
|
+
export class CompactResponseResponsesResponseResponseBody extends OrqError {
|
|
20
|
+
error: components.APIError;
|
|
21
|
+
|
|
22
|
+
/** The original data that was passed to this error instance. */
|
|
23
|
+
data$: CompactResponseResponsesResponseResponseBodyData;
|
|
24
|
+
|
|
25
|
+
constructor(
|
|
26
|
+
err: CompactResponseResponsesResponseResponseBodyData,
|
|
27
|
+
httpMeta: { response: Response; request: Request; body: string },
|
|
28
|
+
) {
|
|
29
|
+
const message = err.error?.message
|
|
30
|
+
|| `API error occurred: ${JSON.stringify(err)}`;
|
|
31
|
+
super(message, httpMeta);
|
|
32
|
+
this.data$ = err;
|
|
33
|
+
this.error = err.error;
|
|
34
|
+
|
|
35
|
+
this.name = "CompactResponseResponsesResponseResponseBody";
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Unauthorized.
|
|
41
|
+
*/
|
|
42
|
+
export type CompactResponseResponsesResponseBodyData = {
|
|
43
|
+
error: components.APIError;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Unauthorized.
|
|
48
|
+
*/
|
|
49
|
+
export class CompactResponseResponsesResponseBody extends OrqError {
|
|
50
|
+
error: components.APIError;
|
|
51
|
+
|
|
52
|
+
/** The original data that was passed to this error instance. */
|
|
53
|
+
data$: CompactResponseResponsesResponseBodyData;
|
|
54
|
+
|
|
55
|
+
constructor(
|
|
56
|
+
err: CompactResponseResponsesResponseBodyData,
|
|
57
|
+
httpMeta: { response: Response; request: Request; body: string },
|
|
58
|
+
) {
|
|
59
|
+
const message = err.error?.message
|
|
60
|
+
|| `API error occurred: ${JSON.stringify(err)}`;
|
|
61
|
+
super(message, httpMeta);
|
|
62
|
+
this.data$ = err;
|
|
63
|
+
this.error = err.error;
|
|
64
|
+
|
|
65
|
+
this.name = "CompactResponseResponsesResponseBody";
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Model is required or request is invalid.
|
|
71
|
+
*/
|
|
72
|
+
export type CompactResponseResponseBodyData = {
|
|
73
|
+
error: components.APIError;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Model is required or request is invalid.
|
|
78
|
+
*/
|
|
79
|
+
export class CompactResponseResponseBody extends OrqError {
|
|
80
|
+
error: components.APIError;
|
|
81
|
+
|
|
82
|
+
/** The original data that was passed to this error instance. */
|
|
83
|
+
data$: CompactResponseResponseBodyData;
|
|
84
|
+
|
|
85
|
+
constructor(
|
|
86
|
+
err: CompactResponseResponseBodyData,
|
|
87
|
+
httpMeta: { response: Response; request: Request; body: string },
|
|
88
|
+
) {
|
|
89
|
+
const message = err.error?.message
|
|
90
|
+
|| `API error occurred: ${JSON.stringify(err)}`;
|
|
91
|
+
super(message, httpMeta);
|
|
92
|
+
this.data$ = err;
|
|
93
|
+
this.error = err.error;
|
|
94
|
+
|
|
95
|
+
this.name = "CompactResponseResponseBody";
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/** @internal */
|
|
100
|
+
export const CompactResponseResponsesResponseResponseBody$inboundSchema:
|
|
101
|
+
z.ZodType<
|
|
102
|
+
CompactResponseResponsesResponseResponseBody,
|
|
103
|
+
z.ZodTypeDef,
|
|
104
|
+
unknown
|
|
105
|
+
> = z.object({
|
|
106
|
+
error: components.APIError$inboundSchema,
|
|
107
|
+
request$: z.instanceof(Request),
|
|
108
|
+
response$: z.instanceof(Response),
|
|
109
|
+
body$: z.string(),
|
|
110
|
+
})
|
|
111
|
+
.transform((v) => {
|
|
112
|
+
return new CompactResponseResponsesResponseResponseBody(v, {
|
|
113
|
+
request: v.request$,
|
|
114
|
+
response: v.response$,
|
|
115
|
+
body: v.body$,
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
/** @internal */
|
|
120
|
+
export const CompactResponseResponsesResponseBody$inboundSchema: z.ZodType<
|
|
121
|
+
CompactResponseResponsesResponseBody,
|
|
122
|
+
z.ZodTypeDef,
|
|
123
|
+
unknown
|
|
124
|
+
> = z.object({
|
|
125
|
+
error: components.APIError$inboundSchema,
|
|
126
|
+
request$: z.instanceof(Request),
|
|
127
|
+
response$: z.instanceof(Response),
|
|
128
|
+
body$: z.string(),
|
|
129
|
+
})
|
|
130
|
+
.transform((v) => {
|
|
131
|
+
return new CompactResponseResponsesResponseBody(v, {
|
|
132
|
+
request: v.request$,
|
|
133
|
+
response: v.response$,
|
|
134
|
+
body: v.body$,
|
|
135
|
+
});
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
/** @internal */
|
|
139
|
+
export const CompactResponseResponseBody$inboundSchema: z.ZodType<
|
|
140
|
+
CompactResponseResponseBody,
|
|
141
|
+
z.ZodTypeDef,
|
|
142
|
+
unknown
|
|
143
|
+
> = z.object({
|
|
144
|
+
error: components.APIError$inboundSchema,
|
|
145
|
+
request$: z.instanceof(Request),
|
|
146
|
+
response$: z.instanceof(Response),
|
|
147
|
+
body$: z.string(),
|
|
148
|
+
})
|
|
149
|
+
.transform((v) => {
|
|
150
|
+
return new CompactResponseResponseBody(v, {
|
|
151
|
+
request: v.request$,
|
|
152
|
+
response: v.response$,
|
|
153
|
+
body: v.body$,
|
|
154
|
+
});
|
|
155
|
+
});
|