@orq-ai/node 4.18.0-rc.10 → 4.18.0-rc.12

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 (92) hide show
  1. package/README.md +66 -79
  2. package/jsr.json +1 -1
  3. package/lib/config.d.ts +3 -3
  4. package/lib/config.js +3 -3
  5. package/models/components/reasoningpart.js +1 -1
  6. package/models/operations/createeval.d.ts +4 -4
  7. package/models/operations/createeval.d.ts.map +1 -1
  8. package/models/operations/createeval.js +5 -5
  9. package/models/operations/createeval.js.map +1 -1
  10. package/models/operations/createtool.js +4 -4
  11. package/models/operations/getalltools.js +4 -4
  12. package/models/operations/index.d.ts +0 -5
  13. package/models/operations/index.d.ts.map +1 -1
  14. package/models/operations/index.js +0 -5
  15. package/models/operations/index.js.map +1 -1
  16. package/models/operations/listdeploymentversions.js +1 -1
  17. package/models/operations/retrievetool.js +4 -4
  18. package/models/operations/runagent.js +1 -1
  19. package/models/operations/streamrunagent.js +1 -1
  20. package/models/operations/updatetool.js +4 -4
  21. package/package.json +7 -7
  22. package/sdk/sdk.d.ts +0 -3
  23. package/sdk/sdk.d.ts.map +1 -1
  24. package/sdk/sdk.js +0 -4
  25. package/sdk/sdk.js.map +1 -1
  26. package/src/lib/config.ts +3 -3
  27. package/src/models/components/reasoningpart.ts +1 -1
  28. package/src/models/operations/createeval.ts +7 -11
  29. package/src/models/operations/createtool.ts +4 -4
  30. package/src/models/operations/getalltools.ts +4 -4
  31. package/src/models/operations/index.ts +0 -5
  32. package/src/models/operations/listdeploymentversions.ts +1 -1
  33. package/src/models/operations/retrievetool.ts +4 -4
  34. package/src/models/operations/runagent.ts +1 -1
  35. package/src/models/operations/streamrunagent.ts +1 -1
  36. package/src/models/operations/updatetool.ts +4 -4
  37. package/src/sdk/sdk.ts +0 -6
  38. package/funcs/humanReviewSetsCreate.d.ts +0 -20
  39. package/funcs/humanReviewSetsCreate.d.ts.map +0 -1
  40. package/funcs/humanReviewSetsCreate.js +0 -123
  41. package/funcs/humanReviewSetsCreate.js.map +0 -1
  42. package/funcs/humanReviewSetsDelete.d.ts +0 -20
  43. package/funcs/humanReviewSetsDelete.d.ts.map +0 -1
  44. package/funcs/humanReviewSetsDelete.js +0 -127
  45. package/funcs/humanReviewSetsDelete.js.map +0 -1
  46. package/funcs/humanReviewSetsGet.d.ts +0 -20
  47. package/funcs/humanReviewSetsGet.d.ts.map +0 -1
  48. package/funcs/humanReviewSetsGet.js +0 -126
  49. package/funcs/humanReviewSetsGet.js.map +0 -1
  50. package/funcs/humanReviewSetsList.d.ts +0 -20
  51. package/funcs/humanReviewSetsList.d.ts.map +0 -1
  52. package/funcs/humanReviewSetsList.js +0 -125
  53. package/funcs/humanReviewSetsList.js.map +0 -1
  54. package/funcs/humanReviewSetsUpdate.d.ts +0 -20
  55. package/funcs/humanReviewSetsUpdate.d.ts.map +0 -1
  56. package/funcs/humanReviewSetsUpdate.js +0 -127
  57. package/funcs/humanReviewSetsUpdate.js.map +0 -1
  58. package/models/operations/deletev2humanevalsetsid.d.ts +0 -15
  59. package/models/operations/deletev2humanevalsetsid.d.ts.map +0 -1
  60. package/models/operations/deletev2humanevalsetsid.js +0 -49
  61. package/models/operations/deletev2humanevalsetsid.js.map +0 -1
  62. package/models/operations/getv2humanevalsets.d.ts +0 -103
  63. package/models/operations/getv2humanevalsets.d.ts.map +0 -1
  64. package/models/operations/getv2humanevalsets.js +0 -128
  65. package/models/operations/getv2humanevalsets.js.map +0 -1
  66. package/models/operations/getv2humanevalsetsid.d.ts +0 -106
  67. package/models/operations/getv2humanevalsetsid.d.ts.map +0 -1
  68. package/models/operations/getv2humanevalsetsid.js +0 -124
  69. package/models/operations/getv2humanevalsetsid.js.map +0 -1
  70. package/models/operations/patchv2humanevalsetsid.d.ts +0 -184
  71. package/models/operations/patchv2humanevalsetsid.d.ts.map +0 -1
  72. package/models/operations/patchv2humanevalsetsid.js +0 -183
  73. package/models/operations/patchv2humanevalsetsid.js.map +0 -1
  74. package/models/operations/postv2humanevalsets.d.ts +0 -169
  75. package/models/operations/postv2humanevalsets.d.ts.map +0 -1
  76. package/models/operations/postv2humanevalsets.js +0 -167
  77. package/models/operations/postv2humanevalsets.js.map +0 -1
  78. package/sdk/humanreviewsets.d.ts +0 -50
  79. package/sdk/humanreviewsets.d.ts.map +0 -1
  80. package/sdk/humanreviewsets.js +0 -72
  81. package/sdk/humanreviewsets.js.map +0 -1
  82. package/src/funcs/humanReviewSetsCreate.ts +0 -178
  83. package/src/funcs/humanReviewSetsDelete.ts +0 -180
  84. package/src/funcs/humanReviewSetsGet.ts +0 -179
  85. package/src/funcs/humanReviewSetsList.ts +0 -181
  86. package/src/funcs/humanReviewSetsUpdate.ts +0 -180
  87. package/src/models/operations/deletev2humanevalsetsid.ts +0 -36
  88. package/src/models/operations/getv2humanevalsets.ts +0 -234
  89. package/src/models/operations/getv2humanevalsetsid.ts +0 -235
  90. package/src/models/operations/patchv2humanevalsetsid.ts +0 -415
  91. package/src/models/operations/postv2humanevalsets.ts +0 -351
  92. package/src/sdk/humanreviewsets.ts +0 -109
@@ -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
- }
@@ -1,235 +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 GetV2HumanEvalSetsIdRequest = {
12
- /**
13
- * The ID of the human review set to retrieve
14
- */
15
- id: string;
16
- };
17
-
18
- export type GetV2HumanEvalSetsIdResponseBody2 = {
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 GetV2HumanEvalSetsIdResponseBody1 = {
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
- /**
97
- * Successfully retrieved the human review set
98
- */
99
- export type GetV2HumanEvalSetsIdResponseBody =
100
- | GetV2HumanEvalSetsIdResponseBody1
101
- | GetV2HumanEvalSetsIdResponseBody2;
102
-
103
- /** @internal */
104
- export type GetV2HumanEvalSetsIdRequest$Outbound = {
105
- id: string;
106
- };
107
-
108
- /** @internal */
109
- export const GetV2HumanEvalSetsIdRequest$outboundSchema: z.ZodType<
110
- GetV2HumanEvalSetsIdRequest$Outbound,
111
- z.ZodTypeDef,
112
- GetV2HumanEvalSetsIdRequest
113
- > = z.object({
114
- id: z.string(),
115
- });
116
-
117
- export function getV2HumanEvalSetsIdRequestToJSON(
118
- getV2HumanEvalSetsIdRequest: GetV2HumanEvalSetsIdRequest,
119
- ): string {
120
- return JSON.stringify(
121
- GetV2HumanEvalSetsIdRequest$outboundSchema.parse(
122
- getV2HumanEvalSetsIdRequest,
123
- ),
124
- );
125
- }
126
-
127
- /** @internal */
128
- export const GetV2HumanEvalSetsIdResponseBody2$inboundSchema: z.ZodType<
129
- GetV2HumanEvalSetsIdResponseBody2,
130
- z.ZodTypeDef,
131
- unknown
132
- > = z.object({
133
- _id: z.string(),
134
- display_name: z.string(),
135
- description: z.string().optional(),
136
- human_eval_ids: z.array(z.string()),
137
- workspace_id: z.string(),
138
- project_id: z.string().optional(),
139
- created_by_id: z.string().optional(),
140
- updated_by_id: z.string().optional(),
141
- created: z.string().datetime({ offset: true }).transform(v => new Date(v))
142
- .optional(),
143
- updated: z.string().datetime({ offset: true }).default(
144
- "2026-10-28T11:12:42.542Z",
145
- ).transform(v => new Date(v)),
146
- filter_type: z.literal("name"),
147
- filter_value: z.string(),
148
- }).transform((v) => {
149
- return remap$(v, {
150
- "_id": "id",
151
- "display_name": "displayName",
152
- "human_eval_ids": "humanEvalIds",
153
- "workspace_id": "workspaceId",
154
- "project_id": "projectId",
155
- "created_by_id": "createdById",
156
- "updated_by_id": "updatedById",
157
- "filter_type": "filterType",
158
- "filter_value": "filterValue",
159
- });
160
- });
161
-
162
- export function getV2HumanEvalSetsIdResponseBody2FromJSON(
163
- jsonString: string,
164
- ): SafeParseResult<GetV2HumanEvalSetsIdResponseBody2, SDKValidationError> {
165
- return safeParse(
166
- jsonString,
167
- (x) => GetV2HumanEvalSetsIdResponseBody2$inboundSchema.parse(JSON.parse(x)),
168
- `Failed to parse 'GetV2HumanEvalSetsIdResponseBody2' from JSON`,
169
- );
170
- }
171
-
172
- /** @internal */
173
- export const GetV2HumanEvalSetsIdResponseBody1$inboundSchema: z.ZodType<
174
- GetV2HumanEvalSetsIdResponseBody1,
175
- z.ZodTypeDef,
176
- unknown
177
- > = z.object({
178
- _id: z.string(),
179
- display_name: z.string(),
180
- description: z.string().optional(),
181
- human_eval_ids: z.array(z.string()),
182
- workspace_id: z.string(),
183
- project_id: z.string().optional(),
184
- created_by_id: z.string().optional(),
185
- updated_by_id: z.string().optional(),
186
- created: z.string().datetime({ offset: true }).transform(v => new Date(v))
187
- .optional(),
188
- updated: z.string().datetime({ offset: true }).default(
189
- "2026-10-28T11:12:42.542Z",
190
- ).transform(v => new Date(v)),
191
- filter_type: z.literal("span_type"),
192
- filter_values: z.array(z.string()),
193
- }).transform((v) => {
194
- return remap$(v, {
195
- "_id": "id",
196
- "display_name": "displayName",
197
- "human_eval_ids": "humanEvalIds",
198
- "workspace_id": "workspaceId",
199
- "project_id": "projectId",
200
- "created_by_id": "createdById",
201
- "updated_by_id": "updatedById",
202
- "filter_type": "filterType",
203
- "filter_values": "filterValues",
204
- });
205
- });
206
-
207
- export function getV2HumanEvalSetsIdResponseBody1FromJSON(
208
- jsonString: string,
209
- ): SafeParseResult<GetV2HumanEvalSetsIdResponseBody1, SDKValidationError> {
210
- return safeParse(
211
- jsonString,
212
- (x) => GetV2HumanEvalSetsIdResponseBody1$inboundSchema.parse(JSON.parse(x)),
213
- `Failed to parse 'GetV2HumanEvalSetsIdResponseBody1' from JSON`,
214
- );
215
- }
216
-
217
- /** @internal */
218
- export const GetV2HumanEvalSetsIdResponseBody$inboundSchema: z.ZodType<
219
- GetV2HumanEvalSetsIdResponseBody,
220
- z.ZodTypeDef,
221
- unknown
222
- > = z.union([
223
- z.lazy(() => GetV2HumanEvalSetsIdResponseBody1$inboundSchema),
224
- z.lazy(() => GetV2HumanEvalSetsIdResponseBody2$inboundSchema),
225
- ]);
226
-
227
- export function getV2HumanEvalSetsIdResponseBodyFromJSON(
228
- jsonString: string,
229
- ): SafeParseResult<GetV2HumanEvalSetsIdResponseBody, SDKValidationError> {
230
- return safeParse(
231
- jsonString,
232
- (x) => GetV2HumanEvalSetsIdResponseBody$inboundSchema.parse(JSON.parse(x)),
233
- `Failed to parse 'GetV2HumanEvalSetsIdResponseBody' from JSON`,
234
- );
235
- }