@orq-ai/node 3.12.16 → 3.12.19

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