@orq-ai/node 3.12.13 → 3.12.16

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 (134) hide show
  1. package/README.md +2 -5
  2. package/bin/mcp-server.js +114 -113
  3. package/bin/mcp-server.js.map +33 -33
  4. package/examples/package-lock.json +1 -1
  5. package/jsr.json +1 -1
  6. package/lib/config.d.ts +3 -3
  7. package/lib/config.js +3 -3
  8. package/lib/url.js +1 -1
  9. package/lib/url.js.map +1 -1
  10. package/mcp-server/mcp-server.js +1 -1
  11. package/mcp-server/server.js +1 -1
  12. package/models/errors/index.d.ts +1 -0
  13. package/models/errors/index.d.ts.map +1 -1
  14. package/models/errors/index.js +1 -0
  15. package/models/errors/index.js.map +1 -1
  16. package/models/operations/createbudget.js +2 -2
  17. package/models/operations/createcontact.js +2 -2
  18. package/models/operations/createdataset.js +2 -2
  19. package/models/operations/createdatasetitem.js +2 -2
  20. package/models/operations/createdatasource.js +2 -2
  21. package/models/operations/createeval.js +16 -16
  22. package/models/operations/fileget.js +2 -2
  23. package/models/operations/filelist.js +2 -2
  24. package/models/operations/fileupload.js +2 -2
  25. package/models/operations/getbudget.js +2 -2
  26. package/models/operations/getevals.js +28 -28
  27. package/models/operations/listbudgets.js +2 -2
  28. package/models/operations/listcontacts.js +2 -2
  29. package/models/operations/listdatasetdatapoints.js +2 -2
  30. package/models/operations/listdatasets.js +2 -2
  31. package/models/operations/listdatasources.js +2 -2
  32. package/models/operations/retrievecontact.js +2 -2
  33. package/models/operations/retrievedatapoint.js +2 -2
  34. package/models/operations/retrievedataset.js +2 -2
  35. package/models/operations/retrievedatasource.js +2 -2
  36. package/models/operations/updatebudget.js +2 -2
  37. package/models/operations/updatecontact.js +2 -2
  38. package/models/operations/updatedatapoint.js +2 -2
  39. package/models/operations/updatedataset.js +2 -2
  40. package/models/operations/updatedatasource.js +2 -2
  41. package/models/operations/updateeval.js +16 -16
  42. package/package.json +1 -1
  43. package/packages/orq-rc/README.md +91 -96
  44. package/packages/orq-rc/docs/sdks/agents/README.md +102 -82
  45. package/packages/orq-rc/docs/sdks/evals/README.md +2 -0
  46. package/packages/orq-rc/examples/package-lock.json +1 -1
  47. package/packages/orq-rc/jsr.json +1 -1
  48. package/packages/orq-rc/package-lock.json +2 -2
  49. package/packages/orq-rc/package.json +1 -1
  50. package/packages/orq-rc/src/funcs/agentsRun.ts +1 -1
  51. package/packages/orq-rc/src/funcs/agentsStreamRun.ts +1 -1
  52. package/packages/orq-rc/src/lib/config.ts +3 -3
  53. package/packages/orq-rc/src/lib/url.ts +1 -1
  54. package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
  55. package/packages/orq-rc/src/mcp-server/server.ts +1 -3
  56. package/packages/orq-rc/src/mcp-server/tools/agentsRun.ts +1 -1
  57. package/packages/orq-rc/src/mcp-server/tools/agentsStreamRun.ts +1 -1
  58. package/packages/orq-rc/src/models/errors/index.ts +1 -0
  59. package/packages/orq-rc/src/models/operations/createbudget.ts +2 -2
  60. package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
  61. package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
  62. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +2 -2
  63. package/packages/orq-rc/src/models/operations/createdatasource.ts +2 -2
  64. package/packages/orq-rc/src/models/operations/createeval.ts +167 -28
  65. package/packages/orq-rc/src/models/operations/createprompt.ts +2 -0
  66. package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +1 -0
  67. package/packages/orq-rc/src/models/operations/deployments.ts +1 -0
  68. package/packages/orq-rc/src/models/operations/fileget.ts +2 -2
  69. package/packages/orq-rc/src/models/operations/filelist.ts +2 -2
  70. package/packages/orq-rc/src/models/operations/fileupload.ts +2 -2
  71. package/packages/orq-rc/src/models/operations/getagent.ts +2 -9
  72. package/packages/orq-rc/src/models/operations/getallprompts.ts +1 -0
  73. package/packages/orq-rc/src/models/operations/getbudget.ts +2 -2
  74. package/packages/orq-rc/src/models/operations/getevals.ts +28 -28
  75. package/packages/orq-rc/src/models/operations/getoneprompt.ts +1 -0
  76. package/packages/orq-rc/src/models/operations/getpromptversion.ts +1 -0
  77. package/packages/orq-rc/src/models/operations/index.ts +0 -1
  78. package/packages/orq-rc/src/models/operations/listagents.ts +2 -9
  79. package/packages/orq-rc/src/models/operations/listbudgets.ts +2 -2
  80. package/packages/orq-rc/src/models/operations/listcontacts.ts +2 -2
  81. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +2 -2
  82. package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
  83. package/packages/orq-rc/src/models/operations/listdatasources.ts +2 -2
  84. package/packages/orq-rc/src/models/operations/listpromptversions.ts +1 -0
  85. package/packages/orq-rc/src/models/operations/retrieveaction.ts +14 -16
  86. package/packages/orq-rc/src/models/operations/retrievecontact.ts +2 -2
  87. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +2 -2
  88. package/packages/orq-rc/src/models/operations/retrievedataset.ts +2 -2
  89. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +2 -2
  90. package/packages/orq-rc/src/models/operations/runagent.ts +207 -31
  91. package/packages/orq-rc/src/models/operations/searchknowledge.ts +2 -2
  92. package/packages/orq-rc/src/models/operations/streamrunagent.ts +219 -32
  93. package/packages/orq-rc/src/models/operations/updatebudget.ts +2 -2
  94. package/packages/orq-rc/src/models/operations/updatecontact.ts +2 -2
  95. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +2 -2
  96. package/packages/orq-rc/src/models/operations/updatedataset.ts +2 -2
  97. package/packages/orq-rc/src/models/operations/updatedatasource.ts +2 -2
  98. package/packages/orq-rc/src/models/operations/updateeval.ts +181 -28
  99. package/packages/orq-rc/src/models/operations/updateprompt.ts +2 -0
  100. package/packages/orq-rc/src/sdk/agents.ts +2 -20
  101. package/src/lib/config.ts +3 -3
  102. package/src/lib/url.ts +1 -1
  103. package/src/mcp-server/mcp-server.ts +1 -1
  104. package/src/mcp-server/server.ts +1 -1
  105. package/src/models/errors/index.ts +1 -0
  106. package/src/models/operations/createbudget.ts +2 -2
  107. package/src/models/operations/createcontact.ts +2 -2
  108. package/src/models/operations/createdataset.ts +2 -2
  109. package/src/models/operations/createdatasetitem.ts +2 -2
  110. package/src/models/operations/createdatasource.ts +2 -2
  111. package/src/models/operations/createeval.ts +16 -16
  112. package/src/models/operations/fileget.ts +2 -2
  113. package/src/models/operations/filelist.ts +2 -2
  114. package/src/models/operations/fileupload.ts +2 -2
  115. package/src/models/operations/getbudget.ts +2 -2
  116. package/src/models/operations/getevals.ts +28 -28
  117. package/src/models/operations/listbudgets.ts +2 -2
  118. package/src/models/operations/listcontacts.ts +2 -2
  119. package/src/models/operations/listdatasetdatapoints.ts +2 -2
  120. package/src/models/operations/listdatasets.ts +2 -2
  121. package/src/models/operations/listdatasources.ts +2 -2
  122. package/src/models/operations/retrievecontact.ts +2 -2
  123. package/src/models/operations/retrievedatapoint.ts +2 -2
  124. package/src/models/operations/retrievedataset.ts +2 -2
  125. package/src/models/operations/retrievedatasource.ts +2 -2
  126. package/src/models/operations/updatebudget.ts +2 -2
  127. package/src/models/operations/updatecontact.ts +2 -2
  128. package/src/models/operations/updatedatapoint.ts +2 -2
  129. package/src/models/operations/updatedataset.ts +2 -2
  130. package/src/models/operations/updatedatasource.ts +2 -2
  131. package/src/models/operations/updateeval.ts +16 -16
  132. package/packages/orq-rc/src/funcs/agentsReviewAction.ts +0 -177
  133. package/packages/orq-rc/src/mcp-server/tools/agentsReviewAction.ts +0 -37
  134. package/packages/orq-rc/src/models/operations/reviewaction.ts +0 -258
@@ -2827,8 +2827,8 @@ export const UpdateEvalResponseBodyPython$inboundSchema: z.ZodType<
2827
2827
  > = z.object({
2828
2828
  _id: z.string(),
2829
2829
  description: z.string(),
2830
- created: z.string().default("2025-09-18T21:41:50.865Z"),
2831
- updated: z.string().default("2025-09-18T21:41:50.865Z"),
2830
+ created: z.string().default("2025-09-24T09:52:11.845Z"),
2831
+ updated: z.string().default("2025-09-24T09:52:11.845Z"),
2832
2832
  guardrail_config: z.union([
2833
2833
  z.lazy(() =>
2834
2834
  UpdateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber$inboundSchema
@@ -2870,8 +2870,8 @@ export const UpdateEvalResponseBodyPython$outboundSchema: z.ZodType<
2870
2870
  > = z.object({
2871
2871
  id: z.string(),
2872
2872
  description: z.string(),
2873
- created: z.string().default("2025-09-18T21:41:50.865Z"),
2874
- updated: z.string().default("2025-09-18T21:41:50.865Z"),
2873
+ created: z.string().default("2025-09-24T09:52:11.845Z"),
2874
+ updated: z.string().default("2025-09-24T09:52:11.845Z"),
2875
2875
  guardrailConfig: z.union([
2876
2876
  z.lazy(() =>
2877
2877
  UpdateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber$outboundSchema
@@ -3292,8 +3292,8 @@ export const UpdateEvalResponseBodyHTTP$inboundSchema: z.ZodType<
3292
3292
  > = z.object({
3293
3293
  _id: z.string(),
3294
3294
  description: z.string(),
3295
- created: z.string().default("2025-09-18T21:41:50.865Z"),
3296
- updated: z.string().default("2025-09-18T21:41:50.865Z"),
3295
+ created: z.string().default("2025-09-24T09:52:11.845Z"),
3296
+ updated: z.string().default("2025-09-24T09:52:11.845Z"),
3297
3297
  guardrail_config: z.union([
3298
3298
  z.lazy(() =>
3299
3299
  UpdateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber$inboundSchema
@@ -3341,8 +3341,8 @@ export const UpdateEvalResponseBodyHTTP$outboundSchema: z.ZodType<
3341
3341
  > = z.object({
3342
3342
  id: z.string(),
3343
3343
  description: z.string(),
3344
- created: z.string().default("2025-09-18T21:41:50.865Z"),
3345
- updated: z.string().default("2025-09-18T21:41:50.865Z"),
3344
+ created: z.string().default("2025-09-24T09:52:11.845Z"),
3345
+ updated: z.string().default("2025-09-24T09:52:11.845Z"),
3346
3346
  guardrailConfig: z.union([
3347
3347
  z.lazy(() =>
3348
3348
  UpdateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber$outboundSchema
@@ -3732,8 +3732,8 @@ export const UpdateEvalResponseBodyJSON$inboundSchema: z.ZodType<
3732
3732
  > = z.object({
3733
3733
  _id: z.string(),
3734
3734
  description: z.string(),
3735
- created: z.string().default("2025-09-18T21:41:50.865Z"),
3736
- updated: z.string().default("2025-09-18T21:41:50.865Z"),
3735
+ created: z.string().default("2025-09-24T09:52:11.845Z"),
3736
+ updated: z.string().default("2025-09-24T09:52:11.845Z"),
3737
3737
  guardrail_config: z.union([
3738
3738
  z.lazy(() => UpdateEvalGuardrailConfigEvalsResponse200Number$inboundSchema),
3739
3739
  z.lazy(() =>
@@ -3773,8 +3773,8 @@ export const UpdateEvalResponseBodyJSON$outboundSchema: z.ZodType<
3773
3773
  > = z.object({
3774
3774
  id: z.string(),
3775
3775
  description: z.string(),
3776
- created: z.string().default("2025-09-18T21:41:50.865Z"),
3777
- updated: z.string().default("2025-09-18T21:41:50.865Z"),
3776
+ created: z.string().default("2025-09-24T09:52:11.845Z"),
3777
+ updated: z.string().default("2025-09-24T09:52:11.845Z"),
3778
3778
  guardrailConfig: z.union([
3779
3779
  z.lazy(() =>
3780
3780
  UpdateEvalGuardrailConfigEvalsResponse200Number$outboundSchema
@@ -4132,8 +4132,8 @@ export const UpdateEvalResponseBodyLLM$inboundSchema: z.ZodType<
4132
4132
  > = z.object({
4133
4133
  _id: z.string(),
4134
4134
  description: z.string(),
4135
- created: z.string().default("2025-09-18T21:41:50.865Z"),
4136
- updated: z.string().default("2025-09-18T21:41:50.865Z"),
4135
+ created: z.string().default("2025-09-24T09:52:11.845Z"),
4136
+ updated: z.string().default("2025-09-24T09:52:11.845Z"),
4137
4137
  guardrail_config: z.union([
4138
4138
  z.lazy(() => UpdateEvalGuardrailConfigEvalsResponseNumber$inboundSchema),
4139
4139
  z.lazy(() => UpdateEvalGuardrailConfigEvalsResponseBoolean$inboundSchema),
@@ -4173,8 +4173,8 @@ export const UpdateEvalResponseBodyLLM$outboundSchema: z.ZodType<
4173
4173
  > = z.object({
4174
4174
  id: z.string(),
4175
4175
  description: z.string(),
4176
- created: z.string().default("2025-09-18T21:41:50.865Z"),
4177
- updated: z.string().default("2025-09-18T21:41:50.865Z"),
4176
+ created: z.string().default("2025-09-24T09:52:11.845Z"),
4177
+ updated: z.string().default("2025-09-24T09:52:11.845Z"),
4178
4178
  guardrailConfig: z.union([
4179
4179
  z.lazy(() => UpdateEvalGuardrailConfigEvalsResponseNumber$outboundSchema),
4180
4180
  z.lazy(() => UpdateEvalGuardrailConfigEvalsResponseBoolean$outboundSchema),
@@ -1,177 +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 * as M from "../lib/matchers.js";
8
- import { compactMap } from "../lib/primitives.js";
9
- import { safeParse } from "../lib/schemas.js";
10
- import { RequestOptions } from "../lib/sdks.js";
11
- import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
12
- import { pathToFunc } from "../lib/url.js";
13
- import {
14
- ConnectionError,
15
- InvalidRequestError,
16
- RequestAbortedError,
17
- RequestTimeoutError,
18
- UnexpectedClientError,
19
- } from "../models/errors/httpclienterrors.js";
20
- import { OrqError } from "../models/errors/orqerror.js";
21
- import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
22
- import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
23
- import * as operations from "../models/operations/index.js";
24
- import { APICall, APIPromise } from "../types/async.js";
25
- import { Result } from "../types/fp.js";
26
-
27
- /**
28
- * Review a tool execution
29
- *
30
- * @remarks
31
- * Review a tool execution and approve, reject or mock it. This will trigger the next step in the agent execution.
32
- */
33
- export function agentsReviewAction(
34
- client: OrqCore,
35
- request: operations.ReviewActionRequest,
36
- options?: RequestOptions,
37
- ): APIPromise<
38
- Result<
39
- operations.ReviewActionResponseBody,
40
- | OrqError
41
- | ResponseValidationError
42
- | ConnectionError
43
- | RequestAbortedError
44
- | RequestTimeoutError
45
- | InvalidRequestError
46
- | UnexpectedClientError
47
- | SDKValidationError
48
- >
49
- > {
50
- return new APIPromise($do(
51
- client,
52
- request,
53
- options,
54
- ));
55
- }
56
-
57
- async function $do(
58
- client: OrqCore,
59
- request: operations.ReviewActionRequest,
60
- options?: RequestOptions,
61
- ): Promise<
62
- [
63
- Result<
64
- operations.ReviewActionResponseBody,
65
- | OrqError
66
- | ResponseValidationError
67
- | ConnectionError
68
- | RequestAbortedError
69
- | RequestTimeoutError
70
- | InvalidRequestError
71
- | UnexpectedClientError
72
- | SDKValidationError
73
- >,
74
- APICall,
75
- ]
76
- > {
77
- const parsed = safeParse(
78
- request,
79
- (value) => operations.ReviewActionRequest$outboundSchema.parse(value),
80
- "Input validation failed",
81
- );
82
- if (!parsed.ok) {
83
- return [parsed, { status: "invalid" }];
84
- }
85
- const payload = parsed.value;
86
- const body = encodeJSON("body", payload.RequestBody, { explode: true });
87
-
88
- const pathParams = {
89
- action_id: encodeSimple("action_id", payload.action_id, {
90
- explode: false,
91
- charEncoding: "percent",
92
- }),
93
- agent_key: encodeSimple("agent_key", payload.agent_key, {
94
- explode: false,
95
- charEncoding: "percent",
96
- }),
97
- task_id: encodeSimple("task_id", payload.task_id, {
98
- explode: false,
99
- charEncoding: "percent",
100
- }),
101
- };
102
-
103
- const path = pathToFunc(
104
- "/v2/agents/{agent_key}/tasks/{task_id}/actions/{action_id}/review",
105
- )(pathParams);
106
-
107
- const headers = new Headers(compactMap({
108
- "Content-Type": "application/json",
109
- Accept: "application/json",
110
- }));
111
-
112
- const secConfig = await extractSecurity(client._options.apiKey);
113
- const securityInput = secConfig == null ? {} : { apiKey: secConfig };
114
- const requestSecurity = resolveGlobalSecurity(securityInput);
115
-
116
- const context = {
117
- options: client._options,
118
- baseURL: options?.serverURL ?? client._baseURL ?? "",
119
- operationID: "ReviewAction",
120
- oAuth2Scopes: [],
121
-
122
- resolvedSecurity: requestSecurity,
123
-
124
- securitySource: client._options.apiKey,
125
- retryConfig: options?.retries
126
- || client._options.retryConfig
127
- || { strategy: "none" },
128
- retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
129
- };
130
-
131
- const requestRes = client._createRequest(context, {
132
- security: requestSecurity,
133
- method: "POST",
134
- baseURL: options?.serverURL,
135
- path: path,
136
- headers: headers,
137
- body: body,
138
- userAgent: client._options.userAgent,
139
- timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
140
- }, options);
141
- if (!requestRes.ok) {
142
- return [requestRes, { status: "invalid" }];
143
- }
144
- const req = requestRes.value;
145
-
146
- const doResult = await client._do(req, {
147
- context,
148
- errorCodes: ["4XX", "5XX"],
149
- retryConfig: context.retryConfig,
150
- retryCodes: context.retryCodes,
151
- });
152
- if (!doResult.ok) {
153
- return [doResult, { status: "request-error", request: req }];
154
- }
155
- const response = doResult.value;
156
-
157
- const [result] = await M.match<
158
- operations.ReviewActionResponseBody,
159
- | OrqError
160
- | ResponseValidationError
161
- | ConnectionError
162
- | RequestAbortedError
163
- | RequestTimeoutError
164
- | InvalidRequestError
165
- | UnexpectedClientError
166
- | SDKValidationError
167
- >(
168
- M.json(200, operations.ReviewActionResponseBody$inboundSchema),
169
- M.fail("4XX"),
170
- M.fail("5XX"),
171
- )(response, req);
172
- if (!result.ok) {
173
- return [result, { status: "complete", request: req, response }];
174
- }
175
-
176
- return [result, { status: "complete", request: req, response }];
177
- }
@@ -1,37 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import { agentsReviewAction } from "../../funcs/agentsReviewAction.js";
6
- import * as operations from "../../models/operations/index.js";
7
- import { formatResult, ToolDefinition } from "../tools.js";
8
-
9
- const args = {
10
- request: operations.ReviewActionRequest$inboundSchema,
11
- };
12
-
13
- export const tool$agentsReviewAction: ToolDefinition<typeof args> = {
14
- name: "agents-review-action",
15
- description: `Review a tool execution
16
-
17
- Review a tool execution and approve, reject or mock it. This will trigger the next step in the agent execution.`,
18
- args,
19
- tool: async (client, args, ctx) => {
20
- const [result, apiCall] = await agentsReviewAction(
21
- client,
22
- args.request,
23
- { fetchOptions: { signal: ctx.signal } },
24
- ).$inspect();
25
-
26
- if (!result.ok) {
27
- return {
28
- content: [{ type: "text", text: result.error.message }],
29
- isError: true,
30
- };
31
- }
32
-
33
- const value = result.value;
34
-
35
- return formatResult(value, apiCall);
36
- },
37
- };
@@ -1,258 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod";
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
- export const Review = {
13
- Approved: "approved",
14
- Rejected: "rejected",
15
- } as const;
16
- export type Review = ClosedEnum<typeof Review>;
17
-
18
- export type ReviewActionRequestBody = {
19
- review: Review;
20
- mockOutput?: { [k: string]: any } | undefined;
21
- source?: string | undefined;
22
- };
23
-
24
- export type ReviewActionRequest = {
25
- agentKey: string;
26
- taskId: string;
27
- actionId: string;
28
- requestBody?: ReviewActionRequestBody | undefined;
29
- };
30
-
31
- /**
32
- * Successfully reviewed the action
33
- */
34
- export type ReviewActionResponseBody = {
35
- success: boolean;
36
- message: string;
37
- };
38
-
39
- /** @internal */
40
- export const Review$inboundSchema: z.ZodNativeEnum<typeof Review> = z
41
- .nativeEnum(Review);
42
-
43
- /** @internal */
44
- export const Review$outboundSchema: z.ZodNativeEnum<typeof Review> =
45
- Review$inboundSchema;
46
-
47
- /**
48
- * @internal
49
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
50
- */
51
- export namespace Review$ {
52
- /** @deprecated use `Review$inboundSchema` instead. */
53
- export const inboundSchema = Review$inboundSchema;
54
- /** @deprecated use `Review$outboundSchema` instead. */
55
- export const outboundSchema = Review$outboundSchema;
56
- }
57
-
58
- /** @internal */
59
- export const ReviewActionRequestBody$inboundSchema: z.ZodType<
60
- ReviewActionRequestBody,
61
- z.ZodTypeDef,
62
- unknown
63
- > = z.object({
64
- review: Review$inboundSchema,
65
- mock_output: z.record(z.any()).optional(),
66
- source: z.string().optional(),
67
- }).transform((v) => {
68
- return remap$(v, {
69
- "mock_output": "mockOutput",
70
- });
71
- });
72
-
73
- /** @internal */
74
- export type ReviewActionRequestBody$Outbound = {
75
- review: string;
76
- mock_output?: { [k: string]: any } | undefined;
77
- source?: string | undefined;
78
- };
79
-
80
- /** @internal */
81
- export const ReviewActionRequestBody$outboundSchema: z.ZodType<
82
- ReviewActionRequestBody$Outbound,
83
- z.ZodTypeDef,
84
- ReviewActionRequestBody
85
- > = z.object({
86
- review: Review$outboundSchema,
87
- mockOutput: z.record(z.any()).optional(),
88
- source: z.string().optional(),
89
- }).transform((v) => {
90
- return remap$(v, {
91
- mockOutput: "mock_output",
92
- });
93
- });
94
-
95
- /**
96
- * @internal
97
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
98
- */
99
- export namespace ReviewActionRequestBody$ {
100
- /** @deprecated use `ReviewActionRequestBody$inboundSchema` instead. */
101
- export const inboundSchema = ReviewActionRequestBody$inboundSchema;
102
- /** @deprecated use `ReviewActionRequestBody$outboundSchema` instead. */
103
- export const outboundSchema = ReviewActionRequestBody$outboundSchema;
104
- /** @deprecated use `ReviewActionRequestBody$Outbound` instead. */
105
- export type Outbound = ReviewActionRequestBody$Outbound;
106
- }
107
-
108
- export function reviewActionRequestBodyToJSON(
109
- reviewActionRequestBody: ReviewActionRequestBody,
110
- ): string {
111
- return JSON.stringify(
112
- ReviewActionRequestBody$outboundSchema.parse(reviewActionRequestBody),
113
- );
114
- }
115
-
116
- export function reviewActionRequestBodyFromJSON(
117
- jsonString: string,
118
- ): SafeParseResult<ReviewActionRequestBody, SDKValidationError> {
119
- return safeParse(
120
- jsonString,
121
- (x) => ReviewActionRequestBody$inboundSchema.parse(JSON.parse(x)),
122
- `Failed to parse 'ReviewActionRequestBody' from JSON`,
123
- );
124
- }
125
-
126
- /** @internal */
127
- export const ReviewActionRequest$inboundSchema: z.ZodType<
128
- ReviewActionRequest,
129
- z.ZodTypeDef,
130
- unknown
131
- > = z.object({
132
- agent_key: z.string(),
133
- task_id: z.string(),
134
- action_id: z.string(),
135
- RequestBody: z.lazy(() => ReviewActionRequestBody$inboundSchema).optional(),
136
- }).transform((v) => {
137
- return remap$(v, {
138
- "agent_key": "agentKey",
139
- "task_id": "taskId",
140
- "action_id": "actionId",
141
- "RequestBody": "requestBody",
142
- });
143
- });
144
-
145
- /** @internal */
146
- export type ReviewActionRequest$Outbound = {
147
- agent_key: string;
148
- task_id: string;
149
- action_id: string;
150
- RequestBody?: ReviewActionRequestBody$Outbound | undefined;
151
- };
152
-
153
- /** @internal */
154
- export const ReviewActionRequest$outboundSchema: z.ZodType<
155
- ReviewActionRequest$Outbound,
156
- z.ZodTypeDef,
157
- ReviewActionRequest
158
- > = z.object({
159
- agentKey: z.string(),
160
- taskId: z.string(),
161
- actionId: z.string(),
162
- requestBody: z.lazy(() => ReviewActionRequestBody$outboundSchema).optional(),
163
- }).transform((v) => {
164
- return remap$(v, {
165
- agentKey: "agent_key",
166
- taskId: "task_id",
167
- actionId: "action_id",
168
- requestBody: "RequestBody",
169
- });
170
- });
171
-
172
- /**
173
- * @internal
174
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
175
- */
176
- export namespace ReviewActionRequest$ {
177
- /** @deprecated use `ReviewActionRequest$inboundSchema` instead. */
178
- export const inboundSchema = ReviewActionRequest$inboundSchema;
179
- /** @deprecated use `ReviewActionRequest$outboundSchema` instead. */
180
- export const outboundSchema = ReviewActionRequest$outboundSchema;
181
- /** @deprecated use `ReviewActionRequest$Outbound` instead. */
182
- export type Outbound = ReviewActionRequest$Outbound;
183
- }
184
-
185
- export function reviewActionRequestToJSON(
186
- reviewActionRequest: ReviewActionRequest,
187
- ): string {
188
- return JSON.stringify(
189
- ReviewActionRequest$outboundSchema.parse(reviewActionRequest),
190
- );
191
- }
192
-
193
- export function reviewActionRequestFromJSON(
194
- jsonString: string,
195
- ): SafeParseResult<ReviewActionRequest, SDKValidationError> {
196
- return safeParse(
197
- jsonString,
198
- (x) => ReviewActionRequest$inboundSchema.parse(JSON.parse(x)),
199
- `Failed to parse 'ReviewActionRequest' from JSON`,
200
- );
201
- }
202
-
203
- /** @internal */
204
- export const ReviewActionResponseBody$inboundSchema: z.ZodType<
205
- ReviewActionResponseBody,
206
- z.ZodTypeDef,
207
- unknown
208
- > = z.object({
209
- success: z.boolean(),
210
- message: z.string(),
211
- });
212
-
213
- /** @internal */
214
- export type ReviewActionResponseBody$Outbound = {
215
- success: boolean;
216
- message: string;
217
- };
218
-
219
- /** @internal */
220
- export const ReviewActionResponseBody$outboundSchema: z.ZodType<
221
- ReviewActionResponseBody$Outbound,
222
- z.ZodTypeDef,
223
- ReviewActionResponseBody
224
- > = z.object({
225
- success: z.boolean(),
226
- message: z.string(),
227
- });
228
-
229
- /**
230
- * @internal
231
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
232
- */
233
- export namespace ReviewActionResponseBody$ {
234
- /** @deprecated use `ReviewActionResponseBody$inboundSchema` instead. */
235
- export const inboundSchema = ReviewActionResponseBody$inboundSchema;
236
- /** @deprecated use `ReviewActionResponseBody$outboundSchema` instead. */
237
- export const outboundSchema = ReviewActionResponseBody$outboundSchema;
238
- /** @deprecated use `ReviewActionResponseBody$Outbound` instead. */
239
- export type Outbound = ReviewActionResponseBody$Outbound;
240
- }
241
-
242
- export function reviewActionResponseBodyToJSON(
243
- reviewActionResponseBody: ReviewActionResponseBody,
244
- ): string {
245
- return JSON.stringify(
246
- ReviewActionResponseBody$outboundSchema.parse(reviewActionResponseBody),
247
- );
248
- }
249
-
250
- export function reviewActionResponseBodyFromJSON(
251
- jsonString: string,
252
- ): SafeParseResult<ReviewActionResponseBody, SDKValidationError> {
253
- return safeParse(
254
- jsonString,
255
- (x) => ReviewActionResponseBody$inboundSchema.parse(JSON.parse(x)),
256
- `Failed to parse 'ReviewActionResponseBody' from JSON`,
257
- );
258
- }