@orq-ai/node 3.12.9 → 3.12.11

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 (132) hide show
  1. package/bin/mcp-server.js +112 -112
  2. package/bin/mcp-server.js.map +30 -30
  3. package/examples/package-lock.json +1 -1
  4. package/jsr.json +1 -1
  5. package/lib/config.d.ts +3 -3
  6. package/lib/config.js +3 -3
  7. package/lib/config.js.map +1 -1
  8. package/mcp-server/mcp-server.js +1 -1
  9. package/mcp-server/mcp-server.js.map +1 -1
  10. package/mcp-server/server.js +1 -1
  11. package/mcp-server/server.js.map +1 -1
  12. package/models/operations/createbudget.js +2 -2
  13. package/models/operations/createcontact.js +2 -2
  14. package/models/operations/createdataset.js +2 -2
  15. package/models/operations/createdatasetitem.js +2 -2
  16. package/models/operations/createdatasource.js +2 -2
  17. package/models/operations/createeval.js +16 -16
  18. package/models/operations/fileget.js +2 -2
  19. package/models/operations/filelist.js +2 -2
  20. package/models/operations/fileupload.js +2 -2
  21. package/models/operations/getbudget.js +2 -2
  22. package/models/operations/getevals.js +28 -28
  23. package/models/operations/listbudgets.js +2 -2
  24. package/models/operations/listcontacts.js +2 -2
  25. package/models/operations/listdatasetdatapoints.js +2 -2
  26. package/models/operations/listdatasets.js +2 -2
  27. package/models/operations/listdatasources.js +2 -2
  28. package/models/operations/retrievecontact.js +2 -2
  29. package/models/operations/retrievedatapoint.js +2 -2
  30. package/models/operations/retrievedataset.js +2 -2
  31. package/models/operations/retrievedatasource.js +2 -2
  32. package/models/operations/updatebudget.js +2 -2
  33. package/models/operations/updatecontact.js +2 -2
  34. package/models/operations/updatedatapoint.js +2 -2
  35. package/models/operations/updatedataset.js +2 -2
  36. package/models/operations/updatedatasource.js +2 -2
  37. package/models/operations/updateeval.js +16 -16
  38. package/package.json +1 -1
  39. package/packages/orq-rc/FUNCTIONS.md +19 -9
  40. package/packages/orq-rc/README.md +179 -123
  41. package/packages/orq-rc/docs/sdks/agents/README.md +2 -2
  42. package/packages/orq-rc/docs/sdks/knowledge/README.md +12 -0
  43. package/packages/orq-rc/docs/sdks/orq/README.md +0 -81
  44. package/packages/orq-rc/examples/contactsCreate.example.ts +42 -0
  45. package/packages/orq-rc/examples/package-lock.json +1 -1
  46. package/packages/orq-rc/jsr.json +1 -1
  47. package/packages/orq-rc/package-lock.json +2 -2
  48. package/packages/orq-rc/package.json +1 -1
  49. package/packages/orq-rc/src/funcs/agentsRun.ts +1 -1
  50. package/packages/orq-rc/src/funcs/agentsStreamRun.ts +1 -1
  51. package/packages/orq-rc/src/lib/config.ts +3 -3
  52. package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
  53. package/packages/orq-rc/src/mcp-server/server.ts +1 -3
  54. package/packages/orq-rc/src/mcp-server/tools/agentsRun.ts +1 -1
  55. package/packages/orq-rc/src/mcp-server/tools/agentsStreamRun.ts +1 -1
  56. package/packages/orq-rc/src/models/operations/createbudget.ts +2 -2
  57. package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
  58. package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
  59. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +2 -2
  60. package/packages/orq-rc/src/models/operations/createdatasource.ts +2 -2
  61. package/packages/orq-rc/src/models/operations/createeval.ts +28 -28
  62. package/packages/orq-rc/src/models/operations/creatememory.ts +17 -8
  63. package/packages/orq-rc/src/models/operations/creatememorydocument.ts +13 -10
  64. package/packages/orq-rc/src/models/operations/creatememorystore.ts +17 -17
  65. package/packages/orq-rc/src/models/operations/fileget.ts +2 -2
  66. package/packages/orq-rc/src/models/operations/filelist.ts +2 -2
  67. package/packages/orq-rc/src/models/operations/fileupload.ts +2 -2
  68. package/packages/orq-rc/src/models/operations/getagent.ts +139 -117
  69. package/packages/orq-rc/src/models/operations/getallmemories.ts +7 -4
  70. package/packages/orq-rc/src/models/operations/getallmemorydocuments.ts +7 -4
  71. package/packages/orq-rc/src/models/operations/getbudget.ts +2 -2
  72. package/packages/orq-rc/src/models/operations/getevals.ts +28 -28
  73. package/packages/orq-rc/src/models/operations/index.ts +0 -1
  74. package/packages/orq-rc/src/models/operations/listagents.ts +5 -5
  75. package/packages/orq-rc/src/models/operations/listbudgets.ts +2 -2
  76. package/packages/orq-rc/src/models/operations/listcontacts.ts +2 -2
  77. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +2 -2
  78. package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
  79. package/packages/orq-rc/src/models/operations/listdatasources.ts +2 -2
  80. package/packages/orq-rc/src/models/operations/retrievecontact.ts +2 -2
  81. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +2 -2
  82. package/packages/orq-rc/src/models/operations/retrievedataset.ts +2 -2
  83. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +2 -2
  84. package/packages/orq-rc/src/models/operations/retrievememory.ts +7 -4
  85. package/packages/orq-rc/src/models/operations/retrievememorydocument.ts +7 -4
  86. package/packages/orq-rc/src/models/operations/runagent.ts +577 -122
  87. package/packages/orq-rc/src/models/operations/searchknowledge.ts +29 -259
  88. package/packages/orq-rc/src/models/operations/streamrunagent.ts +606 -109
  89. package/packages/orq-rc/src/models/operations/updatebudget.ts +2 -2
  90. package/packages/orq-rc/src/models/operations/updatecontact.ts +2 -2
  91. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +2 -2
  92. package/packages/orq-rc/src/models/operations/updatedataset.ts +2 -2
  93. package/packages/orq-rc/src/models/operations/updatedatasource.ts +2 -2
  94. package/packages/orq-rc/src/models/operations/updateeval.ts +28 -28
  95. package/packages/orq-rc/src/models/operations/updatememory.ts +17 -8
  96. package/packages/orq-rc/src/models/operations/updatememorydocument.ts +13 -10
  97. package/packages/orq-rc/src/models/operations/updatememorystore.ts +21 -17
  98. package/packages/orq-rc/src/sdk/agents.ts +2 -2
  99. package/packages/orq-rc/src/sdk/sdk.ts +1 -15
  100. package/src/lib/config.ts +3 -3
  101. package/src/mcp-server/mcp-server.ts +1 -1
  102. package/src/mcp-server/server.ts +1 -1
  103. package/src/models/operations/createbudget.ts +2 -2
  104. package/src/models/operations/createcontact.ts +2 -2
  105. package/src/models/operations/createdataset.ts +2 -2
  106. package/src/models/operations/createdatasetitem.ts +2 -2
  107. package/src/models/operations/createdatasource.ts +2 -2
  108. package/src/models/operations/createeval.ts +16 -16
  109. package/src/models/operations/fileget.ts +2 -2
  110. package/src/models/operations/filelist.ts +2 -2
  111. package/src/models/operations/fileupload.ts +2 -2
  112. package/src/models/operations/getbudget.ts +2 -2
  113. package/src/models/operations/getevals.ts +28 -28
  114. package/src/models/operations/listbudgets.ts +2 -2
  115. package/src/models/operations/listcontacts.ts +2 -2
  116. package/src/models/operations/listdatasetdatapoints.ts +2 -2
  117. package/src/models/operations/listdatasets.ts +2 -2
  118. package/src/models/operations/listdatasources.ts +2 -2
  119. package/src/models/operations/retrievecontact.ts +2 -2
  120. package/src/models/operations/retrievedatapoint.ts +2 -2
  121. package/src/models/operations/retrievedataset.ts +2 -2
  122. package/src/models/operations/retrievedatasource.ts +2 -2
  123. package/src/models/operations/updatebudget.ts +2 -2
  124. package/src/models/operations/updatecontact.ts +2 -2
  125. package/src/models/operations/updatedatapoint.ts +2 -2
  126. package/src/models/operations/updatedataset.ts +2 -2
  127. package/src/models/operations/updatedatasource.ts +2 -2
  128. package/src/models/operations/updateeval.ts +16 -16
  129. package/packages/orq-rc/examples/postV2AgentsInternal.example.ts +0 -30
  130. package/packages/orq-rc/src/funcs/postV2AgentsInternal.ts +0 -159
  131. package/packages/orq-rc/src/mcp-server/tools/postV2AgentsInternal.ts +0 -33
  132. package/packages/orq-rc/src/models/operations/postv2agentsinternal.ts +0 -103
@@ -2674,8 +2674,8 @@ export const UpdateEvalResponseBodyPython$inboundSchema: z.ZodType<
2674
2674
  > = z.object({
2675
2675
  _id: z.string(),
2676
2676
  description: z.string(),
2677
- created: z.string().default("2025-09-12T12:40:15.900Z"),
2678
- updated: z.string().default("2025-09-12T12:40:15.900Z"),
2677
+ created: z.string().default("2025-09-18T16:20:51.118Z"),
2678
+ updated: z.string().default("2025-09-18T16:20:51.118Z"),
2679
2679
  guardrail_config: z.union([
2680
2680
  z.lazy(() =>
2681
2681
  UpdateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber$inboundSchema
@@ -2717,8 +2717,8 @@ export const UpdateEvalResponseBodyPython$outboundSchema: z.ZodType<
2717
2717
  > = z.object({
2718
2718
  id: z.string(),
2719
2719
  description: z.string(),
2720
- created: z.string().default("2025-09-12T12:40:15.900Z"),
2721
- updated: z.string().default("2025-09-12T12:40:15.900Z"),
2720
+ created: z.string().default("2025-09-18T16:20:51.118Z"),
2721
+ updated: z.string().default("2025-09-18T16:20:51.118Z"),
2722
2722
  guardrailConfig: z.union([
2723
2723
  z.lazy(() =>
2724
2724
  UpdateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber$outboundSchema
@@ -3139,8 +3139,8 @@ export const UpdateEvalResponseBodyHTTP$inboundSchema: z.ZodType<
3139
3139
  > = z.object({
3140
3140
  _id: z.string(),
3141
3141
  description: z.string(),
3142
- created: z.string().default("2025-09-12T12:40:15.900Z"),
3143
- updated: z.string().default("2025-09-12T12:40:15.900Z"),
3142
+ created: z.string().default("2025-09-18T16:20:51.118Z"),
3143
+ updated: z.string().default("2025-09-18T16:20:51.118Z"),
3144
3144
  guardrail_config: z.union([
3145
3145
  z.lazy(() =>
3146
3146
  UpdateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber$inboundSchema
@@ -3188,8 +3188,8 @@ export const UpdateEvalResponseBodyHTTP$outboundSchema: z.ZodType<
3188
3188
  > = z.object({
3189
3189
  id: z.string(),
3190
3190
  description: z.string(),
3191
- created: z.string().default("2025-09-12T12:40:15.900Z"),
3192
- updated: z.string().default("2025-09-12T12:40:15.900Z"),
3191
+ created: z.string().default("2025-09-18T16:20:51.118Z"),
3192
+ updated: z.string().default("2025-09-18T16:20:51.118Z"),
3193
3193
  guardrailConfig: z.union([
3194
3194
  z.lazy(() =>
3195
3195
  UpdateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber$outboundSchema
@@ -3579,8 +3579,8 @@ export const UpdateEvalResponseBodyJSON$inboundSchema: z.ZodType<
3579
3579
  > = z.object({
3580
3580
  _id: z.string(),
3581
3581
  description: z.string(),
3582
- created: z.string().default("2025-09-12T12:40:15.900Z"),
3583
- updated: z.string().default("2025-09-12T12:40:15.900Z"),
3582
+ created: z.string().default("2025-09-18T16:20:51.118Z"),
3583
+ updated: z.string().default("2025-09-18T16:20:51.118Z"),
3584
3584
  guardrail_config: z.union([
3585
3585
  z.lazy(() => UpdateEvalGuardrailConfigEvalsResponse200Number$inboundSchema),
3586
3586
  z.lazy(() =>
@@ -3620,8 +3620,8 @@ export const UpdateEvalResponseBodyJSON$outboundSchema: z.ZodType<
3620
3620
  > = z.object({
3621
3621
  id: z.string(),
3622
3622
  description: z.string(),
3623
- created: z.string().default("2025-09-12T12:40:15.900Z"),
3624
- updated: z.string().default("2025-09-12T12:40:15.900Z"),
3623
+ created: z.string().default("2025-09-18T16:20:51.118Z"),
3624
+ updated: z.string().default("2025-09-18T16:20:51.118Z"),
3625
3625
  guardrailConfig: z.union([
3626
3626
  z.lazy(() =>
3627
3627
  UpdateEvalGuardrailConfigEvalsResponse200Number$outboundSchema
@@ -3979,8 +3979,8 @@ export const UpdateEvalResponseBodyLLM$inboundSchema: z.ZodType<
3979
3979
  > = z.object({
3980
3980
  _id: z.string(),
3981
3981
  description: z.string(),
3982
- created: z.string().default("2025-09-12T12:40:15.900Z"),
3983
- updated: z.string().default("2025-09-12T12:40:15.900Z"),
3982
+ created: z.string().default("2025-09-18T16:20:51.118Z"),
3983
+ updated: z.string().default("2025-09-18T16:20:51.118Z"),
3984
3984
  guardrail_config: z.union([
3985
3985
  z.lazy(() => UpdateEvalGuardrailConfigEvalsResponseNumber$inboundSchema),
3986
3986
  z.lazy(() => UpdateEvalGuardrailConfigEvalsResponseBoolean$inboundSchema),
@@ -4020,8 +4020,8 @@ export const UpdateEvalResponseBodyLLM$outboundSchema: z.ZodType<
4020
4020
  > = z.object({
4021
4021
  id: z.string(),
4022
4022
  description: z.string(),
4023
- created: z.string().default("2025-09-12T12:40:15.900Z"),
4024
- updated: z.string().default("2025-09-12T12:40:15.900Z"),
4023
+ created: z.string().default("2025-09-18T16:20:51.118Z"),
4024
+ updated: z.string().default("2025-09-18T16:20:51.118Z"),
4025
4025
  guardrailConfig: z.union([
4026
4026
  z.lazy(() => UpdateEvalGuardrailConfigEvalsResponseNumber$outboundSchema),
4027
4027
  z.lazy(() => UpdateEvalGuardrailConfigEvalsResponseBoolean$outboundSchema),
@@ -1,30 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import dotenv from "dotenv";
6
- dotenv.config();
7
- /**
8
- * Example usage of the @orq-ai/node SDK
9
- *
10
- * To run this example from the examples directory:
11
- * npm run build && npx tsx postV2AgentsInternal.example.ts
12
- */
13
-
14
- import { Orq } from "@orq-ai/node";
15
-
16
- const orq = new Orq({
17
- apiKey: process.env["ORQ_API_KEY"] ?? "",
18
- });
19
-
20
- async function main() {
21
- await orq.postV2AgentsInternal({
22
- path: "Default",
23
- key: "<key>",
24
- description: "qua hm over irk",
25
- instructions: "<value>",
26
- model: "Model S",
27
- });
28
- }
29
-
30
- main().catch(console.error);
@@ -1,159 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod";
6
- import { OrqCore } from "../core.js";
7
- import { encodeJSON } from "../lib/encodings.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 { OrqError } from "../models/errors/orqerror.js";
22
- import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
23
- import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
24
- import * as operations from "../models/operations/index.js";
25
- import { APICall, APIPromise } from "../types/async.js";
26
- import { Result } from "../types/fp.js";
27
-
28
- export function postV2AgentsInternal(
29
- client: OrqCore,
30
- request?: operations.PostV2AgentsInternalRequestBody | undefined,
31
- options?: RequestOptions,
32
- ): APIPromise<
33
- Result<
34
- void,
35
- | OrqError
36
- | ResponseValidationError
37
- | ConnectionError
38
- | RequestAbortedError
39
- | RequestTimeoutError
40
- | InvalidRequestError
41
- | UnexpectedClientError
42
- | SDKValidationError
43
- >
44
- > {
45
- return new APIPromise($do(
46
- client,
47
- request,
48
- options,
49
- ));
50
- }
51
-
52
- async function $do(
53
- client: OrqCore,
54
- request?: operations.PostV2AgentsInternalRequestBody | undefined,
55
- options?: RequestOptions,
56
- ): Promise<
57
- [
58
- Result<
59
- void,
60
- | OrqError
61
- | ResponseValidationError
62
- | ConnectionError
63
- | RequestAbortedError
64
- | RequestTimeoutError
65
- | InvalidRequestError
66
- | UnexpectedClientError
67
- | SDKValidationError
68
- >,
69
- APICall,
70
- ]
71
- > {
72
- const parsed = safeParse(
73
- request,
74
- (value) =>
75
- operations.PostV2AgentsInternalRequestBody$outboundSchema.optional()
76
- .parse(value),
77
- "Input validation failed",
78
- );
79
- if (!parsed.ok) {
80
- return [parsed, { status: "invalid" }];
81
- }
82
- const payload = parsed.value;
83
- const body = payload === undefined
84
- ? null
85
- : encodeJSON("body", payload, { explode: true });
86
-
87
- const path = pathToFunc("/v2/agents/internal")();
88
-
89
- const headers = new Headers(compactMap({
90
- "Content-Type": "application/json",
91
- Accept: "*/*",
92
- }));
93
-
94
- const secConfig = await extractSecurity(client._options.apiKey);
95
- const securityInput = secConfig == null ? {} : { apiKey: secConfig };
96
- const requestSecurity = resolveGlobalSecurity(securityInput);
97
-
98
- const context = {
99
- options: client._options,
100
- baseURL: options?.serverURL ?? client._baseURL ?? "",
101
- operationID: "post_/v2/agents/internal",
102
- oAuth2Scopes: [],
103
-
104
- resolvedSecurity: requestSecurity,
105
-
106
- securitySource: client._options.apiKey,
107
- retryConfig: options?.retries
108
- || client._options.retryConfig
109
- || { strategy: "none" },
110
- retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
111
- };
112
-
113
- const requestRes = client._createRequest(context, {
114
- security: requestSecurity,
115
- method: "POST",
116
- baseURL: options?.serverURL,
117
- path: path,
118
- headers: headers,
119
- body: body,
120
- userAgent: client._options.userAgent,
121
- timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
122
- }, options);
123
- if (!requestRes.ok) {
124
- return [requestRes, { status: "invalid" }];
125
- }
126
- const req = requestRes.value;
127
-
128
- const doResult = await client._do(req, {
129
- context,
130
- errorCodes: ["4XX", "5XX"],
131
- retryConfig: context.retryConfig,
132
- retryCodes: context.retryCodes,
133
- });
134
- if (!doResult.ok) {
135
- return [doResult, { status: "request-error", request: req }];
136
- }
137
- const response = doResult.value;
138
-
139
- const [result] = await M.match<
140
- void,
141
- | OrqError
142
- | ResponseValidationError
143
- | ConnectionError
144
- | RequestAbortedError
145
- | RequestTimeoutError
146
- | InvalidRequestError
147
- | UnexpectedClientError
148
- | SDKValidationError
149
- >(
150
- M.nil(201, z.void()),
151
- M.fail("4XX"),
152
- M.fail("5XX"),
153
- )(response, req);
154
- if (!result.ok) {
155
- return [result, { status: "complete", request: req, response }];
156
- }
157
-
158
- return [result, { status: "complete", request: req, response }];
159
- }
@@ -1,33 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import { postV2AgentsInternal } from "../../funcs/postV2AgentsInternal.js";
6
- import * as operations from "../../models/operations/index.js";
7
- import { formatResult, ToolDefinition } from "../tools.js";
8
-
9
- const args = {
10
- request: operations.PostV2AgentsInternalRequestBody$inboundSchema.optional(),
11
- };
12
-
13
- export const tool$postV2AgentsInternal: ToolDefinition<typeof args> = {
14
- name: "post-v2-agents-internal",
15
- description: ``,
16
- args,
17
- tool: async (client, args, ctx) => {
18
- const [result, apiCall] = await postV2AgentsInternal(
19
- client,
20
- args.request,
21
- { fetchOptions: { signal: ctx.signal } },
22
- ).$inspect();
23
-
24
- if (!result.ok) {
25
- return {
26
- content: [{ type: "text", text: result.error.message }],
27
- isError: true,
28
- };
29
- }
30
-
31
- return formatResult(void 0, apiCall);
32
- },
33
- };
@@ -1,103 +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 { Result as SafeParseResult } from "../../types/fp.js";
9
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
-
11
- export type PostV2AgentsInternalRequestBody = {
12
- /**
13
- * The path where the entity is stored in the project structure. The first element of the path always represents the project name. Any subsequent path element after the project will be created as a folder in the project if it does not exists.
14
- */
15
- path: string;
16
- key: string;
17
- description: string;
18
- instructions: string;
19
- model: string;
20
- /**
21
- * Optional array of fallback model IDs to use when the primary model fails
22
- */
23
- fallbackModels?: Array<string> | undefined;
24
- };
25
-
26
- /** @internal */
27
- export const PostV2AgentsInternalRequestBody$inboundSchema: z.ZodType<
28
- PostV2AgentsInternalRequestBody,
29
- z.ZodTypeDef,
30
- unknown
31
- > = z.object({
32
- path: z.string(),
33
- key: z.string(),
34
- description: z.string(),
35
- instructions: z.string(),
36
- model: z.string(),
37
- fallback_models: z.array(z.string()).optional(),
38
- }).transform((v) => {
39
- return remap$(v, {
40
- "fallback_models": "fallbackModels",
41
- });
42
- });
43
-
44
- /** @internal */
45
- export type PostV2AgentsInternalRequestBody$Outbound = {
46
- path: string;
47
- key: string;
48
- description: string;
49
- instructions: string;
50
- model: string;
51
- fallback_models?: Array<string> | undefined;
52
- };
53
-
54
- /** @internal */
55
- export const PostV2AgentsInternalRequestBody$outboundSchema: z.ZodType<
56
- PostV2AgentsInternalRequestBody$Outbound,
57
- z.ZodTypeDef,
58
- PostV2AgentsInternalRequestBody
59
- > = z.object({
60
- path: z.string(),
61
- key: z.string(),
62
- description: z.string(),
63
- instructions: z.string(),
64
- model: z.string(),
65
- fallbackModels: z.array(z.string()).optional(),
66
- }).transform((v) => {
67
- return remap$(v, {
68
- fallbackModels: "fallback_models",
69
- });
70
- });
71
-
72
- /**
73
- * @internal
74
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
75
- */
76
- export namespace PostV2AgentsInternalRequestBody$ {
77
- /** @deprecated use `PostV2AgentsInternalRequestBody$inboundSchema` instead. */
78
- export const inboundSchema = PostV2AgentsInternalRequestBody$inboundSchema;
79
- /** @deprecated use `PostV2AgentsInternalRequestBody$outboundSchema` instead. */
80
- export const outboundSchema = PostV2AgentsInternalRequestBody$outboundSchema;
81
- /** @deprecated use `PostV2AgentsInternalRequestBody$Outbound` instead. */
82
- export type Outbound = PostV2AgentsInternalRequestBody$Outbound;
83
- }
84
-
85
- export function postV2AgentsInternalRequestBodyToJSON(
86
- postV2AgentsInternalRequestBody: PostV2AgentsInternalRequestBody,
87
- ): string {
88
- return JSON.stringify(
89
- PostV2AgentsInternalRequestBody$outboundSchema.parse(
90
- postV2AgentsInternalRequestBody,
91
- ),
92
- );
93
- }
94
-
95
- export function postV2AgentsInternalRequestBodyFromJSON(
96
- jsonString: string,
97
- ): SafeParseResult<PostV2AgentsInternalRequestBody, SDKValidationError> {
98
- return safeParse(
99
- jsonString,
100
- (x) => PostV2AgentsInternalRequestBody$inboundSchema.parse(JSON.parse(x)),
101
- `Failed to parse 'PostV2AgentsInternalRequestBody' from JSON`,
102
- );
103
- }