@orq-ai/node 4.16.13 → 4.16.15

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 (101) hide show
  1. package/jsr.json +1 -1
  2. package/lib/config.d.ts +3 -3
  3. package/lib/config.js +3 -3
  4. package/models/components/reasoningpart.js +1 -1
  5. package/models/operations/createtool.js +4 -4
  6. package/models/operations/getalltools.js +4 -4
  7. package/models/operations/getv2humanevalsets.js +2 -2
  8. package/models/operations/getv2humanevalsetsid.js +2 -2
  9. package/models/operations/listdeploymentversions.js +1 -1
  10. package/models/operations/patchv2humanevalsetsid.js +2 -2
  11. package/models/operations/postv2feedbackevaluation.js +4 -4
  12. package/models/operations/postv2humanevalsets.js +2 -2
  13. package/models/operations/retrievetool.js +4 -4
  14. package/models/operations/runagent.js +1 -1
  15. package/models/operations/streamrunagent.js +1 -1
  16. package/models/operations/updatetool.js +4 -4
  17. package/package.json +7 -7
  18. package/packages/orq-rc/src/funcs/humanReviewSetsCreate.ts +5 -0
  19. package/packages/orq-rc/src/funcs/humanReviewSetsDelete.ts +5 -0
  20. package/packages/orq-rc/src/funcs/humanReviewSetsGet.ts +5 -0
  21. package/packages/orq-rc/src/funcs/humanReviewSetsList.ts +5 -0
  22. package/packages/orq-rc/src/funcs/humanReviewSetsUpdate.ts +5 -0
  23. package/packages/orq-rc/src/funcs/mcpGatewaysList.ts +0 -1
  24. package/packages/orq-rc/src/lib/config.ts +3 -3
  25. package/packages/orq-rc/src/models/components/actionreviewrequestedstreamingevent.ts +6 -0
  26. package/packages/orq-rc/src/models/components/agentstartedstreamingevent.ts +6 -0
  27. package/packages/orq-rc/src/models/components/cachewritetokensdetails.ts +39 -0
  28. package/packages/orq-rc/src/models/components/filecontentpartschema.ts +1 -1
  29. package/packages/orq-rc/src/models/components/index.ts +2 -1
  30. package/packages/orq-rc/src/models/components/inputtokensdetails.ts +7 -0
  31. package/packages/orq-rc/src/models/components/litellmmodel.ts +4 -0
  32. package/packages/orq-rc/src/models/components/mcpgateway.ts +0 -6
  33. package/packages/orq-rc/src/models/components/mcptoolinput.ts +7 -7
  34. package/packages/orq-rc/src/models/components/modelconfigurationresponse.ts +3 -0
  35. package/packages/orq-rc/src/models/components/modelmetadata.ts +6 -0
  36. package/packages/orq-rc/src/models/components/openaipromptcacheoptions.ts +1 -0
  37. package/packages/orq-rc/src/models/components/pricing.ts +6 -0
  38. package/packages/orq-rc/src/models/components/pricingvariant.ts +6 -0
  39. package/packages/orq-rc/src/models/components/privatemodelconfiguration.ts +39 -0
  40. package/packages/orq-rc/src/models/components/publicresponseresource.ts +1 -1
  41. package/packages/orq-rc/src/models/components/reasoningpart.ts +1 -1
  42. package/packages/orq-rc/src/models/components/redactresponse.ts +1 -1
  43. package/packages/orq-rc/src/models/components/updatemcpgatewayrequest.ts +0 -7
  44. package/packages/orq-rc/src/models/operations/createagentrequest.ts +6 -0
  45. package/packages/orq-rc/src/models/operations/createprompt.ts +1 -1
  46. package/packages/orq-rc/src/models/operations/createrouterresponse.ts +225 -20
  47. package/packages/orq-rc/src/models/operations/createtool.ts +4 -4
  48. package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +1 -1
  49. package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +15 -18
  50. package/packages/orq-rc/src/models/operations/deployments.ts +1 -1
  51. package/packages/orq-rc/src/models/operations/deploymentstream.ts +11 -14
  52. package/packages/orq-rc/src/models/operations/getallprompts.ts +1 -1
  53. package/packages/orq-rc/src/models/operations/getalltools.ts +4 -4
  54. package/packages/orq-rc/src/models/operations/getoneprompt.ts +1 -1
  55. package/packages/orq-rc/src/models/operations/getpromptversion.ts +1 -1
  56. package/packages/orq-rc/src/models/operations/getv2humanevalsets.ts +2 -2
  57. package/packages/orq-rc/src/models/operations/getv2humanevalsetsid.ts +2 -2
  58. package/packages/orq-rc/src/models/operations/index.ts +0 -2
  59. package/packages/orq-rc/src/models/operations/listagents.ts +6 -0
  60. package/packages/orq-rc/src/models/operations/listdeploymentversions.ts +2 -2
  61. package/packages/orq-rc/src/models/operations/listpromptversions.ts +1 -1
  62. package/packages/orq-rc/src/models/operations/mcpgatewaylist.ts +0 -7
  63. package/packages/orq-rc/src/models/operations/modelcreate.ts +3 -0
  64. package/packages/orq-rc/src/models/operations/modelcreateawsbedrock.ts +6 -0
  65. package/packages/orq-rc/src/models/operations/modelcreateopenailike.ts +6 -0
  66. package/packages/orq-rc/src/models/operations/modelcreatevertex.ts +7 -0
  67. package/packages/orq-rc/src/models/operations/modelupdate.ts +7 -0
  68. package/packages/orq-rc/src/models/operations/modelupdateawsbedrock.ts +3 -0
  69. package/packages/orq-rc/src/models/operations/modelupdateopenailike.ts +3 -0
  70. package/packages/orq-rc/src/models/operations/patchv2humanevalsetsid.ts +2 -2
  71. package/packages/orq-rc/src/models/operations/postv2humanevalsets.ts +21 -35
  72. package/packages/orq-rc/src/models/operations/retrieveagentrequest.ts +6 -0
  73. package/packages/orq-rc/src/models/operations/retrieveresponse.ts +1 -1
  74. package/packages/orq-rc/src/models/operations/retrievetool.ts +4 -4
  75. package/packages/orq-rc/src/models/operations/runagent.ts +1 -1
  76. package/packages/orq-rc/src/models/operations/streamrunagent.ts +1 -1
  77. package/packages/orq-rc/src/models/operations/updateagent.ts +6 -0
  78. package/packages/orq-rc/src/models/operations/updateprompt.ts +1 -1
  79. package/packages/orq-rc/src/models/operations/updatetool.ts +4 -4
  80. package/packages/orq-rc/src/sdk/feedback.ts +0 -30
  81. package/packages/orq-rc/src/sdk/humanreviewsets.ts +25 -0
  82. package/packages/orq-rc/src/sdk/sdk.ts +5 -5
  83. package/src/lib/config.ts +3 -3
  84. package/src/models/components/reasoningpart.ts +1 -1
  85. package/src/models/operations/createtool.ts +4 -4
  86. package/src/models/operations/getalltools.ts +4 -4
  87. package/src/models/operations/getv2humanevalsets.ts +2 -2
  88. package/src/models/operations/getv2humanevalsetsid.ts +2 -2
  89. package/src/models/operations/listdeploymentversions.ts +1 -1
  90. package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
  91. package/src/models/operations/postv2feedbackevaluation.ts +4 -4
  92. package/src/models/operations/postv2humanevalsets.ts +2 -2
  93. package/src/models/operations/retrievetool.ts +4 -4
  94. package/src/models/operations/runagent.ts +1 -1
  95. package/src/models/operations/streamrunagent.ts +1 -1
  96. package/src/models/operations/updatetool.ts +4 -4
  97. package/packages/orq-rc/src/funcs/feedbackCreateEvaluation.ts +0 -173
  98. package/packages/orq-rc/src/funcs/feedbackRemoveEvaluation.ts +0 -173
  99. package/packages/orq-rc/src/models/components/mcpgatewaystatus.ts +0 -21
  100. package/packages/orq-rc/src/models/operations/postv2feedbackevaluation.ts +0 -453
  101. package/packages/orq-rc/src/models/operations/postv2feedbackevaluationremove.ts +0 -43
@@ -1,173 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod/v3";
6
- import { OrqCore } from "../core.js";
7
- import { encodeJSON } from "../lib/encodings.js";
8
- import { matchStatusCode } from "../lib/http.js";
9
- import * as M from "../lib/matchers.js";
10
- import { compactMap } from "../lib/primitives.js";
11
- import { safeParse } from "../lib/schemas.js";
12
- import { RequestOptions } from "../lib/sdks.js";
13
- import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
14
- import { pathToFunc } from "../lib/url.js";
15
- import {
16
- ConnectionError,
17
- InvalidRequestError,
18
- RequestAbortedError,
19
- RequestTimeoutError,
20
- UnexpectedClientError,
21
- } from "../models/errors/httpclienterrors.js";
22
- import * as errors from "../models/errors/index.js";
23
- import { OrqError } from "../models/errors/orqerror.js";
24
- import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
25
- import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
26
- import * as operations from "../models/operations/index.js";
27
- import { APICall, APIPromise } from "../types/async.js";
28
- import { Result } from "../types/fp.js";
29
-
30
- /**
31
- * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
32
- */
33
- export function feedbackRemoveEvaluation(
34
- client: OrqCore,
35
- request?: operations.PostV2FeedbackEvaluationRemoveRequestBody | undefined,
36
- options?: RequestOptions,
37
- ): APIPromise<
38
- Result<
39
- void,
40
- | errors.ErrorResponse
41
- | OrqError
42
- | ResponseValidationError
43
- | ConnectionError
44
- | RequestAbortedError
45
- | RequestTimeoutError
46
- | InvalidRequestError
47
- | UnexpectedClientError
48
- | SDKValidationError
49
- >
50
- > {
51
- return new APIPromise($do(
52
- client,
53
- request,
54
- options,
55
- ));
56
- }
57
-
58
- async function $do(
59
- client: OrqCore,
60
- request?: operations.PostV2FeedbackEvaluationRemoveRequestBody | undefined,
61
- options?: RequestOptions,
62
- ): Promise<
63
- [
64
- Result<
65
- void,
66
- | errors.ErrorResponse
67
- | OrqError
68
- | ResponseValidationError
69
- | ConnectionError
70
- | RequestAbortedError
71
- | RequestTimeoutError
72
- | InvalidRequestError
73
- | UnexpectedClientError
74
- | SDKValidationError
75
- >,
76
- APICall,
77
- ]
78
- > {
79
- const parsed = safeParse(
80
- request,
81
- (value) =>
82
- operations.PostV2FeedbackEvaluationRemoveRequestBody$outboundSchema
83
- .optional().parse(value),
84
- "Input validation failed",
85
- );
86
- if (!parsed.ok) {
87
- return [parsed, { status: "invalid" }];
88
- }
89
- const payload = parsed.value;
90
- const body = payload === undefined
91
- ? null
92
- : encodeJSON("body", payload, { explode: true });
93
-
94
- const path = pathToFunc("/v2/feedback/evaluation/remove")();
95
-
96
- const headers = new Headers(compactMap({
97
- "Content-Type": "application/json",
98
- Accept: "application/json",
99
- }));
100
-
101
- const secConfig = await extractSecurity(client._options.apiKey);
102
- const securityInput = secConfig == null ? {} : { apiKey: secConfig };
103
- const requestSecurity = resolveGlobalSecurity(securityInput);
104
-
105
- const context = {
106
- options: client._options,
107
- baseURL: options?.serverURL ?? client._baseURL ?? "",
108
- operationID: "post_/v2/feedback/evaluation/remove",
109
- oAuth2Scopes: null,
110
-
111
- resolvedSecurity: requestSecurity,
112
-
113
- securitySource: client._options.apiKey,
114
- retryConfig: options?.retries
115
- || client._options.retryConfig
116
- || { strategy: "none" },
117
- retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
118
- };
119
-
120
- const requestRes = client._createRequest(context, {
121
- security: requestSecurity,
122
- method: "POST",
123
- baseURL: options?.serverURL,
124
- path: path,
125
- headers: headers,
126
- body: body,
127
- userAgent: client._options.userAgent,
128
- timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
129
- }, options);
130
- if (!requestRes.ok) {
131
- return [requestRes, { status: "invalid" }];
132
- }
133
- const req = requestRes.value;
134
-
135
- const doResult = await client._do(req, {
136
- context,
137
- isErrorStatusCode: (statusCode: number) =>
138
- matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
139
- retryConfig: context.retryConfig,
140
- retryCodes: context.retryCodes,
141
- });
142
- if (!doResult.ok) {
143
- return [doResult, { status: "request-error", request: req }];
144
- }
145
- const response = doResult.value;
146
-
147
- const responseFields = {
148
- HttpMeta: { Response: response, Request: req },
149
- };
150
-
151
- const [result] = await M.match<
152
- void,
153
- | errors.ErrorResponse
154
- | OrqError
155
- | ResponseValidationError
156
- | ConnectionError
157
- | RequestAbortedError
158
- | RequestTimeoutError
159
- | InvalidRequestError
160
- | UnexpectedClientError
161
- | SDKValidationError
162
- >(
163
- M.nil(200, z.void()),
164
- M.jsonErr(401, errors.ErrorResponse$inboundSchema),
165
- M.fail("4XX"),
166
- M.fail("5XX"),
167
- )(response, req, { extraFields: responseFields });
168
- if (!result.ok) {
169
- return [result, { status: "complete", request: req, response }];
170
- }
171
-
172
- return [result, { status: "complete", request: req, response }];
173
- }
@@ -1,21 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod/v3";
6
- import { ClosedEnum } from "../../types/enums.js";
7
-
8
- export const McpGatewayStatus = {
9
- McpGatewayStatusActive: "MCP_GATEWAY_STATUS_ACTIVE",
10
- McpGatewayStatusDisabled: "MCP_GATEWAY_STATUS_DISABLED",
11
- } as const;
12
- export type McpGatewayStatus = ClosedEnum<typeof McpGatewayStatus>;
13
-
14
- /** @internal */
15
- export const McpGatewayStatus$inboundSchema: z.ZodNativeEnum<
16
- typeof McpGatewayStatus
17
- > = z.nativeEnum(McpGatewayStatus);
18
- /** @internal */
19
- export const McpGatewayStatus$outboundSchema: z.ZodNativeEnum<
20
- typeof McpGatewayStatus
21
- > = McpGatewayStatus$inboundSchema;
@@ -1,453 +0,0 @@
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 { ClosedEnum } from "../../types/enums.js";
8
-
9
- /**
10
- * The type of evaluation
11
- */
12
- export const PostV2FeedbackEvaluationRequestBodyFeedbackEvaluationType = {
13
- HumanReview: "human_review",
14
- } as const;
15
- /**
16
- * The type of evaluation
17
- */
18
- export type PostV2FeedbackEvaluationRequestBodyFeedbackEvaluationType =
19
- ClosedEnum<typeof PostV2FeedbackEvaluationRequestBodyFeedbackEvaluationType>;
20
-
21
- export const PostV2FeedbackEvaluationRequestBodyFeedbackRequestSource = {
22
- Orq: "orq",
23
- External: "external",
24
- } as const;
25
- export type PostV2FeedbackEvaluationRequestBodyFeedbackRequestSource =
26
- ClosedEnum<typeof PostV2FeedbackEvaluationRequestBodyFeedbackRequestSource>;
27
-
28
- export type RequestBody4 = {
29
- /**
30
- * The unique identifier of the human evaluation
31
- */
32
- id: string;
33
- /**
34
- * The type of evaluation
35
- */
36
- evaluationType: PostV2FeedbackEvaluationRequestBodyFeedbackEvaluationType;
37
- /**
38
- * The unique identifier of the human review. Omitted on corrections, which inherit the parent evaluator output schema.
39
- */
40
- humanReviewId?: string | undefined;
41
- source?: PostV2FeedbackEvaluationRequestBodyFeedbackRequestSource | undefined;
42
- /**
43
- * Optional free-text explanation of the value
44
- */
45
- explanation?: string | undefined;
46
- /**
47
- * Deprecated. The date and time the item was reviewed
48
- *
49
- * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
50
- */
51
- reviewedAt?: Date | undefined;
52
- type: "string_array";
53
- values: Array<string>;
54
- traceId: string;
55
- };
56
-
57
- /**
58
- * The type of evaluation
59
- */
60
- export const PostV2FeedbackEvaluationRequestBodyEvaluationType = {
61
- HumanReview: "human_review",
62
- } as const;
63
- /**
64
- * The type of evaluation
65
- */
66
- export type PostV2FeedbackEvaluationRequestBodyEvaluationType = ClosedEnum<
67
- typeof PostV2FeedbackEvaluationRequestBodyEvaluationType
68
- >;
69
-
70
- export const PostV2FeedbackEvaluationRequestBodyFeedbackSource = {
71
- Orq: "orq",
72
- External: "external",
73
- } as const;
74
- export type PostV2FeedbackEvaluationRequestBodyFeedbackSource = ClosedEnum<
75
- typeof PostV2FeedbackEvaluationRequestBodyFeedbackSource
76
- >;
77
-
78
- export type Three = {
79
- /**
80
- * The unique identifier of the human evaluation
81
- */
82
- id: string;
83
- /**
84
- * The type of evaluation
85
- */
86
- evaluationType: PostV2FeedbackEvaluationRequestBodyEvaluationType;
87
- /**
88
- * The unique identifier of the human review. Omitted on corrections, which inherit the parent evaluator output schema.
89
- */
90
- humanReviewId?: string | undefined;
91
- source?: PostV2FeedbackEvaluationRequestBodyFeedbackSource | undefined;
92
- /**
93
- * Optional free-text explanation of the value
94
- */
95
- explanation?: string | undefined;
96
- /**
97
- * Deprecated. The date and time the item was reviewed
98
- *
99
- * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
100
- */
101
- reviewedAt?: Date | undefined;
102
- type: "boolean";
103
- value: boolean;
104
- traceId: string;
105
- };
106
-
107
- /**
108
- * The type of evaluation
109
- */
110
- export const RequestBodyEvaluationType = {
111
- HumanReview: "human_review",
112
- } as const;
113
- /**
114
- * The type of evaluation
115
- */
116
- export type RequestBodyEvaluationType = ClosedEnum<
117
- typeof RequestBodyEvaluationType
118
- >;
119
-
120
- export const PostV2FeedbackEvaluationRequestBodySource = {
121
- Orq: "orq",
122
- External: "external",
123
- } as const;
124
- export type PostV2FeedbackEvaluationRequestBodySource = ClosedEnum<
125
- typeof PostV2FeedbackEvaluationRequestBodySource
126
- >;
127
-
128
- export type RequestBody2 = {
129
- /**
130
- * The unique identifier of the human evaluation
131
- */
132
- id: string;
133
- /**
134
- * The type of evaluation
135
- */
136
- evaluationType: RequestBodyEvaluationType;
137
- /**
138
- * The unique identifier of the human review. Omitted on corrections, which inherit the parent evaluator output schema.
139
- */
140
- humanReviewId?: string | undefined;
141
- source?: PostV2FeedbackEvaluationRequestBodySource | undefined;
142
- /**
143
- * Optional free-text explanation of the value
144
- */
145
- explanation?: string | undefined;
146
- /**
147
- * Deprecated. The date and time the item was reviewed
148
- *
149
- * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
150
- */
151
- reviewedAt?: Date | undefined;
152
- type: "number";
153
- value: number;
154
- traceId: string;
155
- };
156
-
157
- /**
158
- * The type of evaluation
159
- */
160
- export const EvaluationType = {
161
- HumanReview: "human_review",
162
- } as const;
163
- /**
164
- * The type of evaluation
165
- */
166
- export type EvaluationType = ClosedEnum<typeof EvaluationType>;
167
-
168
- export const RequestBodySource = {
169
- Orq: "orq",
170
- External: "external",
171
- } as const;
172
- export type RequestBodySource = ClosedEnum<typeof RequestBodySource>;
173
-
174
- export type RequestBody1 = {
175
- /**
176
- * The unique identifier of the human evaluation
177
- */
178
- id: string;
179
- /**
180
- * The type of evaluation
181
- */
182
- evaluationType: EvaluationType;
183
- /**
184
- * The unique identifier of the human review. Omitted on corrections, which inherit the parent evaluator output schema.
185
- */
186
- humanReviewId?: string | undefined;
187
- source?: RequestBodySource | undefined;
188
- /**
189
- * Optional free-text explanation of the value
190
- */
191
- explanation?: string | undefined;
192
- /**
193
- * Deprecated. The date and time the item was reviewed
194
- *
195
- * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
196
- */
197
- reviewedAt?: Date | undefined;
198
- type: "string";
199
- value: string;
200
- traceId: string;
201
- };
202
-
203
- export type PostV2FeedbackEvaluationRequestBody =
204
- | RequestBody1
205
- | RequestBody2
206
- | Three
207
- | RequestBody4;
208
-
209
- /** @internal */
210
- export const PostV2FeedbackEvaluationRequestBodyFeedbackEvaluationType$outboundSchema:
211
- z.ZodNativeEnum<
212
- typeof PostV2FeedbackEvaluationRequestBodyFeedbackEvaluationType
213
- > = z.nativeEnum(PostV2FeedbackEvaluationRequestBodyFeedbackEvaluationType);
214
-
215
- /** @internal */
216
- export const PostV2FeedbackEvaluationRequestBodyFeedbackRequestSource$outboundSchema:
217
- z.ZodNativeEnum<
218
- typeof PostV2FeedbackEvaluationRequestBodyFeedbackRequestSource
219
- > = z.nativeEnum(PostV2FeedbackEvaluationRequestBodyFeedbackRequestSource);
220
-
221
- /** @internal */
222
- export type RequestBody4$Outbound = {
223
- id: string;
224
- evaluation_type: string;
225
- human_review_id?: string | undefined;
226
- source: string;
227
- explanation?: string | undefined;
228
- reviewed_at: string;
229
- type: "string_array";
230
- values: Array<string>;
231
- trace_id: string;
232
- };
233
-
234
- /** @internal */
235
- export const RequestBody4$outboundSchema: z.ZodType<
236
- RequestBody4$Outbound,
237
- z.ZodTypeDef,
238
- RequestBody4
239
- > = z.object({
240
- id: z.string(),
241
- evaluationType:
242
- PostV2FeedbackEvaluationRequestBodyFeedbackEvaluationType$outboundSchema,
243
- humanReviewId: z.string().optional(),
244
- source:
245
- PostV2FeedbackEvaluationRequestBodyFeedbackRequestSource$outboundSchema
246
- .default("orq"),
247
- explanation: z.string().optional(),
248
- reviewedAt: z.date().default(() => new Date("2026-10-20T05:21:34.751Z"))
249
- .transform(v => v.toISOString()),
250
- type: z.literal("string_array"),
251
- values: z.array(z.string()),
252
- traceId: z.string(),
253
- }).transform((v) => {
254
- return remap$(v, {
255
- evaluationType: "evaluation_type",
256
- humanReviewId: "human_review_id",
257
- reviewedAt: "reviewed_at",
258
- traceId: "trace_id",
259
- });
260
- });
261
-
262
- export function requestBody4ToJSON(requestBody4: RequestBody4): string {
263
- return JSON.stringify(RequestBody4$outboundSchema.parse(requestBody4));
264
- }
265
-
266
- /** @internal */
267
- export const PostV2FeedbackEvaluationRequestBodyEvaluationType$outboundSchema:
268
- z.ZodNativeEnum<typeof PostV2FeedbackEvaluationRequestBodyEvaluationType> = z
269
- .nativeEnum(PostV2FeedbackEvaluationRequestBodyEvaluationType);
270
-
271
- /** @internal */
272
- export const PostV2FeedbackEvaluationRequestBodyFeedbackSource$outboundSchema:
273
- z.ZodNativeEnum<typeof PostV2FeedbackEvaluationRequestBodyFeedbackSource> = z
274
- .nativeEnum(PostV2FeedbackEvaluationRequestBodyFeedbackSource);
275
-
276
- /** @internal */
277
- export type Three$Outbound = {
278
- id: string;
279
- evaluation_type: string;
280
- human_review_id?: string | undefined;
281
- source: string;
282
- explanation?: string | undefined;
283
- reviewed_at: string;
284
- type: "boolean";
285
- value: boolean;
286
- trace_id: string;
287
- };
288
-
289
- /** @internal */
290
- export const Three$outboundSchema: z.ZodType<
291
- Three$Outbound,
292
- z.ZodTypeDef,
293
- Three
294
- > = z.object({
295
- id: z.string(),
296
- evaluationType:
297
- PostV2FeedbackEvaluationRequestBodyEvaluationType$outboundSchema,
298
- humanReviewId: z.string().optional(),
299
- source: PostV2FeedbackEvaluationRequestBodyFeedbackSource$outboundSchema
300
- .default("orq"),
301
- explanation: z.string().optional(),
302
- reviewedAt: z.date().default(() => new Date("2026-10-20T05:21:34.751Z"))
303
- .transform(v => v.toISOString()),
304
- type: z.literal("boolean"),
305
- value: z.boolean(),
306
- traceId: z.string(),
307
- }).transform((v) => {
308
- return remap$(v, {
309
- evaluationType: "evaluation_type",
310
- humanReviewId: "human_review_id",
311
- reviewedAt: "reviewed_at",
312
- traceId: "trace_id",
313
- });
314
- });
315
-
316
- export function threeToJSON(three: Three): string {
317
- return JSON.stringify(Three$outboundSchema.parse(three));
318
- }
319
-
320
- /** @internal */
321
- export const RequestBodyEvaluationType$outboundSchema: z.ZodNativeEnum<
322
- typeof RequestBodyEvaluationType
323
- > = z.nativeEnum(RequestBodyEvaluationType);
324
-
325
- /** @internal */
326
- export const PostV2FeedbackEvaluationRequestBodySource$outboundSchema:
327
- z.ZodNativeEnum<typeof PostV2FeedbackEvaluationRequestBodySource> = z
328
- .nativeEnum(PostV2FeedbackEvaluationRequestBodySource);
329
-
330
- /** @internal */
331
- export type RequestBody2$Outbound = {
332
- id: string;
333
- evaluation_type: string;
334
- human_review_id?: string | undefined;
335
- source: string;
336
- explanation?: string | undefined;
337
- reviewed_at: string;
338
- type: "number";
339
- value: number;
340
- trace_id: string;
341
- };
342
-
343
- /** @internal */
344
- export const RequestBody2$outboundSchema: z.ZodType<
345
- RequestBody2$Outbound,
346
- z.ZodTypeDef,
347
- RequestBody2
348
- > = z.object({
349
- id: z.string(),
350
- evaluationType: RequestBodyEvaluationType$outboundSchema,
351
- humanReviewId: z.string().optional(),
352
- source: PostV2FeedbackEvaluationRequestBodySource$outboundSchema.default(
353
- "orq",
354
- ),
355
- explanation: z.string().optional(),
356
- reviewedAt: z.date().default(() => new Date("2026-10-20T05:21:34.751Z"))
357
- .transform(v => v.toISOString()),
358
- type: z.literal("number"),
359
- value: z.number(),
360
- traceId: z.string(),
361
- }).transform((v) => {
362
- return remap$(v, {
363
- evaluationType: "evaluation_type",
364
- humanReviewId: "human_review_id",
365
- reviewedAt: "reviewed_at",
366
- traceId: "trace_id",
367
- });
368
- });
369
-
370
- export function requestBody2ToJSON(requestBody2: RequestBody2): string {
371
- return JSON.stringify(RequestBody2$outboundSchema.parse(requestBody2));
372
- }
373
-
374
- /** @internal */
375
- export const EvaluationType$outboundSchema: z.ZodNativeEnum<
376
- typeof EvaluationType
377
- > = z.nativeEnum(EvaluationType);
378
-
379
- /** @internal */
380
- export const RequestBodySource$outboundSchema: z.ZodNativeEnum<
381
- typeof RequestBodySource
382
- > = z.nativeEnum(RequestBodySource);
383
-
384
- /** @internal */
385
- export type RequestBody1$Outbound = {
386
- id: string;
387
- evaluation_type: string;
388
- human_review_id?: string | undefined;
389
- source: string;
390
- explanation?: string | undefined;
391
- reviewed_at: string;
392
- type: "string";
393
- value: string;
394
- trace_id: string;
395
- };
396
-
397
- /** @internal */
398
- export const RequestBody1$outboundSchema: z.ZodType<
399
- RequestBody1$Outbound,
400
- z.ZodTypeDef,
401
- RequestBody1
402
- > = z.object({
403
- id: z.string(),
404
- evaluationType: EvaluationType$outboundSchema,
405
- humanReviewId: z.string().optional(),
406
- source: RequestBodySource$outboundSchema.default("orq"),
407
- explanation: z.string().optional(),
408
- reviewedAt: z.date().default(() => new Date("2026-10-20T05:21:34.750Z"))
409
- .transform(v => v.toISOString()),
410
- type: z.literal("string"),
411
- value: z.string(),
412
- traceId: z.string(),
413
- }).transform((v) => {
414
- return remap$(v, {
415
- evaluationType: "evaluation_type",
416
- humanReviewId: "human_review_id",
417
- reviewedAt: "reviewed_at",
418
- traceId: "trace_id",
419
- });
420
- });
421
-
422
- export function requestBody1ToJSON(requestBody1: RequestBody1): string {
423
- return JSON.stringify(RequestBody1$outboundSchema.parse(requestBody1));
424
- }
425
-
426
- /** @internal */
427
- export type PostV2FeedbackEvaluationRequestBody$Outbound =
428
- | RequestBody1$Outbound
429
- | RequestBody2$Outbound
430
- | Three$Outbound
431
- | RequestBody4$Outbound;
432
-
433
- /** @internal */
434
- export const PostV2FeedbackEvaluationRequestBody$outboundSchema: z.ZodType<
435
- PostV2FeedbackEvaluationRequestBody$Outbound,
436
- z.ZodTypeDef,
437
- PostV2FeedbackEvaluationRequestBody
438
- > = z.union([
439
- z.lazy(() => RequestBody1$outboundSchema),
440
- z.lazy(() => RequestBody2$outboundSchema),
441
- z.lazy(() => Three$outboundSchema),
442
- z.lazy(() => RequestBody4$outboundSchema),
443
- ]);
444
-
445
- export function postV2FeedbackEvaluationRequestBodyToJSON(
446
- postV2FeedbackEvaluationRequestBody: PostV2FeedbackEvaluationRequestBody,
447
- ): string {
448
- return JSON.stringify(
449
- PostV2FeedbackEvaluationRequestBody$outboundSchema.parse(
450
- postV2FeedbackEvaluationRequestBody,
451
- ),
452
- );
453
- }
@@ -1,43 +0,0 @@
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
-
8
- export type PostV2FeedbackEvaluationRemoveRequestBody = {
9
- id: string;
10
- traceId: string;
11
- };
12
-
13
- /** @internal */
14
- export type PostV2FeedbackEvaluationRemoveRequestBody$Outbound = {
15
- id: string;
16
- trace_id: string;
17
- };
18
-
19
- /** @internal */
20
- export const PostV2FeedbackEvaluationRemoveRequestBody$outboundSchema:
21
- z.ZodType<
22
- PostV2FeedbackEvaluationRemoveRequestBody$Outbound,
23
- z.ZodTypeDef,
24
- PostV2FeedbackEvaluationRemoveRequestBody
25
- > = z.object({
26
- id: z.string(),
27
- traceId: z.string(),
28
- }).transform((v) => {
29
- return remap$(v, {
30
- traceId: "trace_id",
31
- });
32
- });
33
-
34
- export function postV2FeedbackEvaluationRemoveRequestBodyToJSON(
35
- postV2FeedbackEvaluationRemoveRequestBody:
36
- PostV2FeedbackEvaluationRemoveRequestBody,
37
- ): string {
38
- return JSON.stringify(
39
- PostV2FeedbackEvaluationRemoveRequestBody$outboundSchema.parse(
40
- postV2FeedbackEvaluationRemoveRequestBody,
41
- ),
42
- );
43
- }