@orq-ai/node 3.12.14 → 3.12.17

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 (167) hide show
  1. package/README.md +1 -4
  2. package/bin/mcp-server.js +113 -113
  3. package/bin/mcp-server.js.map +31 -31
  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/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/README.md +108 -94
  40. package/packages/orq-rc/docs/sdks/agents/README.md +8 -2
  41. package/packages/orq-rc/docs/sdks/evals/README.md +2 -0
  42. package/packages/orq-rc/docs/sdks/tools/README.md +488 -0
  43. package/packages/orq-rc/examples/package-lock.json +1 -1
  44. package/packages/orq-rc/jsr.json +1 -1
  45. package/packages/orq-rc/package-lock.json +2 -2
  46. package/packages/orq-rc/package.json +1 -1
  47. package/packages/orq-rc/src/funcs/toolsCreate.ts +163 -0
  48. package/packages/orq-rc/src/funcs/toolsDelete.ts +167 -0
  49. package/packages/orq-rc/src/funcs/toolsDuplicate.ts +175 -0
  50. package/packages/orq-rc/src/funcs/toolsList.ts +176 -0
  51. package/packages/orq-rc/src/funcs/toolsRetrieve.ts +166 -0
  52. package/packages/orq-rc/src/funcs/toolsUpdate.ts +176 -0
  53. package/packages/orq-rc/src/lib/config.ts +3 -3
  54. package/packages/orq-rc/src/lib/url.ts +1 -1
  55. package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
  56. package/packages/orq-rc/src/mcp-server/server.ts +13 -1
  57. package/packages/orq-rc/src/mcp-server/tools/toolsCreate.ts +37 -0
  58. package/packages/orq-rc/src/mcp-server/tools/toolsDelete.ts +35 -0
  59. package/packages/orq-rc/src/mcp-server/tools/toolsDuplicate.ts +37 -0
  60. package/packages/orq-rc/src/mcp-server/tools/toolsList.ts +37 -0
  61. package/packages/orq-rc/src/mcp-server/tools/toolsRetrieve.ts +37 -0
  62. package/packages/orq-rc/src/mcp-server/tools/toolsUpdate.ts +37 -0
  63. package/packages/orq-rc/src/models/components/callsubagenttool.ts +109 -0
  64. package/packages/orq-rc/src/models/components/codeexecutiontool.ts +293 -0
  65. package/packages/orq-rc/src/models/components/currentdatetool.ts +107 -0
  66. package/packages/orq-rc/src/models/components/deployments.ts +52 -45
  67. package/packages/orq-rc/src/models/components/functiontool.ts +195 -0
  68. package/packages/orq-rc/src/models/components/googlesearchtool.ts +108 -0
  69. package/packages/orq-rc/src/models/components/httptool.ts +532 -0
  70. package/packages/orq-rc/src/models/components/index.ts +13 -0
  71. package/packages/orq-rc/src/models/components/queryknowledgebasetool.ts +111 -0
  72. package/packages/orq-rc/src/models/components/querymemorystoretool.ts +111 -0
  73. package/packages/orq-rc/src/models/components/retrieveagentstool.ts +109 -0
  74. package/packages/orq-rc/src/models/components/retrieveknowledgebasestool.ts +111 -0
  75. package/packages/orq-rc/src/models/components/retrievememorystorestool.ts +111 -0
  76. package/packages/orq-rc/src/models/components/webscrapertool.ts +105 -0
  77. package/packages/orq-rc/src/models/components/writememorystoretool.ts +111 -0
  78. package/packages/orq-rc/src/models/errors/duplicatetool.ts +91 -0
  79. package/packages/orq-rc/src/models/errors/index.ts +2 -0
  80. package/packages/orq-rc/src/models/errors/updatetool.ts +91 -0
  81. package/packages/orq-rc/src/models/operations/createbudget.ts +2 -2
  82. package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
  83. package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
  84. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +10 -8
  85. package/packages/orq-rc/src/models/operations/createdatasource.ts +2 -2
  86. package/packages/orq-rc/src/models/operations/createeval.ts +199 -56
  87. package/packages/orq-rc/src/models/operations/createknowledge.ts +18 -0
  88. package/packages/orq-rc/src/models/operations/creatememorystore.ts +137 -136
  89. package/packages/orq-rc/src/models/operations/createprompt.ts +633 -314
  90. package/packages/orq-rc/src/models/operations/createtool.ts +4027 -0
  91. package/packages/orq-rc/src/models/operations/deletetool.ts +75 -0
  92. package/packages/orq-rc/src/models/operations/deploymentcreatemetric.ts +8 -6
  93. package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +363 -194
  94. package/packages/orq-rc/src/models/operations/deployments.ts +330 -160
  95. package/packages/orq-rc/src/models/operations/deploymentstream.ts +8 -6
  96. package/packages/orq-rc/src/models/operations/duplicatetool.ts +2311 -0
  97. package/packages/orq-rc/src/models/operations/fileget.ts +2 -2
  98. package/packages/orq-rc/src/models/operations/filelist.ts +2 -2
  99. package/packages/orq-rc/src/models/operations/fileupload.ts +2 -2
  100. package/packages/orq-rc/src/models/operations/getagent.ts +10 -10
  101. package/packages/orq-rc/src/models/operations/getallprompts.ts +334 -168
  102. package/packages/orq-rc/src/models/operations/getalltools.ts +2278 -0
  103. package/packages/orq-rc/src/models/operations/getbudget.ts +2 -2
  104. package/packages/orq-rc/src/models/operations/getevals.ts +28 -28
  105. package/packages/orq-rc/src/models/operations/getoneknowledge.ts +9 -0
  106. package/packages/orq-rc/src/models/operations/getoneprompt.ts +330 -167
  107. package/packages/orq-rc/src/models/operations/getpromptversion.ts +338 -168
  108. package/packages/orq-rc/src/models/operations/index.ts +6 -0
  109. package/packages/orq-rc/src/models/operations/listagents.ts +10 -10
  110. package/packages/orq-rc/src/models/operations/listbudgets.ts +2 -2
  111. package/packages/orq-rc/src/models/operations/listcontacts.ts +2 -2
  112. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +6 -5
  113. package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
  114. package/packages/orq-rc/src/models/operations/listdatasources.ts +2 -2
  115. package/packages/orq-rc/src/models/operations/listknowledgebases.ts +9 -0
  116. package/packages/orq-rc/src/models/operations/listpromptversions.ts +355 -183
  117. package/packages/orq-rc/src/models/operations/parse.ts +20 -335
  118. package/packages/orq-rc/src/models/operations/retrievecontact.ts +2 -2
  119. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +6 -5
  120. package/packages/orq-rc/src/models/operations/retrievedataset.ts +2 -2
  121. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +2 -2
  122. package/packages/orq-rc/src/models/operations/retrievetool.ts +2303 -0
  123. package/packages/orq-rc/src/models/operations/runagent.ts +428 -1384
  124. package/packages/orq-rc/src/models/operations/searchknowledge.ts +2 -2
  125. package/packages/orq-rc/src/models/operations/streamrunagent.ts +409 -1452
  126. package/packages/orq-rc/src/models/operations/updatebudget.ts +2 -2
  127. package/packages/orq-rc/src/models/operations/updatecontact.ts +2 -2
  128. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +10 -8
  129. package/packages/orq-rc/src/models/operations/updatedataset.ts +2 -2
  130. package/packages/orq-rc/src/models/operations/updatedatasource.ts +2 -2
  131. package/packages/orq-rc/src/models/operations/updateeval.ts +210 -57
  132. package/packages/orq-rc/src/models/operations/updateknowledge.ts +18 -0
  133. package/packages/orq-rc/src/models/operations/updatememorystore.ts +136 -168
  134. package/packages/orq-rc/src/models/operations/updateprompt.ts +670 -335
  135. package/packages/orq-rc/src/models/operations/updatetool.ts +4231 -0
  136. package/packages/orq-rc/src/sdk/sdk.ts +6 -0
  137. package/packages/orq-rc/src/sdk/tools.ts +117 -0
  138. package/src/lib/config.ts +3 -3
  139. package/src/lib/url.ts +1 -1
  140. package/src/mcp-server/mcp-server.ts +1 -1
  141. package/src/mcp-server/server.ts +1 -1
  142. package/src/models/operations/createbudget.ts +2 -2
  143. package/src/models/operations/createcontact.ts +2 -2
  144. package/src/models/operations/createdataset.ts +2 -2
  145. package/src/models/operations/createdatasetitem.ts +2 -2
  146. package/src/models/operations/createdatasource.ts +2 -2
  147. package/src/models/operations/createeval.ts +16 -16
  148. package/src/models/operations/fileget.ts +2 -2
  149. package/src/models/operations/filelist.ts +2 -2
  150. package/src/models/operations/fileupload.ts +2 -2
  151. package/src/models/operations/getbudget.ts +2 -2
  152. package/src/models/operations/getevals.ts +28 -28
  153. package/src/models/operations/listbudgets.ts +2 -2
  154. package/src/models/operations/listcontacts.ts +2 -2
  155. package/src/models/operations/listdatasetdatapoints.ts +2 -2
  156. package/src/models/operations/listdatasets.ts +2 -2
  157. package/src/models/operations/listdatasources.ts +2 -2
  158. package/src/models/operations/retrievecontact.ts +2 -2
  159. package/src/models/operations/retrievedatapoint.ts +2 -2
  160. package/src/models/operations/retrievedataset.ts +2 -2
  161. package/src/models/operations/retrievedatasource.ts +2 -2
  162. package/src/models/operations/updatebudget.ts +2 -2
  163. package/src/models/operations/updatecontact.ts +2 -2
  164. package/src/models/operations/updatedatapoint.ts +2 -2
  165. package/src/models/operations/updatedataset.ts +2 -2
  166. package/src/models/operations/updatedatasource.ts +2 -2
  167. package/src/models/operations/updateeval.ts +16 -16
@@ -0,0 +1,2303 @@
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 type RetrieveToolRequest = {
13
+ toolKey: string;
14
+ };
15
+
16
+ /**
17
+ * 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.
18
+ */
19
+ export const RetrieveToolResponseBodyToolsResponse200ApplicationJSONStatus = {
20
+ Live: "live",
21
+ Draft: "draft",
22
+ Pending: "pending",
23
+ Published: "published",
24
+ } as const;
25
+ /**
26
+ * 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.
27
+ */
28
+ export type RetrieveToolResponseBodyToolsResponse200ApplicationJSONStatus =
29
+ ClosedEnum<
30
+ typeof RetrieveToolResponseBodyToolsResponse200ApplicationJSONStatus
31
+ >;
32
+
33
+ export const RetrieveToolResponseBodyToolsResponse200ApplicationJSONType = {
34
+ Code: "code",
35
+ } as const;
36
+ export type RetrieveToolResponseBodyToolsResponse200ApplicationJSONType =
37
+ ClosedEnum<
38
+ typeof RetrieveToolResponseBodyToolsResponse200ApplicationJSONType
39
+ >;
40
+
41
+ export const RetrieveToolResponseBodyLanguage = {
42
+ Python: "python",
43
+ } as const;
44
+ export type RetrieveToolResponseBodyLanguage = ClosedEnum<
45
+ typeof RetrieveToolResponseBodyLanguage
46
+ >;
47
+
48
+ export type RetrieveToolResponseBodyCodeTool = {
49
+ /**
50
+ * The parameters the functions accepts, described as a JSON Schema object. See the `OpenAI` [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
51
+ */
52
+ parameters?: { [k: string]: any } | undefined;
53
+ language: RetrieveToolResponseBodyLanguage;
54
+ /**
55
+ * The code to execute.
56
+ */
57
+ code: string;
58
+ };
59
+
60
+ export type RetrieveToolResponseBody5 = {
61
+ id?: string | undefined;
62
+ /**
63
+ * 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.
64
+ */
65
+ path: string;
66
+ /**
67
+ * Unique key of the tool as it will be displayed in the UI
68
+ */
69
+ key: string;
70
+ /**
71
+ * 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.
72
+ */
73
+ displayName: string;
74
+ /**
75
+ * 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.
76
+ */
77
+ description: string;
78
+ /**
79
+ * The id of the user that created the tool
80
+ */
81
+ createdById?: string | undefined;
82
+ /**
83
+ * The id of the user that last updated the tool
84
+ */
85
+ updatedById?: string | undefined;
86
+ projectId: string;
87
+ workspaceId: string;
88
+ created: string;
89
+ updated: string;
90
+ /**
91
+ * 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.
92
+ */
93
+ status?:
94
+ | RetrieveToolResponseBodyToolsResponse200ApplicationJSONStatus
95
+ | undefined;
96
+ versionHash?: string | undefined;
97
+ type: RetrieveToolResponseBodyToolsResponse200ApplicationJSONType;
98
+ codeTool: RetrieveToolResponseBodyCodeTool;
99
+ };
100
+
101
+ /**
102
+ * 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.
103
+ */
104
+ export const RetrieveToolResponseBodyToolsResponse200Status = {
105
+ Live: "live",
106
+ Draft: "draft",
107
+ Pending: "pending",
108
+ Published: "published",
109
+ } as const;
110
+ /**
111
+ * 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.
112
+ */
113
+ export type RetrieveToolResponseBodyToolsResponse200Status = ClosedEnum<
114
+ typeof RetrieveToolResponseBodyToolsResponse200Status
115
+ >;
116
+
117
+ export const RetrieveToolResponseBodyToolsResponse200Type = {
118
+ Mcp: "mcp",
119
+ } as const;
120
+ export type RetrieveToolResponseBodyToolsResponse200Type = ClosedEnum<
121
+ typeof RetrieveToolResponseBodyToolsResponse200Type
122
+ >;
123
+
124
+ export type RetrieveToolResponseBodyHeaders = {
125
+ value: string;
126
+ encrypted?: boolean | undefined;
127
+ };
128
+
129
+ export const RetrieveToolResponseBodyToolsResponse200ApplicationJson4Type = {
130
+ Object: "object",
131
+ } as const;
132
+ export type RetrieveToolResponseBodyToolsResponse200ApplicationJson4Type =
133
+ ClosedEnum<
134
+ typeof RetrieveToolResponseBodyToolsResponse200ApplicationJson4Type
135
+ >;
136
+
137
+ /**
138
+ * The original MCP tool input schema for LLM conversion
139
+ */
140
+ export type RetrieveToolResponseBodyInputSchema = {
141
+ type: RetrieveToolResponseBodyToolsResponse200ApplicationJson4Type;
142
+ properties?: { [k: string]: any } | undefined;
143
+ required?: Array<string> | undefined;
144
+ };
145
+
146
+ /**
147
+ * The connection type used by the MCP server
148
+ */
149
+ export const RetrieveToolResponseBodyConnectionType = {
150
+ Http: "http",
151
+ Sse: "sse",
152
+ } as const;
153
+ /**
154
+ * The connection type used by the MCP server
155
+ */
156
+ export type RetrieveToolResponseBodyConnectionType = ClosedEnum<
157
+ typeof RetrieveToolResponseBodyConnectionType
158
+ >;
159
+
160
+ export type RetrieveToolResponseBodyMcp = {
161
+ /**
162
+ * The ID of the MCP server this tool belongs to
163
+ */
164
+ serverId: string;
165
+ /**
166
+ * The original tool name from the MCP server
167
+ */
168
+ toolName: string;
169
+ /**
170
+ * The MCP server URL (cached for execution)
171
+ */
172
+ serverUrl: string;
173
+ /**
174
+ * HTTP headers for MCP server requests (encrypted format)
175
+ */
176
+ headers?: { [k: string]: RetrieveToolResponseBodyHeaders } | undefined;
177
+ /**
178
+ * The original MCP tool input schema for LLM conversion
179
+ */
180
+ inputSchema: RetrieveToolResponseBodyInputSchema;
181
+ /**
182
+ * The connection type used by the MCP server
183
+ */
184
+ connectionType: RetrieveToolResponseBodyConnectionType;
185
+ };
186
+
187
+ export type RetrieveToolResponseBody4 = {
188
+ id?: string | undefined;
189
+ /**
190
+ * 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.
191
+ */
192
+ path: string;
193
+ /**
194
+ * Unique key of the tool as it will be displayed in the UI
195
+ */
196
+ key: string;
197
+ /**
198
+ * 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.
199
+ */
200
+ displayName: string;
201
+ /**
202
+ * 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.
203
+ */
204
+ description: string;
205
+ /**
206
+ * The id of the user that created the tool
207
+ */
208
+ createdById?: string | undefined;
209
+ /**
210
+ * The id of the user that last updated the tool
211
+ */
212
+ updatedById?: string | undefined;
213
+ projectId: string;
214
+ workspaceId: string;
215
+ created: string;
216
+ updated: string;
217
+ /**
218
+ * 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.
219
+ */
220
+ status?: RetrieveToolResponseBodyToolsResponse200Status | undefined;
221
+ versionHash?: string | undefined;
222
+ type: RetrieveToolResponseBodyToolsResponse200Type;
223
+ mcp: RetrieveToolResponseBodyMcp;
224
+ };
225
+
226
+ /**
227
+ * 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.
228
+ */
229
+ export const RetrieveToolResponseBodyToolsResponseStatus = {
230
+ Live: "live",
231
+ Draft: "draft",
232
+ Pending: "pending",
233
+ Published: "published",
234
+ } as const;
235
+ /**
236
+ * 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.
237
+ */
238
+ export type RetrieveToolResponseBodyToolsResponseStatus = ClosedEnum<
239
+ typeof RetrieveToolResponseBodyToolsResponseStatus
240
+ >;
241
+
242
+ export const RetrieveToolResponseBodyToolsResponseType = {
243
+ Http: "http",
244
+ } as const;
245
+ export type RetrieveToolResponseBodyToolsResponseType = ClosedEnum<
246
+ typeof RetrieveToolResponseBodyToolsResponseType
247
+ >;
248
+
249
+ /**
250
+ * The HTTP method to use.
251
+ */
252
+ export const RetrieveToolResponseBodyMethod = {
253
+ Get: "GET",
254
+ Post: "POST",
255
+ Put: "PUT",
256
+ Delete: "DELETE",
257
+ } as const;
258
+ /**
259
+ * The HTTP method to use.
260
+ */
261
+ export type RetrieveToolResponseBodyMethod = ClosedEnum<
262
+ typeof RetrieveToolResponseBodyMethod
263
+ >;
264
+
265
+ /**
266
+ * The blueprint for the HTTP request. The `arguments` field will be used to replace the placeholders in the `url`, `headers`, `body`, and `arguments` fields.
267
+ */
268
+ export type RetrieveToolResponseBodyBlueprint = {
269
+ /**
270
+ * The URL to send the request to.
271
+ */
272
+ url: string;
273
+ /**
274
+ * The HTTP method to use.
275
+ */
276
+ method: RetrieveToolResponseBodyMethod;
277
+ /**
278
+ * The headers to send with the request.
279
+ */
280
+ headers?: { [k: string]: string } | undefined;
281
+ /**
282
+ * The body to send with the request.
283
+ */
284
+ body?: { [k: string]: any } | undefined;
285
+ };
286
+
287
+ /**
288
+ * The type of the argument.
289
+ */
290
+ export const RetrieveToolResponseBodyToolsResponse200ApplicationJson3Type = {
291
+ String: "string",
292
+ Number: "number",
293
+ Boolean: "boolean",
294
+ } as const;
295
+ /**
296
+ * The type of the argument.
297
+ */
298
+ export type RetrieveToolResponseBodyToolsResponse200ApplicationJson3Type =
299
+ ClosedEnum<
300
+ typeof RetrieveToolResponseBodyToolsResponse200ApplicationJson3Type
301
+ >;
302
+
303
+ /**
304
+ * The default value of the argument.
305
+ */
306
+ export type RetrieveToolResponseBodyDefaultValue = string | number | boolean;
307
+
308
+ export type RetrieveToolResponseBodyArguments = {
309
+ /**
310
+ * The type of the argument.
311
+ */
312
+ type: RetrieveToolResponseBodyToolsResponse200ApplicationJson3Type;
313
+ /**
314
+ * A description of the argument.
315
+ */
316
+ description: string;
317
+ /**
318
+ * 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.
319
+ */
320
+ sendToModel?: boolean | undefined;
321
+ /**
322
+ * The default value of the argument.
323
+ */
324
+ defaultValue?: string | number | boolean | undefined;
325
+ };
326
+
327
+ export type RetrieveToolResponseBodyHttp = {
328
+ /**
329
+ * The blueprint for the HTTP request. The `arguments` field will be used to replace the placeholders in the `url`, `headers`, `body`, and `arguments` fields.
330
+ */
331
+ blueprint: RetrieveToolResponseBodyBlueprint;
332
+ /**
333
+ * The arguments to send with the request. The keys will be used to replace the placeholders in the `blueprint` field.
334
+ */
335
+ arguments?: { [k: string]: RetrieveToolResponseBodyArguments } | undefined;
336
+ };
337
+
338
+ export type RetrieveToolResponseBody3 = {
339
+ id?: string | undefined;
340
+ /**
341
+ * 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.
342
+ */
343
+ path: string;
344
+ /**
345
+ * Unique key of the tool as it will be displayed in the UI
346
+ */
347
+ key: string;
348
+ /**
349
+ * 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.
350
+ */
351
+ displayName: string;
352
+ /**
353
+ * 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.
354
+ */
355
+ description: string;
356
+ /**
357
+ * The id of the user that created the tool
358
+ */
359
+ createdById?: string | undefined;
360
+ /**
361
+ * The id of the user that last updated the tool
362
+ */
363
+ updatedById?: string | undefined;
364
+ projectId: string;
365
+ workspaceId: string;
366
+ created: string;
367
+ updated: string;
368
+ /**
369
+ * 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.
370
+ */
371
+ status?: RetrieveToolResponseBodyToolsResponseStatus | undefined;
372
+ versionHash?: string | undefined;
373
+ type: RetrieveToolResponseBodyToolsResponseType;
374
+ http: RetrieveToolResponseBodyHttp;
375
+ };
376
+
377
+ /**
378
+ * 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.
379
+ */
380
+ export const RetrieveToolResponseBodyToolsStatus = {
381
+ Live: "live",
382
+ Draft: "draft",
383
+ Pending: "pending",
384
+ Published: "published",
385
+ } as const;
386
+ /**
387
+ * 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.
388
+ */
389
+ export type RetrieveToolResponseBodyToolsStatus = ClosedEnum<
390
+ typeof RetrieveToolResponseBodyToolsStatus
391
+ >;
392
+
393
+ export const RetrieveToolResponseBodyToolsType = {
394
+ JsonSchema: "json_schema",
395
+ } as const;
396
+ export type RetrieveToolResponseBodyToolsType = ClosedEnum<
397
+ typeof RetrieveToolResponseBodyToolsType
398
+ >;
399
+
400
+ export type RetrieveToolResponseBodyJsonSchema = {
401
+ /**
402
+ * The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
403
+ */
404
+ name: string;
405
+ /**
406
+ * A description of what the response format is for. This will be shown to the user.
407
+ */
408
+ description?: string | undefined;
409
+ /**
410
+ * The schema for the response format, described as a JSON Schema object. See the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
411
+ */
412
+ schema: { [k: string]: any };
413
+ /**
414
+ * Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. Only compatible with `OpenAI` models.
415
+ */
416
+ strict?: boolean | null | undefined;
417
+ };
418
+
419
+ export type RetrieveToolResponseBody2 = {
420
+ id?: string | undefined;
421
+ /**
422
+ * 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.
423
+ */
424
+ path: string;
425
+ /**
426
+ * Unique key of the tool as it will be displayed in the UI
427
+ */
428
+ key: string;
429
+ /**
430
+ * 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.
431
+ */
432
+ displayName: string;
433
+ /**
434
+ * 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.
435
+ */
436
+ description: string;
437
+ /**
438
+ * The id of the user that created the tool
439
+ */
440
+ createdById?: string | undefined;
441
+ /**
442
+ * The id of the user that last updated the tool
443
+ */
444
+ updatedById?: string | undefined;
445
+ projectId: string;
446
+ workspaceId: string;
447
+ created: string;
448
+ updated: string;
449
+ /**
450
+ * 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.
451
+ */
452
+ status?: RetrieveToolResponseBodyToolsStatus | undefined;
453
+ versionHash?: string | undefined;
454
+ type: RetrieveToolResponseBodyToolsType;
455
+ jsonSchema: RetrieveToolResponseBodyJsonSchema;
456
+ };
457
+
458
+ /**
459
+ * 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.
460
+ */
461
+ export const RetrieveToolResponseBodyStatus = {
462
+ Live: "live",
463
+ Draft: "draft",
464
+ Pending: "pending",
465
+ Published: "published",
466
+ } as const;
467
+ /**
468
+ * 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.
469
+ */
470
+ export type RetrieveToolResponseBodyStatus = ClosedEnum<
471
+ typeof RetrieveToolResponseBodyStatus
472
+ >;
473
+
474
+ export const RetrieveToolResponseBodyType = {
475
+ Function: "function",
476
+ } as const;
477
+ export type RetrieveToolResponseBodyType = ClosedEnum<
478
+ typeof RetrieveToolResponseBodyType
479
+ >;
480
+
481
+ export type RetrieveToolResponseBodyFunction = {
482
+ /**
483
+ * The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
484
+ */
485
+ name: string;
486
+ /**
487
+ * A description of what the function does, used by the model to choose when and how to call the function.
488
+ */
489
+ description?: string | undefined;
490
+ /**
491
+ * Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Currently only compatible with `OpenAI` models.
492
+ */
493
+ strict?: boolean | undefined;
494
+ /**
495
+ * The parameters the functions accepts, described as a JSON Schema object. See the `OpenAI` [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
496
+ */
497
+ parameters?: { [k: string]: any } | undefined;
498
+ };
499
+
500
+ export type RetrieveToolResponseBody1 = {
501
+ id?: string | undefined;
502
+ /**
503
+ * 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.
504
+ */
505
+ path: string;
506
+ /**
507
+ * Unique key of the tool as it will be displayed in the UI
508
+ */
509
+ key: string;
510
+ /**
511
+ * 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.
512
+ */
513
+ displayName: string;
514
+ /**
515
+ * 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.
516
+ */
517
+ description: string;
518
+ /**
519
+ * The id of the user that created the tool
520
+ */
521
+ createdById?: string | undefined;
522
+ /**
523
+ * The id of the user that last updated the tool
524
+ */
525
+ updatedById?: string | undefined;
526
+ projectId: string;
527
+ workspaceId: string;
528
+ created: string;
529
+ updated: string;
530
+ /**
531
+ * 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.
532
+ */
533
+ status?: RetrieveToolResponseBodyStatus | undefined;
534
+ versionHash?: string | undefined;
535
+ type: RetrieveToolResponseBodyType;
536
+ function: RetrieveToolResponseBodyFunction;
537
+ };
538
+
539
+ /**
540
+ * Successfully retrieved the tool.
541
+ */
542
+ export type RetrieveToolResponseBody =
543
+ | RetrieveToolResponseBody1
544
+ | RetrieveToolResponseBody2
545
+ | RetrieveToolResponseBody3
546
+ | RetrieveToolResponseBody4
547
+ | RetrieveToolResponseBody5;
548
+
549
+ /** @internal */
550
+ export const RetrieveToolRequest$inboundSchema: z.ZodType<
551
+ RetrieveToolRequest,
552
+ z.ZodTypeDef,
553
+ unknown
554
+ > = z.object({
555
+ tool_key: z.string(),
556
+ }).transform((v) => {
557
+ return remap$(v, {
558
+ "tool_key": "toolKey",
559
+ });
560
+ });
561
+
562
+ /** @internal */
563
+ export type RetrieveToolRequest$Outbound = {
564
+ tool_key: string;
565
+ };
566
+
567
+ /** @internal */
568
+ export const RetrieveToolRequest$outboundSchema: z.ZodType<
569
+ RetrieveToolRequest$Outbound,
570
+ z.ZodTypeDef,
571
+ RetrieveToolRequest
572
+ > = z.object({
573
+ toolKey: z.string(),
574
+ }).transform((v) => {
575
+ return remap$(v, {
576
+ toolKey: "tool_key",
577
+ });
578
+ });
579
+
580
+ /**
581
+ * @internal
582
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
583
+ */
584
+ export namespace RetrieveToolRequest$ {
585
+ /** @deprecated use `RetrieveToolRequest$inboundSchema` instead. */
586
+ export const inboundSchema = RetrieveToolRequest$inboundSchema;
587
+ /** @deprecated use `RetrieveToolRequest$outboundSchema` instead. */
588
+ export const outboundSchema = RetrieveToolRequest$outboundSchema;
589
+ /** @deprecated use `RetrieveToolRequest$Outbound` instead. */
590
+ export type Outbound = RetrieveToolRequest$Outbound;
591
+ }
592
+
593
+ export function retrieveToolRequestToJSON(
594
+ retrieveToolRequest: RetrieveToolRequest,
595
+ ): string {
596
+ return JSON.stringify(
597
+ RetrieveToolRequest$outboundSchema.parse(retrieveToolRequest),
598
+ );
599
+ }
600
+
601
+ export function retrieveToolRequestFromJSON(
602
+ jsonString: string,
603
+ ): SafeParseResult<RetrieveToolRequest, SDKValidationError> {
604
+ return safeParse(
605
+ jsonString,
606
+ (x) => RetrieveToolRequest$inboundSchema.parse(JSON.parse(x)),
607
+ `Failed to parse 'RetrieveToolRequest' from JSON`,
608
+ );
609
+ }
610
+
611
+ /** @internal */
612
+ export const RetrieveToolResponseBodyToolsResponse200ApplicationJSONStatus$inboundSchema:
613
+ z.ZodNativeEnum<
614
+ typeof RetrieveToolResponseBodyToolsResponse200ApplicationJSONStatus
615
+ > = z.nativeEnum(
616
+ RetrieveToolResponseBodyToolsResponse200ApplicationJSONStatus,
617
+ );
618
+
619
+ /** @internal */
620
+ export const RetrieveToolResponseBodyToolsResponse200ApplicationJSONStatus$outboundSchema:
621
+ z.ZodNativeEnum<
622
+ typeof RetrieveToolResponseBodyToolsResponse200ApplicationJSONStatus
623
+ > =
624
+ RetrieveToolResponseBodyToolsResponse200ApplicationJSONStatus$inboundSchema;
625
+
626
+ /**
627
+ * @internal
628
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
629
+ */
630
+ export namespace RetrieveToolResponseBodyToolsResponse200ApplicationJSONStatus$ {
631
+ /** @deprecated use `RetrieveToolResponseBodyToolsResponse200ApplicationJSONStatus$inboundSchema` instead. */
632
+ export const inboundSchema =
633
+ RetrieveToolResponseBodyToolsResponse200ApplicationJSONStatus$inboundSchema;
634
+ /** @deprecated use `RetrieveToolResponseBodyToolsResponse200ApplicationJSONStatus$outboundSchema` instead. */
635
+ export const outboundSchema =
636
+ RetrieveToolResponseBodyToolsResponse200ApplicationJSONStatus$outboundSchema;
637
+ }
638
+
639
+ /** @internal */
640
+ export const RetrieveToolResponseBodyToolsResponse200ApplicationJSONType$inboundSchema:
641
+ z.ZodNativeEnum<
642
+ typeof RetrieveToolResponseBodyToolsResponse200ApplicationJSONType
643
+ > = z.nativeEnum(RetrieveToolResponseBodyToolsResponse200ApplicationJSONType);
644
+
645
+ /** @internal */
646
+ export const RetrieveToolResponseBodyToolsResponse200ApplicationJSONType$outboundSchema:
647
+ z.ZodNativeEnum<
648
+ typeof RetrieveToolResponseBodyToolsResponse200ApplicationJSONType
649
+ > = RetrieveToolResponseBodyToolsResponse200ApplicationJSONType$inboundSchema;
650
+
651
+ /**
652
+ * @internal
653
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
654
+ */
655
+ export namespace RetrieveToolResponseBodyToolsResponse200ApplicationJSONType$ {
656
+ /** @deprecated use `RetrieveToolResponseBodyToolsResponse200ApplicationJSONType$inboundSchema` instead. */
657
+ export const inboundSchema =
658
+ RetrieveToolResponseBodyToolsResponse200ApplicationJSONType$inboundSchema;
659
+ /** @deprecated use `RetrieveToolResponseBodyToolsResponse200ApplicationJSONType$outboundSchema` instead. */
660
+ export const outboundSchema =
661
+ RetrieveToolResponseBodyToolsResponse200ApplicationJSONType$outboundSchema;
662
+ }
663
+
664
+ /** @internal */
665
+ export const RetrieveToolResponseBodyLanguage$inboundSchema: z.ZodNativeEnum<
666
+ typeof RetrieveToolResponseBodyLanguage
667
+ > = z.nativeEnum(RetrieveToolResponseBodyLanguage);
668
+
669
+ /** @internal */
670
+ export const RetrieveToolResponseBodyLanguage$outboundSchema: z.ZodNativeEnum<
671
+ typeof RetrieveToolResponseBodyLanguage
672
+ > = RetrieveToolResponseBodyLanguage$inboundSchema;
673
+
674
+ /**
675
+ * @internal
676
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
677
+ */
678
+ export namespace RetrieveToolResponseBodyLanguage$ {
679
+ /** @deprecated use `RetrieveToolResponseBodyLanguage$inboundSchema` instead. */
680
+ export const inboundSchema = RetrieveToolResponseBodyLanguage$inboundSchema;
681
+ /** @deprecated use `RetrieveToolResponseBodyLanguage$outboundSchema` instead. */
682
+ export const outboundSchema = RetrieveToolResponseBodyLanguage$outboundSchema;
683
+ }
684
+
685
+ /** @internal */
686
+ export const RetrieveToolResponseBodyCodeTool$inboundSchema: z.ZodType<
687
+ RetrieveToolResponseBodyCodeTool,
688
+ z.ZodTypeDef,
689
+ unknown
690
+ > = z.object({
691
+ parameters: z.record(z.any()).optional(),
692
+ language: RetrieveToolResponseBodyLanguage$inboundSchema,
693
+ code: z.string(),
694
+ });
695
+
696
+ /** @internal */
697
+ export type RetrieveToolResponseBodyCodeTool$Outbound = {
698
+ parameters?: { [k: string]: any } | undefined;
699
+ language: string;
700
+ code: string;
701
+ };
702
+
703
+ /** @internal */
704
+ export const RetrieveToolResponseBodyCodeTool$outboundSchema: z.ZodType<
705
+ RetrieveToolResponseBodyCodeTool$Outbound,
706
+ z.ZodTypeDef,
707
+ RetrieveToolResponseBodyCodeTool
708
+ > = z.object({
709
+ parameters: z.record(z.any()).optional(),
710
+ language: RetrieveToolResponseBodyLanguage$outboundSchema,
711
+ code: z.string(),
712
+ });
713
+
714
+ /**
715
+ * @internal
716
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
717
+ */
718
+ export namespace RetrieveToolResponseBodyCodeTool$ {
719
+ /** @deprecated use `RetrieveToolResponseBodyCodeTool$inboundSchema` instead. */
720
+ export const inboundSchema = RetrieveToolResponseBodyCodeTool$inboundSchema;
721
+ /** @deprecated use `RetrieveToolResponseBodyCodeTool$outboundSchema` instead. */
722
+ export const outboundSchema = RetrieveToolResponseBodyCodeTool$outboundSchema;
723
+ /** @deprecated use `RetrieveToolResponseBodyCodeTool$Outbound` instead. */
724
+ export type Outbound = RetrieveToolResponseBodyCodeTool$Outbound;
725
+ }
726
+
727
+ export function retrieveToolResponseBodyCodeToolToJSON(
728
+ retrieveToolResponseBodyCodeTool: RetrieveToolResponseBodyCodeTool,
729
+ ): string {
730
+ return JSON.stringify(
731
+ RetrieveToolResponseBodyCodeTool$outboundSchema.parse(
732
+ retrieveToolResponseBodyCodeTool,
733
+ ),
734
+ );
735
+ }
736
+
737
+ export function retrieveToolResponseBodyCodeToolFromJSON(
738
+ jsonString: string,
739
+ ): SafeParseResult<RetrieveToolResponseBodyCodeTool, SDKValidationError> {
740
+ return safeParse(
741
+ jsonString,
742
+ (x) => RetrieveToolResponseBodyCodeTool$inboundSchema.parse(JSON.parse(x)),
743
+ `Failed to parse 'RetrieveToolResponseBodyCodeTool' from JSON`,
744
+ );
745
+ }
746
+
747
+ /** @internal */
748
+ export const RetrieveToolResponseBody5$inboundSchema: z.ZodType<
749
+ RetrieveToolResponseBody5,
750
+ z.ZodTypeDef,
751
+ unknown
752
+ > = z.object({
753
+ _id: z.string().default("01K5ZT3CYK8JPQGPXQ19SBWSWX"),
754
+ path: z.string(),
755
+ key: z.string(),
756
+ display_name: z.string(),
757
+ description: z.string(),
758
+ created_by_id: z.string().optional(),
759
+ updated_by_id: z.string().optional(),
760
+ project_id: z.string(),
761
+ workspace_id: z.string(),
762
+ created: z.string(),
763
+ updated: z.string(),
764
+ status:
765
+ RetrieveToolResponseBodyToolsResponse200ApplicationJSONStatus$inboundSchema
766
+ .default("live"),
767
+ version_hash: z.string().optional(),
768
+ type:
769
+ RetrieveToolResponseBodyToolsResponse200ApplicationJSONType$inboundSchema,
770
+ code_tool: z.lazy(() => RetrieveToolResponseBodyCodeTool$inboundSchema),
771
+ }).transform((v) => {
772
+ return remap$(v, {
773
+ "_id": "id",
774
+ "display_name": "displayName",
775
+ "created_by_id": "createdById",
776
+ "updated_by_id": "updatedById",
777
+ "project_id": "projectId",
778
+ "workspace_id": "workspaceId",
779
+ "version_hash": "versionHash",
780
+ "code_tool": "codeTool",
781
+ });
782
+ });
783
+
784
+ /** @internal */
785
+ export type RetrieveToolResponseBody5$Outbound = {
786
+ _id: string;
787
+ path: string;
788
+ key: string;
789
+ display_name: string;
790
+ description: string;
791
+ created_by_id?: string | undefined;
792
+ updated_by_id?: string | undefined;
793
+ project_id: string;
794
+ workspace_id: string;
795
+ created: string;
796
+ updated: string;
797
+ status: string;
798
+ version_hash?: string | undefined;
799
+ type: string;
800
+ code_tool: RetrieveToolResponseBodyCodeTool$Outbound;
801
+ };
802
+
803
+ /** @internal */
804
+ export const RetrieveToolResponseBody5$outboundSchema: z.ZodType<
805
+ RetrieveToolResponseBody5$Outbound,
806
+ z.ZodTypeDef,
807
+ RetrieveToolResponseBody5
808
+ > = z.object({
809
+ id: z.string().default("01K5ZT3CYK8JPQGPXQ19SBWSWX"),
810
+ path: z.string(),
811
+ key: z.string(),
812
+ displayName: z.string(),
813
+ description: z.string(),
814
+ createdById: z.string().optional(),
815
+ updatedById: z.string().optional(),
816
+ projectId: z.string(),
817
+ workspaceId: z.string(),
818
+ created: z.string(),
819
+ updated: z.string(),
820
+ status:
821
+ RetrieveToolResponseBodyToolsResponse200ApplicationJSONStatus$outboundSchema
822
+ .default("live"),
823
+ versionHash: z.string().optional(),
824
+ type:
825
+ RetrieveToolResponseBodyToolsResponse200ApplicationJSONType$outboundSchema,
826
+ codeTool: z.lazy(() => RetrieveToolResponseBodyCodeTool$outboundSchema),
827
+ }).transform((v) => {
828
+ return remap$(v, {
829
+ id: "_id",
830
+ displayName: "display_name",
831
+ createdById: "created_by_id",
832
+ updatedById: "updated_by_id",
833
+ projectId: "project_id",
834
+ workspaceId: "workspace_id",
835
+ versionHash: "version_hash",
836
+ codeTool: "code_tool",
837
+ });
838
+ });
839
+
840
+ /**
841
+ * @internal
842
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
843
+ */
844
+ export namespace RetrieveToolResponseBody5$ {
845
+ /** @deprecated use `RetrieveToolResponseBody5$inboundSchema` instead. */
846
+ export const inboundSchema = RetrieveToolResponseBody5$inboundSchema;
847
+ /** @deprecated use `RetrieveToolResponseBody5$outboundSchema` instead. */
848
+ export const outboundSchema = RetrieveToolResponseBody5$outboundSchema;
849
+ /** @deprecated use `RetrieveToolResponseBody5$Outbound` instead. */
850
+ export type Outbound = RetrieveToolResponseBody5$Outbound;
851
+ }
852
+
853
+ export function retrieveToolResponseBody5ToJSON(
854
+ retrieveToolResponseBody5: RetrieveToolResponseBody5,
855
+ ): string {
856
+ return JSON.stringify(
857
+ RetrieveToolResponseBody5$outboundSchema.parse(retrieveToolResponseBody5),
858
+ );
859
+ }
860
+
861
+ export function retrieveToolResponseBody5FromJSON(
862
+ jsonString: string,
863
+ ): SafeParseResult<RetrieveToolResponseBody5, SDKValidationError> {
864
+ return safeParse(
865
+ jsonString,
866
+ (x) => RetrieveToolResponseBody5$inboundSchema.parse(JSON.parse(x)),
867
+ `Failed to parse 'RetrieveToolResponseBody5' from JSON`,
868
+ );
869
+ }
870
+
871
+ /** @internal */
872
+ export const RetrieveToolResponseBodyToolsResponse200Status$inboundSchema:
873
+ z.ZodNativeEnum<typeof RetrieveToolResponseBodyToolsResponse200Status> = z
874
+ .nativeEnum(RetrieveToolResponseBodyToolsResponse200Status);
875
+
876
+ /** @internal */
877
+ export const RetrieveToolResponseBodyToolsResponse200Status$outboundSchema:
878
+ z.ZodNativeEnum<typeof RetrieveToolResponseBodyToolsResponse200Status> =
879
+ RetrieveToolResponseBodyToolsResponse200Status$inboundSchema;
880
+
881
+ /**
882
+ * @internal
883
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
884
+ */
885
+ export namespace RetrieveToolResponseBodyToolsResponse200Status$ {
886
+ /** @deprecated use `RetrieveToolResponseBodyToolsResponse200Status$inboundSchema` instead. */
887
+ export const inboundSchema =
888
+ RetrieveToolResponseBodyToolsResponse200Status$inboundSchema;
889
+ /** @deprecated use `RetrieveToolResponseBodyToolsResponse200Status$outboundSchema` instead. */
890
+ export const outboundSchema =
891
+ RetrieveToolResponseBodyToolsResponse200Status$outboundSchema;
892
+ }
893
+
894
+ /** @internal */
895
+ export const RetrieveToolResponseBodyToolsResponse200Type$inboundSchema:
896
+ z.ZodNativeEnum<typeof RetrieveToolResponseBodyToolsResponse200Type> = z
897
+ .nativeEnum(RetrieveToolResponseBodyToolsResponse200Type);
898
+
899
+ /** @internal */
900
+ export const RetrieveToolResponseBodyToolsResponse200Type$outboundSchema:
901
+ z.ZodNativeEnum<typeof RetrieveToolResponseBodyToolsResponse200Type> =
902
+ RetrieveToolResponseBodyToolsResponse200Type$inboundSchema;
903
+
904
+ /**
905
+ * @internal
906
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
907
+ */
908
+ export namespace RetrieveToolResponseBodyToolsResponse200Type$ {
909
+ /** @deprecated use `RetrieveToolResponseBodyToolsResponse200Type$inboundSchema` instead. */
910
+ export const inboundSchema =
911
+ RetrieveToolResponseBodyToolsResponse200Type$inboundSchema;
912
+ /** @deprecated use `RetrieveToolResponseBodyToolsResponse200Type$outboundSchema` instead. */
913
+ export const outboundSchema =
914
+ RetrieveToolResponseBodyToolsResponse200Type$outboundSchema;
915
+ }
916
+
917
+ /** @internal */
918
+ export const RetrieveToolResponseBodyHeaders$inboundSchema: z.ZodType<
919
+ RetrieveToolResponseBodyHeaders,
920
+ z.ZodTypeDef,
921
+ unknown
922
+ > = z.object({
923
+ value: z.string(),
924
+ encrypted: z.boolean().default(false),
925
+ });
926
+
927
+ /** @internal */
928
+ export type RetrieveToolResponseBodyHeaders$Outbound = {
929
+ value: string;
930
+ encrypted: boolean;
931
+ };
932
+
933
+ /** @internal */
934
+ export const RetrieveToolResponseBodyHeaders$outboundSchema: z.ZodType<
935
+ RetrieveToolResponseBodyHeaders$Outbound,
936
+ z.ZodTypeDef,
937
+ RetrieveToolResponseBodyHeaders
938
+ > = z.object({
939
+ value: z.string(),
940
+ encrypted: z.boolean().default(false),
941
+ });
942
+
943
+ /**
944
+ * @internal
945
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
946
+ */
947
+ export namespace RetrieveToolResponseBodyHeaders$ {
948
+ /** @deprecated use `RetrieveToolResponseBodyHeaders$inboundSchema` instead. */
949
+ export const inboundSchema = RetrieveToolResponseBodyHeaders$inboundSchema;
950
+ /** @deprecated use `RetrieveToolResponseBodyHeaders$outboundSchema` instead. */
951
+ export const outboundSchema = RetrieveToolResponseBodyHeaders$outboundSchema;
952
+ /** @deprecated use `RetrieveToolResponseBodyHeaders$Outbound` instead. */
953
+ export type Outbound = RetrieveToolResponseBodyHeaders$Outbound;
954
+ }
955
+
956
+ export function retrieveToolResponseBodyHeadersToJSON(
957
+ retrieveToolResponseBodyHeaders: RetrieveToolResponseBodyHeaders,
958
+ ): string {
959
+ return JSON.stringify(
960
+ RetrieveToolResponseBodyHeaders$outboundSchema.parse(
961
+ retrieveToolResponseBodyHeaders,
962
+ ),
963
+ );
964
+ }
965
+
966
+ export function retrieveToolResponseBodyHeadersFromJSON(
967
+ jsonString: string,
968
+ ): SafeParseResult<RetrieveToolResponseBodyHeaders, SDKValidationError> {
969
+ return safeParse(
970
+ jsonString,
971
+ (x) => RetrieveToolResponseBodyHeaders$inboundSchema.parse(JSON.parse(x)),
972
+ `Failed to parse 'RetrieveToolResponseBodyHeaders' from JSON`,
973
+ );
974
+ }
975
+
976
+ /** @internal */
977
+ export const RetrieveToolResponseBodyToolsResponse200ApplicationJson4Type$inboundSchema:
978
+ z.ZodNativeEnum<
979
+ typeof RetrieveToolResponseBodyToolsResponse200ApplicationJson4Type
980
+ > = z.nativeEnum(
981
+ RetrieveToolResponseBodyToolsResponse200ApplicationJson4Type,
982
+ );
983
+
984
+ /** @internal */
985
+ export const RetrieveToolResponseBodyToolsResponse200ApplicationJson4Type$outboundSchema:
986
+ z.ZodNativeEnum<
987
+ typeof RetrieveToolResponseBodyToolsResponse200ApplicationJson4Type
988
+ > =
989
+ RetrieveToolResponseBodyToolsResponse200ApplicationJson4Type$inboundSchema;
990
+
991
+ /**
992
+ * @internal
993
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
994
+ */
995
+ export namespace RetrieveToolResponseBodyToolsResponse200ApplicationJson4Type$ {
996
+ /** @deprecated use `RetrieveToolResponseBodyToolsResponse200ApplicationJson4Type$inboundSchema` instead. */
997
+ export const inboundSchema =
998
+ RetrieveToolResponseBodyToolsResponse200ApplicationJson4Type$inboundSchema;
999
+ /** @deprecated use `RetrieveToolResponseBodyToolsResponse200ApplicationJson4Type$outboundSchema` instead. */
1000
+ export const outboundSchema =
1001
+ RetrieveToolResponseBodyToolsResponse200ApplicationJson4Type$outboundSchema;
1002
+ }
1003
+
1004
+ /** @internal */
1005
+ export const RetrieveToolResponseBodyInputSchema$inboundSchema: z.ZodType<
1006
+ RetrieveToolResponseBodyInputSchema,
1007
+ z.ZodTypeDef,
1008
+ unknown
1009
+ > = z.object({
1010
+ type:
1011
+ RetrieveToolResponseBodyToolsResponse200ApplicationJson4Type$inboundSchema,
1012
+ properties: z.record(z.any()).optional(),
1013
+ required: z.array(z.string()).optional(),
1014
+ });
1015
+
1016
+ /** @internal */
1017
+ export type RetrieveToolResponseBodyInputSchema$Outbound = {
1018
+ type: string;
1019
+ properties?: { [k: string]: any } | undefined;
1020
+ required?: Array<string> | undefined;
1021
+ };
1022
+
1023
+ /** @internal */
1024
+ export const RetrieveToolResponseBodyInputSchema$outboundSchema: z.ZodType<
1025
+ RetrieveToolResponseBodyInputSchema$Outbound,
1026
+ z.ZodTypeDef,
1027
+ RetrieveToolResponseBodyInputSchema
1028
+ > = z.object({
1029
+ type:
1030
+ RetrieveToolResponseBodyToolsResponse200ApplicationJson4Type$outboundSchema,
1031
+ properties: z.record(z.any()).optional(),
1032
+ required: z.array(z.string()).optional(),
1033
+ });
1034
+
1035
+ /**
1036
+ * @internal
1037
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1038
+ */
1039
+ export namespace RetrieveToolResponseBodyInputSchema$ {
1040
+ /** @deprecated use `RetrieveToolResponseBodyInputSchema$inboundSchema` instead. */
1041
+ export const inboundSchema =
1042
+ RetrieveToolResponseBodyInputSchema$inboundSchema;
1043
+ /** @deprecated use `RetrieveToolResponseBodyInputSchema$outboundSchema` instead. */
1044
+ export const outboundSchema =
1045
+ RetrieveToolResponseBodyInputSchema$outboundSchema;
1046
+ /** @deprecated use `RetrieveToolResponseBodyInputSchema$Outbound` instead. */
1047
+ export type Outbound = RetrieveToolResponseBodyInputSchema$Outbound;
1048
+ }
1049
+
1050
+ export function retrieveToolResponseBodyInputSchemaToJSON(
1051
+ retrieveToolResponseBodyInputSchema: RetrieveToolResponseBodyInputSchema,
1052
+ ): string {
1053
+ return JSON.stringify(
1054
+ RetrieveToolResponseBodyInputSchema$outboundSchema.parse(
1055
+ retrieveToolResponseBodyInputSchema,
1056
+ ),
1057
+ );
1058
+ }
1059
+
1060
+ export function retrieveToolResponseBodyInputSchemaFromJSON(
1061
+ jsonString: string,
1062
+ ): SafeParseResult<RetrieveToolResponseBodyInputSchema, SDKValidationError> {
1063
+ return safeParse(
1064
+ jsonString,
1065
+ (x) =>
1066
+ RetrieveToolResponseBodyInputSchema$inboundSchema.parse(JSON.parse(x)),
1067
+ `Failed to parse 'RetrieveToolResponseBodyInputSchema' from JSON`,
1068
+ );
1069
+ }
1070
+
1071
+ /** @internal */
1072
+ export const RetrieveToolResponseBodyConnectionType$inboundSchema:
1073
+ z.ZodNativeEnum<typeof RetrieveToolResponseBodyConnectionType> = z.nativeEnum(
1074
+ RetrieveToolResponseBodyConnectionType,
1075
+ );
1076
+
1077
+ /** @internal */
1078
+ export const RetrieveToolResponseBodyConnectionType$outboundSchema:
1079
+ z.ZodNativeEnum<typeof RetrieveToolResponseBodyConnectionType> =
1080
+ RetrieveToolResponseBodyConnectionType$inboundSchema;
1081
+
1082
+ /**
1083
+ * @internal
1084
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1085
+ */
1086
+ export namespace RetrieveToolResponseBodyConnectionType$ {
1087
+ /** @deprecated use `RetrieveToolResponseBodyConnectionType$inboundSchema` instead. */
1088
+ export const inboundSchema =
1089
+ RetrieveToolResponseBodyConnectionType$inboundSchema;
1090
+ /** @deprecated use `RetrieveToolResponseBodyConnectionType$outboundSchema` instead. */
1091
+ export const outboundSchema =
1092
+ RetrieveToolResponseBodyConnectionType$outboundSchema;
1093
+ }
1094
+
1095
+ /** @internal */
1096
+ export const RetrieveToolResponseBodyMcp$inboundSchema: z.ZodType<
1097
+ RetrieveToolResponseBodyMcp,
1098
+ z.ZodTypeDef,
1099
+ unknown
1100
+ > = z.object({
1101
+ server_id: z.string(),
1102
+ tool_name: z.string(),
1103
+ server_url: z.string(),
1104
+ headers: z.record(z.lazy(() => RetrieveToolResponseBodyHeaders$inboundSchema))
1105
+ .optional(),
1106
+ input_schema: z.lazy(() => RetrieveToolResponseBodyInputSchema$inboundSchema),
1107
+ connection_type: RetrieveToolResponseBodyConnectionType$inboundSchema,
1108
+ }).transform((v) => {
1109
+ return remap$(v, {
1110
+ "server_id": "serverId",
1111
+ "tool_name": "toolName",
1112
+ "server_url": "serverUrl",
1113
+ "input_schema": "inputSchema",
1114
+ "connection_type": "connectionType",
1115
+ });
1116
+ });
1117
+
1118
+ /** @internal */
1119
+ export type RetrieveToolResponseBodyMcp$Outbound = {
1120
+ server_id: string;
1121
+ tool_name: string;
1122
+ server_url: string;
1123
+ headers?:
1124
+ | { [k: string]: RetrieveToolResponseBodyHeaders$Outbound }
1125
+ | undefined;
1126
+ input_schema: RetrieveToolResponseBodyInputSchema$Outbound;
1127
+ connection_type: string;
1128
+ };
1129
+
1130
+ /** @internal */
1131
+ export const RetrieveToolResponseBodyMcp$outboundSchema: z.ZodType<
1132
+ RetrieveToolResponseBodyMcp$Outbound,
1133
+ z.ZodTypeDef,
1134
+ RetrieveToolResponseBodyMcp
1135
+ > = z.object({
1136
+ serverId: z.string(),
1137
+ toolName: z.string(),
1138
+ serverUrl: z.string(),
1139
+ headers: z.record(
1140
+ z.lazy(() => RetrieveToolResponseBodyHeaders$outboundSchema),
1141
+ ).optional(),
1142
+ inputSchema: z.lazy(() => RetrieveToolResponseBodyInputSchema$outboundSchema),
1143
+ connectionType: RetrieveToolResponseBodyConnectionType$outboundSchema,
1144
+ }).transform((v) => {
1145
+ return remap$(v, {
1146
+ serverId: "server_id",
1147
+ toolName: "tool_name",
1148
+ serverUrl: "server_url",
1149
+ inputSchema: "input_schema",
1150
+ connectionType: "connection_type",
1151
+ });
1152
+ });
1153
+
1154
+ /**
1155
+ * @internal
1156
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1157
+ */
1158
+ export namespace RetrieveToolResponseBodyMcp$ {
1159
+ /** @deprecated use `RetrieveToolResponseBodyMcp$inboundSchema` instead. */
1160
+ export const inboundSchema = RetrieveToolResponseBodyMcp$inboundSchema;
1161
+ /** @deprecated use `RetrieveToolResponseBodyMcp$outboundSchema` instead. */
1162
+ export const outboundSchema = RetrieveToolResponseBodyMcp$outboundSchema;
1163
+ /** @deprecated use `RetrieveToolResponseBodyMcp$Outbound` instead. */
1164
+ export type Outbound = RetrieveToolResponseBodyMcp$Outbound;
1165
+ }
1166
+
1167
+ export function retrieveToolResponseBodyMcpToJSON(
1168
+ retrieveToolResponseBodyMcp: RetrieveToolResponseBodyMcp,
1169
+ ): string {
1170
+ return JSON.stringify(
1171
+ RetrieveToolResponseBodyMcp$outboundSchema.parse(
1172
+ retrieveToolResponseBodyMcp,
1173
+ ),
1174
+ );
1175
+ }
1176
+
1177
+ export function retrieveToolResponseBodyMcpFromJSON(
1178
+ jsonString: string,
1179
+ ): SafeParseResult<RetrieveToolResponseBodyMcp, SDKValidationError> {
1180
+ return safeParse(
1181
+ jsonString,
1182
+ (x) => RetrieveToolResponseBodyMcp$inboundSchema.parse(JSON.parse(x)),
1183
+ `Failed to parse 'RetrieveToolResponseBodyMcp' from JSON`,
1184
+ );
1185
+ }
1186
+
1187
+ /** @internal */
1188
+ export const RetrieveToolResponseBody4$inboundSchema: z.ZodType<
1189
+ RetrieveToolResponseBody4,
1190
+ z.ZodTypeDef,
1191
+ unknown
1192
+ > = z.object({
1193
+ _id: z.string().default("01K5ZT3CYKEEQ8PENB7RRRNQPF"),
1194
+ path: z.string(),
1195
+ key: z.string(),
1196
+ display_name: z.string(),
1197
+ description: z.string(),
1198
+ created_by_id: z.string().optional(),
1199
+ updated_by_id: z.string().optional(),
1200
+ project_id: z.string(),
1201
+ workspace_id: z.string(),
1202
+ created: z.string(),
1203
+ updated: z.string(),
1204
+ status: RetrieveToolResponseBodyToolsResponse200Status$inboundSchema.default(
1205
+ "live",
1206
+ ),
1207
+ version_hash: z.string().optional(),
1208
+ type: RetrieveToolResponseBodyToolsResponse200Type$inboundSchema,
1209
+ mcp: z.lazy(() => RetrieveToolResponseBodyMcp$inboundSchema),
1210
+ }).transform((v) => {
1211
+ return remap$(v, {
1212
+ "_id": "id",
1213
+ "display_name": "displayName",
1214
+ "created_by_id": "createdById",
1215
+ "updated_by_id": "updatedById",
1216
+ "project_id": "projectId",
1217
+ "workspace_id": "workspaceId",
1218
+ "version_hash": "versionHash",
1219
+ });
1220
+ });
1221
+
1222
+ /** @internal */
1223
+ export type RetrieveToolResponseBody4$Outbound = {
1224
+ _id: string;
1225
+ path: string;
1226
+ key: string;
1227
+ display_name: string;
1228
+ description: string;
1229
+ created_by_id?: string | undefined;
1230
+ updated_by_id?: string | undefined;
1231
+ project_id: string;
1232
+ workspace_id: string;
1233
+ created: string;
1234
+ updated: string;
1235
+ status: string;
1236
+ version_hash?: string | undefined;
1237
+ type: string;
1238
+ mcp: RetrieveToolResponseBodyMcp$Outbound;
1239
+ };
1240
+
1241
+ /** @internal */
1242
+ export const RetrieveToolResponseBody4$outboundSchema: z.ZodType<
1243
+ RetrieveToolResponseBody4$Outbound,
1244
+ z.ZodTypeDef,
1245
+ RetrieveToolResponseBody4
1246
+ > = z.object({
1247
+ id: z.string().default("01K5ZT3CYKEEQ8PENB7RRRNQPF"),
1248
+ path: z.string(),
1249
+ key: z.string(),
1250
+ displayName: z.string(),
1251
+ description: z.string(),
1252
+ createdById: z.string().optional(),
1253
+ updatedById: z.string().optional(),
1254
+ projectId: z.string(),
1255
+ workspaceId: z.string(),
1256
+ created: z.string(),
1257
+ updated: z.string(),
1258
+ status: RetrieveToolResponseBodyToolsResponse200Status$outboundSchema.default(
1259
+ "live",
1260
+ ),
1261
+ versionHash: z.string().optional(),
1262
+ type: RetrieveToolResponseBodyToolsResponse200Type$outboundSchema,
1263
+ mcp: z.lazy(() => RetrieveToolResponseBodyMcp$outboundSchema),
1264
+ }).transform((v) => {
1265
+ return remap$(v, {
1266
+ id: "_id",
1267
+ displayName: "display_name",
1268
+ createdById: "created_by_id",
1269
+ updatedById: "updated_by_id",
1270
+ projectId: "project_id",
1271
+ workspaceId: "workspace_id",
1272
+ versionHash: "version_hash",
1273
+ });
1274
+ });
1275
+
1276
+ /**
1277
+ * @internal
1278
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1279
+ */
1280
+ export namespace RetrieveToolResponseBody4$ {
1281
+ /** @deprecated use `RetrieveToolResponseBody4$inboundSchema` instead. */
1282
+ export const inboundSchema = RetrieveToolResponseBody4$inboundSchema;
1283
+ /** @deprecated use `RetrieveToolResponseBody4$outboundSchema` instead. */
1284
+ export const outboundSchema = RetrieveToolResponseBody4$outboundSchema;
1285
+ /** @deprecated use `RetrieveToolResponseBody4$Outbound` instead. */
1286
+ export type Outbound = RetrieveToolResponseBody4$Outbound;
1287
+ }
1288
+
1289
+ export function retrieveToolResponseBody4ToJSON(
1290
+ retrieveToolResponseBody4: RetrieveToolResponseBody4,
1291
+ ): string {
1292
+ return JSON.stringify(
1293
+ RetrieveToolResponseBody4$outboundSchema.parse(retrieveToolResponseBody4),
1294
+ );
1295
+ }
1296
+
1297
+ export function retrieveToolResponseBody4FromJSON(
1298
+ jsonString: string,
1299
+ ): SafeParseResult<RetrieveToolResponseBody4, SDKValidationError> {
1300
+ return safeParse(
1301
+ jsonString,
1302
+ (x) => RetrieveToolResponseBody4$inboundSchema.parse(JSON.parse(x)),
1303
+ `Failed to parse 'RetrieveToolResponseBody4' from JSON`,
1304
+ );
1305
+ }
1306
+
1307
+ /** @internal */
1308
+ export const RetrieveToolResponseBodyToolsResponseStatus$inboundSchema:
1309
+ z.ZodNativeEnum<typeof RetrieveToolResponseBodyToolsResponseStatus> = z
1310
+ .nativeEnum(RetrieveToolResponseBodyToolsResponseStatus);
1311
+
1312
+ /** @internal */
1313
+ export const RetrieveToolResponseBodyToolsResponseStatus$outboundSchema:
1314
+ z.ZodNativeEnum<typeof RetrieveToolResponseBodyToolsResponseStatus> =
1315
+ RetrieveToolResponseBodyToolsResponseStatus$inboundSchema;
1316
+
1317
+ /**
1318
+ * @internal
1319
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1320
+ */
1321
+ export namespace RetrieveToolResponseBodyToolsResponseStatus$ {
1322
+ /** @deprecated use `RetrieveToolResponseBodyToolsResponseStatus$inboundSchema` instead. */
1323
+ export const inboundSchema =
1324
+ RetrieveToolResponseBodyToolsResponseStatus$inboundSchema;
1325
+ /** @deprecated use `RetrieveToolResponseBodyToolsResponseStatus$outboundSchema` instead. */
1326
+ export const outboundSchema =
1327
+ RetrieveToolResponseBodyToolsResponseStatus$outboundSchema;
1328
+ }
1329
+
1330
+ /** @internal */
1331
+ export const RetrieveToolResponseBodyToolsResponseType$inboundSchema:
1332
+ z.ZodNativeEnum<typeof RetrieveToolResponseBodyToolsResponseType> = z
1333
+ .nativeEnum(RetrieveToolResponseBodyToolsResponseType);
1334
+
1335
+ /** @internal */
1336
+ export const RetrieveToolResponseBodyToolsResponseType$outboundSchema:
1337
+ z.ZodNativeEnum<typeof RetrieveToolResponseBodyToolsResponseType> =
1338
+ RetrieveToolResponseBodyToolsResponseType$inboundSchema;
1339
+
1340
+ /**
1341
+ * @internal
1342
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1343
+ */
1344
+ export namespace RetrieveToolResponseBodyToolsResponseType$ {
1345
+ /** @deprecated use `RetrieveToolResponseBodyToolsResponseType$inboundSchema` instead. */
1346
+ export const inboundSchema =
1347
+ RetrieveToolResponseBodyToolsResponseType$inboundSchema;
1348
+ /** @deprecated use `RetrieveToolResponseBodyToolsResponseType$outboundSchema` instead. */
1349
+ export const outboundSchema =
1350
+ RetrieveToolResponseBodyToolsResponseType$outboundSchema;
1351
+ }
1352
+
1353
+ /** @internal */
1354
+ export const RetrieveToolResponseBodyMethod$inboundSchema: z.ZodNativeEnum<
1355
+ typeof RetrieveToolResponseBodyMethod
1356
+ > = z.nativeEnum(RetrieveToolResponseBodyMethod);
1357
+
1358
+ /** @internal */
1359
+ export const RetrieveToolResponseBodyMethod$outboundSchema: z.ZodNativeEnum<
1360
+ typeof RetrieveToolResponseBodyMethod
1361
+ > = RetrieveToolResponseBodyMethod$inboundSchema;
1362
+
1363
+ /**
1364
+ * @internal
1365
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1366
+ */
1367
+ export namespace RetrieveToolResponseBodyMethod$ {
1368
+ /** @deprecated use `RetrieveToolResponseBodyMethod$inboundSchema` instead. */
1369
+ export const inboundSchema = RetrieveToolResponseBodyMethod$inboundSchema;
1370
+ /** @deprecated use `RetrieveToolResponseBodyMethod$outboundSchema` instead. */
1371
+ export const outboundSchema = RetrieveToolResponseBodyMethod$outboundSchema;
1372
+ }
1373
+
1374
+ /** @internal */
1375
+ export const RetrieveToolResponseBodyBlueprint$inboundSchema: z.ZodType<
1376
+ RetrieveToolResponseBodyBlueprint,
1377
+ z.ZodTypeDef,
1378
+ unknown
1379
+ > = z.object({
1380
+ url: z.string(),
1381
+ method: RetrieveToolResponseBodyMethod$inboundSchema,
1382
+ headers: z.record(z.string()).optional(),
1383
+ body: z.record(z.any()).optional(),
1384
+ });
1385
+
1386
+ /** @internal */
1387
+ export type RetrieveToolResponseBodyBlueprint$Outbound = {
1388
+ url: string;
1389
+ method: string;
1390
+ headers?: { [k: string]: string } | undefined;
1391
+ body?: { [k: string]: any } | undefined;
1392
+ };
1393
+
1394
+ /** @internal */
1395
+ export const RetrieveToolResponseBodyBlueprint$outboundSchema: z.ZodType<
1396
+ RetrieveToolResponseBodyBlueprint$Outbound,
1397
+ z.ZodTypeDef,
1398
+ RetrieveToolResponseBodyBlueprint
1399
+ > = z.object({
1400
+ url: z.string(),
1401
+ method: RetrieveToolResponseBodyMethod$outboundSchema,
1402
+ headers: z.record(z.string()).optional(),
1403
+ body: z.record(z.any()).optional(),
1404
+ });
1405
+
1406
+ /**
1407
+ * @internal
1408
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1409
+ */
1410
+ export namespace RetrieveToolResponseBodyBlueprint$ {
1411
+ /** @deprecated use `RetrieveToolResponseBodyBlueprint$inboundSchema` instead. */
1412
+ export const inboundSchema = RetrieveToolResponseBodyBlueprint$inboundSchema;
1413
+ /** @deprecated use `RetrieveToolResponseBodyBlueprint$outboundSchema` instead. */
1414
+ export const outboundSchema =
1415
+ RetrieveToolResponseBodyBlueprint$outboundSchema;
1416
+ /** @deprecated use `RetrieveToolResponseBodyBlueprint$Outbound` instead. */
1417
+ export type Outbound = RetrieveToolResponseBodyBlueprint$Outbound;
1418
+ }
1419
+
1420
+ export function retrieveToolResponseBodyBlueprintToJSON(
1421
+ retrieveToolResponseBodyBlueprint: RetrieveToolResponseBodyBlueprint,
1422
+ ): string {
1423
+ return JSON.stringify(
1424
+ RetrieveToolResponseBodyBlueprint$outboundSchema.parse(
1425
+ retrieveToolResponseBodyBlueprint,
1426
+ ),
1427
+ );
1428
+ }
1429
+
1430
+ export function retrieveToolResponseBodyBlueprintFromJSON(
1431
+ jsonString: string,
1432
+ ): SafeParseResult<RetrieveToolResponseBodyBlueprint, SDKValidationError> {
1433
+ return safeParse(
1434
+ jsonString,
1435
+ (x) => RetrieveToolResponseBodyBlueprint$inboundSchema.parse(JSON.parse(x)),
1436
+ `Failed to parse 'RetrieveToolResponseBodyBlueprint' from JSON`,
1437
+ );
1438
+ }
1439
+
1440
+ /** @internal */
1441
+ export const RetrieveToolResponseBodyToolsResponse200ApplicationJson3Type$inboundSchema:
1442
+ z.ZodNativeEnum<
1443
+ typeof RetrieveToolResponseBodyToolsResponse200ApplicationJson3Type
1444
+ > = z.nativeEnum(
1445
+ RetrieveToolResponseBodyToolsResponse200ApplicationJson3Type,
1446
+ );
1447
+
1448
+ /** @internal */
1449
+ export const RetrieveToolResponseBodyToolsResponse200ApplicationJson3Type$outboundSchema:
1450
+ z.ZodNativeEnum<
1451
+ typeof RetrieveToolResponseBodyToolsResponse200ApplicationJson3Type
1452
+ > =
1453
+ RetrieveToolResponseBodyToolsResponse200ApplicationJson3Type$inboundSchema;
1454
+
1455
+ /**
1456
+ * @internal
1457
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1458
+ */
1459
+ export namespace RetrieveToolResponseBodyToolsResponse200ApplicationJson3Type$ {
1460
+ /** @deprecated use `RetrieveToolResponseBodyToolsResponse200ApplicationJson3Type$inboundSchema` instead. */
1461
+ export const inboundSchema =
1462
+ RetrieveToolResponseBodyToolsResponse200ApplicationJson3Type$inboundSchema;
1463
+ /** @deprecated use `RetrieveToolResponseBodyToolsResponse200ApplicationJson3Type$outboundSchema` instead. */
1464
+ export const outboundSchema =
1465
+ RetrieveToolResponseBodyToolsResponse200ApplicationJson3Type$outboundSchema;
1466
+ }
1467
+
1468
+ /** @internal */
1469
+ export const RetrieveToolResponseBodyDefaultValue$inboundSchema: z.ZodType<
1470
+ RetrieveToolResponseBodyDefaultValue,
1471
+ z.ZodTypeDef,
1472
+ unknown
1473
+ > = z.union([z.string(), z.number(), z.boolean()]);
1474
+
1475
+ /** @internal */
1476
+ export type RetrieveToolResponseBodyDefaultValue$Outbound =
1477
+ | string
1478
+ | number
1479
+ | boolean;
1480
+
1481
+ /** @internal */
1482
+ export const RetrieveToolResponseBodyDefaultValue$outboundSchema: z.ZodType<
1483
+ RetrieveToolResponseBodyDefaultValue$Outbound,
1484
+ z.ZodTypeDef,
1485
+ RetrieveToolResponseBodyDefaultValue
1486
+ > = z.union([z.string(), z.number(), z.boolean()]);
1487
+
1488
+ /**
1489
+ * @internal
1490
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1491
+ */
1492
+ export namespace RetrieveToolResponseBodyDefaultValue$ {
1493
+ /** @deprecated use `RetrieveToolResponseBodyDefaultValue$inboundSchema` instead. */
1494
+ export const inboundSchema =
1495
+ RetrieveToolResponseBodyDefaultValue$inboundSchema;
1496
+ /** @deprecated use `RetrieveToolResponseBodyDefaultValue$outboundSchema` instead. */
1497
+ export const outboundSchema =
1498
+ RetrieveToolResponseBodyDefaultValue$outboundSchema;
1499
+ /** @deprecated use `RetrieveToolResponseBodyDefaultValue$Outbound` instead. */
1500
+ export type Outbound = RetrieveToolResponseBodyDefaultValue$Outbound;
1501
+ }
1502
+
1503
+ export function retrieveToolResponseBodyDefaultValueToJSON(
1504
+ retrieveToolResponseBodyDefaultValue: RetrieveToolResponseBodyDefaultValue,
1505
+ ): string {
1506
+ return JSON.stringify(
1507
+ RetrieveToolResponseBodyDefaultValue$outboundSchema.parse(
1508
+ retrieveToolResponseBodyDefaultValue,
1509
+ ),
1510
+ );
1511
+ }
1512
+
1513
+ export function retrieveToolResponseBodyDefaultValueFromJSON(
1514
+ jsonString: string,
1515
+ ): SafeParseResult<RetrieveToolResponseBodyDefaultValue, SDKValidationError> {
1516
+ return safeParse(
1517
+ jsonString,
1518
+ (x) =>
1519
+ RetrieveToolResponseBodyDefaultValue$inboundSchema.parse(JSON.parse(x)),
1520
+ `Failed to parse 'RetrieveToolResponseBodyDefaultValue' from JSON`,
1521
+ );
1522
+ }
1523
+
1524
+ /** @internal */
1525
+ export const RetrieveToolResponseBodyArguments$inboundSchema: z.ZodType<
1526
+ RetrieveToolResponseBodyArguments,
1527
+ z.ZodTypeDef,
1528
+ unknown
1529
+ > = z.object({
1530
+ type:
1531
+ RetrieveToolResponseBodyToolsResponse200ApplicationJson3Type$inboundSchema,
1532
+ description: z.string(),
1533
+ send_to_model: z.boolean().default(true),
1534
+ default_value: z.union([z.string(), z.number(), z.boolean()]).optional(),
1535
+ }).transform((v) => {
1536
+ return remap$(v, {
1537
+ "send_to_model": "sendToModel",
1538
+ "default_value": "defaultValue",
1539
+ });
1540
+ });
1541
+
1542
+ /** @internal */
1543
+ export type RetrieveToolResponseBodyArguments$Outbound = {
1544
+ type: string;
1545
+ description: string;
1546
+ send_to_model: boolean;
1547
+ default_value?: string | number | boolean | undefined;
1548
+ };
1549
+
1550
+ /** @internal */
1551
+ export const RetrieveToolResponseBodyArguments$outboundSchema: z.ZodType<
1552
+ RetrieveToolResponseBodyArguments$Outbound,
1553
+ z.ZodTypeDef,
1554
+ RetrieveToolResponseBodyArguments
1555
+ > = z.object({
1556
+ type:
1557
+ RetrieveToolResponseBodyToolsResponse200ApplicationJson3Type$outboundSchema,
1558
+ description: z.string(),
1559
+ sendToModel: z.boolean().default(true),
1560
+ defaultValue: z.union([z.string(), z.number(), z.boolean()]).optional(),
1561
+ }).transform((v) => {
1562
+ return remap$(v, {
1563
+ sendToModel: "send_to_model",
1564
+ defaultValue: "default_value",
1565
+ });
1566
+ });
1567
+
1568
+ /**
1569
+ * @internal
1570
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1571
+ */
1572
+ export namespace RetrieveToolResponseBodyArguments$ {
1573
+ /** @deprecated use `RetrieveToolResponseBodyArguments$inboundSchema` instead. */
1574
+ export const inboundSchema = RetrieveToolResponseBodyArguments$inboundSchema;
1575
+ /** @deprecated use `RetrieveToolResponseBodyArguments$outboundSchema` instead. */
1576
+ export const outboundSchema =
1577
+ RetrieveToolResponseBodyArguments$outboundSchema;
1578
+ /** @deprecated use `RetrieveToolResponseBodyArguments$Outbound` instead. */
1579
+ export type Outbound = RetrieveToolResponseBodyArguments$Outbound;
1580
+ }
1581
+
1582
+ export function retrieveToolResponseBodyArgumentsToJSON(
1583
+ retrieveToolResponseBodyArguments: RetrieveToolResponseBodyArguments,
1584
+ ): string {
1585
+ return JSON.stringify(
1586
+ RetrieveToolResponseBodyArguments$outboundSchema.parse(
1587
+ retrieveToolResponseBodyArguments,
1588
+ ),
1589
+ );
1590
+ }
1591
+
1592
+ export function retrieveToolResponseBodyArgumentsFromJSON(
1593
+ jsonString: string,
1594
+ ): SafeParseResult<RetrieveToolResponseBodyArguments, SDKValidationError> {
1595
+ return safeParse(
1596
+ jsonString,
1597
+ (x) => RetrieveToolResponseBodyArguments$inboundSchema.parse(JSON.parse(x)),
1598
+ `Failed to parse 'RetrieveToolResponseBodyArguments' from JSON`,
1599
+ );
1600
+ }
1601
+
1602
+ /** @internal */
1603
+ export const RetrieveToolResponseBodyHttp$inboundSchema: z.ZodType<
1604
+ RetrieveToolResponseBodyHttp,
1605
+ z.ZodTypeDef,
1606
+ unknown
1607
+ > = z.object({
1608
+ blueprint: z.lazy(() => RetrieveToolResponseBodyBlueprint$inboundSchema),
1609
+ arguments: z.record(
1610
+ z.lazy(() => RetrieveToolResponseBodyArguments$inboundSchema),
1611
+ ).optional(),
1612
+ });
1613
+
1614
+ /** @internal */
1615
+ export type RetrieveToolResponseBodyHttp$Outbound = {
1616
+ blueprint: RetrieveToolResponseBodyBlueprint$Outbound;
1617
+ arguments?:
1618
+ | { [k: string]: RetrieveToolResponseBodyArguments$Outbound }
1619
+ | undefined;
1620
+ };
1621
+
1622
+ /** @internal */
1623
+ export const RetrieveToolResponseBodyHttp$outboundSchema: z.ZodType<
1624
+ RetrieveToolResponseBodyHttp$Outbound,
1625
+ z.ZodTypeDef,
1626
+ RetrieveToolResponseBodyHttp
1627
+ > = z.object({
1628
+ blueprint: z.lazy(() => RetrieveToolResponseBodyBlueprint$outboundSchema),
1629
+ arguments: z.record(
1630
+ z.lazy(() => RetrieveToolResponseBodyArguments$outboundSchema),
1631
+ ).optional(),
1632
+ });
1633
+
1634
+ /**
1635
+ * @internal
1636
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1637
+ */
1638
+ export namespace RetrieveToolResponseBodyHttp$ {
1639
+ /** @deprecated use `RetrieveToolResponseBodyHttp$inboundSchema` instead. */
1640
+ export const inboundSchema = RetrieveToolResponseBodyHttp$inboundSchema;
1641
+ /** @deprecated use `RetrieveToolResponseBodyHttp$outboundSchema` instead. */
1642
+ export const outboundSchema = RetrieveToolResponseBodyHttp$outboundSchema;
1643
+ /** @deprecated use `RetrieveToolResponseBodyHttp$Outbound` instead. */
1644
+ export type Outbound = RetrieveToolResponseBodyHttp$Outbound;
1645
+ }
1646
+
1647
+ export function retrieveToolResponseBodyHttpToJSON(
1648
+ retrieveToolResponseBodyHttp: RetrieveToolResponseBodyHttp,
1649
+ ): string {
1650
+ return JSON.stringify(
1651
+ RetrieveToolResponseBodyHttp$outboundSchema.parse(
1652
+ retrieveToolResponseBodyHttp,
1653
+ ),
1654
+ );
1655
+ }
1656
+
1657
+ export function retrieveToolResponseBodyHttpFromJSON(
1658
+ jsonString: string,
1659
+ ): SafeParseResult<RetrieveToolResponseBodyHttp, SDKValidationError> {
1660
+ return safeParse(
1661
+ jsonString,
1662
+ (x) => RetrieveToolResponseBodyHttp$inboundSchema.parse(JSON.parse(x)),
1663
+ `Failed to parse 'RetrieveToolResponseBodyHttp' from JSON`,
1664
+ );
1665
+ }
1666
+
1667
+ /** @internal */
1668
+ export const RetrieveToolResponseBody3$inboundSchema: z.ZodType<
1669
+ RetrieveToolResponseBody3,
1670
+ z.ZodTypeDef,
1671
+ unknown
1672
+ > = z.object({
1673
+ _id: z.string().default("01K5ZT3CYJRRYP8YYE165HXC5W"),
1674
+ path: z.string(),
1675
+ key: z.string(),
1676
+ display_name: z.string(),
1677
+ description: z.string(),
1678
+ created_by_id: z.string().optional(),
1679
+ updated_by_id: z.string().optional(),
1680
+ project_id: z.string(),
1681
+ workspace_id: z.string(),
1682
+ created: z.string(),
1683
+ updated: z.string(),
1684
+ status: RetrieveToolResponseBodyToolsResponseStatus$inboundSchema.default(
1685
+ "live",
1686
+ ),
1687
+ version_hash: z.string().optional(),
1688
+ type: RetrieveToolResponseBodyToolsResponseType$inboundSchema,
1689
+ http: z.lazy(() => RetrieveToolResponseBodyHttp$inboundSchema),
1690
+ }).transform((v) => {
1691
+ return remap$(v, {
1692
+ "_id": "id",
1693
+ "display_name": "displayName",
1694
+ "created_by_id": "createdById",
1695
+ "updated_by_id": "updatedById",
1696
+ "project_id": "projectId",
1697
+ "workspace_id": "workspaceId",
1698
+ "version_hash": "versionHash",
1699
+ });
1700
+ });
1701
+
1702
+ /** @internal */
1703
+ export type RetrieveToolResponseBody3$Outbound = {
1704
+ _id: string;
1705
+ path: string;
1706
+ key: string;
1707
+ display_name: string;
1708
+ description: string;
1709
+ created_by_id?: string | undefined;
1710
+ updated_by_id?: string | undefined;
1711
+ project_id: string;
1712
+ workspace_id: string;
1713
+ created: string;
1714
+ updated: string;
1715
+ status: string;
1716
+ version_hash?: string | undefined;
1717
+ type: string;
1718
+ http: RetrieveToolResponseBodyHttp$Outbound;
1719
+ };
1720
+
1721
+ /** @internal */
1722
+ export const RetrieveToolResponseBody3$outboundSchema: z.ZodType<
1723
+ RetrieveToolResponseBody3$Outbound,
1724
+ z.ZodTypeDef,
1725
+ RetrieveToolResponseBody3
1726
+ > = z.object({
1727
+ id: z.string().default("01K5ZT3CYJRRYP8YYE165HXC5W"),
1728
+ path: z.string(),
1729
+ key: z.string(),
1730
+ displayName: z.string(),
1731
+ description: z.string(),
1732
+ createdById: z.string().optional(),
1733
+ updatedById: z.string().optional(),
1734
+ projectId: z.string(),
1735
+ workspaceId: z.string(),
1736
+ created: z.string(),
1737
+ updated: z.string(),
1738
+ status: RetrieveToolResponseBodyToolsResponseStatus$outboundSchema.default(
1739
+ "live",
1740
+ ),
1741
+ versionHash: z.string().optional(),
1742
+ type: RetrieveToolResponseBodyToolsResponseType$outboundSchema,
1743
+ http: z.lazy(() => RetrieveToolResponseBodyHttp$outboundSchema),
1744
+ }).transform((v) => {
1745
+ return remap$(v, {
1746
+ id: "_id",
1747
+ displayName: "display_name",
1748
+ createdById: "created_by_id",
1749
+ updatedById: "updated_by_id",
1750
+ projectId: "project_id",
1751
+ workspaceId: "workspace_id",
1752
+ versionHash: "version_hash",
1753
+ });
1754
+ });
1755
+
1756
+ /**
1757
+ * @internal
1758
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1759
+ */
1760
+ export namespace RetrieveToolResponseBody3$ {
1761
+ /** @deprecated use `RetrieveToolResponseBody3$inboundSchema` instead. */
1762
+ export const inboundSchema = RetrieveToolResponseBody3$inboundSchema;
1763
+ /** @deprecated use `RetrieveToolResponseBody3$outboundSchema` instead. */
1764
+ export const outboundSchema = RetrieveToolResponseBody3$outboundSchema;
1765
+ /** @deprecated use `RetrieveToolResponseBody3$Outbound` instead. */
1766
+ export type Outbound = RetrieveToolResponseBody3$Outbound;
1767
+ }
1768
+
1769
+ export function retrieveToolResponseBody3ToJSON(
1770
+ retrieveToolResponseBody3: RetrieveToolResponseBody3,
1771
+ ): string {
1772
+ return JSON.stringify(
1773
+ RetrieveToolResponseBody3$outboundSchema.parse(retrieveToolResponseBody3),
1774
+ );
1775
+ }
1776
+
1777
+ export function retrieveToolResponseBody3FromJSON(
1778
+ jsonString: string,
1779
+ ): SafeParseResult<RetrieveToolResponseBody3, SDKValidationError> {
1780
+ return safeParse(
1781
+ jsonString,
1782
+ (x) => RetrieveToolResponseBody3$inboundSchema.parse(JSON.parse(x)),
1783
+ `Failed to parse 'RetrieveToolResponseBody3' from JSON`,
1784
+ );
1785
+ }
1786
+
1787
+ /** @internal */
1788
+ export const RetrieveToolResponseBodyToolsStatus$inboundSchema: z.ZodNativeEnum<
1789
+ typeof RetrieveToolResponseBodyToolsStatus
1790
+ > = z.nativeEnum(RetrieveToolResponseBodyToolsStatus);
1791
+
1792
+ /** @internal */
1793
+ export const RetrieveToolResponseBodyToolsStatus$outboundSchema:
1794
+ z.ZodNativeEnum<typeof RetrieveToolResponseBodyToolsStatus> =
1795
+ RetrieveToolResponseBodyToolsStatus$inboundSchema;
1796
+
1797
+ /**
1798
+ * @internal
1799
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1800
+ */
1801
+ export namespace RetrieveToolResponseBodyToolsStatus$ {
1802
+ /** @deprecated use `RetrieveToolResponseBodyToolsStatus$inboundSchema` instead. */
1803
+ export const inboundSchema =
1804
+ RetrieveToolResponseBodyToolsStatus$inboundSchema;
1805
+ /** @deprecated use `RetrieveToolResponseBodyToolsStatus$outboundSchema` instead. */
1806
+ export const outboundSchema =
1807
+ RetrieveToolResponseBodyToolsStatus$outboundSchema;
1808
+ }
1809
+
1810
+ /** @internal */
1811
+ export const RetrieveToolResponseBodyToolsType$inboundSchema: z.ZodNativeEnum<
1812
+ typeof RetrieveToolResponseBodyToolsType
1813
+ > = z.nativeEnum(RetrieveToolResponseBodyToolsType);
1814
+
1815
+ /** @internal */
1816
+ export const RetrieveToolResponseBodyToolsType$outboundSchema: z.ZodNativeEnum<
1817
+ typeof RetrieveToolResponseBodyToolsType
1818
+ > = RetrieveToolResponseBodyToolsType$inboundSchema;
1819
+
1820
+ /**
1821
+ * @internal
1822
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1823
+ */
1824
+ export namespace RetrieveToolResponseBodyToolsType$ {
1825
+ /** @deprecated use `RetrieveToolResponseBodyToolsType$inboundSchema` instead. */
1826
+ export const inboundSchema = RetrieveToolResponseBodyToolsType$inboundSchema;
1827
+ /** @deprecated use `RetrieveToolResponseBodyToolsType$outboundSchema` instead. */
1828
+ export const outboundSchema =
1829
+ RetrieveToolResponseBodyToolsType$outboundSchema;
1830
+ }
1831
+
1832
+ /** @internal */
1833
+ export const RetrieveToolResponseBodyJsonSchema$inboundSchema: z.ZodType<
1834
+ RetrieveToolResponseBodyJsonSchema,
1835
+ z.ZodTypeDef,
1836
+ unknown
1837
+ > = z.object({
1838
+ name: z.string(),
1839
+ description: z.string().optional(),
1840
+ schema: z.record(z.any()),
1841
+ strict: z.nullable(z.boolean().default(false)),
1842
+ });
1843
+
1844
+ /** @internal */
1845
+ export type RetrieveToolResponseBodyJsonSchema$Outbound = {
1846
+ name: string;
1847
+ description?: string | undefined;
1848
+ schema: { [k: string]: any };
1849
+ strict: boolean | null;
1850
+ };
1851
+
1852
+ /** @internal */
1853
+ export const RetrieveToolResponseBodyJsonSchema$outboundSchema: z.ZodType<
1854
+ RetrieveToolResponseBodyJsonSchema$Outbound,
1855
+ z.ZodTypeDef,
1856
+ RetrieveToolResponseBodyJsonSchema
1857
+ > = z.object({
1858
+ name: z.string(),
1859
+ description: z.string().optional(),
1860
+ schema: z.record(z.any()),
1861
+ strict: z.nullable(z.boolean().default(false)),
1862
+ });
1863
+
1864
+ /**
1865
+ * @internal
1866
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1867
+ */
1868
+ export namespace RetrieveToolResponseBodyJsonSchema$ {
1869
+ /** @deprecated use `RetrieveToolResponseBodyJsonSchema$inboundSchema` instead. */
1870
+ export const inboundSchema = RetrieveToolResponseBodyJsonSchema$inboundSchema;
1871
+ /** @deprecated use `RetrieveToolResponseBodyJsonSchema$outboundSchema` instead. */
1872
+ export const outboundSchema =
1873
+ RetrieveToolResponseBodyJsonSchema$outboundSchema;
1874
+ /** @deprecated use `RetrieveToolResponseBodyJsonSchema$Outbound` instead. */
1875
+ export type Outbound = RetrieveToolResponseBodyJsonSchema$Outbound;
1876
+ }
1877
+
1878
+ export function retrieveToolResponseBodyJsonSchemaToJSON(
1879
+ retrieveToolResponseBodyJsonSchema: RetrieveToolResponseBodyJsonSchema,
1880
+ ): string {
1881
+ return JSON.stringify(
1882
+ RetrieveToolResponseBodyJsonSchema$outboundSchema.parse(
1883
+ retrieveToolResponseBodyJsonSchema,
1884
+ ),
1885
+ );
1886
+ }
1887
+
1888
+ export function retrieveToolResponseBodyJsonSchemaFromJSON(
1889
+ jsonString: string,
1890
+ ): SafeParseResult<RetrieveToolResponseBodyJsonSchema, SDKValidationError> {
1891
+ return safeParse(
1892
+ jsonString,
1893
+ (x) =>
1894
+ RetrieveToolResponseBodyJsonSchema$inboundSchema.parse(JSON.parse(x)),
1895
+ `Failed to parse 'RetrieveToolResponseBodyJsonSchema' from JSON`,
1896
+ );
1897
+ }
1898
+
1899
+ /** @internal */
1900
+ export const RetrieveToolResponseBody2$inboundSchema: z.ZodType<
1901
+ RetrieveToolResponseBody2,
1902
+ z.ZodTypeDef,
1903
+ unknown
1904
+ > = z.object({
1905
+ _id: z.string().default("01K5ZT3CYJMJJ9YNAHW759DKP8"),
1906
+ path: z.string(),
1907
+ key: z.string(),
1908
+ display_name: z.string(),
1909
+ description: z.string(),
1910
+ created_by_id: z.string().optional(),
1911
+ updated_by_id: z.string().optional(),
1912
+ project_id: z.string(),
1913
+ workspace_id: z.string(),
1914
+ created: z.string(),
1915
+ updated: z.string(),
1916
+ status: RetrieveToolResponseBodyToolsStatus$inboundSchema.default("live"),
1917
+ version_hash: z.string().optional(),
1918
+ type: RetrieveToolResponseBodyToolsType$inboundSchema,
1919
+ json_schema: z.lazy(() => RetrieveToolResponseBodyJsonSchema$inboundSchema),
1920
+ }).transform((v) => {
1921
+ return remap$(v, {
1922
+ "_id": "id",
1923
+ "display_name": "displayName",
1924
+ "created_by_id": "createdById",
1925
+ "updated_by_id": "updatedById",
1926
+ "project_id": "projectId",
1927
+ "workspace_id": "workspaceId",
1928
+ "version_hash": "versionHash",
1929
+ "json_schema": "jsonSchema",
1930
+ });
1931
+ });
1932
+
1933
+ /** @internal */
1934
+ export type RetrieveToolResponseBody2$Outbound = {
1935
+ _id: string;
1936
+ path: string;
1937
+ key: string;
1938
+ display_name: string;
1939
+ description: string;
1940
+ created_by_id?: string | undefined;
1941
+ updated_by_id?: string | undefined;
1942
+ project_id: string;
1943
+ workspace_id: string;
1944
+ created: string;
1945
+ updated: string;
1946
+ status: string;
1947
+ version_hash?: string | undefined;
1948
+ type: string;
1949
+ json_schema: RetrieveToolResponseBodyJsonSchema$Outbound;
1950
+ };
1951
+
1952
+ /** @internal */
1953
+ export const RetrieveToolResponseBody2$outboundSchema: z.ZodType<
1954
+ RetrieveToolResponseBody2$Outbound,
1955
+ z.ZodTypeDef,
1956
+ RetrieveToolResponseBody2
1957
+ > = z.object({
1958
+ id: z.string().default("01K5ZT3CYJMJJ9YNAHW759DKP8"),
1959
+ path: z.string(),
1960
+ key: z.string(),
1961
+ displayName: z.string(),
1962
+ description: z.string(),
1963
+ createdById: z.string().optional(),
1964
+ updatedById: z.string().optional(),
1965
+ projectId: z.string(),
1966
+ workspaceId: z.string(),
1967
+ created: z.string(),
1968
+ updated: z.string(),
1969
+ status: RetrieveToolResponseBodyToolsStatus$outboundSchema.default("live"),
1970
+ versionHash: z.string().optional(),
1971
+ type: RetrieveToolResponseBodyToolsType$outboundSchema,
1972
+ jsonSchema: z.lazy(() => RetrieveToolResponseBodyJsonSchema$outboundSchema),
1973
+ }).transform((v) => {
1974
+ return remap$(v, {
1975
+ id: "_id",
1976
+ displayName: "display_name",
1977
+ createdById: "created_by_id",
1978
+ updatedById: "updated_by_id",
1979
+ projectId: "project_id",
1980
+ workspaceId: "workspace_id",
1981
+ versionHash: "version_hash",
1982
+ jsonSchema: "json_schema",
1983
+ });
1984
+ });
1985
+
1986
+ /**
1987
+ * @internal
1988
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1989
+ */
1990
+ export namespace RetrieveToolResponseBody2$ {
1991
+ /** @deprecated use `RetrieveToolResponseBody2$inboundSchema` instead. */
1992
+ export const inboundSchema = RetrieveToolResponseBody2$inboundSchema;
1993
+ /** @deprecated use `RetrieveToolResponseBody2$outboundSchema` instead. */
1994
+ export const outboundSchema = RetrieveToolResponseBody2$outboundSchema;
1995
+ /** @deprecated use `RetrieveToolResponseBody2$Outbound` instead. */
1996
+ export type Outbound = RetrieveToolResponseBody2$Outbound;
1997
+ }
1998
+
1999
+ export function retrieveToolResponseBody2ToJSON(
2000
+ retrieveToolResponseBody2: RetrieveToolResponseBody2,
2001
+ ): string {
2002
+ return JSON.stringify(
2003
+ RetrieveToolResponseBody2$outboundSchema.parse(retrieveToolResponseBody2),
2004
+ );
2005
+ }
2006
+
2007
+ export function retrieveToolResponseBody2FromJSON(
2008
+ jsonString: string,
2009
+ ): SafeParseResult<RetrieveToolResponseBody2, SDKValidationError> {
2010
+ return safeParse(
2011
+ jsonString,
2012
+ (x) => RetrieveToolResponseBody2$inboundSchema.parse(JSON.parse(x)),
2013
+ `Failed to parse 'RetrieveToolResponseBody2' from JSON`,
2014
+ );
2015
+ }
2016
+
2017
+ /** @internal */
2018
+ export const RetrieveToolResponseBodyStatus$inboundSchema: z.ZodNativeEnum<
2019
+ typeof RetrieveToolResponseBodyStatus
2020
+ > = z.nativeEnum(RetrieveToolResponseBodyStatus);
2021
+
2022
+ /** @internal */
2023
+ export const RetrieveToolResponseBodyStatus$outboundSchema: z.ZodNativeEnum<
2024
+ typeof RetrieveToolResponseBodyStatus
2025
+ > = RetrieveToolResponseBodyStatus$inboundSchema;
2026
+
2027
+ /**
2028
+ * @internal
2029
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2030
+ */
2031
+ export namespace RetrieveToolResponseBodyStatus$ {
2032
+ /** @deprecated use `RetrieveToolResponseBodyStatus$inboundSchema` instead. */
2033
+ export const inboundSchema = RetrieveToolResponseBodyStatus$inboundSchema;
2034
+ /** @deprecated use `RetrieveToolResponseBodyStatus$outboundSchema` instead. */
2035
+ export const outboundSchema = RetrieveToolResponseBodyStatus$outboundSchema;
2036
+ }
2037
+
2038
+ /** @internal */
2039
+ export const RetrieveToolResponseBodyType$inboundSchema: z.ZodNativeEnum<
2040
+ typeof RetrieveToolResponseBodyType
2041
+ > = z.nativeEnum(RetrieveToolResponseBodyType);
2042
+
2043
+ /** @internal */
2044
+ export const RetrieveToolResponseBodyType$outboundSchema: z.ZodNativeEnum<
2045
+ typeof RetrieveToolResponseBodyType
2046
+ > = RetrieveToolResponseBodyType$inboundSchema;
2047
+
2048
+ /**
2049
+ * @internal
2050
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2051
+ */
2052
+ export namespace RetrieveToolResponseBodyType$ {
2053
+ /** @deprecated use `RetrieveToolResponseBodyType$inboundSchema` instead. */
2054
+ export const inboundSchema = RetrieveToolResponseBodyType$inboundSchema;
2055
+ /** @deprecated use `RetrieveToolResponseBodyType$outboundSchema` instead. */
2056
+ export const outboundSchema = RetrieveToolResponseBodyType$outboundSchema;
2057
+ }
2058
+
2059
+ /** @internal */
2060
+ export const RetrieveToolResponseBodyFunction$inboundSchema: z.ZodType<
2061
+ RetrieveToolResponseBodyFunction,
2062
+ z.ZodTypeDef,
2063
+ unknown
2064
+ > = z.object({
2065
+ name: z.string(),
2066
+ description: z.string().optional(),
2067
+ strict: z.boolean().optional(),
2068
+ parameters: z.record(z.any()).optional(),
2069
+ });
2070
+
2071
+ /** @internal */
2072
+ export type RetrieveToolResponseBodyFunction$Outbound = {
2073
+ name: string;
2074
+ description?: string | undefined;
2075
+ strict?: boolean | undefined;
2076
+ parameters?: { [k: string]: any } | undefined;
2077
+ };
2078
+
2079
+ /** @internal */
2080
+ export const RetrieveToolResponseBodyFunction$outboundSchema: z.ZodType<
2081
+ RetrieveToolResponseBodyFunction$Outbound,
2082
+ z.ZodTypeDef,
2083
+ RetrieveToolResponseBodyFunction
2084
+ > = z.object({
2085
+ name: z.string(),
2086
+ description: z.string().optional(),
2087
+ strict: z.boolean().optional(),
2088
+ parameters: z.record(z.any()).optional(),
2089
+ });
2090
+
2091
+ /**
2092
+ * @internal
2093
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2094
+ */
2095
+ export namespace RetrieveToolResponseBodyFunction$ {
2096
+ /** @deprecated use `RetrieveToolResponseBodyFunction$inboundSchema` instead. */
2097
+ export const inboundSchema = RetrieveToolResponseBodyFunction$inboundSchema;
2098
+ /** @deprecated use `RetrieveToolResponseBodyFunction$outboundSchema` instead. */
2099
+ export const outboundSchema = RetrieveToolResponseBodyFunction$outboundSchema;
2100
+ /** @deprecated use `RetrieveToolResponseBodyFunction$Outbound` instead. */
2101
+ export type Outbound = RetrieveToolResponseBodyFunction$Outbound;
2102
+ }
2103
+
2104
+ export function retrieveToolResponseBodyFunctionToJSON(
2105
+ retrieveToolResponseBodyFunction: RetrieveToolResponseBodyFunction,
2106
+ ): string {
2107
+ return JSON.stringify(
2108
+ RetrieveToolResponseBodyFunction$outboundSchema.parse(
2109
+ retrieveToolResponseBodyFunction,
2110
+ ),
2111
+ );
2112
+ }
2113
+
2114
+ export function retrieveToolResponseBodyFunctionFromJSON(
2115
+ jsonString: string,
2116
+ ): SafeParseResult<RetrieveToolResponseBodyFunction, SDKValidationError> {
2117
+ return safeParse(
2118
+ jsonString,
2119
+ (x) => RetrieveToolResponseBodyFunction$inboundSchema.parse(JSON.parse(x)),
2120
+ `Failed to parse 'RetrieveToolResponseBodyFunction' from JSON`,
2121
+ );
2122
+ }
2123
+
2124
+ /** @internal */
2125
+ export const RetrieveToolResponseBody1$inboundSchema: z.ZodType<
2126
+ RetrieveToolResponseBody1,
2127
+ z.ZodTypeDef,
2128
+ unknown
2129
+ > = z.object({
2130
+ _id: z.string().default("01K5ZT3CYJRRN83SQ0PTWBXGKM"),
2131
+ path: z.string(),
2132
+ key: z.string(),
2133
+ display_name: z.string(),
2134
+ description: z.string(),
2135
+ created_by_id: z.string().optional(),
2136
+ updated_by_id: z.string().optional(),
2137
+ project_id: z.string(),
2138
+ workspace_id: z.string(),
2139
+ created: z.string(),
2140
+ updated: z.string(),
2141
+ status: RetrieveToolResponseBodyStatus$inboundSchema.default("live"),
2142
+ version_hash: z.string().optional(),
2143
+ type: RetrieveToolResponseBodyType$inboundSchema,
2144
+ function: z.lazy(() => RetrieveToolResponseBodyFunction$inboundSchema),
2145
+ }).transform((v) => {
2146
+ return remap$(v, {
2147
+ "_id": "id",
2148
+ "display_name": "displayName",
2149
+ "created_by_id": "createdById",
2150
+ "updated_by_id": "updatedById",
2151
+ "project_id": "projectId",
2152
+ "workspace_id": "workspaceId",
2153
+ "version_hash": "versionHash",
2154
+ });
2155
+ });
2156
+
2157
+ /** @internal */
2158
+ export type RetrieveToolResponseBody1$Outbound = {
2159
+ _id: string;
2160
+ path: string;
2161
+ key: string;
2162
+ display_name: string;
2163
+ description: string;
2164
+ created_by_id?: string | undefined;
2165
+ updated_by_id?: string | undefined;
2166
+ project_id: string;
2167
+ workspace_id: string;
2168
+ created: string;
2169
+ updated: string;
2170
+ status: string;
2171
+ version_hash?: string | undefined;
2172
+ type: string;
2173
+ function: RetrieveToolResponseBodyFunction$Outbound;
2174
+ };
2175
+
2176
+ /** @internal */
2177
+ export const RetrieveToolResponseBody1$outboundSchema: z.ZodType<
2178
+ RetrieveToolResponseBody1$Outbound,
2179
+ z.ZodTypeDef,
2180
+ RetrieveToolResponseBody1
2181
+ > = z.object({
2182
+ id: z.string().default("01K5ZT3CYJRRN83SQ0PTWBXGKM"),
2183
+ path: z.string(),
2184
+ key: z.string(),
2185
+ displayName: z.string(),
2186
+ description: z.string(),
2187
+ createdById: z.string().optional(),
2188
+ updatedById: z.string().optional(),
2189
+ projectId: z.string(),
2190
+ workspaceId: z.string(),
2191
+ created: z.string(),
2192
+ updated: z.string(),
2193
+ status: RetrieveToolResponseBodyStatus$outboundSchema.default("live"),
2194
+ versionHash: z.string().optional(),
2195
+ type: RetrieveToolResponseBodyType$outboundSchema,
2196
+ function: z.lazy(() => RetrieveToolResponseBodyFunction$outboundSchema),
2197
+ }).transform((v) => {
2198
+ return remap$(v, {
2199
+ id: "_id",
2200
+ displayName: "display_name",
2201
+ createdById: "created_by_id",
2202
+ updatedById: "updated_by_id",
2203
+ projectId: "project_id",
2204
+ workspaceId: "workspace_id",
2205
+ versionHash: "version_hash",
2206
+ });
2207
+ });
2208
+
2209
+ /**
2210
+ * @internal
2211
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2212
+ */
2213
+ export namespace RetrieveToolResponseBody1$ {
2214
+ /** @deprecated use `RetrieveToolResponseBody1$inboundSchema` instead. */
2215
+ export const inboundSchema = RetrieveToolResponseBody1$inboundSchema;
2216
+ /** @deprecated use `RetrieveToolResponseBody1$outboundSchema` instead. */
2217
+ export const outboundSchema = RetrieveToolResponseBody1$outboundSchema;
2218
+ /** @deprecated use `RetrieveToolResponseBody1$Outbound` instead. */
2219
+ export type Outbound = RetrieveToolResponseBody1$Outbound;
2220
+ }
2221
+
2222
+ export function retrieveToolResponseBody1ToJSON(
2223
+ retrieveToolResponseBody1: RetrieveToolResponseBody1,
2224
+ ): string {
2225
+ return JSON.stringify(
2226
+ RetrieveToolResponseBody1$outboundSchema.parse(retrieveToolResponseBody1),
2227
+ );
2228
+ }
2229
+
2230
+ export function retrieveToolResponseBody1FromJSON(
2231
+ jsonString: string,
2232
+ ): SafeParseResult<RetrieveToolResponseBody1, SDKValidationError> {
2233
+ return safeParse(
2234
+ jsonString,
2235
+ (x) => RetrieveToolResponseBody1$inboundSchema.parse(JSON.parse(x)),
2236
+ `Failed to parse 'RetrieveToolResponseBody1' from JSON`,
2237
+ );
2238
+ }
2239
+
2240
+ /** @internal */
2241
+ export const RetrieveToolResponseBody$inboundSchema: z.ZodType<
2242
+ RetrieveToolResponseBody,
2243
+ z.ZodTypeDef,
2244
+ unknown
2245
+ > = z.union([
2246
+ z.lazy(() => RetrieveToolResponseBody1$inboundSchema),
2247
+ z.lazy(() => RetrieveToolResponseBody2$inboundSchema),
2248
+ z.lazy(() => RetrieveToolResponseBody3$inboundSchema),
2249
+ z.lazy(() => RetrieveToolResponseBody4$inboundSchema),
2250
+ z.lazy(() => RetrieveToolResponseBody5$inboundSchema),
2251
+ ]);
2252
+
2253
+ /** @internal */
2254
+ export type RetrieveToolResponseBody$Outbound =
2255
+ | RetrieveToolResponseBody1$Outbound
2256
+ | RetrieveToolResponseBody2$Outbound
2257
+ | RetrieveToolResponseBody3$Outbound
2258
+ | RetrieveToolResponseBody4$Outbound
2259
+ | RetrieveToolResponseBody5$Outbound;
2260
+
2261
+ /** @internal */
2262
+ export const RetrieveToolResponseBody$outboundSchema: z.ZodType<
2263
+ RetrieveToolResponseBody$Outbound,
2264
+ z.ZodTypeDef,
2265
+ RetrieveToolResponseBody
2266
+ > = z.union([
2267
+ z.lazy(() => RetrieveToolResponseBody1$outboundSchema),
2268
+ z.lazy(() => RetrieveToolResponseBody2$outboundSchema),
2269
+ z.lazy(() => RetrieveToolResponseBody3$outboundSchema),
2270
+ z.lazy(() => RetrieveToolResponseBody4$outboundSchema),
2271
+ z.lazy(() => RetrieveToolResponseBody5$outboundSchema),
2272
+ ]);
2273
+
2274
+ /**
2275
+ * @internal
2276
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2277
+ */
2278
+ export namespace RetrieveToolResponseBody$ {
2279
+ /** @deprecated use `RetrieveToolResponseBody$inboundSchema` instead. */
2280
+ export const inboundSchema = RetrieveToolResponseBody$inboundSchema;
2281
+ /** @deprecated use `RetrieveToolResponseBody$outboundSchema` instead. */
2282
+ export const outboundSchema = RetrieveToolResponseBody$outboundSchema;
2283
+ /** @deprecated use `RetrieveToolResponseBody$Outbound` instead. */
2284
+ export type Outbound = RetrieveToolResponseBody$Outbound;
2285
+ }
2286
+
2287
+ export function retrieveToolResponseBodyToJSON(
2288
+ retrieveToolResponseBody: RetrieveToolResponseBody,
2289
+ ): string {
2290
+ return JSON.stringify(
2291
+ RetrieveToolResponseBody$outboundSchema.parse(retrieveToolResponseBody),
2292
+ );
2293
+ }
2294
+
2295
+ export function retrieveToolResponseBodyFromJSON(
2296
+ jsonString: string,
2297
+ ): SafeParseResult<RetrieveToolResponseBody, SDKValidationError> {
2298
+ return safeParse(
2299
+ jsonString,
2300
+ (x) => RetrieveToolResponseBody$inboundSchema.parse(JSON.parse(x)),
2301
+ `Failed to parse 'RetrieveToolResponseBody' from JSON`,
2302
+ );
2303
+ }