@effect/ai-anthropic 0.9.2 → 0.9.4
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.
- package/dist/cjs/Generated.js +1324 -449
- package/dist/cjs/Generated.js.map +1 -1
- package/dist/dts/Generated.d.ts +2224 -535
- package/dist/dts/Generated.d.ts.map +1 -1
- package/dist/esm/Generated.js +1112 -370
- package/dist/esm/Generated.js.map +1 -1
- package/package.json +4 -4
- package/src/Generated.ts +1350 -477
package/dist/cjs/Generated.js
CHANGED
|
@@ -3,9 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
7
|
-
exports.
|
|
8
|
-
exports.
|
|
6
|
+
exports.BetaModelInfoType = exports.BetaModelInfo = exports.BetaMetadata = exports.BetaMessagesPostParams = exports.BetaMessagesCountTokensPostParams = exports.BetaMessageType = exports.BetaMessageRole = exports.BetaMessageBatchesRetrieveParams = exports.BetaMessageBatchesResultsParams = exports.BetaMessageBatchesPostParams = exports.BetaMessageBatchesListParams = exports.BetaMessageBatchesDeleteParams = exports.BetaMessageBatchesCancelParams = exports.BetaMessageBatchType = exports.BetaMessageBatchProcessingStatus = exports.BetaMessageBatchIndividualRequestParams = exports.BetaMessageBatch = exports.BetaMessage = exports.BetaListResponseModelInfo = exports.BetaListResponseMessageBatch = exports.BetaListFilesV1FilesGetParams = exports.BetaInvalidRequestErrorType = exports.BetaInvalidRequestError = exports.BetaInputSchemaType = exports.BetaInputSchema = exports.BetaInputMessageRole = exports.BetaInputMessage = exports.BetaInputContentBlock = exports.BetaGetFileMetadataV1FilesFileIdGetParams = exports.BetaGatewayTimeoutErrorType = exports.BetaGatewayTimeoutError = exports.BetaFileMetadataSchemaType = exports.BetaFileMetadataSchema = exports.BetaFileListResponse = exports.BetaFileImageSourceType = exports.BetaFileImageSource = exports.BetaFileDocumentSourceType = exports.BetaFileDocumentSource = exports.BetaFileDeleteResponseType = exports.BetaFileDeleteResponse = exports.BetaErrorResponseType = exports.BetaErrorResponse = exports.BetaDownloadFileV1FilesFileIdContentGetParams = exports.BetaDeleteMessageBatchResponseType = exports.BetaDeleteMessageBatchResponse = exports.BetaDeleteFileV1FilesFileIdDeleteParams = exports.BetaCreateMessageParamsServiceTier = exports.BetaCreateMessageParams = exports.BetaCreateMessageBatchParams = exports.BetaCountMessageTokensResponse = exports.BetaCountMessageTokensParams = exports.BetaContentBlockSourceType = exports.BetaContentBlockSource = exports.BetaContentBlock = exports.BetaContainer = exports.BetaComputerUseTool20250124Type = exports.BetaComputerUseTool20250124Name = exports.BetaComputerUseTool20250124 = exports.BetaComputerUseTool20241022Type = exports.BetaComputerUseTool20241022Name = exports.BetaComputerUseTool20241022 = exports.BetaCodeExecutionToolResultErrorCode = exports.BetaCodeExecutionTool20250522Type = exports.BetaCodeExecutionTool20250522Name = exports.BetaCodeExecutionTool20250522 = exports.BetaCacheCreation = exports.BetaCacheControlEphemeralType = exports.BetaCacheControlEphemeralTtl = exports.BetaCacheControlEphemeral = exports.BetaBillingErrorType = exports.BetaBillingError = exports.BetaBashTool20250124Type = exports.BetaBashTool20250124Name = exports.BetaBashTool20250124 = exports.BetaBashTool20241022Type = exports.BetaBashTool20241022Name = exports.BetaBashTool20241022 = exports.BetaBase64PDFSourceType = exports.BetaBase64PDFSourceMediaType = exports.BetaBase64PDFSource = exports.BetaBase64ImageSourceType = exports.BetaBase64ImageSourceMediaType = exports.BetaBase64ImageSource = exports.BetaAuthenticationErrorType = exports.BetaAuthenticationError = exports.BetaAPIErrorType = exports.BetaAPIError = exports.BashTool20250124Type = exports.BashTool20250124Name = exports.BashTool20250124 = exports.Base64PDFSourceType = exports.Base64PDFSourceMediaType = exports.Base64PDFSource = exports.Base64ImageSourceType = exports.Base64ImageSourceMediaType = exports.Base64ImageSource = exports.AuthenticationErrorType = exports.AuthenticationError = exports.APIErrorType = exports.APIError = void 0;
|
|
7
|
+
exports.BetaResponseWebSearchToolResultBlockType = exports.BetaResponseWebSearchToolResultBlock = exports.BetaResponseWebSearchResultLocationCitationType = exports.BetaResponseWebSearchResultLocationCitation = exports.BetaResponseWebSearchResultBlockType = exports.BetaResponseWebSearchResultBlock = exports.BetaResponseToolUseBlockType = exports.BetaResponseToolUseBlock = exports.BetaResponseThinkingBlockType = exports.BetaResponseThinkingBlock = exports.BetaResponseTextBlockType = exports.BetaResponseTextBlock = exports.BetaResponseServerToolUseBlockType = exports.BetaResponseServerToolUseBlockName = exports.BetaResponseServerToolUseBlock = exports.BetaResponseRedactedThinkingBlockType = exports.BetaResponseRedactedThinkingBlock = exports.BetaResponsePageLocationCitationType = exports.BetaResponsePageLocationCitation = exports.BetaResponseMCPToolUseBlockType = exports.BetaResponseMCPToolUseBlock = exports.BetaResponseMCPToolResultBlockType = exports.BetaResponseMCPToolResultBlock = exports.BetaResponseContentBlockLocationCitationType = exports.BetaResponseContentBlockLocationCitation = exports.BetaResponseContainerUploadBlockType = exports.BetaResponseContainerUploadBlock = exports.BetaResponseCodeExecutionToolResultErrorType = exports.BetaResponseCodeExecutionToolResultError = exports.BetaResponseCodeExecutionToolResultBlockType = exports.BetaResponseCodeExecutionToolResultBlock = exports.BetaResponseCodeExecutionResultBlockType = exports.BetaResponseCodeExecutionResultBlock = exports.BetaResponseCodeExecutionOutputBlockType = exports.BetaResponseCodeExecutionOutputBlock = exports.BetaResponseCharLocationCitationType = exports.BetaResponseCharLocationCitation = exports.BetaRequestWebSearchToolResultErrorType = exports.BetaRequestWebSearchToolResultError = exports.BetaRequestWebSearchToolResultBlockType = exports.BetaRequestWebSearchToolResultBlock = exports.BetaRequestWebSearchResultLocationCitationType = exports.BetaRequestWebSearchResultLocationCitation = exports.BetaRequestWebSearchResultBlockType = exports.BetaRequestWebSearchResultBlock = exports.BetaRequestToolUseBlockType = exports.BetaRequestToolUseBlock = exports.BetaRequestToolResultBlockType = exports.BetaRequestToolResultBlock = exports.BetaRequestThinkingBlockType = exports.BetaRequestThinkingBlock = exports.BetaRequestTextBlockType = exports.BetaRequestTextBlock = exports.BetaRequestServerToolUseBlockType = exports.BetaRequestServerToolUseBlockName = exports.BetaRequestServerToolUseBlock = exports.BetaRequestRedactedThinkingBlockType = exports.BetaRequestRedactedThinkingBlock = exports.BetaRequestPageLocationCitationType = exports.BetaRequestPageLocationCitation = exports.BetaRequestMCPToolUseBlockType = exports.BetaRequestMCPToolUseBlock = exports.BetaRequestMCPToolResultBlockType = exports.BetaRequestMCPToolResultBlock = exports.BetaRequestMCPServerURLDefinitionType = exports.BetaRequestMCPServerURLDefinition = exports.BetaRequestMCPServerToolConfiguration = exports.BetaRequestImageBlockType = exports.BetaRequestImageBlock = exports.BetaRequestDocumentBlockType = exports.BetaRequestDocumentBlock = exports.BetaRequestCounts = exports.BetaRequestContentBlockLocationCitationType = exports.BetaRequestContentBlockLocationCitation = exports.BetaRequestContainerUploadBlockType = exports.BetaRequestContainerUploadBlock = exports.BetaRequestCodeExecutionToolResultErrorType = exports.BetaRequestCodeExecutionToolResultError = exports.BetaRequestCodeExecutionToolResultBlockType = exports.BetaRequestCodeExecutionToolResultBlock = exports.BetaRequestCodeExecutionResultBlockType = exports.BetaRequestCodeExecutionResultBlock = exports.BetaRequestCodeExecutionOutputBlockType = exports.BetaRequestCodeExecutionOutputBlock = exports.BetaRequestCitationsConfig = exports.BetaRequestCharLocationCitationType = exports.BetaRequestCharLocationCitation = exports.BetaRateLimitErrorType = exports.BetaRateLimitError = exports.BetaPlainTextSourceType = exports.BetaPlainTextSourceMediaType = exports.BetaPlainTextSource = exports.BetaPermissionErrorType = exports.BetaPermissionError = exports.BetaOverloadedErrorType = exports.BetaOverloadedError = exports.BetaNotFoundErrorType = exports.BetaNotFoundError = exports.BetaModelsListParams = exports.BetaModelsGetParams = void 0;
|
|
8
|
+
exports.ModelInfo = exports.Model = exports.Metadata = exports.MessagesPostParams = exports.MessagesCountTokensPostParams = exports.MessageType = exports.MessageRole = exports.MessageBatchesRetrieveParams = exports.MessageBatchesResultsParams = exports.MessageBatchesPostParams = exports.MessageBatchesListParams = exports.MessageBatchesDeleteParams = exports.MessageBatchesCancelParams = exports.MessageBatchType = exports.MessageBatchProcessingStatus = exports.MessageBatchIndividualRequestParams = exports.MessageBatch = exports.Message = exports.ListResponseModelInfo = exports.ListResponseMessageBatch = exports.ListFilesV1FilesGetParams = exports.InvalidRequestErrorType = exports.InvalidRequestError = exports.InputSchemaType = exports.InputSchema = exports.InputMessageRole = exports.InputMessage = exports.InputContentBlock = exports.GetFileMetadataV1FilesFileIdGetParams = exports.GatewayTimeoutErrorType = exports.GatewayTimeoutError = exports.FileMetadataSchemaType = exports.FileMetadataSchema = exports.FileListResponse = exports.FileDeleteResponseType = exports.FileDeleteResponse = exports.ErrorResponseType = exports.ErrorResponse = exports.DownloadFileV1FilesFileIdContentGetParams = exports.DeleteMessageBatchResponseType = exports.DeleteMessageBatchResponse = exports.DeleteFileV1FilesFileIdDeleteParams = exports.CreateMessageParamsServiceTier = exports.CreateMessageParams = exports.CreateMessageBatchParams = exports.CountMessageTokensResponse = exports.CountMessageTokensParams = exports.ContentBlockSourceType = exports.ContentBlockSource = exports.ContentBlock = exports.CompletionResponseType = exports.CompletionResponse = exports.CompletionRequest = exports.CompletePostParams = exports.CacheControlEphemeralType = exports.CacheControlEphemeral = exports.BillingErrorType = exports.BillingError = exports.BetaWebSearchToolResultErrorCode = exports.BetaWebSearchTool20250305Type = exports.BetaWebSearchTool20250305Name = exports.BetaWebSearchTool20250305 = exports.BetaUserLocationType = exports.BetaUserLocation = exports.BetaUsageServiceTierEnum = exports.BetaUsage = exports.BetaUploadFileV1FilesPostParams = exports.BetaURLPDFSourceType = exports.BetaURLPDFSource = exports.BetaURLImageSourceType = exports.BetaURLImageSource = exports.BetaToolTypeEnum = exports.BetaToolChoiceToolType = exports.BetaToolChoiceTool = exports.BetaToolChoiceNoneType = exports.BetaToolChoiceNone = exports.BetaToolChoiceAutoType = exports.BetaToolChoiceAuto = exports.BetaToolChoiceAnyType = exports.BetaToolChoiceAny = exports.BetaToolChoice = exports.BetaTool = exports.BetaThinkingConfigParam = exports.BetaThinkingConfigEnabledType = exports.BetaThinkingConfigEnabled = exports.BetaThinkingConfigDisabledType = exports.BetaThinkingConfigDisabled = exports.BetaTextEditor20250429Type = exports.BetaTextEditor20250429Name = exports.BetaTextEditor20250429 = exports.BetaTextEditor20250124Type = exports.BetaTextEditor20250124Name = exports.BetaTextEditor20250124 = exports.BetaTextEditor20241022Type = exports.BetaTextEditor20241022Name = exports.BetaTextEditor20241022 = exports.BetaStopReason = exports.BetaServerToolUsage = exports.BetaResponseWebSearchToolResultErrorType = exports.BetaResponseWebSearchToolResultError = void 0;
|
|
9
|
+
exports.URLPDFSourceType = exports.URLPDFSource = exports.URLImageSourceType = exports.URLImageSource = exports.ToolTypeEnum = exports.ToolChoiceToolType = exports.ToolChoiceTool = exports.ToolChoiceNoneType = exports.ToolChoiceNone = exports.ToolChoiceAutoType = exports.ToolChoiceAuto = exports.ToolChoiceAnyType = exports.ToolChoiceAny = exports.ToolChoice = exports.Tool = exports.ThinkingConfigParam = exports.ThinkingConfigEnabledType = exports.ThinkingConfigEnabled = exports.ThinkingConfigDisabledType = exports.ThinkingConfigDisabled = exports.TextEditor20250429Type = exports.TextEditor20250429Name = exports.TextEditor20250429 = exports.TextEditor20250124Type = exports.TextEditor20250124Name = exports.TextEditor20250124 = exports.StopReason = exports.ServerToolUsage = exports.ResponseWebSearchToolResultErrorType = exports.ResponseWebSearchToolResultError = exports.ResponseWebSearchToolResultBlockType = exports.ResponseWebSearchToolResultBlock = exports.ResponseWebSearchResultLocationCitationType = exports.ResponseWebSearchResultLocationCitation = exports.ResponseWebSearchResultBlockType = exports.ResponseWebSearchResultBlock = exports.ResponseToolUseBlockType = exports.ResponseToolUseBlock = exports.ResponseThinkingBlockType = exports.ResponseThinkingBlock = exports.ResponseTextBlockType = exports.ResponseTextBlock = exports.ResponseServerToolUseBlockType = exports.ResponseServerToolUseBlockName = exports.ResponseServerToolUseBlock = exports.ResponseRedactedThinkingBlockType = exports.ResponseRedactedThinkingBlock = exports.ResponsePageLocationCitationType = exports.ResponsePageLocationCitation = exports.ResponseContentBlockLocationCitationType = exports.ResponseContentBlockLocationCitation = exports.ResponseCharLocationCitationType = exports.ResponseCharLocationCitation = exports.RequestWebSearchToolResultErrorType = exports.RequestWebSearchToolResultError = exports.RequestWebSearchToolResultBlockType = exports.RequestWebSearchToolResultBlock = exports.RequestWebSearchResultLocationCitationType = exports.RequestWebSearchResultLocationCitation = exports.RequestWebSearchResultBlockType = exports.RequestWebSearchResultBlock = exports.RequestToolUseBlockType = exports.RequestToolUseBlock = exports.RequestToolResultBlockType = exports.RequestToolResultBlock = exports.RequestThinkingBlockType = exports.RequestThinkingBlock = exports.RequestTextBlockType = exports.RequestTextBlock = exports.RequestServerToolUseBlockType = exports.RequestServerToolUseBlockName = exports.RequestServerToolUseBlock = exports.RequestRedactedThinkingBlockType = exports.RequestRedactedThinkingBlock = exports.RequestPageLocationCitationType = exports.RequestPageLocationCitation = exports.RequestImageBlockType = exports.RequestImageBlock = exports.RequestDocumentBlockType = exports.RequestDocumentBlock = exports.RequestCounts = exports.RequestContentBlockLocationCitationType = exports.RequestContentBlockLocationCitation = exports.RequestCitationsConfig = exports.RequestCharLocationCitationType = exports.RequestCharLocationCitation = exports.RateLimitErrorType = exports.RateLimitError = exports.PlainTextSourceType = exports.PlainTextSourceMediaType = exports.PlainTextSource = exports.PermissionErrorType = exports.PermissionError = exports.OverloadedErrorType = exports.OverloadedError = exports.NotFoundErrorType = exports.NotFoundError = exports.ModelsListParams = exports.ModelsGetParams = exports.ModelInfoType = void 0;
|
|
10
|
+
exports.make = exports.WebSearchToolResultErrorCode = exports.WebSearchTool20250305Type = exports.WebSearchTool20250305Name = exports.WebSearchTool20250305 = exports.UserLocationType = exports.UserLocation = exports.UsageServiceTierEnum = exports.Usage = exports.UploadFileV1FilesPostParams = void 0;
|
|
9
11
|
var HttpClientError = _interopRequireWildcard(require("@effect/platform/HttpClientError"));
|
|
10
12
|
var HttpClientRequest = _interopRequireWildcard(require("@effect/platform/HttpClientRequest"));
|
|
11
13
|
var HttpClientResponse = _interopRequireWildcard(require("@effect/platform/HttpClientResponse"));
|
|
@@ -18,72 +20,127 @@ class MessagesPostParams extends /*#__PURE__*/S.Struct({
|
|
|
18
20
|
})
|
|
19
21
|
}) {}
|
|
20
22
|
exports.MessagesPostParams = MessagesPostParams;
|
|
21
|
-
class Model extends /*#__PURE__*/S.Union(/*#__PURE__*/S.Literal("claude-3-7-sonnet-latest"), /*#__PURE__*/S.Literal("claude-3-7-sonnet-20250219"), /*#__PURE__*/S.Literal("claude-3-5-haiku-latest"), /*#__PURE__*/S.Literal("claude-3-5-haiku-20241022"), /*#__PURE__*/S.Literal("claude-3-5-sonnet-latest"), /*#__PURE__*/S.Literal("claude-3-5-sonnet-20241022"), /*#__PURE__*/S.Literal("claude-3-5-sonnet-20240620"), /*#__PURE__*/S.Literal("claude-3-opus-latest"), /*#__PURE__*/S.Literal("claude-3-opus-20240229"), /*#__PURE__*/S.Literal("claude-3-sonnet-20240229"), /*#__PURE__*/S.Literal("claude-3-haiku-20240307"), /*#__PURE__*/S.Literal("claude-2.1"), /*#__PURE__*/S.Literal("claude-2.0")) {}
|
|
23
|
+
class Model extends /*#__PURE__*/S.Union(/*#__PURE__*/S.Literal("claude-3-7-sonnet-latest"), /*#__PURE__*/S.Literal("claude-3-7-sonnet-20250219"), /*#__PURE__*/S.Literal("claude-3-5-haiku-latest"), /*#__PURE__*/S.Literal("claude-3-5-haiku-20241022"), /*#__PURE__*/S.Literal("claude-sonnet-4-20250514"), /*#__PURE__*/S.Literal("claude-sonnet-4-0"), /*#__PURE__*/S.Literal("claude-4-sonnet-20250514"), /*#__PURE__*/S.Literal("claude-3-5-sonnet-latest"), /*#__PURE__*/S.Literal("claude-3-5-sonnet-20241022"), /*#__PURE__*/S.Literal("claude-3-5-sonnet-20240620"), /*#__PURE__*/S.Literal("claude-opus-4-0"), /*#__PURE__*/S.Literal("claude-opus-4-20250514"), /*#__PURE__*/S.Literal("claude-4-opus-20250514"), /*#__PURE__*/S.Literal("claude-3-opus-latest"), /*#__PURE__*/S.Literal("claude-3-opus-20240229"), /*#__PURE__*/S.Literal("claude-3-sonnet-20240229"), /*#__PURE__*/S.Literal("claude-3-haiku-20240307"), /*#__PURE__*/S.Literal("claude-2.1"), /*#__PURE__*/S.Literal("claude-2.0")) {}
|
|
22
24
|
exports.Model = Model;
|
|
23
|
-
class InputMessageRole extends /*#__PURE__*/S.Literal("user", "assistant") {}
|
|
24
|
-
exports.InputMessageRole = InputMessageRole;
|
|
25
25
|
class CacheControlEphemeralType extends /*#__PURE__*/S.Literal("ephemeral") {}
|
|
26
26
|
exports.CacheControlEphemeralType = CacheControlEphemeralType;
|
|
27
27
|
class CacheControlEphemeral extends /*#__PURE__*/S.Struct({
|
|
28
28
|
"type": CacheControlEphemeralType
|
|
29
29
|
}) {}
|
|
30
30
|
exports.CacheControlEphemeral = CacheControlEphemeral;
|
|
31
|
+
class RequestServerToolUseBlockName extends /*#__PURE__*/S.Literal("web_search") {}
|
|
32
|
+
exports.RequestServerToolUseBlockName = RequestServerToolUseBlockName;
|
|
33
|
+
class RequestServerToolUseBlockType extends /*#__PURE__*/S.Literal("server_tool_use") {}
|
|
34
|
+
exports.RequestServerToolUseBlockType = RequestServerToolUseBlockType;
|
|
35
|
+
class RequestServerToolUseBlock extends /*#__PURE__*/S.Struct({
|
|
36
|
+
"cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(CacheControlEphemeral, S.Null), {
|
|
37
|
+
nullable: true
|
|
38
|
+
}),
|
|
39
|
+
"id": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.pattern(/*#__PURE__*/new RegExp("^srvtoolu_[a-zA-Z0-9_]+$"))),
|
|
40
|
+
"input": /*#__PURE__*/S.Record({
|
|
41
|
+
key: S.String,
|
|
42
|
+
value: S.Unknown
|
|
43
|
+
}),
|
|
44
|
+
"name": RequestServerToolUseBlockName,
|
|
45
|
+
"type": RequestServerToolUseBlockType
|
|
46
|
+
}) {}
|
|
47
|
+
exports.RequestServerToolUseBlock = RequestServerToolUseBlock;
|
|
48
|
+
class RequestWebSearchResultBlockType extends /*#__PURE__*/S.Literal("web_search_result") {}
|
|
49
|
+
exports.RequestWebSearchResultBlockType = RequestWebSearchResultBlockType;
|
|
50
|
+
class RequestWebSearchResultBlock extends /*#__PURE__*/S.Struct({
|
|
51
|
+
"encrypted_content": S.String,
|
|
52
|
+
"page_age": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(S.String, S.Null), {
|
|
53
|
+
nullable: true
|
|
54
|
+
}),
|
|
55
|
+
"title": S.String,
|
|
56
|
+
"type": RequestWebSearchResultBlockType,
|
|
57
|
+
"url": S.String
|
|
58
|
+
}) {}
|
|
59
|
+
exports.RequestWebSearchResultBlock = RequestWebSearchResultBlock;
|
|
60
|
+
class WebSearchToolResultErrorCode extends /*#__PURE__*/S.Literal("invalid_tool_input", "unavailable", "max_uses_exceeded", "too_many_requests", "query_too_long") {}
|
|
61
|
+
exports.WebSearchToolResultErrorCode = WebSearchToolResultErrorCode;
|
|
62
|
+
class RequestWebSearchToolResultErrorType extends /*#__PURE__*/S.Literal("web_search_tool_result_error") {}
|
|
63
|
+
exports.RequestWebSearchToolResultErrorType = RequestWebSearchToolResultErrorType;
|
|
64
|
+
class RequestWebSearchToolResultError extends /*#__PURE__*/S.Struct({
|
|
65
|
+
"error_code": WebSearchToolResultErrorCode,
|
|
66
|
+
"type": RequestWebSearchToolResultErrorType
|
|
67
|
+
}) {}
|
|
68
|
+
exports.RequestWebSearchToolResultError = RequestWebSearchToolResultError;
|
|
69
|
+
class RequestWebSearchToolResultBlockType extends /*#__PURE__*/S.Literal("web_search_tool_result") {}
|
|
70
|
+
exports.RequestWebSearchToolResultBlockType = RequestWebSearchToolResultBlockType;
|
|
71
|
+
class RequestWebSearchToolResultBlock extends /*#__PURE__*/S.Struct({
|
|
72
|
+
"cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(CacheControlEphemeral, S.Null), {
|
|
73
|
+
nullable: true
|
|
74
|
+
}),
|
|
75
|
+
"content": /*#__PURE__*/S.Union(/*#__PURE__*/S.Array(RequestWebSearchResultBlock), RequestWebSearchToolResultError),
|
|
76
|
+
"tool_use_id": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.pattern(/*#__PURE__*/new RegExp("^srvtoolu_[a-zA-Z0-9_]+$"))),
|
|
77
|
+
"type": RequestWebSearchToolResultBlockType
|
|
78
|
+
}) {}
|
|
79
|
+
exports.RequestWebSearchToolResultBlock = RequestWebSearchToolResultBlock;
|
|
31
80
|
class RequestCharLocationCitationType extends /*#__PURE__*/S.Literal("char_location") {}
|
|
32
81
|
exports.RequestCharLocationCitationType = RequestCharLocationCitationType;
|
|
33
82
|
class RequestCharLocationCitation extends /*#__PURE__*/S.Struct({
|
|
34
|
-
"type": RequestCharLocationCitationType,
|
|
35
83
|
"cited_text": S.String,
|
|
36
84
|
"document_index": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
37
85
|
"document_title": /*#__PURE__*/S.Union(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1), /*#__PURE__*/S.maxLength(255)), S.Null),
|
|
86
|
+
"end_char_index": S.Int,
|
|
38
87
|
"start_char_index": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
39
|
-
"
|
|
88
|
+
"type": RequestCharLocationCitationType
|
|
40
89
|
}) {}
|
|
41
90
|
exports.RequestCharLocationCitation = RequestCharLocationCitation;
|
|
42
91
|
class RequestPageLocationCitationType extends /*#__PURE__*/S.Literal("page_location") {}
|
|
43
92
|
exports.RequestPageLocationCitationType = RequestPageLocationCitationType;
|
|
44
93
|
class RequestPageLocationCitation extends /*#__PURE__*/S.Struct({
|
|
45
|
-
"type": RequestPageLocationCitationType,
|
|
46
94
|
"cited_text": S.String,
|
|
47
95
|
"document_index": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
48
96
|
"document_title": /*#__PURE__*/S.Union(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1), /*#__PURE__*/S.maxLength(255)), S.Null),
|
|
97
|
+
"end_page_number": S.Int,
|
|
49
98
|
"start_page_number": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(1)),
|
|
50
|
-
"
|
|
99
|
+
"type": RequestPageLocationCitationType
|
|
51
100
|
}) {}
|
|
52
101
|
exports.RequestPageLocationCitation = RequestPageLocationCitation;
|
|
53
102
|
class RequestContentBlockLocationCitationType extends /*#__PURE__*/S.Literal("content_block_location") {}
|
|
54
103
|
exports.RequestContentBlockLocationCitationType = RequestContentBlockLocationCitationType;
|
|
55
104
|
class RequestContentBlockLocationCitation extends /*#__PURE__*/S.Struct({
|
|
56
|
-
"type": RequestContentBlockLocationCitationType,
|
|
57
105
|
"cited_text": S.String,
|
|
58
106
|
"document_index": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
59
107
|
"document_title": /*#__PURE__*/S.Union(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1), /*#__PURE__*/S.maxLength(255)), S.Null),
|
|
108
|
+
"end_block_index": S.Int,
|
|
60
109
|
"start_block_index": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
61
|
-
"
|
|
110
|
+
"type": RequestContentBlockLocationCitationType
|
|
62
111
|
}) {}
|
|
63
112
|
exports.RequestContentBlockLocationCitation = RequestContentBlockLocationCitation;
|
|
113
|
+
class RequestWebSearchResultLocationCitationType extends /*#__PURE__*/S.Literal("web_search_result_location") {}
|
|
114
|
+
exports.RequestWebSearchResultLocationCitationType = RequestWebSearchResultLocationCitationType;
|
|
115
|
+
class RequestWebSearchResultLocationCitation extends /*#__PURE__*/S.Struct({
|
|
116
|
+
"cited_text": S.String,
|
|
117
|
+
"encrypted_index": S.String,
|
|
118
|
+
"title": /*#__PURE__*/S.Union(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1), /*#__PURE__*/S.maxLength(255)), S.Null),
|
|
119
|
+
"type": RequestWebSearchResultLocationCitationType,
|
|
120
|
+
"url": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1), /*#__PURE__*/S.maxLength(2048))
|
|
121
|
+
}) {}
|
|
122
|
+
exports.RequestWebSearchResultLocationCitation = RequestWebSearchResultLocationCitation;
|
|
64
123
|
class RequestTextBlockType extends /*#__PURE__*/S.Literal("text") {}
|
|
65
124
|
exports.RequestTextBlockType = RequestTextBlockType;
|
|
66
125
|
class RequestTextBlock extends /*#__PURE__*/S.Struct({
|
|
67
126
|
"cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(CacheControlEphemeral, S.Null), {
|
|
68
127
|
nullable: true
|
|
69
128
|
}),
|
|
70
|
-
"citations": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(RequestCharLocationCitation, RequestPageLocationCitation, RequestContentBlockLocationCitation)), S.Null), {
|
|
129
|
+
"citations": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(RequestCharLocationCitation, RequestPageLocationCitation, RequestContentBlockLocationCitation, RequestWebSearchResultLocationCitation)), S.Null), {
|
|
71
130
|
nullable: true
|
|
72
131
|
}),
|
|
73
132
|
"text": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1)),
|
|
74
133
|
"type": RequestTextBlockType
|
|
75
134
|
}) {}
|
|
76
135
|
exports.RequestTextBlock = RequestTextBlock;
|
|
77
|
-
class RequestImageBlockType extends /*#__PURE__*/S.Literal("image") {}
|
|
78
|
-
exports.RequestImageBlockType = RequestImageBlockType;
|
|
79
|
-
class Base64ImageSourceType extends /*#__PURE__*/S.Literal("base64") {}
|
|
80
|
-
exports.Base64ImageSourceType = Base64ImageSourceType;
|
|
81
136
|
class Base64ImageSourceMediaType extends /*#__PURE__*/S.Literal("image/jpeg", "image/png", "image/gif", "image/webp") {}
|
|
82
137
|
exports.Base64ImageSourceMediaType = Base64ImageSourceMediaType;
|
|
138
|
+
class Base64ImageSourceType extends /*#__PURE__*/S.Literal("base64") {}
|
|
139
|
+
exports.Base64ImageSourceType = Base64ImageSourceType;
|
|
83
140
|
class Base64ImageSource extends /*#__PURE__*/S.Struct({
|
|
84
|
-
"
|
|
141
|
+
"data": S.String,
|
|
85
142
|
"media_type": Base64ImageSourceMediaType,
|
|
86
|
-
"
|
|
143
|
+
"type": Base64ImageSourceType
|
|
87
144
|
}) {}
|
|
88
145
|
exports.Base64ImageSource = Base64ImageSource;
|
|
89
146
|
class URLImageSourceType extends /*#__PURE__*/S.Literal("url") {}
|
|
@@ -93,12 +150,14 @@ class URLImageSource extends /*#__PURE__*/S.Struct({
|
|
|
93
150
|
"url": S.String
|
|
94
151
|
}) {}
|
|
95
152
|
exports.URLImageSource = URLImageSource;
|
|
153
|
+
class RequestImageBlockType extends /*#__PURE__*/S.Literal("image") {}
|
|
154
|
+
exports.RequestImageBlockType = RequestImageBlockType;
|
|
96
155
|
class RequestImageBlock extends /*#__PURE__*/S.Struct({
|
|
97
156
|
"cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(CacheControlEphemeral, S.Null), {
|
|
98
157
|
nullable: true
|
|
99
158
|
}),
|
|
100
|
-
"
|
|
101
|
-
"
|
|
159
|
+
"source": /*#__PURE__*/S.Union(Base64ImageSource, URLImageSource),
|
|
160
|
+
"type": RequestImageBlockType
|
|
102
161
|
}) {}
|
|
103
162
|
exports.RequestImageBlock = RequestImageBlock;
|
|
104
163
|
class RequestToolUseBlockType extends /*#__PURE__*/S.Literal("tool_use") {}
|
|
@@ -107,13 +166,13 @@ class RequestToolUseBlock extends /*#__PURE__*/S.Struct({
|
|
|
107
166
|
"cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(CacheControlEphemeral, S.Null), {
|
|
108
167
|
nullable: true
|
|
109
168
|
}),
|
|
110
|
-
"type": RequestToolUseBlockType,
|
|
111
169
|
"id": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.pattern(/*#__PURE__*/new RegExp("^[a-zA-Z0-9_-]+$"))),
|
|
112
|
-
"name": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1), /*#__PURE__*/S.maxLength(64), /*#__PURE__*/S.pattern(/*#__PURE__*/new RegExp("^[a-zA-Z0-9_-]{1,64}$"))),
|
|
113
170
|
"input": /*#__PURE__*/S.Record({
|
|
114
171
|
key: S.String,
|
|
115
172
|
value: S.Unknown
|
|
116
|
-
})
|
|
173
|
+
}),
|
|
174
|
+
"name": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1), /*#__PURE__*/S.maxLength(200)),
|
|
175
|
+
"type": RequestToolUseBlockType
|
|
117
176
|
}) {}
|
|
118
177
|
exports.RequestToolUseBlock = RequestToolUseBlock;
|
|
119
178
|
class RequestToolResultBlockType extends /*#__PURE__*/S.Literal("tool_result") {}
|
|
@@ -122,43 +181,47 @@ class RequestToolResultBlock extends /*#__PURE__*/S.Struct({
|
|
|
122
181
|
"cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(CacheControlEphemeral, S.Null), {
|
|
123
182
|
nullable: true
|
|
124
183
|
}),
|
|
125
|
-
"
|
|
126
|
-
|
|
184
|
+
"content": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.Array(/*#__PURE__*/S.Union(RequestTextBlock, RequestImageBlock))), {
|
|
185
|
+
nullable: true
|
|
186
|
+
}),
|
|
127
187
|
"is_error": /*#__PURE__*/S.optionalWith(S.Boolean, {
|
|
128
188
|
nullable: true
|
|
129
189
|
}),
|
|
130
|
-
"
|
|
190
|
+
"tool_use_id": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.pattern(/*#__PURE__*/new RegExp("^[a-zA-Z0-9_-]+$"))),
|
|
191
|
+
"type": RequestToolResultBlockType
|
|
192
|
+
}) {}
|
|
193
|
+
exports.RequestToolResultBlock = RequestToolResultBlock;
|
|
194
|
+
class RequestCitationsConfig extends /*#__PURE__*/S.Struct({
|
|
195
|
+
"enabled": /*#__PURE__*/S.optionalWith(S.Boolean, {
|
|
131
196
|
nullable: true
|
|
132
197
|
})
|
|
133
198
|
}) {}
|
|
134
|
-
exports.
|
|
135
|
-
class RequestDocumentBlockType extends /*#__PURE__*/S.Literal("document") {}
|
|
136
|
-
exports.RequestDocumentBlockType = RequestDocumentBlockType;
|
|
137
|
-
class Base64PDFSourceType extends /*#__PURE__*/S.Literal("base64") {}
|
|
138
|
-
exports.Base64PDFSourceType = Base64PDFSourceType;
|
|
199
|
+
exports.RequestCitationsConfig = RequestCitationsConfig;
|
|
139
200
|
class Base64PDFSourceMediaType extends /*#__PURE__*/S.Literal("application/pdf") {}
|
|
140
201
|
exports.Base64PDFSourceMediaType = Base64PDFSourceMediaType;
|
|
202
|
+
class Base64PDFSourceType extends /*#__PURE__*/S.Literal("base64") {}
|
|
203
|
+
exports.Base64PDFSourceType = Base64PDFSourceType;
|
|
141
204
|
class Base64PDFSource extends /*#__PURE__*/S.Struct({
|
|
142
|
-
"
|
|
205
|
+
"data": S.String,
|
|
143
206
|
"media_type": Base64PDFSourceMediaType,
|
|
144
|
-
"
|
|
207
|
+
"type": Base64PDFSourceType
|
|
145
208
|
}) {}
|
|
146
209
|
exports.Base64PDFSource = Base64PDFSource;
|
|
147
|
-
class PlainTextSourceType extends /*#__PURE__*/S.Literal("text") {}
|
|
148
|
-
exports.PlainTextSourceType = PlainTextSourceType;
|
|
149
210
|
class PlainTextSourceMediaType extends /*#__PURE__*/S.Literal("text/plain") {}
|
|
150
211
|
exports.PlainTextSourceMediaType = PlainTextSourceMediaType;
|
|
212
|
+
class PlainTextSourceType extends /*#__PURE__*/S.Literal("text") {}
|
|
213
|
+
exports.PlainTextSourceType = PlainTextSourceType;
|
|
151
214
|
class PlainTextSource extends /*#__PURE__*/S.Struct({
|
|
152
|
-
"
|
|
215
|
+
"data": S.String,
|
|
153
216
|
"media_type": PlainTextSourceMediaType,
|
|
154
|
-
"
|
|
217
|
+
"type": PlainTextSourceType
|
|
155
218
|
}) {}
|
|
156
219
|
exports.PlainTextSource = PlainTextSource;
|
|
157
220
|
class ContentBlockSourceType extends /*#__PURE__*/S.Literal("content") {}
|
|
158
221
|
exports.ContentBlockSourceType = ContentBlockSourceType;
|
|
159
222
|
class ContentBlockSource extends /*#__PURE__*/S.Struct({
|
|
160
|
-
"
|
|
161
|
-
"
|
|
223
|
+
"content": /*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.Array(/*#__PURE__*/S.Union(RequestTextBlock, RequestImageBlock))),
|
|
224
|
+
"type": ContentBlockSourceType
|
|
162
225
|
}) {}
|
|
163
226
|
exports.ContentBlockSource = ContentBlockSource;
|
|
164
227
|
class URLPDFSourceType extends /*#__PURE__*/S.Literal("url") {}
|
|
@@ -168,49 +231,47 @@ class URLPDFSource extends /*#__PURE__*/S.Struct({
|
|
|
168
231
|
"url": S.String
|
|
169
232
|
}) {}
|
|
170
233
|
exports.URLPDFSource = URLPDFSource;
|
|
171
|
-
class
|
|
172
|
-
|
|
173
|
-
nullable: true
|
|
174
|
-
})
|
|
175
|
-
}) {}
|
|
176
|
-
exports.RequestCitationsConfig = RequestCitationsConfig;
|
|
234
|
+
class RequestDocumentBlockType extends /*#__PURE__*/S.Literal("document") {}
|
|
235
|
+
exports.RequestDocumentBlockType = RequestDocumentBlockType;
|
|
177
236
|
class RequestDocumentBlock extends /*#__PURE__*/S.Struct({
|
|
178
237
|
"cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(CacheControlEphemeral, S.Null), {
|
|
179
238
|
nullable: true
|
|
180
239
|
}),
|
|
181
|
-
"
|
|
182
|
-
"source": /*#__PURE__*/S.Union(Base64PDFSource, PlainTextSource, ContentBlockSource, URLPDFSource),
|
|
183
|
-
"title": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1), /*#__PURE__*/S.maxLength(500)), S.Null), {
|
|
240
|
+
"citations": /*#__PURE__*/S.optionalWith(RequestCitationsConfig, {
|
|
184
241
|
nullable: true
|
|
185
242
|
}),
|
|
186
243
|
"context": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1)), S.Null), {
|
|
187
244
|
nullable: true
|
|
188
245
|
}),
|
|
189
|
-
"
|
|
246
|
+
"source": /*#__PURE__*/S.Union(Base64PDFSource, PlainTextSource, ContentBlockSource, URLPDFSource),
|
|
247
|
+
"title": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1), /*#__PURE__*/S.maxLength(500)), S.Null), {
|
|
190
248
|
nullable: true
|
|
191
|
-
})
|
|
249
|
+
}),
|
|
250
|
+
"type": RequestDocumentBlockType
|
|
192
251
|
}) {}
|
|
193
252
|
exports.RequestDocumentBlock = RequestDocumentBlock;
|
|
194
253
|
class RequestThinkingBlockType extends /*#__PURE__*/S.Literal("thinking") {}
|
|
195
254
|
exports.RequestThinkingBlockType = RequestThinkingBlockType;
|
|
196
255
|
class RequestThinkingBlock extends /*#__PURE__*/S.Struct({
|
|
197
|
-
"
|
|
256
|
+
"signature": S.String,
|
|
198
257
|
"thinking": S.String,
|
|
199
|
-
"
|
|
258
|
+
"type": RequestThinkingBlockType
|
|
200
259
|
}) {}
|
|
201
260
|
exports.RequestThinkingBlock = RequestThinkingBlock;
|
|
202
261
|
class RequestRedactedThinkingBlockType extends /*#__PURE__*/S.Literal("redacted_thinking") {}
|
|
203
262
|
exports.RequestRedactedThinkingBlockType = RequestRedactedThinkingBlockType;
|
|
204
263
|
class RequestRedactedThinkingBlock extends /*#__PURE__*/S.Struct({
|
|
205
|
-
"
|
|
206
|
-
"
|
|
264
|
+
"data": S.String,
|
|
265
|
+
"type": RequestRedactedThinkingBlockType
|
|
207
266
|
}) {}
|
|
208
267
|
exports.RequestRedactedThinkingBlock = RequestRedactedThinkingBlock;
|
|
209
|
-
class InputContentBlock extends /*#__PURE__*/S.Union(RequestTextBlock, RequestImageBlock, RequestToolUseBlock, RequestToolResultBlock, RequestDocumentBlock, RequestThinkingBlock, RequestRedactedThinkingBlock) {}
|
|
268
|
+
class InputContentBlock extends /*#__PURE__*/S.Union(RequestServerToolUseBlock, RequestWebSearchToolResultBlock, RequestTextBlock, RequestImageBlock, RequestToolUseBlock, RequestToolResultBlock, RequestDocumentBlock, RequestThinkingBlock, RequestRedactedThinkingBlock) {}
|
|
210
269
|
exports.InputContentBlock = InputContentBlock;
|
|
270
|
+
class InputMessageRole extends /*#__PURE__*/S.Literal("user", "assistant") {}
|
|
271
|
+
exports.InputMessageRole = InputMessageRole;
|
|
211
272
|
class InputMessage extends /*#__PURE__*/S.Struct({
|
|
212
|
-
"
|
|
213
|
-
"
|
|
273
|
+
"content": /*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.Array(InputContentBlock)),
|
|
274
|
+
"role": InputMessageRole
|
|
214
275
|
}) {}
|
|
215
276
|
exports.InputMessage = InputMessage;
|
|
216
277
|
class Metadata extends /*#__PURE__*/S.Struct({
|
|
@@ -219,11 +280,13 @@ class Metadata extends /*#__PURE__*/S.Struct({
|
|
|
219
280
|
})
|
|
220
281
|
}) {}
|
|
221
282
|
exports.Metadata = Metadata;
|
|
283
|
+
class CreateMessageParamsServiceTier extends /*#__PURE__*/S.Literal("auto", "standard_only") {}
|
|
284
|
+
exports.CreateMessageParamsServiceTier = CreateMessageParamsServiceTier;
|
|
222
285
|
class ThinkingConfigEnabledType extends /*#__PURE__*/S.Literal("enabled") {}
|
|
223
286
|
exports.ThinkingConfigEnabledType = ThinkingConfigEnabledType;
|
|
224
287
|
class ThinkingConfigEnabled extends /*#__PURE__*/S.Struct({
|
|
225
|
-
"
|
|
226
|
-
"
|
|
288
|
+
"budget_tokens": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(1024)),
|
|
289
|
+
"type": ThinkingConfigEnabledType
|
|
227
290
|
}) {}
|
|
228
291
|
exports.ThinkingConfigEnabled = ThinkingConfigEnabled;
|
|
229
292
|
class ThinkingConfigDisabledType extends /*#__PURE__*/S.Literal("disabled") {}
|
|
@@ -237,29 +300,29 @@ exports.ThinkingConfigParam = ThinkingConfigParam;
|
|
|
237
300
|
class ToolChoiceAutoType extends /*#__PURE__*/S.Literal("auto") {}
|
|
238
301
|
exports.ToolChoiceAutoType = ToolChoiceAutoType;
|
|
239
302
|
class ToolChoiceAuto extends /*#__PURE__*/S.Struct({
|
|
240
|
-
"type": ToolChoiceAutoType,
|
|
241
303
|
"disable_parallel_tool_use": /*#__PURE__*/S.optionalWith(S.Boolean, {
|
|
242
304
|
nullable: true
|
|
243
|
-
})
|
|
305
|
+
}),
|
|
306
|
+
"type": ToolChoiceAutoType
|
|
244
307
|
}) {}
|
|
245
308
|
exports.ToolChoiceAuto = ToolChoiceAuto;
|
|
246
309
|
class ToolChoiceAnyType extends /*#__PURE__*/S.Literal("any") {}
|
|
247
310
|
exports.ToolChoiceAnyType = ToolChoiceAnyType;
|
|
248
311
|
class ToolChoiceAny extends /*#__PURE__*/S.Struct({
|
|
249
|
-
"type": ToolChoiceAnyType,
|
|
250
312
|
"disable_parallel_tool_use": /*#__PURE__*/S.optionalWith(S.Boolean, {
|
|
251
313
|
nullable: true
|
|
252
|
-
})
|
|
314
|
+
}),
|
|
315
|
+
"type": ToolChoiceAnyType
|
|
253
316
|
}) {}
|
|
254
317
|
exports.ToolChoiceAny = ToolChoiceAny;
|
|
255
318
|
class ToolChoiceToolType extends /*#__PURE__*/S.Literal("tool") {}
|
|
256
319
|
exports.ToolChoiceToolType = ToolChoiceToolType;
|
|
257
320
|
class ToolChoiceTool extends /*#__PURE__*/S.Struct({
|
|
258
|
-
"type": ToolChoiceToolType,
|
|
259
|
-
"name": S.String,
|
|
260
321
|
"disable_parallel_tool_use": /*#__PURE__*/S.optionalWith(S.Boolean, {
|
|
261
322
|
nullable: true
|
|
262
|
-
})
|
|
323
|
+
}),
|
|
324
|
+
"name": S.String,
|
|
325
|
+
"type": ToolChoiceToolType
|
|
263
326
|
}) {}
|
|
264
327
|
exports.ToolChoiceTool = ToolChoiceTool;
|
|
265
328
|
class ToolChoiceNoneType extends /*#__PURE__*/S.Literal("none") {}
|
|
@@ -270,19 +333,27 @@ class ToolChoiceNone extends /*#__PURE__*/S.Struct({
|
|
|
270
333
|
exports.ToolChoiceNone = ToolChoiceNone;
|
|
271
334
|
class ToolChoice extends /*#__PURE__*/S.Union(ToolChoiceAuto, ToolChoiceAny, ToolChoiceTool, ToolChoiceNone) {}
|
|
272
335
|
exports.ToolChoice = ToolChoice;
|
|
336
|
+
class ToolTypeEnum extends /*#__PURE__*/S.Literal("custom") {}
|
|
337
|
+
exports.ToolTypeEnum = ToolTypeEnum;
|
|
273
338
|
class InputSchemaType extends /*#__PURE__*/S.Literal("object") {}
|
|
274
339
|
exports.InputSchemaType = InputSchemaType;
|
|
275
340
|
class InputSchema extends /*#__PURE__*/S.Struct({
|
|
276
|
-
"type": InputSchemaType,
|
|
277
341
|
"properties": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(/*#__PURE__*/S.Record({
|
|
278
342
|
key: S.String,
|
|
279
343
|
value: S.Unknown
|
|
280
344
|
}), S.Null), {
|
|
281
345
|
nullable: true
|
|
282
|
-
})
|
|
346
|
+
}),
|
|
347
|
+
"required": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(/*#__PURE__*/S.Array(S.String), S.Null), {
|
|
348
|
+
nullable: true
|
|
349
|
+
}),
|
|
350
|
+
"type": InputSchemaType
|
|
283
351
|
}) {}
|
|
284
352
|
exports.InputSchema = InputSchema;
|
|
285
353
|
class Tool extends /*#__PURE__*/S.Struct({
|
|
354
|
+
"type": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(S.Null, ToolTypeEnum), {
|
|
355
|
+
nullable: true
|
|
356
|
+
}),
|
|
286
357
|
"description": /*#__PURE__*/S.optionalWith(S.String, {
|
|
287
358
|
nullable: true
|
|
288
359
|
}),
|
|
@@ -293,37 +364,94 @@ class Tool extends /*#__PURE__*/S.Struct({
|
|
|
293
364
|
})
|
|
294
365
|
}) {}
|
|
295
366
|
exports.Tool = Tool;
|
|
296
|
-
class BashTool20250124Type extends /*#__PURE__*/S.Literal("bash_20250124") {}
|
|
297
|
-
exports.BashTool20250124Type = BashTool20250124Type;
|
|
298
367
|
class BashTool20250124Name extends /*#__PURE__*/S.Literal("bash") {}
|
|
299
368
|
exports.BashTool20250124Name = BashTool20250124Name;
|
|
369
|
+
class BashTool20250124Type extends /*#__PURE__*/S.Literal("bash_20250124") {}
|
|
370
|
+
exports.BashTool20250124Type = BashTool20250124Type;
|
|
300
371
|
class BashTool20250124 extends /*#__PURE__*/S.Struct({
|
|
301
372
|
"cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(CacheControlEphemeral, S.Null), {
|
|
302
373
|
nullable: true
|
|
303
374
|
}),
|
|
304
|
-
"
|
|
305
|
-
"
|
|
375
|
+
"name": BashTool20250124Name,
|
|
376
|
+
"type": BashTool20250124Type
|
|
306
377
|
}) {}
|
|
307
378
|
exports.BashTool20250124 = BashTool20250124;
|
|
308
|
-
class TextEditor20250124Type extends /*#__PURE__*/S.Literal("text_editor_20250124") {}
|
|
309
|
-
exports.TextEditor20250124Type = TextEditor20250124Type;
|
|
310
379
|
class TextEditor20250124Name extends /*#__PURE__*/S.Literal("str_replace_editor") {}
|
|
311
380
|
exports.TextEditor20250124Name = TextEditor20250124Name;
|
|
381
|
+
class TextEditor20250124Type extends /*#__PURE__*/S.Literal("text_editor_20250124") {}
|
|
382
|
+
exports.TextEditor20250124Type = TextEditor20250124Type;
|
|
312
383
|
class TextEditor20250124 extends /*#__PURE__*/S.Struct({
|
|
313
384
|
"cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(CacheControlEphemeral, S.Null), {
|
|
314
385
|
nullable: true
|
|
315
386
|
}),
|
|
316
|
-
"
|
|
317
|
-
"
|
|
387
|
+
"name": TextEditor20250124Name,
|
|
388
|
+
"type": TextEditor20250124Type
|
|
318
389
|
}) {}
|
|
319
390
|
exports.TextEditor20250124 = TextEditor20250124;
|
|
391
|
+
class TextEditor20250429Name extends /*#__PURE__*/S.Literal("str_replace_based_edit_tool") {}
|
|
392
|
+
exports.TextEditor20250429Name = TextEditor20250429Name;
|
|
393
|
+
class TextEditor20250429Type extends /*#__PURE__*/S.Literal("text_editor_20250429") {}
|
|
394
|
+
exports.TextEditor20250429Type = TextEditor20250429Type;
|
|
395
|
+
class TextEditor20250429 extends /*#__PURE__*/S.Struct({
|
|
396
|
+
"cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(CacheControlEphemeral, S.Null), {
|
|
397
|
+
nullable: true
|
|
398
|
+
}),
|
|
399
|
+
"name": TextEditor20250429Name,
|
|
400
|
+
"type": TextEditor20250429Type
|
|
401
|
+
}) {}
|
|
402
|
+
exports.TextEditor20250429 = TextEditor20250429;
|
|
403
|
+
class WebSearchTool20250305Name extends /*#__PURE__*/S.Literal("web_search") {}
|
|
404
|
+
exports.WebSearchTool20250305Name = WebSearchTool20250305Name;
|
|
405
|
+
class WebSearchTool20250305Type extends /*#__PURE__*/S.Literal("web_search_20250305") {}
|
|
406
|
+
exports.WebSearchTool20250305Type = WebSearchTool20250305Type;
|
|
407
|
+
class UserLocationType extends /*#__PURE__*/S.Literal("approximate") {}
|
|
408
|
+
exports.UserLocationType = UserLocationType;
|
|
409
|
+
class UserLocation extends /*#__PURE__*/S.Struct({
|
|
410
|
+
"city": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1), /*#__PURE__*/S.maxLength(255)), S.Null), {
|
|
411
|
+
nullable: true
|
|
412
|
+
}),
|
|
413
|
+
"country": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(2), /*#__PURE__*/S.maxLength(2)), S.Null), {
|
|
414
|
+
nullable: true
|
|
415
|
+
}),
|
|
416
|
+
"region": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1), /*#__PURE__*/S.maxLength(255)), S.Null), {
|
|
417
|
+
nullable: true
|
|
418
|
+
}),
|
|
419
|
+
"timezone": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1), /*#__PURE__*/S.maxLength(255)), S.Null), {
|
|
420
|
+
nullable: true
|
|
421
|
+
}),
|
|
422
|
+
"type": UserLocationType
|
|
423
|
+
}) {}
|
|
424
|
+
exports.UserLocation = UserLocation;
|
|
425
|
+
class WebSearchTool20250305 extends /*#__PURE__*/S.Struct({
|
|
426
|
+
"allowed_domains": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(/*#__PURE__*/S.Array(S.String), S.Null), {
|
|
427
|
+
nullable: true
|
|
428
|
+
}),
|
|
429
|
+
"blocked_domains": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(/*#__PURE__*/S.Array(S.String), S.Null), {
|
|
430
|
+
nullable: true
|
|
431
|
+
}),
|
|
432
|
+
"cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(CacheControlEphemeral, S.Null), {
|
|
433
|
+
nullable: true
|
|
434
|
+
}),
|
|
435
|
+
"max_uses": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(/*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThan(0)), S.Null), {
|
|
436
|
+
nullable: true
|
|
437
|
+
}),
|
|
438
|
+
"name": WebSearchTool20250305Name,
|
|
439
|
+
"type": WebSearchTool20250305Type,
|
|
440
|
+
"user_location": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(UserLocation, S.Null), {
|
|
441
|
+
nullable: true
|
|
442
|
+
})
|
|
443
|
+
}) {}
|
|
444
|
+
exports.WebSearchTool20250305 = WebSearchTool20250305;
|
|
320
445
|
class CreateMessageParams extends /*#__PURE__*/S.Class("CreateMessageParams")({
|
|
321
|
-
"model": Model,
|
|
446
|
+
"model": /*#__PURE__*/S.Union(S.String, Model),
|
|
322
447
|
"messages": /*#__PURE__*/S.Array(InputMessage),
|
|
323
448
|
"max_tokens": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(1)),
|
|
324
449
|
"metadata": /*#__PURE__*/S.optionalWith(Metadata, {
|
|
325
450
|
nullable: true
|
|
326
451
|
}),
|
|
452
|
+
"service_tier": /*#__PURE__*/S.optionalWith(CreateMessageParamsServiceTier, {
|
|
453
|
+
nullable: true
|
|
454
|
+
}),
|
|
327
455
|
"stop_sequences": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(S.String), {
|
|
328
456
|
nullable: true
|
|
329
457
|
}),
|
|
@@ -342,7 +470,7 @@ class CreateMessageParams extends /*#__PURE__*/S.Class("CreateMessageParams")({
|
|
|
342
470
|
"tool_choice": /*#__PURE__*/S.optionalWith(ToolChoice, {
|
|
343
471
|
nullable: true
|
|
344
472
|
}),
|
|
345
|
-
"tools": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(Tool, BashTool20250124, TextEditor20250124)), {
|
|
473
|
+
"tools": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(Tool, BashTool20250124, TextEditor20250124, TextEditor20250429, WebSearchTool20250305)), {
|
|
346
474
|
nullable: true
|
|
347
475
|
}),
|
|
348
476
|
"top_k": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)), {
|
|
@@ -357,182 +485,234 @@ class MessageType extends /*#__PURE__*/S.Literal("message") {}
|
|
|
357
485
|
exports.MessageType = MessageType;
|
|
358
486
|
class MessageRole extends /*#__PURE__*/S.Literal("assistant") {}
|
|
359
487
|
exports.MessageRole = MessageRole;
|
|
360
|
-
class ResponseTextBlockType extends /*#__PURE__*/S.Literal("text") {}
|
|
361
|
-
exports.ResponseTextBlockType = ResponseTextBlockType;
|
|
362
488
|
class ResponseCharLocationCitationType extends /*#__PURE__*/S.Literal("char_location") {}
|
|
363
489
|
exports.ResponseCharLocationCitationType = ResponseCharLocationCitationType;
|
|
364
490
|
class ResponseCharLocationCitation extends /*#__PURE__*/S.Struct({
|
|
365
|
-
"type": /*#__PURE__*/ResponseCharLocationCitationType.pipe(S.propertySignature, /*#__PURE__*/S.withConstructorDefault(() => "char_location")),
|
|
366
491
|
"cited_text": S.String,
|
|
367
492
|
"document_index": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
368
493
|
"document_title": /*#__PURE__*/S.Union(S.String, S.Null),
|
|
494
|
+
"end_char_index": S.Int,
|
|
369
495
|
"start_char_index": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
370
|
-
"
|
|
496
|
+
"type": ResponseCharLocationCitationType
|
|
371
497
|
}) {}
|
|
372
498
|
exports.ResponseCharLocationCitation = ResponseCharLocationCitation;
|
|
373
499
|
class ResponsePageLocationCitationType extends /*#__PURE__*/S.Literal("page_location") {}
|
|
374
500
|
exports.ResponsePageLocationCitationType = ResponsePageLocationCitationType;
|
|
375
501
|
class ResponsePageLocationCitation extends /*#__PURE__*/S.Struct({
|
|
376
|
-
"type": /*#__PURE__*/ResponsePageLocationCitationType.pipe(S.propertySignature, /*#__PURE__*/S.withConstructorDefault(() => "page_location")),
|
|
377
502
|
"cited_text": S.String,
|
|
378
503
|
"document_index": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
379
504
|
"document_title": /*#__PURE__*/S.Union(S.String, S.Null),
|
|
505
|
+
"end_page_number": S.Int,
|
|
380
506
|
"start_page_number": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(1)),
|
|
381
|
-
"
|
|
507
|
+
"type": ResponsePageLocationCitationType
|
|
382
508
|
}) {}
|
|
383
509
|
exports.ResponsePageLocationCitation = ResponsePageLocationCitation;
|
|
384
510
|
class ResponseContentBlockLocationCitationType extends /*#__PURE__*/S.Literal("content_block_location") {}
|
|
385
511
|
exports.ResponseContentBlockLocationCitationType = ResponseContentBlockLocationCitationType;
|
|
386
512
|
class ResponseContentBlockLocationCitation extends /*#__PURE__*/S.Struct({
|
|
387
|
-
"type": /*#__PURE__*/ResponseContentBlockLocationCitationType.pipe(S.propertySignature, /*#__PURE__*/S.withConstructorDefault(() => "content_block_location")),
|
|
388
513
|
"cited_text": S.String,
|
|
389
514
|
"document_index": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
390
515
|
"document_title": /*#__PURE__*/S.Union(S.String, S.Null),
|
|
516
|
+
"end_block_index": S.Int,
|
|
391
517
|
"start_block_index": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
392
|
-
"
|
|
518
|
+
"type": ResponseContentBlockLocationCitationType
|
|
393
519
|
}) {}
|
|
394
520
|
exports.ResponseContentBlockLocationCitation = ResponseContentBlockLocationCitation;
|
|
521
|
+
class ResponseWebSearchResultLocationCitationType extends /*#__PURE__*/S.Literal("web_search_result_location") {}
|
|
522
|
+
exports.ResponseWebSearchResultLocationCitationType = ResponseWebSearchResultLocationCitationType;
|
|
523
|
+
class ResponseWebSearchResultLocationCitation extends /*#__PURE__*/S.Struct({
|
|
524
|
+
"cited_text": S.String,
|
|
525
|
+
"encrypted_index": S.String,
|
|
526
|
+
"title": /*#__PURE__*/S.Union(S.String, S.Null),
|
|
527
|
+
"type": ResponseWebSearchResultLocationCitationType,
|
|
528
|
+
"url": S.String
|
|
529
|
+
}) {}
|
|
530
|
+
exports.ResponseWebSearchResultLocationCitation = ResponseWebSearchResultLocationCitation;
|
|
531
|
+
class ResponseTextBlockType extends /*#__PURE__*/S.Literal("text") {}
|
|
532
|
+
exports.ResponseTextBlockType = ResponseTextBlockType;
|
|
395
533
|
class ResponseTextBlock extends /*#__PURE__*/S.Struct({
|
|
396
|
-
"
|
|
534
|
+
"citations": /*#__PURE__*/S.NullOr(/*#__PURE__*/S.Union(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(ResponseCharLocationCitation, ResponsePageLocationCitation, ResponseContentBlockLocationCitation, ResponseWebSearchResultLocationCitation)), S.Null)),
|
|
397
535
|
"text": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(0), /*#__PURE__*/S.maxLength(5000000)),
|
|
398
|
-
"
|
|
399
|
-
default: () => null
|
|
400
|
-
})
|
|
536
|
+
"type": ResponseTextBlockType
|
|
401
537
|
}) {}
|
|
402
538
|
exports.ResponseTextBlock = ResponseTextBlock;
|
|
403
539
|
class ResponseToolUseBlockType extends /*#__PURE__*/S.Literal("tool_use") {}
|
|
404
540
|
exports.ResponseToolUseBlockType = ResponseToolUseBlockType;
|
|
405
541
|
class ResponseToolUseBlock extends /*#__PURE__*/S.Struct({
|
|
406
|
-
"type": /*#__PURE__*/ResponseToolUseBlockType.pipe(S.propertySignature, /*#__PURE__*/S.withConstructorDefault(() => "tool_use")),
|
|
407
542
|
"id": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.pattern(/*#__PURE__*/new RegExp("^[a-zA-Z0-9_-]+$"))),
|
|
408
|
-
"name": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1)),
|
|
409
543
|
"input": /*#__PURE__*/S.Record({
|
|
410
544
|
key: S.String,
|
|
411
545
|
value: S.Unknown
|
|
412
|
-
})
|
|
546
|
+
}),
|
|
547
|
+
"name": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1)),
|
|
548
|
+
"type": ResponseToolUseBlockType
|
|
413
549
|
}) {}
|
|
414
550
|
exports.ResponseToolUseBlock = ResponseToolUseBlock;
|
|
551
|
+
class ResponseServerToolUseBlockName extends /*#__PURE__*/S.Literal("web_search") {}
|
|
552
|
+
exports.ResponseServerToolUseBlockName = ResponseServerToolUseBlockName;
|
|
553
|
+
class ResponseServerToolUseBlockType extends /*#__PURE__*/S.Literal("server_tool_use") {}
|
|
554
|
+
exports.ResponseServerToolUseBlockType = ResponseServerToolUseBlockType;
|
|
555
|
+
class ResponseServerToolUseBlock extends /*#__PURE__*/S.Struct({
|
|
556
|
+
"id": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.pattern(/*#__PURE__*/new RegExp("^srvtoolu_[a-zA-Z0-9_]+$"))),
|
|
557
|
+
"input": /*#__PURE__*/S.Record({
|
|
558
|
+
key: S.String,
|
|
559
|
+
value: S.Unknown
|
|
560
|
+
}),
|
|
561
|
+
"name": ResponseServerToolUseBlockName,
|
|
562
|
+
"type": ResponseServerToolUseBlockType
|
|
563
|
+
}) {}
|
|
564
|
+
exports.ResponseServerToolUseBlock = ResponseServerToolUseBlock;
|
|
565
|
+
class ResponseWebSearchToolResultErrorType extends /*#__PURE__*/S.Literal("web_search_tool_result_error") {}
|
|
566
|
+
exports.ResponseWebSearchToolResultErrorType = ResponseWebSearchToolResultErrorType;
|
|
567
|
+
class ResponseWebSearchToolResultError extends /*#__PURE__*/S.Struct({
|
|
568
|
+
"error_code": WebSearchToolResultErrorCode,
|
|
569
|
+
"type": ResponseWebSearchToolResultErrorType
|
|
570
|
+
}) {}
|
|
571
|
+
exports.ResponseWebSearchToolResultError = ResponseWebSearchToolResultError;
|
|
572
|
+
class ResponseWebSearchResultBlockType extends /*#__PURE__*/S.Literal("web_search_result") {}
|
|
573
|
+
exports.ResponseWebSearchResultBlockType = ResponseWebSearchResultBlockType;
|
|
574
|
+
class ResponseWebSearchResultBlock extends /*#__PURE__*/S.Struct({
|
|
575
|
+
"encrypted_content": S.String,
|
|
576
|
+
"page_age": /*#__PURE__*/S.NullOr(/*#__PURE__*/S.Union(S.String, S.Null)),
|
|
577
|
+
"title": S.String,
|
|
578
|
+
"type": ResponseWebSearchResultBlockType,
|
|
579
|
+
"url": S.String
|
|
580
|
+
}) {}
|
|
581
|
+
exports.ResponseWebSearchResultBlock = ResponseWebSearchResultBlock;
|
|
582
|
+
class ResponseWebSearchToolResultBlockType extends /*#__PURE__*/S.Literal("web_search_tool_result") {}
|
|
583
|
+
exports.ResponseWebSearchToolResultBlockType = ResponseWebSearchToolResultBlockType;
|
|
584
|
+
class ResponseWebSearchToolResultBlock extends /*#__PURE__*/S.Struct({
|
|
585
|
+
"content": /*#__PURE__*/S.Union(ResponseWebSearchToolResultError, /*#__PURE__*/S.Array(ResponseWebSearchResultBlock)),
|
|
586
|
+
"tool_use_id": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.pattern(/*#__PURE__*/new RegExp("^srvtoolu_[a-zA-Z0-9_]+$"))),
|
|
587
|
+
"type": ResponseWebSearchToolResultBlockType
|
|
588
|
+
}) {}
|
|
589
|
+
exports.ResponseWebSearchToolResultBlock = ResponseWebSearchToolResultBlock;
|
|
415
590
|
class ResponseThinkingBlockType extends /*#__PURE__*/S.Literal("thinking") {}
|
|
416
591
|
exports.ResponseThinkingBlockType = ResponseThinkingBlockType;
|
|
417
592
|
class ResponseThinkingBlock extends /*#__PURE__*/S.Struct({
|
|
418
|
-
"
|
|
593
|
+
"signature": S.String,
|
|
419
594
|
"thinking": S.String,
|
|
420
|
-
"
|
|
595
|
+
"type": ResponseThinkingBlockType
|
|
421
596
|
}) {}
|
|
422
597
|
exports.ResponseThinkingBlock = ResponseThinkingBlock;
|
|
423
598
|
class ResponseRedactedThinkingBlockType extends /*#__PURE__*/S.Literal("redacted_thinking") {}
|
|
424
599
|
exports.ResponseRedactedThinkingBlockType = ResponseRedactedThinkingBlockType;
|
|
425
600
|
class ResponseRedactedThinkingBlock extends /*#__PURE__*/S.Struct({
|
|
426
|
-
"
|
|
427
|
-
"
|
|
601
|
+
"data": S.String,
|
|
602
|
+
"type": ResponseRedactedThinkingBlockType
|
|
428
603
|
}) {}
|
|
429
604
|
exports.ResponseRedactedThinkingBlock = ResponseRedactedThinkingBlock;
|
|
430
|
-
class ContentBlock extends /*#__PURE__*/S.Union(ResponseTextBlock, ResponseToolUseBlock, ResponseThinkingBlock, ResponseRedactedThinkingBlock) {}
|
|
605
|
+
class ContentBlock extends /*#__PURE__*/S.Union(ResponseTextBlock, ResponseToolUseBlock, ResponseServerToolUseBlock, ResponseWebSearchToolResultBlock, ResponseThinkingBlock, ResponseRedactedThinkingBlock) {}
|
|
431
606
|
exports.ContentBlock = ContentBlock;
|
|
432
|
-
class
|
|
433
|
-
exports.
|
|
607
|
+
class StopReason extends /*#__PURE__*/S.Literal("end_turn", "max_tokens", "stop_sequence", "tool_use", "pause_turn", "refusal") {}
|
|
608
|
+
exports.StopReason = StopReason;
|
|
609
|
+
class ServerToolUsage extends /*#__PURE__*/S.Struct({
|
|
610
|
+
"web_search_requests": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0))
|
|
611
|
+
}) {}
|
|
612
|
+
exports.ServerToolUsage = ServerToolUsage;
|
|
613
|
+
class UsageServiceTierEnum extends /*#__PURE__*/S.Literal("standard", "priority", "batch") {}
|
|
614
|
+
exports.UsageServiceTierEnum = UsageServiceTierEnum;
|
|
434
615
|
class Usage extends /*#__PURE__*/S.Struct({
|
|
616
|
+
"cache_creation_input_tokens": /*#__PURE__*/S.NullOr(/*#__PURE__*/S.Union(/*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)), S.Null)),
|
|
617
|
+
"cache_read_input_tokens": /*#__PURE__*/S.NullOr(/*#__PURE__*/S.Union(/*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)), S.Null)),
|
|
435
618
|
"input_tokens": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
436
|
-
"
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
"cache_read_input_tokens": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.NullOr(/*#__PURE__*/S.Union(/*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)), S.Null)), {
|
|
440
|
-
default: () => null
|
|
441
|
-
}),
|
|
442
|
-
"output_tokens": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0))
|
|
619
|
+
"output_tokens": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
620
|
+
"server_tool_use": /*#__PURE__*/S.NullOr(/*#__PURE__*/S.Union(ServerToolUsage, S.Null)),
|
|
621
|
+
"service_tier": /*#__PURE__*/S.NullOr(/*#__PURE__*/S.Union(UsageServiceTierEnum, S.Null))
|
|
443
622
|
}) {}
|
|
444
623
|
exports.Usage = Usage;
|
|
445
624
|
class Message extends /*#__PURE__*/S.Class("Message")({
|
|
446
625
|
"id": S.String,
|
|
447
|
-
"type":
|
|
448
|
-
"role":
|
|
626
|
+
"type": MessageType,
|
|
627
|
+
"role": MessageRole,
|
|
449
628
|
"content": /*#__PURE__*/S.Array(ContentBlock),
|
|
450
|
-
"model": Model,
|
|
451
|
-
"stop_reason": /*#__PURE__*/S.Union(
|
|
452
|
-
"stop_sequence": /*#__PURE__*/S.
|
|
453
|
-
default: () => null
|
|
454
|
-
}),
|
|
629
|
+
"model": /*#__PURE__*/S.Union(S.String, Model),
|
|
630
|
+
"stop_reason": /*#__PURE__*/S.Union(StopReason, S.Null),
|
|
631
|
+
"stop_sequence": /*#__PURE__*/S.NullOr(/*#__PURE__*/S.Union(S.String, S.Null)),
|
|
455
632
|
"usage": Usage
|
|
456
633
|
}) {}
|
|
457
634
|
exports.Message = Message;
|
|
458
|
-
class ErrorResponseType extends /*#__PURE__*/S.Literal("error") {}
|
|
459
|
-
exports.ErrorResponseType = ErrorResponseType;
|
|
460
635
|
class InvalidRequestErrorType extends /*#__PURE__*/S.Literal("invalid_request_error") {}
|
|
461
636
|
exports.InvalidRequestErrorType = InvalidRequestErrorType;
|
|
462
637
|
class InvalidRequestError extends /*#__PURE__*/S.Struct({
|
|
463
|
-
"
|
|
464
|
-
"
|
|
638
|
+
"message": S.String,
|
|
639
|
+
"type": InvalidRequestErrorType
|
|
465
640
|
}) {}
|
|
466
641
|
exports.InvalidRequestError = InvalidRequestError;
|
|
467
642
|
class AuthenticationErrorType extends /*#__PURE__*/S.Literal("authentication_error") {}
|
|
468
643
|
exports.AuthenticationErrorType = AuthenticationErrorType;
|
|
469
644
|
class AuthenticationError extends /*#__PURE__*/S.Struct({
|
|
470
|
-
"
|
|
471
|
-
"
|
|
645
|
+
"message": S.String,
|
|
646
|
+
"type": AuthenticationErrorType
|
|
472
647
|
}) {}
|
|
473
648
|
exports.AuthenticationError = AuthenticationError;
|
|
474
649
|
class BillingErrorType extends /*#__PURE__*/S.Literal("billing_error") {}
|
|
475
650
|
exports.BillingErrorType = BillingErrorType;
|
|
476
651
|
class BillingError extends /*#__PURE__*/S.Struct({
|
|
477
|
-
"
|
|
478
|
-
"
|
|
652
|
+
"message": S.String,
|
|
653
|
+
"type": BillingErrorType
|
|
479
654
|
}) {}
|
|
480
655
|
exports.BillingError = BillingError;
|
|
481
656
|
class PermissionErrorType extends /*#__PURE__*/S.Literal("permission_error") {}
|
|
482
657
|
exports.PermissionErrorType = PermissionErrorType;
|
|
483
658
|
class PermissionError extends /*#__PURE__*/S.Struct({
|
|
484
|
-
"
|
|
485
|
-
"
|
|
659
|
+
"message": S.String,
|
|
660
|
+
"type": PermissionErrorType
|
|
486
661
|
}) {}
|
|
487
662
|
exports.PermissionError = PermissionError;
|
|
488
663
|
class NotFoundErrorType extends /*#__PURE__*/S.Literal("not_found_error") {}
|
|
489
664
|
exports.NotFoundErrorType = NotFoundErrorType;
|
|
490
665
|
class NotFoundError extends /*#__PURE__*/S.Struct({
|
|
491
|
-
"
|
|
492
|
-
"
|
|
666
|
+
"message": S.String,
|
|
667
|
+
"type": NotFoundErrorType
|
|
493
668
|
}) {}
|
|
494
669
|
exports.NotFoundError = NotFoundError;
|
|
495
670
|
class RateLimitErrorType extends /*#__PURE__*/S.Literal("rate_limit_error") {}
|
|
496
671
|
exports.RateLimitErrorType = RateLimitErrorType;
|
|
497
672
|
class RateLimitError extends /*#__PURE__*/S.Struct({
|
|
498
|
-
"
|
|
499
|
-
"
|
|
673
|
+
"message": S.String,
|
|
674
|
+
"type": RateLimitErrorType
|
|
500
675
|
}) {}
|
|
501
676
|
exports.RateLimitError = RateLimitError;
|
|
502
677
|
class GatewayTimeoutErrorType extends /*#__PURE__*/S.Literal("timeout_error") {}
|
|
503
678
|
exports.GatewayTimeoutErrorType = GatewayTimeoutErrorType;
|
|
504
679
|
class GatewayTimeoutError extends /*#__PURE__*/S.Struct({
|
|
505
|
-
"
|
|
506
|
-
"
|
|
680
|
+
"message": S.String,
|
|
681
|
+
"type": GatewayTimeoutErrorType
|
|
507
682
|
}) {}
|
|
508
683
|
exports.GatewayTimeoutError = GatewayTimeoutError;
|
|
509
684
|
class APIErrorType extends /*#__PURE__*/S.Literal("api_error") {}
|
|
510
685
|
exports.APIErrorType = APIErrorType;
|
|
511
686
|
class APIError extends /*#__PURE__*/S.Struct({
|
|
512
|
-
"
|
|
513
|
-
"
|
|
687
|
+
"message": S.String,
|
|
688
|
+
"type": APIErrorType
|
|
514
689
|
}) {}
|
|
515
690
|
exports.APIError = APIError;
|
|
516
691
|
class OverloadedErrorType extends /*#__PURE__*/S.Literal("overloaded_error") {}
|
|
517
692
|
exports.OverloadedErrorType = OverloadedErrorType;
|
|
518
693
|
class OverloadedError extends /*#__PURE__*/S.Struct({
|
|
519
|
-
"
|
|
520
|
-
"
|
|
694
|
+
"message": S.String,
|
|
695
|
+
"type": OverloadedErrorType
|
|
521
696
|
}) {}
|
|
522
697
|
exports.OverloadedError = OverloadedError;
|
|
698
|
+
class ErrorResponseType extends /*#__PURE__*/S.Literal("error") {}
|
|
699
|
+
exports.ErrorResponseType = ErrorResponseType;
|
|
523
700
|
class ErrorResponse extends /*#__PURE__*/S.Class("ErrorResponse")({
|
|
524
|
-
"
|
|
525
|
-
"
|
|
701
|
+
"error": /*#__PURE__*/S.Union(InvalidRequestError, AuthenticationError, BillingError, PermissionError, NotFoundError, RateLimitError, GatewayTimeoutError, APIError, OverloadedError),
|
|
702
|
+
"type": ErrorResponseType
|
|
526
703
|
}) {}
|
|
527
704
|
exports.ErrorResponse = ErrorResponse;
|
|
528
705
|
class CompletePostParams extends /*#__PURE__*/S.Struct({
|
|
529
706
|
"anthropic-version": /*#__PURE__*/S.optionalWith(S.String, {
|
|
530
707
|
nullable: true
|
|
708
|
+
}),
|
|
709
|
+
"anthropic-beta": /*#__PURE__*/S.optionalWith(S.String, {
|
|
710
|
+
nullable: true
|
|
531
711
|
})
|
|
532
712
|
}) {}
|
|
533
713
|
exports.CompletePostParams = CompletePostParams;
|
|
534
714
|
class CompletionRequest extends /*#__PURE__*/S.Class("CompletionRequest")({
|
|
535
|
-
"model": Model,
|
|
715
|
+
"model": /*#__PURE__*/S.Union(S.String, Model),
|
|
536
716
|
"prompt": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1)),
|
|
537
717
|
"max_tokens_to_sample": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(1)),
|
|
538
718
|
"stop_sequences": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(S.String), {
|
|
@@ -558,11 +738,11 @@ exports.CompletionRequest = CompletionRequest;
|
|
|
558
738
|
class CompletionResponseType extends /*#__PURE__*/S.Literal("completion") {}
|
|
559
739
|
exports.CompletionResponseType = CompletionResponseType;
|
|
560
740
|
class CompletionResponse extends /*#__PURE__*/S.Class("CompletionResponse")({
|
|
561
|
-
"type": /*#__PURE__*/CompletionResponseType.pipe(S.propertySignature, /*#__PURE__*/S.withConstructorDefault(() => "completion")),
|
|
562
|
-
"id": S.String,
|
|
563
741
|
"completion": S.String,
|
|
742
|
+
"id": S.String,
|
|
743
|
+
"model": /*#__PURE__*/S.Union(S.String, Model),
|
|
564
744
|
"stop_reason": /*#__PURE__*/S.Union(S.String, S.Null),
|
|
565
|
-
"
|
|
745
|
+
"type": CompletionResponseType
|
|
566
746
|
}) {}
|
|
567
747
|
exports.CompletionResponse = CompletionResponse;
|
|
568
748
|
class ModelsListParams extends /*#__PURE__*/S.Struct({
|
|
@@ -573,30 +753,32 @@ class ModelsListParams extends /*#__PURE__*/S.Struct({
|
|
|
573
753
|
nullable: true
|
|
574
754
|
}),
|
|
575
755
|
"limit": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(1), /*#__PURE__*/S.lessThanOrEqualTo(1000)), {
|
|
576
|
-
nullable: true
|
|
577
|
-
default: () => 20
|
|
756
|
+
nullable: true
|
|
578
757
|
}),
|
|
579
758
|
"anthropic-version": /*#__PURE__*/S.optionalWith(S.String, {
|
|
580
759
|
nullable: true
|
|
581
760
|
}),
|
|
582
761
|
"x-api-key": /*#__PURE__*/S.optionalWith(S.String, {
|
|
583
762
|
nullable: true
|
|
763
|
+
}),
|
|
764
|
+
"anthropic-beta": /*#__PURE__*/S.optionalWith(S.String, {
|
|
765
|
+
nullable: true
|
|
584
766
|
})
|
|
585
767
|
}) {}
|
|
586
768
|
exports.ModelsListParams = ModelsListParams;
|
|
587
769
|
class ModelInfoType extends /*#__PURE__*/S.Literal("model") {}
|
|
588
770
|
exports.ModelInfoType = ModelInfoType;
|
|
589
771
|
class ModelInfo extends /*#__PURE__*/S.Struct({
|
|
590
|
-
"
|
|
591
|
-
"id": S.String,
|
|
772
|
+
"created_at": S.String,
|
|
592
773
|
"display_name": S.String,
|
|
593
|
-
"
|
|
774
|
+
"id": S.String,
|
|
775
|
+
"type": ModelInfoType
|
|
594
776
|
}) {}
|
|
595
777
|
exports.ModelInfo = ModelInfo;
|
|
596
778
|
class ListResponseModelInfo extends /*#__PURE__*/S.Class("ListResponseModelInfo")({
|
|
597
779
|
"data": /*#__PURE__*/S.Array(ModelInfo),
|
|
598
|
-
"has_more": S.Boolean,
|
|
599
780
|
"first_id": /*#__PURE__*/S.Union(S.String, S.Null),
|
|
781
|
+
"has_more": S.Boolean,
|
|
600
782
|
"last_id": /*#__PURE__*/S.Union(S.String, S.Null)
|
|
601
783
|
}) {}
|
|
602
784
|
exports.ListResponseModelInfo = ListResponseModelInfo;
|
|
@@ -606,6 +788,9 @@ class ModelsGetParams extends /*#__PURE__*/S.Struct({
|
|
|
606
788
|
}),
|
|
607
789
|
"x-api-key": /*#__PURE__*/S.optionalWith(S.String, {
|
|
608
790
|
nullable: true
|
|
791
|
+
}),
|
|
792
|
+
"anthropic-beta": /*#__PURE__*/S.optionalWith(S.String, {
|
|
793
|
+
nullable: true
|
|
609
794
|
})
|
|
610
795
|
}) {}
|
|
611
796
|
exports.ModelsGetParams = ModelsGetParams;
|
|
@@ -617,8 +802,7 @@ class MessageBatchesListParams extends /*#__PURE__*/S.Struct({
|
|
|
617
802
|
nullable: true
|
|
618
803
|
}),
|
|
619
804
|
"limit": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(1), /*#__PURE__*/S.lessThanOrEqualTo(1000)), {
|
|
620
|
-
nullable: true
|
|
621
|
-
default: () => 20
|
|
805
|
+
nullable: true
|
|
622
806
|
}),
|
|
623
807
|
"anthropic-version": /*#__PURE__*/S.optionalWith(S.String, {
|
|
624
808
|
nullable: true
|
|
@@ -628,35 +812,35 @@ class MessageBatchesListParams extends /*#__PURE__*/S.Struct({
|
|
|
628
812
|
})
|
|
629
813
|
}) {}
|
|
630
814
|
exports.MessageBatchesListParams = MessageBatchesListParams;
|
|
631
|
-
class MessageBatchType extends /*#__PURE__*/S.Literal("message_batch") {}
|
|
632
|
-
exports.MessageBatchType = MessageBatchType;
|
|
633
815
|
class MessageBatchProcessingStatus extends /*#__PURE__*/S.Literal("in_progress", "canceling", "ended") {}
|
|
634
816
|
exports.MessageBatchProcessingStatus = MessageBatchProcessingStatus;
|
|
635
817
|
class RequestCounts extends /*#__PURE__*/S.Struct({
|
|
636
|
-
"
|
|
637
|
-
"
|
|
638
|
-
"
|
|
639
|
-
"
|
|
640
|
-
"
|
|
818
|
+
"canceled": S.Int,
|
|
819
|
+
"errored": S.Int,
|
|
820
|
+
"expired": S.Int,
|
|
821
|
+
"processing": S.Int,
|
|
822
|
+
"succeeded": S.Int
|
|
641
823
|
}) {}
|
|
642
824
|
exports.RequestCounts = RequestCounts;
|
|
825
|
+
class MessageBatchType extends /*#__PURE__*/S.Literal("message_batch") {}
|
|
826
|
+
exports.MessageBatchType = MessageBatchType;
|
|
643
827
|
class MessageBatch extends /*#__PURE__*/S.Struct({
|
|
828
|
+
"archived_at": /*#__PURE__*/S.Union(S.String, S.Null),
|
|
829
|
+
"cancel_initiated_at": /*#__PURE__*/S.Union(S.String, S.Null),
|
|
830
|
+
"created_at": S.String,
|
|
831
|
+
"ended_at": /*#__PURE__*/S.Union(S.String, S.Null),
|
|
832
|
+
"expires_at": S.String,
|
|
644
833
|
"id": S.String,
|
|
645
|
-
"type": /*#__PURE__*/MessageBatchType.pipe(S.propertySignature, /*#__PURE__*/S.withConstructorDefault(() => "message_batch")),
|
|
646
834
|
"processing_status": MessageBatchProcessingStatus,
|
|
647
835
|
"request_counts": RequestCounts,
|
|
648
|
-
"
|
|
649
|
-
"
|
|
650
|
-
"expires_at": S.String,
|
|
651
|
-
"archived_at": /*#__PURE__*/S.Union(S.String, S.Null),
|
|
652
|
-
"cancel_initiated_at": /*#__PURE__*/S.Union(S.String, S.Null),
|
|
653
|
-
"results_url": /*#__PURE__*/S.Union(S.String, S.Null)
|
|
836
|
+
"results_url": /*#__PURE__*/S.Union(S.String, S.Null),
|
|
837
|
+
"type": MessageBatchType
|
|
654
838
|
}) {}
|
|
655
839
|
exports.MessageBatch = MessageBatch;
|
|
656
840
|
class ListResponseMessageBatch extends /*#__PURE__*/S.Class("ListResponseMessageBatch")({
|
|
657
841
|
"data": /*#__PURE__*/S.Array(MessageBatch),
|
|
658
|
-
"has_more": S.Boolean,
|
|
659
842
|
"first_id": /*#__PURE__*/S.Union(S.String, S.Null),
|
|
843
|
+
"has_more": S.Boolean,
|
|
660
844
|
"last_id": /*#__PURE__*/S.Union(S.String, S.Null)
|
|
661
845
|
}) {}
|
|
662
846
|
exports.ListResponseMessageBatch = ListResponseMessageBatch;
|
|
@@ -697,7 +881,7 @@ class DeleteMessageBatchResponseType extends /*#__PURE__*/S.Literal("message_bat
|
|
|
697
881
|
exports.DeleteMessageBatchResponseType = DeleteMessageBatchResponseType;
|
|
698
882
|
class DeleteMessageBatchResponse extends /*#__PURE__*/S.Class("DeleteMessageBatchResponse")({
|
|
699
883
|
"id": S.String,
|
|
700
|
-
"type":
|
|
884
|
+
"type": DeleteMessageBatchResponseType
|
|
701
885
|
}) {}
|
|
702
886
|
exports.DeleteMessageBatchResponse = DeleteMessageBatchResponse;
|
|
703
887
|
class MessageBatchesCancelParams extends /*#__PURE__*/S.Struct({
|
|
@@ -722,99 +906,330 @@ class MessagesCountTokensPostParams extends /*#__PURE__*/S.Struct({
|
|
|
722
906
|
}) {}
|
|
723
907
|
exports.MessagesCountTokensPostParams = MessagesCountTokensPostParams;
|
|
724
908
|
class CountMessageTokensParams extends /*#__PURE__*/S.Class("CountMessageTokensParams")({
|
|
725
|
-
"tool_choice": /*#__PURE__*/S.optionalWith(ToolChoice, {
|
|
726
|
-
nullable: true
|
|
727
|
-
}),
|
|
728
|
-
"tools": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(Tool, BashTool20250124, TextEditor20250124)), {
|
|
729
|
-
nullable: true
|
|
730
|
-
}),
|
|
731
909
|
"messages": /*#__PURE__*/S.Array(InputMessage),
|
|
910
|
+
"model": /*#__PURE__*/S.Union(S.String, Model),
|
|
732
911
|
"system": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.Array(RequestTextBlock)), {
|
|
733
912
|
nullable: true
|
|
734
913
|
}),
|
|
735
914
|
"thinking": /*#__PURE__*/S.optionalWith(ThinkingConfigParam, {
|
|
736
915
|
nullable: true
|
|
737
916
|
}),
|
|
738
|
-
"
|
|
917
|
+
"tool_choice": /*#__PURE__*/S.optionalWith(ToolChoice, {
|
|
918
|
+
nullable: true
|
|
919
|
+
}),
|
|
920
|
+
"tools": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(Tool, BashTool20250124, TextEditor20250124, TextEditor20250429, WebSearchTool20250305)), {
|
|
921
|
+
nullable: true
|
|
922
|
+
})
|
|
739
923
|
}) {}
|
|
740
924
|
exports.CountMessageTokensParams = CountMessageTokensParams;
|
|
741
925
|
class CountMessageTokensResponse extends /*#__PURE__*/S.Class("CountMessageTokensResponse")({
|
|
742
926
|
"input_tokens": S.Int
|
|
743
927
|
}) {}
|
|
744
928
|
exports.CountMessageTokensResponse = CountMessageTokensResponse;
|
|
745
|
-
class
|
|
929
|
+
class ListFilesV1FilesGetParams extends /*#__PURE__*/S.Struct({
|
|
930
|
+
"before_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
931
|
+
nullable: true
|
|
932
|
+
}),
|
|
933
|
+
"after_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
934
|
+
nullable: true
|
|
935
|
+
}),
|
|
936
|
+
"limit": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(1), /*#__PURE__*/S.lessThanOrEqualTo(1000)), {
|
|
937
|
+
nullable: true
|
|
938
|
+
}),
|
|
746
939
|
"anthropic-beta": /*#__PURE__*/S.optionalWith(S.String, {
|
|
747
940
|
nullable: true
|
|
748
941
|
}),
|
|
749
942
|
"anthropic-version": /*#__PURE__*/S.optionalWith(S.String, {
|
|
750
943
|
nullable: true
|
|
944
|
+
}),
|
|
945
|
+
"x-api-key": /*#__PURE__*/S.optionalWith(S.String, {
|
|
946
|
+
nullable: true
|
|
751
947
|
})
|
|
752
948
|
}) {}
|
|
753
|
-
exports.
|
|
754
|
-
class
|
|
755
|
-
exports.
|
|
756
|
-
class
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
})
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
"type":
|
|
766
|
-
"cited_text": S.String,
|
|
767
|
-
"document_index": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
768
|
-
"document_title": /*#__PURE__*/S.Union(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1), /*#__PURE__*/S.maxLength(255)), S.Null),
|
|
769
|
-
"start_char_index": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
770
|
-
"end_char_index": S.Int
|
|
771
|
-
}) {}
|
|
772
|
-
exports.BetaRequestCharLocationCitation = BetaRequestCharLocationCitation;
|
|
773
|
-
class BetaRequestPageLocationCitationType extends /*#__PURE__*/S.Literal("page_location") {}
|
|
774
|
-
exports.BetaRequestPageLocationCitationType = BetaRequestPageLocationCitationType;
|
|
775
|
-
class BetaRequestPageLocationCitation extends /*#__PURE__*/S.Struct({
|
|
776
|
-
"type": BetaRequestPageLocationCitationType,
|
|
777
|
-
"cited_text": S.String,
|
|
778
|
-
"document_index": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
779
|
-
"document_title": /*#__PURE__*/S.Union(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1), /*#__PURE__*/S.maxLength(255)), S.Null),
|
|
780
|
-
"start_page_number": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(1)),
|
|
781
|
-
"end_page_number": S.Int
|
|
782
|
-
}) {}
|
|
783
|
-
exports.BetaRequestPageLocationCitation = BetaRequestPageLocationCitation;
|
|
784
|
-
class BetaRequestContentBlockLocationCitationType extends /*#__PURE__*/S.Literal("content_block_location") {}
|
|
785
|
-
exports.BetaRequestContentBlockLocationCitationType = BetaRequestContentBlockLocationCitationType;
|
|
786
|
-
class BetaRequestContentBlockLocationCitation extends /*#__PURE__*/S.Struct({
|
|
787
|
-
"type": BetaRequestContentBlockLocationCitationType,
|
|
788
|
-
"cited_text": S.String,
|
|
789
|
-
"document_index": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
790
|
-
"document_title": /*#__PURE__*/S.Union(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1), /*#__PURE__*/S.maxLength(255)), S.Null),
|
|
791
|
-
"start_block_index": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
792
|
-
"end_block_index": S.Int
|
|
949
|
+
exports.ListFilesV1FilesGetParams = ListFilesV1FilesGetParams;
|
|
950
|
+
class FileMetadataSchemaType extends /*#__PURE__*/S.Literal("file") {}
|
|
951
|
+
exports.FileMetadataSchemaType = FileMetadataSchemaType;
|
|
952
|
+
class FileMetadataSchema extends /*#__PURE__*/S.Struct({
|
|
953
|
+
"created_at": S.String,
|
|
954
|
+
"downloadable": /*#__PURE__*/S.optionalWith(S.Boolean, {
|
|
955
|
+
nullable: true
|
|
956
|
+
}),
|
|
957
|
+
"filename": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1), /*#__PURE__*/S.maxLength(500)),
|
|
958
|
+
"id": S.String,
|
|
959
|
+
"mime_type": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1), /*#__PURE__*/S.maxLength(255)),
|
|
960
|
+
"size_bytes": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
961
|
+
"type": FileMetadataSchemaType
|
|
793
962
|
}) {}
|
|
794
|
-
exports.
|
|
795
|
-
class
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
"cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(BetaCacheControlEphemeral, S.Null), {
|
|
963
|
+
exports.FileMetadataSchema = FileMetadataSchema;
|
|
964
|
+
class FileListResponse extends /*#__PURE__*/S.Class("FileListResponse")({
|
|
965
|
+
"data": /*#__PURE__*/S.Array(FileMetadataSchema),
|
|
966
|
+
"first_id": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(S.String, S.Null), {
|
|
799
967
|
nullable: true
|
|
800
968
|
}),
|
|
801
|
-
"
|
|
969
|
+
"has_more": /*#__PURE__*/S.optionalWith(S.Boolean, {
|
|
802
970
|
nullable: true
|
|
803
971
|
}),
|
|
804
|
-
"
|
|
805
|
-
|
|
972
|
+
"last_id": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(S.String, S.Null), {
|
|
973
|
+
nullable: true
|
|
974
|
+
})
|
|
806
975
|
}) {}
|
|
807
|
-
exports.
|
|
808
|
-
class
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
976
|
+
exports.FileListResponse = FileListResponse;
|
|
977
|
+
class UploadFileV1FilesPostParams extends /*#__PURE__*/S.Struct({
|
|
978
|
+
"anthropic-beta": /*#__PURE__*/S.optionalWith(S.String, {
|
|
979
|
+
nullable: true
|
|
980
|
+
}),
|
|
981
|
+
"anthropic-version": /*#__PURE__*/S.optionalWith(S.String, {
|
|
982
|
+
nullable: true
|
|
983
|
+
})
|
|
984
|
+
}) {}
|
|
985
|
+
exports.UploadFileV1FilesPostParams = UploadFileV1FilesPostParams;
|
|
986
|
+
class GetFileMetadataV1FilesFileIdGetParams extends /*#__PURE__*/S.Struct({
|
|
987
|
+
"anthropic-beta": /*#__PURE__*/S.optionalWith(S.String, {
|
|
988
|
+
nullable: true
|
|
989
|
+
}),
|
|
990
|
+
"anthropic-version": /*#__PURE__*/S.optionalWith(S.String, {
|
|
991
|
+
nullable: true
|
|
992
|
+
}),
|
|
993
|
+
"x-api-key": /*#__PURE__*/S.optionalWith(S.String, {
|
|
994
|
+
nullable: true
|
|
995
|
+
})
|
|
996
|
+
}) {}
|
|
997
|
+
exports.GetFileMetadataV1FilesFileIdGetParams = GetFileMetadataV1FilesFileIdGetParams;
|
|
998
|
+
class DeleteFileV1FilesFileIdDeleteParams extends /*#__PURE__*/S.Struct({
|
|
999
|
+
"anthropic-beta": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1000
|
+
nullable: true
|
|
1001
|
+
}),
|
|
1002
|
+
"anthropic-version": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1003
|
+
nullable: true
|
|
1004
|
+
}),
|
|
1005
|
+
"x-api-key": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1006
|
+
nullable: true
|
|
1007
|
+
})
|
|
1008
|
+
}) {}
|
|
1009
|
+
exports.DeleteFileV1FilesFileIdDeleteParams = DeleteFileV1FilesFileIdDeleteParams;
|
|
1010
|
+
class FileDeleteResponseType extends /*#__PURE__*/S.Literal("file_deleted") {}
|
|
1011
|
+
exports.FileDeleteResponseType = FileDeleteResponseType;
|
|
1012
|
+
class FileDeleteResponse extends /*#__PURE__*/S.Class("FileDeleteResponse")({
|
|
1013
|
+
"id": S.String,
|
|
1014
|
+
"type": /*#__PURE__*/S.optionalWith(FileDeleteResponseType, {
|
|
1015
|
+
nullable: true
|
|
1016
|
+
})
|
|
1017
|
+
}) {}
|
|
1018
|
+
exports.FileDeleteResponse = FileDeleteResponse;
|
|
1019
|
+
class DownloadFileV1FilesFileIdContentGetParams extends /*#__PURE__*/S.Struct({
|
|
1020
|
+
"anthropic-beta": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1021
|
+
nullable: true
|
|
1022
|
+
}),
|
|
1023
|
+
"anthropic-version": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1024
|
+
nullable: true
|
|
1025
|
+
}),
|
|
1026
|
+
"x-api-key": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1027
|
+
nullable: true
|
|
1028
|
+
})
|
|
1029
|
+
}) {}
|
|
1030
|
+
exports.DownloadFileV1FilesFileIdContentGetParams = DownloadFileV1FilesFileIdContentGetParams;
|
|
1031
|
+
class BetaMessagesPostParams extends /*#__PURE__*/S.Struct({
|
|
1032
|
+
"anthropic-beta": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1033
|
+
nullable: true
|
|
1034
|
+
}),
|
|
1035
|
+
"anthropic-version": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1036
|
+
nullable: true
|
|
1037
|
+
})
|
|
1038
|
+
}) {}
|
|
1039
|
+
exports.BetaMessagesPostParams = BetaMessagesPostParams;
|
|
1040
|
+
class BetaCacheControlEphemeralTtl extends /*#__PURE__*/S.Literal("5m", "1h") {}
|
|
1041
|
+
exports.BetaCacheControlEphemeralTtl = BetaCacheControlEphemeralTtl;
|
|
1042
|
+
class BetaCacheControlEphemeralType extends /*#__PURE__*/S.Literal("ephemeral") {}
|
|
1043
|
+
exports.BetaCacheControlEphemeralType = BetaCacheControlEphemeralType;
|
|
1044
|
+
class BetaCacheControlEphemeral extends /*#__PURE__*/S.Struct({
|
|
1045
|
+
"ttl": /*#__PURE__*/S.optionalWith(BetaCacheControlEphemeralTtl, {
|
|
1046
|
+
nullable: true
|
|
1047
|
+
}),
|
|
1048
|
+
"type": BetaCacheControlEphemeralType
|
|
1049
|
+
}) {}
|
|
1050
|
+
exports.BetaCacheControlEphemeral = BetaCacheControlEphemeral;
|
|
1051
|
+
class BetaRequestServerToolUseBlockName extends /*#__PURE__*/S.Literal("web_search", "code_execution") {}
|
|
1052
|
+
exports.BetaRequestServerToolUseBlockName = BetaRequestServerToolUseBlockName;
|
|
1053
|
+
class BetaRequestServerToolUseBlockType extends /*#__PURE__*/S.Literal("server_tool_use") {}
|
|
1054
|
+
exports.BetaRequestServerToolUseBlockType = BetaRequestServerToolUseBlockType;
|
|
1055
|
+
class BetaRequestServerToolUseBlock extends /*#__PURE__*/S.Struct({
|
|
1056
|
+
"cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(BetaCacheControlEphemeral, S.Null), {
|
|
1057
|
+
nullable: true
|
|
1058
|
+
}),
|
|
1059
|
+
"id": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.pattern(/*#__PURE__*/new RegExp("^srvtoolu_[a-zA-Z0-9_]+$"))),
|
|
1060
|
+
"input": /*#__PURE__*/S.Record({
|
|
1061
|
+
key: S.String,
|
|
1062
|
+
value: S.Unknown
|
|
1063
|
+
}),
|
|
1064
|
+
"name": BetaRequestServerToolUseBlockName,
|
|
1065
|
+
"type": BetaRequestServerToolUseBlockType
|
|
1066
|
+
}) {}
|
|
1067
|
+
exports.BetaRequestServerToolUseBlock = BetaRequestServerToolUseBlock;
|
|
1068
|
+
class BetaRequestWebSearchResultBlockType extends /*#__PURE__*/S.Literal("web_search_result") {}
|
|
1069
|
+
exports.BetaRequestWebSearchResultBlockType = BetaRequestWebSearchResultBlockType;
|
|
1070
|
+
class BetaRequestWebSearchResultBlock extends /*#__PURE__*/S.Struct({
|
|
1071
|
+
"encrypted_content": S.String,
|
|
1072
|
+
"page_age": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(S.String, S.Null), {
|
|
1073
|
+
nullable: true
|
|
1074
|
+
}),
|
|
1075
|
+
"title": S.String,
|
|
1076
|
+
"type": BetaRequestWebSearchResultBlockType,
|
|
1077
|
+
"url": S.String
|
|
1078
|
+
}) {}
|
|
1079
|
+
exports.BetaRequestWebSearchResultBlock = BetaRequestWebSearchResultBlock;
|
|
1080
|
+
class BetaWebSearchToolResultErrorCode extends /*#__PURE__*/S.Literal("invalid_tool_input", "unavailable", "max_uses_exceeded", "too_many_requests", "query_too_long") {}
|
|
1081
|
+
exports.BetaWebSearchToolResultErrorCode = BetaWebSearchToolResultErrorCode;
|
|
1082
|
+
class BetaRequestWebSearchToolResultErrorType extends /*#__PURE__*/S.Literal("web_search_tool_result_error") {}
|
|
1083
|
+
exports.BetaRequestWebSearchToolResultErrorType = BetaRequestWebSearchToolResultErrorType;
|
|
1084
|
+
class BetaRequestWebSearchToolResultError extends /*#__PURE__*/S.Struct({
|
|
1085
|
+
"error_code": BetaWebSearchToolResultErrorCode,
|
|
1086
|
+
"type": BetaRequestWebSearchToolResultErrorType
|
|
1087
|
+
}) {}
|
|
1088
|
+
exports.BetaRequestWebSearchToolResultError = BetaRequestWebSearchToolResultError;
|
|
1089
|
+
class BetaRequestWebSearchToolResultBlockType extends /*#__PURE__*/S.Literal("web_search_tool_result") {}
|
|
1090
|
+
exports.BetaRequestWebSearchToolResultBlockType = BetaRequestWebSearchToolResultBlockType;
|
|
1091
|
+
class BetaRequestWebSearchToolResultBlock extends /*#__PURE__*/S.Struct({
|
|
1092
|
+
"cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(BetaCacheControlEphemeral, S.Null), {
|
|
1093
|
+
nullable: true
|
|
1094
|
+
}),
|
|
1095
|
+
"content": /*#__PURE__*/S.Union(/*#__PURE__*/S.Array(BetaRequestWebSearchResultBlock), BetaRequestWebSearchToolResultError),
|
|
1096
|
+
"tool_use_id": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.pattern(/*#__PURE__*/new RegExp("^srvtoolu_[a-zA-Z0-9_]+$"))),
|
|
1097
|
+
"type": BetaRequestWebSearchToolResultBlockType
|
|
1098
|
+
}) {}
|
|
1099
|
+
exports.BetaRequestWebSearchToolResultBlock = BetaRequestWebSearchToolResultBlock;
|
|
1100
|
+
class BetaCodeExecutionToolResultErrorCode extends /*#__PURE__*/S.Literal("invalid_tool_input", "unavailable", "too_many_requests", "execution_time_exceeded") {}
|
|
1101
|
+
exports.BetaCodeExecutionToolResultErrorCode = BetaCodeExecutionToolResultErrorCode;
|
|
1102
|
+
class BetaRequestCodeExecutionToolResultErrorType extends /*#__PURE__*/S.Literal("code_execution_tool_result_error") {}
|
|
1103
|
+
exports.BetaRequestCodeExecutionToolResultErrorType = BetaRequestCodeExecutionToolResultErrorType;
|
|
1104
|
+
class BetaRequestCodeExecutionToolResultError extends /*#__PURE__*/S.Struct({
|
|
1105
|
+
"error_code": BetaCodeExecutionToolResultErrorCode,
|
|
1106
|
+
"type": BetaRequestCodeExecutionToolResultErrorType
|
|
1107
|
+
}) {}
|
|
1108
|
+
exports.BetaRequestCodeExecutionToolResultError = BetaRequestCodeExecutionToolResultError;
|
|
1109
|
+
class BetaRequestCodeExecutionOutputBlockType extends /*#__PURE__*/S.Literal("code_execution_output") {}
|
|
1110
|
+
exports.BetaRequestCodeExecutionOutputBlockType = BetaRequestCodeExecutionOutputBlockType;
|
|
1111
|
+
class BetaRequestCodeExecutionOutputBlock extends /*#__PURE__*/S.Struct({
|
|
1112
|
+
"file_id": S.String,
|
|
1113
|
+
"type": BetaRequestCodeExecutionOutputBlockType
|
|
1114
|
+
}) {}
|
|
1115
|
+
exports.BetaRequestCodeExecutionOutputBlock = BetaRequestCodeExecutionOutputBlock;
|
|
1116
|
+
class BetaRequestCodeExecutionResultBlockType extends /*#__PURE__*/S.Literal("code_execution_result") {}
|
|
1117
|
+
exports.BetaRequestCodeExecutionResultBlockType = BetaRequestCodeExecutionResultBlockType;
|
|
1118
|
+
class BetaRequestCodeExecutionResultBlock extends /*#__PURE__*/S.Struct({
|
|
1119
|
+
"content": /*#__PURE__*/S.Array(BetaRequestCodeExecutionOutputBlock),
|
|
1120
|
+
"return_code": S.Int,
|
|
1121
|
+
"stderr": S.String,
|
|
1122
|
+
"stdout": S.String,
|
|
1123
|
+
"type": BetaRequestCodeExecutionResultBlockType
|
|
1124
|
+
}) {}
|
|
1125
|
+
exports.BetaRequestCodeExecutionResultBlock = BetaRequestCodeExecutionResultBlock;
|
|
1126
|
+
class BetaRequestCodeExecutionToolResultBlockType extends /*#__PURE__*/S.Literal("code_execution_tool_result") {}
|
|
1127
|
+
exports.BetaRequestCodeExecutionToolResultBlockType = BetaRequestCodeExecutionToolResultBlockType;
|
|
1128
|
+
class BetaRequestCodeExecutionToolResultBlock extends /*#__PURE__*/S.Struct({
|
|
1129
|
+
"cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(BetaCacheControlEphemeral, S.Null), {
|
|
1130
|
+
nullable: true
|
|
1131
|
+
}),
|
|
1132
|
+
"content": /*#__PURE__*/S.Union(BetaRequestCodeExecutionToolResultError, BetaRequestCodeExecutionResultBlock),
|
|
1133
|
+
"tool_use_id": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.pattern(/*#__PURE__*/new RegExp("^srvtoolu_[a-zA-Z0-9_]+$"))),
|
|
1134
|
+
"type": BetaRequestCodeExecutionToolResultBlockType
|
|
1135
|
+
}) {}
|
|
1136
|
+
exports.BetaRequestCodeExecutionToolResultBlock = BetaRequestCodeExecutionToolResultBlock;
|
|
1137
|
+
class BetaRequestMCPToolUseBlockType extends /*#__PURE__*/S.Literal("mcp_tool_use") {}
|
|
1138
|
+
exports.BetaRequestMCPToolUseBlockType = BetaRequestMCPToolUseBlockType;
|
|
1139
|
+
class BetaRequestMCPToolUseBlock extends /*#__PURE__*/S.Struct({
|
|
1140
|
+
"cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(BetaCacheControlEphemeral, S.Null), {
|
|
1141
|
+
nullable: true
|
|
1142
|
+
}),
|
|
1143
|
+
"id": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.pattern(/*#__PURE__*/new RegExp("^[a-zA-Z0-9_-]+$"))),
|
|
1144
|
+
"input": /*#__PURE__*/S.Record({
|
|
1145
|
+
key: S.String,
|
|
1146
|
+
value: S.Unknown
|
|
1147
|
+
}),
|
|
1148
|
+
"name": S.String,
|
|
1149
|
+
"server_name": S.String,
|
|
1150
|
+
"type": BetaRequestMCPToolUseBlockType
|
|
1151
|
+
}) {}
|
|
1152
|
+
exports.BetaRequestMCPToolUseBlock = BetaRequestMCPToolUseBlock;
|
|
1153
|
+
class BetaRequestCharLocationCitationType extends /*#__PURE__*/S.Literal("char_location") {}
|
|
1154
|
+
exports.BetaRequestCharLocationCitationType = BetaRequestCharLocationCitationType;
|
|
1155
|
+
class BetaRequestCharLocationCitation extends /*#__PURE__*/S.Struct({
|
|
1156
|
+
"cited_text": S.String,
|
|
1157
|
+
"document_index": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
1158
|
+
"document_title": /*#__PURE__*/S.Union(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1), /*#__PURE__*/S.maxLength(255)), S.Null),
|
|
1159
|
+
"end_char_index": S.Int,
|
|
1160
|
+
"start_char_index": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
1161
|
+
"type": BetaRequestCharLocationCitationType
|
|
1162
|
+
}) {}
|
|
1163
|
+
exports.BetaRequestCharLocationCitation = BetaRequestCharLocationCitation;
|
|
1164
|
+
class BetaRequestPageLocationCitationType extends /*#__PURE__*/S.Literal("page_location") {}
|
|
1165
|
+
exports.BetaRequestPageLocationCitationType = BetaRequestPageLocationCitationType;
|
|
1166
|
+
class BetaRequestPageLocationCitation extends /*#__PURE__*/S.Struct({
|
|
1167
|
+
"cited_text": S.String,
|
|
1168
|
+
"document_index": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
1169
|
+
"document_title": /*#__PURE__*/S.Union(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1), /*#__PURE__*/S.maxLength(255)), S.Null),
|
|
1170
|
+
"end_page_number": S.Int,
|
|
1171
|
+
"start_page_number": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(1)),
|
|
1172
|
+
"type": BetaRequestPageLocationCitationType
|
|
1173
|
+
}) {}
|
|
1174
|
+
exports.BetaRequestPageLocationCitation = BetaRequestPageLocationCitation;
|
|
1175
|
+
class BetaRequestContentBlockLocationCitationType extends /*#__PURE__*/S.Literal("content_block_location") {}
|
|
1176
|
+
exports.BetaRequestContentBlockLocationCitationType = BetaRequestContentBlockLocationCitationType;
|
|
1177
|
+
class BetaRequestContentBlockLocationCitation extends /*#__PURE__*/S.Struct({
|
|
1178
|
+
"cited_text": S.String,
|
|
1179
|
+
"document_index": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
1180
|
+
"document_title": /*#__PURE__*/S.Union(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1), /*#__PURE__*/S.maxLength(255)), S.Null),
|
|
1181
|
+
"end_block_index": S.Int,
|
|
1182
|
+
"start_block_index": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
1183
|
+
"type": BetaRequestContentBlockLocationCitationType
|
|
1184
|
+
}) {}
|
|
1185
|
+
exports.BetaRequestContentBlockLocationCitation = BetaRequestContentBlockLocationCitation;
|
|
1186
|
+
class BetaRequestWebSearchResultLocationCitationType extends /*#__PURE__*/S.Literal("web_search_result_location") {}
|
|
1187
|
+
exports.BetaRequestWebSearchResultLocationCitationType = BetaRequestWebSearchResultLocationCitationType;
|
|
1188
|
+
class BetaRequestWebSearchResultLocationCitation extends /*#__PURE__*/S.Struct({
|
|
1189
|
+
"cited_text": S.String,
|
|
1190
|
+
"encrypted_index": S.String,
|
|
1191
|
+
"title": /*#__PURE__*/S.Union(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1), /*#__PURE__*/S.maxLength(255)), S.Null),
|
|
1192
|
+
"type": BetaRequestWebSearchResultLocationCitationType,
|
|
1193
|
+
"url": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1), /*#__PURE__*/S.maxLength(2048))
|
|
1194
|
+
}) {}
|
|
1195
|
+
exports.BetaRequestWebSearchResultLocationCitation = BetaRequestWebSearchResultLocationCitation;
|
|
1196
|
+
class BetaRequestTextBlockType extends /*#__PURE__*/S.Literal("text") {}
|
|
1197
|
+
exports.BetaRequestTextBlockType = BetaRequestTextBlockType;
|
|
1198
|
+
class BetaRequestTextBlock extends /*#__PURE__*/S.Struct({
|
|
1199
|
+
"cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(BetaCacheControlEphemeral, S.Null), {
|
|
1200
|
+
nullable: true
|
|
1201
|
+
}),
|
|
1202
|
+
"citations": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(BetaRequestCharLocationCitation, BetaRequestPageLocationCitation, BetaRequestContentBlockLocationCitation, BetaRequestWebSearchResultLocationCitation)), S.Null), {
|
|
1203
|
+
nullable: true
|
|
1204
|
+
}),
|
|
1205
|
+
"text": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1)),
|
|
1206
|
+
"type": BetaRequestTextBlockType
|
|
1207
|
+
}) {}
|
|
1208
|
+
exports.BetaRequestTextBlock = BetaRequestTextBlock;
|
|
1209
|
+
class BetaRequestMCPToolResultBlockType extends /*#__PURE__*/S.Literal("mcp_tool_result") {}
|
|
1210
|
+
exports.BetaRequestMCPToolResultBlockType = BetaRequestMCPToolResultBlockType;
|
|
1211
|
+
class BetaRequestMCPToolResultBlock extends /*#__PURE__*/S.Struct({
|
|
1212
|
+
"cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(BetaCacheControlEphemeral, S.Null), {
|
|
1213
|
+
nullable: true
|
|
1214
|
+
}),
|
|
1215
|
+
"content": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.Array(BetaRequestTextBlock)), {
|
|
1216
|
+
nullable: true
|
|
1217
|
+
}),
|
|
1218
|
+
"is_error": /*#__PURE__*/S.optionalWith(S.Boolean, {
|
|
1219
|
+
nullable: true
|
|
1220
|
+
}),
|
|
1221
|
+
"tool_use_id": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.pattern(/*#__PURE__*/new RegExp("^[a-zA-Z0-9_-]+$"))),
|
|
1222
|
+
"type": BetaRequestMCPToolResultBlockType
|
|
1223
|
+
}) {}
|
|
1224
|
+
exports.BetaRequestMCPToolResultBlock = BetaRequestMCPToolResultBlock;
|
|
1225
|
+
class BetaBase64ImageSourceMediaType extends /*#__PURE__*/S.Literal("image/jpeg", "image/png", "image/gif", "image/webp") {}
|
|
813
1226
|
exports.BetaBase64ImageSourceMediaType = BetaBase64ImageSourceMediaType;
|
|
1227
|
+
class BetaBase64ImageSourceType extends /*#__PURE__*/S.Literal("base64") {}
|
|
1228
|
+
exports.BetaBase64ImageSourceType = BetaBase64ImageSourceType;
|
|
814
1229
|
class BetaBase64ImageSource extends /*#__PURE__*/S.Struct({
|
|
815
|
-
"
|
|
1230
|
+
"data": S.String,
|
|
816
1231
|
"media_type": BetaBase64ImageSourceMediaType,
|
|
817
|
-
"
|
|
1232
|
+
"type": BetaBase64ImageSourceType
|
|
818
1233
|
}) {}
|
|
819
1234
|
exports.BetaBase64ImageSource = BetaBase64ImageSource;
|
|
820
1235
|
class BetaURLImageSourceType extends /*#__PURE__*/S.Literal("url") {}
|
|
@@ -824,12 +1239,21 @@ class BetaURLImageSource extends /*#__PURE__*/S.Struct({
|
|
|
824
1239
|
"url": S.String
|
|
825
1240
|
}) {}
|
|
826
1241
|
exports.BetaURLImageSource = BetaURLImageSource;
|
|
1242
|
+
class BetaFileImageSourceType extends /*#__PURE__*/S.Literal("file") {}
|
|
1243
|
+
exports.BetaFileImageSourceType = BetaFileImageSourceType;
|
|
1244
|
+
class BetaFileImageSource extends /*#__PURE__*/S.Struct({
|
|
1245
|
+
"file_id": S.String,
|
|
1246
|
+
"type": BetaFileImageSourceType
|
|
1247
|
+
}) {}
|
|
1248
|
+
exports.BetaFileImageSource = BetaFileImageSource;
|
|
1249
|
+
class BetaRequestImageBlockType extends /*#__PURE__*/S.Literal("image") {}
|
|
1250
|
+
exports.BetaRequestImageBlockType = BetaRequestImageBlockType;
|
|
827
1251
|
class BetaRequestImageBlock extends /*#__PURE__*/S.Struct({
|
|
828
1252
|
"cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(BetaCacheControlEphemeral, S.Null), {
|
|
829
1253
|
nullable: true
|
|
830
1254
|
}),
|
|
831
|
-
"
|
|
832
|
-
"
|
|
1255
|
+
"source": /*#__PURE__*/S.Union(BetaBase64ImageSource, BetaURLImageSource, BetaFileImageSource),
|
|
1256
|
+
"type": BetaRequestImageBlockType
|
|
833
1257
|
}) {}
|
|
834
1258
|
exports.BetaRequestImageBlock = BetaRequestImageBlock;
|
|
835
1259
|
class BetaRequestToolUseBlockType extends /*#__PURE__*/S.Literal("tool_use") {}
|
|
@@ -838,13 +1262,13 @@ class BetaRequestToolUseBlock extends /*#__PURE__*/S.Struct({
|
|
|
838
1262
|
"cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(BetaCacheControlEphemeral, S.Null), {
|
|
839
1263
|
nullable: true
|
|
840
1264
|
}),
|
|
841
|
-
"type": BetaRequestToolUseBlockType,
|
|
842
1265
|
"id": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.pattern(/*#__PURE__*/new RegExp("^[a-zA-Z0-9_-]+$"))),
|
|
843
|
-
"name": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1), /*#__PURE__*/S.maxLength(64), /*#__PURE__*/S.pattern(/*#__PURE__*/new RegExp("^[a-zA-Z0-9_-]{1,64}$"))),
|
|
844
1266
|
"input": /*#__PURE__*/S.Record({
|
|
845
1267
|
key: S.String,
|
|
846
1268
|
value: S.Unknown
|
|
847
|
-
})
|
|
1269
|
+
}),
|
|
1270
|
+
"name": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1), /*#__PURE__*/S.maxLength(200)),
|
|
1271
|
+
"type": BetaRequestToolUseBlockType
|
|
848
1272
|
}) {}
|
|
849
1273
|
exports.BetaRequestToolUseBlock = BetaRequestToolUseBlock;
|
|
850
1274
|
class BetaRequestToolResultBlockType extends /*#__PURE__*/S.Literal("tool_result") {}
|
|
@@ -853,43 +1277,47 @@ class BetaRequestToolResultBlock extends /*#__PURE__*/S.Struct({
|
|
|
853
1277
|
"cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(BetaCacheControlEphemeral, S.Null), {
|
|
854
1278
|
nullable: true
|
|
855
1279
|
}),
|
|
856
|
-
"
|
|
857
|
-
|
|
1280
|
+
"content": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.Array(/*#__PURE__*/S.Union(BetaRequestTextBlock, BetaRequestImageBlock))), {
|
|
1281
|
+
nullable: true
|
|
1282
|
+
}),
|
|
858
1283
|
"is_error": /*#__PURE__*/S.optionalWith(S.Boolean, {
|
|
859
1284
|
nullable: true
|
|
860
1285
|
}),
|
|
861
|
-
"
|
|
1286
|
+
"tool_use_id": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.pattern(/*#__PURE__*/new RegExp("^[a-zA-Z0-9_-]+$"))),
|
|
1287
|
+
"type": BetaRequestToolResultBlockType
|
|
1288
|
+
}) {}
|
|
1289
|
+
exports.BetaRequestToolResultBlock = BetaRequestToolResultBlock;
|
|
1290
|
+
class BetaRequestCitationsConfig extends /*#__PURE__*/S.Struct({
|
|
1291
|
+
"enabled": /*#__PURE__*/S.optionalWith(S.Boolean, {
|
|
862
1292
|
nullable: true
|
|
863
1293
|
})
|
|
864
1294
|
}) {}
|
|
865
|
-
exports.
|
|
866
|
-
class BetaRequestDocumentBlockType extends /*#__PURE__*/S.Literal("document") {}
|
|
867
|
-
exports.BetaRequestDocumentBlockType = BetaRequestDocumentBlockType;
|
|
868
|
-
class BetaBase64PDFSourceType extends /*#__PURE__*/S.Literal("base64") {}
|
|
869
|
-
exports.BetaBase64PDFSourceType = BetaBase64PDFSourceType;
|
|
1295
|
+
exports.BetaRequestCitationsConfig = BetaRequestCitationsConfig;
|
|
870
1296
|
class BetaBase64PDFSourceMediaType extends /*#__PURE__*/S.Literal("application/pdf") {}
|
|
871
1297
|
exports.BetaBase64PDFSourceMediaType = BetaBase64PDFSourceMediaType;
|
|
1298
|
+
class BetaBase64PDFSourceType extends /*#__PURE__*/S.Literal("base64") {}
|
|
1299
|
+
exports.BetaBase64PDFSourceType = BetaBase64PDFSourceType;
|
|
872
1300
|
class BetaBase64PDFSource extends /*#__PURE__*/S.Struct({
|
|
873
|
-
"
|
|
1301
|
+
"data": S.String,
|
|
874
1302
|
"media_type": BetaBase64PDFSourceMediaType,
|
|
875
|
-
"
|
|
1303
|
+
"type": BetaBase64PDFSourceType
|
|
876
1304
|
}) {}
|
|
877
1305
|
exports.BetaBase64PDFSource = BetaBase64PDFSource;
|
|
878
|
-
class BetaPlainTextSourceType extends /*#__PURE__*/S.Literal("text") {}
|
|
879
|
-
exports.BetaPlainTextSourceType = BetaPlainTextSourceType;
|
|
880
1306
|
class BetaPlainTextSourceMediaType extends /*#__PURE__*/S.Literal("text/plain") {}
|
|
881
1307
|
exports.BetaPlainTextSourceMediaType = BetaPlainTextSourceMediaType;
|
|
1308
|
+
class BetaPlainTextSourceType extends /*#__PURE__*/S.Literal("text") {}
|
|
1309
|
+
exports.BetaPlainTextSourceType = BetaPlainTextSourceType;
|
|
882
1310
|
class BetaPlainTextSource extends /*#__PURE__*/S.Struct({
|
|
883
|
-
"
|
|
1311
|
+
"data": S.String,
|
|
884
1312
|
"media_type": BetaPlainTextSourceMediaType,
|
|
885
|
-
"
|
|
1313
|
+
"type": BetaPlainTextSourceType
|
|
886
1314
|
}) {}
|
|
887
1315
|
exports.BetaPlainTextSource = BetaPlainTextSource;
|
|
888
1316
|
class BetaContentBlockSourceType extends /*#__PURE__*/S.Literal("content") {}
|
|
889
1317
|
exports.BetaContentBlockSourceType = BetaContentBlockSourceType;
|
|
890
1318
|
class BetaContentBlockSource extends /*#__PURE__*/S.Struct({
|
|
891
|
-
"
|
|
892
|
-
"
|
|
1319
|
+
"content": /*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.Array(/*#__PURE__*/S.Union(BetaRequestTextBlock, BetaRequestImageBlock))),
|
|
1320
|
+
"type": BetaContentBlockSourceType
|
|
893
1321
|
}) {}
|
|
894
1322
|
exports.BetaContentBlockSource = BetaContentBlockSource;
|
|
895
1323
|
class BetaURLPDFSourceType extends /*#__PURE__*/S.Literal("url") {}
|
|
@@ -899,62 +1327,102 @@ class BetaURLPDFSource extends /*#__PURE__*/S.Struct({
|
|
|
899
1327
|
"url": S.String
|
|
900
1328
|
}) {}
|
|
901
1329
|
exports.BetaURLPDFSource = BetaURLPDFSource;
|
|
902
|
-
class
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
1330
|
+
class BetaFileDocumentSourceType extends /*#__PURE__*/S.Literal("file") {}
|
|
1331
|
+
exports.BetaFileDocumentSourceType = BetaFileDocumentSourceType;
|
|
1332
|
+
class BetaFileDocumentSource extends /*#__PURE__*/S.Struct({
|
|
1333
|
+
"file_id": S.String,
|
|
1334
|
+
"type": BetaFileDocumentSourceType
|
|
906
1335
|
}) {}
|
|
907
|
-
exports.
|
|
1336
|
+
exports.BetaFileDocumentSource = BetaFileDocumentSource;
|
|
1337
|
+
class BetaRequestDocumentBlockType extends /*#__PURE__*/S.Literal("document") {}
|
|
1338
|
+
exports.BetaRequestDocumentBlockType = BetaRequestDocumentBlockType;
|
|
908
1339
|
class BetaRequestDocumentBlock extends /*#__PURE__*/S.Struct({
|
|
909
1340
|
"cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(BetaCacheControlEphemeral, S.Null), {
|
|
910
1341
|
nullable: true
|
|
911
1342
|
}),
|
|
912
|
-
"
|
|
913
|
-
"source": /*#__PURE__*/S.Union(BetaBase64PDFSource, BetaPlainTextSource, BetaContentBlockSource, BetaURLPDFSource),
|
|
914
|
-
"title": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1), /*#__PURE__*/S.maxLength(500)), S.Null), {
|
|
1343
|
+
"citations": /*#__PURE__*/S.optionalWith(BetaRequestCitationsConfig, {
|
|
915
1344
|
nullable: true
|
|
916
1345
|
}),
|
|
917
1346
|
"context": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1)), S.Null), {
|
|
918
1347
|
nullable: true
|
|
919
1348
|
}),
|
|
920
|
-
"
|
|
1349
|
+
"source": /*#__PURE__*/S.Union(BetaBase64PDFSource, BetaPlainTextSource, BetaContentBlockSource, BetaURLPDFSource, BetaFileDocumentSource),
|
|
1350
|
+
"title": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1), /*#__PURE__*/S.maxLength(500)), S.Null), {
|
|
921
1351
|
nullable: true
|
|
922
|
-
})
|
|
1352
|
+
}),
|
|
1353
|
+
"type": BetaRequestDocumentBlockType
|
|
923
1354
|
}) {}
|
|
924
1355
|
exports.BetaRequestDocumentBlock = BetaRequestDocumentBlock;
|
|
925
1356
|
class BetaRequestThinkingBlockType extends /*#__PURE__*/S.Literal("thinking") {}
|
|
926
1357
|
exports.BetaRequestThinkingBlockType = BetaRequestThinkingBlockType;
|
|
927
1358
|
class BetaRequestThinkingBlock extends /*#__PURE__*/S.Struct({
|
|
928
|
-
"
|
|
1359
|
+
"signature": S.String,
|
|
929
1360
|
"thinking": S.String,
|
|
930
|
-
"
|
|
1361
|
+
"type": BetaRequestThinkingBlockType
|
|
931
1362
|
}) {}
|
|
932
1363
|
exports.BetaRequestThinkingBlock = BetaRequestThinkingBlock;
|
|
933
1364
|
class BetaRequestRedactedThinkingBlockType extends /*#__PURE__*/S.Literal("redacted_thinking") {}
|
|
934
1365
|
exports.BetaRequestRedactedThinkingBlockType = BetaRequestRedactedThinkingBlockType;
|
|
935
1366
|
class BetaRequestRedactedThinkingBlock extends /*#__PURE__*/S.Struct({
|
|
936
|
-
"
|
|
937
|
-
"
|
|
1367
|
+
"data": S.String,
|
|
1368
|
+
"type": BetaRequestRedactedThinkingBlockType
|
|
938
1369
|
}) {}
|
|
939
1370
|
exports.BetaRequestRedactedThinkingBlock = BetaRequestRedactedThinkingBlock;
|
|
940
|
-
class
|
|
1371
|
+
class BetaRequestContainerUploadBlockType extends /*#__PURE__*/S.Literal("container_upload") {}
|
|
1372
|
+
exports.BetaRequestContainerUploadBlockType = BetaRequestContainerUploadBlockType;
|
|
1373
|
+
class BetaRequestContainerUploadBlock extends /*#__PURE__*/S.Struct({
|
|
1374
|
+
"cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(BetaCacheControlEphemeral, S.Null), {
|
|
1375
|
+
nullable: true
|
|
1376
|
+
}),
|
|
1377
|
+
"file_id": S.String,
|
|
1378
|
+
"type": BetaRequestContainerUploadBlockType
|
|
1379
|
+
}) {}
|
|
1380
|
+
exports.BetaRequestContainerUploadBlock = BetaRequestContainerUploadBlock;
|
|
1381
|
+
class BetaInputContentBlock extends /*#__PURE__*/S.Union(BetaRequestServerToolUseBlock, BetaRequestWebSearchToolResultBlock, BetaRequestCodeExecutionToolResultBlock, BetaRequestMCPToolUseBlock, BetaRequestMCPToolResultBlock, BetaRequestTextBlock, BetaRequestImageBlock, BetaRequestToolUseBlock, BetaRequestToolResultBlock, BetaRequestDocumentBlock, BetaRequestThinkingBlock, BetaRequestRedactedThinkingBlock, BetaRequestContainerUploadBlock) {}
|
|
941
1382
|
exports.BetaInputContentBlock = BetaInputContentBlock;
|
|
1383
|
+
class BetaInputMessageRole extends /*#__PURE__*/S.Literal("user", "assistant") {}
|
|
1384
|
+
exports.BetaInputMessageRole = BetaInputMessageRole;
|
|
942
1385
|
class BetaInputMessage extends /*#__PURE__*/S.Struct({
|
|
943
|
-
"
|
|
944
|
-
"
|
|
1386
|
+
"content": /*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.Array(BetaInputContentBlock)),
|
|
1387
|
+
"role": BetaInputMessageRole
|
|
945
1388
|
}) {}
|
|
946
1389
|
exports.BetaInputMessage = BetaInputMessage;
|
|
1390
|
+
class BetaRequestMCPServerToolConfiguration extends /*#__PURE__*/S.Struct({
|
|
1391
|
+
"allowed_tools": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(/*#__PURE__*/S.Array(S.String), S.Null), {
|
|
1392
|
+
nullable: true
|
|
1393
|
+
}),
|
|
1394
|
+
"enabled": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(S.Boolean, S.Null), {
|
|
1395
|
+
nullable: true
|
|
1396
|
+
})
|
|
1397
|
+
}) {}
|
|
1398
|
+
exports.BetaRequestMCPServerToolConfiguration = BetaRequestMCPServerToolConfiguration;
|
|
1399
|
+
class BetaRequestMCPServerURLDefinitionType extends /*#__PURE__*/S.Literal("url") {}
|
|
1400
|
+
exports.BetaRequestMCPServerURLDefinitionType = BetaRequestMCPServerURLDefinitionType;
|
|
1401
|
+
class BetaRequestMCPServerURLDefinition extends /*#__PURE__*/S.Struct({
|
|
1402
|
+
"authorization_token": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(S.String, S.Null), {
|
|
1403
|
+
nullable: true
|
|
1404
|
+
}),
|
|
1405
|
+
"name": S.String,
|
|
1406
|
+
"tool_configuration": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(BetaRequestMCPServerToolConfiguration, S.Null), {
|
|
1407
|
+
nullable: true
|
|
1408
|
+
}),
|
|
1409
|
+
"type": BetaRequestMCPServerURLDefinitionType,
|
|
1410
|
+
"url": S.String
|
|
1411
|
+
}) {}
|
|
1412
|
+
exports.BetaRequestMCPServerURLDefinition = BetaRequestMCPServerURLDefinition;
|
|
947
1413
|
class BetaMetadata extends /*#__PURE__*/S.Struct({
|
|
948
1414
|
"user_id": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.maxLength(256)), S.Null), {
|
|
949
1415
|
nullable: true
|
|
950
1416
|
})
|
|
951
1417
|
}) {}
|
|
952
1418
|
exports.BetaMetadata = BetaMetadata;
|
|
1419
|
+
class BetaCreateMessageParamsServiceTier extends /*#__PURE__*/S.Literal("auto", "standard_only") {}
|
|
1420
|
+
exports.BetaCreateMessageParamsServiceTier = BetaCreateMessageParamsServiceTier;
|
|
953
1421
|
class BetaThinkingConfigEnabledType extends /*#__PURE__*/S.Literal("enabled") {}
|
|
954
1422
|
exports.BetaThinkingConfigEnabledType = BetaThinkingConfigEnabledType;
|
|
955
1423
|
class BetaThinkingConfigEnabled extends /*#__PURE__*/S.Struct({
|
|
956
|
-
"
|
|
957
|
-
"
|
|
1424
|
+
"budget_tokens": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(1024)),
|
|
1425
|
+
"type": BetaThinkingConfigEnabledType
|
|
958
1426
|
}) {}
|
|
959
1427
|
exports.BetaThinkingConfigEnabled = BetaThinkingConfigEnabled;
|
|
960
1428
|
class BetaThinkingConfigDisabledType extends /*#__PURE__*/S.Literal("disabled") {}
|
|
@@ -968,29 +1436,29 @@ exports.BetaThinkingConfigParam = BetaThinkingConfigParam;
|
|
|
968
1436
|
class BetaToolChoiceAutoType extends /*#__PURE__*/S.Literal("auto") {}
|
|
969
1437
|
exports.BetaToolChoiceAutoType = BetaToolChoiceAutoType;
|
|
970
1438
|
class BetaToolChoiceAuto extends /*#__PURE__*/S.Struct({
|
|
971
|
-
"type": BetaToolChoiceAutoType,
|
|
972
1439
|
"disable_parallel_tool_use": /*#__PURE__*/S.optionalWith(S.Boolean, {
|
|
973
1440
|
nullable: true
|
|
974
|
-
})
|
|
1441
|
+
}),
|
|
1442
|
+
"type": BetaToolChoiceAutoType
|
|
975
1443
|
}) {}
|
|
976
1444
|
exports.BetaToolChoiceAuto = BetaToolChoiceAuto;
|
|
977
1445
|
class BetaToolChoiceAnyType extends /*#__PURE__*/S.Literal("any") {}
|
|
978
1446
|
exports.BetaToolChoiceAnyType = BetaToolChoiceAnyType;
|
|
979
1447
|
class BetaToolChoiceAny extends /*#__PURE__*/S.Struct({
|
|
980
|
-
"type": BetaToolChoiceAnyType,
|
|
981
1448
|
"disable_parallel_tool_use": /*#__PURE__*/S.optionalWith(S.Boolean, {
|
|
982
1449
|
nullable: true
|
|
983
|
-
})
|
|
1450
|
+
}),
|
|
1451
|
+
"type": BetaToolChoiceAnyType
|
|
984
1452
|
}) {}
|
|
985
1453
|
exports.BetaToolChoiceAny = BetaToolChoiceAny;
|
|
986
1454
|
class BetaToolChoiceToolType extends /*#__PURE__*/S.Literal("tool") {}
|
|
987
1455
|
exports.BetaToolChoiceToolType = BetaToolChoiceToolType;
|
|
988
1456
|
class BetaToolChoiceTool extends /*#__PURE__*/S.Struct({
|
|
989
|
-
"type": BetaToolChoiceToolType,
|
|
990
|
-
"name": S.String,
|
|
991
1457
|
"disable_parallel_tool_use": /*#__PURE__*/S.optionalWith(S.Boolean, {
|
|
992
1458
|
nullable: true
|
|
993
|
-
})
|
|
1459
|
+
}),
|
|
1460
|
+
"name": S.String,
|
|
1461
|
+
"type": BetaToolChoiceToolType
|
|
994
1462
|
}) {}
|
|
995
1463
|
exports.BetaToolChoiceTool = BetaToolChoiceTool;
|
|
996
1464
|
class BetaToolChoiceNoneType extends /*#__PURE__*/S.Literal("none") {}
|
|
@@ -1006,13 +1474,16 @@ exports.BetaToolTypeEnum = BetaToolTypeEnum;
|
|
|
1006
1474
|
class BetaInputSchemaType extends /*#__PURE__*/S.Literal("object") {}
|
|
1007
1475
|
exports.BetaInputSchemaType = BetaInputSchemaType;
|
|
1008
1476
|
class BetaInputSchema extends /*#__PURE__*/S.Struct({
|
|
1009
|
-
"type": BetaInputSchemaType,
|
|
1010
1477
|
"properties": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(/*#__PURE__*/S.Record({
|
|
1011
1478
|
key: S.String,
|
|
1012
1479
|
value: S.Unknown
|
|
1013
1480
|
}), S.Null), {
|
|
1014
1481
|
nullable: true
|
|
1015
|
-
})
|
|
1482
|
+
}),
|
|
1483
|
+
"required": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(/*#__PURE__*/S.Array(S.String), S.Null), {
|
|
1484
|
+
nullable: true
|
|
1485
|
+
}),
|
|
1486
|
+
"type": BetaInputSchemaType
|
|
1016
1487
|
}) {}
|
|
1017
1488
|
exports.BetaInputSchema = BetaInputSchema;
|
|
1018
1489
|
class BetaTool extends /*#__PURE__*/S.Struct({
|
|
@@ -1029,95 +1500,170 @@ class BetaTool extends /*#__PURE__*/S.Struct({
|
|
|
1029
1500
|
})
|
|
1030
1501
|
}) {}
|
|
1031
1502
|
exports.BetaTool = BetaTool;
|
|
1032
|
-
class BetaComputerUseTool20241022Type extends /*#__PURE__*/S.Literal("computer_20241022") {}
|
|
1033
|
-
exports.BetaComputerUseTool20241022Type = BetaComputerUseTool20241022Type;
|
|
1034
1503
|
class BetaComputerUseTool20241022Name extends /*#__PURE__*/S.Literal("computer") {}
|
|
1035
1504
|
exports.BetaComputerUseTool20241022Name = BetaComputerUseTool20241022Name;
|
|
1505
|
+
class BetaComputerUseTool20241022Type extends /*#__PURE__*/S.Literal("computer_20241022") {}
|
|
1506
|
+
exports.BetaComputerUseTool20241022Type = BetaComputerUseTool20241022Type;
|
|
1036
1507
|
class BetaComputerUseTool20241022 extends /*#__PURE__*/S.Struct({
|
|
1037
1508
|
"cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(BetaCacheControlEphemeral, S.Null), {
|
|
1038
1509
|
nullable: true
|
|
1039
1510
|
}),
|
|
1040
|
-
"type": BetaComputerUseTool20241022Type,
|
|
1041
|
-
"name": BetaComputerUseTool20241022Name,
|
|
1042
1511
|
"display_height_px": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(1)),
|
|
1043
|
-
"display_width_px": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(1)),
|
|
1044
1512
|
"display_number": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(/*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)), S.Null), {
|
|
1045
1513
|
nullable: true
|
|
1046
|
-
})
|
|
1514
|
+
}),
|
|
1515
|
+
"display_width_px": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(1)),
|
|
1516
|
+
"name": BetaComputerUseTool20241022Name,
|
|
1517
|
+
"type": BetaComputerUseTool20241022Type
|
|
1047
1518
|
}) {}
|
|
1048
1519
|
exports.BetaComputerUseTool20241022 = BetaComputerUseTool20241022;
|
|
1049
|
-
class BetaBashTool20241022Type extends /*#__PURE__*/S.Literal("bash_20241022") {}
|
|
1050
|
-
exports.BetaBashTool20241022Type = BetaBashTool20241022Type;
|
|
1051
1520
|
class BetaBashTool20241022Name extends /*#__PURE__*/S.Literal("bash") {}
|
|
1052
1521
|
exports.BetaBashTool20241022Name = BetaBashTool20241022Name;
|
|
1522
|
+
class BetaBashTool20241022Type extends /*#__PURE__*/S.Literal("bash_20241022") {}
|
|
1523
|
+
exports.BetaBashTool20241022Type = BetaBashTool20241022Type;
|
|
1053
1524
|
class BetaBashTool20241022 extends /*#__PURE__*/S.Struct({
|
|
1054
1525
|
"cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(BetaCacheControlEphemeral, S.Null), {
|
|
1055
1526
|
nullable: true
|
|
1056
1527
|
}),
|
|
1057
|
-
"
|
|
1058
|
-
"
|
|
1528
|
+
"name": BetaBashTool20241022Name,
|
|
1529
|
+
"type": BetaBashTool20241022Type
|
|
1059
1530
|
}) {}
|
|
1060
1531
|
exports.BetaBashTool20241022 = BetaBashTool20241022;
|
|
1061
|
-
class BetaTextEditor20241022Type extends /*#__PURE__*/S.Literal("text_editor_20241022") {}
|
|
1062
|
-
exports.BetaTextEditor20241022Type = BetaTextEditor20241022Type;
|
|
1063
1532
|
class BetaTextEditor20241022Name extends /*#__PURE__*/S.Literal("str_replace_editor") {}
|
|
1064
1533
|
exports.BetaTextEditor20241022Name = BetaTextEditor20241022Name;
|
|
1534
|
+
class BetaTextEditor20241022Type extends /*#__PURE__*/S.Literal("text_editor_20241022") {}
|
|
1535
|
+
exports.BetaTextEditor20241022Type = BetaTextEditor20241022Type;
|
|
1065
1536
|
class BetaTextEditor20241022 extends /*#__PURE__*/S.Struct({
|
|
1066
1537
|
"cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(BetaCacheControlEphemeral, S.Null), {
|
|
1067
1538
|
nullable: true
|
|
1068
1539
|
}),
|
|
1069
|
-
"
|
|
1070
|
-
"
|
|
1540
|
+
"name": BetaTextEditor20241022Name,
|
|
1541
|
+
"type": BetaTextEditor20241022Type
|
|
1071
1542
|
}) {}
|
|
1072
1543
|
exports.BetaTextEditor20241022 = BetaTextEditor20241022;
|
|
1073
|
-
class BetaComputerUseTool20250124Type extends /*#__PURE__*/S.Literal("computer_20250124") {}
|
|
1074
|
-
exports.BetaComputerUseTool20250124Type = BetaComputerUseTool20250124Type;
|
|
1075
1544
|
class BetaComputerUseTool20250124Name extends /*#__PURE__*/S.Literal("computer") {}
|
|
1076
1545
|
exports.BetaComputerUseTool20250124Name = BetaComputerUseTool20250124Name;
|
|
1546
|
+
class BetaComputerUseTool20250124Type extends /*#__PURE__*/S.Literal("computer_20250124") {}
|
|
1547
|
+
exports.BetaComputerUseTool20250124Type = BetaComputerUseTool20250124Type;
|
|
1077
1548
|
class BetaComputerUseTool20250124 extends /*#__PURE__*/S.Struct({
|
|
1078
1549
|
"cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(BetaCacheControlEphemeral, S.Null), {
|
|
1079
1550
|
nullable: true
|
|
1080
1551
|
}),
|
|
1081
|
-
"type": BetaComputerUseTool20250124Type,
|
|
1082
|
-
"name": BetaComputerUseTool20250124Name,
|
|
1083
1552
|
"display_height_px": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(1)),
|
|
1084
|
-
"display_width_px": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(1)),
|
|
1085
1553
|
"display_number": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(/*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)), S.Null), {
|
|
1086
1554
|
nullable: true
|
|
1087
|
-
})
|
|
1555
|
+
}),
|
|
1556
|
+
"display_width_px": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(1)),
|
|
1557
|
+
"name": BetaComputerUseTool20250124Name,
|
|
1558
|
+
"type": BetaComputerUseTool20250124Type
|
|
1088
1559
|
}) {}
|
|
1089
1560
|
exports.BetaComputerUseTool20250124 = BetaComputerUseTool20250124;
|
|
1090
|
-
class BetaBashTool20250124Type extends /*#__PURE__*/S.Literal("bash_20250124") {}
|
|
1091
|
-
exports.BetaBashTool20250124Type = BetaBashTool20250124Type;
|
|
1092
1561
|
class BetaBashTool20250124Name extends /*#__PURE__*/S.Literal("bash") {}
|
|
1093
1562
|
exports.BetaBashTool20250124Name = BetaBashTool20250124Name;
|
|
1563
|
+
class BetaBashTool20250124Type extends /*#__PURE__*/S.Literal("bash_20250124") {}
|
|
1564
|
+
exports.BetaBashTool20250124Type = BetaBashTool20250124Type;
|
|
1094
1565
|
class BetaBashTool20250124 extends /*#__PURE__*/S.Struct({
|
|
1095
1566
|
"cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(BetaCacheControlEphemeral, S.Null), {
|
|
1096
1567
|
nullable: true
|
|
1097
1568
|
}),
|
|
1098
|
-
"
|
|
1099
|
-
"
|
|
1569
|
+
"name": BetaBashTool20250124Name,
|
|
1570
|
+
"type": BetaBashTool20250124Type
|
|
1100
1571
|
}) {}
|
|
1101
1572
|
exports.BetaBashTool20250124 = BetaBashTool20250124;
|
|
1102
|
-
class BetaTextEditor20250124Type extends /*#__PURE__*/S.Literal("text_editor_20250124") {}
|
|
1103
|
-
exports.BetaTextEditor20250124Type = BetaTextEditor20250124Type;
|
|
1104
1573
|
class BetaTextEditor20250124Name extends /*#__PURE__*/S.Literal("str_replace_editor") {}
|
|
1105
1574
|
exports.BetaTextEditor20250124Name = BetaTextEditor20250124Name;
|
|
1575
|
+
class BetaTextEditor20250124Type extends /*#__PURE__*/S.Literal("text_editor_20250124") {}
|
|
1576
|
+
exports.BetaTextEditor20250124Type = BetaTextEditor20250124Type;
|
|
1106
1577
|
class BetaTextEditor20250124 extends /*#__PURE__*/S.Struct({
|
|
1107
1578
|
"cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(BetaCacheControlEphemeral, S.Null), {
|
|
1108
1579
|
nullable: true
|
|
1109
1580
|
}),
|
|
1110
|
-
"
|
|
1111
|
-
"
|
|
1581
|
+
"name": BetaTextEditor20250124Name,
|
|
1582
|
+
"type": BetaTextEditor20250124Type
|
|
1112
1583
|
}) {}
|
|
1113
1584
|
exports.BetaTextEditor20250124 = BetaTextEditor20250124;
|
|
1585
|
+
class BetaTextEditor20250429Name extends /*#__PURE__*/S.Literal("str_replace_based_edit_tool") {}
|
|
1586
|
+
exports.BetaTextEditor20250429Name = BetaTextEditor20250429Name;
|
|
1587
|
+
class BetaTextEditor20250429Type extends /*#__PURE__*/S.Literal("text_editor_20250429") {}
|
|
1588
|
+
exports.BetaTextEditor20250429Type = BetaTextEditor20250429Type;
|
|
1589
|
+
class BetaTextEditor20250429 extends /*#__PURE__*/S.Struct({
|
|
1590
|
+
"cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(BetaCacheControlEphemeral, S.Null), {
|
|
1591
|
+
nullable: true
|
|
1592
|
+
}),
|
|
1593
|
+
"name": BetaTextEditor20250429Name,
|
|
1594
|
+
"type": BetaTextEditor20250429Type
|
|
1595
|
+
}) {}
|
|
1596
|
+
exports.BetaTextEditor20250429 = BetaTextEditor20250429;
|
|
1597
|
+
class BetaWebSearchTool20250305Name extends /*#__PURE__*/S.Literal("web_search") {}
|
|
1598
|
+
exports.BetaWebSearchTool20250305Name = BetaWebSearchTool20250305Name;
|
|
1599
|
+
class BetaWebSearchTool20250305Type extends /*#__PURE__*/S.Literal("web_search_20250305") {}
|
|
1600
|
+
exports.BetaWebSearchTool20250305Type = BetaWebSearchTool20250305Type;
|
|
1601
|
+
class BetaUserLocationType extends /*#__PURE__*/S.Literal("approximate") {}
|
|
1602
|
+
exports.BetaUserLocationType = BetaUserLocationType;
|
|
1603
|
+
class BetaUserLocation extends /*#__PURE__*/S.Struct({
|
|
1604
|
+
"city": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1), /*#__PURE__*/S.maxLength(255)), S.Null), {
|
|
1605
|
+
nullable: true
|
|
1606
|
+
}),
|
|
1607
|
+
"country": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(2), /*#__PURE__*/S.maxLength(2)), S.Null), {
|
|
1608
|
+
nullable: true
|
|
1609
|
+
}),
|
|
1610
|
+
"region": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1), /*#__PURE__*/S.maxLength(255)), S.Null), {
|
|
1611
|
+
nullable: true
|
|
1612
|
+
}),
|
|
1613
|
+
"timezone": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1), /*#__PURE__*/S.maxLength(255)), S.Null), {
|
|
1614
|
+
nullable: true
|
|
1615
|
+
}),
|
|
1616
|
+
"type": BetaUserLocationType
|
|
1617
|
+
}) {}
|
|
1618
|
+
exports.BetaUserLocation = BetaUserLocation;
|
|
1619
|
+
class BetaWebSearchTool20250305 extends /*#__PURE__*/S.Struct({
|
|
1620
|
+
"allowed_domains": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(/*#__PURE__*/S.Array(S.String), S.Null), {
|
|
1621
|
+
nullable: true
|
|
1622
|
+
}),
|
|
1623
|
+
"blocked_domains": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(/*#__PURE__*/S.Array(S.String), S.Null), {
|
|
1624
|
+
nullable: true
|
|
1625
|
+
}),
|
|
1626
|
+
"cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(BetaCacheControlEphemeral, S.Null), {
|
|
1627
|
+
nullable: true
|
|
1628
|
+
}),
|
|
1629
|
+
"max_uses": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(/*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThan(0)), S.Null), {
|
|
1630
|
+
nullable: true
|
|
1631
|
+
}),
|
|
1632
|
+
"name": BetaWebSearchTool20250305Name,
|
|
1633
|
+
"type": BetaWebSearchTool20250305Type,
|
|
1634
|
+
"user_location": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(BetaUserLocation, S.Null), {
|
|
1635
|
+
nullable: true
|
|
1636
|
+
})
|
|
1637
|
+
}) {}
|
|
1638
|
+
exports.BetaWebSearchTool20250305 = BetaWebSearchTool20250305;
|
|
1639
|
+
class BetaCodeExecutionTool20250522Name extends /*#__PURE__*/S.Literal("code_execution") {}
|
|
1640
|
+
exports.BetaCodeExecutionTool20250522Name = BetaCodeExecutionTool20250522Name;
|
|
1641
|
+
class BetaCodeExecutionTool20250522Type extends /*#__PURE__*/S.Literal("code_execution_20250522") {}
|
|
1642
|
+
exports.BetaCodeExecutionTool20250522Type = BetaCodeExecutionTool20250522Type;
|
|
1643
|
+
class BetaCodeExecutionTool20250522 extends /*#__PURE__*/S.Struct({
|
|
1644
|
+
"cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(BetaCacheControlEphemeral, S.Null), {
|
|
1645
|
+
nullable: true
|
|
1646
|
+
}),
|
|
1647
|
+
"name": BetaCodeExecutionTool20250522Name,
|
|
1648
|
+
"type": BetaCodeExecutionTool20250522Type
|
|
1649
|
+
}) {}
|
|
1650
|
+
exports.BetaCodeExecutionTool20250522 = BetaCodeExecutionTool20250522;
|
|
1114
1651
|
class BetaCreateMessageParams extends /*#__PURE__*/S.Class("BetaCreateMessageParams")({
|
|
1115
|
-
"model": Model,
|
|
1652
|
+
"model": /*#__PURE__*/S.Union(S.String, Model),
|
|
1116
1653
|
"messages": /*#__PURE__*/S.Array(BetaInputMessage),
|
|
1654
|
+
"container": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(S.String, S.Null), {
|
|
1655
|
+
nullable: true
|
|
1656
|
+
}),
|
|
1117
1657
|
"max_tokens": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(1)),
|
|
1658
|
+
"mcp_servers": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(BetaRequestMCPServerURLDefinition).pipe(/*#__PURE__*/S.maxItems(20)), {
|
|
1659
|
+
nullable: true
|
|
1660
|
+
}),
|
|
1118
1661
|
"metadata": /*#__PURE__*/S.optionalWith(BetaMetadata, {
|
|
1119
1662
|
nullable: true
|
|
1120
1663
|
}),
|
|
1664
|
+
"service_tier": /*#__PURE__*/S.optionalWith(BetaCreateMessageParamsServiceTier, {
|
|
1665
|
+
nullable: true
|
|
1666
|
+
}),
|
|
1121
1667
|
"stop_sequences": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(S.String), {
|
|
1122
1668
|
nullable: true
|
|
1123
1669
|
}),
|
|
@@ -1136,7 +1682,7 @@ class BetaCreateMessageParams extends /*#__PURE__*/S.Class("BetaCreateMessagePar
|
|
|
1136
1682
|
"tool_choice": /*#__PURE__*/S.optionalWith(BetaToolChoice, {
|
|
1137
1683
|
nullable: true
|
|
1138
1684
|
}),
|
|
1139
|
-
"tools": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(BetaTool, BetaComputerUseTool20241022, BetaBashTool20241022, BetaTextEditor20241022, BetaComputerUseTool20250124, BetaBashTool20250124, BetaTextEditor20250124)), {
|
|
1685
|
+
"tools": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(BetaTool, BetaComputerUseTool20241022, BetaBashTool20241022, BetaTextEditor20241022, BetaComputerUseTool20250124, BetaBashTool20250124, BetaTextEditor20250124, BetaTextEditor20250429, BetaWebSearchTool20250305, BetaCodeExecutionTool20250522)), {
|
|
1140
1686
|
nullable: true
|
|
1141
1687
|
}),
|
|
1142
1688
|
"top_k": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)), {
|
|
@@ -1151,172 +1697,294 @@ class BetaMessageType extends /*#__PURE__*/S.Literal("message") {}
|
|
|
1151
1697
|
exports.BetaMessageType = BetaMessageType;
|
|
1152
1698
|
class BetaMessageRole extends /*#__PURE__*/S.Literal("assistant") {}
|
|
1153
1699
|
exports.BetaMessageRole = BetaMessageRole;
|
|
1154
|
-
class BetaResponseTextBlockType extends /*#__PURE__*/S.Literal("text") {}
|
|
1155
|
-
exports.BetaResponseTextBlockType = BetaResponseTextBlockType;
|
|
1156
1700
|
class BetaResponseCharLocationCitationType extends /*#__PURE__*/S.Literal("char_location") {}
|
|
1157
1701
|
exports.BetaResponseCharLocationCitationType = BetaResponseCharLocationCitationType;
|
|
1158
1702
|
class BetaResponseCharLocationCitation extends /*#__PURE__*/S.Struct({
|
|
1159
|
-
"type": /*#__PURE__*/BetaResponseCharLocationCitationType.pipe(S.propertySignature, /*#__PURE__*/S.withConstructorDefault(() => "char_location")),
|
|
1160
1703
|
"cited_text": S.String,
|
|
1161
1704
|
"document_index": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
1162
1705
|
"document_title": /*#__PURE__*/S.Union(S.String, S.Null),
|
|
1706
|
+
"end_char_index": S.Int,
|
|
1163
1707
|
"start_char_index": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
1164
|
-
"
|
|
1708
|
+
"type": BetaResponseCharLocationCitationType
|
|
1165
1709
|
}) {}
|
|
1166
1710
|
exports.BetaResponseCharLocationCitation = BetaResponseCharLocationCitation;
|
|
1167
1711
|
class BetaResponsePageLocationCitationType extends /*#__PURE__*/S.Literal("page_location") {}
|
|
1168
1712
|
exports.BetaResponsePageLocationCitationType = BetaResponsePageLocationCitationType;
|
|
1169
1713
|
class BetaResponsePageLocationCitation extends /*#__PURE__*/S.Struct({
|
|
1170
|
-
"type": /*#__PURE__*/BetaResponsePageLocationCitationType.pipe(S.propertySignature, /*#__PURE__*/S.withConstructorDefault(() => "page_location")),
|
|
1171
1714
|
"cited_text": S.String,
|
|
1172
1715
|
"document_index": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
1173
1716
|
"document_title": /*#__PURE__*/S.Union(S.String, S.Null),
|
|
1717
|
+
"end_page_number": S.Int,
|
|
1174
1718
|
"start_page_number": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(1)),
|
|
1175
|
-
"
|
|
1719
|
+
"type": BetaResponsePageLocationCitationType
|
|
1176
1720
|
}) {}
|
|
1177
1721
|
exports.BetaResponsePageLocationCitation = BetaResponsePageLocationCitation;
|
|
1178
1722
|
class BetaResponseContentBlockLocationCitationType extends /*#__PURE__*/S.Literal("content_block_location") {}
|
|
1179
1723
|
exports.BetaResponseContentBlockLocationCitationType = BetaResponseContentBlockLocationCitationType;
|
|
1180
1724
|
class BetaResponseContentBlockLocationCitation extends /*#__PURE__*/S.Struct({
|
|
1181
|
-
"type": /*#__PURE__*/BetaResponseContentBlockLocationCitationType.pipe(S.propertySignature, /*#__PURE__*/S.withConstructorDefault(() => "content_block_location")),
|
|
1182
1725
|
"cited_text": S.String,
|
|
1183
1726
|
"document_index": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
1184
1727
|
"document_title": /*#__PURE__*/S.Union(S.String, S.Null),
|
|
1728
|
+
"end_block_index": S.Int,
|
|
1185
1729
|
"start_block_index": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
1186
|
-
"
|
|
1730
|
+
"type": BetaResponseContentBlockLocationCitationType
|
|
1187
1731
|
}) {}
|
|
1188
1732
|
exports.BetaResponseContentBlockLocationCitation = BetaResponseContentBlockLocationCitation;
|
|
1733
|
+
class BetaResponseWebSearchResultLocationCitationType extends /*#__PURE__*/S.Literal("web_search_result_location") {}
|
|
1734
|
+
exports.BetaResponseWebSearchResultLocationCitationType = BetaResponseWebSearchResultLocationCitationType;
|
|
1735
|
+
class BetaResponseWebSearchResultLocationCitation extends /*#__PURE__*/S.Struct({
|
|
1736
|
+
"cited_text": S.String,
|
|
1737
|
+
"encrypted_index": S.String,
|
|
1738
|
+
"title": /*#__PURE__*/S.Union(S.String, S.Null),
|
|
1739
|
+
"type": BetaResponseWebSearchResultLocationCitationType,
|
|
1740
|
+
"url": S.String
|
|
1741
|
+
}) {}
|
|
1742
|
+
exports.BetaResponseWebSearchResultLocationCitation = BetaResponseWebSearchResultLocationCitation;
|
|
1743
|
+
class BetaResponseTextBlockType extends /*#__PURE__*/S.Literal("text") {}
|
|
1744
|
+
exports.BetaResponseTextBlockType = BetaResponseTextBlockType;
|
|
1189
1745
|
class BetaResponseTextBlock extends /*#__PURE__*/S.Struct({
|
|
1190
|
-
"
|
|
1746
|
+
"citations": /*#__PURE__*/S.NullOr(/*#__PURE__*/S.Union(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(BetaResponseCharLocationCitation, BetaResponsePageLocationCitation, BetaResponseContentBlockLocationCitation, BetaResponseWebSearchResultLocationCitation)), S.Null)),
|
|
1191
1747
|
"text": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(0), /*#__PURE__*/S.maxLength(5000000)),
|
|
1192
|
-
"
|
|
1193
|
-
default: () => null
|
|
1194
|
-
})
|
|
1748
|
+
"type": BetaResponseTextBlockType
|
|
1195
1749
|
}) {}
|
|
1196
1750
|
exports.BetaResponseTextBlock = BetaResponseTextBlock;
|
|
1197
1751
|
class BetaResponseToolUseBlockType extends /*#__PURE__*/S.Literal("tool_use") {}
|
|
1198
1752
|
exports.BetaResponseToolUseBlockType = BetaResponseToolUseBlockType;
|
|
1199
1753
|
class BetaResponseToolUseBlock extends /*#__PURE__*/S.Struct({
|
|
1200
|
-
"type": /*#__PURE__*/BetaResponseToolUseBlockType.pipe(S.propertySignature, /*#__PURE__*/S.withConstructorDefault(() => "tool_use")),
|
|
1201
1754
|
"id": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.pattern(/*#__PURE__*/new RegExp("^[a-zA-Z0-9_-]+$"))),
|
|
1202
|
-
"name": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1)),
|
|
1203
1755
|
"input": /*#__PURE__*/S.Record({
|
|
1204
1756
|
key: S.String,
|
|
1205
1757
|
value: S.Unknown
|
|
1206
|
-
})
|
|
1758
|
+
}),
|
|
1759
|
+
"name": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1)),
|
|
1760
|
+
"type": BetaResponseToolUseBlockType
|
|
1207
1761
|
}) {}
|
|
1208
1762
|
exports.BetaResponseToolUseBlock = BetaResponseToolUseBlock;
|
|
1763
|
+
class BetaResponseServerToolUseBlockName extends /*#__PURE__*/S.Literal("web_search", "code_execution") {}
|
|
1764
|
+
exports.BetaResponseServerToolUseBlockName = BetaResponseServerToolUseBlockName;
|
|
1765
|
+
class BetaResponseServerToolUseBlockType extends /*#__PURE__*/S.Literal("server_tool_use") {}
|
|
1766
|
+
exports.BetaResponseServerToolUseBlockType = BetaResponseServerToolUseBlockType;
|
|
1767
|
+
class BetaResponseServerToolUseBlock extends /*#__PURE__*/S.Struct({
|
|
1768
|
+
"id": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.pattern(/*#__PURE__*/new RegExp("^srvtoolu_[a-zA-Z0-9_]+$"))),
|
|
1769
|
+
"input": /*#__PURE__*/S.Record({
|
|
1770
|
+
key: S.String,
|
|
1771
|
+
value: S.Unknown
|
|
1772
|
+
}),
|
|
1773
|
+
"name": BetaResponseServerToolUseBlockName,
|
|
1774
|
+
"type": BetaResponseServerToolUseBlockType
|
|
1775
|
+
}) {}
|
|
1776
|
+
exports.BetaResponseServerToolUseBlock = BetaResponseServerToolUseBlock;
|
|
1777
|
+
class BetaResponseWebSearchToolResultErrorType extends /*#__PURE__*/S.Literal("web_search_tool_result_error") {}
|
|
1778
|
+
exports.BetaResponseWebSearchToolResultErrorType = BetaResponseWebSearchToolResultErrorType;
|
|
1779
|
+
class BetaResponseWebSearchToolResultError extends /*#__PURE__*/S.Struct({
|
|
1780
|
+
"error_code": BetaWebSearchToolResultErrorCode,
|
|
1781
|
+
"type": BetaResponseWebSearchToolResultErrorType
|
|
1782
|
+
}) {}
|
|
1783
|
+
exports.BetaResponseWebSearchToolResultError = BetaResponseWebSearchToolResultError;
|
|
1784
|
+
class BetaResponseWebSearchResultBlockType extends /*#__PURE__*/S.Literal("web_search_result") {}
|
|
1785
|
+
exports.BetaResponseWebSearchResultBlockType = BetaResponseWebSearchResultBlockType;
|
|
1786
|
+
class BetaResponseWebSearchResultBlock extends /*#__PURE__*/S.Struct({
|
|
1787
|
+
"encrypted_content": S.String,
|
|
1788
|
+
"page_age": /*#__PURE__*/S.NullOr(/*#__PURE__*/S.Union(S.String, S.Null)),
|
|
1789
|
+
"title": S.String,
|
|
1790
|
+
"type": BetaResponseWebSearchResultBlockType,
|
|
1791
|
+
"url": S.String
|
|
1792
|
+
}) {}
|
|
1793
|
+
exports.BetaResponseWebSearchResultBlock = BetaResponseWebSearchResultBlock;
|
|
1794
|
+
class BetaResponseWebSearchToolResultBlockType extends /*#__PURE__*/S.Literal("web_search_tool_result") {}
|
|
1795
|
+
exports.BetaResponseWebSearchToolResultBlockType = BetaResponseWebSearchToolResultBlockType;
|
|
1796
|
+
class BetaResponseWebSearchToolResultBlock extends /*#__PURE__*/S.Struct({
|
|
1797
|
+
"content": /*#__PURE__*/S.Union(BetaResponseWebSearchToolResultError, /*#__PURE__*/S.Array(BetaResponseWebSearchResultBlock)),
|
|
1798
|
+
"tool_use_id": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.pattern(/*#__PURE__*/new RegExp("^srvtoolu_[a-zA-Z0-9_]+$"))),
|
|
1799
|
+
"type": BetaResponseWebSearchToolResultBlockType
|
|
1800
|
+
}) {}
|
|
1801
|
+
exports.BetaResponseWebSearchToolResultBlock = BetaResponseWebSearchToolResultBlock;
|
|
1802
|
+
class BetaResponseCodeExecutionToolResultErrorType extends /*#__PURE__*/S.Literal("code_execution_tool_result_error") {}
|
|
1803
|
+
exports.BetaResponseCodeExecutionToolResultErrorType = BetaResponseCodeExecutionToolResultErrorType;
|
|
1804
|
+
class BetaResponseCodeExecutionToolResultError extends /*#__PURE__*/S.Struct({
|
|
1805
|
+
"error_code": BetaCodeExecutionToolResultErrorCode,
|
|
1806
|
+
"type": BetaResponseCodeExecutionToolResultErrorType
|
|
1807
|
+
}) {}
|
|
1808
|
+
exports.BetaResponseCodeExecutionToolResultError = BetaResponseCodeExecutionToolResultError;
|
|
1809
|
+
class BetaResponseCodeExecutionOutputBlockType extends /*#__PURE__*/S.Literal("code_execution_output") {}
|
|
1810
|
+
exports.BetaResponseCodeExecutionOutputBlockType = BetaResponseCodeExecutionOutputBlockType;
|
|
1811
|
+
class BetaResponseCodeExecutionOutputBlock extends /*#__PURE__*/S.Struct({
|
|
1812
|
+
"file_id": S.String,
|
|
1813
|
+
"type": BetaResponseCodeExecutionOutputBlockType
|
|
1814
|
+
}) {}
|
|
1815
|
+
exports.BetaResponseCodeExecutionOutputBlock = BetaResponseCodeExecutionOutputBlock;
|
|
1816
|
+
class BetaResponseCodeExecutionResultBlockType extends /*#__PURE__*/S.Literal("code_execution_result") {}
|
|
1817
|
+
exports.BetaResponseCodeExecutionResultBlockType = BetaResponseCodeExecutionResultBlockType;
|
|
1818
|
+
class BetaResponseCodeExecutionResultBlock extends /*#__PURE__*/S.Struct({
|
|
1819
|
+
"content": /*#__PURE__*/S.Array(BetaResponseCodeExecutionOutputBlock),
|
|
1820
|
+
"return_code": S.Int,
|
|
1821
|
+
"stderr": S.String,
|
|
1822
|
+
"stdout": S.String,
|
|
1823
|
+
"type": BetaResponseCodeExecutionResultBlockType
|
|
1824
|
+
}) {}
|
|
1825
|
+
exports.BetaResponseCodeExecutionResultBlock = BetaResponseCodeExecutionResultBlock;
|
|
1826
|
+
class BetaResponseCodeExecutionToolResultBlockType extends /*#__PURE__*/S.Literal("code_execution_tool_result") {}
|
|
1827
|
+
exports.BetaResponseCodeExecutionToolResultBlockType = BetaResponseCodeExecutionToolResultBlockType;
|
|
1828
|
+
class BetaResponseCodeExecutionToolResultBlock extends /*#__PURE__*/S.Struct({
|
|
1829
|
+
"content": /*#__PURE__*/S.Union(BetaResponseCodeExecutionToolResultError, BetaResponseCodeExecutionResultBlock),
|
|
1830
|
+
"tool_use_id": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.pattern(/*#__PURE__*/new RegExp("^srvtoolu_[a-zA-Z0-9_]+$"))),
|
|
1831
|
+
"type": BetaResponseCodeExecutionToolResultBlockType
|
|
1832
|
+
}) {}
|
|
1833
|
+
exports.BetaResponseCodeExecutionToolResultBlock = BetaResponseCodeExecutionToolResultBlock;
|
|
1834
|
+
class BetaResponseMCPToolUseBlockType extends /*#__PURE__*/S.Literal("mcp_tool_use") {}
|
|
1835
|
+
exports.BetaResponseMCPToolUseBlockType = BetaResponseMCPToolUseBlockType;
|
|
1836
|
+
class BetaResponseMCPToolUseBlock extends /*#__PURE__*/S.Struct({
|
|
1837
|
+
"id": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.pattern(/*#__PURE__*/new RegExp("^[a-zA-Z0-9_-]+$"))),
|
|
1838
|
+
"input": /*#__PURE__*/S.Record({
|
|
1839
|
+
key: S.String,
|
|
1840
|
+
value: S.Unknown
|
|
1841
|
+
}),
|
|
1842
|
+
"name": S.String,
|
|
1843
|
+
"server_name": S.String,
|
|
1844
|
+
"type": BetaResponseMCPToolUseBlockType
|
|
1845
|
+
}) {}
|
|
1846
|
+
exports.BetaResponseMCPToolUseBlock = BetaResponseMCPToolUseBlock;
|
|
1847
|
+
class BetaResponseMCPToolResultBlockType extends /*#__PURE__*/S.Literal("mcp_tool_result") {}
|
|
1848
|
+
exports.BetaResponseMCPToolResultBlockType = BetaResponseMCPToolResultBlockType;
|
|
1849
|
+
class BetaResponseMCPToolResultBlock extends /*#__PURE__*/S.Struct({
|
|
1850
|
+
"content": /*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.Array(BetaResponseTextBlock)),
|
|
1851
|
+
"is_error": S.Boolean,
|
|
1852
|
+
"tool_use_id": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.pattern(/*#__PURE__*/new RegExp("^[a-zA-Z0-9_-]+$"))),
|
|
1853
|
+
"type": BetaResponseMCPToolResultBlockType
|
|
1854
|
+
}) {}
|
|
1855
|
+
exports.BetaResponseMCPToolResultBlock = BetaResponseMCPToolResultBlock;
|
|
1856
|
+
class BetaResponseContainerUploadBlockType extends /*#__PURE__*/S.Literal("container_upload") {}
|
|
1857
|
+
exports.BetaResponseContainerUploadBlockType = BetaResponseContainerUploadBlockType;
|
|
1858
|
+
class BetaResponseContainerUploadBlock extends /*#__PURE__*/S.Struct({
|
|
1859
|
+
"file_id": S.String,
|
|
1860
|
+
"type": BetaResponseContainerUploadBlockType
|
|
1861
|
+
}) {}
|
|
1862
|
+
exports.BetaResponseContainerUploadBlock = BetaResponseContainerUploadBlock;
|
|
1209
1863
|
class BetaResponseThinkingBlockType extends /*#__PURE__*/S.Literal("thinking") {}
|
|
1210
1864
|
exports.BetaResponseThinkingBlockType = BetaResponseThinkingBlockType;
|
|
1211
1865
|
class BetaResponseThinkingBlock extends /*#__PURE__*/S.Struct({
|
|
1212
|
-
"
|
|
1866
|
+
"signature": S.String,
|
|
1213
1867
|
"thinking": S.String,
|
|
1214
|
-
"
|
|
1868
|
+
"type": BetaResponseThinkingBlockType
|
|
1215
1869
|
}) {}
|
|
1216
1870
|
exports.BetaResponseThinkingBlock = BetaResponseThinkingBlock;
|
|
1217
1871
|
class BetaResponseRedactedThinkingBlockType extends /*#__PURE__*/S.Literal("redacted_thinking") {}
|
|
1218
1872
|
exports.BetaResponseRedactedThinkingBlockType = BetaResponseRedactedThinkingBlockType;
|
|
1219
1873
|
class BetaResponseRedactedThinkingBlock extends /*#__PURE__*/S.Struct({
|
|
1220
|
-
"
|
|
1221
|
-
"
|
|
1874
|
+
"data": S.String,
|
|
1875
|
+
"type": BetaResponseRedactedThinkingBlockType
|
|
1222
1876
|
}) {}
|
|
1223
1877
|
exports.BetaResponseRedactedThinkingBlock = BetaResponseRedactedThinkingBlock;
|
|
1224
|
-
class BetaContentBlock extends /*#__PURE__*/S.Union(BetaResponseTextBlock, BetaResponseToolUseBlock, BetaResponseThinkingBlock, BetaResponseRedactedThinkingBlock) {}
|
|
1878
|
+
class BetaContentBlock extends /*#__PURE__*/S.Union(BetaResponseTextBlock, BetaResponseToolUseBlock, BetaResponseServerToolUseBlock, BetaResponseWebSearchToolResultBlock, BetaResponseCodeExecutionToolResultBlock, BetaResponseMCPToolUseBlock, BetaResponseMCPToolResultBlock, BetaResponseContainerUploadBlock, BetaResponseThinkingBlock, BetaResponseRedactedThinkingBlock) {}
|
|
1225
1879
|
exports.BetaContentBlock = BetaContentBlock;
|
|
1226
|
-
class
|
|
1227
|
-
exports.
|
|
1880
|
+
class BetaStopReason extends /*#__PURE__*/S.Literal("end_turn", "max_tokens", "stop_sequence", "tool_use", "pause_turn", "refusal") {}
|
|
1881
|
+
exports.BetaStopReason = BetaStopReason;
|
|
1882
|
+
class BetaCacheCreation extends /*#__PURE__*/S.Struct({
|
|
1883
|
+
"ephemeral_1h_input_tokens": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
1884
|
+
"ephemeral_5m_input_tokens": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0))
|
|
1885
|
+
}) {}
|
|
1886
|
+
exports.BetaCacheCreation = BetaCacheCreation;
|
|
1887
|
+
class BetaServerToolUsage extends /*#__PURE__*/S.Struct({
|
|
1888
|
+
"web_search_requests": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0))
|
|
1889
|
+
}) {}
|
|
1890
|
+
exports.BetaServerToolUsage = BetaServerToolUsage;
|
|
1891
|
+
class BetaUsageServiceTierEnum extends /*#__PURE__*/S.Literal("standard", "priority", "batch") {}
|
|
1892
|
+
exports.BetaUsageServiceTierEnum = BetaUsageServiceTierEnum;
|
|
1228
1893
|
class BetaUsage extends /*#__PURE__*/S.Struct({
|
|
1894
|
+
"cache_creation": /*#__PURE__*/S.NullOr(/*#__PURE__*/S.Union(BetaCacheCreation, S.Null)),
|
|
1895
|
+
"cache_creation_input_tokens": /*#__PURE__*/S.NullOr(/*#__PURE__*/S.Union(/*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)), S.Null)),
|
|
1896
|
+
"cache_read_input_tokens": /*#__PURE__*/S.NullOr(/*#__PURE__*/S.Union(/*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)), S.Null)),
|
|
1229
1897
|
"input_tokens": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
1230
|
-
"
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
"cache_read_input_tokens": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.NullOr(/*#__PURE__*/S.Union(/*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)), S.Null)), {
|
|
1234
|
-
default: () => null
|
|
1235
|
-
}),
|
|
1236
|
-
"output_tokens": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0))
|
|
1898
|
+
"output_tokens": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
1899
|
+
"server_tool_use": /*#__PURE__*/S.NullOr(/*#__PURE__*/S.Union(BetaServerToolUsage, S.Null)),
|
|
1900
|
+
"service_tier": /*#__PURE__*/S.NullOr(/*#__PURE__*/S.Union(BetaUsageServiceTierEnum, S.Null))
|
|
1237
1901
|
}) {}
|
|
1238
1902
|
exports.BetaUsage = BetaUsage;
|
|
1903
|
+
class BetaContainer extends /*#__PURE__*/S.Struct({
|
|
1904
|
+
"expires_at": S.String,
|
|
1905
|
+
"id": S.String
|
|
1906
|
+
}) {}
|
|
1907
|
+
exports.BetaContainer = BetaContainer;
|
|
1239
1908
|
class BetaMessage extends /*#__PURE__*/S.Class("BetaMessage")({
|
|
1240
1909
|
"id": S.String,
|
|
1241
|
-
"type":
|
|
1242
|
-
"role":
|
|
1910
|
+
"type": BetaMessageType,
|
|
1911
|
+
"role": BetaMessageRole,
|
|
1243
1912
|
"content": /*#__PURE__*/S.Array(BetaContentBlock),
|
|
1244
|
-
"model": Model,
|
|
1245
|
-
"stop_reason": /*#__PURE__*/S.Union(
|
|
1246
|
-
"stop_sequence": /*#__PURE__*/S.
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
"usage": BetaUsage
|
|
1913
|
+
"model": /*#__PURE__*/S.Union(S.String, Model),
|
|
1914
|
+
"stop_reason": /*#__PURE__*/S.Union(BetaStopReason, S.Null),
|
|
1915
|
+
"stop_sequence": /*#__PURE__*/S.NullOr(/*#__PURE__*/S.Union(S.String, S.Null)),
|
|
1916
|
+
"usage": BetaUsage,
|
|
1917
|
+
"container": /*#__PURE__*/S.NullOr(/*#__PURE__*/S.Union(BetaContainer, S.Null))
|
|
1250
1918
|
}) {}
|
|
1251
1919
|
exports.BetaMessage = BetaMessage;
|
|
1252
|
-
class BetaErrorResponseType extends /*#__PURE__*/S.Literal("error") {}
|
|
1253
|
-
exports.BetaErrorResponseType = BetaErrorResponseType;
|
|
1254
1920
|
class BetaInvalidRequestErrorType extends /*#__PURE__*/S.Literal("invalid_request_error") {}
|
|
1255
1921
|
exports.BetaInvalidRequestErrorType = BetaInvalidRequestErrorType;
|
|
1256
1922
|
class BetaInvalidRequestError extends /*#__PURE__*/S.Struct({
|
|
1257
|
-
"
|
|
1258
|
-
"
|
|
1923
|
+
"message": S.String,
|
|
1924
|
+
"type": BetaInvalidRequestErrorType
|
|
1259
1925
|
}) {}
|
|
1260
1926
|
exports.BetaInvalidRequestError = BetaInvalidRequestError;
|
|
1261
1927
|
class BetaAuthenticationErrorType extends /*#__PURE__*/S.Literal("authentication_error") {}
|
|
1262
1928
|
exports.BetaAuthenticationErrorType = BetaAuthenticationErrorType;
|
|
1263
1929
|
class BetaAuthenticationError extends /*#__PURE__*/S.Struct({
|
|
1264
|
-
"
|
|
1265
|
-
"
|
|
1930
|
+
"message": S.String,
|
|
1931
|
+
"type": BetaAuthenticationErrorType
|
|
1266
1932
|
}) {}
|
|
1267
1933
|
exports.BetaAuthenticationError = BetaAuthenticationError;
|
|
1268
1934
|
class BetaBillingErrorType extends /*#__PURE__*/S.Literal("billing_error") {}
|
|
1269
1935
|
exports.BetaBillingErrorType = BetaBillingErrorType;
|
|
1270
1936
|
class BetaBillingError extends /*#__PURE__*/S.Struct({
|
|
1271
|
-
"
|
|
1272
|
-
"
|
|
1937
|
+
"message": S.String,
|
|
1938
|
+
"type": BetaBillingErrorType
|
|
1273
1939
|
}) {}
|
|
1274
1940
|
exports.BetaBillingError = BetaBillingError;
|
|
1275
1941
|
class BetaPermissionErrorType extends /*#__PURE__*/S.Literal("permission_error") {}
|
|
1276
1942
|
exports.BetaPermissionErrorType = BetaPermissionErrorType;
|
|
1277
1943
|
class BetaPermissionError extends /*#__PURE__*/S.Struct({
|
|
1278
|
-
"
|
|
1279
|
-
"
|
|
1944
|
+
"message": S.String,
|
|
1945
|
+
"type": BetaPermissionErrorType
|
|
1280
1946
|
}) {}
|
|
1281
1947
|
exports.BetaPermissionError = BetaPermissionError;
|
|
1282
1948
|
class BetaNotFoundErrorType extends /*#__PURE__*/S.Literal("not_found_error") {}
|
|
1283
1949
|
exports.BetaNotFoundErrorType = BetaNotFoundErrorType;
|
|
1284
1950
|
class BetaNotFoundError extends /*#__PURE__*/S.Struct({
|
|
1285
|
-
"
|
|
1286
|
-
"
|
|
1951
|
+
"message": S.String,
|
|
1952
|
+
"type": BetaNotFoundErrorType
|
|
1287
1953
|
}) {}
|
|
1288
1954
|
exports.BetaNotFoundError = BetaNotFoundError;
|
|
1289
1955
|
class BetaRateLimitErrorType extends /*#__PURE__*/S.Literal("rate_limit_error") {}
|
|
1290
1956
|
exports.BetaRateLimitErrorType = BetaRateLimitErrorType;
|
|
1291
1957
|
class BetaRateLimitError extends /*#__PURE__*/S.Struct({
|
|
1292
|
-
"
|
|
1293
|
-
"
|
|
1958
|
+
"message": S.String,
|
|
1959
|
+
"type": BetaRateLimitErrorType
|
|
1294
1960
|
}) {}
|
|
1295
1961
|
exports.BetaRateLimitError = BetaRateLimitError;
|
|
1296
1962
|
class BetaGatewayTimeoutErrorType extends /*#__PURE__*/S.Literal("timeout_error") {}
|
|
1297
1963
|
exports.BetaGatewayTimeoutErrorType = BetaGatewayTimeoutErrorType;
|
|
1298
1964
|
class BetaGatewayTimeoutError extends /*#__PURE__*/S.Struct({
|
|
1299
|
-
"
|
|
1300
|
-
"
|
|
1965
|
+
"message": S.String,
|
|
1966
|
+
"type": BetaGatewayTimeoutErrorType
|
|
1301
1967
|
}) {}
|
|
1302
1968
|
exports.BetaGatewayTimeoutError = BetaGatewayTimeoutError;
|
|
1303
1969
|
class BetaAPIErrorType extends /*#__PURE__*/S.Literal("api_error") {}
|
|
1304
1970
|
exports.BetaAPIErrorType = BetaAPIErrorType;
|
|
1305
1971
|
class BetaAPIError extends /*#__PURE__*/S.Struct({
|
|
1306
|
-
"
|
|
1307
|
-
"
|
|
1972
|
+
"message": S.String,
|
|
1973
|
+
"type": BetaAPIErrorType
|
|
1308
1974
|
}) {}
|
|
1309
1975
|
exports.BetaAPIError = BetaAPIError;
|
|
1310
1976
|
class BetaOverloadedErrorType extends /*#__PURE__*/S.Literal("overloaded_error") {}
|
|
1311
1977
|
exports.BetaOverloadedErrorType = BetaOverloadedErrorType;
|
|
1312
1978
|
class BetaOverloadedError extends /*#__PURE__*/S.Struct({
|
|
1313
|
-
"
|
|
1314
|
-
"
|
|
1979
|
+
"message": S.String,
|
|
1980
|
+
"type": BetaOverloadedErrorType
|
|
1315
1981
|
}) {}
|
|
1316
1982
|
exports.BetaOverloadedError = BetaOverloadedError;
|
|
1983
|
+
class BetaErrorResponseType extends /*#__PURE__*/S.Literal("error") {}
|
|
1984
|
+
exports.BetaErrorResponseType = BetaErrorResponseType;
|
|
1317
1985
|
class BetaErrorResponse extends /*#__PURE__*/S.Class("BetaErrorResponse")({
|
|
1318
|
-
"
|
|
1319
|
-
"
|
|
1986
|
+
"error": /*#__PURE__*/S.Union(BetaInvalidRequestError, BetaAuthenticationError, BetaBillingError, BetaPermissionError, BetaNotFoundError, BetaRateLimitError, BetaGatewayTimeoutError, BetaAPIError, BetaOverloadedError),
|
|
1987
|
+
"type": BetaErrorResponseType
|
|
1320
1988
|
}) {}
|
|
1321
1989
|
exports.BetaErrorResponse = BetaErrorResponse;
|
|
1322
1990
|
class BetaModelsListParams extends /*#__PURE__*/S.Struct({
|
|
@@ -1327,30 +1995,32 @@ class BetaModelsListParams extends /*#__PURE__*/S.Struct({
|
|
|
1327
1995
|
nullable: true
|
|
1328
1996
|
}),
|
|
1329
1997
|
"limit": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(1), /*#__PURE__*/S.lessThanOrEqualTo(1000)), {
|
|
1330
|
-
nullable: true
|
|
1331
|
-
default: () => 20
|
|
1998
|
+
nullable: true
|
|
1332
1999
|
}),
|
|
1333
2000
|
"anthropic-version": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1334
2001
|
nullable: true
|
|
1335
2002
|
}),
|
|
1336
2003
|
"x-api-key": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1337
2004
|
nullable: true
|
|
2005
|
+
}),
|
|
2006
|
+
"anthropic-beta": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2007
|
+
nullable: true
|
|
1338
2008
|
})
|
|
1339
2009
|
}) {}
|
|
1340
2010
|
exports.BetaModelsListParams = BetaModelsListParams;
|
|
1341
2011
|
class BetaModelInfoType extends /*#__PURE__*/S.Literal("model") {}
|
|
1342
2012
|
exports.BetaModelInfoType = BetaModelInfoType;
|
|
1343
2013
|
class BetaModelInfo extends /*#__PURE__*/S.Struct({
|
|
1344
|
-
"
|
|
1345
|
-
"id": S.String,
|
|
2014
|
+
"created_at": S.String,
|
|
1346
2015
|
"display_name": S.String,
|
|
1347
|
-
"
|
|
2016
|
+
"id": S.String,
|
|
2017
|
+
"type": BetaModelInfoType
|
|
1348
2018
|
}) {}
|
|
1349
2019
|
exports.BetaModelInfo = BetaModelInfo;
|
|
1350
2020
|
class BetaListResponseModelInfo extends /*#__PURE__*/S.Class("BetaListResponseModelInfo")({
|
|
1351
2021
|
"data": /*#__PURE__*/S.Array(BetaModelInfo),
|
|
1352
|
-
"has_more": S.Boolean,
|
|
1353
2022
|
"first_id": /*#__PURE__*/S.Union(S.String, S.Null),
|
|
2023
|
+
"has_more": S.Boolean,
|
|
1354
2024
|
"last_id": /*#__PURE__*/S.Union(S.String, S.Null)
|
|
1355
2025
|
}) {}
|
|
1356
2026
|
exports.BetaListResponseModelInfo = BetaListResponseModelInfo;
|
|
@@ -1360,6 +2030,9 @@ class BetaModelsGetParams extends /*#__PURE__*/S.Struct({
|
|
|
1360
2030
|
}),
|
|
1361
2031
|
"x-api-key": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1362
2032
|
nullable: true
|
|
2033
|
+
}),
|
|
2034
|
+
"anthropic-beta": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2035
|
+
nullable: true
|
|
1363
2036
|
})
|
|
1364
2037
|
}) {}
|
|
1365
2038
|
exports.BetaModelsGetParams = BetaModelsGetParams;
|
|
@@ -1371,8 +2044,7 @@ class BetaMessageBatchesListParams extends /*#__PURE__*/S.Struct({
|
|
|
1371
2044
|
nullable: true
|
|
1372
2045
|
}),
|
|
1373
2046
|
"limit": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(1), /*#__PURE__*/S.lessThanOrEqualTo(1000)), {
|
|
1374
|
-
nullable: true
|
|
1375
|
-
default: () => 20
|
|
2047
|
+
nullable: true
|
|
1376
2048
|
}),
|
|
1377
2049
|
"anthropic-beta": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1378
2050
|
nullable: true
|
|
@@ -1385,35 +2057,35 @@ class BetaMessageBatchesListParams extends /*#__PURE__*/S.Struct({
|
|
|
1385
2057
|
})
|
|
1386
2058
|
}) {}
|
|
1387
2059
|
exports.BetaMessageBatchesListParams = BetaMessageBatchesListParams;
|
|
1388
|
-
class BetaMessageBatchType extends /*#__PURE__*/S.Literal("message_batch") {}
|
|
1389
|
-
exports.BetaMessageBatchType = BetaMessageBatchType;
|
|
1390
2060
|
class BetaMessageBatchProcessingStatus extends /*#__PURE__*/S.Literal("in_progress", "canceling", "ended") {}
|
|
1391
2061
|
exports.BetaMessageBatchProcessingStatus = BetaMessageBatchProcessingStatus;
|
|
1392
2062
|
class BetaRequestCounts extends /*#__PURE__*/S.Struct({
|
|
1393
|
-
"
|
|
1394
|
-
"
|
|
1395
|
-
"
|
|
1396
|
-
"
|
|
1397
|
-
"
|
|
2063
|
+
"canceled": S.Int,
|
|
2064
|
+
"errored": S.Int,
|
|
2065
|
+
"expired": S.Int,
|
|
2066
|
+
"processing": S.Int,
|
|
2067
|
+
"succeeded": S.Int
|
|
1398
2068
|
}) {}
|
|
1399
2069
|
exports.BetaRequestCounts = BetaRequestCounts;
|
|
2070
|
+
class BetaMessageBatchType extends /*#__PURE__*/S.Literal("message_batch") {}
|
|
2071
|
+
exports.BetaMessageBatchType = BetaMessageBatchType;
|
|
1400
2072
|
class BetaMessageBatch extends /*#__PURE__*/S.Struct({
|
|
2073
|
+
"archived_at": /*#__PURE__*/S.Union(S.String, S.Null),
|
|
2074
|
+
"cancel_initiated_at": /*#__PURE__*/S.Union(S.String, S.Null),
|
|
2075
|
+
"created_at": S.String,
|
|
2076
|
+
"ended_at": /*#__PURE__*/S.Union(S.String, S.Null),
|
|
2077
|
+
"expires_at": S.String,
|
|
1401
2078
|
"id": S.String,
|
|
1402
|
-
"type": /*#__PURE__*/BetaMessageBatchType.pipe(S.propertySignature, /*#__PURE__*/S.withConstructorDefault(() => "message_batch")),
|
|
1403
2079
|
"processing_status": BetaMessageBatchProcessingStatus,
|
|
1404
2080
|
"request_counts": BetaRequestCounts,
|
|
1405
|
-
"
|
|
1406
|
-
"
|
|
1407
|
-
"expires_at": S.String,
|
|
1408
|
-
"archived_at": /*#__PURE__*/S.Union(S.String, S.Null),
|
|
1409
|
-
"cancel_initiated_at": /*#__PURE__*/S.Union(S.String, S.Null),
|
|
1410
|
-
"results_url": /*#__PURE__*/S.Union(S.String, S.Null)
|
|
2081
|
+
"results_url": /*#__PURE__*/S.Union(S.String, S.Null),
|
|
2082
|
+
"type": BetaMessageBatchType
|
|
1411
2083
|
}) {}
|
|
1412
2084
|
exports.BetaMessageBatch = BetaMessageBatch;
|
|
1413
2085
|
class BetaListResponseMessageBatch extends /*#__PURE__*/S.Class("BetaListResponseMessageBatch")({
|
|
1414
2086
|
"data": /*#__PURE__*/S.Array(BetaMessageBatch),
|
|
1415
|
-
"has_more": S.Boolean,
|
|
1416
2087
|
"first_id": /*#__PURE__*/S.Union(S.String, S.Null),
|
|
2088
|
+
"has_more": S.Boolean,
|
|
1417
2089
|
"last_id": /*#__PURE__*/S.Union(S.String, S.Null)
|
|
1418
2090
|
}) {}
|
|
1419
2091
|
exports.BetaListResponseMessageBatch = BetaListResponseMessageBatch;
|
|
@@ -1463,7 +2135,7 @@ class BetaDeleteMessageBatchResponseType extends /*#__PURE__*/S.Literal("message
|
|
|
1463
2135
|
exports.BetaDeleteMessageBatchResponseType = BetaDeleteMessageBatchResponseType;
|
|
1464
2136
|
class BetaDeleteMessageBatchResponse extends /*#__PURE__*/S.Class("BetaDeleteMessageBatchResponse")({
|
|
1465
2137
|
"id": S.String,
|
|
1466
|
-
"type":
|
|
2138
|
+
"type": BetaDeleteMessageBatchResponseType
|
|
1467
2139
|
}) {}
|
|
1468
2140
|
exports.BetaDeleteMessageBatchResponse = BetaDeleteMessageBatchResponse;
|
|
1469
2141
|
class BetaMessageBatchesCancelParams extends /*#__PURE__*/S.Struct({
|
|
@@ -1497,26 +2169,131 @@ class BetaMessagesCountTokensPostParams extends /*#__PURE__*/S.Struct({
|
|
|
1497
2169
|
}) {}
|
|
1498
2170
|
exports.BetaMessagesCountTokensPostParams = BetaMessagesCountTokensPostParams;
|
|
1499
2171
|
class BetaCountMessageTokensParams extends /*#__PURE__*/S.Class("BetaCountMessageTokensParams")({
|
|
1500
|
-
"
|
|
1501
|
-
nullable: true
|
|
1502
|
-
}),
|
|
1503
|
-
"tools": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(BetaTool, BetaComputerUseTool20241022, BetaBashTool20241022, BetaTextEditor20241022, BetaComputerUseTool20250124, BetaBashTool20250124, BetaTextEditor20250124)), {
|
|
2172
|
+
"mcp_servers": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(BetaRequestMCPServerURLDefinition).pipe(/*#__PURE__*/S.maxItems(20)), {
|
|
1504
2173
|
nullable: true
|
|
1505
2174
|
}),
|
|
1506
2175
|
"messages": /*#__PURE__*/S.Array(BetaInputMessage),
|
|
2176
|
+
"model": /*#__PURE__*/S.Union(S.String, Model),
|
|
1507
2177
|
"system": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.Array(BetaRequestTextBlock)), {
|
|
1508
2178
|
nullable: true
|
|
1509
2179
|
}),
|
|
1510
2180
|
"thinking": /*#__PURE__*/S.optionalWith(BetaThinkingConfigParam, {
|
|
1511
2181
|
nullable: true
|
|
1512
2182
|
}),
|
|
1513
|
-
"
|
|
2183
|
+
"tool_choice": /*#__PURE__*/S.optionalWith(BetaToolChoice, {
|
|
2184
|
+
nullable: true
|
|
2185
|
+
}),
|
|
2186
|
+
"tools": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(BetaTool, BetaComputerUseTool20241022, BetaBashTool20241022, BetaTextEditor20241022, BetaComputerUseTool20250124, BetaBashTool20250124, BetaTextEditor20250124, BetaTextEditor20250429, BetaWebSearchTool20250305, BetaCodeExecutionTool20250522)), {
|
|
2187
|
+
nullable: true
|
|
2188
|
+
})
|
|
1514
2189
|
}) {}
|
|
1515
2190
|
exports.BetaCountMessageTokensParams = BetaCountMessageTokensParams;
|
|
1516
2191
|
class BetaCountMessageTokensResponse extends /*#__PURE__*/S.Class("BetaCountMessageTokensResponse")({
|
|
1517
2192
|
"input_tokens": S.Int
|
|
1518
2193
|
}) {}
|
|
1519
2194
|
exports.BetaCountMessageTokensResponse = BetaCountMessageTokensResponse;
|
|
2195
|
+
class BetaListFilesV1FilesGetParams extends /*#__PURE__*/S.Struct({
|
|
2196
|
+
"before_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2197
|
+
nullable: true
|
|
2198
|
+
}),
|
|
2199
|
+
"after_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2200
|
+
nullable: true
|
|
2201
|
+
}),
|
|
2202
|
+
"limit": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(1), /*#__PURE__*/S.lessThanOrEqualTo(1000)), {
|
|
2203
|
+
nullable: true
|
|
2204
|
+
}),
|
|
2205
|
+
"anthropic-beta": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2206
|
+
nullable: true
|
|
2207
|
+
}),
|
|
2208
|
+
"anthropic-version": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2209
|
+
nullable: true
|
|
2210
|
+
}),
|
|
2211
|
+
"x-api-key": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2212
|
+
nullable: true
|
|
2213
|
+
})
|
|
2214
|
+
}) {}
|
|
2215
|
+
exports.BetaListFilesV1FilesGetParams = BetaListFilesV1FilesGetParams;
|
|
2216
|
+
class BetaFileMetadataSchemaType extends /*#__PURE__*/S.Literal("file") {}
|
|
2217
|
+
exports.BetaFileMetadataSchemaType = BetaFileMetadataSchemaType;
|
|
2218
|
+
class BetaFileMetadataSchema extends /*#__PURE__*/S.Struct({
|
|
2219
|
+
"created_at": S.String,
|
|
2220
|
+
"downloadable": /*#__PURE__*/S.optionalWith(S.Boolean, {
|
|
2221
|
+
nullable: true
|
|
2222
|
+
}),
|
|
2223
|
+
"filename": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1), /*#__PURE__*/S.maxLength(500)),
|
|
2224
|
+
"id": S.String,
|
|
2225
|
+
"mime_type": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1), /*#__PURE__*/S.maxLength(255)),
|
|
2226
|
+
"size_bytes": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
2227
|
+
"type": BetaFileMetadataSchemaType
|
|
2228
|
+
}) {}
|
|
2229
|
+
exports.BetaFileMetadataSchema = BetaFileMetadataSchema;
|
|
2230
|
+
class BetaFileListResponse extends /*#__PURE__*/S.Class("BetaFileListResponse")({
|
|
2231
|
+
"data": /*#__PURE__*/S.Array(BetaFileMetadataSchema),
|
|
2232
|
+
"first_id": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(S.String, S.Null), {
|
|
2233
|
+
nullable: true
|
|
2234
|
+
}),
|
|
2235
|
+
"has_more": /*#__PURE__*/S.optionalWith(S.Boolean, {
|
|
2236
|
+
nullable: true
|
|
2237
|
+
}),
|
|
2238
|
+
"last_id": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(S.String, S.Null), {
|
|
2239
|
+
nullable: true
|
|
2240
|
+
})
|
|
2241
|
+
}) {}
|
|
2242
|
+
exports.BetaFileListResponse = BetaFileListResponse;
|
|
2243
|
+
class BetaUploadFileV1FilesPostParams extends /*#__PURE__*/S.Struct({
|
|
2244
|
+
"anthropic-beta": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2245
|
+
nullable: true
|
|
2246
|
+
}),
|
|
2247
|
+
"anthropic-version": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2248
|
+
nullable: true
|
|
2249
|
+
})
|
|
2250
|
+
}) {}
|
|
2251
|
+
exports.BetaUploadFileV1FilesPostParams = BetaUploadFileV1FilesPostParams;
|
|
2252
|
+
class BetaGetFileMetadataV1FilesFileIdGetParams extends /*#__PURE__*/S.Struct({
|
|
2253
|
+
"anthropic-beta": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2254
|
+
nullable: true
|
|
2255
|
+
}),
|
|
2256
|
+
"anthropic-version": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2257
|
+
nullable: true
|
|
2258
|
+
}),
|
|
2259
|
+
"x-api-key": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2260
|
+
nullable: true
|
|
2261
|
+
})
|
|
2262
|
+
}) {}
|
|
2263
|
+
exports.BetaGetFileMetadataV1FilesFileIdGetParams = BetaGetFileMetadataV1FilesFileIdGetParams;
|
|
2264
|
+
class BetaDeleteFileV1FilesFileIdDeleteParams extends /*#__PURE__*/S.Struct({
|
|
2265
|
+
"anthropic-beta": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2266
|
+
nullable: true
|
|
2267
|
+
}),
|
|
2268
|
+
"anthropic-version": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2269
|
+
nullable: true
|
|
2270
|
+
}),
|
|
2271
|
+
"x-api-key": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2272
|
+
nullable: true
|
|
2273
|
+
})
|
|
2274
|
+
}) {}
|
|
2275
|
+
exports.BetaDeleteFileV1FilesFileIdDeleteParams = BetaDeleteFileV1FilesFileIdDeleteParams;
|
|
2276
|
+
class BetaFileDeleteResponseType extends /*#__PURE__*/S.Literal("file_deleted") {}
|
|
2277
|
+
exports.BetaFileDeleteResponseType = BetaFileDeleteResponseType;
|
|
2278
|
+
class BetaFileDeleteResponse extends /*#__PURE__*/S.Class("BetaFileDeleteResponse")({
|
|
2279
|
+
"id": S.String,
|
|
2280
|
+
"type": /*#__PURE__*/S.optionalWith(BetaFileDeleteResponseType, {
|
|
2281
|
+
nullable: true
|
|
2282
|
+
})
|
|
2283
|
+
}) {}
|
|
2284
|
+
exports.BetaFileDeleteResponse = BetaFileDeleteResponse;
|
|
2285
|
+
class BetaDownloadFileV1FilesFileIdContentGetParams extends /*#__PURE__*/S.Struct({
|
|
2286
|
+
"anthropic-beta": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2287
|
+
nullable: true
|
|
2288
|
+
}),
|
|
2289
|
+
"anthropic-version": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2290
|
+
nullable: true
|
|
2291
|
+
}),
|
|
2292
|
+
"x-api-key": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2293
|
+
nullable: true
|
|
2294
|
+
})
|
|
2295
|
+
}) {}
|
|
2296
|
+
exports.BetaDownloadFileV1FilesFileIdContentGetParams = BetaDownloadFileV1FilesFileIdContentGetParams;
|
|
1520
2297
|
const make = (httpClient, options = {}) => {
|
|
1521
2298
|
const unexpectedStatus = (request, response) => Effect.flatMap(Effect.orElseSucceed(response.text, () => "Unexpected status code"), description => Effect.fail(new HttpClientError.ResponseError({
|
|
1522
2299
|
request,
|
|
@@ -1527,186 +2304,284 @@ const make = (httpClient, options = {}) => {
|
|
|
1527
2304
|
const applyClientTransform = client => options.transformClient ? options.transformClient(client) : Effect.succeed(client);
|
|
1528
2305
|
const decodeError = (response, schema) => Effect.flatMap(HttpClientResponse.schemaBodyJson(schema)(response), Effect.fail);
|
|
1529
2306
|
return {
|
|
2307
|
+
httpClient,
|
|
1530
2308
|
"messagesPost": options => HttpClientRequest.make("POST")(`/v1/messages`).pipe(HttpClientRequest.setHeaders({
|
|
1531
|
-
"anthropic-version": options.params["anthropic-version"] ?? undefined
|
|
2309
|
+
"anthropic-version": options.params?.["anthropic-version"] ?? undefined
|
|
1532
2310
|
}), req => Effect.orDie(HttpClientRequest.bodyJson(req, options.payload)), Effect.flatMap(request => Effect.flatMap(applyClientTransform(httpClient), httpClient => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
1533
2311
|
"200": r => HttpClientResponse.schemaBodyJson(Message)(r),
|
|
1534
2312
|
"4xx": r => decodeError(r, ErrorResponse),
|
|
1535
2313
|
orElse: response => unexpectedStatus(request, response)
|
|
1536
2314
|
}))))),
|
|
1537
2315
|
"completePost": options => HttpClientRequest.make("POST")(`/v1/complete`).pipe(HttpClientRequest.setHeaders({
|
|
1538
|
-
"anthropic-version": options.params["anthropic-version"] ?? undefined
|
|
2316
|
+
"anthropic-version": options.params?.["anthropic-version"] ?? undefined,
|
|
2317
|
+
"anthropic-beta": options.params?.["anthropic-beta"] ?? undefined
|
|
1539
2318
|
}), req => Effect.orDie(HttpClientRequest.bodyJson(req, options.payload)), Effect.flatMap(request => Effect.flatMap(applyClientTransform(httpClient), httpClient => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
1540
2319
|
"200": r => HttpClientResponse.schemaBodyJson(CompletionResponse)(r),
|
|
1541
2320
|
"4xx": r => decodeError(r, ErrorResponse),
|
|
1542
2321
|
orElse: response => unexpectedStatus(request, response)
|
|
1543
2322
|
}))))),
|
|
1544
2323
|
"modelsList": options => HttpClientRequest.make("GET")(`/v1/models`).pipe(HttpClientRequest.setUrlParams({
|
|
1545
|
-
"before_id": options["before_id"],
|
|
1546
|
-
"after_id": options["after_id"],
|
|
1547
|
-
"limit": options["limit"]
|
|
2324
|
+
"before_id": options?.["before_id"],
|
|
2325
|
+
"after_id": options?.["after_id"],
|
|
2326
|
+
"limit": options?.["limit"]
|
|
1548
2327
|
}), HttpClientRequest.setHeaders({
|
|
1549
|
-
"anthropic-version": options["anthropic-version"] ?? undefined,
|
|
1550
|
-
"x-api-key": options["x-api-key"] ?? undefined
|
|
2328
|
+
"anthropic-version": options?.["anthropic-version"] ?? undefined,
|
|
2329
|
+
"x-api-key": options?.["x-api-key"] ?? undefined,
|
|
2330
|
+
"anthropic-beta": options?.["anthropic-beta"] ?? undefined
|
|
1551
2331
|
}), Effect.succeed, Effect.flatMap(request => Effect.flatMap(applyClientTransform(httpClient), httpClient => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
1552
2332
|
"200": r => HttpClientResponse.schemaBodyJson(ListResponseModelInfo)(r),
|
|
1553
2333
|
"4xx": r => decodeError(r, ErrorResponse),
|
|
1554
2334
|
orElse: response => unexpectedStatus(request, response)
|
|
1555
2335
|
}))))),
|
|
1556
2336
|
"modelsGet": (modelId, options) => HttpClientRequest.make("GET")(`/v1/models/${modelId}`).pipe(HttpClientRequest.setHeaders({
|
|
1557
|
-
"anthropic-version": options["anthropic-version"] ?? undefined,
|
|
1558
|
-
"x-api-key": options["x-api-key"] ?? undefined
|
|
2337
|
+
"anthropic-version": options?.["anthropic-version"] ?? undefined,
|
|
2338
|
+
"x-api-key": options?.["x-api-key"] ?? undefined,
|
|
2339
|
+
"anthropic-beta": options?.["anthropic-beta"] ?? undefined
|
|
1559
2340
|
}), Effect.succeed, Effect.flatMap(request => Effect.flatMap(applyClientTransform(httpClient), httpClient => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
1560
2341
|
"200": r => HttpClientResponse.schemaBodyJson(ModelInfo)(r),
|
|
1561
2342
|
"4xx": r => decodeError(r, ErrorResponse),
|
|
1562
2343
|
orElse: response => unexpectedStatus(request, response)
|
|
1563
2344
|
}))))),
|
|
1564
2345
|
"messageBatchesList": options => HttpClientRequest.make("GET")(`/v1/messages/batches`).pipe(HttpClientRequest.setUrlParams({
|
|
1565
|
-
"before_id": options["before_id"],
|
|
1566
|
-
"after_id": options["after_id"],
|
|
1567
|
-
"limit": options["limit"]
|
|
2346
|
+
"before_id": options?.["before_id"],
|
|
2347
|
+
"after_id": options?.["after_id"],
|
|
2348
|
+
"limit": options?.["limit"]
|
|
1568
2349
|
}), HttpClientRequest.setHeaders({
|
|
1569
|
-
"anthropic-version": options["anthropic-version"] ?? undefined,
|
|
1570
|
-
"x-api-key": options["x-api-key"] ?? undefined
|
|
2350
|
+
"anthropic-version": options?.["anthropic-version"] ?? undefined,
|
|
2351
|
+
"x-api-key": options?.["x-api-key"] ?? undefined
|
|
1571
2352
|
}), Effect.succeed, Effect.flatMap(request => Effect.flatMap(applyClientTransform(httpClient), httpClient => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
1572
2353
|
"200": r => HttpClientResponse.schemaBodyJson(ListResponseMessageBatch)(r),
|
|
1573
2354
|
"4xx": r => decodeError(r, ErrorResponse),
|
|
1574
2355
|
orElse: response => unexpectedStatus(request, response)
|
|
1575
2356
|
}))))),
|
|
1576
2357
|
"messageBatchesPost": options => HttpClientRequest.make("POST")(`/v1/messages/batches`).pipe(HttpClientRequest.setHeaders({
|
|
1577
|
-
"anthropic-version": options.params["anthropic-version"] ?? undefined
|
|
2358
|
+
"anthropic-version": options.params?.["anthropic-version"] ?? undefined
|
|
1578
2359
|
}), req => Effect.orDie(HttpClientRequest.bodyJson(req, options.payload)), Effect.flatMap(request => Effect.flatMap(applyClientTransform(httpClient), httpClient => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
1579
2360
|
"200": r => HttpClientResponse.schemaBodyJson(MessageBatch)(r),
|
|
1580
2361
|
"4xx": r => decodeError(r, ErrorResponse),
|
|
1581
2362
|
orElse: response => unexpectedStatus(request, response)
|
|
1582
2363
|
}))))),
|
|
1583
2364
|
"messageBatchesRetrieve": (messageBatchId, options) => HttpClientRequest.make("GET")(`/v1/messages/batches/${messageBatchId}`).pipe(HttpClientRequest.setHeaders({
|
|
1584
|
-
"anthropic-version": options["anthropic-version"] ?? undefined,
|
|
1585
|
-
"x-api-key": options["x-api-key"] ?? undefined
|
|
2365
|
+
"anthropic-version": options?.["anthropic-version"] ?? undefined,
|
|
2366
|
+
"x-api-key": options?.["x-api-key"] ?? undefined
|
|
1586
2367
|
}), Effect.succeed, Effect.flatMap(request => Effect.flatMap(applyClientTransform(httpClient), httpClient => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
1587
2368
|
"200": r => HttpClientResponse.schemaBodyJson(MessageBatch)(r),
|
|
1588
2369
|
"4xx": r => decodeError(r, ErrorResponse),
|
|
1589
2370
|
orElse: response => unexpectedStatus(request, response)
|
|
1590
2371
|
}))))),
|
|
1591
2372
|
"messageBatchesDelete": (messageBatchId, options) => HttpClientRequest.make("DELETE")(`/v1/messages/batches/${messageBatchId}`).pipe(HttpClientRequest.setHeaders({
|
|
1592
|
-
"anthropic-version": options["anthropic-version"] ?? undefined,
|
|
1593
|
-
"x-api-key": options["x-api-key"] ?? undefined
|
|
2373
|
+
"anthropic-version": options?.["anthropic-version"] ?? undefined,
|
|
2374
|
+
"x-api-key": options?.["x-api-key"] ?? undefined
|
|
1594
2375
|
}), Effect.succeed, Effect.flatMap(request => Effect.flatMap(applyClientTransform(httpClient), httpClient => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
1595
2376
|
"200": r => HttpClientResponse.schemaBodyJson(DeleteMessageBatchResponse)(r),
|
|
1596
2377
|
"4xx": r => decodeError(r, ErrorResponse),
|
|
1597
2378
|
orElse: response => unexpectedStatus(request, response)
|
|
1598
2379
|
}))))),
|
|
1599
2380
|
"messageBatchesCancel": (messageBatchId, options) => HttpClientRequest.make("POST")(`/v1/messages/batches/${messageBatchId}/cancel`).pipe(HttpClientRequest.setHeaders({
|
|
1600
|
-
"anthropic-version": options["anthropic-version"] ?? undefined
|
|
2381
|
+
"anthropic-version": options?.["anthropic-version"] ?? undefined
|
|
1601
2382
|
}), Effect.succeed, Effect.flatMap(request => Effect.flatMap(applyClientTransform(httpClient), httpClient => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
1602
2383
|
"200": r => HttpClientResponse.schemaBodyJson(MessageBatch)(r),
|
|
1603
2384
|
"4xx": r => decodeError(r, ErrorResponse),
|
|
1604
2385
|
orElse: response => unexpectedStatus(request, response)
|
|
1605
2386
|
}))))),
|
|
1606
2387
|
"messageBatchesResults": (messageBatchId, options) => HttpClientRequest.make("GET")(`/v1/messages/batches/${messageBatchId}/results`).pipe(HttpClientRequest.setHeaders({
|
|
1607
|
-
"anthropic-version": options["anthropic-version"] ?? undefined,
|
|
1608
|
-
"x-api-key": options["x-api-key"] ?? undefined
|
|
2388
|
+
"anthropic-version": options?.["anthropic-version"] ?? undefined,
|
|
2389
|
+
"x-api-key": options?.["x-api-key"] ?? undefined
|
|
1609
2390
|
}), Effect.succeed, Effect.flatMap(request => Effect.flatMap(applyClientTransform(httpClient), httpClient => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
1610
2391
|
"4xx": r => decodeError(r, ErrorResponse),
|
|
1611
2392
|
orElse: response => unexpectedStatus(request, response)
|
|
1612
2393
|
}))))),
|
|
1613
2394
|
"messagesCountTokensPost": options => HttpClientRequest.make("POST")(`/v1/messages/count_tokens`).pipe(HttpClientRequest.setHeaders({
|
|
1614
|
-
"anthropic-version": options.params["anthropic-version"] ?? undefined
|
|
2395
|
+
"anthropic-version": options.params?.["anthropic-version"] ?? undefined
|
|
1615
2396
|
}), req => Effect.orDie(HttpClientRequest.bodyJson(req, options.payload)), Effect.flatMap(request => Effect.flatMap(applyClientTransform(httpClient), httpClient => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
1616
2397
|
"200": r => HttpClientResponse.schemaBodyJson(CountMessageTokensResponse)(r),
|
|
1617
2398
|
"4xx": r => decodeError(r, ErrorResponse),
|
|
1618
2399
|
orElse: response => unexpectedStatus(request, response)
|
|
1619
2400
|
}))))),
|
|
2401
|
+
"listFilesV1FilesGet": options => HttpClientRequest.make("GET")(`/v1/files`).pipe(HttpClientRequest.setUrlParams({
|
|
2402
|
+
"before_id": options?.["before_id"],
|
|
2403
|
+
"after_id": options?.["after_id"],
|
|
2404
|
+
"limit": options?.["limit"]
|
|
2405
|
+
}), HttpClientRequest.setHeaders({
|
|
2406
|
+
"anthropic-beta": options?.["anthropic-beta"] ?? undefined,
|
|
2407
|
+
"anthropic-version": options?.["anthropic-version"] ?? undefined,
|
|
2408
|
+
"x-api-key": options?.["x-api-key"] ?? undefined
|
|
2409
|
+
}), Effect.succeed, Effect.flatMap(request => Effect.flatMap(applyClientTransform(httpClient), httpClient => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
2410
|
+
"200": r => HttpClientResponse.schemaBodyJson(FileListResponse)(r),
|
|
2411
|
+
"4xx": r => decodeError(r, ErrorResponse),
|
|
2412
|
+
orElse: response => unexpectedStatus(request, response)
|
|
2413
|
+
}))))),
|
|
2414
|
+
"uploadFileV1FilesPost": options => HttpClientRequest.make("POST")(`/v1/files`).pipe(HttpClientRequest.setHeaders({
|
|
2415
|
+
"anthropic-beta": options.params?.["anthropic-beta"] ?? undefined,
|
|
2416
|
+
"anthropic-version": options.params?.["anthropic-version"] ?? undefined
|
|
2417
|
+
}), HttpClientRequest.bodyFormData(options.payload), Effect.succeed, Effect.flatMap(request => Effect.flatMap(applyClientTransform(httpClient), httpClient => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
2418
|
+
"200": r => HttpClientResponse.schemaBodyJson(FileMetadataSchema)(r),
|
|
2419
|
+
"4xx": r => decodeError(r, ErrorResponse),
|
|
2420
|
+
orElse: response => unexpectedStatus(request, response)
|
|
2421
|
+
}))))),
|
|
2422
|
+
"getFileMetadataV1FilesFileIdGet": (fileId, options) => HttpClientRequest.make("GET")(`/v1/files/${fileId}`).pipe(HttpClientRequest.setHeaders({
|
|
2423
|
+
"anthropic-beta": options?.["anthropic-beta"] ?? undefined,
|
|
2424
|
+
"anthropic-version": options?.["anthropic-version"] ?? undefined,
|
|
2425
|
+
"x-api-key": options?.["x-api-key"] ?? undefined
|
|
2426
|
+
}), Effect.succeed, Effect.flatMap(request => Effect.flatMap(applyClientTransform(httpClient), httpClient => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
2427
|
+
"200": r => HttpClientResponse.schemaBodyJson(FileMetadataSchema)(r),
|
|
2428
|
+
"4xx": r => decodeError(r, ErrorResponse),
|
|
2429
|
+
orElse: response => unexpectedStatus(request, response)
|
|
2430
|
+
}))))),
|
|
2431
|
+
"deleteFileV1FilesFileIdDelete": (fileId, options) => HttpClientRequest.make("DELETE")(`/v1/files/${fileId}`).pipe(HttpClientRequest.setHeaders({
|
|
2432
|
+
"anthropic-beta": options?.["anthropic-beta"] ?? undefined,
|
|
2433
|
+
"anthropic-version": options?.["anthropic-version"] ?? undefined,
|
|
2434
|
+
"x-api-key": options?.["x-api-key"] ?? undefined
|
|
2435
|
+
}), Effect.succeed, Effect.flatMap(request => Effect.flatMap(applyClientTransform(httpClient), httpClient => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
2436
|
+
"200": r => HttpClientResponse.schemaBodyJson(FileDeleteResponse)(r),
|
|
2437
|
+
"4xx": r => decodeError(r, ErrorResponse),
|
|
2438
|
+
orElse: response => unexpectedStatus(request, response)
|
|
2439
|
+
}))))),
|
|
2440
|
+
"downloadFileV1FilesFileIdContentGet": (fileId, options) => HttpClientRequest.make("GET")(`/v1/files/${fileId}/content`).pipe(HttpClientRequest.setHeaders({
|
|
2441
|
+
"anthropic-beta": options?.["anthropic-beta"] ?? undefined,
|
|
2442
|
+
"anthropic-version": options?.["anthropic-version"] ?? undefined,
|
|
2443
|
+
"x-api-key": options?.["x-api-key"] ?? undefined
|
|
2444
|
+
}), Effect.succeed, Effect.flatMap(request => Effect.flatMap(applyClientTransform(httpClient), httpClient => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
2445
|
+
orElse: response => unexpectedStatus(request, response)
|
|
2446
|
+
}))))),
|
|
1620
2447
|
"betaMessagesPost": options => HttpClientRequest.make("POST")(`/v1/messages?beta=true`).pipe(HttpClientRequest.setHeaders({
|
|
1621
|
-
"anthropic-beta": options.params["anthropic-beta"] ?? undefined,
|
|
1622
|
-
"anthropic-version": options.params["anthropic-version"] ?? undefined
|
|
2448
|
+
"anthropic-beta": options.params?.["anthropic-beta"] ?? undefined,
|
|
2449
|
+
"anthropic-version": options.params?.["anthropic-version"] ?? undefined
|
|
1623
2450
|
}), req => Effect.orDie(HttpClientRequest.bodyJson(req, options.payload)), Effect.flatMap(request => Effect.flatMap(applyClientTransform(httpClient), httpClient => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
1624
2451
|
"200": r => HttpClientResponse.schemaBodyJson(BetaMessage)(r),
|
|
1625
2452
|
"4xx": r => decodeError(r, BetaErrorResponse),
|
|
1626
2453
|
orElse: response => unexpectedStatus(request, response)
|
|
1627
2454
|
}))))),
|
|
1628
2455
|
"betaModelsList": options => HttpClientRequest.make("GET")(`/v1/models?beta=true`).pipe(HttpClientRequest.setUrlParams({
|
|
1629
|
-
"before_id": options["before_id"],
|
|
1630
|
-
"after_id": options["after_id"],
|
|
1631
|
-
"limit": options["limit"]
|
|
2456
|
+
"before_id": options?.["before_id"],
|
|
2457
|
+
"after_id": options?.["after_id"],
|
|
2458
|
+
"limit": options?.["limit"]
|
|
1632
2459
|
}), HttpClientRequest.setHeaders({
|
|
1633
|
-
"anthropic-version": options["anthropic-version"] ?? undefined,
|
|
1634
|
-
"x-api-key": options["x-api-key"] ?? undefined
|
|
2460
|
+
"anthropic-version": options?.["anthropic-version"] ?? undefined,
|
|
2461
|
+
"x-api-key": options?.["x-api-key"] ?? undefined,
|
|
2462
|
+
"anthropic-beta": options?.["anthropic-beta"] ?? undefined
|
|
1635
2463
|
}), Effect.succeed, Effect.flatMap(request => Effect.flatMap(applyClientTransform(httpClient), httpClient => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
1636
2464
|
"200": r => HttpClientResponse.schemaBodyJson(BetaListResponseModelInfo)(r),
|
|
1637
2465
|
"4xx": r => decodeError(r, BetaErrorResponse),
|
|
1638
2466
|
orElse: response => unexpectedStatus(request, response)
|
|
1639
2467
|
}))))),
|
|
1640
2468
|
"betaModelsGet": (modelId, options) => HttpClientRequest.make("GET")(`/v1/models/${modelId}?beta=true`).pipe(HttpClientRequest.setHeaders({
|
|
1641
|
-
"anthropic-version": options["anthropic-version"] ?? undefined,
|
|
1642
|
-
"x-api-key": options["x-api-key"] ?? undefined
|
|
2469
|
+
"anthropic-version": options?.["anthropic-version"] ?? undefined,
|
|
2470
|
+
"x-api-key": options?.["x-api-key"] ?? undefined,
|
|
2471
|
+
"anthropic-beta": options?.["anthropic-beta"] ?? undefined
|
|
1643
2472
|
}), Effect.succeed, Effect.flatMap(request => Effect.flatMap(applyClientTransform(httpClient), httpClient => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
1644
2473
|
"200": r => HttpClientResponse.schemaBodyJson(BetaModelInfo)(r),
|
|
1645
2474
|
"4xx": r => decodeError(r, BetaErrorResponse),
|
|
1646
2475
|
orElse: response => unexpectedStatus(request, response)
|
|
1647
2476
|
}))))),
|
|
1648
2477
|
"betaMessageBatchesList": options => HttpClientRequest.make("GET")(`/v1/messages/batches?beta=true`).pipe(HttpClientRequest.setUrlParams({
|
|
1649
|
-
"before_id": options["before_id"],
|
|
1650
|
-
"after_id": options["after_id"],
|
|
1651
|
-
"limit": options["limit"]
|
|
2478
|
+
"before_id": options?.["before_id"],
|
|
2479
|
+
"after_id": options?.["after_id"],
|
|
2480
|
+
"limit": options?.["limit"]
|
|
1652
2481
|
}), HttpClientRequest.setHeaders({
|
|
1653
|
-
"anthropic-beta": options["anthropic-beta"] ?? undefined,
|
|
1654
|
-
"anthropic-version": options["anthropic-version"] ?? undefined,
|
|
1655
|
-
"x-api-key": options["x-api-key"] ?? undefined
|
|
2482
|
+
"anthropic-beta": options?.["anthropic-beta"] ?? undefined,
|
|
2483
|
+
"anthropic-version": options?.["anthropic-version"] ?? undefined,
|
|
2484
|
+
"x-api-key": options?.["x-api-key"] ?? undefined
|
|
1656
2485
|
}), Effect.succeed, Effect.flatMap(request => Effect.flatMap(applyClientTransform(httpClient), httpClient => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
1657
2486
|
"200": r => HttpClientResponse.schemaBodyJson(BetaListResponseMessageBatch)(r),
|
|
1658
2487
|
"4xx": r => decodeError(r, BetaErrorResponse),
|
|
1659
2488
|
orElse: response => unexpectedStatus(request, response)
|
|
1660
2489
|
}))))),
|
|
1661
2490
|
"betaMessageBatchesPost": options => HttpClientRequest.make("POST")(`/v1/messages/batches?beta=true`).pipe(HttpClientRequest.setHeaders({
|
|
1662
|
-
"anthropic-beta": options.params["anthropic-beta"] ?? undefined,
|
|
1663
|
-
"anthropic-version": options.params["anthropic-version"] ?? undefined
|
|
2491
|
+
"anthropic-beta": options.params?.["anthropic-beta"] ?? undefined,
|
|
2492
|
+
"anthropic-version": options.params?.["anthropic-version"] ?? undefined
|
|
1664
2493
|
}), req => Effect.orDie(HttpClientRequest.bodyJson(req, options.payload)), Effect.flatMap(request => Effect.flatMap(applyClientTransform(httpClient), httpClient => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
1665
2494
|
"200": r => HttpClientResponse.schemaBodyJson(BetaMessageBatch)(r),
|
|
1666
2495
|
"4xx": r => decodeError(r, BetaErrorResponse),
|
|
1667
2496
|
orElse: response => unexpectedStatus(request, response)
|
|
1668
2497
|
}))))),
|
|
1669
2498
|
"betaMessageBatchesRetrieve": (messageBatchId, options) => HttpClientRequest.make("GET")(`/v1/messages/batches/${messageBatchId}?beta=true`).pipe(HttpClientRequest.setHeaders({
|
|
1670
|
-
"anthropic-beta": options["anthropic-beta"] ?? undefined,
|
|
1671
|
-
"anthropic-version": options["anthropic-version"] ?? undefined,
|
|
1672
|
-
"x-api-key": options["x-api-key"] ?? undefined
|
|
2499
|
+
"anthropic-beta": options?.["anthropic-beta"] ?? undefined,
|
|
2500
|
+
"anthropic-version": options?.["anthropic-version"] ?? undefined,
|
|
2501
|
+
"x-api-key": options?.["x-api-key"] ?? undefined
|
|
1673
2502
|
}), Effect.succeed, Effect.flatMap(request => Effect.flatMap(applyClientTransform(httpClient), httpClient => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
1674
2503
|
"200": r => HttpClientResponse.schemaBodyJson(BetaMessageBatch)(r),
|
|
1675
2504
|
"4xx": r => decodeError(r, BetaErrorResponse),
|
|
1676
2505
|
orElse: response => unexpectedStatus(request, response)
|
|
1677
2506
|
}))))),
|
|
1678
2507
|
"betaMessageBatchesDelete": (messageBatchId, options) => HttpClientRequest.make("DELETE")(`/v1/messages/batches/${messageBatchId}?beta=true`).pipe(HttpClientRequest.setHeaders({
|
|
1679
|
-
"anthropic-beta": options["anthropic-beta"] ?? undefined,
|
|
1680
|
-
"anthropic-version": options["anthropic-version"] ?? undefined,
|
|
1681
|
-
"x-api-key": options["x-api-key"] ?? undefined
|
|
2508
|
+
"anthropic-beta": options?.["anthropic-beta"] ?? undefined,
|
|
2509
|
+
"anthropic-version": options?.["anthropic-version"] ?? undefined,
|
|
2510
|
+
"x-api-key": options?.["x-api-key"] ?? undefined
|
|
1682
2511
|
}), Effect.succeed, Effect.flatMap(request => Effect.flatMap(applyClientTransform(httpClient), httpClient => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
1683
2512
|
"200": r => HttpClientResponse.schemaBodyJson(BetaDeleteMessageBatchResponse)(r),
|
|
1684
2513
|
"4xx": r => decodeError(r, BetaErrorResponse),
|
|
1685
2514
|
orElse: response => unexpectedStatus(request, response)
|
|
1686
2515
|
}))))),
|
|
1687
2516
|
"betaMessageBatchesCancel": (messageBatchId, options) => HttpClientRequest.make("POST")(`/v1/messages/batches/${messageBatchId}/cancel?beta=true`).pipe(HttpClientRequest.setHeaders({
|
|
1688
|
-
"anthropic-beta": options["anthropic-beta"] ?? undefined,
|
|
1689
|
-
"anthropic-version": options["anthropic-version"] ?? undefined
|
|
2517
|
+
"anthropic-beta": options?.["anthropic-beta"] ?? undefined,
|
|
2518
|
+
"anthropic-version": options?.["anthropic-version"] ?? undefined
|
|
1690
2519
|
}), Effect.succeed, Effect.flatMap(request => Effect.flatMap(applyClientTransform(httpClient), httpClient => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
1691
2520
|
"200": r => HttpClientResponse.schemaBodyJson(BetaMessageBatch)(r),
|
|
1692
2521
|
"4xx": r => decodeError(r, BetaErrorResponse),
|
|
1693
2522
|
orElse: response => unexpectedStatus(request, response)
|
|
1694
2523
|
}))))),
|
|
1695
2524
|
"betaMessageBatchesResults": (messageBatchId, options) => HttpClientRequest.make("GET")(`/v1/messages/batches/${messageBatchId}/results?beta=true`).pipe(HttpClientRequest.setHeaders({
|
|
1696
|
-
"anthropic-beta": options["anthropic-beta"] ?? undefined,
|
|
1697
|
-
"anthropic-version": options["anthropic-version"] ?? undefined,
|
|
1698
|
-
"x-api-key": options["x-api-key"] ?? undefined
|
|
2525
|
+
"anthropic-beta": options?.["anthropic-beta"] ?? undefined,
|
|
2526
|
+
"anthropic-version": options?.["anthropic-version"] ?? undefined,
|
|
2527
|
+
"x-api-key": options?.["x-api-key"] ?? undefined
|
|
1699
2528
|
}), Effect.succeed, Effect.flatMap(request => Effect.flatMap(applyClientTransform(httpClient), httpClient => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
1700
2529
|
"4xx": r => decodeError(r, BetaErrorResponse),
|
|
1701
2530
|
orElse: response => unexpectedStatus(request, response)
|
|
1702
2531
|
}))))),
|
|
1703
2532
|
"betaMessagesCountTokensPost": options => HttpClientRequest.make("POST")(`/v1/messages/count_tokens?beta=true`).pipe(HttpClientRequest.setHeaders({
|
|
1704
|
-
"anthropic-beta": options.params["anthropic-beta"] ?? undefined,
|
|
1705
|
-
"anthropic-version": options.params["anthropic-version"] ?? undefined
|
|
2533
|
+
"anthropic-beta": options.params?.["anthropic-beta"] ?? undefined,
|
|
2534
|
+
"anthropic-version": options.params?.["anthropic-version"] ?? undefined
|
|
1706
2535
|
}), req => Effect.orDie(HttpClientRequest.bodyJson(req, options.payload)), Effect.flatMap(request => Effect.flatMap(applyClientTransform(httpClient), httpClient => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
1707
2536
|
"200": r => HttpClientResponse.schemaBodyJson(BetaCountMessageTokensResponse)(r),
|
|
1708
2537
|
"4xx": r => decodeError(r, BetaErrorResponse),
|
|
1709
2538
|
orElse: response => unexpectedStatus(request, response)
|
|
2539
|
+
}))))),
|
|
2540
|
+
"betaListFilesV1FilesGet": options => HttpClientRequest.make("GET")(`/v1/files?beta=true`).pipe(HttpClientRequest.setUrlParams({
|
|
2541
|
+
"before_id": options?.["before_id"],
|
|
2542
|
+
"after_id": options?.["after_id"],
|
|
2543
|
+
"limit": options?.["limit"]
|
|
2544
|
+
}), HttpClientRequest.setHeaders({
|
|
2545
|
+
"anthropic-beta": options?.["anthropic-beta"] ?? undefined,
|
|
2546
|
+
"anthropic-version": options?.["anthropic-version"] ?? undefined,
|
|
2547
|
+
"x-api-key": options?.["x-api-key"] ?? undefined
|
|
2548
|
+
}), Effect.succeed, Effect.flatMap(request => Effect.flatMap(applyClientTransform(httpClient), httpClient => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
2549
|
+
"200": r => HttpClientResponse.schemaBodyJson(BetaFileListResponse)(r),
|
|
2550
|
+
"4xx": r => decodeError(r, BetaErrorResponse),
|
|
2551
|
+
orElse: response => unexpectedStatus(request, response)
|
|
2552
|
+
}))))),
|
|
2553
|
+
"betaUploadFileV1FilesPost": options => HttpClientRequest.make("POST")(`/v1/files?beta=true`).pipe(HttpClientRequest.setHeaders({
|
|
2554
|
+
"anthropic-beta": options.params?.["anthropic-beta"] ?? undefined,
|
|
2555
|
+
"anthropic-version": options.params?.["anthropic-version"] ?? undefined
|
|
2556
|
+
}), HttpClientRequest.bodyFormData(options.payload), Effect.succeed, Effect.flatMap(request => Effect.flatMap(applyClientTransform(httpClient), httpClient => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
2557
|
+
"200": r => HttpClientResponse.schemaBodyJson(BetaFileMetadataSchema)(r),
|
|
2558
|
+
"4xx": r => decodeError(r, BetaErrorResponse),
|
|
2559
|
+
orElse: response => unexpectedStatus(request, response)
|
|
2560
|
+
}))))),
|
|
2561
|
+
"betaGetFileMetadataV1FilesFileIdGet": (fileId, options) => HttpClientRequest.make("GET")(`/v1/files/${fileId}?beta=true`).pipe(HttpClientRequest.setHeaders({
|
|
2562
|
+
"anthropic-beta": options?.["anthropic-beta"] ?? undefined,
|
|
2563
|
+
"anthropic-version": options?.["anthropic-version"] ?? undefined,
|
|
2564
|
+
"x-api-key": options?.["x-api-key"] ?? undefined
|
|
2565
|
+
}), Effect.succeed, Effect.flatMap(request => Effect.flatMap(applyClientTransform(httpClient), httpClient => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
2566
|
+
"200": r => HttpClientResponse.schemaBodyJson(BetaFileMetadataSchema)(r),
|
|
2567
|
+
"4xx": r => decodeError(r, BetaErrorResponse),
|
|
2568
|
+
orElse: response => unexpectedStatus(request, response)
|
|
2569
|
+
}))))),
|
|
2570
|
+
"betaDeleteFileV1FilesFileIdDelete": (fileId, options) => HttpClientRequest.make("DELETE")(`/v1/files/${fileId}?beta=true`).pipe(HttpClientRequest.setHeaders({
|
|
2571
|
+
"anthropic-beta": options?.["anthropic-beta"] ?? undefined,
|
|
2572
|
+
"anthropic-version": options?.["anthropic-version"] ?? undefined,
|
|
2573
|
+
"x-api-key": options?.["x-api-key"] ?? undefined
|
|
2574
|
+
}), Effect.succeed, Effect.flatMap(request => Effect.flatMap(applyClientTransform(httpClient), httpClient => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
2575
|
+
"200": r => HttpClientResponse.schemaBodyJson(BetaFileDeleteResponse)(r),
|
|
2576
|
+
"4xx": r => decodeError(r, BetaErrorResponse),
|
|
2577
|
+
orElse: response => unexpectedStatus(request, response)
|
|
2578
|
+
}))))),
|
|
2579
|
+
"betaDownloadFileV1FilesFileIdContentGet": (fileId, options) => HttpClientRequest.make("GET")(`/v1/files/${fileId}/content?beta=true`).pipe(HttpClientRequest.setHeaders({
|
|
2580
|
+
"anthropic-beta": options?.["anthropic-beta"] ?? undefined,
|
|
2581
|
+
"anthropic-version": options?.["anthropic-version"] ?? undefined,
|
|
2582
|
+
"x-api-key": options?.["x-api-key"] ?? undefined
|
|
2583
|
+
}), Effect.succeed, Effect.flatMap(request => Effect.flatMap(applyClientTransform(httpClient), httpClient => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
2584
|
+
orElse: response => unexpectedStatus(request, response)
|
|
1710
2585
|
})))))
|
|
1711
2586
|
};
|
|
1712
2587
|
};
|