@orq-ai/node 3.12.16 → 3.12.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (159) hide show
  1. package/bin/mcp-server.js +112 -112
  2. package/bin/mcp-server.js.map +30 -30
  3. package/examples/package-lock.json +1 -1
  4. package/jsr.json +1 -1
  5. package/lib/config.d.ts +3 -3
  6. package/lib/config.js +3 -3
  7. package/mcp-server/mcp-server.js +1 -1
  8. package/mcp-server/server.js +1 -1
  9. package/models/operations/createbudget.js +2 -2
  10. package/models/operations/createcontact.js +2 -2
  11. package/models/operations/createdataset.js +2 -2
  12. package/models/operations/createdatasetitem.js +2 -2
  13. package/models/operations/createdatasource.js +2 -2
  14. package/models/operations/createeval.js +16 -16
  15. package/models/operations/fileget.js +2 -2
  16. package/models/operations/filelist.js +2 -2
  17. package/models/operations/fileupload.js +2 -2
  18. package/models/operations/getbudget.js +2 -2
  19. package/models/operations/getevals.js +28 -28
  20. package/models/operations/listbudgets.js +2 -2
  21. package/models/operations/listcontacts.js +2 -2
  22. package/models/operations/listdatasetdatapoints.js +2 -2
  23. package/models/operations/listdatasets.js +2 -2
  24. package/models/operations/listdatasources.js +2 -2
  25. package/models/operations/retrievecontact.js +2 -2
  26. package/models/operations/retrievedatapoint.js +2 -2
  27. package/models/operations/retrievedataset.js +2 -2
  28. package/models/operations/retrievedatasource.js +2 -2
  29. package/models/operations/updatebudget.js +2 -2
  30. package/models/operations/updatecontact.js +2 -2
  31. package/models/operations/updatedatapoint.js +2 -2
  32. package/models/operations/updatedataset.js +2 -2
  33. package/models/operations/updatedatasource.js +2 -2
  34. package/models/operations/updateeval.js +16 -16
  35. package/package.json +1 -1
  36. package/packages/orq-rc/README.md +107 -90
  37. package/packages/orq-rc/docs/sdks/tools/README.md +488 -0
  38. package/packages/orq-rc/examples/package-lock.json +1 -1
  39. package/packages/orq-rc/jsr.json +1 -1
  40. package/packages/orq-rc/package-lock.json +2 -2
  41. package/packages/orq-rc/package.json +1 -1
  42. package/packages/orq-rc/src/funcs/toolsCreate.ts +163 -0
  43. package/packages/orq-rc/src/funcs/toolsDelete.ts +167 -0
  44. package/packages/orq-rc/src/funcs/toolsDuplicate.ts +175 -0
  45. package/packages/orq-rc/src/funcs/toolsList.ts +176 -0
  46. package/packages/orq-rc/src/funcs/toolsRetrieve.ts +166 -0
  47. package/packages/orq-rc/src/funcs/toolsUpdate.ts +176 -0
  48. package/packages/orq-rc/src/lib/config.ts +3 -3
  49. package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
  50. package/packages/orq-rc/src/mcp-server/server.ts +13 -1
  51. package/packages/orq-rc/src/mcp-server/tools/toolsCreate.ts +37 -0
  52. package/packages/orq-rc/src/mcp-server/tools/toolsDelete.ts +35 -0
  53. package/packages/orq-rc/src/mcp-server/tools/toolsDuplicate.ts +37 -0
  54. package/packages/orq-rc/src/mcp-server/tools/toolsList.ts +37 -0
  55. package/packages/orq-rc/src/mcp-server/tools/toolsRetrieve.ts +37 -0
  56. package/packages/orq-rc/src/mcp-server/tools/toolsUpdate.ts +37 -0
  57. package/packages/orq-rc/src/models/components/callsubagenttool.ts +109 -0
  58. package/packages/orq-rc/src/models/components/codeexecutiontool.ts +293 -0
  59. package/packages/orq-rc/src/models/components/currentdatetool.ts +107 -0
  60. package/packages/orq-rc/src/models/components/deployments.ts +52 -45
  61. package/packages/orq-rc/src/models/components/functiontool.ts +195 -0
  62. package/packages/orq-rc/src/models/components/googlesearchtool.ts +108 -0
  63. package/packages/orq-rc/src/models/components/httptool.ts +532 -0
  64. package/packages/orq-rc/src/models/components/index.ts +13 -0
  65. package/packages/orq-rc/src/models/components/queryknowledgebasetool.ts +111 -0
  66. package/packages/orq-rc/src/models/components/querymemorystoretool.ts +111 -0
  67. package/packages/orq-rc/src/models/components/retrieveagentstool.ts +109 -0
  68. package/packages/orq-rc/src/models/components/retrieveknowledgebasestool.ts +111 -0
  69. package/packages/orq-rc/src/models/components/retrievememorystorestool.ts +111 -0
  70. package/packages/orq-rc/src/models/components/webscrapertool.ts +105 -0
  71. package/packages/orq-rc/src/models/components/writememorystoretool.ts +111 -0
  72. package/packages/orq-rc/src/models/errors/duplicatetool.ts +91 -0
  73. package/packages/orq-rc/src/models/errors/index.ts +2 -0
  74. package/packages/orq-rc/src/models/errors/updatetool.ts +91 -0
  75. package/packages/orq-rc/src/models/operations/createbudget.ts +2 -2
  76. package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
  77. package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
  78. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +10 -8
  79. package/packages/orq-rc/src/models/operations/createdatasource.ts +2 -2
  80. package/packages/orq-rc/src/models/operations/createeval.ts +60 -56
  81. package/packages/orq-rc/src/models/operations/createknowledge.ts +18 -0
  82. package/packages/orq-rc/src/models/operations/creatememorystore.ts +137 -136
  83. package/packages/orq-rc/src/models/operations/createprompt.ts +631 -314
  84. package/packages/orq-rc/src/models/operations/createtool.ts +4027 -0
  85. package/packages/orq-rc/src/models/operations/deletetool.ts +75 -0
  86. package/packages/orq-rc/src/models/operations/deploymentcreatemetric.ts +8 -6
  87. package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +362 -194
  88. package/packages/orq-rc/src/models/operations/deployments.ts +329 -160
  89. package/packages/orq-rc/src/models/operations/deploymentstream.ts +8 -6
  90. package/packages/orq-rc/src/models/operations/duplicatetool.ts +2311 -0
  91. package/packages/orq-rc/src/models/operations/fileget.ts +2 -2
  92. package/packages/orq-rc/src/models/operations/filelist.ts +2 -2
  93. package/packages/orq-rc/src/models/operations/fileupload.ts +2 -2
  94. package/packages/orq-rc/src/models/operations/getagent.ts +10 -10
  95. package/packages/orq-rc/src/models/operations/getallprompts.ts +333 -168
  96. package/packages/orq-rc/src/models/operations/getalltools.ts +2278 -0
  97. package/packages/orq-rc/src/models/operations/getbudget.ts +2 -2
  98. package/packages/orq-rc/src/models/operations/getevals.ts +28 -28
  99. package/packages/orq-rc/src/models/operations/getoneknowledge.ts +9 -0
  100. package/packages/orq-rc/src/models/operations/getoneprompt.ts +329 -167
  101. package/packages/orq-rc/src/models/operations/getpromptversion.ts +337 -168
  102. package/packages/orq-rc/src/models/operations/index.ts +6 -0
  103. package/packages/orq-rc/src/models/operations/listagents.ts +10 -10
  104. package/packages/orq-rc/src/models/operations/listbudgets.ts +2 -2
  105. package/packages/orq-rc/src/models/operations/listcontacts.ts +2 -2
  106. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +6 -5
  107. package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
  108. package/packages/orq-rc/src/models/operations/listdatasources.ts +2 -2
  109. package/packages/orq-rc/src/models/operations/listknowledgebases.ts +9 -0
  110. package/packages/orq-rc/src/models/operations/listpromptversions.ts +354 -183
  111. package/packages/orq-rc/src/models/operations/parse.ts +20 -335
  112. package/packages/orq-rc/src/models/operations/retrievecontact.ts +2 -2
  113. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +6 -5
  114. package/packages/orq-rc/src/models/operations/retrievedataset.ts +2 -2
  115. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +2 -2
  116. package/packages/orq-rc/src/models/operations/retrievetool.ts +2303 -0
  117. package/packages/orq-rc/src/models/operations/runagent.ts +412 -1375
  118. package/packages/orq-rc/src/models/operations/streamrunagent.ts +399 -1449
  119. package/packages/orq-rc/src/models/operations/updatebudget.ts +2 -2
  120. package/packages/orq-rc/src/models/operations/updatecontact.ts +2 -2
  121. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +10 -8
  122. package/packages/orq-rc/src/models/operations/updatedataset.ts +2 -2
  123. package/packages/orq-rc/src/models/operations/updatedatasource.ts +2 -2
  124. package/packages/orq-rc/src/models/operations/updateeval.ts +57 -57
  125. package/packages/orq-rc/src/models/operations/updateknowledge.ts +18 -0
  126. package/packages/orq-rc/src/models/operations/updatememorystore.ts +136 -168
  127. package/packages/orq-rc/src/models/operations/updateprompt.ts +668 -335
  128. package/packages/orq-rc/src/models/operations/updatetool.ts +4231 -0
  129. package/packages/orq-rc/src/sdk/sdk.ts +6 -0
  130. package/packages/orq-rc/src/sdk/tools.ts +117 -0
  131. package/src/lib/config.ts +3 -3
  132. package/src/mcp-server/mcp-server.ts +1 -1
  133. package/src/mcp-server/server.ts +1 -1
  134. package/src/models/operations/createbudget.ts +2 -2
  135. package/src/models/operations/createcontact.ts +2 -2
  136. package/src/models/operations/createdataset.ts +2 -2
  137. package/src/models/operations/createdatasetitem.ts +2 -2
  138. package/src/models/operations/createdatasource.ts +2 -2
  139. package/src/models/operations/createeval.ts +16 -16
  140. package/src/models/operations/fileget.ts +2 -2
  141. package/src/models/operations/filelist.ts +2 -2
  142. package/src/models/operations/fileupload.ts +2 -2
  143. package/src/models/operations/getbudget.ts +2 -2
  144. package/src/models/operations/getevals.ts +28 -28
  145. package/src/models/operations/listbudgets.ts +2 -2
  146. package/src/models/operations/listcontacts.ts +2 -2
  147. package/src/models/operations/listdatasetdatapoints.ts +2 -2
  148. package/src/models/operations/listdatasets.ts +2 -2
  149. package/src/models/operations/listdatasources.ts +2 -2
  150. package/src/models/operations/retrievecontact.ts +2 -2
  151. package/src/models/operations/retrievedatapoint.ts +2 -2
  152. package/src/models/operations/retrievedataset.ts +2 -2
  153. package/src/models/operations/retrievedatasource.ts +2 -2
  154. package/src/models/operations/updatebudget.ts +2 -2
  155. package/src/models/operations/updatecontact.ts +2 -2
  156. package/src/models/operations/updatedatapoint.ts +2 -2
  157. package/src/models/operations/updatedataset.ts +2 -2
  158. package/src/models/operations/updatedatasource.ts +2 -2
  159. package/src/models/operations/updateeval.ts +16 -16
@@ -0,0 +1,109 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { ClosedEnum } from "../../types/enums.js";
9
+ import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ export const CallSubAgentToolType = {
13
+ CallSubAgent: "call_sub_agent",
14
+ } as const;
15
+ export type CallSubAgentToolType = ClosedEnum<typeof CallSubAgentToolType>;
16
+
17
+ /**
18
+ * Delegates tasks to specialized sub-agents
19
+ */
20
+ export type CallSubAgentTool = {
21
+ type: CallSubAgentToolType;
22
+ requiresApproval?: boolean | undefined;
23
+ };
24
+
25
+ /** @internal */
26
+ export const CallSubAgentToolType$inboundSchema: z.ZodNativeEnum<
27
+ typeof CallSubAgentToolType
28
+ > = z.nativeEnum(CallSubAgentToolType);
29
+
30
+ /** @internal */
31
+ export const CallSubAgentToolType$outboundSchema: z.ZodNativeEnum<
32
+ typeof CallSubAgentToolType
33
+ > = CallSubAgentToolType$inboundSchema;
34
+
35
+ /**
36
+ * @internal
37
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
38
+ */
39
+ export namespace CallSubAgentToolType$ {
40
+ /** @deprecated use `CallSubAgentToolType$inboundSchema` instead. */
41
+ export const inboundSchema = CallSubAgentToolType$inboundSchema;
42
+ /** @deprecated use `CallSubAgentToolType$outboundSchema` instead. */
43
+ export const outboundSchema = CallSubAgentToolType$outboundSchema;
44
+ }
45
+
46
+ /** @internal */
47
+ export const CallSubAgentTool$inboundSchema: z.ZodType<
48
+ CallSubAgentTool,
49
+ z.ZodTypeDef,
50
+ unknown
51
+ > = z.object({
52
+ type: CallSubAgentToolType$inboundSchema,
53
+ requires_approval: z.boolean().default(false),
54
+ }).transform((v) => {
55
+ return remap$(v, {
56
+ "requires_approval": "requiresApproval",
57
+ });
58
+ });
59
+
60
+ /** @internal */
61
+ export type CallSubAgentTool$Outbound = {
62
+ type: string;
63
+ requires_approval: boolean;
64
+ };
65
+
66
+ /** @internal */
67
+ export const CallSubAgentTool$outboundSchema: z.ZodType<
68
+ CallSubAgentTool$Outbound,
69
+ z.ZodTypeDef,
70
+ CallSubAgentTool
71
+ > = z.object({
72
+ type: CallSubAgentToolType$outboundSchema,
73
+ requiresApproval: z.boolean().default(false),
74
+ }).transform((v) => {
75
+ return remap$(v, {
76
+ requiresApproval: "requires_approval",
77
+ });
78
+ });
79
+
80
+ /**
81
+ * @internal
82
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
83
+ */
84
+ export namespace CallSubAgentTool$ {
85
+ /** @deprecated use `CallSubAgentTool$inboundSchema` instead. */
86
+ export const inboundSchema = CallSubAgentTool$inboundSchema;
87
+ /** @deprecated use `CallSubAgentTool$outboundSchema` instead. */
88
+ export const outboundSchema = CallSubAgentTool$outboundSchema;
89
+ /** @deprecated use `CallSubAgentTool$Outbound` instead. */
90
+ export type Outbound = CallSubAgentTool$Outbound;
91
+ }
92
+
93
+ export function callSubAgentToolToJSON(
94
+ callSubAgentTool: CallSubAgentTool,
95
+ ): string {
96
+ return JSON.stringify(
97
+ CallSubAgentTool$outboundSchema.parse(callSubAgentTool),
98
+ );
99
+ }
100
+
101
+ export function callSubAgentToolFromJSON(
102
+ jsonString: string,
103
+ ): SafeParseResult<CallSubAgentTool, SDKValidationError> {
104
+ return safeParse(
105
+ jsonString,
106
+ (x) => CallSubAgentTool$inboundSchema.parse(JSON.parse(x)),
107
+ `Failed to parse 'CallSubAgentTool' from JSON`,
108
+ );
109
+ }
@@ -0,0 +1,293 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { ClosedEnum } from "../../types/enums.js";
9
+ import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ /**
13
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
14
+ */
15
+ export const CodeExecutionToolStatus = {
16
+ Live: "live",
17
+ Draft: "draft",
18
+ Pending: "pending",
19
+ Published: "published",
20
+ } as const;
21
+ /**
22
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
23
+ */
24
+ export type CodeExecutionToolStatus = ClosedEnum<
25
+ typeof CodeExecutionToolStatus
26
+ >;
27
+
28
+ export const CodeExecutionToolType = {
29
+ Code: "code",
30
+ } as const;
31
+ export type CodeExecutionToolType = ClosedEnum<typeof CodeExecutionToolType>;
32
+
33
+ export const Language = {
34
+ Python: "python",
35
+ } as const;
36
+ export type Language = ClosedEnum<typeof Language>;
37
+
38
+ export type CodeTool = {
39
+ /**
40
+ * 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.
41
+ */
42
+ parameters?: { [k: string]: any } | undefined;
43
+ language: Language;
44
+ /**
45
+ * The code to execute.
46
+ */
47
+ code: string;
48
+ };
49
+
50
+ /**
51
+ * Executes code in a secure sandbox environment
52
+ */
53
+ export type CodeExecutionTool = {
54
+ /**
55
+ * 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.
56
+ */
57
+ path: string;
58
+ /**
59
+ * Unique key of the tool as it will be displayed in the UI
60
+ */
61
+ key: string;
62
+ /**
63
+ * 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.
64
+ */
65
+ displayName: string;
66
+ /**
67
+ * 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.
68
+ */
69
+ description: string;
70
+ /**
71
+ * 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.
72
+ */
73
+ status?: CodeExecutionToolStatus | undefined;
74
+ versionHash?: string | undefined;
75
+ type: CodeExecutionToolType;
76
+ codeTool: CodeTool;
77
+ id?: string | undefined;
78
+ requiresApproval?: boolean | undefined;
79
+ };
80
+
81
+ /** @internal */
82
+ export const CodeExecutionToolStatus$inboundSchema: z.ZodNativeEnum<
83
+ typeof CodeExecutionToolStatus
84
+ > = z.nativeEnum(CodeExecutionToolStatus);
85
+
86
+ /** @internal */
87
+ export const CodeExecutionToolStatus$outboundSchema: z.ZodNativeEnum<
88
+ typeof CodeExecutionToolStatus
89
+ > = CodeExecutionToolStatus$inboundSchema;
90
+
91
+ /**
92
+ * @internal
93
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
94
+ */
95
+ export namespace CodeExecutionToolStatus$ {
96
+ /** @deprecated use `CodeExecutionToolStatus$inboundSchema` instead. */
97
+ export const inboundSchema = CodeExecutionToolStatus$inboundSchema;
98
+ /** @deprecated use `CodeExecutionToolStatus$outboundSchema` instead. */
99
+ export const outboundSchema = CodeExecutionToolStatus$outboundSchema;
100
+ }
101
+
102
+ /** @internal */
103
+ export const CodeExecutionToolType$inboundSchema: z.ZodNativeEnum<
104
+ typeof CodeExecutionToolType
105
+ > = z.nativeEnum(CodeExecutionToolType);
106
+
107
+ /** @internal */
108
+ export const CodeExecutionToolType$outboundSchema: z.ZodNativeEnum<
109
+ typeof CodeExecutionToolType
110
+ > = CodeExecutionToolType$inboundSchema;
111
+
112
+ /**
113
+ * @internal
114
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
115
+ */
116
+ export namespace CodeExecutionToolType$ {
117
+ /** @deprecated use `CodeExecutionToolType$inboundSchema` instead. */
118
+ export const inboundSchema = CodeExecutionToolType$inboundSchema;
119
+ /** @deprecated use `CodeExecutionToolType$outboundSchema` instead. */
120
+ export const outboundSchema = CodeExecutionToolType$outboundSchema;
121
+ }
122
+
123
+ /** @internal */
124
+ export const Language$inboundSchema: z.ZodNativeEnum<typeof Language> = z
125
+ .nativeEnum(Language);
126
+
127
+ /** @internal */
128
+ export const Language$outboundSchema: z.ZodNativeEnum<typeof Language> =
129
+ Language$inboundSchema;
130
+
131
+ /**
132
+ * @internal
133
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
134
+ */
135
+ export namespace Language$ {
136
+ /** @deprecated use `Language$inboundSchema` instead. */
137
+ export const inboundSchema = Language$inboundSchema;
138
+ /** @deprecated use `Language$outboundSchema` instead. */
139
+ export const outboundSchema = Language$outboundSchema;
140
+ }
141
+
142
+ /** @internal */
143
+ export const CodeTool$inboundSchema: z.ZodType<
144
+ CodeTool,
145
+ z.ZodTypeDef,
146
+ unknown
147
+ > = z.object({
148
+ parameters: z.record(z.any()).optional(),
149
+ language: Language$inboundSchema,
150
+ code: z.string(),
151
+ });
152
+
153
+ /** @internal */
154
+ export type CodeTool$Outbound = {
155
+ parameters?: { [k: string]: any } | undefined;
156
+ language: string;
157
+ code: string;
158
+ };
159
+
160
+ /** @internal */
161
+ export const CodeTool$outboundSchema: z.ZodType<
162
+ CodeTool$Outbound,
163
+ z.ZodTypeDef,
164
+ CodeTool
165
+ > = z.object({
166
+ parameters: z.record(z.any()).optional(),
167
+ language: Language$outboundSchema,
168
+ code: z.string(),
169
+ });
170
+
171
+ /**
172
+ * @internal
173
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
174
+ */
175
+ export namespace CodeTool$ {
176
+ /** @deprecated use `CodeTool$inboundSchema` instead. */
177
+ export const inboundSchema = CodeTool$inboundSchema;
178
+ /** @deprecated use `CodeTool$outboundSchema` instead. */
179
+ export const outboundSchema = CodeTool$outboundSchema;
180
+ /** @deprecated use `CodeTool$Outbound` instead. */
181
+ export type Outbound = CodeTool$Outbound;
182
+ }
183
+
184
+ export function codeToolToJSON(codeTool: CodeTool): string {
185
+ return JSON.stringify(CodeTool$outboundSchema.parse(codeTool));
186
+ }
187
+
188
+ export function codeToolFromJSON(
189
+ jsonString: string,
190
+ ): SafeParseResult<CodeTool, SDKValidationError> {
191
+ return safeParse(
192
+ jsonString,
193
+ (x) => CodeTool$inboundSchema.parse(JSON.parse(x)),
194
+ `Failed to parse 'CodeTool' from JSON`,
195
+ );
196
+ }
197
+
198
+ /** @internal */
199
+ export const CodeExecutionTool$inboundSchema: z.ZodType<
200
+ CodeExecutionTool,
201
+ z.ZodTypeDef,
202
+ unknown
203
+ > = z.object({
204
+ path: z.string(),
205
+ key: z.string(),
206
+ display_name: z.string(),
207
+ description: z.string(),
208
+ status: CodeExecutionToolStatus$inboundSchema.default("live"),
209
+ version_hash: z.string().optional(),
210
+ type: CodeExecutionToolType$inboundSchema,
211
+ code_tool: z.lazy(() => CodeTool$inboundSchema),
212
+ _id: z.string().optional(),
213
+ requires_approval: z.boolean().default(false),
214
+ }).transform((v) => {
215
+ return remap$(v, {
216
+ "display_name": "displayName",
217
+ "version_hash": "versionHash",
218
+ "code_tool": "codeTool",
219
+ "_id": "id",
220
+ "requires_approval": "requiresApproval",
221
+ });
222
+ });
223
+
224
+ /** @internal */
225
+ export type CodeExecutionTool$Outbound = {
226
+ path: string;
227
+ key: string;
228
+ display_name: string;
229
+ description: string;
230
+ status: string;
231
+ version_hash?: string | undefined;
232
+ type: string;
233
+ code_tool: CodeTool$Outbound;
234
+ _id?: string | undefined;
235
+ requires_approval: boolean;
236
+ };
237
+
238
+ /** @internal */
239
+ export const CodeExecutionTool$outboundSchema: z.ZodType<
240
+ CodeExecutionTool$Outbound,
241
+ z.ZodTypeDef,
242
+ CodeExecutionTool
243
+ > = z.object({
244
+ path: z.string(),
245
+ key: z.string(),
246
+ displayName: z.string(),
247
+ description: z.string(),
248
+ status: CodeExecutionToolStatus$outboundSchema.default("live"),
249
+ versionHash: z.string().optional(),
250
+ type: CodeExecutionToolType$outboundSchema,
251
+ codeTool: z.lazy(() => CodeTool$outboundSchema),
252
+ id: z.string().optional(),
253
+ requiresApproval: z.boolean().default(false),
254
+ }).transform((v) => {
255
+ return remap$(v, {
256
+ displayName: "display_name",
257
+ versionHash: "version_hash",
258
+ codeTool: "code_tool",
259
+ id: "_id",
260
+ requiresApproval: "requires_approval",
261
+ });
262
+ });
263
+
264
+ /**
265
+ * @internal
266
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
267
+ */
268
+ export namespace CodeExecutionTool$ {
269
+ /** @deprecated use `CodeExecutionTool$inboundSchema` instead. */
270
+ export const inboundSchema = CodeExecutionTool$inboundSchema;
271
+ /** @deprecated use `CodeExecutionTool$outboundSchema` instead. */
272
+ export const outboundSchema = CodeExecutionTool$outboundSchema;
273
+ /** @deprecated use `CodeExecutionTool$Outbound` instead. */
274
+ export type Outbound = CodeExecutionTool$Outbound;
275
+ }
276
+
277
+ export function codeExecutionToolToJSON(
278
+ codeExecutionTool: CodeExecutionTool,
279
+ ): string {
280
+ return JSON.stringify(
281
+ CodeExecutionTool$outboundSchema.parse(codeExecutionTool),
282
+ );
283
+ }
284
+
285
+ export function codeExecutionToolFromJSON(
286
+ jsonString: string,
287
+ ): SafeParseResult<CodeExecutionTool, SDKValidationError> {
288
+ return safeParse(
289
+ jsonString,
290
+ (x) => CodeExecutionTool$inboundSchema.parse(JSON.parse(x)),
291
+ `Failed to parse 'CodeExecutionTool' from JSON`,
292
+ );
293
+ }
@@ -0,0 +1,107 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { ClosedEnum } from "../../types/enums.js";
9
+ import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ export const CurrentDateToolType = {
13
+ CurrentDate: "current_date",
14
+ } as const;
15
+ export type CurrentDateToolType = ClosedEnum<typeof CurrentDateToolType>;
16
+
17
+ /**
18
+ * Provides the current date and time
19
+ */
20
+ export type CurrentDateTool = {
21
+ type: CurrentDateToolType;
22
+ requiresApproval?: boolean | undefined;
23
+ };
24
+
25
+ /** @internal */
26
+ export const CurrentDateToolType$inboundSchema: z.ZodNativeEnum<
27
+ typeof CurrentDateToolType
28
+ > = z.nativeEnum(CurrentDateToolType);
29
+
30
+ /** @internal */
31
+ export const CurrentDateToolType$outboundSchema: z.ZodNativeEnum<
32
+ typeof CurrentDateToolType
33
+ > = CurrentDateToolType$inboundSchema;
34
+
35
+ /**
36
+ * @internal
37
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
38
+ */
39
+ export namespace CurrentDateToolType$ {
40
+ /** @deprecated use `CurrentDateToolType$inboundSchema` instead. */
41
+ export const inboundSchema = CurrentDateToolType$inboundSchema;
42
+ /** @deprecated use `CurrentDateToolType$outboundSchema` instead. */
43
+ export const outboundSchema = CurrentDateToolType$outboundSchema;
44
+ }
45
+
46
+ /** @internal */
47
+ export const CurrentDateTool$inboundSchema: z.ZodType<
48
+ CurrentDateTool,
49
+ z.ZodTypeDef,
50
+ unknown
51
+ > = z.object({
52
+ type: CurrentDateToolType$inboundSchema,
53
+ requires_approval: z.boolean().default(false),
54
+ }).transform((v) => {
55
+ return remap$(v, {
56
+ "requires_approval": "requiresApproval",
57
+ });
58
+ });
59
+
60
+ /** @internal */
61
+ export type CurrentDateTool$Outbound = {
62
+ type: string;
63
+ requires_approval: boolean;
64
+ };
65
+
66
+ /** @internal */
67
+ export const CurrentDateTool$outboundSchema: z.ZodType<
68
+ CurrentDateTool$Outbound,
69
+ z.ZodTypeDef,
70
+ CurrentDateTool
71
+ > = z.object({
72
+ type: CurrentDateToolType$outboundSchema,
73
+ requiresApproval: z.boolean().default(false),
74
+ }).transform((v) => {
75
+ return remap$(v, {
76
+ requiresApproval: "requires_approval",
77
+ });
78
+ });
79
+
80
+ /**
81
+ * @internal
82
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
83
+ */
84
+ export namespace CurrentDateTool$ {
85
+ /** @deprecated use `CurrentDateTool$inboundSchema` instead. */
86
+ export const inboundSchema = CurrentDateTool$inboundSchema;
87
+ /** @deprecated use `CurrentDateTool$outboundSchema` instead. */
88
+ export const outboundSchema = CurrentDateTool$outboundSchema;
89
+ /** @deprecated use `CurrentDateTool$Outbound` instead. */
90
+ export type Outbound = CurrentDateTool$Outbound;
91
+ }
92
+
93
+ export function currentDateToolToJSON(
94
+ currentDateTool: CurrentDateTool,
95
+ ): string {
96
+ return JSON.stringify(CurrentDateTool$outboundSchema.parse(currentDateTool));
97
+ }
98
+
99
+ export function currentDateToolFromJSON(
100
+ jsonString: string,
101
+ ): SafeParseResult<CurrentDateTool, SDKValidationError> {
102
+ return safeParse(
103
+ jsonString,
104
+ (x) => CurrentDateTool$inboundSchema.parse(JSON.parse(x)),
105
+ `Failed to parse 'CurrentDateTool' from JSON`,
106
+ );
107
+ }