@orq-ai/node 3.3.12 → 3.3.14

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 (182) hide show
  1. package/bin/mcp-server.js +39 -39
  2. package/bin/mcp-server.js.map +21 -21
  3. package/jsr.json +1 -1
  4. package/lib/config.d.ts +2 -2
  5. package/lib/config.js +2 -2
  6. package/mcp-server/mcp-server.js +1 -1
  7. package/mcp-server/server.js +1 -1
  8. package/models/operations/bulkcreatedatapoints.js +2 -2
  9. package/models/operations/createcontact.js +2 -2
  10. package/models/operations/createdataset.js +2 -2
  11. package/models/operations/createdatasetitem.js +2 -2
  12. package/models/operations/createdatasource.js +2 -2
  13. package/models/operations/fileget.js +2 -2
  14. package/models/operations/filelist.js +2 -2
  15. package/models/operations/fileupload.js +2 -2
  16. package/models/operations/listdatasetdatapoints.js +2 -2
  17. package/models/operations/listdatasets.js +2 -2
  18. package/models/operations/listdatasources.js +2 -2
  19. package/models/operations/retrievedatapoint.js +2 -2
  20. package/models/operations/retrievedataset.js +2 -2
  21. package/models/operations/retrievedatasource.js +2 -2
  22. package/models/operations/updatedatapoint.js +2 -2
  23. package/models/operations/updatedataset.js +2 -2
  24. package/models/operations/updatedatasource.js +2 -2
  25. package/package.json +1 -1
  26. package/packages/orq-rc/FUNCTIONS.md +2 -4
  27. package/packages/orq-rc/README.md +68 -17
  28. package/packages/orq-rc/docs/sdks/knowledge/README.md +0 -83
  29. package/packages/orq-rc/docs/sdks/memorystores/README.md +1211 -0
  30. package/packages/orq-rc/docs/sdks/orq/README.md +74 -0
  31. package/packages/orq-rc/docs/sdks/sessions/README.md +385 -0
  32. package/packages/orq-rc/docs/sdks/tools/README.md +425 -0
  33. package/packages/orq-rc/jsr.json +1 -1
  34. package/packages/orq-rc/package-lock.json +2 -2
  35. package/packages/orq-rc/package.json +1 -1
  36. package/packages/orq-rc/src/funcs/memoryStoresCreate.ts +165 -0
  37. package/packages/orq-rc/src/funcs/memoryStoresCreateDocument.ts +169 -0
  38. package/packages/orq-rc/src/funcs/memoryStoresCreateMemory.ts +164 -0
  39. package/packages/orq-rc/src/funcs/memoryStoresDelete.ts +162 -0
  40. package/packages/orq-rc/src/funcs/memoryStoresDeleteDocument.ts +178 -0
  41. package/packages/orq-rc/src/funcs/memoryStoresDeleteMemory.ts +173 -0
  42. package/packages/orq-rc/src/funcs/memoryStoresList.ts +172 -0
  43. package/packages/orq-rc/src/funcs/memoryStoresListDocuments.ts +175 -0
  44. package/packages/orq-rc/src/funcs/memoryStoresListMemories.ts +170 -0
  45. package/packages/orq-rc/src/funcs/memoryStoresRetrieve.ts +171 -0
  46. package/packages/orq-rc/src/funcs/memoryStoresRetrieveDocument.ts +172 -0
  47. package/packages/orq-rc/src/funcs/memoryStoresRetrieveMemory.ts +167 -0
  48. package/packages/orq-rc/src/funcs/memoryStoresUpdate.ts +162 -0
  49. package/packages/orq-rc/src/funcs/memoryStoresUpdateDocument.ts +173 -0
  50. package/packages/orq-rc/src/funcs/memoryStoresUpdateMemory.ts +168 -0
  51. package/packages/orq-rc/src/funcs/postV2TracesSessionsCount.ts +155 -0
  52. package/packages/orq-rc/src/funcs/sessionsCreate.ts +159 -0
  53. package/packages/orq-rc/src/funcs/sessionsDelete.ts +170 -0
  54. package/packages/orq-rc/src/funcs/sessionsGet.ts +169 -0
  55. package/packages/orq-rc/src/funcs/sessionsList.ts +157 -0
  56. package/packages/orq-rc/src/funcs/sessionsUpdate.ts +170 -0
  57. package/packages/orq-rc/src/funcs/toolsCreate.ts +157 -0
  58. package/packages/orq-rc/src/funcs/toolsDelete.ts +161 -0
  59. package/packages/orq-rc/src/funcs/toolsList.ts +170 -0
  60. package/packages/orq-rc/src/funcs/toolsRetrieve.ts +160 -0
  61. package/packages/orq-rc/src/funcs/{knowledgeSearch.ts → toolsUpdate.ts} +18 -15
  62. package/packages/orq-rc/src/lib/config.ts +3 -3
  63. package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
  64. package/packages/orq-rc/src/mcp-server/prompts.ts +8 -1
  65. package/packages/orq-rc/src/mcp-server/resources.ts +16 -2
  66. package/packages/orq-rc/src/mcp-server/server.ts +55 -5
  67. package/packages/orq-rc/src/mcp-server/tools/memoryStoresCreate.ts +35 -0
  68. package/packages/orq-rc/src/mcp-server/tools/memoryStoresCreateDocument.ts +37 -0
  69. package/packages/orq-rc/src/mcp-server/tools/memoryStoresCreateMemory.ts +37 -0
  70. package/packages/orq-rc/src/mcp-server/tools/memoryStoresDelete.ts +35 -0
  71. package/packages/orq-rc/src/mcp-server/tools/memoryStoresDeleteDocument.ts +40 -0
  72. package/packages/orq-rc/src/mcp-server/tools/memoryStoresDeleteMemory.ts +40 -0
  73. package/packages/orq-rc/src/mcp-server/tools/memoryStoresList.ts +37 -0
  74. package/packages/orq-rc/src/mcp-server/tools/memoryStoresListDocuments.ts +37 -0
  75. package/packages/orq-rc/src/mcp-server/tools/memoryStoresListMemories.ts +37 -0
  76. package/packages/orq-rc/src/mcp-server/tools/memoryStoresRetrieve.ts +37 -0
  77. package/packages/orq-rc/src/mcp-server/tools/memoryStoresRetrieveDocument.ts +37 -0
  78. package/packages/orq-rc/src/mcp-server/tools/memoryStoresRetrieveMemory.ts +37 -0
  79. package/packages/orq-rc/src/mcp-server/tools/memoryStoresUpdate.ts +37 -0
  80. package/packages/orq-rc/src/mcp-server/tools/memoryStoresUpdateDocument.ts +37 -0
  81. package/packages/orq-rc/src/mcp-server/tools/memoryStoresUpdateMemory.ts +37 -0
  82. package/packages/orq-rc/src/mcp-server/tools/postV2TracesSessionsCount.ts +36 -0
  83. package/packages/orq-rc/src/mcp-server/tools/sessionsCreate.ts +37 -0
  84. package/packages/orq-rc/src/mcp-server/tools/sessionsDelete.ts +35 -0
  85. package/packages/orq-rc/src/mcp-server/tools/{knowledgeSearch.ts → sessionsGet.ts} +8 -6
  86. package/packages/orq-rc/src/mcp-server/tools/sessionsList.ts +37 -0
  87. package/packages/orq-rc/src/mcp-server/tools/sessionsUpdate.ts +37 -0
  88. package/packages/orq-rc/src/mcp-server/tools/toolsCreate.ts +37 -0
  89. package/packages/orq-rc/src/mcp-server/tools/toolsDelete.ts +35 -0
  90. package/packages/orq-rc/src/mcp-server/tools/toolsList.ts +37 -0
  91. package/packages/orq-rc/src/mcp-server/tools/toolsRetrieve.ts +37 -0
  92. package/packages/orq-rc/src/mcp-server/tools/toolsUpdate.ts +37 -0
  93. package/packages/orq-rc/src/mcp-server/tools.ts +6 -3
  94. package/packages/orq-rc/src/models/components/deployments.ts +124 -29
  95. package/packages/orq-rc/src/models/operations/bulkcreatedatapoints.ts +2 -2
  96. package/packages/orq-rc/src/models/operations/createchunk.ts +99 -41
  97. package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
  98. package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
  99. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +2 -2
  100. package/packages/orq-rc/src/models/operations/createdatasource.ts +10 -10
  101. package/packages/orq-rc/src/models/operations/createknowledge.ts +175 -14
  102. package/packages/orq-rc/src/models/operations/creatememory.ts +265 -0
  103. package/packages/orq-rc/src/models/operations/creatememorydocument.ts +284 -0
  104. package/packages/orq-rc/src/models/operations/creatememorystore.ts +1619 -0
  105. package/packages/orq-rc/src/models/operations/createprompt.ts +6 -6
  106. package/packages/orq-rc/src/models/operations/createsession.ts +632 -0
  107. package/packages/orq-rc/src/models/operations/createtool.ts +2297 -0
  108. package/packages/orq-rc/src/models/operations/deletememory.ts +87 -0
  109. package/packages/orq-rc/src/models/operations/deletememorydocument.ts +98 -0
  110. package/packages/orq-rc/src/models/operations/deletememorystore.ts +78 -0
  111. package/packages/orq-rc/src/models/operations/deletesession.ts +78 -0
  112. package/packages/orq-rc/src/models/operations/deletetool.ts +75 -0
  113. package/packages/orq-rc/src/models/operations/deploymentcreatemetric.ts +57 -35
  114. package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +124 -29
  115. package/packages/orq-rc/src/models/operations/deployments.ts +3 -3
  116. package/packages/orq-rc/src/models/operations/deploymentstream.ts +135 -30
  117. package/packages/orq-rc/src/models/operations/fileget.ts +2 -2
  118. package/packages/orq-rc/src/models/operations/filelist.ts +2 -2
  119. package/packages/orq-rc/src/models/operations/fileupload.ts +2 -2
  120. package/packages/orq-rc/src/models/operations/getallmemories.ts +315 -0
  121. package/packages/orq-rc/src/models/operations/getallmemorydocuments.ts +335 -0
  122. package/packages/orq-rc/src/models/operations/getallmemorystores.ts +1061 -0
  123. package/packages/orq-rc/src/models/operations/getallprompts.ts +3 -3
  124. package/packages/orq-rc/src/models/operations/getalltools.ts +1382 -0
  125. package/packages/orq-rc/src/models/operations/getonechunk.ts +8 -8
  126. package/packages/orq-rc/src/models/operations/getoneknowledge.ts +92 -8
  127. package/packages/orq-rc/src/models/operations/getoneprompt.ts +3 -3
  128. package/packages/orq-rc/src/models/operations/getpromptversion.ts +3 -3
  129. package/packages/orq-rc/src/models/operations/getsession.ts +400 -0
  130. package/packages/orq-rc/src/models/operations/index.ts +26 -1
  131. package/packages/orq-rc/src/models/operations/listchunks.ts +8 -8
  132. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +2 -2
  133. package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
  134. package/packages/orq-rc/src/models/operations/listdatasources.ts +10 -10
  135. package/packages/orq-rc/src/models/operations/listknowledgebases.ts +94 -8
  136. package/packages/orq-rc/src/models/operations/listpromptversions.ts +3 -3
  137. package/packages/orq-rc/src/models/operations/listsessions.ts +6732 -0
  138. package/packages/orq-rc/src/models/operations/postv2tracessessionscount.ts +7043 -0
  139. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +2 -2
  140. package/packages/orq-rc/src/models/operations/retrievedataset.ts +2 -2
  141. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +10 -10
  142. package/packages/orq-rc/src/models/operations/retrievememory.ts +198 -0
  143. package/packages/orq-rc/src/models/operations/retrievememorydocument.ts +217 -0
  144. package/packages/orq-rc/src/models/operations/retrievememorystore.ts +944 -0
  145. package/packages/orq-rc/src/models/operations/retrievetool.ts +1350 -0
  146. package/packages/orq-rc/src/models/operations/updatechunk.ts +10 -10
  147. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +2 -2
  148. package/packages/orq-rc/src/models/operations/updatedataset.ts +2 -2
  149. package/packages/orq-rc/src/models/operations/updatedatasource.ts +10 -10
  150. package/packages/orq-rc/src/models/operations/updateknowledge.ts +201 -20
  151. package/packages/orq-rc/src/models/operations/updatememory.ts +274 -0
  152. package/packages/orq-rc/src/models/operations/updatememorydocument.ts +293 -0
  153. package/packages/orq-rc/src/models/operations/updatememorystore.ts +1148 -0
  154. package/packages/orq-rc/src/models/operations/updateprompt.ts +6 -6
  155. package/packages/orq-rc/src/models/operations/updatesession.ts +731 -0
  156. package/packages/orq-rc/src/models/operations/updatetool.ts +2464 -0
  157. package/packages/orq-rc/src/sdk/knowledge.ts +0 -15
  158. package/packages/orq-rc/src/sdk/memorystores.ts +286 -0
  159. package/packages/orq-rc/src/sdk/sdk.ts +36 -1
  160. package/packages/orq-rc/src/sdk/sessions.ts +99 -0
  161. package/packages/orq-rc/src/sdk/tools.ts +99 -0
  162. package/src/lib/config.ts +2 -2
  163. package/src/mcp-server/mcp-server.ts +1 -1
  164. package/src/mcp-server/server.ts +1 -1
  165. package/src/models/operations/bulkcreatedatapoints.ts +2 -2
  166. package/src/models/operations/createcontact.ts +2 -2
  167. package/src/models/operations/createdataset.ts +2 -2
  168. package/src/models/operations/createdatasetitem.ts +2 -2
  169. package/src/models/operations/createdatasource.ts +2 -2
  170. package/src/models/operations/fileget.ts +2 -2
  171. package/src/models/operations/filelist.ts +2 -2
  172. package/src/models/operations/fileupload.ts +2 -2
  173. package/src/models/operations/listdatasetdatapoints.ts +2 -2
  174. package/src/models/operations/listdatasets.ts +2 -2
  175. package/src/models/operations/listdatasources.ts +2 -2
  176. package/src/models/operations/retrievedatapoint.ts +2 -2
  177. package/src/models/operations/retrievedataset.ts +2 -2
  178. package/src/models/operations/retrievedatasource.ts +2 -2
  179. package/src/models/operations/updatedatapoint.ts +2 -2
  180. package/src/models/operations/updatedataset.ts +2 -2
  181. package/src/models/operations/updatedatasource.ts +2 -2
  182. package/packages/orq-rc/src/models/operations/searchknowledge.ts +0 -1673
@@ -0,0 +1,1350 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { ClosedEnum } from "../../types/enums.js";
9
+ import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ export type RetrieveToolRequest = {
13
+ toolKey: string;
14
+ };
15
+
16
+ /**
17
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
18
+ */
19
+ export const RetrieveToolResponseBodyToolsResponseStatus = {
20
+ Live: "live",
21
+ Draft: "draft",
22
+ Pending: "pending",
23
+ Published: "published",
24
+ } as const;
25
+ /**
26
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
27
+ */
28
+ export type RetrieveToolResponseBodyToolsResponseStatus = ClosedEnum<
29
+ typeof RetrieveToolResponseBodyToolsResponseStatus
30
+ >;
31
+
32
+ export const RetrieveToolResponseBodyToolsResponseType = {
33
+ OrqHttp: "orq_http",
34
+ } as const;
35
+ export type RetrieveToolResponseBodyToolsResponseType = ClosedEnum<
36
+ typeof RetrieveToolResponseBodyToolsResponseType
37
+ >;
38
+
39
+ /**
40
+ * The HTTP method to use.
41
+ */
42
+ export const RetrieveToolResponseBodyMethod = {
43
+ Get: "GET",
44
+ Post: "POST",
45
+ Put: "PUT",
46
+ Delete: "DELETE",
47
+ } as const;
48
+ /**
49
+ * The HTTP method to use.
50
+ */
51
+ export type RetrieveToolResponseBodyMethod = ClosedEnum<
52
+ typeof RetrieveToolResponseBodyMethod
53
+ >;
54
+
55
+ /**
56
+ * The blueprint for the HTTP request. The `arguments` field will be used to replace the placeholders in the `url`, `headers`, `body`, and `arguments` fields.
57
+ */
58
+ export type RetrieveToolResponseBodyBlueprint = {
59
+ /**
60
+ * The URL to send the request to.
61
+ */
62
+ url: string;
63
+ /**
64
+ * The HTTP method to use.
65
+ */
66
+ method: RetrieveToolResponseBodyMethod;
67
+ /**
68
+ * The headers to send with the request.
69
+ */
70
+ headers?: { [k: string]: string } | undefined;
71
+ /**
72
+ * The body to send with the request.
73
+ */
74
+ body?: { [k: string]: any } | undefined;
75
+ };
76
+
77
+ /**
78
+ * The type of the argument.
79
+ */
80
+ export const RetrieveToolResponseBodyToolsResponse200Type = {
81
+ String: "string",
82
+ Number: "number",
83
+ Boolean: "boolean",
84
+ } as const;
85
+ /**
86
+ * The type of the argument.
87
+ */
88
+ export type RetrieveToolResponseBodyToolsResponse200Type = ClosedEnum<
89
+ typeof RetrieveToolResponseBodyToolsResponse200Type
90
+ >;
91
+
92
+ /**
93
+ * The default value of the argument.
94
+ */
95
+ export type RetrieveToolResponseBodyDefaultValue = string | number | boolean;
96
+
97
+ export type RetrieveToolResponseBodyArguments = {
98
+ /**
99
+ * The type of the argument.
100
+ */
101
+ type: RetrieveToolResponseBodyToolsResponse200Type;
102
+ /**
103
+ * A description of the argument.
104
+ */
105
+ description: string;
106
+ /**
107
+ * 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.
108
+ */
109
+ sendToModel?: boolean | undefined;
110
+ /**
111
+ * The default value of the argument.
112
+ */
113
+ defaultValue?: string | number | boolean | undefined;
114
+ };
115
+
116
+ export type RetrieveToolResponseBodyHttp = {
117
+ /**
118
+ * The blueprint for the HTTP request. The `arguments` field will be used to replace the placeholders in the `url`, `headers`, `body`, and `arguments` fields.
119
+ */
120
+ blueprint: RetrieveToolResponseBodyBlueprint;
121
+ /**
122
+ * The arguments to send with the request. The keys will be used to replace the placeholders in the `blueprint` field.
123
+ */
124
+ arguments?: { [k: string]: RetrieveToolResponseBodyArguments } | undefined;
125
+ };
126
+
127
+ export type RetrieveToolResponseBody3 = {
128
+ id?: string | undefined;
129
+ /**
130
+ * The path where the entity is stored in the project structure. The first element of the path always represents the project name. Any subsequent path element after the project will be created as a folder in the project if it does not exists.
131
+ */
132
+ path: string;
133
+ /**
134
+ * Unique key of the tool as it will be displayed in the UI
135
+ */
136
+ key: string;
137
+ /**
138
+ * 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.
139
+ */
140
+ description: string;
141
+ /**
142
+ * The id of the user that created the tool
143
+ */
144
+ createdById?: string | undefined;
145
+ /**
146
+ * The id of the user that last updated the tool
147
+ */
148
+ updatedById?: string | undefined;
149
+ projectId: string;
150
+ workspaceId: string;
151
+ created: string;
152
+ updated: string;
153
+ /**
154
+ * 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.
155
+ */
156
+ status: RetrieveToolResponseBodyToolsResponseStatus;
157
+ versionHash: string;
158
+ type: RetrieveToolResponseBodyToolsResponseType;
159
+ http: RetrieveToolResponseBodyHttp;
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 RetrieveToolResponseBodyToolsStatus = {
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 RetrieveToolResponseBodyToolsStatus = ClosedEnum<
175
+ typeof RetrieveToolResponseBodyToolsStatus
176
+ >;
177
+
178
+ export const RetrieveToolResponseBodyToolsType = {
179
+ JsonSchema: "json_schema",
180
+ } as const;
181
+ export type RetrieveToolResponseBodyToolsType = ClosedEnum<
182
+ typeof RetrieveToolResponseBodyToolsType
183
+ >;
184
+
185
+ export type RetrieveToolResponseBodyJsonSchema = {
186
+ /**
187
+ * 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.
188
+ */
189
+ name: string;
190
+ /**
191
+ * A description of what the response format is for. This will be shown to the user.
192
+ */
193
+ description?: string | undefined;
194
+ /**
195
+ * 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.
196
+ */
197
+ schema: { [k: string]: any };
198
+ /**
199
+ * 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.
200
+ */
201
+ strict?: boolean | null | undefined;
202
+ };
203
+
204
+ export type RetrieveToolResponseBody2 = {
205
+ id?: string | undefined;
206
+ /**
207
+ * The path where the entity is stored in the project structure. The first element of the path always represents the project name. Any subsequent path element after the project will be created as a folder in the project if it does not exists.
208
+ */
209
+ path: string;
210
+ /**
211
+ * Unique key of the tool as it will be displayed in the UI
212
+ */
213
+ key: string;
214
+ /**
215
+ * 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.
216
+ */
217
+ description: string;
218
+ /**
219
+ * The id of the user that created the tool
220
+ */
221
+ createdById?: string | undefined;
222
+ /**
223
+ * The id of the user that last updated the tool
224
+ */
225
+ updatedById?: string | undefined;
226
+ projectId: string;
227
+ workspaceId: string;
228
+ created: string;
229
+ updated: string;
230
+ /**
231
+ * 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.
232
+ */
233
+ status: RetrieveToolResponseBodyToolsStatus;
234
+ versionHash: string;
235
+ type: RetrieveToolResponseBodyToolsType;
236
+ jsonSchema: RetrieveToolResponseBodyJsonSchema;
237
+ };
238
+
239
+ /**
240
+ * 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.
241
+ */
242
+ export const RetrieveToolResponseBodyStatus = {
243
+ Live: "live",
244
+ Draft: "draft",
245
+ Pending: "pending",
246
+ Published: "published",
247
+ } as const;
248
+ /**
249
+ * 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.
250
+ */
251
+ export type RetrieveToolResponseBodyStatus = ClosedEnum<
252
+ typeof RetrieveToolResponseBodyStatus
253
+ >;
254
+
255
+ export const RetrieveToolResponseBodyType = {
256
+ Function: "function",
257
+ } as const;
258
+ export type RetrieveToolResponseBodyType = ClosedEnum<
259
+ typeof RetrieveToolResponseBodyType
260
+ >;
261
+
262
+ export type RetrieveToolResponseBodyFunction = {
263
+ /**
264
+ * 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.
265
+ */
266
+ name: string;
267
+ /**
268
+ * A description of what the function does, used by the model to choose when and how to call the function.
269
+ */
270
+ description?: string | undefined;
271
+ /**
272
+ * 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.
273
+ */
274
+ strict?: boolean | undefined;
275
+ /**
276
+ * 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.
277
+ */
278
+ parameters?: { [k: string]: any } | undefined;
279
+ };
280
+
281
+ export type RetrieveToolResponseBody1 = {
282
+ id?: string | undefined;
283
+ /**
284
+ * The path where the entity is stored in the project structure. The first element of the path always represents the project name. Any subsequent path element after the project will be created as a folder in the project if it does not exists.
285
+ */
286
+ path: string;
287
+ /**
288
+ * Unique key of the tool as it will be displayed in the UI
289
+ */
290
+ key: string;
291
+ /**
292
+ * 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.
293
+ */
294
+ description: string;
295
+ /**
296
+ * The id of the user that created the tool
297
+ */
298
+ createdById?: string | undefined;
299
+ /**
300
+ * The id of the user that last updated the tool
301
+ */
302
+ updatedById?: string | undefined;
303
+ projectId: string;
304
+ workspaceId: string;
305
+ created: string;
306
+ updated: string;
307
+ /**
308
+ * 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.
309
+ */
310
+ status: RetrieveToolResponseBodyStatus;
311
+ versionHash: string;
312
+ type: RetrieveToolResponseBodyType;
313
+ function: RetrieveToolResponseBodyFunction;
314
+ };
315
+
316
+ /**
317
+ * Successfully retrieved the tool.
318
+ */
319
+ export type RetrieveToolResponseBody =
320
+ | RetrieveToolResponseBody1
321
+ | RetrieveToolResponseBody2
322
+ | RetrieveToolResponseBody3;
323
+
324
+ /** @internal */
325
+ export const RetrieveToolRequest$inboundSchema: z.ZodType<
326
+ RetrieveToolRequest,
327
+ z.ZodTypeDef,
328
+ unknown
329
+ > = z.object({
330
+ tool_key: z.string(),
331
+ }).transform((v) => {
332
+ return remap$(v, {
333
+ "tool_key": "toolKey",
334
+ });
335
+ });
336
+
337
+ /** @internal */
338
+ export type RetrieveToolRequest$Outbound = {
339
+ tool_key: string;
340
+ };
341
+
342
+ /** @internal */
343
+ export const RetrieveToolRequest$outboundSchema: z.ZodType<
344
+ RetrieveToolRequest$Outbound,
345
+ z.ZodTypeDef,
346
+ RetrieveToolRequest
347
+ > = z.object({
348
+ toolKey: z.string(),
349
+ }).transform((v) => {
350
+ return remap$(v, {
351
+ toolKey: "tool_key",
352
+ });
353
+ });
354
+
355
+ /**
356
+ * @internal
357
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
358
+ */
359
+ export namespace RetrieveToolRequest$ {
360
+ /** @deprecated use `RetrieveToolRequest$inboundSchema` instead. */
361
+ export const inboundSchema = RetrieveToolRequest$inboundSchema;
362
+ /** @deprecated use `RetrieveToolRequest$outboundSchema` instead. */
363
+ export const outboundSchema = RetrieveToolRequest$outboundSchema;
364
+ /** @deprecated use `RetrieveToolRequest$Outbound` instead. */
365
+ export type Outbound = RetrieveToolRequest$Outbound;
366
+ }
367
+
368
+ export function retrieveToolRequestToJSON(
369
+ retrieveToolRequest: RetrieveToolRequest,
370
+ ): string {
371
+ return JSON.stringify(
372
+ RetrieveToolRequest$outboundSchema.parse(retrieveToolRequest),
373
+ );
374
+ }
375
+
376
+ export function retrieveToolRequestFromJSON(
377
+ jsonString: string,
378
+ ): SafeParseResult<RetrieveToolRequest, SDKValidationError> {
379
+ return safeParse(
380
+ jsonString,
381
+ (x) => RetrieveToolRequest$inboundSchema.parse(JSON.parse(x)),
382
+ `Failed to parse 'RetrieveToolRequest' from JSON`,
383
+ );
384
+ }
385
+
386
+ /** @internal */
387
+ export const RetrieveToolResponseBodyToolsResponseStatus$inboundSchema:
388
+ z.ZodNativeEnum<typeof RetrieveToolResponseBodyToolsResponseStatus> = z
389
+ .nativeEnum(RetrieveToolResponseBodyToolsResponseStatus);
390
+
391
+ /** @internal */
392
+ export const RetrieveToolResponseBodyToolsResponseStatus$outboundSchema:
393
+ z.ZodNativeEnum<typeof RetrieveToolResponseBodyToolsResponseStatus> =
394
+ RetrieveToolResponseBodyToolsResponseStatus$inboundSchema;
395
+
396
+ /**
397
+ * @internal
398
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
399
+ */
400
+ export namespace RetrieveToolResponseBodyToolsResponseStatus$ {
401
+ /** @deprecated use `RetrieveToolResponseBodyToolsResponseStatus$inboundSchema` instead. */
402
+ export const inboundSchema =
403
+ RetrieveToolResponseBodyToolsResponseStatus$inboundSchema;
404
+ /** @deprecated use `RetrieveToolResponseBodyToolsResponseStatus$outboundSchema` instead. */
405
+ export const outboundSchema =
406
+ RetrieveToolResponseBodyToolsResponseStatus$outboundSchema;
407
+ }
408
+
409
+ /** @internal */
410
+ export const RetrieveToolResponseBodyToolsResponseType$inboundSchema:
411
+ z.ZodNativeEnum<typeof RetrieveToolResponseBodyToolsResponseType> = z
412
+ .nativeEnum(RetrieveToolResponseBodyToolsResponseType);
413
+
414
+ /** @internal */
415
+ export const RetrieveToolResponseBodyToolsResponseType$outboundSchema:
416
+ z.ZodNativeEnum<typeof RetrieveToolResponseBodyToolsResponseType> =
417
+ RetrieveToolResponseBodyToolsResponseType$inboundSchema;
418
+
419
+ /**
420
+ * @internal
421
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
422
+ */
423
+ export namespace RetrieveToolResponseBodyToolsResponseType$ {
424
+ /** @deprecated use `RetrieveToolResponseBodyToolsResponseType$inboundSchema` instead. */
425
+ export const inboundSchema =
426
+ RetrieveToolResponseBodyToolsResponseType$inboundSchema;
427
+ /** @deprecated use `RetrieveToolResponseBodyToolsResponseType$outboundSchema` instead. */
428
+ export const outboundSchema =
429
+ RetrieveToolResponseBodyToolsResponseType$outboundSchema;
430
+ }
431
+
432
+ /** @internal */
433
+ export const RetrieveToolResponseBodyMethod$inboundSchema: z.ZodNativeEnum<
434
+ typeof RetrieveToolResponseBodyMethod
435
+ > = z.nativeEnum(RetrieveToolResponseBodyMethod);
436
+
437
+ /** @internal */
438
+ export const RetrieveToolResponseBodyMethod$outboundSchema: z.ZodNativeEnum<
439
+ typeof RetrieveToolResponseBodyMethod
440
+ > = RetrieveToolResponseBodyMethod$inboundSchema;
441
+
442
+ /**
443
+ * @internal
444
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
445
+ */
446
+ export namespace RetrieveToolResponseBodyMethod$ {
447
+ /** @deprecated use `RetrieveToolResponseBodyMethod$inboundSchema` instead. */
448
+ export const inboundSchema = RetrieveToolResponseBodyMethod$inboundSchema;
449
+ /** @deprecated use `RetrieveToolResponseBodyMethod$outboundSchema` instead. */
450
+ export const outboundSchema = RetrieveToolResponseBodyMethod$outboundSchema;
451
+ }
452
+
453
+ /** @internal */
454
+ export const RetrieveToolResponseBodyBlueprint$inboundSchema: z.ZodType<
455
+ RetrieveToolResponseBodyBlueprint,
456
+ z.ZodTypeDef,
457
+ unknown
458
+ > = z.object({
459
+ url: z.string(),
460
+ method: RetrieveToolResponseBodyMethod$inboundSchema,
461
+ headers: z.record(z.string()).optional(),
462
+ body: z.record(z.any()).optional(),
463
+ });
464
+
465
+ /** @internal */
466
+ export type RetrieveToolResponseBodyBlueprint$Outbound = {
467
+ url: string;
468
+ method: string;
469
+ headers?: { [k: string]: string } | undefined;
470
+ body?: { [k: string]: any } | undefined;
471
+ };
472
+
473
+ /** @internal */
474
+ export const RetrieveToolResponseBodyBlueprint$outboundSchema: z.ZodType<
475
+ RetrieveToolResponseBodyBlueprint$Outbound,
476
+ z.ZodTypeDef,
477
+ RetrieveToolResponseBodyBlueprint
478
+ > = z.object({
479
+ url: z.string(),
480
+ method: RetrieveToolResponseBodyMethod$outboundSchema,
481
+ headers: z.record(z.string()).optional(),
482
+ body: z.record(z.any()).optional(),
483
+ });
484
+
485
+ /**
486
+ * @internal
487
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
488
+ */
489
+ export namespace RetrieveToolResponseBodyBlueprint$ {
490
+ /** @deprecated use `RetrieveToolResponseBodyBlueprint$inboundSchema` instead. */
491
+ export const inboundSchema = RetrieveToolResponseBodyBlueprint$inboundSchema;
492
+ /** @deprecated use `RetrieveToolResponseBodyBlueprint$outboundSchema` instead. */
493
+ export const outboundSchema =
494
+ RetrieveToolResponseBodyBlueprint$outboundSchema;
495
+ /** @deprecated use `RetrieveToolResponseBodyBlueprint$Outbound` instead. */
496
+ export type Outbound = RetrieveToolResponseBodyBlueprint$Outbound;
497
+ }
498
+
499
+ export function retrieveToolResponseBodyBlueprintToJSON(
500
+ retrieveToolResponseBodyBlueprint: RetrieveToolResponseBodyBlueprint,
501
+ ): string {
502
+ return JSON.stringify(
503
+ RetrieveToolResponseBodyBlueprint$outboundSchema.parse(
504
+ retrieveToolResponseBodyBlueprint,
505
+ ),
506
+ );
507
+ }
508
+
509
+ export function retrieveToolResponseBodyBlueprintFromJSON(
510
+ jsonString: string,
511
+ ): SafeParseResult<RetrieveToolResponseBodyBlueprint, SDKValidationError> {
512
+ return safeParse(
513
+ jsonString,
514
+ (x) => RetrieveToolResponseBodyBlueprint$inboundSchema.parse(JSON.parse(x)),
515
+ `Failed to parse 'RetrieveToolResponseBodyBlueprint' from JSON`,
516
+ );
517
+ }
518
+
519
+ /** @internal */
520
+ export const RetrieveToolResponseBodyToolsResponse200Type$inboundSchema:
521
+ z.ZodNativeEnum<typeof RetrieveToolResponseBodyToolsResponse200Type> = z
522
+ .nativeEnum(RetrieveToolResponseBodyToolsResponse200Type);
523
+
524
+ /** @internal */
525
+ export const RetrieveToolResponseBodyToolsResponse200Type$outboundSchema:
526
+ z.ZodNativeEnum<typeof RetrieveToolResponseBodyToolsResponse200Type> =
527
+ RetrieveToolResponseBodyToolsResponse200Type$inboundSchema;
528
+
529
+ /**
530
+ * @internal
531
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
532
+ */
533
+ export namespace RetrieveToolResponseBodyToolsResponse200Type$ {
534
+ /** @deprecated use `RetrieveToolResponseBodyToolsResponse200Type$inboundSchema` instead. */
535
+ export const inboundSchema =
536
+ RetrieveToolResponseBodyToolsResponse200Type$inboundSchema;
537
+ /** @deprecated use `RetrieveToolResponseBodyToolsResponse200Type$outboundSchema` instead. */
538
+ export const outboundSchema =
539
+ RetrieveToolResponseBodyToolsResponse200Type$outboundSchema;
540
+ }
541
+
542
+ /** @internal */
543
+ export const RetrieveToolResponseBodyDefaultValue$inboundSchema: z.ZodType<
544
+ RetrieveToolResponseBodyDefaultValue,
545
+ z.ZodTypeDef,
546
+ unknown
547
+ > = z.union([z.string(), z.number(), z.boolean()]);
548
+
549
+ /** @internal */
550
+ export type RetrieveToolResponseBodyDefaultValue$Outbound =
551
+ | string
552
+ | number
553
+ | boolean;
554
+
555
+ /** @internal */
556
+ export const RetrieveToolResponseBodyDefaultValue$outboundSchema: z.ZodType<
557
+ RetrieveToolResponseBodyDefaultValue$Outbound,
558
+ z.ZodTypeDef,
559
+ RetrieveToolResponseBodyDefaultValue
560
+ > = z.union([z.string(), z.number(), z.boolean()]);
561
+
562
+ /**
563
+ * @internal
564
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
565
+ */
566
+ export namespace RetrieveToolResponseBodyDefaultValue$ {
567
+ /** @deprecated use `RetrieveToolResponseBodyDefaultValue$inboundSchema` instead. */
568
+ export const inboundSchema =
569
+ RetrieveToolResponseBodyDefaultValue$inboundSchema;
570
+ /** @deprecated use `RetrieveToolResponseBodyDefaultValue$outboundSchema` instead. */
571
+ export const outboundSchema =
572
+ RetrieveToolResponseBodyDefaultValue$outboundSchema;
573
+ /** @deprecated use `RetrieveToolResponseBodyDefaultValue$Outbound` instead. */
574
+ export type Outbound = RetrieveToolResponseBodyDefaultValue$Outbound;
575
+ }
576
+
577
+ export function retrieveToolResponseBodyDefaultValueToJSON(
578
+ retrieveToolResponseBodyDefaultValue: RetrieveToolResponseBodyDefaultValue,
579
+ ): string {
580
+ return JSON.stringify(
581
+ RetrieveToolResponseBodyDefaultValue$outboundSchema.parse(
582
+ retrieveToolResponseBodyDefaultValue,
583
+ ),
584
+ );
585
+ }
586
+
587
+ export function retrieveToolResponseBodyDefaultValueFromJSON(
588
+ jsonString: string,
589
+ ): SafeParseResult<RetrieveToolResponseBodyDefaultValue, SDKValidationError> {
590
+ return safeParse(
591
+ jsonString,
592
+ (x) =>
593
+ RetrieveToolResponseBodyDefaultValue$inboundSchema.parse(JSON.parse(x)),
594
+ `Failed to parse 'RetrieveToolResponseBodyDefaultValue' from JSON`,
595
+ );
596
+ }
597
+
598
+ /** @internal */
599
+ export const RetrieveToolResponseBodyArguments$inboundSchema: z.ZodType<
600
+ RetrieveToolResponseBodyArguments,
601
+ z.ZodTypeDef,
602
+ unknown
603
+ > = z.object({
604
+ type: RetrieveToolResponseBodyToolsResponse200Type$inboundSchema,
605
+ description: z.string(),
606
+ send_to_model: z.boolean().default(true),
607
+ default_value: z.union([z.string(), z.number(), z.boolean()]).optional(),
608
+ }).transform((v) => {
609
+ return remap$(v, {
610
+ "send_to_model": "sendToModel",
611
+ "default_value": "defaultValue",
612
+ });
613
+ });
614
+
615
+ /** @internal */
616
+ export type RetrieveToolResponseBodyArguments$Outbound = {
617
+ type: string;
618
+ description: string;
619
+ send_to_model: boolean;
620
+ default_value?: string | number | boolean | undefined;
621
+ };
622
+
623
+ /** @internal */
624
+ export const RetrieveToolResponseBodyArguments$outboundSchema: z.ZodType<
625
+ RetrieveToolResponseBodyArguments$Outbound,
626
+ z.ZodTypeDef,
627
+ RetrieveToolResponseBodyArguments
628
+ > = z.object({
629
+ type: RetrieveToolResponseBodyToolsResponse200Type$outboundSchema,
630
+ description: z.string(),
631
+ sendToModel: z.boolean().default(true),
632
+ defaultValue: z.union([z.string(), z.number(), z.boolean()]).optional(),
633
+ }).transform((v) => {
634
+ return remap$(v, {
635
+ sendToModel: "send_to_model",
636
+ defaultValue: "default_value",
637
+ });
638
+ });
639
+
640
+ /**
641
+ * @internal
642
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
643
+ */
644
+ export namespace RetrieveToolResponseBodyArguments$ {
645
+ /** @deprecated use `RetrieveToolResponseBodyArguments$inboundSchema` instead. */
646
+ export const inboundSchema = RetrieveToolResponseBodyArguments$inboundSchema;
647
+ /** @deprecated use `RetrieveToolResponseBodyArguments$outboundSchema` instead. */
648
+ export const outboundSchema =
649
+ RetrieveToolResponseBodyArguments$outboundSchema;
650
+ /** @deprecated use `RetrieveToolResponseBodyArguments$Outbound` instead. */
651
+ export type Outbound = RetrieveToolResponseBodyArguments$Outbound;
652
+ }
653
+
654
+ export function retrieveToolResponseBodyArgumentsToJSON(
655
+ retrieveToolResponseBodyArguments: RetrieveToolResponseBodyArguments,
656
+ ): string {
657
+ return JSON.stringify(
658
+ RetrieveToolResponseBodyArguments$outboundSchema.parse(
659
+ retrieveToolResponseBodyArguments,
660
+ ),
661
+ );
662
+ }
663
+
664
+ export function retrieveToolResponseBodyArgumentsFromJSON(
665
+ jsonString: string,
666
+ ): SafeParseResult<RetrieveToolResponseBodyArguments, SDKValidationError> {
667
+ return safeParse(
668
+ jsonString,
669
+ (x) => RetrieveToolResponseBodyArguments$inboundSchema.parse(JSON.parse(x)),
670
+ `Failed to parse 'RetrieveToolResponseBodyArguments' from JSON`,
671
+ );
672
+ }
673
+
674
+ /** @internal */
675
+ export const RetrieveToolResponseBodyHttp$inboundSchema: z.ZodType<
676
+ RetrieveToolResponseBodyHttp,
677
+ z.ZodTypeDef,
678
+ unknown
679
+ > = z.object({
680
+ blueprint: z.lazy(() => RetrieveToolResponseBodyBlueprint$inboundSchema),
681
+ arguments: z.record(
682
+ z.lazy(() => RetrieveToolResponseBodyArguments$inboundSchema),
683
+ ).optional(),
684
+ });
685
+
686
+ /** @internal */
687
+ export type RetrieveToolResponseBodyHttp$Outbound = {
688
+ blueprint: RetrieveToolResponseBodyBlueprint$Outbound;
689
+ arguments?:
690
+ | { [k: string]: RetrieveToolResponseBodyArguments$Outbound }
691
+ | undefined;
692
+ };
693
+
694
+ /** @internal */
695
+ export const RetrieveToolResponseBodyHttp$outboundSchema: z.ZodType<
696
+ RetrieveToolResponseBodyHttp$Outbound,
697
+ z.ZodTypeDef,
698
+ RetrieveToolResponseBodyHttp
699
+ > = z.object({
700
+ blueprint: z.lazy(() => RetrieveToolResponseBodyBlueprint$outboundSchema),
701
+ arguments: z.record(
702
+ z.lazy(() => RetrieveToolResponseBodyArguments$outboundSchema),
703
+ ).optional(),
704
+ });
705
+
706
+ /**
707
+ * @internal
708
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
709
+ */
710
+ export namespace RetrieveToolResponseBodyHttp$ {
711
+ /** @deprecated use `RetrieveToolResponseBodyHttp$inboundSchema` instead. */
712
+ export const inboundSchema = RetrieveToolResponseBodyHttp$inboundSchema;
713
+ /** @deprecated use `RetrieveToolResponseBodyHttp$outboundSchema` instead. */
714
+ export const outboundSchema = RetrieveToolResponseBodyHttp$outboundSchema;
715
+ /** @deprecated use `RetrieveToolResponseBodyHttp$Outbound` instead. */
716
+ export type Outbound = RetrieveToolResponseBodyHttp$Outbound;
717
+ }
718
+
719
+ export function retrieveToolResponseBodyHttpToJSON(
720
+ retrieveToolResponseBodyHttp: RetrieveToolResponseBodyHttp,
721
+ ): string {
722
+ return JSON.stringify(
723
+ RetrieveToolResponseBodyHttp$outboundSchema.parse(
724
+ retrieveToolResponseBodyHttp,
725
+ ),
726
+ );
727
+ }
728
+
729
+ export function retrieveToolResponseBodyHttpFromJSON(
730
+ jsonString: string,
731
+ ): SafeParseResult<RetrieveToolResponseBodyHttp, SDKValidationError> {
732
+ return safeParse(
733
+ jsonString,
734
+ (x) => RetrieveToolResponseBodyHttp$inboundSchema.parse(JSON.parse(x)),
735
+ `Failed to parse 'RetrieveToolResponseBodyHttp' from JSON`,
736
+ );
737
+ }
738
+
739
+ /** @internal */
740
+ export const RetrieveToolResponseBody3$inboundSchema: z.ZodType<
741
+ RetrieveToolResponseBody3,
742
+ z.ZodTypeDef,
743
+ unknown
744
+ > = z.object({
745
+ _id: z.string().default("tool_01JRT05N2YYP9QADAN4TZP76MR"),
746
+ path: z.string(),
747
+ key: z.string(),
748
+ description: z.string(),
749
+ created_by_id: z.string().optional(),
750
+ updated_by_id: z.string().optional(),
751
+ project_id: z.string(),
752
+ workspace_id: z.string(),
753
+ created: z.string(),
754
+ updated: z.string(),
755
+ status: RetrieveToolResponseBodyToolsResponseStatus$inboundSchema,
756
+ version_hash: z.string(),
757
+ type: RetrieveToolResponseBodyToolsResponseType$inboundSchema,
758
+ http: z.lazy(() => RetrieveToolResponseBodyHttp$inboundSchema),
759
+ }).transform((v) => {
760
+ return remap$(v, {
761
+ "_id": "id",
762
+ "created_by_id": "createdById",
763
+ "updated_by_id": "updatedById",
764
+ "project_id": "projectId",
765
+ "workspace_id": "workspaceId",
766
+ "version_hash": "versionHash",
767
+ });
768
+ });
769
+
770
+ /** @internal */
771
+ export type RetrieveToolResponseBody3$Outbound = {
772
+ _id: string;
773
+ path: string;
774
+ key: string;
775
+ description: string;
776
+ created_by_id?: string | undefined;
777
+ updated_by_id?: string | undefined;
778
+ project_id: string;
779
+ workspace_id: string;
780
+ created: string;
781
+ updated: string;
782
+ status: string;
783
+ version_hash: string;
784
+ type: string;
785
+ http: RetrieveToolResponseBodyHttp$Outbound;
786
+ };
787
+
788
+ /** @internal */
789
+ export const RetrieveToolResponseBody3$outboundSchema: z.ZodType<
790
+ RetrieveToolResponseBody3$Outbound,
791
+ z.ZodTypeDef,
792
+ RetrieveToolResponseBody3
793
+ > = z.object({
794
+ id: z.string().default("tool_01JRT05N2YYP9QADAN4TZP76MR"),
795
+ path: z.string(),
796
+ key: z.string(),
797
+ description: z.string(),
798
+ createdById: z.string().optional(),
799
+ updatedById: z.string().optional(),
800
+ projectId: z.string(),
801
+ workspaceId: z.string(),
802
+ created: z.string(),
803
+ updated: z.string(),
804
+ status: RetrieveToolResponseBodyToolsResponseStatus$outboundSchema,
805
+ versionHash: z.string(),
806
+ type: RetrieveToolResponseBodyToolsResponseType$outboundSchema,
807
+ http: z.lazy(() => RetrieveToolResponseBodyHttp$outboundSchema),
808
+ }).transform((v) => {
809
+ return remap$(v, {
810
+ id: "_id",
811
+ createdById: "created_by_id",
812
+ updatedById: "updated_by_id",
813
+ projectId: "project_id",
814
+ workspaceId: "workspace_id",
815
+ versionHash: "version_hash",
816
+ });
817
+ });
818
+
819
+ /**
820
+ * @internal
821
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
822
+ */
823
+ export namespace RetrieveToolResponseBody3$ {
824
+ /** @deprecated use `RetrieveToolResponseBody3$inboundSchema` instead. */
825
+ export const inboundSchema = RetrieveToolResponseBody3$inboundSchema;
826
+ /** @deprecated use `RetrieveToolResponseBody3$outboundSchema` instead. */
827
+ export const outboundSchema = RetrieveToolResponseBody3$outboundSchema;
828
+ /** @deprecated use `RetrieveToolResponseBody3$Outbound` instead. */
829
+ export type Outbound = RetrieveToolResponseBody3$Outbound;
830
+ }
831
+
832
+ export function retrieveToolResponseBody3ToJSON(
833
+ retrieveToolResponseBody3: RetrieveToolResponseBody3,
834
+ ): string {
835
+ return JSON.stringify(
836
+ RetrieveToolResponseBody3$outboundSchema.parse(retrieveToolResponseBody3),
837
+ );
838
+ }
839
+
840
+ export function retrieveToolResponseBody3FromJSON(
841
+ jsonString: string,
842
+ ): SafeParseResult<RetrieveToolResponseBody3, SDKValidationError> {
843
+ return safeParse(
844
+ jsonString,
845
+ (x) => RetrieveToolResponseBody3$inboundSchema.parse(JSON.parse(x)),
846
+ `Failed to parse 'RetrieveToolResponseBody3' from JSON`,
847
+ );
848
+ }
849
+
850
+ /** @internal */
851
+ export const RetrieveToolResponseBodyToolsStatus$inboundSchema: z.ZodNativeEnum<
852
+ typeof RetrieveToolResponseBodyToolsStatus
853
+ > = z.nativeEnum(RetrieveToolResponseBodyToolsStatus);
854
+
855
+ /** @internal */
856
+ export const RetrieveToolResponseBodyToolsStatus$outboundSchema:
857
+ z.ZodNativeEnum<typeof RetrieveToolResponseBodyToolsStatus> =
858
+ RetrieveToolResponseBodyToolsStatus$inboundSchema;
859
+
860
+ /**
861
+ * @internal
862
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
863
+ */
864
+ export namespace RetrieveToolResponseBodyToolsStatus$ {
865
+ /** @deprecated use `RetrieveToolResponseBodyToolsStatus$inboundSchema` instead. */
866
+ export const inboundSchema =
867
+ RetrieveToolResponseBodyToolsStatus$inboundSchema;
868
+ /** @deprecated use `RetrieveToolResponseBodyToolsStatus$outboundSchema` instead. */
869
+ export const outboundSchema =
870
+ RetrieveToolResponseBodyToolsStatus$outboundSchema;
871
+ }
872
+
873
+ /** @internal */
874
+ export const RetrieveToolResponseBodyToolsType$inboundSchema: z.ZodNativeEnum<
875
+ typeof RetrieveToolResponseBodyToolsType
876
+ > = z.nativeEnum(RetrieveToolResponseBodyToolsType);
877
+
878
+ /** @internal */
879
+ export const RetrieveToolResponseBodyToolsType$outboundSchema: z.ZodNativeEnum<
880
+ typeof RetrieveToolResponseBodyToolsType
881
+ > = RetrieveToolResponseBodyToolsType$inboundSchema;
882
+
883
+ /**
884
+ * @internal
885
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
886
+ */
887
+ export namespace RetrieveToolResponseBodyToolsType$ {
888
+ /** @deprecated use `RetrieveToolResponseBodyToolsType$inboundSchema` instead. */
889
+ export const inboundSchema = RetrieveToolResponseBodyToolsType$inboundSchema;
890
+ /** @deprecated use `RetrieveToolResponseBodyToolsType$outboundSchema` instead. */
891
+ export const outboundSchema =
892
+ RetrieveToolResponseBodyToolsType$outboundSchema;
893
+ }
894
+
895
+ /** @internal */
896
+ export const RetrieveToolResponseBodyJsonSchema$inboundSchema: z.ZodType<
897
+ RetrieveToolResponseBodyJsonSchema,
898
+ z.ZodTypeDef,
899
+ unknown
900
+ > = z.object({
901
+ name: z.string(),
902
+ description: z.string().optional(),
903
+ schema: z.record(z.any()),
904
+ strict: z.nullable(z.boolean().default(false)),
905
+ });
906
+
907
+ /** @internal */
908
+ export type RetrieveToolResponseBodyJsonSchema$Outbound = {
909
+ name: string;
910
+ description?: string | undefined;
911
+ schema: { [k: string]: any };
912
+ strict: boolean | null;
913
+ };
914
+
915
+ /** @internal */
916
+ export const RetrieveToolResponseBodyJsonSchema$outboundSchema: z.ZodType<
917
+ RetrieveToolResponseBodyJsonSchema$Outbound,
918
+ z.ZodTypeDef,
919
+ RetrieveToolResponseBodyJsonSchema
920
+ > = z.object({
921
+ name: z.string(),
922
+ description: z.string().optional(),
923
+ schema: z.record(z.any()),
924
+ strict: z.nullable(z.boolean().default(false)),
925
+ });
926
+
927
+ /**
928
+ * @internal
929
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
930
+ */
931
+ export namespace RetrieveToolResponseBodyJsonSchema$ {
932
+ /** @deprecated use `RetrieveToolResponseBodyJsonSchema$inboundSchema` instead. */
933
+ export const inboundSchema = RetrieveToolResponseBodyJsonSchema$inboundSchema;
934
+ /** @deprecated use `RetrieveToolResponseBodyJsonSchema$outboundSchema` instead. */
935
+ export const outboundSchema =
936
+ RetrieveToolResponseBodyJsonSchema$outboundSchema;
937
+ /** @deprecated use `RetrieveToolResponseBodyJsonSchema$Outbound` instead. */
938
+ export type Outbound = RetrieveToolResponseBodyJsonSchema$Outbound;
939
+ }
940
+
941
+ export function retrieveToolResponseBodyJsonSchemaToJSON(
942
+ retrieveToolResponseBodyJsonSchema: RetrieveToolResponseBodyJsonSchema,
943
+ ): string {
944
+ return JSON.stringify(
945
+ RetrieveToolResponseBodyJsonSchema$outboundSchema.parse(
946
+ retrieveToolResponseBodyJsonSchema,
947
+ ),
948
+ );
949
+ }
950
+
951
+ export function retrieveToolResponseBodyJsonSchemaFromJSON(
952
+ jsonString: string,
953
+ ): SafeParseResult<RetrieveToolResponseBodyJsonSchema, SDKValidationError> {
954
+ return safeParse(
955
+ jsonString,
956
+ (x) =>
957
+ RetrieveToolResponseBodyJsonSchema$inboundSchema.parse(JSON.parse(x)),
958
+ `Failed to parse 'RetrieveToolResponseBodyJsonSchema' from JSON`,
959
+ );
960
+ }
961
+
962
+ /** @internal */
963
+ export const RetrieveToolResponseBody2$inboundSchema: z.ZodType<
964
+ RetrieveToolResponseBody2,
965
+ z.ZodTypeDef,
966
+ unknown
967
+ > = z.object({
968
+ _id: z.string().default("tool_01JRT05N2X2AFR1FVW88FABF82"),
969
+ path: z.string(),
970
+ key: z.string(),
971
+ description: z.string(),
972
+ created_by_id: z.string().optional(),
973
+ updated_by_id: z.string().optional(),
974
+ project_id: z.string(),
975
+ workspace_id: z.string(),
976
+ created: z.string(),
977
+ updated: z.string(),
978
+ status: RetrieveToolResponseBodyToolsStatus$inboundSchema,
979
+ version_hash: z.string(),
980
+ type: RetrieveToolResponseBodyToolsType$inboundSchema,
981
+ json_schema: z.lazy(() => RetrieveToolResponseBodyJsonSchema$inboundSchema),
982
+ }).transform((v) => {
983
+ return remap$(v, {
984
+ "_id": "id",
985
+ "created_by_id": "createdById",
986
+ "updated_by_id": "updatedById",
987
+ "project_id": "projectId",
988
+ "workspace_id": "workspaceId",
989
+ "version_hash": "versionHash",
990
+ "json_schema": "jsonSchema",
991
+ });
992
+ });
993
+
994
+ /** @internal */
995
+ export type RetrieveToolResponseBody2$Outbound = {
996
+ _id: string;
997
+ path: string;
998
+ key: string;
999
+ description: string;
1000
+ created_by_id?: string | undefined;
1001
+ updated_by_id?: string | undefined;
1002
+ project_id: string;
1003
+ workspace_id: string;
1004
+ created: string;
1005
+ updated: string;
1006
+ status: string;
1007
+ version_hash: string;
1008
+ type: string;
1009
+ json_schema: RetrieveToolResponseBodyJsonSchema$Outbound;
1010
+ };
1011
+
1012
+ /** @internal */
1013
+ export const RetrieveToolResponseBody2$outboundSchema: z.ZodType<
1014
+ RetrieveToolResponseBody2$Outbound,
1015
+ z.ZodTypeDef,
1016
+ RetrieveToolResponseBody2
1017
+ > = z.object({
1018
+ id: z.string().default("tool_01JRT05N2X2AFR1FVW88FABF82"),
1019
+ path: z.string(),
1020
+ key: z.string(),
1021
+ description: z.string(),
1022
+ createdById: z.string().optional(),
1023
+ updatedById: z.string().optional(),
1024
+ projectId: z.string(),
1025
+ workspaceId: z.string(),
1026
+ created: z.string(),
1027
+ updated: z.string(),
1028
+ status: RetrieveToolResponseBodyToolsStatus$outboundSchema,
1029
+ versionHash: z.string(),
1030
+ type: RetrieveToolResponseBodyToolsType$outboundSchema,
1031
+ jsonSchema: z.lazy(() => RetrieveToolResponseBodyJsonSchema$outboundSchema),
1032
+ }).transform((v) => {
1033
+ return remap$(v, {
1034
+ id: "_id",
1035
+ createdById: "created_by_id",
1036
+ updatedById: "updated_by_id",
1037
+ projectId: "project_id",
1038
+ workspaceId: "workspace_id",
1039
+ versionHash: "version_hash",
1040
+ jsonSchema: "json_schema",
1041
+ });
1042
+ });
1043
+
1044
+ /**
1045
+ * @internal
1046
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1047
+ */
1048
+ export namespace RetrieveToolResponseBody2$ {
1049
+ /** @deprecated use `RetrieveToolResponseBody2$inboundSchema` instead. */
1050
+ export const inboundSchema = RetrieveToolResponseBody2$inboundSchema;
1051
+ /** @deprecated use `RetrieveToolResponseBody2$outboundSchema` instead. */
1052
+ export const outboundSchema = RetrieveToolResponseBody2$outboundSchema;
1053
+ /** @deprecated use `RetrieveToolResponseBody2$Outbound` instead. */
1054
+ export type Outbound = RetrieveToolResponseBody2$Outbound;
1055
+ }
1056
+
1057
+ export function retrieveToolResponseBody2ToJSON(
1058
+ retrieveToolResponseBody2: RetrieveToolResponseBody2,
1059
+ ): string {
1060
+ return JSON.stringify(
1061
+ RetrieveToolResponseBody2$outboundSchema.parse(retrieveToolResponseBody2),
1062
+ );
1063
+ }
1064
+
1065
+ export function retrieveToolResponseBody2FromJSON(
1066
+ jsonString: string,
1067
+ ): SafeParseResult<RetrieveToolResponseBody2, SDKValidationError> {
1068
+ return safeParse(
1069
+ jsonString,
1070
+ (x) => RetrieveToolResponseBody2$inboundSchema.parse(JSON.parse(x)),
1071
+ `Failed to parse 'RetrieveToolResponseBody2' from JSON`,
1072
+ );
1073
+ }
1074
+
1075
+ /** @internal */
1076
+ export const RetrieveToolResponseBodyStatus$inboundSchema: z.ZodNativeEnum<
1077
+ typeof RetrieveToolResponseBodyStatus
1078
+ > = z.nativeEnum(RetrieveToolResponseBodyStatus);
1079
+
1080
+ /** @internal */
1081
+ export const RetrieveToolResponseBodyStatus$outboundSchema: z.ZodNativeEnum<
1082
+ typeof RetrieveToolResponseBodyStatus
1083
+ > = RetrieveToolResponseBodyStatus$inboundSchema;
1084
+
1085
+ /**
1086
+ * @internal
1087
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1088
+ */
1089
+ export namespace RetrieveToolResponseBodyStatus$ {
1090
+ /** @deprecated use `RetrieveToolResponseBodyStatus$inboundSchema` instead. */
1091
+ export const inboundSchema = RetrieveToolResponseBodyStatus$inboundSchema;
1092
+ /** @deprecated use `RetrieveToolResponseBodyStatus$outboundSchema` instead. */
1093
+ export const outboundSchema = RetrieveToolResponseBodyStatus$outboundSchema;
1094
+ }
1095
+
1096
+ /** @internal */
1097
+ export const RetrieveToolResponseBodyType$inboundSchema: z.ZodNativeEnum<
1098
+ typeof RetrieveToolResponseBodyType
1099
+ > = z.nativeEnum(RetrieveToolResponseBodyType);
1100
+
1101
+ /** @internal */
1102
+ export const RetrieveToolResponseBodyType$outboundSchema: z.ZodNativeEnum<
1103
+ typeof RetrieveToolResponseBodyType
1104
+ > = RetrieveToolResponseBodyType$inboundSchema;
1105
+
1106
+ /**
1107
+ * @internal
1108
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1109
+ */
1110
+ export namespace RetrieveToolResponseBodyType$ {
1111
+ /** @deprecated use `RetrieveToolResponseBodyType$inboundSchema` instead. */
1112
+ export const inboundSchema = RetrieveToolResponseBodyType$inboundSchema;
1113
+ /** @deprecated use `RetrieveToolResponseBodyType$outboundSchema` instead. */
1114
+ export const outboundSchema = RetrieveToolResponseBodyType$outboundSchema;
1115
+ }
1116
+
1117
+ /** @internal */
1118
+ export const RetrieveToolResponseBodyFunction$inboundSchema: z.ZodType<
1119
+ RetrieveToolResponseBodyFunction,
1120
+ z.ZodTypeDef,
1121
+ unknown
1122
+ > = z.object({
1123
+ name: z.string(),
1124
+ description: z.string().optional(),
1125
+ strict: z.boolean().optional(),
1126
+ parameters: z.record(z.any()).optional(),
1127
+ });
1128
+
1129
+ /** @internal */
1130
+ export type RetrieveToolResponseBodyFunction$Outbound = {
1131
+ name: string;
1132
+ description?: string | undefined;
1133
+ strict?: boolean | undefined;
1134
+ parameters?: { [k: string]: any } | undefined;
1135
+ };
1136
+
1137
+ /** @internal */
1138
+ export const RetrieveToolResponseBodyFunction$outboundSchema: z.ZodType<
1139
+ RetrieveToolResponseBodyFunction$Outbound,
1140
+ z.ZodTypeDef,
1141
+ RetrieveToolResponseBodyFunction
1142
+ > = z.object({
1143
+ name: z.string(),
1144
+ description: z.string().optional(),
1145
+ strict: z.boolean().optional(),
1146
+ parameters: z.record(z.any()).optional(),
1147
+ });
1148
+
1149
+ /**
1150
+ * @internal
1151
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1152
+ */
1153
+ export namespace RetrieveToolResponseBodyFunction$ {
1154
+ /** @deprecated use `RetrieveToolResponseBodyFunction$inboundSchema` instead. */
1155
+ export const inboundSchema = RetrieveToolResponseBodyFunction$inboundSchema;
1156
+ /** @deprecated use `RetrieveToolResponseBodyFunction$outboundSchema` instead. */
1157
+ export const outboundSchema = RetrieveToolResponseBodyFunction$outboundSchema;
1158
+ /** @deprecated use `RetrieveToolResponseBodyFunction$Outbound` instead. */
1159
+ export type Outbound = RetrieveToolResponseBodyFunction$Outbound;
1160
+ }
1161
+
1162
+ export function retrieveToolResponseBodyFunctionToJSON(
1163
+ retrieveToolResponseBodyFunction: RetrieveToolResponseBodyFunction,
1164
+ ): string {
1165
+ return JSON.stringify(
1166
+ RetrieveToolResponseBodyFunction$outboundSchema.parse(
1167
+ retrieveToolResponseBodyFunction,
1168
+ ),
1169
+ );
1170
+ }
1171
+
1172
+ export function retrieveToolResponseBodyFunctionFromJSON(
1173
+ jsonString: string,
1174
+ ): SafeParseResult<RetrieveToolResponseBodyFunction, SDKValidationError> {
1175
+ return safeParse(
1176
+ jsonString,
1177
+ (x) => RetrieveToolResponseBodyFunction$inboundSchema.parse(JSON.parse(x)),
1178
+ `Failed to parse 'RetrieveToolResponseBodyFunction' from JSON`,
1179
+ );
1180
+ }
1181
+
1182
+ /** @internal */
1183
+ export const RetrieveToolResponseBody1$inboundSchema: z.ZodType<
1184
+ RetrieveToolResponseBody1,
1185
+ z.ZodTypeDef,
1186
+ unknown
1187
+ > = z.object({
1188
+ _id: z.string().default("tool_01JRT05N2XY0HMDBY7JEMAPXRA"),
1189
+ path: z.string(),
1190
+ key: z.string(),
1191
+ description: z.string(),
1192
+ created_by_id: z.string().optional(),
1193
+ updated_by_id: z.string().optional(),
1194
+ project_id: z.string(),
1195
+ workspace_id: z.string(),
1196
+ created: z.string(),
1197
+ updated: z.string(),
1198
+ status: RetrieveToolResponseBodyStatus$inboundSchema,
1199
+ version_hash: z.string(),
1200
+ type: RetrieveToolResponseBodyType$inboundSchema,
1201
+ function: z.lazy(() => RetrieveToolResponseBodyFunction$inboundSchema),
1202
+ }).transform((v) => {
1203
+ return remap$(v, {
1204
+ "_id": "id",
1205
+ "created_by_id": "createdById",
1206
+ "updated_by_id": "updatedById",
1207
+ "project_id": "projectId",
1208
+ "workspace_id": "workspaceId",
1209
+ "version_hash": "versionHash",
1210
+ });
1211
+ });
1212
+
1213
+ /** @internal */
1214
+ export type RetrieveToolResponseBody1$Outbound = {
1215
+ _id: string;
1216
+ path: string;
1217
+ key: string;
1218
+ description: string;
1219
+ created_by_id?: string | undefined;
1220
+ updated_by_id?: string | undefined;
1221
+ project_id: string;
1222
+ workspace_id: string;
1223
+ created: string;
1224
+ updated: string;
1225
+ status: string;
1226
+ version_hash: string;
1227
+ type: string;
1228
+ function: RetrieveToolResponseBodyFunction$Outbound;
1229
+ };
1230
+
1231
+ /** @internal */
1232
+ export const RetrieveToolResponseBody1$outboundSchema: z.ZodType<
1233
+ RetrieveToolResponseBody1$Outbound,
1234
+ z.ZodTypeDef,
1235
+ RetrieveToolResponseBody1
1236
+ > = z.object({
1237
+ id: z.string().default("tool_01JRT05N2XY0HMDBY7JEMAPXRA"),
1238
+ path: z.string(),
1239
+ key: z.string(),
1240
+ description: z.string(),
1241
+ createdById: z.string().optional(),
1242
+ updatedById: z.string().optional(),
1243
+ projectId: z.string(),
1244
+ workspaceId: z.string(),
1245
+ created: z.string(),
1246
+ updated: z.string(),
1247
+ status: RetrieveToolResponseBodyStatus$outboundSchema,
1248
+ versionHash: z.string(),
1249
+ type: RetrieveToolResponseBodyType$outboundSchema,
1250
+ function: z.lazy(() => RetrieveToolResponseBodyFunction$outboundSchema),
1251
+ }).transform((v) => {
1252
+ return remap$(v, {
1253
+ id: "_id",
1254
+ createdById: "created_by_id",
1255
+ updatedById: "updated_by_id",
1256
+ projectId: "project_id",
1257
+ workspaceId: "workspace_id",
1258
+ versionHash: "version_hash",
1259
+ });
1260
+ });
1261
+
1262
+ /**
1263
+ * @internal
1264
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1265
+ */
1266
+ export namespace RetrieveToolResponseBody1$ {
1267
+ /** @deprecated use `RetrieveToolResponseBody1$inboundSchema` instead. */
1268
+ export const inboundSchema = RetrieveToolResponseBody1$inboundSchema;
1269
+ /** @deprecated use `RetrieveToolResponseBody1$outboundSchema` instead. */
1270
+ export const outboundSchema = RetrieveToolResponseBody1$outboundSchema;
1271
+ /** @deprecated use `RetrieveToolResponseBody1$Outbound` instead. */
1272
+ export type Outbound = RetrieveToolResponseBody1$Outbound;
1273
+ }
1274
+
1275
+ export function retrieveToolResponseBody1ToJSON(
1276
+ retrieveToolResponseBody1: RetrieveToolResponseBody1,
1277
+ ): string {
1278
+ return JSON.stringify(
1279
+ RetrieveToolResponseBody1$outboundSchema.parse(retrieveToolResponseBody1),
1280
+ );
1281
+ }
1282
+
1283
+ export function retrieveToolResponseBody1FromJSON(
1284
+ jsonString: string,
1285
+ ): SafeParseResult<RetrieveToolResponseBody1, SDKValidationError> {
1286
+ return safeParse(
1287
+ jsonString,
1288
+ (x) => RetrieveToolResponseBody1$inboundSchema.parse(JSON.parse(x)),
1289
+ `Failed to parse 'RetrieveToolResponseBody1' from JSON`,
1290
+ );
1291
+ }
1292
+
1293
+ /** @internal */
1294
+ export const RetrieveToolResponseBody$inboundSchema: z.ZodType<
1295
+ RetrieveToolResponseBody,
1296
+ z.ZodTypeDef,
1297
+ unknown
1298
+ > = z.union([
1299
+ z.lazy(() => RetrieveToolResponseBody1$inboundSchema),
1300
+ z.lazy(() => RetrieveToolResponseBody2$inboundSchema),
1301
+ z.lazy(() => RetrieveToolResponseBody3$inboundSchema),
1302
+ ]);
1303
+
1304
+ /** @internal */
1305
+ export type RetrieveToolResponseBody$Outbound =
1306
+ | RetrieveToolResponseBody1$Outbound
1307
+ | RetrieveToolResponseBody2$Outbound
1308
+ | RetrieveToolResponseBody3$Outbound;
1309
+
1310
+ /** @internal */
1311
+ export const RetrieveToolResponseBody$outboundSchema: z.ZodType<
1312
+ RetrieveToolResponseBody$Outbound,
1313
+ z.ZodTypeDef,
1314
+ RetrieveToolResponseBody
1315
+ > = z.union([
1316
+ z.lazy(() => RetrieveToolResponseBody1$outboundSchema),
1317
+ z.lazy(() => RetrieveToolResponseBody2$outboundSchema),
1318
+ z.lazy(() => RetrieveToolResponseBody3$outboundSchema),
1319
+ ]);
1320
+
1321
+ /**
1322
+ * @internal
1323
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1324
+ */
1325
+ export namespace RetrieveToolResponseBody$ {
1326
+ /** @deprecated use `RetrieveToolResponseBody$inboundSchema` instead. */
1327
+ export const inboundSchema = RetrieveToolResponseBody$inboundSchema;
1328
+ /** @deprecated use `RetrieveToolResponseBody$outboundSchema` instead. */
1329
+ export const outboundSchema = RetrieveToolResponseBody$outboundSchema;
1330
+ /** @deprecated use `RetrieveToolResponseBody$Outbound` instead. */
1331
+ export type Outbound = RetrieveToolResponseBody$Outbound;
1332
+ }
1333
+
1334
+ export function retrieveToolResponseBodyToJSON(
1335
+ retrieveToolResponseBody: RetrieveToolResponseBody,
1336
+ ): string {
1337
+ return JSON.stringify(
1338
+ RetrieveToolResponseBody$outboundSchema.parse(retrieveToolResponseBody),
1339
+ );
1340
+ }
1341
+
1342
+ export function retrieveToolResponseBodyFromJSON(
1343
+ jsonString: string,
1344
+ ): SafeParseResult<RetrieveToolResponseBody, SDKValidationError> {
1345
+ return safeParse(
1346
+ jsonString,
1347
+ (x) => RetrieveToolResponseBody$inboundSchema.parse(JSON.parse(x)),
1348
+ `Failed to parse 'RetrieveToolResponseBody' from JSON`,
1349
+ );
1350
+ }