@orq-ai/node 3.12.19 → 3.12.21

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 (127) 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/server.js +1 -1
  10. package/models/operations/createbudget.js +2 -2
  11. package/models/operations/createcontact.js +2 -2
  12. package/models/operations/createdataset.js +2 -2
  13. package/models/operations/createdatasetitem.js +2 -2
  14. package/models/operations/createdatasource.js +2 -2
  15. package/models/operations/createeval.js +16 -16
  16. package/models/operations/fileget.js +2 -2
  17. package/models/operations/filelist.js +2 -2
  18. package/models/operations/fileupload.js +2 -2
  19. package/models/operations/getbudget.js +2 -2
  20. package/models/operations/getevals.js +28 -28
  21. package/models/operations/listbudgets.js +2 -2
  22. package/models/operations/listcontacts.js +2 -2
  23. package/models/operations/listdatasetdatapoints.js +2 -2
  24. package/models/operations/listdatasets.js +2 -2
  25. package/models/operations/listdatasources.js +2 -2
  26. package/models/operations/retrievecontact.js +2 -2
  27. package/models/operations/retrievedatapoint.js +2 -2
  28. package/models/operations/retrievedataset.js +2 -2
  29. package/models/operations/retrievedatasource.js +2 -2
  30. package/models/operations/updatebudget.js +2 -2
  31. package/models/operations/updatecontact.js +2 -2
  32. package/models/operations/updatedatapoint.js +2 -2
  33. package/models/operations/updatedataset.js +2 -2
  34. package/models/operations/updatedatasource.js +2 -2
  35. package/models/operations/updateeval.js +16 -16
  36. package/package.json +1 -1
  37. package/packages/orq-rc/examples/package-lock.json +1 -1
  38. package/packages/orq-rc/jsr.json +1 -1
  39. package/packages/orq-rc/package-lock.json +2 -2
  40. package/packages/orq-rc/package.json +1 -1
  41. package/packages/orq-rc/src/lib/config.ts +3 -3
  42. package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
  43. package/packages/orq-rc/src/mcp-server/server.ts +1 -1
  44. package/packages/orq-rc/src/models/components/deployments.ts +39 -44
  45. package/packages/orq-rc/src/models/components/index.ts +0 -13
  46. package/packages/orq-rc/src/models/operations/createbudget.ts +2 -2
  47. package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
  48. package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
  49. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +2 -2
  50. package/packages/orq-rc/src/models/operations/createdatasource.ts +2 -2
  51. package/packages/orq-rc/src/models/operations/createeval.ts +56 -60
  52. package/packages/orq-rc/src/models/operations/creatememorystore.ts +18 -17
  53. package/packages/orq-rc/src/models/operations/createprompt.ts +34 -30
  54. package/packages/orq-rc/src/models/operations/createtool.ts +42 -68
  55. package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +27 -36
  56. package/packages/orq-rc/src/models/operations/duplicatetool.ts +10 -10
  57. package/packages/orq-rc/src/models/operations/fileget.ts +2 -2
  58. package/packages/orq-rc/src/models/operations/filelist.ts +2 -2
  59. package/packages/orq-rc/src/models/operations/fileupload.ts +2 -2
  60. package/packages/orq-rc/src/models/operations/getagent.ts +203 -141
  61. package/packages/orq-rc/src/models/operations/getalltools.ts +10 -10
  62. package/packages/orq-rc/src/models/operations/getbudget.ts +2 -2
  63. package/packages/orq-rc/src/models/operations/getevals.ts +28 -28
  64. package/packages/orq-rc/src/models/operations/listagents.ts +202 -141
  65. package/packages/orq-rc/src/models/operations/listbudgets.ts +2 -2
  66. package/packages/orq-rc/src/models/operations/listchunks.ts +21 -21
  67. package/packages/orq-rc/src/models/operations/listcontacts.ts +2 -2
  68. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +2 -2
  69. package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
  70. package/packages/orq-rc/src/models/operations/listdatasources.ts +22 -29
  71. package/packages/orq-rc/src/models/operations/retrievecontact.ts +2 -2
  72. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +2 -2
  73. package/packages/orq-rc/src/models/operations/retrievedataset.ts +2 -2
  74. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +2 -2
  75. package/packages/orq-rc/src/models/operations/retrievetool.ts +10 -10
  76. package/packages/orq-rc/src/models/operations/runagent.ts +2292 -1130
  77. package/packages/orq-rc/src/models/operations/streamrunagent.ts +2590 -1252
  78. package/packages/orq-rc/src/models/operations/updatebudget.ts +2 -2
  79. package/packages/orq-rc/src/models/operations/updatecontact.ts +2 -2
  80. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +2 -2
  81. package/packages/orq-rc/src/models/operations/updatedataset.ts +2 -2
  82. package/packages/orq-rc/src/models/operations/updatedatasource.ts +2 -2
  83. package/packages/orq-rc/src/models/operations/updateeval.ts +57 -57
  84. package/packages/orq-rc/src/models/operations/updatememorystore.ts +17 -21
  85. package/packages/orq-rc/src/models/operations/updatetool.ts +43 -69
  86. package/src/lib/config.ts +3 -3
  87. package/src/mcp-server/mcp-server.ts +1 -1
  88. package/src/mcp-server/server.ts +1 -1
  89. package/src/models/operations/createbudget.ts +2 -2
  90. package/src/models/operations/createcontact.ts +2 -2
  91. package/src/models/operations/createdataset.ts +2 -2
  92. package/src/models/operations/createdatasetitem.ts +2 -2
  93. package/src/models/operations/createdatasource.ts +2 -2
  94. package/src/models/operations/createeval.ts +16 -16
  95. package/src/models/operations/fileget.ts +2 -2
  96. package/src/models/operations/filelist.ts +2 -2
  97. package/src/models/operations/fileupload.ts +2 -2
  98. package/src/models/operations/getbudget.ts +2 -2
  99. package/src/models/operations/getevals.ts +28 -28
  100. package/src/models/operations/listbudgets.ts +2 -2
  101. package/src/models/operations/listcontacts.ts +2 -2
  102. package/src/models/operations/listdatasetdatapoints.ts +2 -2
  103. package/src/models/operations/listdatasets.ts +2 -2
  104. package/src/models/operations/listdatasources.ts +2 -2
  105. package/src/models/operations/retrievecontact.ts +2 -2
  106. package/src/models/operations/retrievedatapoint.ts +2 -2
  107. package/src/models/operations/retrievedataset.ts +2 -2
  108. package/src/models/operations/retrievedatasource.ts +2 -2
  109. package/src/models/operations/updatebudget.ts +2 -2
  110. package/src/models/operations/updatecontact.ts +2 -2
  111. package/src/models/operations/updatedatapoint.ts +2 -2
  112. package/src/models/operations/updatedataset.ts +2 -2
  113. package/src/models/operations/updatedatasource.ts +2 -2
  114. package/src/models/operations/updateeval.ts +16 -16
  115. package/packages/orq-rc/src/models/components/callsubagenttool.ts +0 -109
  116. package/packages/orq-rc/src/models/components/codeexecutiontool.ts +0 -293
  117. package/packages/orq-rc/src/models/components/currentdatetool.ts +0 -107
  118. package/packages/orq-rc/src/models/components/functiontool.ts +0 -195
  119. package/packages/orq-rc/src/models/components/googlesearchtool.ts +0 -108
  120. package/packages/orq-rc/src/models/components/httptool.ts +0 -532
  121. package/packages/orq-rc/src/models/components/queryknowledgebasetool.ts +0 -111
  122. package/packages/orq-rc/src/models/components/querymemorystoretool.ts +0 -111
  123. package/packages/orq-rc/src/models/components/retrieveagentstool.ts +0 -109
  124. package/packages/orq-rc/src/models/components/retrieveknowledgebasestool.ts +0 -111
  125. package/packages/orq-rc/src/models/components/retrievememorystorestool.ts +0 -111
  126. package/packages/orq-rc/src/models/components/webscrapertool.ts +0 -105
  127. package/packages/orq-rc/src/models/components/writememorystoretool.ts +0 -111
@@ -1,108 +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 Type = {
13
- GoogleSearch: "google_search",
14
- } as const;
15
- export type Type = ClosedEnum<typeof Type>;
16
-
17
- /**
18
- * Performs Google searches to retrieve web content
19
- */
20
- export type GoogleSearchTool = {
21
- type: Type;
22
- requiresApproval?: boolean | undefined;
23
- };
24
-
25
- /** @internal */
26
- export const Type$inboundSchema: z.ZodNativeEnum<typeof Type> = z.nativeEnum(
27
- Type,
28
- );
29
-
30
- /** @internal */
31
- export const Type$outboundSchema: z.ZodNativeEnum<typeof Type> =
32
- Type$inboundSchema;
33
-
34
- /**
35
- * @internal
36
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
37
- */
38
- export namespace Type$ {
39
- /** @deprecated use `Type$inboundSchema` instead. */
40
- export const inboundSchema = Type$inboundSchema;
41
- /** @deprecated use `Type$outboundSchema` instead. */
42
- export const outboundSchema = Type$outboundSchema;
43
- }
44
-
45
- /** @internal */
46
- export const GoogleSearchTool$inboundSchema: z.ZodType<
47
- GoogleSearchTool,
48
- z.ZodTypeDef,
49
- unknown
50
- > = z.object({
51
- type: Type$inboundSchema,
52
- requires_approval: z.boolean().default(false),
53
- }).transform((v) => {
54
- return remap$(v, {
55
- "requires_approval": "requiresApproval",
56
- });
57
- });
58
-
59
- /** @internal */
60
- export type GoogleSearchTool$Outbound = {
61
- type: string;
62
- requires_approval: boolean;
63
- };
64
-
65
- /** @internal */
66
- export const GoogleSearchTool$outboundSchema: z.ZodType<
67
- GoogleSearchTool$Outbound,
68
- z.ZodTypeDef,
69
- GoogleSearchTool
70
- > = z.object({
71
- type: Type$outboundSchema,
72
- requiresApproval: z.boolean().default(false),
73
- }).transform((v) => {
74
- return remap$(v, {
75
- requiresApproval: "requires_approval",
76
- });
77
- });
78
-
79
- /**
80
- * @internal
81
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
82
- */
83
- export namespace GoogleSearchTool$ {
84
- /** @deprecated use `GoogleSearchTool$inboundSchema` instead. */
85
- export const inboundSchema = GoogleSearchTool$inboundSchema;
86
- /** @deprecated use `GoogleSearchTool$outboundSchema` instead. */
87
- export const outboundSchema = GoogleSearchTool$outboundSchema;
88
- /** @deprecated use `GoogleSearchTool$Outbound` instead. */
89
- export type Outbound = GoogleSearchTool$Outbound;
90
- }
91
-
92
- export function googleSearchToolToJSON(
93
- googleSearchTool: GoogleSearchTool,
94
- ): string {
95
- return JSON.stringify(
96
- GoogleSearchTool$outboundSchema.parse(googleSearchTool),
97
- );
98
- }
99
-
100
- export function googleSearchToolFromJSON(
101
- jsonString: string,
102
- ): SafeParseResult<GoogleSearchTool, SDKValidationError> {
103
- return safeParse(
104
- jsonString,
105
- (x) => GoogleSearchTool$inboundSchema.parse(JSON.parse(x)),
106
- `Failed to parse 'GoogleSearchTool' from JSON`,
107
- );
108
- }
@@ -1,532 +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
- /**
13
- * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
14
- */
15
- export const Status = {
16
- Live: "live",
17
- Draft: "draft",
18
- Pending: "pending",
19
- Published: "published",
20
- } as const;
21
- /**
22
- * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
23
- */
24
- export type Status = ClosedEnum<typeof Status>;
25
-
26
- export const HttpToolType = {
27
- Http: "http",
28
- } as const;
29
- export type HttpToolType = ClosedEnum<typeof HttpToolType>;
30
-
31
- /**
32
- * The HTTP method to use.
33
- */
34
- export const Method = {
35
- Get: "GET",
36
- Post: "POST",
37
- Put: "PUT",
38
- Delete: "DELETE",
39
- } as const;
40
- /**
41
- * The HTTP method to use.
42
- */
43
- export type Method = ClosedEnum<typeof Method>;
44
-
45
- /**
46
- * The blueprint for the HTTP request. The `arguments` field will be used to replace the placeholders in the `url`, `headers`, `body`, and `arguments` fields.
47
- */
48
- export type Blueprint = {
49
- /**
50
- * The URL to send the request to.
51
- */
52
- url: string;
53
- /**
54
- * The HTTP method to use.
55
- */
56
- method: Method;
57
- /**
58
- * The headers to send with the request.
59
- */
60
- headers?: { [k: string]: string } | undefined;
61
- /**
62
- * The body to send with the request.
63
- */
64
- body?: { [k: string]: any } | undefined;
65
- };
66
-
67
- /**
68
- * The type of the argument.
69
- */
70
- export const HttpToolHttpType = {
71
- String: "string",
72
- Number: "number",
73
- Boolean: "boolean",
74
- } as const;
75
- /**
76
- * The type of the argument.
77
- */
78
- export type HttpToolHttpType = ClosedEnum<typeof HttpToolHttpType>;
79
-
80
- /**
81
- * The default value of the argument.
82
- */
83
- export type DefaultValue = string | number | boolean;
84
-
85
- export type Arguments = {
86
- /**
87
- * The type of the argument.
88
- */
89
- type: HttpToolHttpType;
90
- /**
91
- * A description of the argument.
92
- */
93
- description: string;
94
- /**
95
- * Whether to send the argument to the model. If set to false, the argument will not be sent to the model and needs to be provided by the user or it will be left blank.
96
- */
97
- sendToModel?: boolean | undefined;
98
- /**
99
- * The default value of the argument.
100
- */
101
- defaultValue?: string | number | boolean | undefined;
102
- };
103
-
104
- export type Http = {
105
- /**
106
- * The blueprint for the HTTP request. The `arguments` field will be used to replace the placeholders in the `url`, `headers`, `body`, and `arguments` fields.
107
- */
108
- blueprint: Blueprint;
109
- /**
110
- * The arguments to send with the request. The keys will be used to replace the placeholders in the `blueprint` field.
111
- */
112
- arguments?: { [k: string]: Arguments } | undefined;
113
- };
114
-
115
- /**
116
- * Makes HTTP requests to external APIs
117
- */
118
- export type HttpTool = {
119
- id?: string | undefined;
120
- /**
121
- * 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.
122
- */
123
- path: string;
124
- /**
125
- * Unique key of the tool as it will be displayed in the UI
126
- */
127
- key: string;
128
- /**
129
- * The name of the tool as it will be displayed in the UI. This is optional and if not provided, the `key` will be used.
130
- */
131
- displayName: string;
132
- /**
133
- * A description of the tool, used by the model to choose when and how to call the tool. We do recommend using the `description` field as accurate as possible to give enough context to the model to make the right decision.
134
- */
135
- description: string;
136
- /**
137
- * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
138
- */
139
- status?: Status | undefined;
140
- versionHash?: string | undefined;
141
- type: HttpToolType;
142
- http: Http;
143
- requiresApproval?: boolean | undefined;
144
- };
145
-
146
- /** @internal */
147
- export const Status$inboundSchema: z.ZodNativeEnum<typeof Status> = z
148
- .nativeEnum(Status);
149
-
150
- /** @internal */
151
- export const Status$outboundSchema: z.ZodNativeEnum<typeof Status> =
152
- Status$inboundSchema;
153
-
154
- /**
155
- * @internal
156
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
157
- */
158
- export namespace Status$ {
159
- /** @deprecated use `Status$inboundSchema` instead. */
160
- export const inboundSchema = Status$inboundSchema;
161
- /** @deprecated use `Status$outboundSchema` instead. */
162
- export const outboundSchema = Status$outboundSchema;
163
- }
164
-
165
- /** @internal */
166
- export const HttpToolType$inboundSchema: z.ZodNativeEnum<typeof HttpToolType> =
167
- z.nativeEnum(HttpToolType);
168
-
169
- /** @internal */
170
- export const HttpToolType$outboundSchema: z.ZodNativeEnum<typeof HttpToolType> =
171
- HttpToolType$inboundSchema;
172
-
173
- /**
174
- * @internal
175
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
176
- */
177
- export namespace HttpToolType$ {
178
- /** @deprecated use `HttpToolType$inboundSchema` instead. */
179
- export const inboundSchema = HttpToolType$inboundSchema;
180
- /** @deprecated use `HttpToolType$outboundSchema` instead. */
181
- export const outboundSchema = HttpToolType$outboundSchema;
182
- }
183
-
184
- /** @internal */
185
- export const Method$inboundSchema: z.ZodNativeEnum<typeof Method> = z
186
- .nativeEnum(Method);
187
-
188
- /** @internal */
189
- export const Method$outboundSchema: z.ZodNativeEnum<typeof Method> =
190
- Method$inboundSchema;
191
-
192
- /**
193
- * @internal
194
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
195
- */
196
- export namespace Method$ {
197
- /** @deprecated use `Method$inboundSchema` instead. */
198
- export const inboundSchema = Method$inboundSchema;
199
- /** @deprecated use `Method$outboundSchema` instead. */
200
- export const outboundSchema = Method$outboundSchema;
201
- }
202
-
203
- /** @internal */
204
- export const Blueprint$inboundSchema: z.ZodType<
205
- Blueprint,
206
- z.ZodTypeDef,
207
- unknown
208
- > = z.object({
209
- url: z.string(),
210
- method: Method$inboundSchema,
211
- headers: z.record(z.string()).optional(),
212
- body: z.record(z.any()).optional(),
213
- });
214
-
215
- /** @internal */
216
- export type Blueprint$Outbound = {
217
- url: string;
218
- method: string;
219
- headers?: { [k: string]: string } | undefined;
220
- body?: { [k: string]: any } | undefined;
221
- };
222
-
223
- /** @internal */
224
- export const Blueprint$outboundSchema: z.ZodType<
225
- Blueprint$Outbound,
226
- z.ZodTypeDef,
227
- Blueprint
228
- > = z.object({
229
- url: z.string(),
230
- method: Method$outboundSchema,
231
- headers: z.record(z.string()).optional(),
232
- body: z.record(z.any()).optional(),
233
- });
234
-
235
- /**
236
- * @internal
237
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
238
- */
239
- export namespace Blueprint$ {
240
- /** @deprecated use `Blueprint$inboundSchema` instead. */
241
- export const inboundSchema = Blueprint$inboundSchema;
242
- /** @deprecated use `Blueprint$outboundSchema` instead. */
243
- export const outboundSchema = Blueprint$outboundSchema;
244
- /** @deprecated use `Blueprint$Outbound` instead. */
245
- export type Outbound = Blueprint$Outbound;
246
- }
247
-
248
- export function blueprintToJSON(blueprint: Blueprint): string {
249
- return JSON.stringify(Blueprint$outboundSchema.parse(blueprint));
250
- }
251
-
252
- export function blueprintFromJSON(
253
- jsonString: string,
254
- ): SafeParseResult<Blueprint, SDKValidationError> {
255
- return safeParse(
256
- jsonString,
257
- (x) => Blueprint$inboundSchema.parse(JSON.parse(x)),
258
- `Failed to parse 'Blueprint' from JSON`,
259
- );
260
- }
261
-
262
- /** @internal */
263
- export const HttpToolHttpType$inboundSchema: z.ZodNativeEnum<
264
- typeof HttpToolHttpType
265
- > = z.nativeEnum(HttpToolHttpType);
266
-
267
- /** @internal */
268
- export const HttpToolHttpType$outboundSchema: z.ZodNativeEnum<
269
- typeof HttpToolHttpType
270
- > = HttpToolHttpType$inboundSchema;
271
-
272
- /**
273
- * @internal
274
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
275
- */
276
- export namespace HttpToolHttpType$ {
277
- /** @deprecated use `HttpToolHttpType$inboundSchema` instead. */
278
- export const inboundSchema = HttpToolHttpType$inboundSchema;
279
- /** @deprecated use `HttpToolHttpType$outboundSchema` instead. */
280
- export const outboundSchema = HttpToolHttpType$outboundSchema;
281
- }
282
-
283
- /** @internal */
284
- export const DefaultValue$inboundSchema: z.ZodType<
285
- DefaultValue,
286
- z.ZodTypeDef,
287
- unknown
288
- > = z.union([z.string(), z.number(), z.boolean()]);
289
-
290
- /** @internal */
291
- export type DefaultValue$Outbound = string | number | boolean;
292
-
293
- /** @internal */
294
- export const DefaultValue$outboundSchema: z.ZodType<
295
- DefaultValue$Outbound,
296
- z.ZodTypeDef,
297
- DefaultValue
298
- > = z.union([z.string(), z.number(), z.boolean()]);
299
-
300
- /**
301
- * @internal
302
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
303
- */
304
- export namespace DefaultValue$ {
305
- /** @deprecated use `DefaultValue$inboundSchema` instead. */
306
- export const inboundSchema = DefaultValue$inboundSchema;
307
- /** @deprecated use `DefaultValue$outboundSchema` instead. */
308
- export const outboundSchema = DefaultValue$outboundSchema;
309
- /** @deprecated use `DefaultValue$Outbound` instead. */
310
- export type Outbound = DefaultValue$Outbound;
311
- }
312
-
313
- export function defaultValueToJSON(defaultValue: DefaultValue): string {
314
- return JSON.stringify(DefaultValue$outboundSchema.parse(defaultValue));
315
- }
316
-
317
- export function defaultValueFromJSON(
318
- jsonString: string,
319
- ): SafeParseResult<DefaultValue, SDKValidationError> {
320
- return safeParse(
321
- jsonString,
322
- (x) => DefaultValue$inboundSchema.parse(JSON.parse(x)),
323
- `Failed to parse 'DefaultValue' from JSON`,
324
- );
325
- }
326
-
327
- /** @internal */
328
- export const Arguments$inboundSchema: z.ZodType<
329
- Arguments,
330
- z.ZodTypeDef,
331
- unknown
332
- > = z.object({
333
- type: HttpToolHttpType$inboundSchema,
334
- description: z.string(),
335
- send_to_model: z.boolean().default(true),
336
- default_value: z.union([z.string(), z.number(), z.boolean()]).optional(),
337
- }).transform((v) => {
338
- return remap$(v, {
339
- "send_to_model": "sendToModel",
340
- "default_value": "defaultValue",
341
- });
342
- });
343
-
344
- /** @internal */
345
- export type Arguments$Outbound = {
346
- type: string;
347
- description: string;
348
- send_to_model: boolean;
349
- default_value?: string | number | boolean | undefined;
350
- };
351
-
352
- /** @internal */
353
- export const Arguments$outboundSchema: z.ZodType<
354
- Arguments$Outbound,
355
- z.ZodTypeDef,
356
- Arguments
357
- > = z.object({
358
- type: HttpToolHttpType$outboundSchema,
359
- description: z.string(),
360
- sendToModel: z.boolean().default(true),
361
- defaultValue: z.union([z.string(), z.number(), z.boolean()]).optional(),
362
- }).transform((v) => {
363
- return remap$(v, {
364
- sendToModel: "send_to_model",
365
- defaultValue: "default_value",
366
- });
367
- });
368
-
369
- /**
370
- * @internal
371
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
372
- */
373
- export namespace Arguments$ {
374
- /** @deprecated use `Arguments$inboundSchema` instead. */
375
- export const inboundSchema = Arguments$inboundSchema;
376
- /** @deprecated use `Arguments$outboundSchema` instead. */
377
- export const outboundSchema = Arguments$outboundSchema;
378
- /** @deprecated use `Arguments$Outbound` instead. */
379
- export type Outbound = Arguments$Outbound;
380
- }
381
-
382
- export function argumentsToJSON(value: Arguments): string {
383
- return JSON.stringify(Arguments$outboundSchema.parse(value));
384
- }
385
-
386
- export function argumentsFromJSON(
387
- jsonString: string,
388
- ): SafeParseResult<Arguments, SDKValidationError> {
389
- return safeParse(
390
- jsonString,
391
- (x) => Arguments$inboundSchema.parse(JSON.parse(x)),
392
- `Failed to parse 'Arguments' from JSON`,
393
- );
394
- }
395
-
396
- /** @internal */
397
- export const Http$inboundSchema: z.ZodType<Http, z.ZodTypeDef, unknown> = z
398
- .object({
399
- blueprint: z.lazy(() => Blueprint$inboundSchema),
400
- arguments: z.record(z.lazy(() => Arguments$inboundSchema)).optional(),
401
- });
402
-
403
- /** @internal */
404
- export type Http$Outbound = {
405
- blueprint: Blueprint$Outbound;
406
- arguments?: { [k: string]: Arguments$Outbound } | undefined;
407
- };
408
-
409
- /** @internal */
410
- export const Http$outboundSchema: z.ZodType<Http$Outbound, z.ZodTypeDef, Http> =
411
- z.object({
412
- blueprint: z.lazy(() => Blueprint$outboundSchema),
413
- arguments: z.record(z.lazy(() => Arguments$outboundSchema)).optional(),
414
- });
415
-
416
- /**
417
- * @internal
418
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
419
- */
420
- export namespace Http$ {
421
- /** @deprecated use `Http$inboundSchema` instead. */
422
- export const inboundSchema = Http$inboundSchema;
423
- /** @deprecated use `Http$outboundSchema` instead. */
424
- export const outboundSchema = Http$outboundSchema;
425
- /** @deprecated use `Http$Outbound` instead. */
426
- export type Outbound = Http$Outbound;
427
- }
428
-
429
- export function httpToJSON(http: Http): string {
430
- return JSON.stringify(Http$outboundSchema.parse(http));
431
- }
432
-
433
- export function httpFromJSON(
434
- jsonString: string,
435
- ): SafeParseResult<Http, SDKValidationError> {
436
- return safeParse(
437
- jsonString,
438
- (x) => Http$inboundSchema.parse(JSON.parse(x)),
439
- `Failed to parse 'Http' from JSON`,
440
- );
441
- }
442
-
443
- /** @internal */
444
- export const HttpTool$inboundSchema: z.ZodType<
445
- HttpTool,
446
- z.ZodTypeDef,
447
- unknown
448
- > = z.object({
449
- _id: z.string().default("01K60CGPWFAB7ZDDQT1K4MRS6G"),
450
- path: z.string(),
451
- key: z.string(),
452
- display_name: z.string(),
453
- description: z.string(),
454
- status: Status$inboundSchema.default("live"),
455
- version_hash: z.string().optional(),
456
- type: HttpToolType$inboundSchema,
457
- http: z.lazy(() => Http$inboundSchema),
458
- requires_approval: z.boolean().default(false),
459
- }).transform((v) => {
460
- return remap$(v, {
461
- "_id": "id",
462
- "display_name": "displayName",
463
- "version_hash": "versionHash",
464
- "requires_approval": "requiresApproval",
465
- });
466
- });
467
-
468
- /** @internal */
469
- export type HttpTool$Outbound = {
470
- _id: string;
471
- path: string;
472
- key: string;
473
- display_name: string;
474
- description: string;
475
- status: string;
476
- version_hash?: string | undefined;
477
- type: string;
478
- http: Http$Outbound;
479
- requires_approval: boolean;
480
- };
481
-
482
- /** @internal */
483
- export const HttpTool$outboundSchema: z.ZodType<
484
- HttpTool$Outbound,
485
- z.ZodTypeDef,
486
- HttpTool
487
- > = z.object({
488
- id: z.string().default("01K60CGPWFAB7ZDDQT1K4MRS6G"),
489
- path: z.string(),
490
- key: z.string(),
491
- displayName: z.string(),
492
- description: z.string(),
493
- status: Status$outboundSchema.default("live"),
494
- versionHash: z.string().optional(),
495
- type: HttpToolType$outboundSchema,
496
- http: z.lazy(() => Http$outboundSchema),
497
- requiresApproval: z.boolean().default(false),
498
- }).transform((v) => {
499
- return remap$(v, {
500
- id: "_id",
501
- displayName: "display_name",
502
- versionHash: "version_hash",
503
- requiresApproval: "requires_approval",
504
- });
505
- });
506
-
507
- /**
508
- * @internal
509
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
510
- */
511
- export namespace HttpTool$ {
512
- /** @deprecated use `HttpTool$inboundSchema` instead. */
513
- export const inboundSchema = HttpTool$inboundSchema;
514
- /** @deprecated use `HttpTool$outboundSchema` instead. */
515
- export const outboundSchema = HttpTool$outboundSchema;
516
- /** @deprecated use `HttpTool$Outbound` instead. */
517
- export type Outbound = HttpTool$Outbound;
518
- }
519
-
520
- export function httpToolToJSON(httpTool: HttpTool): string {
521
- return JSON.stringify(HttpTool$outboundSchema.parse(httpTool));
522
- }
523
-
524
- export function httpToolFromJSON(
525
- jsonString: string,
526
- ): SafeParseResult<HttpTool, SDKValidationError> {
527
- return safeParse(
528
- jsonString,
529
- (x) => HttpTool$inboundSchema.parse(JSON.parse(x)),
530
- `Failed to parse 'HttpTool' from JSON`,
531
- );
532
- }