@openrouter/sdk 1.3.29 → 1.3.31

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 (205) hide show
  1. package/README.md +1 -1
  2. package/esm/funcs/batchCreateBatches.d.ts +19 -0
  3. package/esm/funcs/batchCreateBatches.js +98 -0
  4. package/esm/funcs/batchDelete.d.ts +19 -0
  5. package/esm/funcs/batchDelete.js +103 -0
  6. package/esm/funcs/batchGetBatches.d.ts +19 -0
  7. package/esm/funcs/batchGetBatches.js +103 -0
  8. package/esm/funcs/batchList.d.ts +21 -0
  9. package/esm/funcs/batchList.js +134 -0
  10. package/esm/lib/config.d.ts +2 -2
  11. package/esm/lib/config.js +2 -2
  12. package/esm/models/anthropicadvisortoolresult.d.ts +14 -0
  13. package/esm/models/anthropicadvisortoolresult.js +21 -0
  14. package/esm/models/anthropicbase64pdfsource.d.ts +17 -2
  15. package/esm/models/anthropicbase64pdfsource.js +25 -2
  16. package/esm/models/anthropicbashcodeexecutioncontent.d.ts +11 -0
  17. package/esm/models/anthropicbashcodeexecutioncontent.js +17 -0
  18. package/esm/models/anthropicbashcodeexecutionoutput.d.ts +18 -0
  19. package/esm/models/anthropicbashcodeexecutionoutput.js +25 -0
  20. package/esm/models/anthropicbashcodeexecutionresult.d.ts +15 -0
  21. package/esm/models/anthropicbashcodeexecutionresult.js +24 -0
  22. package/esm/models/anthropicbashcodeexecutiontoolresult.d.ts +13 -0
  23. package/esm/models/anthropicbashcodeexecutiontoolresult.js +22 -0
  24. package/esm/models/anthropicbashcodeexecutiontoolresulterror.d.ts +22 -0
  25. package/esm/models/anthropicbashcodeexecutiontoolresulterror.js +30 -0
  26. package/esm/models/anthropiccaller.d.ts +12 -0
  27. package/esm/models/anthropiccaller.js +19 -0
  28. package/esm/models/anthropiccitationcharlocation.d.ts +16 -0
  29. package/esm/models/anthropiccitationcharlocation.js +30 -0
  30. package/esm/models/anthropiccitationcontentblocklocation.d.ts +16 -0
  31. package/esm/models/anthropiccitationcontentblocklocation.js +30 -0
  32. package/esm/models/anthropiccitationpagelocation.d.ts +16 -0
  33. package/esm/models/anthropiccitationpagelocation.js +30 -0
  34. package/esm/models/anthropiccitationsconfig.d.ts +10 -0
  35. package/esm/models/anthropiccitationsconfig.js +14 -0
  36. package/esm/models/anthropiccitationsearchresultlocation.d.ts +16 -0
  37. package/esm/models/anthropiccitationsearchresultlocation.js +28 -0
  38. package/esm/models/anthropiccitationwebsearchresultlocation.d.ts +14 -0
  39. package/esm/models/anthropiccitationwebsearchresultlocation.js +24 -0
  40. package/esm/models/anthropiccodeexecution20250825caller.d.ts +11 -0
  41. package/esm/models/anthropiccodeexecution20250825caller.js +20 -0
  42. package/esm/models/anthropiccodeexecution20260120caller.d.ts +11 -0
  43. package/esm/models/anthropiccodeexecution20260120caller.js +20 -0
  44. package/esm/models/anthropiccodeexecutioncontent.d.ts +12 -0
  45. package/esm/models/anthropiccodeexecutioncontent.js +19 -0
  46. package/esm/models/anthropiccodeexecutionoutput.d.ts +18 -0
  47. package/esm/models/anthropiccodeexecutionoutput.js +25 -0
  48. package/esm/models/anthropiccodeexecutionresult.d.ts +15 -0
  49. package/esm/models/anthropiccodeexecutionresult.js +24 -0
  50. package/esm/models/anthropiccodeexecutiontoolresult.d.ts +13 -0
  51. package/esm/models/anthropiccodeexecutiontoolresult.js +22 -0
  52. package/esm/models/anthropiccodeexecutiontoolresulterror.d.ts +12 -0
  53. package/esm/models/anthropiccodeexecutiontoolresulterror.js +21 -0
  54. package/esm/models/anthropiccompactionblock.d.ts +12 -0
  55. package/esm/models/anthropiccompactionblock.js +21 -0
  56. package/esm/models/anthropiccontainer.d.ts +13 -0
  57. package/esm/models/anthropiccontainer.js +22 -0
  58. package/esm/models/anthropiccontainerskill.d.ts +20 -0
  59. package/esm/models/anthropiccontainerskill.js +28 -0
  60. package/esm/models/anthropiccontainerupload.d.ts +11 -0
  61. package/esm/models/anthropiccontainerupload.js +20 -0
  62. package/esm/models/anthropicdirectcaller.d.ts +10 -0
  63. package/esm/models/anthropicdirectcaller.js +14 -0
  64. package/esm/models/anthropicdocumentblock.d.ts +36 -0
  65. package/esm/models/anthropicdocumentblock.js +45 -0
  66. package/esm/models/anthropicdocumentblockparam.d.ts +20 -4
  67. package/esm/models/anthropicdocumentblockparam.js +4 -4
  68. package/esm/models/anthropicencryptedcodeexecutionresult.d.ts +15 -0
  69. package/esm/models/anthropicencryptedcodeexecutionresult.js +25 -0
  70. package/esm/models/anthropicinputtransformation.d.ts +18 -0
  71. package/esm/models/anthropicinputtransformation.js +16 -0
  72. package/esm/models/anthropicoutputtokensdetails.d.ts +10 -0
  73. package/esm/models/anthropicoutputtokensdetails.js +19 -0
  74. package/esm/models/anthropicplaintextsource.d.ts +17 -2
  75. package/esm/models/anthropicplaintextsource.js +25 -2
  76. package/esm/models/anthropicredactedthinkingblock.d.ts +11 -0
  77. package/esm/models/anthropicredactedthinkingblock.js +15 -0
  78. package/esm/models/anthropicrefusalstopdetails.d.ts +32 -0
  79. package/esm/models/anthropicrefusalstopdetails.js +31 -0
  80. package/esm/models/anthropicservertoolerrorcode.d.ts +12 -0
  81. package/esm/models/anthropicservertoolerrorcode.js +14 -0
  82. package/esm/models/anthropicservertoolusage.d.ts +11 -0
  83. package/esm/models/anthropicservertoolusage.js +21 -0
  84. package/esm/models/anthropicservicetier.d.ts +11 -0
  85. package/esm/models/anthropicservicetier.js +13 -0
  86. package/esm/models/anthropictextblock.d.ts +13 -0
  87. package/esm/models/anthropictextblock.js +17 -0
  88. package/esm/models/anthropictextcitation.d.ts +14 -0
  89. package/esm/models/anthropictextcitation.js +23 -0
  90. package/esm/models/anthropictexteditorcodeexecutioncontent.d.ts +13 -0
  91. package/esm/models/anthropictexteditorcodeexecutioncontent.js +21 -0
  92. package/esm/models/anthropictexteditorcodeexecutioncreateresult.d.ts +11 -0
  93. package/esm/models/anthropictexteditorcodeexecutioncreateresult.js +20 -0
  94. package/esm/models/anthropictexteditorcodeexecutionstrreplaceresult.d.ts +15 -0
  95. package/esm/models/anthropictexteditorcodeexecutionstrreplaceresult.js +28 -0
  96. package/esm/models/anthropictexteditorcodeexecutiontoolresult.d.ts +13 -0
  97. package/esm/models/anthropictexteditorcodeexecutiontoolresult.js +22 -0
  98. package/esm/models/anthropictexteditorcodeexecutiontoolresulterror.d.ts +23 -0
  99. package/esm/models/anthropictexteditorcodeexecutiontoolresulterror.js +33 -0
  100. package/esm/models/anthropictexteditorcodeexecutionviewresult.d.ts +24 -0
  101. package/esm/models/anthropictexteditorcodeexecutionviewresult.js +36 -0
  102. package/esm/models/anthropicthinkingblock.d.ts +12 -0
  103. package/esm/models/anthropicthinkingblock.js +16 -0
  104. package/esm/models/anthropictoolreference.d.ts +18 -0
  105. package/esm/models/anthropictoolreference.js +25 -0
  106. package/esm/models/anthropictoolsearchcontent.d.ts +11 -0
  107. package/esm/models/anthropictoolsearchcontent.js +17 -0
  108. package/esm/models/anthropictoolsearchresult.d.ts +12 -0
  109. package/esm/models/anthropictoolsearchresult.js +21 -0
  110. package/esm/models/anthropictoolsearchresulterror.d.ts +13 -0
  111. package/esm/models/anthropictoolsearchresulterror.js +23 -0
  112. package/esm/models/anthropictoolsearchtoolresult.d.ts +13 -0
  113. package/esm/models/anthropictoolsearchtoolresult.js +22 -0
  114. package/esm/models/anthropictooluseblock.d.ts +15 -0
  115. package/esm/models/anthropictooluseblock.js +19 -0
  116. package/esm/models/anthropicwebfetchblock.d.ts +14 -0
  117. package/esm/models/anthropicwebfetchblock.js +23 -0
  118. package/esm/models/anthropicwebfetchcontent.d.ts +11 -0
  119. package/esm/models/anthropicwebfetchcontent.js +17 -0
  120. package/esm/models/anthropicwebfetchtoolresult.d.ts +15 -0
  121. package/esm/models/anthropicwebfetchtoolresult.js +24 -0
  122. package/esm/models/anthropicwebfetchtoolresulterror.d.ts +25 -0
  123. package/esm/models/anthropicwebfetchtoolresulterror.js +33 -0
  124. package/esm/models/anthropicwebsearchresult.d.ts +21 -0
  125. package/esm/models/anthropicwebsearchresult.js +29 -0
  126. package/esm/models/anthropicwebsearchtoolresult.d.ts +20 -0
  127. package/esm/models/anthropicwebsearchtoolresult.js +36 -0
  128. package/esm/models/anthropicwebsearchtoolresulterror.d.ts +29 -0
  129. package/esm/models/anthropicwebsearchtoolresulterror.js +37 -0
  130. package/esm/models/batchdeletedobject.d.ts +26 -0
  131. package/esm/models/batchdeletedobject.js +22 -0
  132. package/esm/models/batchdeletionoutcome.d.ts +17 -0
  133. package/esm/models/batchdeletionoutcome.js +16 -0
  134. package/esm/models/batchdeletiontargets.d.ts +50 -0
  135. package/esm/models/batchdeletiontargets.js +32 -0
  136. package/esm/models/batcherrorresponse.d.ts +11 -0
  137. package/esm/models/batcherrorresponse.js +15 -0
  138. package/esm/models/batchlistitem.d.ts +181 -0
  139. package/esm/models/batchlistitem.js +159 -0
  140. package/esm/models/batchlistresponse.d.ts +25 -0
  141. package/esm/models/batchlistresponse.js +31 -0
  142. package/esm/models/batchliststatus.d.ts +20 -0
  143. package/esm/models/batchliststatus.js +19 -0
  144. package/esm/models/batchlisttimestamp.d.ts +12 -0
  145. package/esm/models/batchlisttimestamp.js +15 -0
  146. package/esm/models/batchobject.d.ts +750 -0
  147. package/esm/models/batchobject.js +810 -0
  148. package/esm/models/batchpaymentrequiredresponseerror.d.ts +159 -0
  149. package/esm/models/batchpaymentrequiredresponseerror.js +136 -0
  150. package/esm/models/batchproviderpreferences.d.ts +25 -0
  151. package/esm/models/batchproviderpreferences.js +20 -0
  152. package/esm/models/batchsubmitbody.d.ts +62 -0
  153. package/esm/models/batchsubmitbody.js +51 -0
  154. package/esm/models/debugevent.d.ts +12 -12
  155. package/esm/models/debugevent.js +11 -12
  156. package/esm/models/errors/batcherrorresponse.d.ts +19 -0
  157. package/esm/models/errors/batcherrorresponse.js +32 -0
  158. package/esm/models/errors/batchpaymentrequiredresponseerror.d.ts +53 -0
  159. package/esm/models/errors/batchpaymentrequiredresponseerror.js +64 -0
  160. package/esm/models/errors/index.d.ts +2 -0
  161. package/esm/models/errors/index.js +2 -0
  162. package/esm/models/finishreason.d.ts +13 -0
  163. package/esm/models/finishreason.js +15 -0
  164. package/esm/models/imagegenerationrequest.d.ts +3 -0
  165. package/esm/models/imagegenerationrequest.js +3 -0
  166. package/esm/models/imagegenerationusage.d.ts +4 -4
  167. package/esm/models/imagegenerationusage.js +4 -6
  168. package/esm/models/index.d.ts +75 -0
  169. package/esm/models/index.js +75 -0
  170. package/esm/models/internchatchoice.d.ts +4 -4
  171. package/esm/models/internchatchoice.js +3 -3
  172. package/esm/models/messagesmessageparam.d.ts +8 -8
  173. package/esm/models/messagesmessageparam.js +6 -7
  174. package/esm/models/operations/createbatches.d.ts +59 -0
  175. package/esm/models/operations/createbatches.js +23 -0
  176. package/esm/models/operations/deletebatch.d.ts +58 -0
  177. package/esm/models/operations/deletebatch.js +21 -0
  178. package/esm/models/operations/getbatches.d.ts +58 -0
  179. package/esm/models/operations/getbatches.js +21 -0
  180. package/esm/models/operations/index.d.ts +4 -0
  181. package/esm/models/operations/index.js +4 -0
  182. package/esm/models/operations/listbatches.d.ts +87 -0
  183. package/esm/models/operations/listbatches.js +40 -0
  184. package/esm/models/oranthropicbashtoolresult.d.ts +43 -0
  185. package/esm/models/oranthropicbashtoolresult.js +49 -0
  186. package/esm/models/oranthropiccontentblock.d.ts +25 -0
  187. package/esm/models/oranthropiccontentblock.js +45 -0
  188. package/esm/models/oranthropicnullablecaller.d.ts +12 -0
  189. package/esm/models/oranthropicnullablecaller.js +19 -0
  190. package/esm/models/oranthropicservertooluseblock.d.ts +15 -0
  191. package/esm/models/oranthropicservertooluseblock.js +19 -0
  192. package/esm/models/oranthropicshelltoolresult.d.ts +43 -0
  193. package/esm/models/oranthropicshelltoolresult.js +50 -0
  194. package/esm/models/oranthropicstopreason.d.ts +16 -0
  195. package/esm/models/oranthropicstopreason.js +18 -0
  196. package/esm/models/outputfusionservertoolitem.d.ts +8 -8
  197. package/esm/models/outputfusionservertoolitem.js +8 -8
  198. package/esm/models/submitgenerationfeedbackrequest.d.ts +4 -4
  199. package/esm/models/submitgenerationfeedbackrequest.js +3 -4
  200. package/esm/sdk/batch.d.ts +37 -0
  201. package/esm/sdk/batch.js +50 -0
  202. package/esm/sdk/sdk.d.ts +3 -0
  203. package/esm/sdk/sdk.js +4 -0
  204. package/jsr.json +1 -1
  205. package/package.json +7 -7
@@ -0,0 +1,19 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: f4f46d300ed2
4
+ */
5
+ import { safeParse } from "../lib/schemas.js";
6
+ import { discriminatedUnion } from "../types/discriminatedUnion.js";
7
+ import { AnthropicCodeExecutionResult$inboundSchema, } from "./anthropiccodeexecutionresult.js";
8
+ import { AnthropicCodeExecutionToolResultError$inboundSchema, } from "./anthropiccodeexecutiontoolresulterror.js";
9
+ import { AnthropicEncryptedCodeExecutionResult$inboundSchema, } from "./anthropicencryptedcodeexecutionresult.js";
10
+ /** @internal */
11
+ export const AnthropicCodeExecutionContent$inboundSchema = discriminatedUnion("type", {
12
+ code_execution_result: AnthropicCodeExecutionResult$inboundSchema,
13
+ code_execution_tool_result_error: AnthropicCodeExecutionToolResultError$inboundSchema,
14
+ encrypted_code_execution_result: AnthropicEncryptedCodeExecutionResult$inboundSchema,
15
+ });
16
+ export function anthropicCodeExecutionContentFromJSON(jsonString) {
17
+ return safeParse(jsonString, (x) => AnthropicCodeExecutionContent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AnthropicCodeExecutionContent' from JSON`);
18
+ }
19
+ //# sourceMappingURL=anthropiccodeexecutioncontent.js.map
@@ -0,0 +1,18 @@
1
+ import * as z from "zod/v4";
2
+ import { ClosedEnum } from "../types/enums.js";
3
+ import { Result as SafeParseResult } from "../types/fp.js";
4
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
+ export declare const AnthropicCodeExecutionOutputType: {
6
+ readonly CodeExecutionOutput: "code_execution_output";
7
+ };
8
+ export type AnthropicCodeExecutionOutputType = ClosedEnum<typeof AnthropicCodeExecutionOutputType>;
9
+ export type AnthropicCodeExecutionOutput = {
10
+ fileId: string;
11
+ type: AnthropicCodeExecutionOutputType;
12
+ };
13
+ /** @internal */
14
+ export declare const AnthropicCodeExecutionOutputType$inboundSchema: z.ZodEnum<typeof AnthropicCodeExecutionOutputType>;
15
+ /** @internal */
16
+ export declare const AnthropicCodeExecutionOutput$inboundSchema: z.ZodType<AnthropicCodeExecutionOutput, unknown>;
17
+ export declare function anthropicCodeExecutionOutputFromJSON(jsonString: string): SafeParseResult<AnthropicCodeExecutionOutput, SDKValidationError>;
18
+ //# sourceMappingURL=anthropiccodeexecutionoutput.d.ts.map
@@ -0,0 +1,25 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: b7d015976558
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ import { safeParse } from "../lib/schemas.js";
8
+ export const AnthropicCodeExecutionOutputType = {
9
+ CodeExecutionOutput: "code_execution_output",
10
+ };
11
+ /** @internal */
12
+ export const AnthropicCodeExecutionOutputType$inboundSchema = z.enum(AnthropicCodeExecutionOutputType);
13
+ /** @internal */
14
+ export const AnthropicCodeExecutionOutput$inboundSchema = z.object({
15
+ file_id: z.string(),
16
+ type: AnthropicCodeExecutionOutputType$inboundSchema,
17
+ }).transform((v) => {
18
+ return remap$(v, {
19
+ "file_id": "fileId",
20
+ });
21
+ });
22
+ export function anthropicCodeExecutionOutputFromJSON(jsonString) {
23
+ return safeParse(jsonString, (x) => AnthropicCodeExecutionOutput$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AnthropicCodeExecutionOutput' from JSON`);
24
+ }
25
+ //# sourceMappingURL=anthropiccodeexecutionoutput.js.map
@@ -0,0 +1,15 @@
1
+ import * as z from "zod/v4";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { AnthropicCodeExecutionOutput } from "./anthropiccodeexecutionoutput.js";
4
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
+ export type AnthropicCodeExecutionResult = {
6
+ content: Array<AnthropicCodeExecutionOutput>;
7
+ returnCode: number;
8
+ stderr: string;
9
+ stdout: string;
10
+ type: "code_execution_result";
11
+ };
12
+ /** @internal */
13
+ export declare const AnthropicCodeExecutionResult$inboundSchema: z.ZodType<AnthropicCodeExecutionResult, unknown>;
14
+ export declare function anthropicCodeExecutionResultFromJSON(jsonString: string): SafeParseResult<AnthropicCodeExecutionResult, SDKValidationError>;
15
+ //# sourceMappingURL=anthropiccodeexecutionresult.d.ts.map
@@ -0,0 +1,24 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: a35c5b19103f
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ import { safeParse } from "../lib/schemas.js";
8
+ import { AnthropicCodeExecutionOutput$inboundSchema, } from "./anthropiccodeexecutionoutput.js";
9
+ /** @internal */
10
+ export const AnthropicCodeExecutionResult$inboundSchema = z.object({
11
+ content: z.array(AnthropicCodeExecutionOutput$inboundSchema),
12
+ return_code: z.int(),
13
+ stderr: z.string(),
14
+ stdout: z.string(),
15
+ type: z.literal("code_execution_result"),
16
+ }).transform((v) => {
17
+ return remap$(v, {
18
+ "return_code": "returnCode",
19
+ });
20
+ });
21
+ export function anthropicCodeExecutionResultFromJSON(jsonString) {
22
+ return safeParse(jsonString, (x) => AnthropicCodeExecutionResult$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AnthropicCodeExecutionResult' from JSON`);
23
+ }
24
+ //# sourceMappingURL=anthropiccodeexecutionresult.js.map
@@ -0,0 +1,13 @@
1
+ import * as z from "zod/v4";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { AnthropicCodeExecutionContent } from "./anthropiccodeexecutioncontent.js";
4
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
+ export type AnthropicCodeExecutionToolResult = {
6
+ content: AnthropicCodeExecutionContent;
7
+ toolUseId: string;
8
+ type: "code_execution_tool_result";
9
+ };
10
+ /** @internal */
11
+ export declare const AnthropicCodeExecutionToolResult$inboundSchema: z.ZodType<AnthropicCodeExecutionToolResult, unknown>;
12
+ export declare function anthropicCodeExecutionToolResultFromJSON(jsonString: string): SafeParseResult<AnthropicCodeExecutionToolResult, SDKValidationError>;
13
+ //# sourceMappingURL=anthropiccodeexecutiontoolresult.d.ts.map
@@ -0,0 +1,22 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: b65091190ef2
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ import { safeParse } from "../lib/schemas.js";
8
+ import { AnthropicCodeExecutionContent$inboundSchema, } from "./anthropiccodeexecutioncontent.js";
9
+ /** @internal */
10
+ export const AnthropicCodeExecutionToolResult$inboundSchema = z.object({
11
+ content: AnthropicCodeExecutionContent$inboundSchema,
12
+ tool_use_id: z.string(),
13
+ type: z.literal("code_execution_tool_result"),
14
+ }).transform((v) => {
15
+ return remap$(v, {
16
+ "tool_use_id": "toolUseId",
17
+ });
18
+ });
19
+ export function anthropicCodeExecutionToolResultFromJSON(jsonString) {
20
+ return safeParse(jsonString, (x) => AnthropicCodeExecutionToolResult$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AnthropicCodeExecutionToolResult' from JSON`);
21
+ }
22
+ //# sourceMappingURL=anthropiccodeexecutiontoolresult.js.map
@@ -0,0 +1,12 @@
1
+ import * as z from "zod/v4";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { AnthropicServerToolErrorCode } from "./anthropicservertoolerrorcode.js";
4
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
+ export type AnthropicCodeExecutionToolResultError = {
6
+ errorCode: AnthropicServerToolErrorCode;
7
+ type: "code_execution_tool_result_error";
8
+ };
9
+ /** @internal */
10
+ export declare const AnthropicCodeExecutionToolResultError$inboundSchema: z.ZodType<AnthropicCodeExecutionToolResultError, unknown>;
11
+ export declare function anthropicCodeExecutionToolResultErrorFromJSON(jsonString: string): SafeParseResult<AnthropicCodeExecutionToolResultError, SDKValidationError>;
12
+ //# sourceMappingURL=anthropiccodeexecutiontoolresulterror.d.ts.map
@@ -0,0 +1,21 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: bf9694582afc
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ import { safeParse } from "../lib/schemas.js";
8
+ import { AnthropicServerToolErrorCode$inboundSchema, } from "./anthropicservertoolerrorcode.js";
9
+ /** @internal */
10
+ export const AnthropicCodeExecutionToolResultError$inboundSchema = z.object({
11
+ error_code: AnthropicServerToolErrorCode$inboundSchema,
12
+ type: z.literal("code_execution_tool_result_error"),
13
+ }).transform((v) => {
14
+ return remap$(v, {
15
+ "error_code": "errorCode",
16
+ });
17
+ });
18
+ export function anthropicCodeExecutionToolResultErrorFromJSON(jsonString) {
19
+ return safeParse(jsonString, (x) => AnthropicCodeExecutionToolResultError$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AnthropicCodeExecutionToolResultError' from JSON`);
20
+ }
21
+ //# sourceMappingURL=anthropiccodeexecutiontoolresulterror.js.map
@@ -0,0 +1,12 @@
1
+ import * as z from "zod/v4";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
+ export type AnthropicCompactionBlock = {
5
+ content: string | null;
6
+ encryptedContent?: string | null | undefined;
7
+ type: "compaction";
8
+ };
9
+ /** @internal */
10
+ export declare const AnthropicCompactionBlock$inboundSchema: z.ZodType<AnthropicCompactionBlock, unknown>;
11
+ export declare function anthropicCompactionBlockFromJSON(jsonString: string): SafeParseResult<AnthropicCompactionBlock, SDKValidationError>;
12
+ //# sourceMappingURL=anthropiccompactionblock.d.ts.map
@@ -0,0 +1,21 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 2e8c7492d352
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ import { safeParse } from "../lib/schemas.js";
8
+ /** @internal */
9
+ export const AnthropicCompactionBlock$inboundSchema = z.object({
10
+ content: z.nullable(z.string()),
11
+ encrypted_content: z.nullable(z.string()).optional(),
12
+ type: z.literal("compaction"),
13
+ }).transform((v) => {
14
+ return remap$(v, {
15
+ "encrypted_content": "encryptedContent",
16
+ });
17
+ });
18
+ export function anthropicCompactionBlockFromJSON(jsonString) {
19
+ return safeParse(jsonString, (x) => AnthropicCompactionBlock$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AnthropicCompactionBlock' from JSON`);
20
+ }
21
+ //# sourceMappingURL=anthropiccompactionblock.js.map
@@ -0,0 +1,13 @@
1
+ import * as z from "zod/v4";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { AnthropicContainerSkill } from "./anthropiccontainerskill.js";
4
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
+ export type AnthropicContainer = {
6
+ expiresAt: string;
7
+ id: string;
8
+ skills?: Array<AnthropicContainerSkill> | null | undefined;
9
+ };
10
+ /** @internal */
11
+ export declare const AnthropicContainer$inboundSchema: z.ZodType<AnthropicContainer, unknown>;
12
+ export declare function anthropicContainerFromJSON(jsonString: string): SafeParseResult<AnthropicContainer, SDKValidationError>;
13
+ //# sourceMappingURL=anthropiccontainer.d.ts.map
@@ -0,0 +1,22 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: e824c8443a90
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ import { safeParse } from "../lib/schemas.js";
8
+ import { AnthropicContainerSkill$inboundSchema, } from "./anthropiccontainerskill.js";
9
+ /** @internal */
10
+ export const AnthropicContainer$inboundSchema = z.object({
11
+ expires_at: z.string(),
12
+ id: z.string(),
13
+ skills: z.nullable(z.array(AnthropicContainerSkill$inboundSchema)).optional(),
14
+ }).transform((v) => {
15
+ return remap$(v, {
16
+ "expires_at": "expiresAt",
17
+ });
18
+ });
19
+ export function anthropicContainerFromJSON(jsonString) {
20
+ return safeParse(jsonString, (x) => AnthropicContainer$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AnthropicContainer' from JSON`);
21
+ }
22
+ //# sourceMappingURL=anthropiccontainer.js.map
@@ -0,0 +1,20 @@
1
+ import * as z from "zod/v4";
2
+ import { OpenEnum } from "../types/enums.js";
3
+ import { Result as SafeParseResult } from "../types/fp.js";
4
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
+ export declare const AnthropicContainerSkillType: {
6
+ readonly Anthropic: "anthropic";
7
+ readonly Custom: "custom";
8
+ };
9
+ export type AnthropicContainerSkillType = OpenEnum<typeof AnthropicContainerSkillType>;
10
+ export type AnthropicContainerSkill = {
11
+ skillId: string;
12
+ type: AnthropicContainerSkillType;
13
+ version: string;
14
+ };
15
+ /** @internal */
16
+ export declare const AnthropicContainerSkillType$inboundSchema: z.ZodType<AnthropicContainerSkillType, unknown>;
17
+ /** @internal */
18
+ export declare const AnthropicContainerSkill$inboundSchema: z.ZodType<AnthropicContainerSkill, unknown>;
19
+ export declare function anthropicContainerSkillFromJSON(jsonString: string): SafeParseResult<AnthropicContainerSkill, SDKValidationError>;
20
+ //# sourceMappingURL=anthropiccontainerskill.d.ts.map
@@ -0,0 +1,28 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 5235f5b38850
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ import { safeParse } from "../lib/schemas.js";
8
+ import * as openEnums from "../types/enums.js";
9
+ export const AnthropicContainerSkillType = {
10
+ Anthropic: "anthropic",
11
+ Custom: "custom",
12
+ };
13
+ /** @internal */
14
+ export const AnthropicContainerSkillType$inboundSchema = openEnums.inboundSchema(AnthropicContainerSkillType);
15
+ /** @internal */
16
+ export const AnthropicContainerSkill$inboundSchema = z.object({
17
+ skill_id: z.string(),
18
+ type: AnthropicContainerSkillType$inboundSchema,
19
+ version: z.string(),
20
+ }).transform((v) => {
21
+ return remap$(v, {
22
+ "skill_id": "skillId",
23
+ });
24
+ });
25
+ export function anthropicContainerSkillFromJSON(jsonString) {
26
+ return safeParse(jsonString, (x) => AnthropicContainerSkill$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AnthropicContainerSkill' from JSON`);
27
+ }
28
+ //# sourceMappingURL=anthropiccontainerskill.js.map
@@ -0,0 +1,11 @@
1
+ import * as z from "zod/v4";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
+ export type AnthropicContainerUpload = {
5
+ fileId: string;
6
+ type: "container_upload";
7
+ };
8
+ /** @internal */
9
+ export declare const AnthropicContainerUpload$inboundSchema: z.ZodType<AnthropicContainerUpload, unknown>;
10
+ export declare function anthropicContainerUploadFromJSON(jsonString: string): SafeParseResult<AnthropicContainerUpload, SDKValidationError>;
11
+ //# sourceMappingURL=anthropiccontainerupload.d.ts.map
@@ -0,0 +1,20 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 7c9967fcbcec
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ import { safeParse } from "../lib/schemas.js";
8
+ /** @internal */
9
+ export const AnthropicContainerUpload$inboundSchema = z.object({
10
+ file_id: z.string(),
11
+ type: z.literal("container_upload"),
12
+ }).transform((v) => {
13
+ return remap$(v, {
14
+ "file_id": "fileId",
15
+ });
16
+ });
17
+ export function anthropicContainerUploadFromJSON(jsonString) {
18
+ return safeParse(jsonString, (x) => AnthropicContainerUpload$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AnthropicContainerUpload' from JSON`);
19
+ }
20
+ //# sourceMappingURL=anthropiccontainerupload.js.map
@@ -0,0 +1,10 @@
1
+ import * as z from "zod/v4";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
+ export type AnthropicDirectCaller = {
5
+ type: "direct";
6
+ };
7
+ /** @internal */
8
+ export declare const AnthropicDirectCaller$inboundSchema: z.ZodType<AnthropicDirectCaller, unknown>;
9
+ export declare function anthropicDirectCallerFromJSON(jsonString: string): SafeParseResult<AnthropicDirectCaller, SDKValidationError>;
10
+ //# sourceMappingURL=anthropicdirectcaller.d.ts.map
@@ -0,0 +1,14 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: c1dba2541585
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { safeParse } from "../lib/schemas.js";
7
+ /** @internal */
8
+ export const AnthropicDirectCaller$inboundSchema = z.object({
9
+ type: z.literal("direct"),
10
+ });
11
+ export function anthropicDirectCallerFromJSON(jsonString) {
12
+ return safeParse(jsonString, (x) => AnthropicDirectCaller$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AnthropicDirectCaller' from JSON`);
13
+ }
14
+ //# sourceMappingURL=anthropicdirectcaller.js.map
@@ -0,0 +1,36 @@
1
+ import * as z from "zod/v4";
2
+ import * as discriminatedUnionTypes from "../types/discriminatedUnion.js";
3
+ import { ClosedEnum } from "../types/enums.js";
4
+ import { Result as SafeParseResult } from "../types/fp.js";
5
+ import { AnthropicBase64PdfSource } from "./anthropicbase64pdfsource.js";
6
+ import { AnthropicCitationsConfig } from "./anthropiccitationsconfig.js";
7
+ import { AnthropicPlainTextSource } from "./anthropicplaintextsource.js";
8
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
9
+ export type AnthropicDocumentBlockSource = (AnthropicBase64PdfSource & {
10
+ mediaType: "application/pdf";
11
+ }) | (AnthropicPlainTextSource & {
12
+ mediaType: "text/plain";
13
+ }) | discriminatedUnionTypes.Unknown<"mediaType">;
14
+ export declare const AnthropicDocumentBlockType: {
15
+ readonly Document: "document";
16
+ };
17
+ export type AnthropicDocumentBlockType = ClosedEnum<typeof AnthropicDocumentBlockType>;
18
+ export type AnthropicDocumentBlock = {
19
+ citations?: AnthropicCitationsConfig | null | undefined;
20
+ source: (AnthropicBase64PdfSource & {
21
+ mediaType: "application/pdf";
22
+ }) | (AnthropicPlainTextSource & {
23
+ mediaType: "text/plain";
24
+ }) | discriminatedUnionTypes.Unknown<"mediaType">;
25
+ title: string | null;
26
+ type: AnthropicDocumentBlockType;
27
+ };
28
+ /** @internal */
29
+ export declare const AnthropicDocumentBlockSource$inboundSchema: z.ZodType<AnthropicDocumentBlockSource, unknown>;
30
+ export declare function anthropicDocumentBlockSourceFromJSON(jsonString: string): SafeParseResult<AnthropicDocumentBlockSource, SDKValidationError>;
31
+ /** @internal */
32
+ export declare const AnthropicDocumentBlockType$inboundSchema: z.ZodEnum<typeof AnthropicDocumentBlockType>;
33
+ /** @internal */
34
+ export declare const AnthropicDocumentBlock$inboundSchema: z.ZodType<AnthropicDocumentBlock, unknown>;
35
+ export declare function anthropicDocumentBlockFromJSON(jsonString: string): SafeParseResult<AnthropicDocumentBlock, SDKValidationError>;
36
+ //# sourceMappingURL=anthropicdocumentblock.d.ts.map
@@ -0,0 +1,45 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 6aec49691162
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { safeParse } from "../lib/schemas.js";
7
+ import { discriminatedUnion } from "../types/discriminatedUnion.js";
8
+ import { AnthropicBase64PdfSource$inboundSchema, } from "./anthropicbase64pdfsource.js";
9
+ import { AnthropicCitationsConfig$inboundSchema, } from "./anthropiccitationsconfig.js";
10
+ import { AnthropicPlainTextSource$inboundSchema, } from "./anthropicplaintextsource.js";
11
+ export const AnthropicDocumentBlockType = {
12
+ Document: "document",
13
+ };
14
+ /** @internal */
15
+ export const AnthropicDocumentBlockSource$inboundSchema = discriminatedUnion("media_type", {
16
+ ["application/pdf"]: AnthropicBase64PdfSource$inboundSchema.and(z.object({ media_type: z.literal("application/pdf") }).transform((v) => ({
17
+ mediaType: v.media_type,
18
+ }))),
19
+ ["text/plain"]: AnthropicPlainTextSource$inboundSchema.and(z.object({ media_type: z.literal("text/plain") }).transform((v) => ({
20
+ mediaType: v.media_type,
21
+ }))),
22
+ }, { outputPropertyName: "mediaType" });
23
+ export function anthropicDocumentBlockSourceFromJSON(jsonString) {
24
+ return safeParse(jsonString, (x) => AnthropicDocumentBlockSource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AnthropicDocumentBlockSource' from JSON`);
25
+ }
26
+ /** @internal */
27
+ export const AnthropicDocumentBlockType$inboundSchema = z.enum(AnthropicDocumentBlockType);
28
+ /** @internal */
29
+ export const AnthropicDocumentBlock$inboundSchema = z.object({
30
+ citations: z.nullable(AnthropicCitationsConfig$inboundSchema).optional(),
31
+ source: discriminatedUnion("media_type", {
32
+ ["application/pdf"]: AnthropicBase64PdfSource$inboundSchema.and(z.object({ media_type: z.literal("application/pdf") }).transform((v) => ({
33
+ mediaType: v.media_type,
34
+ }))),
35
+ ["text/plain"]: AnthropicPlainTextSource$inboundSchema.and(z.object({ media_type: z.literal("text/plain") }).transform((v) => ({
36
+ mediaType: v.media_type,
37
+ }))),
38
+ }, { outputPropertyName: "mediaType" }),
39
+ title: z.nullable(z.string()),
40
+ type: AnthropicDocumentBlockType$inboundSchema,
41
+ });
42
+ export function anthropicDocumentBlockFromJSON(jsonString) {
43
+ return safeParse(jsonString, (x) => AnthropicDocumentBlock$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AnthropicDocumentBlock' from JSON`);
44
+ }
45
+ //# sourceMappingURL=anthropicdocumentblock.js.map
@@ -15,7 +15,11 @@ export type SourceContent = {
15
15
  content: string | Array<AnthropicImageBlockParam | AnthropicTextBlockParam>;
16
16
  type: "content";
17
17
  };
18
- export type AnthropicDocumentBlockParamSourceUnion = AnthropicBase64PdfSource | AnthropicPlainTextSource | SourceContent | AnthropicUrlPdfSource | AnthropicFileDocumentSource;
18
+ export type AnthropicDocumentBlockParamSourceUnion = (AnthropicBase64PdfSource & {
19
+ type: "base64";
20
+ }) | (AnthropicPlainTextSource & {
21
+ type: "text";
22
+ }) | SourceContent | AnthropicUrlPdfSource | AnthropicFileDocumentSource;
19
23
  export type AnthropicDocumentBlockParam = {
20
24
  /**
21
25
  * Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format.
@@ -23,7 +27,11 @@ export type AnthropicDocumentBlockParam = {
23
27
  cacheControl?: AnthropicCacheControlDirective | undefined;
24
28
  citations?: AnthropicDocumentBlockParamCitations | null | undefined;
25
29
  context?: string | null | undefined;
26
- source: AnthropicBase64PdfSource | AnthropicPlainTextSource | SourceContent | AnthropicUrlPdfSource | AnthropicFileDocumentSource;
30
+ source: (AnthropicBase64PdfSource & {
31
+ type: "base64";
32
+ }) | (AnthropicPlainTextSource & {
33
+ type: "text";
34
+ }) | SourceContent | AnthropicUrlPdfSource | AnthropicFileDocumentSource;
27
35
  title?: string | null | undefined;
28
36
  type: "document";
29
37
  };
@@ -53,7 +61,11 @@ export type SourceContent$Outbound = {
53
61
  export declare const SourceContent$outboundSchema: z.ZodType<SourceContent$Outbound, SourceContent>;
54
62
  export declare function sourceContentToJSON(sourceContent: SourceContent): string;
55
63
  /** @internal */
56
- export type AnthropicDocumentBlockParamSourceUnion$Outbound = AnthropicBase64PdfSource$Outbound | AnthropicPlainTextSource$Outbound | SourceContent$Outbound | AnthropicUrlPdfSource$Outbound | AnthropicFileDocumentSource$Outbound;
64
+ export type AnthropicDocumentBlockParamSourceUnion$Outbound = (AnthropicBase64PdfSource$Outbound & {
65
+ type: "base64";
66
+ }) | (AnthropicPlainTextSource$Outbound & {
67
+ type: "text";
68
+ }) | SourceContent$Outbound | AnthropicUrlPdfSource$Outbound | AnthropicFileDocumentSource$Outbound;
57
69
  /** @internal */
58
70
  export declare const AnthropicDocumentBlockParamSourceUnion$outboundSchema: z.ZodType<AnthropicDocumentBlockParamSourceUnion$Outbound, AnthropicDocumentBlockParamSourceUnion>;
59
71
  export declare function anthropicDocumentBlockParamSourceUnionToJSON(anthropicDocumentBlockParamSourceUnion: AnthropicDocumentBlockParamSourceUnion): string;
@@ -62,7 +74,11 @@ export type AnthropicDocumentBlockParam$Outbound = {
62
74
  cache_control?: AnthropicCacheControlDirective$Outbound | undefined;
63
75
  citations?: AnthropicDocumentBlockParamCitations$Outbound | null | undefined;
64
76
  context?: string | null | undefined;
65
- source: AnthropicBase64PdfSource$Outbound | AnthropicPlainTextSource$Outbound | SourceContent$Outbound | AnthropicUrlPdfSource$Outbound | AnthropicFileDocumentSource$Outbound;
77
+ source: (AnthropicBase64PdfSource$Outbound & {
78
+ type: "base64";
79
+ }) | (AnthropicPlainTextSource$Outbound & {
80
+ type: "text";
81
+ }) | SourceContent$Outbound | AnthropicUrlPdfSource$Outbound | AnthropicFileDocumentSource$Outbound;
66
82
  title?: string | null | undefined;
67
83
  type: "document";
68
84
  };
@@ -53,8 +53,8 @@ export function sourceContentToJSON(sourceContent) {
53
53
  }
54
54
  /** @internal */
55
55
  export const AnthropicDocumentBlockParamSourceUnion$outboundSchema = z.union([
56
- AnthropicBase64PdfSource$outboundSchema,
57
- AnthropicPlainTextSource$outboundSchema,
56
+ AnthropicBase64PdfSource$outboundSchema.and(z.object({ type: z.literal("base64") })),
57
+ AnthropicPlainTextSource$outboundSchema.and(z.object({ type: z.literal("text") })),
58
58
  z.lazy(() => SourceContent$outboundSchema),
59
59
  AnthropicUrlPdfSource$outboundSchema,
60
60
  AnthropicFileDocumentSource$outboundSchema,
@@ -68,8 +68,8 @@ export const AnthropicDocumentBlockParam$outboundSchema = z.object({
68
68
  citations: z.nullable(z.lazy(() => AnthropicDocumentBlockParamCitations$outboundSchema)).optional(),
69
69
  context: z.nullable(z.string()).optional(),
70
70
  source: z.union([
71
- AnthropicBase64PdfSource$outboundSchema,
72
- AnthropicPlainTextSource$outboundSchema,
71
+ AnthropicBase64PdfSource$outboundSchema.and(z.object({ type: z.literal("base64") })),
72
+ AnthropicPlainTextSource$outboundSchema.and(z.object({ type: z.literal("text") })),
73
73
  z.lazy(() => SourceContent$outboundSchema),
74
74
  AnthropicUrlPdfSource$outboundSchema,
75
75
  AnthropicFileDocumentSource$outboundSchema,
@@ -0,0 +1,15 @@
1
+ import * as z from "zod/v4";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { AnthropicCodeExecutionOutput } from "./anthropiccodeexecutionoutput.js";
4
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
+ export type AnthropicEncryptedCodeExecutionResult = {
6
+ content: Array<AnthropicCodeExecutionOutput>;
7
+ encryptedStdout: string;
8
+ returnCode: number;
9
+ stderr: string;
10
+ type: "encrypted_code_execution_result";
11
+ };
12
+ /** @internal */
13
+ export declare const AnthropicEncryptedCodeExecutionResult$inboundSchema: z.ZodType<AnthropicEncryptedCodeExecutionResult, unknown>;
14
+ export declare function anthropicEncryptedCodeExecutionResultFromJSON(jsonString: string): SafeParseResult<AnthropicEncryptedCodeExecutionResult, SDKValidationError>;
15
+ //# sourceMappingURL=anthropicencryptedcodeexecutionresult.d.ts.map
@@ -0,0 +1,25 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 1e1762f68df1
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ import { safeParse } from "../lib/schemas.js";
8
+ import { AnthropicCodeExecutionOutput$inboundSchema, } from "./anthropiccodeexecutionoutput.js";
9
+ /** @internal */
10
+ export const AnthropicEncryptedCodeExecutionResult$inboundSchema = z.object({
11
+ content: z.array(AnthropicCodeExecutionOutput$inboundSchema),
12
+ encrypted_stdout: z.string(),
13
+ return_code: z.int(),
14
+ stderr: z.string(),
15
+ type: z.literal("encrypted_code_execution_result"),
16
+ }).transform((v) => {
17
+ return remap$(v, {
18
+ "encrypted_stdout": "encryptedStdout",
19
+ "return_code": "returnCode",
20
+ });
21
+ });
22
+ export function anthropicEncryptedCodeExecutionResultFromJSON(jsonString) {
23
+ return safeParse(jsonString, (x) => AnthropicEncryptedCodeExecutionResult$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AnthropicEncryptedCodeExecutionResult' from JSON`);
24
+ }
25
+ //# sourceMappingURL=anthropicencryptedcodeexecutionresult.js.map
@@ -0,0 +1,18 @@
1
+ import * as z from "zod/v4";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
+ /**
5
+ * A server-side transformation Anthropic applied to the request input
6
+ */
7
+ export type AnthropicInputTransformation = {
8
+ path?: string | null | undefined;
9
+ reason?: string | null | undefined;
10
+ type: string;
11
+ additionalProperties?: {
12
+ [k: string]: any;
13
+ } | undefined;
14
+ };
15
+ /** @internal */
16
+ export declare const AnthropicInputTransformation$inboundSchema: z.ZodType<AnthropicInputTransformation, unknown>;
17
+ export declare function anthropicInputTransformationFromJSON(jsonString: string): SafeParseResult<AnthropicInputTransformation, SDKValidationError>;
18
+ //# sourceMappingURL=anthropicinputtransformation.d.ts.map
@@ -0,0 +1,16 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 02d29ed9a0c4
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { collectExtraKeys as collectExtraKeys$, safeParse, } from "../lib/schemas.js";
7
+ /** @internal */
8
+ export const AnthropicInputTransformation$inboundSchema = collectExtraKeys$(z.object({
9
+ path: z.nullable(z.string()).optional(),
10
+ reason: z.nullable(z.string()).optional(),
11
+ type: z.string(),
12
+ }).catchall(z.any()), "additionalProperties", true);
13
+ export function anthropicInputTransformationFromJSON(jsonString) {
14
+ return safeParse(jsonString, (x) => AnthropicInputTransformation$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AnthropicInputTransformation' from JSON`);
15
+ }
16
+ //# sourceMappingURL=anthropicinputtransformation.js.map
@@ -0,0 +1,10 @@
1
+ import * as z from "zod/v4";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
+ export type AnthropicOutputTokensDetails = {
5
+ thinkingTokens: number;
6
+ };
7
+ /** @internal */
8
+ export declare const AnthropicOutputTokensDetails$inboundSchema: z.ZodType<AnthropicOutputTokensDetails, unknown>;
9
+ export declare function anthropicOutputTokensDetailsFromJSON(jsonString: string): SafeParseResult<AnthropicOutputTokensDetails, SDKValidationError>;
10
+ //# sourceMappingURL=anthropicoutputtokensdetails.d.ts.map