@openrouter/sdk 1.3.29 → 1.3.30

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 (203) 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/imagegenerationusage.d.ts +4 -4
  165. package/esm/models/imagegenerationusage.js +4 -6
  166. package/esm/models/index.d.ts +75 -0
  167. package/esm/models/index.js +75 -0
  168. package/esm/models/internchatchoice.d.ts +4 -4
  169. package/esm/models/internchatchoice.js +3 -3
  170. package/esm/models/messagesmessageparam.d.ts +8 -8
  171. package/esm/models/messagesmessageparam.js +6 -7
  172. package/esm/models/operations/createbatches.d.ts +59 -0
  173. package/esm/models/operations/createbatches.js +23 -0
  174. package/esm/models/operations/deletebatch.d.ts +58 -0
  175. package/esm/models/operations/deletebatch.js +21 -0
  176. package/esm/models/operations/getbatches.d.ts +58 -0
  177. package/esm/models/operations/getbatches.js +21 -0
  178. package/esm/models/operations/index.d.ts +4 -0
  179. package/esm/models/operations/index.js +4 -0
  180. package/esm/models/operations/listbatches.d.ts +87 -0
  181. package/esm/models/operations/listbatches.js +40 -0
  182. package/esm/models/oranthropicbashtoolresult.d.ts +43 -0
  183. package/esm/models/oranthropicbashtoolresult.js +49 -0
  184. package/esm/models/oranthropiccontentblock.d.ts +25 -0
  185. package/esm/models/oranthropiccontentblock.js +45 -0
  186. package/esm/models/oranthropicnullablecaller.d.ts +12 -0
  187. package/esm/models/oranthropicnullablecaller.js +19 -0
  188. package/esm/models/oranthropicservertooluseblock.d.ts +15 -0
  189. package/esm/models/oranthropicservertooluseblock.js +19 -0
  190. package/esm/models/oranthropicshelltoolresult.d.ts +43 -0
  191. package/esm/models/oranthropicshelltoolresult.js +50 -0
  192. package/esm/models/oranthropicstopreason.d.ts +16 -0
  193. package/esm/models/oranthropicstopreason.js +18 -0
  194. package/esm/models/outputfusionservertoolitem.d.ts +8 -8
  195. package/esm/models/outputfusionservertoolitem.js +8 -8
  196. package/esm/models/submitgenerationfeedbackrequest.d.ts +4 -4
  197. package/esm/models/submitgenerationfeedbackrequest.js +3 -4
  198. package/esm/sdk/batch.d.ts +37 -0
  199. package/esm/sdk/batch.js +50 -0
  200. package/esm/sdk/sdk.d.ts +3 -0
  201. package/esm/sdk/sdk.js +4 -0
  202. package/jsr.json +1 -1
  203. package/package.json +6 -6
@@ -0,0 +1,19 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 1c1cbd5cc017
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 AnthropicOutputTokensDetails$inboundSchema = z.object({
10
+ thinking_tokens: z.int(),
11
+ }).transform((v) => {
12
+ return remap$(v, {
13
+ "thinking_tokens": "thinkingTokens",
14
+ });
15
+ });
16
+ export function anthropicOutputTokensDetailsFromJSON(jsonString) {
17
+ return safeParse(jsonString, (x) => AnthropicOutputTokensDetails$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AnthropicOutputTokensDetails' from JSON`);
18
+ }
19
+ //# sourceMappingURL=anthropicoutputtokensdetails.js.map
@@ -1,23 +1,38 @@
1
1
  import * as z from "zod/v4";
2
2
  import { ClosedEnum } from "../types/enums.js";
3
+ import { Result as SafeParseResult } from "../types/fp.js";
4
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
3
5
  export declare const AnthropicPlainTextSourceMediaType: {
4
6
  readonly TextPlain: "text/plain";
5
7
  };
6
8
  export type AnthropicPlainTextSourceMediaType = ClosedEnum<typeof AnthropicPlainTextSourceMediaType>;
9
+ export declare const AnthropicPlainTextSourceType: {
10
+ readonly Text: "text";
11
+ };
12
+ export type AnthropicPlainTextSourceType = ClosedEnum<typeof AnthropicPlainTextSourceType>;
7
13
  export type AnthropicPlainTextSource = {
8
14
  data: string;
9
15
  mediaType: AnthropicPlainTextSourceMediaType;
10
- type: "text";
16
+ type: AnthropicPlainTextSourceType;
11
17
  };
12
18
  /** @internal */
19
+ export declare const AnthropicPlainTextSourceMediaType$inboundSchema: z.ZodEnum<typeof AnthropicPlainTextSourceMediaType>;
20
+ /** @internal */
13
21
  export declare const AnthropicPlainTextSourceMediaType$outboundSchema: z.ZodEnum<typeof AnthropicPlainTextSourceMediaType>;
14
22
  /** @internal */
23
+ export declare const AnthropicPlainTextSourceType$inboundSchema: z.ZodEnum<typeof AnthropicPlainTextSourceType>;
24
+ /** @internal */
25
+ export declare const AnthropicPlainTextSourceType$outboundSchema: z.ZodEnum<typeof AnthropicPlainTextSourceType>;
26
+ /** @internal */
27
+ export declare const AnthropicPlainTextSource$inboundSchema: z.ZodType<AnthropicPlainTextSource, unknown>;
28
+ /** @internal */
15
29
  export type AnthropicPlainTextSource$Outbound = {
16
30
  data: string;
17
31
  media_type: string;
18
- type: "text";
32
+ type: string;
19
33
  };
20
34
  /** @internal */
21
35
  export declare const AnthropicPlainTextSource$outboundSchema: z.ZodType<AnthropicPlainTextSource$Outbound, AnthropicPlainTextSource>;
22
36
  export declare function anthropicPlainTextSourceToJSON(anthropicPlainTextSource: AnthropicPlainTextSource): string;
37
+ export declare function anthropicPlainTextSourceFromJSON(jsonString: string): SafeParseResult<AnthropicPlainTextSource, SDKValidationError>;
23
38
  //# sourceMappingURL=anthropicplaintextsource.d.ts.map
@@ -4,16 +4,36 @@
4
4
  */
5
5
  import * as z from "zod/v4";
6
6
  import { remap as remap$ } from "../lib/primitives.js";
7
+ import { safeParse } from "../lib/schemas.js";
7
8
  export const AnthropicPlainTextSourceMediaType = {
8
9
  TextPlain: "text/plain",
9
10
  };
11
+ export const AnthropicPlainTextSourceType = {
12
+ Text: "text",
13
+ };
14
+ /** @internal */
15
+ export const AnthropicPlainTextSourceMediaType$inboundSchema = z.enum(AnthropicPlainTextSourceMediaType);
16
+ /** @internal */
17
+ export const AnthropicPlainTextSourceMediaType$outboundSchema = AnthropicPlainTextSourceMediaType$inboundSchema;
10
18
  /** @internal */
11
- export const AnthropicPlainTextSourceMediaType$outboundSchema = z.enum(AnthropicPlainTextSourceMediaType);
19
+ export const AnthropicPlainTextSourceType$inboundSchema = z.enum(AnthropicPlainTextSourceType);
20
+ /** @internal */
21
+ export const AnthropicPlainTextSourceType$outboundSchema = AnthropicPlainTextSourceType$inboundSchema;
22
+ /** @internal */
23
+ export const AnthropicPlainTextSource$inboundSchema = z.object({
24
+ data: z.string(),
25
+ media_type: AnthropicPlainTextSourceMediaType$inboundSchema,
26
+ type: AnthropicPlainTextSourceType$inboundSchema,
27
+ }).transform((v) => {
28
+ return remap$(v, {
29
+ "media_type": "mediaType",
30
+ });
31
+ });
12
32
  /** @internal */
13
33
  export const AnthropicPlainTextSource$outboundSchema = z.object({
14
34
  data: z.string(),
15
35
  mediaType: AnthropicPlainTextSourceMediaType$outboundSchema,
16
- type: z.literal("text"),
36
+ type: AnthropicPlainTextSourceType$outboundSchema,
17
37
  }).transform((v) => {
18
38
  return remap$(v, {
19
39
  mediaType: "media_type",
@@ -22,4 +42,7 @@ export const AnthropicPlainTextSource$outboundSchema = z.object({
22
42
  export function anthropicPlainTextSourceToJSON(anthropicPlainTextSource) {
23
43
  return JSON.stringify(AnthropicPlainTextSource$outboundSchema.parse(anthropicPlainTextSource));
24
44
  }
45
+ export function anthropicPlainTextSourceFromJSON(jsonString) {
46
+ return safeParse(jsonString, (x) => AnthropicPlainTextSource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AnthropicPlainTextSource' from JSON`);
47
+ }
25
48
  //# sourceMappingURL=anthropicplaintextsource.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 AnthropicRedactedThinkingBlock = {
5
+ data: string;
6
+ type: "redacted_thinking";
7
+ };
8
+ /** @internal */
9
+ export declare const AnthropicRedactedThinkingBlock$inboundSchema: z.ZodType<AnthropicRedactedThinkingBlock, unknown>;
10
+ export declare function anthropicRedactedThinkingBlockFromJSON(jsonString: string): SafeParseResult<AnthropicRedactedThinkingBlock, SDKValidationError>;
11
+ //# sourceMappingURL=anthropicredactedthinkingblock.d.ts.map
@@ -0,0 +1,15 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 9217d8bb8656
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { safeParse } from "../lib/schemas.js";
7
+ /** @internal */
8
+ export const AnthropicRedactedThinkingBlock$inboundSchema = z.object({
9
+ data: z.string(),
10
+ type: z.literal("redacted_thinking"),
11
+ });
12
+ export function anthropicRedactedThinkingBlockFromJSON(jsonString) {
13
+ return safeParse(jsonString, (x) => AnthropicRedactedThinkingBlock$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AnthropicRedactedThinkingBlock' from JSON`);
14
+ }
15
+ //# sourceMappingURL=anthropicredactedthinkingblock.js.map
@@ -0,0 +1,32 @@
1
+ import * as z from "zod/v4";
2
+ import { ClosedEnum, 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 AnthropicRefusalStopDetailsCategory: {
6
+ readonly Cyber: "cyber";
7
+ readonly Bio: "bio";
8
+ readonly FrontierLlm: "frontier_llm";
9
+ readonly ReasoningExtraction: "reasoning_extraction";
10
+ readonly GeneralHarms: "general_harms";
11
+ };
12
+ export type AnthropicRefusalStopDetailsCategory = OpenEnum<typeof AnthropicRefusalStopDetailsCategory>;
13
+ export declare const AnthropicRefusalStopDetailsType: {
14
+ readonly Refusal: "refusal";
15
+ };
16
+ export type AnthropicRefusalStopDetailsType = ClosedEnum<typeof AnthropicRefusalStopDetailsType>;
17
+ /**
18
+ * Structured information about a refusal
19
+ */
20
+ export type AnthropicRefusalStopDetails = {
21
+ category: AnthropicRefusalStopDetailsCategory | null;
22
+ explanation: string | null;
23
+ type: AnthropicRefusalStopDetailsType;
24
+ };
25
+ /** @internal */
26
+ export declare const AnthropicRefusalStopDetailsCategory$inboundSchema: z.ZodType<AnthropicRefusalStopDetailsCategory, unknown>;
27
+ /** @internal */
28
+ export declare const AnthropicRefusalStopDetailsType$inboundSchema: z.ZodEnum<typeof AnthropicRefusalStopDetailsType>;
29
+ /** @internal */
30
+ export declare const AnthropicRefusalStopDetails$inboundSchema: z.ZodType<AnthropicRefusalStopDetails, unknown>;
31
+ export declare function anthropicRefusalStopDetailsFromJSON(jsonString: string): SafeParseResult<AnthropicRefusalStopDetails, SDKValidationError>;
32
+ //# sourceMappingURL=anthropicrefusalstopdetails.d.ts.map
@@ -0,0 +1,31 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 62e4a3cb8de1
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { safeParse } from "../lib/schemas.js";
7
+ import * as openEnums from "../types/enums.js";
8
+ export const AnthropicRefusalStopDetailsCategory = {
9
+ Cyber: "cyber",
10
+ Bio: "bio",
11
+ FrontierLlm: "frontier_llm",
12
+ ReasoningExtraction: "reasoning_extraction",
13
+ GeneralHarms: "general_harms",
14
+ };
15
+ export const AnthropicRefusalStopDetailsType = {
16
+ Refusal: "refusal",
17
+ };
18
+ /** @internal */
19
+ export const AnthropicRefusalStopDetailsCategory$inboundSchema = openEnums.inboundSchema(AnthropicRefusalStopDetailsCategory);
20
+ /** @internal */
21
+ export const AnthropicRefusalStopDetailsType$inboundSchema = z.enum(AnthropicRefusalStopDetailsType);
22
+ /** @internal */
23
+ export const AnthropicRefusalStopDetails$inboundSchema = z.object({
24
+ category: z.nullable(AnthropicRefusalStopDetailsCategory$inboundSchema),
25
+ explanation: z.nullable(z.string()),
26
+ type: AnthropicRefusalStopDetailsType$inboundSchema,
27
+ });
28
+ export function anthropicRefusalStopDetailsFromJSON(jsonString) {
29
+ return safeParse(jsonString, (x) => AnthropicRefusalStopDetails$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AnthropicRefusalStopDetails' from JSON`);
30
+ }
31
+ //# sourceMappingURL=anthropicrefusalstopdetails.js.map
@@ -0,0 +1,12 @@
1
+ import * as z from "zod/v4";
2
+ import { OpenEnum } from "../types/enums.js";
3
+ export declare const AnthropicServerToolErrorCode: {
4
+ readonly InvalidToolInput: "invalid_tool_input";
5
+ readonly Unavailable: "unavailable";
6
+ readonly TooManyRequests: "too_many_requests";
7
+ readonly ExecutionTimeExceeded: "execution_time_exceeded";
8
+ };
9
+ export type AnthropicServerToolErrorCode = OpenEnum<typeof AnthropicServerToolErrorCode>;
10
+ /** @internal */
11
+ export declare const AnthropicServerToolErrorCode$inboundSchema: z.ZodType<AnthropicServerToolErrorCode, unknown>;
12
+ //# sourceMappingURL=anthropicservertoolerrorcode.d.ts.map
@@ -0,0 +1,14 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 822c5d079562
4
+ */
5
+ import * as openEnums from "../types/enums.js";
6
+ export const AnthropicServerToolErrorCode = {
7
+ InvalidToolInput: "invalid_tool_input",
8
+ Unavailable: "unavailable",
9
+ TooManyRequests: "too_many_requests",
10
+ ExecutionTimeExceeded: "execution_time_exceeded",
11
+ };
12
+ /** @internal */
13
+ export const AnthropicServerToolErrorCode$inboundSchema = openEnums.inboundSchema(AnthropicServerToolErrorCode);
14
+ //# sourceMappingURL=anthropicservertoolerrorcode.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 AnthropicServerToolUsage = {
5
+ webFetchRequests: number;
6
+ webSearchRequests: number;
7
+ };
8
+ /** @internal */
9
+ export declare const AnthropicServerToolUsage$inboundSchema: z.ZodType<AnthropicServerToolUsage, unknown>;
10
+ export declare function anthropicServerToolUsageFromJSON(jsonString: string): SafeParseResult<AnthropicServerToolUsage, SDKValidationError>;
11
+ //# sourceMappingURL=anthropicservertoolusage.d.ts.map
@@ -0,0 +1,21 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 71a8b24aad61
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 AnthropicServerToolUsage$inboundSchema = z.object({
10
+ web_fetch_requests: z.int(),
11
+ web_search_requests: z.int(),
12
+ }).transform((v) => {
13
+ return remap$(v, {
14
+ "web_fetch_requests": "webFetchRequests",
15
+ "web_search_requests": "webSearchRequests",
16
+ });
17
+ });
18
+ export function anthropicServerToolUsageFromJSON(jsonString) {
19
+ return safeParse(jsonString, (x) => AnthropicServerToolUsage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AnthropicServerToolUsage' from JSON`);
20
+ }
21
+ //# sourceMappingURL=anthropicservertoolusage.js.map
@@ -0,0 +1,11 @@
1
+ import * as z from "zod/v4";
2
+ import { OpenEnum } from "../types/enums.js";
3
+ export declare const AnthropicServiceTier: {
4
+ readonly Standard: "standard";
5
+ readonly Priority: "priority";
6
+ readonly Batch: "batch";
7
+ };
8
+ export type AnthropicServiceTier = OpenEnum<typeof AnthropicServiceTier>;
9
+ /** @internal */
10
+ export declare const AnthropicServiceTier$inboundSchema: z.ZodType<AnthropicServiceTier, unknown>;
11
+ //# sourceMappingURL=anthropicservicetier.d.ts.map
@@ -0,0 +1,13 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 414847377bd6
4
+ */
5
+ import * as openEnums from "../types/enums.js";
6
+ export const AnthropicServiceTier = {
7
+ Standard: "standard",
8
+ Priority: "priority",
9
+ Batch: "batch",
10
+ };
11
+ /** @internal */
12
+ export const AnthropicServiceTier$inboundSchema = openEnums.inboundSchema(AnthropicServiceTier);
13
+ //# sourceMappingURL=anthropicservicetier.js.map
@@ -0,0 +1,13 @@
1
+ import * as z from "zod/v4";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { AnthropicTextCitation } from "./anthropictextcitation.js";
4
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
+ export type AnthropicTextBlock = {
6
+ citations: Array<AnthropicTextCitation> | null;
7
+ text: string;
8
+ type: "text";
9
+ };
10
+ /** @internal */
11
+ export declare const AnthropicTextBlock$inboundSchema: z.ZodType<AnthropicTextBlock, unknown>;
12
+ export declare function anthropicTextBlockFromJSON(jsonString: string): SafeParseResult<AnthropicTextBlock, SDKValidationError>;
13
+ //# sourceMappingURL=anthropictextblock.d.ts.map
@@ -0,0 +1,17 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 92842709fc4d
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { safeParse } from "../lib/schemas.js";
7
+ import { AnthropicTextCitation$inboundSchema, } from "./anthropictextcitation.js";
8
+ /** @internal */
9
+ export const AnthropicTextBlock$inboundSchema = z.object({
10
+ citations: z.nullable(z.array(AnthropicTextCitation$inboundSchema)),
11
+ text: z.string(),
12
+ type: z.literal("text"),
13
+ });
14
+ export function anthropicTextBlockFromJSON(jsonString) {
15
+ return safeParse(jsonString, (x) => AnthropicTextBlock$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AnthropicTextBlock' from JSON`);
16
+ }
17
+ //# sourceMappingURL=anthropictextblock.js.map
@@ -0,0 +1,14 @@
1
+ import * as z from "zod/v4";
2
+ import * as discriminatedUnionTypes from "../types/discriminatedUnion.js";
3
+ import { Result as SafeParseResult } from "../types/fp.js";
4
+ import { AnthropicCitationCharLocation } from "./anthropiccitationcharlocation.js";
5
+ import { AnthropicCitationContentBlockLocation } from "./anthropiccitationcontentblocklocation.js";
6
+ import { AnthropicCitationPageLocation } from "./anthropiccitationpagelocation.js";
7
+ import { AnthropicCitationSearchResultLocation } from "./anthropiccitationsearchresultlocation.js";
8
+ import { AnthropicCitationWebSearchResultLocation } from "./anthropiccitationwebsearchresultlocation.js";
9
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
10
+ export type AnthropicTextCitation = AnthropicCitationCharLocation | AnthropicCitationContentBlockLocation | AnthropicCitationPageLocation | AnthropicCitationSearchResultLocation | AnthropicCitationWebSearchResultLocation | discriminatedUnionTypes.Unknown<"type">;
11
+ /** @internal */
12
+ export declare const AnthropicTextCitation$inboundSchema: z.ZodType<AnthropicTextCitation, unknown>;
13
+ export declare function anthropicTextCitationFromJSON(jsonString: string): SafeParseResult<AnthropicTextCitation, SDKValidationError>;
14
+ //# sourceMappingURL=anthropictextcitation.d.ts.map
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: fe7e58a48729
4
+ */
5
+ import { safeParse } from "../lib/schemas.js";
6
+ import { discriminatedUnion } from "../types/discriminatedUnion.js";
7
+ import { AnthropicCitationCharLocation$inboundSchema, } from "./anthropiccitationcharlocation.js";
8
+ import { AnthropicCitationContentBlockLocation$inboundSchema, } from "./anthropiccitationcontentblocklocation.js";
9
+ import { AnthropicCitationPageLocation$inboundSchema, } from "./anthropiccitationpagelocation.js";
10
+ import { AnthropicCitationSearchResultLocation$inboundSchema, } from "./anthropiccitationsearchresultlocation.js";
11
+ import { AnthropicCitationWebSearchResultLocation$inboundSchema, } from "./anthropiccitationwebsearchresultlocation.js";
12
+ /** @internal */
13
+ export const AnthropicTextCitation$inboundSchema = discriminatedUnion("type", {
14
+ char_location: AnthropicCitationCharLocation$inboundSchema,
15
+ content_block_location: AnthropicCitationContentBlockLocation$inboundSchema,
16
+ page_location: AnthropicCitationPageLocation$inboundSchema,
17
+ search_result_location: AnthropicCitationSearchResultLocation$inboundSchema,
18
+ web_search_result_location: AnthropicCitationWebSearchResultLocation$inboundSchema,
19
+ });
20
+ export function anthropicTextCitationFromJSON(jsonString) {
21
+ return safeParse(jsonString, (x) => AnthropicTextCitation$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AnthropicTextCitation' from JSON`);
22
+ }
23
+ //# sourceMappingURL=anthropictextcitation.js.map
@@ -0,0 +1,13 @@
1
+ import * as z from "zod/v4";
2
+ import * as discriminatedUnionTypes from "../types/discriminatedUnion.js";
3
+ import { Result as SafeParseResult } from "../types/fp.js";
4
+ import { AnthropicTextEditorCodeExecutionCreateResult } from "./anthropictexteditorcodeexecutioncreateresult.js";
5
+ import { AnthropicTextEditorCodeExecutionStrReplaceResult } from "./anthropictexteditorcodeexecutionstrreplaceresult.js";
6
+ import { AnthropicTextEditorCodeExecutionToolResultError } from "./anthropictexteditorcodeexecutiontoolresulterror.js";
7
+ import { AnthropicTextEditorCodeExecutionViewResult } from "./anthropictexteditorcodeexecutionviewresult.js";
8
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
9
+ export type AnthropicTextEditorCodeExecutionContent = AnthropicTextEditorCodeExecutionCreateResult | AnthropicTextEditorCodeExecutionStrReplaceResult | AnthropicTextEditorCodeExecutionToolResultError | AnthropicTextEditorCodeExecutionViewResult | discriminatedUnionTypes.Unknown<"type">;
10
+ /** @internal */
11
+ export declare const AnthropicTextEditorCodeExecutionContent$inboundSchema: z.ZodType<AnthropicTextEditorCodeExecutionContent, unknown>;
12
+ export declare function anthropicTextEditorCodeExecutionContentFromJSON(jsonString: string): SafeParseResult<AnthropicTextEditorCodeExecutionContent, SDKValidationError>;
13
+ //# sourceMappingURL=anthropictexteditorcodeexecutioncontent.d.ts.map
@@ -0,0 +1,21 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 832ee7a5e28a
4
+ */
5
+ import { safeParse } from "../lib/schemas.js";
6
+ import { discriminatedUnion } from "../types/discriminatedUnion.js";
7
+ import { AnthropicTextEditorCodeExecutionCreateResult$inboundSchema, } from "./anthropictexteditorcodeexecutioncreateresult.js";
8
+ import { AnthropicTextEditorCodeExecutionStrReplaceResult$inboundSchema, } from "./anthropictexteditorcodeexecutionstrreplaceresult.js";
9
+ import { AnthropicTextEditorCodeExecutionToolResultError$inboundSchema, } from "./anthropictexteditorcodeexecutiontoolresulterror.js";
10
+ import { AnthropicTextEditorCodeExecutionViewResult$inboundSchema, } from "./anthropictexteditorcodeexecutionviewresult.js";
11
+ /** @internal */
12
+ export const AnthropicTextEditorCodeExecutionContent$inboundSchema = discriminatedUnion("type", {
13
+ text_editor_code_execution_create_result: AnthropicTextEditorCodeExecutionCreateResult$inboundSchema,
14
+ text_editor_code_execution_str_replace_result: AnthropicTextEditorCodeExecutionStrReplaceResult$inboundSchema,
15
+ text_editor_code_execution_tool_result_error: AnthropicTextEditorCodeExecutionToolResultError$inboundSchema,
16
+ text_editor_code_execution_view_result: AnthropicTextEditorCodeExecutionViewResult$inboundSchema,
17
+ });
18
+ export function anthropicTextEditorCodeExecutionContentFromJSON(jsonString) {
19
+ return safeParse(jsonString, (x) => AnthropicTextEditorCodeExecutionContent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AnthropicTextEditorCodeExecutionContent' from JSON`);
20
+ }
21
+ //# sourceMappingURL=anthropictexteditorcodeexecutioncontent.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 AnthropicTextEditorCodeExecutionCreateResult = {
5
+ isFileUpdate: boolean;
6
+ type: "text_editor_code_execution_create_result";
7
+ };
8
+ /** @internal */
9
+ export declare const AnthropicTextEditorCodeExecutionCreateResult$inboundSchema: z.ZodType<AnthropicTextEditorCodeExecutionCreateResult, unknown>;
10
+ export declare function anthropicTextEditorCodeExecutionCreateResultFromJSON(jsonString: string): SafeParseResult<AnthropicTextEditorCodeExecutionCreateResult, SDKValidationError>;
11
+ //# sourceMappingURL=anthropictexteditorcodeexecutioncreateresult.d.ts.map
@@ -0,0 +1,20 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 86635cf190c0
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 AnthropicTextEditorCodeExecutionCreateResult$inboundSchema = z.object({
10
+ is_file_update: z.boolean(),
11
+ type: z.literal("text_editor_code_execution_create_result"),
12
+ }).transform((v) => {
13
+ return remap$(v, {
14
+ "is_file_update": "isFileUpdate",
15
+ });
16
+ });
17
+ export function anthropicTextEditorCodeExecutionCreateResultFromJSON(jsonString) {
18
+ return safeParse(jsonString, (x) => AnthropicTextEditorCodeExecutionCreateResult$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AnthropicTextEditorCodeExecutionCreateResult' from JSON`);
19
+ }
20
+ //# sourceMappingURL=anthropictexteditorcodeexecutioncreateresult.js.map
@@ -0,0 +1,15 @@
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 AnthropicTextEditorCodeExecutionStrReplaceResult = {
5
+ lines: Array<string> | null;
6
+ newLines: number | null;
7
+ newStart: number | null;
8
+ oldLines: number | null;
9
+ oldStart: number | null;
10
+ type: "text_editor_code_execution_str_replace_result";
11
+ };
12
+ /** @internal */
13
+ export declare const AnthropicTextEditorCodeExecutionStrReplaceResult$inboundSchema: z.ZodType<AnthropicTextEditorCodeExecutionStrReplaceResult, unknown>;
14
+ export declare function anthropicTextEditorCodeExecutionStrReplaceResultFromJSON(jsonString: string): SafeParseResult<AnthropicTextEditorCodeExecutionStrReplaceResult, SDKValidationError>;
15
+ //# sourceMappingURL=anthropictexteditorcodeexecutionstrreplaceresult.d.ts.map
@@ -0,0 +1,28 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: fed740239a98
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 AnthropicTextEditorCodeExecutionStrReplaceResult$inboundSchema = z
10
+ .object({
11
+ lines: z.nullable(z.array(z.string())),
12
+ new_lines: z.nullable(z.int()),
13
+ new_start: z.nullable(z.int()),
14
+ old_lines: z.nullable(z.int()),
15
+ old_start: z.nullable(z.int()),
16
+ type: z.literal("text_editor_code_execution_str_replace_result"),
17
+ }).transform((v) => {
18
+ return remap$(v, {
19
+ "new_lines": "newLines",
20
+ "new_start": "newStart",
21
+ "old_lines": "oldLines",
22
+ "old_start": "oldStart",
23
+ });
24
+ });
25
+ export function anthropicTextEditorCodeExecutionStrReplaceResultFromJSON(jsonString) {
26
+ return safeParse(jsonString, (x) => AnthropicTextEditorCodeExecutionStrReplaceResult$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AnthropicTextEditorCodeExecutionStrReplaceResult' from JSON`);
27
+ }
28
+ //# sourceMappingURL=anthropictexteditorcodeexecutionstrreplaceresult.js.map
@@ -0,0 +1,13 @@
1
+ import * as z from "zod/v4";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { AnthropicTextEditorCodeExecutionContent } from "./anthropictexteditorcodeexecutioncontent.js";
4
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
+ export type AnthropicTextEditorCodeExecutionToolResult = {
6
+ content: AnthropicTextEditorCodeExecutionContent;
7
+ toolUseId: string;
8
+ type: "text_editor_code_execution_tool_result";
9
+ };
10
+ /** @internal */
11
+ export declare const AnthropicTextEditorCodeExecutionToolResult$inboundSchema: z.ZodType<AnthropicTextEditorCodeExecutionToolResult, unknown>;
12
+ export declare function anthropicTextEditorCodeExecutionToolResultFromJSON(jsonString: string): SafeParseResult<AnthropicTextEditorCodeExecutionToolResult, SDKValidationError>;
13
+ //# sourceMappingURL=anthropictexteditorcodeexecutiontoolresult.d.ts.map
@@ -0,0 +1,22 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: aec07db74637
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 { AnthropicTextEditorCodeExecutionContent$inboundSchema, } from "./anthropictexteditorcodeexecutioncontent.js";
9
+ /** @internal */
10
+ export const AnthropicTextEditorCodeExecutionToolResult$inboundSchema = z.object({
11
+ content: AnthropicTextEditorCodeExecutionContent$inboundSchema,
12
+ tool_use_id: z.string(),
13
+ type: z.literal("text_editor_code_execution_tool_result"),
14
+ }).transform((v) => {
15
+ return remap$(v, {
16
+ "tool_use_id": "toolUseId",
17
+ });
18
+ });
19
+ export function anthropicTextEditorCodeExecutionToolResultFromJSON(jsonString) {
20
+ return safeParse(jsonString, (x) => AnthropicTextEditorCodeExecutionToolResult$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AnthropicTextEditorCodeExecutionToolResult' from JSON`);
21
+ }
22
+ //# sourceMappingURL=anthropictexteditorcodeexecutiontoolresult.js.map
@@ -0,0 +1,23 @@
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 AnthropicTextEditorCodeExecutionToolResultErrorErrorCode: {
6
+ readonly InvalidToolInput: "invalid_tool_input";
7
+ readonly Unavailable: "unavailable";
8
+ readonly TooManyRequests: "too_many_requests";
9
+ readonly ExecutionTimeExceeded: "execution_time_exceeded";
10
+ readonly FileNotFound: "file_not_found";
11
+ };
12
+ export type AnthropicTextEditorCodeExecutionToolResultErrorErrorCode = OpenEnum<typeof AnthropicTextEditorCodeExecutionToolResultErrorErrorCode>;
13
+ export type AnthropicTextEditorCodeExecutionToolResultError = {
14
+ errorCode: AnthropicTextEditorCodeExecutionToolResultErrorErrorCode;
15
+ errorMessage: string | null;
16
+ type: "text_editor_code_execution_tool_result_error";
17
+ };
18
+ /** @internal */
19
+ export declare const AnthropicTextEditorCodeExecutionToolResultErrorErrorCode$inboundSchema: z.ZodType<AnthropicTextEditorCodeExecutionToolResultErrorErrorCode, unknown>;
20
+ /** @internal */
21
+ export declare const AnthropicTextEditorCodeExecutionToolResultError$inboundSchema: z.ZodType<AnthropicTextEditorCodeExecutionToolResultError, unknown>;
22
+ export declare function anthropicTextEditorCodeExecutionToolResultErrorFromJSON(jsonString: string): SafeParseResult<AnthropicTextEditorCodeExecutionToolResultError, SDKValidationError>;
23
+ //# sourceMappingURL=anthropictexteditorcodeexecutiontoolresulterror.d.ts.map
@@ -0,0 +1,33 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: ccf083ba6bce
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 AnthropicTextEditorCodeExecutionToolResultErrorErrorCode = {
10
+ InvalidToolInput: "invalid_tool_input",
11
+ Unavailable: "unavailable",
12
+ TooManyRequests: "too_many_requests",
13
+ ExecutionTimeExceeded: "execution_time_exceeded",
14
+ FileNotFound: "file_not_found",
15
+ };
16
+ /** @internal */
17
+ export const AnthropicTextEditorCodeExecutionToolResultErrorErrorCode$inboundSchema = openEnums.inboundSchema(AnthropicTextEditorCodeExecutionToolResultErrorErrorCode);
18
+ /** @internal */
19
+ export const AnthropicTextEditorCodeExecutionToolResultError$inboundSchema = z
20
+ .object({
21
+ error_code: AnthropicTextEditorCodeExecutionToolResultErrorErrorCode$inboundSchema,
22
+ error_message: z.nullable(z.string()),
23
+ type: z.literal("text_editor_code_execution_tool_result_error"),
24
+ }).transform((v) => {
25
+ return remap$(v, {
26
+ "error_code": "errorCode",
27
+ "error_message": "errorMessage",
28
+ });
29
+ });
30
+ export function anthropicTextEditorCodeExecutionToolResultErrorFromJSON(jsonString) {
31
+ return safeParse(jsonString, (x) => AnthropicTextEditorCodeExecutionToolResultError$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AnthropicTextEditorCodeExecutionToolResultError' from JSON`);
32
+ }
33
+ //# sourceMappingURL=anthropictexteditorcodeexecutiontoolresulterror.js.map
@@ -0,0 +1,24 @@
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 FileType: {
6
+ readonly Text: "text";
7
+ readonly Image: "image";
8
+ readonly Pdf: "pdf";
9
+ };
10
+ export type FileType = OpenEnum<typeof FileType>;
11
+ export type AnthropicTextEditorCodeExecutionViewResult = {
12
+ content: string;
13
+ fileType: FileType;
14
+ numLines: number | null;
15
+ startLine: number | null;
16
+ totalLines: number | null;
17
+ type: "text_editor_code_execution_view_result";
18
+ };
19
+ /** @internal */
20
+ export declare const FileType$inboundSchema: z.ZodType<FileType, unknown>;
21
+ /** @internal */
22
+ export declare const AnthropicTextEditorCodeExecutionViewResult$inboundSchema: z.ZodType<AnthropicTextEditorCodeExecutionViewResult, unknown>;
23
+ export declare function anthropicTextEditorCodeExecutionViewResultFromJSON(jsonString: string): SafeParseResult<AnthropicTextEditorCodeExecutionViewResult, SDKValidationError>;
24
+ //# sourceMappingURL=anthropictexteditorcodeexecutionviewresult.d.ts.map