@orq-ai/node 4.0.0-rc.49 → 4.0.0-rc.50

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