@orq-ai/node 4.17.18 → 4.17.20

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 (69) hide show
  1. package/jsr.json +1 -1
  2. package/lib/config.d.ts +2 -2
  3. package/lib/config.js +2 -2
  4. package/models/components/modelmetadata.d.ts +2 -0
  5. package/models/components/modelmetadata.d.ts.map +1 -1
  6. package/models/components/modelmetadata.js +4 -0
  7. package/models/components/modelmetadata.js.map +1 -1
  8. package/models/components/reasoningpart.js +1 -1
  9. package/models/operations/createtool.js +4 -4
  10. package/models/operations/getalltools.js +4 -4
  11. package/models/operations/getv2humanevalsets.js +2 -2
  12. package/models/operations/getv2humanevalsetsid.js +2 -2
  13. package/models/operations/listdeploymentversions.js +1 -1
  14. package/models/operations/patchv2humanevalsetsid.js +2 -2
  15. package/models/operations/postv2humanevalsets.js +2 -2
  16. package/models/operations/retrievetool.js +4 -4
  17. package/models/operations/runagent.js +1 -1
  18. package/models/operations/streamrunagent.js +1 -1
  19. package/models/operations/updatetool.js +4 -4
  20. package/package.json +8 -8
  21. package/packages/orq-rc/src/lib/config.ts +3 -3
  22. package/packages/orq-rc/src/models/components/mcptool.ts +52 -0
  23. package/packages/orq-rc/src/models/components/mcptoolannotations.ts +7 -2
  24. package/packages/orq-rc/src/models/components/reasoningpart.ts +1 -1
  25. package/packages/orq-rc/src/models/components/updatedatasetrequest.ts +6 -0
  26. package/packages/orq-rc/src/models/operations/createeval.ts +7 -11
  27. package/packages/orq-rc/src/models/operations/createprompt.ts +1 -0
  28. package/packages/orq-rc/src/models/operations/createtool.ts +4 -4
  29. package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +1 -0
  30. package/packages/orq-rc/src/models/operations/deployments.ts +1 -0
  31. package/packages/orq-rc/src/models/operations/deploymentstream.ts +1 -0
  32. package/packages/orq-rc/src/models/operations/getallprompts.ts +1 -0
  33. package/packages/orq-rc/src/models/operations/getalltools.ts +4 -4
  34. package/packages/orq-rc/src/models/operations/getoneprompt.ts +1 -0
  35. package/packages/orq-rc/src/models/operations/getpromptversion.ts +1 -0
  36. package/packages/orq-rc/src/models/operations/index.ts +0 -5
  37. package/packages/orq-rc/src/models/operations/listdeploymentversions.ts +3 -1
  38. package/packages/orq-rc/src/models/operations/listpromptversions.ts +1 -0
  39. package/packages/orq-rc/src/models/operations/retrievetool.ts +4 -4
  40. package/packages/orq-rc/src/models/operations/runagent.ts +1 -1
  41. package/packages/orq-rc/src/models/operations/streamrunagent.ts +1 -1
  42. package/packages/orq-rc/src/models/operations/updateprompt.ts +1 -0
  43. package/packages/orq-rc/src/models/operations/updatetool.ts +4 -4
  44. package/packages/orq-rc/src/sdk/sdk.ts +0 -6
  45. package/src/lib/config.ts +2 -2
  46. package/src/models/components/modelmetadata.ts +6 -0
  47. package/src/models/components/reasoningpart.ts +1 -1
  48. package/src/models/operations/createtool.ts +4 -4
  49. package/src/models/operations/getalltools.ts +4 -4
  50. package/src/models/operations/getv2humanevalsets.ts +2 -2
  51. package/src/models/operations/getv2humanevalsetsid.ts +2 -2
  52. package/src/models/operations/listdeploymentversions.ts +1 -1
  53. package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
  54. package/src/models/operations/postv2humanevalsets.ts +2 -2
  55. package/src/models/operations/retrievetool.ts +4 -4
  56. package/src/models/operations/runagent.ts +1 -1
  57. package/src/models/operations/streamrunagent.ts +1 -1
  58. package/src/models/operations/updatetool.ts +4 -4
  59. package/packages/orq-rc/src/funcs/humanReviewSetsCreate.ts +0 -178
  60. package/packages/orq-rc/src/funcs/humanReviewSetsDelete.ts +0 -180
  61. package/packages/orq-rc/src/funcs/humanReviewSetsGet.ts +0 -179
  62. package/packages/orq-rc/src/funcs/humanReviewSetsList.ts +0 -181
  63. package/packages/orq-rc/src/funcs/humanReviewSetsUpdate.ts +0 -180
  64. package/packages/orq-rc/src/models/operations/deletev2humanevalsetsid.ts +0 -36
  65. package/packages/orq-rc/src/models/operations/getv2humanevalsets.ts +0 -234
  66. package/packages/orq-rc/src/models/operations/getv2humanevalsetsid.ts +0 -235
  67. package/packages/orq-rc/src/models/operations/patchv2humanevalsetsid.ts +0 -415
  68. package/packages/orq-rc/src/models/operations/postv2humanevalsets.ts +0 -351
  69. package/packages/orq-rc/src/sdk/humanreviewsets.ts +0 -109
@@ -1,181 +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 { encodeFormQuery } 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
- * Get all human review sets
32
- *
33
- * @remarks
34
- * Deprecated: Human Review Sets are replaced by project-level human reviews (Annotations) and will be removed in release 4.18.
35
- *
36
- * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
37
- */
38
- export function humanReviewSetsList(
39
- client: OrqCore,
40
- request?: operations.GetV2HumanEvalSetsRequest | undefined,
41
- options?: RequestOptions,
42
- ): APIPromise<
43
- Result<
44
- Array<operations.ResponseBody>,
45
- | errors.ErrorResponse
46
- | OrqError
47
- | ResponseValidationError
48
- | ConnectionError
49
- | RequestAbortedError
50
- | RequestTimeoutError
51
- | InvalidRequestError
52
- | UnexpectedClientError
53
- | SDKValidationError
54
- >
55
- > {
56
- return new APIPromise($do(
57
- client,
58
- request,
59
- options,
60
- ));
61
- }
62
-
63
- async function $do(
64
- client: OrqCore,
65
- request?: operations.GetV2HumanEvalSetsRequest | undefined,
66
- options?: RequestOptions,
67
- ): Promise<
68
- [
69
- Result<
70
- Array<operations.ResponseBody>,
71
- | errors.ErrorResponse
72
- | OrqError
73
- | ResponseValidationError
74
- | ConnectionError
75
- | RequestAbortedError
76
- | RequestTimeoutError
77
- | InvalidRequestError
78
- | UnexpectedClientError
79
- | SDKValidationError
80
- >,
81
- APICall,
82
- ]
83
- > {
84
- const parsed = safeParse(
85
- request,
86
- (value) =>
87
- operations.GetV2HumanEvalSetsRequest$outboundSchema.optional().parse(
88
- value,
89
- ),
90
- "Input validation failed",
91
- );
92
- if (!parsed.ok) {
93
- return [parsed, { status: "invalid" }];
94
- }
95
- const payload = parsed.value;
96
- const body = null;
97
-
98
- const path = pathToFunc("/v2/human-eval-sets")();
99
-
100
- const query = encodeFormQuery({
101
- "project_id": payload?.project_id,
102
- });
103
-
104
- const headers = new Headers(compactMap({
105
- Accept: "application/json",
106
- }));
107
-
108
- const secConfig = await extractSecurity(client._options.apiKey);
109
- const securityInput = secConfig == null ? {} : { apiKey: secConfig };
110
- const requestSecurity = resolveGlobalSecurity(securityInput);
111
-
112
- const context = {
113
- options: client._options,
114
- baseURL: options?.serverURL ?? client._baseURL ?? "",
115
- operationID: "get_/v2/human-eval-sets",
116
- oAuth2Scopes: null,
117
-
118
- resolvedSecurity: requestSecurity,
119
-
120
- securitySource: client._options.apiKey,
121
- retryConfig: options?.retries
122
- || client._options.retryConfig
123
- || { strategy: "none" },
124
- retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
125
- };
126
-
127
- const requestRes = client._createRequest(context, {
128
- security: requestSecurity,
129
- method: "GET",
130
- baseURL: options?.serverURL,
131
- path: path,
132
- headers: headers,
133
- query: query,
134
- body: body,
135
- userAgent: client._options.userAgent,
136
- timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
137
- }, options);
138
- if (!requestRes.ok) {
139
- return [requestRes, { status: "invalid" }];
140
- }
141
- const req = requestRes.value;
142
-
143
- const doResult = await client._do(req, {
144
- context,
145
- isErrorStatusCode: (statusCode: number) =>
146
- matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
147
- retryConfig: context.retryConfig,
148
- retryCodes: context.retryCodes,
149
- });
150
- if (!doResult.ok) {
151
- return [doResult, { status: "request-error", request: req }];
152
- }
153
- const response = doResult.value;
154
-
155
- const responseFields = {
156
- HttpMeta: { Response: response, Request: req },
157
- };
158
-
159
- const [result] = await M.match<
160
- Array<operations.ResponseBody>,
161
- | errors.ErrorResponse
162
- | OrqError
163
- | ResponseValidationError
164
- | ConnectionError
165
- | RequestAbortedError
166
- | RequestTimeoutError
167
- | InvalidRequestError
168
- | UnexpectedClientError
169
- | SDKValidationError
170
- >(
171
- M.json(200, z.array(operations.ResponseBody$inboundSchema)),
172
- M.jsonErr(401, errors.ErrorResponse$inboundSchema),
173
- M.fail("4XX"),
174
- M.fail("5XX"),
175
- )(response, req, { extraFields: responseFields });
176
- if (!result.ok) {
177
- return [result, { status: "complete", request: req, response }];
178
- }
179
-
180
- return [result, { status: "complete", request: req, response }];
181
- }
@@ -1,180 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import { OrqCore } from "../core.js";
6
- import { encodeJSON, encodeSimple } 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
- * Update a human review set
31
- *
32
- * @remarks
33
- * Deprecated: Human Review Sets are replaced by project-level human reviews (Annotations) and will be removed in release 4.18.
34
- *
35
- * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
36
- */
37
- export function humanReviewSetsUpdate(
38
- client: OrqCore,
39
- request: operations.PatchV2HumanEvalSetsIdRequest,
40
- options?: RequestOptions,
41
- ): APIPromise<
42
- Result<
43
- operations.PatchV2HumanEvalSetsIdResponseBody,
44
- | errors.ErrorResponse
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.PatchV2HumanEvalSetsIdRequest,
65
- options?: RequestOptions,
66
- ): Promise<
67
- [
68
- Result<
69
- operations.PatchV2HumanEvalSetsIdResponseBody,
70
- | errors.ErrorResponse
71
- | OrqError
72
- | ResponseValidationError
73
- | ConnectionError
74
- | RequestAbortedError
75
- | RequestTimeoutError
76
- | InvalidRequestError
77
- | UnexpectedClientError
78
- | SDKValidationError
79
- >,
80
- APICall,
81
- ]
82
- > {
83
- const parsed = safeParse(
84
- request,
85
- (value) =>
86
- operations.PatchV2HumanEvalSetsIdRequest$outboundSchema.parse(value),
87
- "Input validation failed",
88
- );
89
- if (!parsed.ok) {
90
- return [parsed, { status: "invalid" }];
91
- }
92
- const payload = parsed.value;
93
- const body = encodeJSON("body", payload.RequestBody, { explode: true });
94
-
95
- const pathParams = {
96
- id: encodeSimple("id", payload.id, {
97
- explode: false,
98
- charEncoding: "percent",
99
- }),
100
- };
101
- const path = pathToFunc("/v2/human-eval-sets/{id}")(pathParams);
102
-
103
- const headers = new Headers(compactMap({
104
- "Content-Type": "application/json",
105
- Accept: "application/json",
106
- }));
107
-
108
- const secConfig = await extractSecurity(client._options.apiKey);
109
- const securityInput = secConfig == null ? {} : { apiKey: secConfig };
110
- const requestSecurity = resolveGlobalSecurity(securityInput);
111
-
112
- const context = {
113
- options: client._options,
114
- baseURL: options?.serverURL ?? client._baseURL ?? "",
115
- operationID: "patch_/v2/human-eval-sets/{id}",
116
- oAuth2Scopes: null,
117
-
118
- resolvedSecurity: requestSecurity,
119
-
120
- securitySource: client._options.apiKey,
121
- retryConfig: options?.retries
122
- || client._options.retryConfig
123
- || { strategy: "none" },
124
- retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
125
- };
126
-
127
- const requestRes = client._createRequest(context, {
128
- security: requestSecurity,
129
- method: "PATCH",
130
- baseURL: options?.serverURL,
131
- path: path,
132
- headers: headers,
133
- body: body,
134
- userAgent: client._options.userAgent,
135
- timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
136
- }, options);
137
- if (!requestRes.ok) {
138
- return [requestRes, { status: "invalid" }];
139
- }
140
- const req = requestRes.value;
141
-
142
- const doResult = await client._do(req, {
143
- context,
144
- isErrorStatusCode: (statusCode: number) =>
145
- matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
146
- retryConfig: context.retryConfig,
147
- retryCodes: context.retryCodes,
148
- });
149
- if (!doResult.ok) {
150
- return [doResult, { status: "request-error", request: req }];
151
- }
152
- const response = doResult.value;
153
-
154
- const responseFields = {
155
- HttpMeta: { Response: response, Request: req },
156
- };
157
-
158
- const [result] = await M.match<
159
- operations.PatchV2HumanEvalSetsIdResponseBody,
160
- | errors.ErrorResponse
161
- | OrqError
162
- | ResponseValidationError
163
- | ConnectionError
164
- | RequestAbortedError
165
- | RequestTimeoutError
166
- | InvalidRequestError
167
- | UnexpectedClientError
168
- | SDKValidationError
169
- >(
170
- M.json(200, operations.PatchV2HumanEvalSetsIdResponseBody$inboundSchema),
171
- M.jsonErr(401, errors.ErrorResponse$inboundSchema),
172
- M.fail("4XX"),
173
- M.fail("5XX"),
174
- )(response, req, { extraFields: responseFields });
175
- if (!result.ok) {
176
- return [result, { status: "complete", request: req, response }];
177
- }
178
-
179
- return [result, { status: "complete", request: req, response }];
180
- }
@@ -1,36 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod/v3";
6
-
7
- export type DeleteV2HumanEvalSetsIdRequest = {
8
- /**
9
- * The ID of the human review set to retrieve
10
- */
11
- id: string;
12
- };
13
-
14
- /** @internal */
15
- export type DeleteV2HumanEvalSetsIdRequest$Outbound = {
16
- id: string;
17
- };
18
-
19
- /** @internal */
20
- export const DeleteV2HumanEvalSetsIdRequest$outboundSchema: z.ZodType<
21
- DeleteV2HumanEvalSetsIdRequest$Outbound,
22
- z.ZodTypeDef,
23
- DeleteV2HumanEvalSetsIdRequest
24
- > = z.object({
25
- id: z.string(),
26
- });
27
-
28
- export function deleteV2HumanEvalSetsIdRequestToJSON(
29
- deleteV2HumanEvalSetsIdRequest: DeleteV2HumanEvalSetsIdRequest,
30
- ): string {
31
- return JSON.stringify(
32
- DeleteV2HumanEvalSetsIdRequest$outboundSchema.parse(
33
- deleteV2HumanEvalSetsIdRequest,
34
- ),
35
- );
36
- }
@@ -1,234 +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 { safeParse } from "../../lib/schemas.js";
8
- import { Result as SafeParseResult } from "../../types/fp.js";
9
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
-
11
- export type GetV2HumanEvalSetsRequest = {
12
- /**
13
- * Optional project ID to filter human review sets by project
14
- */
15
- projectId?: string | undefined;
16
- };
17
-
18
- export type GetV2HumanEvalSetsResponseBody2 = {
19
- /**
20
- * The id of the resource
21
- */
22
- id: string;
23
- /**
24
- * Display name of the human review set
25
- */
26
- displayName: string;
27
- /**
28
- * Detailed description of the human review set
29
- */
30
- description?: string | undefined;
31
- /**
32
- * Array of human review IDs to be applied to matching spans
33
- */
34
- humanEvalIds: Array<string>;
35
- workspaceId: string;
36
- /**
37
- * Optional project ID to scope this human review set to a specific project
38
- */
39
- projectId?: string | undefined;
40
- createdById?: string | undefined;
41
- updatedById?: string | undefined;
42
- /**
43
- * The date and time the resource was created
44
- */
45
- created?: Date | undefined;
46
- /**
47
- * The date and time the resource was last updated
48
- */
49
- updated: Date;
50
- filterType: "name";
51
- /**
52
- * Name pattern to match
53
- */
54
- filterValue: string;
55
- };
56
-
57
- export type GetV2HumanEvalSetsResponseBody1 = {
58
- /**
59
- * The id of the resource
60
- */
61
- id: string;
62
- /**
63
- * Display name of the human review set
64
- */
65
- displayName: string;
66
- /**
67
- * Detailed description of the human review set
68
- */
69
- description?: string | undefined;
70
- /**
71
- * Array of human review IDs to be applied to matching spans
72
- */
73
- humanEvalIds: Array<string>;
74
- workspaceId: string;
75
- /**
76
- * Optional project ID to scope this human review set to a specific project
77
- */
78
- projectId?: string | undefined;
79
- createdById?: string | undefined;
80
- updatedById?: string | undefined;
81
- /**
82
- * The date and time the resource was created
83
- */
84
- created?: Date | undefined;
85
- /**
86
- * The date and time the resource was last updated
87
- */
88
- updated: Date;
89
- filterType: "span_type";
90
- /**
91
- * Array of span types to match
92
- */
93
- filterValues: Array<string>;
94
- };
95
-
96
- export type ResponseBody =
97
- | GetV2HumanEvalSetsResponseBody1
98
- | GetV2HumanEvalSetsResponseBody2;
99
-
100
- /** @internal */
101
- export type GetV2HumanEvalSetsRequest$Outbound = {
102
- project_id?: string | undefined;
103
- };
104
-
105
- /** @internal */
106
- export const GetV2HumanEvalSetsRequest$outboundSchema: z.ZodType<
107
- GetV2HumanEvalSetsRequest$Outbound,
108
- z.ZodTypeDef,
109
- GetV2HumanEvalSetsRequest
110
- > = z.object({
111
- projectId: z.string().optional(),
112
- }).transform((v) => {
113
- return remap$(v, {
114
- projectId: "project_id",
115
- });
116
- });
117
-
118
- export function getV2HumanEvalSetsRequestToJSON(
119
- getV2HumanEvalSetsRequest: GetV2HumanEvalSetsRequest,
120
- ): string {
121
- return JSON.stringify(
122
- GetV2HumanEvalSetsRequest$outboundSchema.parse(getV2HumanEvalSetsRequest),
123
- );
124
- }
125
-
126
- /** @internal */
127
- export const GetV2HumanEvalSetsResponseBody2$inboundSchema: z.ZodType<
128
- GetV2HumanEvalSetsResponseBody2,
129
- z.ZodTypeDef,
130
- unknown
131
- > = z.object({
132
- _id: z.string(),
133
- display_name: z.string(),
134
- description: z.string().optional(),
135
- human_eval_ids: z.array(z.string()),
136
- workspace_id: z.string(),
137
- project_id: z.string().optional(),
138
- created_by_id: z.string().optional(),
139
- updated_by_id: z.string().optional(),
140
- created: z.string().datetime({ offset: true }).transform(v => new Date(v))
141
- .optional(),
142
- updated: z.string().datetime({ offset: true }).default(
143
- "2026-10-28T11:12:42.542Z",
144
- ).transform(v => new Date(v)),
145
- filter_type: z.literal("name"),
146
- filter_value: z.string(),
147
- }).transform((v) => {
148
- return remap$(v, {
149
- "_id": "id",
150
- "display_name": "displayName",
151
- "human_eval_ids": "humanEvalIds",
152
- "workspace_id": "workspaceId",
153
- "project_id": "projectId",
154
- "created_by_id": "createdById",
155
- "updated_by_id": "updatedById",
156
- "filter_type": "filterType",
157
- "filter_value": "filterValue",
158
- });
159
- });
160
-
161
- export function getV2HumanEvalSetsResponseBody2FromJSON(
162
- jsonString: string,
163
- ): SafeParseResult<GetV2HumanEvalSetsResponseBody2, SDKValidationError> {
164
- return safeParse(
165
- jsonString,
166
- (x) => GetV2HumanEvalSetsResponseBody2$inboundSchema.parse(JSON.parse(x)),
167
- `Failed to parse 'GetV2HumanEvalSetsResponseBody2' from JSON`,
168
- );
169
- }
170
-
171
- /** @internal */
172
- export const GetV2HumanEvalSetsResponseBody1$inboundSchema: z.ZodType<
173
- GetV2HumanEvalSetsResponseBody1,
174
- z.ZodTypeDef,
175
- unknown
176
- > = z.object({
177
- _id: z.string(),
178
- display_name: z.string(),
179
- description: z.string().optional(),
180
- human_eval_ids: z.array(z.string()),
181
- workspace_id: z.string(),
182
- project_id: z.string().optional(),
183
- created_by_id: z.string().optional(),
184
- updated_by_id: z.string().optional(),
185
- created: z.string().datetime({ offset: true }).transform(v => new Date(v))
186
- .optional(),
187
- updated: z.string().datetime({ offset: true }).default(
188
- "2026-10-28T11:12:42.542Z",
189
- ).transform(v => new Date(v)),
190
- filter_type: z.literal("span_type"),
191
- filter_values: z.array(z.string()),
192
- }).transform((v) => {
193
- return remap$(v, {
194
- "_id": "id",
195
- "display_name": "displayName",
196
- "human_eval_ids": "humanEvalIds",
197
- "workspace_id": "workspaceId",
198
- "project_id": "projectId",
199
- "created_by_id": "createdById",
200
- "updated_by_id": "updatedById",
201
- "filter_type": "filterType",
202
- "filter_values": "filterValues",
203
- });
204
- });
205
-
206
- export function getV2HumanEvalSetsResponseBody1FromJSON(
207
- jsonString: string,
208
- ): SafeParseResult<GetV2HumanEvalSetsResponseBody1, SDKValidationError> {
209
- return safeParse(
210
- jsonString,
211
- (x) => GetV2HumanEvalSetsResponseBody1$inboundSchema.parse(JSON.parse(x)),
212
- `Failed to parse 'GetV2HumanEvalSetsResponseBody1' from JSON`,
213
- );
214
- }
215
-
216
- /** @internal */
217
- export const ResponseBody$inboundSchema: z.ZodType<
218
- ResponseBody,
219
- z.ZodTypeDef,
220
- unknown
221
- > = z.union([
222
- z.lazy(() => GetV2HumanEvalSetsResponseBody1$inboundSchema),
223
- z.lazy(() => GetV2HumanEvalSetsResponseBody2$inboundSchema),
224
- ]);
225
-
226
- export function responseBodyFromJSON(
227
- jsonString: string,
228
- ): SafeParseResult<ResponseBody, SDKValidationError> {
229
- return safeParse(
230
- jsonString,
231
- (x) => ResponseBody$inboundSchema.parse(JSON.parse(x)),
232
- `Failed to parse 'ResponseBody' from JSON`,
233
- );
234
- }