@openrouter/sdk 1.5.48 → 1.5.50
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/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/alignmentresponsesrejected.d.ts +2 -1
- package/esm/models/alignmentresponsesrejected.js +2 -0
- package/esm/models/compactiontriggeritem.d.ts +22 -0
- package/esm/models/compactiontriggeritem.js +18 -0
- package/esm/models/index.d.ts +3 -0
- package/esm/models/index.js +3 -0
- package/esm/models/inputsunion.d.ts +5 -4
- package/esm/models/inputsunion.js +3 -0
- package/esm/models/outputcompactionitem.d.ts +16 -0
- package/esm/models/outputcompactionitem.js +23 -0
- package/esm/models/outputitemcompaction.d.ts +13 -0
- package/esm/models/outputitemcompaction.js +23 -0
- package/esm/models/outputitems.d.ts +2 -1
- package/esm/models/outputitems.js +2 -0
- package/esm/models/workspacemember.d.ts +5 -3
- package/esm/models/workspacemember.js +3 -1
- package/jsr.json +1 -1
- package/package.json +5 -5
package/esm/lib/config.d.ts
CHANGED
|
@@ -50,8 +50,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
|
|
|
50
50
|
export declare const SDK_METADATA: {
|
|
51
51
|
readonly language: "typescript";
|
|
52
52
|
readonly openapiDocVersion: "1.0.0";
|
|
53
|
-
readonly sdkVersion: "1.5.
|
|
53
|
+
readonly sdkVersion: "1.5.50";
|
|
54
54
|
readonly genVersion: "2.950.13";
|
|
55
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.5.
|
|
55
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.5.50 2.950.13 1.0.0 @openrouter/sdk";
|
|
56
56
|
};
|
|
57
57
|
//# sourceMappingURL=config.d.ts.map
|
package/esm/lib/config.js
CHANGED
|
@@ -29,8 +29,8 @@ export function serverURLFromOptions(options) {
|
|
|
29
29
|
export const SDK_METADATA = {
|
|
30
30
|
language: "typescript",
|
|
31
31
|
openapiDocVersion: "1.0.0",
|
|
32
|
-
sdkVersion: "1.5.
|
|
32
|
+
sdkVersion: "1.5.50",
|
|
33
33
|
genVersion: "2.950.13",
|
|
34
|
-
userAgent: "speakeasy-sdk/typescript 1.5.
|
|
34
|
+
userAgent: "speakeasy-sdk/typescript 1.5.50 2.950.13 1.0.0 @openrouter/sdk",
|
|
35
35
|
};
|
|
36
36
|
//# sourceMappingURL=config.js.map
|
|
@@ -4,6 +4,7 @@ import { Result as SafeParseResult } from "../types/fp.js";
|
|
|
4
4
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
5
|
import { OutputItemApplyPatchCall } from "./outputitemapplypatchcall.js";
|
|
6
6
|
import { OutputItemCodeInterpreterCall } from "./outputitemcodeinterpretercall.js";
|
|
7
|
+
import { OutputItemCompaction } from "./outputitemcompaction.js";
|
|
7
8
|
import { OutputItemCustomToolCall } from "./outputitemcustomtoolcall.js";
|
|
8
9
|
import { OutputItemFileSearchCall } from "./outputitemfilesearchcall.js";
|
|
9
10
|
import { OutputItemFunctionCall } from "./outputitemfunctioncall.js";
|
|
@@ -11,7 +12,7 @@ import { OutputItemImageGenerationCall } from "./outputitemimagegenerationcall.j
|
|
|
11
12
|
import { OutputItemReasoning } from "./outputitemreasoning.js";
|
|
12
13
|
import { OutputItemWebSearchCall } from "./outputitemwebsearchcall.js";
|
|
13
14
|
import { OutputMessage } from "./outputmessage.js";
|
|
14
|
-
export type AlignmentResponsesRejected = OutputItemApplyPatchCall | OutputItemCodeInterpreterCall | OutputItemCustomToolCall | OutputItemFileSearchCall | OutputItemFunctionCall | OutputItemImageGenerationCall | OutputMessage | OutputItemReasoning | OutputItemWebSearchCall | discriminatedUnionTypes.Unknown<"type">;
|
|
15
|
+
export type AlignmentResponsesRejected = OutputItemApplyPatchCall | OutputItemCodeInterpreterCall | OutputItemCompaction | OutputItemCustomToolCall | OutputItemFileSearchCall | OutputItemFunctionCall | OutputItemImageGenerationCall | OutputMessage | OutputItemReasoning | OutputItemWebSearchCall | discriminatedUnionTypes.Unknown<"type">;
|
|
15
16
|
/** @internal */
|
|
16
17
|
export declare const AlignmentResponsesRejected$inboundSchema: z.ZodType<AlignmentResponsesRejected, unknown>;
|
|
17
18
|
export declare function alignmentResponsesRejectedFromJSON(jsonString: string): SafeParseResult<AlignmentResponsesRejected, SDKValidationError>;
|
|
@@ -6,6 +6,7 @@ import { safeParse } from "../lib/schemas.js";
|
|
|
6
6
|
import { discriminatedUnion } from "../types/discriminatedUnion.js";
|
|
7
7
|
import { OutputItemApplyPatchCall$inboundSchema, } from "./outputitemapplypatchcall.js";
|
|
8
8
|
import { OutputItemCodeInterpreterCall$inboundSchema, } from "./outputitemcodeinterpretercall.js";
|
|
9
|
+
import { OutputItemCompaction$inboundSchema, } from "./outputitemcompaction.js";
|
|
9
10
|
import { OutputItemCustomToolCall$inboundSchema, } from "./outputitemcustomtoolcall.js";
|
|
10
11
|
import { OutputItemFileSearchCall$inboundSchema, } from "./outputitemfilesearchcall.js";
|
|
11
12
|
import { OutputItemFunctionCall$inboundSchema, } from "./outputitemfunctioncall.js";
|
|
@@ -17,6 +18,7 @@ import { OutputMessage$inboundSchema } from "./outputmessage.js";
|
|
|
17
18
|
export const AlignmentResponsesRejected$inboundSchema = discriminatedUnion("type", {
|
|
18
19
|
apply_patch_call: OutputItemApplyPatchCall$inboundSchema,
|
|
19
20
|
code_interpreter_call: OutputItemCodeInterpreterCall$inboundSchema,
|
|
21
|
+
compaction: OutputItemCompaction$inboundSchema,
|
|
20
22
|
custom_tool_call: OutputItemCustomToolCall$inboundSchema,
|
|
21
23
|
file_search_call: OutputItemFileSearchCall$inboundSchema,
|
|
22
24
|
function_call: OutputItemFunctionCall$inboundSchema,
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
3
|
+
export declare const CompactionTriggerItemType: {
|
|
4
|
+
readonly CompactionTrigger: "compaction_trigger";
|
|
5
|
+
};
|
|
6
|
+
export type CompactionTriggerItemType = ClosedEnum<typeof CompactionTriggerItemType>;
|
|
7
|
+
/**
|
|
8
|
+
* Asks the model to compact the preceding input into a compaction item
|
|
9
|
+
*/
|
|
10
|
+
export type CompactionTriggerItem = {
|
|
11
|
+
type: CompactionTriggerItemType;
|
|
12
|
+
};
|
|
13
|
+
/** @internal */
|
|
14
|
+
export declare const CompactionTriggerItemType$outboundSchema: z.ZodEnum<typeof CompactionTriggerItemType>;
|
|
15
|
+
/** @internal */
|
|
16
|
+
export type CompactionTriggerItem$Outbound = {
|
|
17
|
+
type: string;
|
|
18
|
+
};
|
|
19
|
+
/** @internal */
|
|
20
|
+
export declare const CompactionTriggerItem$outboundSchema: z.ZodType<CompactionTriggerItem$Outbound, CompactionTriggerItem>;
|
|
21
|
+
export declare function compactionTriggerItemToJSON(compactionTriggerItem: CompactionTriggerItem): string;
|
|
22
|
+
//# sourceMappingURL=compactiontriggeritem.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: c37e3c7c4bf6
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
export const CompactionTriggerItemType = {
|
|
7
|
+
CompactionTrigger: "compaction_trigger",
|
|
8
|
+
};
|
|
9
|
+
/** @internal */
|
|
10
|
+
export const CompactionTriggerItemType$outboundSchema = z.enum(CompactionTriggerItemType);
|
|
11
|
+
/** @internal */
|
|
12
|
+
export const CompactionTriggerItem$outboundSchema = z.object({
|
|
13
|
+
type: CompactionTriggerItemType$outboundSchema,
|
|
14
|
+
});
|
|
15
|
+
export function compactionTriggerItemToJSON(compactionTriggerItem) {
|
|
16
|
+
return JSON.stringify(CompactionTriggerItem$outboundSchema.parse(compactionTriggerItem));
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=compactiontriggeritem.js.map
|
package/esm/models/index.d.ts
CHANGED
|
@@ -244,6 +244,7 @@ export * from "./codeinterpreterlogsoutput.js";
|
|
|
244
244
|
export * from "./codeinterpreterservertool.js";
|
|
245
245
|
export * from "./codexlocalshelltool.js";
|
|
246
246
|
export * from "./compactionitem.js";
|
|
247
|
+
export * from "./compactiontriggeritem.js";
|
|
247
248
|
export * from "./compoundfilter.js";
|
|
248
249
|
export * from "./computeruseservertool.js";
|
|
249
250
|
export * from "./configurationupdate.js";
|
|
@@ -588,6 +589,7 @@ export * from "./outputbashservertoolitem.js";
|
|
|
588
589
|
export * from "./outputbrowseruseservertoolitem.js";
|
|
589
590
|
export * from "./outputcodeinterpretercallitem.js";
|
|
590
591
|
export * from "./outputcodeinterpreterservertoolitem.js";
|
|
592
|
+
export * from "./outputcompactionitem.js";
|
|
591
593
|
export * from "./outputcomputercallitem.js";
|
|
592
594
|
export * from "./outputcustomtoolcallitem.js";
|
|
593
595
|
export * from "./outputdatetimeitem.js";
|
|
@@ -600,6 +602,7 @@ export * from "./outputimagegenerationcallitem.js";
|
|
|
600
602
|
export * from "./outputimagegenerationservertoolitem.js";
|
|
601
603
|
export * from "./outputitemapplypatchcall.js";
|
|
602
604
|
export * from "./outputitemcodeinterpretercall.js";
|
|
605
|
+
export * from "./outputitemcompaction.js";
|
|
603
606
|
export * from "./outputitemcustomtoolcall.js";
|
|
604
607
|
export * from "./outputitemfilesearchcall.js";
|
|
605
608
|
export * from "./outputitemfunctioncall.js";
|
package/esm/models/index.js
CHANGED
|
@@ -248,6 +248,7 @@ export * from "./codeinterpreterlogsoutput.js";
|
|
|
248
248
|
export * from "./codeinterpreterservertool.js";
|
|
249
249
|
export * from "./codexlocalshelltool.js";
|
|
250
250
|
export * from "./compactionitem.js";
|
|
251
|
+
export * from "./compactiontriggeritem.js";
|
|
251
252
|
export * from "./compoundfilter.js";
|
|
252
253
|
export * from "./computeruseservertool.js";
|
|
253
254
|
export * from "./configurationupdate.js";
|
|
@@ -592,6 +593,7 @@ export * from "./outputbashservertoolitem.js";
|
|
|
592
593
|
export * from "./outputbrowseruseservertoolitem.js";
|
|
593
594
|
export * from "./outputcodeinterpretercallitem.js";
|
|
594
595
|
export * from "./outputcodeinterpreterservertoolitem.js";
|
|
596
|
+
export * from "./outputcompactionitem.js";
|
|
595
597
|
export * from "./outputcomputercallitem.js";
|
|
596
598
|
export * from "./outputcustomtoolcallitem.js";
|
|
597
599
|
export * from "./outputdatetimeitem.js";
|
|
@@ -604,6 +606,7 @@ export * from "./outputimagegenerationcallitem.js";
|
|
|
604
606
|
export * from "./outputimagegenerationservertoolitem.js";
|
|
605
607
|
export * from "./outputitemapplypatchcall.js";
|
|
606
608
|
export * from "./outputitemcodeinterpretercall.js";
|
|
609
|
+
export * from "./outputitemcompaction.js";
|
|
607
610
|
export * from "./outputitemcustomtoolcall.js";
|
|
608
611
|
export * from "./outputitemfilesearchcall.js";
|
|
609
612
|
export * from "./outputitemfunctioncall.js";
|
|
@@ -5,6 +5,7 @@ import { AgentMessageItem, AgentMessageItem$Outbound } from "./agentmessageitem.
|
|
|
5
5
|
import { ApplyPatchCallItem, ApplyPatchCallItem$Outbound } from "./applypatchcallitem.js";
|
|
6
6
|
import { ApplyPatchCallOutputItem, ApplyPatchCallOutputItem$Outbound } from "./applypatchcalloutputitem.js";
|
|
7
7
|
import { CompactionItem, CompactionItem$Outbound } from "./compactionitem.js";
|
|
8
|
+
import { CompactionTriggerItem, CompactionTriggerItem$Outbound } from "./compactiontriggeritem.js";
|
|
8
9
|
import { ConfigurationUpdateItem, ConfigurationUpdateItem$Outbound } from "./configurationupdateitem.js";
|
|
9
10
|
import { ContextCompactionItem, ContextCompactionItem$Outbound } from "./contextcompactionitem.js";
|
|
10
11
|
import { CustomToolCallItem, CustomToolCallItem$Outbound } from "./customtoolcallitem.js";
|
|
@@ -137,11 +138,11 @@ export type InputsMessage = {
|
|
|
137
138
|
status?: InputsStatusCompleted1 | InputsStatusIncomplete1 | InputsStatusInProgress1 | undefined;
|
|
138
139
|
type?: InputsTypeMessage | undefined;
|
|
139
140
|
};
|
|
140
|
-
export type InputsUnion1 = OutputArmorBlockedItem | LocalShellCallItem | McpApprovalRequestItem | McpCallItem | FunctionCallItem | ApplyPatchCallItem | OutputFileSearchCallItem | OutputComputerCallItem | OutputDatetimeItem | McpListToolsItem | CustomToolCallItem | AgentMessageItem | ToolSearchOutputItem | ReasoningItem | FunctionCallOutputItem | ApplyPatchCallOutputItem | InputsMessage | InputsReasoning | OutputWebSearchCallItem | OutputImageGenerationCallItem | OutputCodeInterpreterCallItem | LocalShellCallOutputItem | ShellCallItem | ShellCallOutputItem | McpApprovalResponseItem | CustomToolCallOutputItem | AdditionalToolsItem | ToolSearchCallItem | OutputWebSearchServerToolItem | OutputCodeInterpreterServerToolItem | OutputFileSearchServerToolItem | OutputImageGenerationServerToolItem | OutputBrowserUseServerToolItem | OutputBashServerToolItem | OutputTextEditorServerToolItem | OutputApplyPatchServerToolItem | OutputWebFetchServerToolItem | OutputToolSearchServerToolItem | OutputMemoryServerToolItem | OutputMcpServerToolItem | OutputSearchModelsServerToolItem | OutputFusionServerToolItem | OutputAdvisorServerToolItem | OutputSubagentServerToolItem | OutputFilesServerToolItem | OutputShellServerToolItem | CompactionItem | ItemReferenceItem | ConfigurationUpdateItem | EasyInputMessage | InputMessageItem | ContextCompactionItem;
|
|
141
|
+
export type InputsUnion1 = OutputArmorBlockedItem | LocalShellCallItem | McpApprovalRequestItem | McpCallItem | FunctionCallItem | ApplyPatchCallItem | OutputFileSearchCallItem | OutputComputerCallItem | OutputDatetimeItem | McpListToolsItem | CustomToolCallItem | AgentMessageItem | ToolSearchOutputItem | ReasoningItem | FunctionCallOutputItem | ApplyPatchCallOutputItem | InputsMessage | InputsReasoning | OutputWebSearchCallItem | OutputImageGenerationCallItem | OutputCodeInterpreterCallItem | LocalShellCallOutputItem | ShellCallItem | ShellCallOutputItem | McpApprovalResponseItem | CustomToolCallOutputItem | AdditionalToolsItem | ToolSearchCallItem | OutputWebSearchServerToolItem | OutputCodeInterpreterServerToolItem | OutputFileSearchServerToolItem | OutputImageGenerationServerToolItem | OutputBrowserUseServerToolItem | OutputBashServerToolItem | OutputTextEditorServerToolItem | OutputApplyPatchServerToolItem | OutputWebFetchServerToolItem | OutputToolSearchServerToolItem | OutputMemoryServerToolItem | OutputMcpServerToolItem | OutputSearchModelsServerToolItem | OutputFusionServerToolItem | OutputAdvisorServerToolItem | OutputSubagentServerToolItem | OutputFilesServerToolItem | OutputShellServerToolItem | CompactionItem | ItemReferenceItem | ConfigurationUpdateItem | EasyInputMessage | InputMessageItem | CompactionTriggerItem | ContextCompactionItem;
|
|
141
142
|
/**
|
|
142
143
|
* Input for a response request - can be a string or array of items
|
|
143
144
|
*/
|
|
144
|
-
export type InputsUnion = string | Array<OutputArmorBlockedItem | LocalShellCallItem | McpApprovalRequestItem | McpCallItem | FunctionCallItem | ApplyPatchCallItem | OutputFileSearchCallItem | OutputComputerCallItem | OutputDatetimeItem | McpListToolsItem | CustomToolCallItem | AgentMessageItem | ToolSearchOutputItem | ReasoningItem | FunctionCallOutputItem | ApplyPatchCallOutputItem | InputsMessage | InputsReasoning | OutputWebSearchCallItem | OutputImageGenerationCallItem | OutputCodeInterpreterCallItem | LocalShellCallOutputItem | ShellCallItem | ShellCallOutputItem | McpApprovalResponseItem | CustomToolCallOutputItem | AdditionalToolsItem | ToolSearchCallItem | OutputWebSearchServerToolItem | OutputCodeInterpreterServerToolItem | OutputFileSearchServerToolItem | OutputImageGenerationServerToolItem | OutputBrowserUseServerToolItem | OutputBashServerToolItem | OutputTextEditorServerToolItem | OutputApplyPatchServerToolItem | OutputWebFetchServerToolItem | OutputToolSearchServerToolItem | OutputMemoryServerToolItem | OutputMcpServerToolItem | OutputSearchModelsServerToolItem | OutputFusionServerToolItem | OutputAdvisorServerToolItem | OutputSubagentServerToolItem | OutputFilesServerToolItem | OutputShellServerToolItem | CompactionItem | ItemReferenceItem | ConfigurationUpdateItem | EasyInputMessage | InputMessageItem | ContextCompactionItem>;
|
|
145
|
+
export type InputsUnion = string | Array<OutputArmorBlockedItem | LocalShellCallItem | McpApprovalRequestItem | McpCallItem | FunctionCallItem | ApplyPatchCallItem | OutputFileSearchCallItem | OutputComputerCallItem | OutputDatetimeItem | McpListToolsItem | CustomToolCallItem | AgentMessageItem | ToolSearchOutputItem | ReasoningItem | FunctionCallOutputItem | ApplyPatchCallOutputItem | InputsMessage | InputsReasoning | OutputWebSearchCallItem | OutputImageGenerationCallItem | OutputCodeInterpreterCallItem | LocalShellCallOutputItem | ShellCallItem | ShellCallOutputItem | McpApprovalResponseItem | CustomToolCallOutputItem | AdditionalToolsItem | ToolSearchCallItem | OutputWebSearchServerToolItem | OutputCodeInterpreterServerToolItem | OutputFileSearchServerToolItem | OutputImageGenerationServerToolItem | OutputBrowserUseServerToolItem | OutputBashServerToolItem | OutputTextEditorServerToolItem | OutputApplyPatchServerToolItem | OutputWebFetchServerToolItem | OutputToolSearchServerToolItem | OutputMemoryServerToolItem | OutputMcpServerToolItem | OutputSearchModelsServerToolItem | OutputFusionServerToolItem | OutputAdvisorServerToolItem | OutputSubagentServerToolItem | OutputFilesServerToolItem | OutputShellServerToolItem | CompactionItem | ItemReferenceItem | ConfigurationUpdateItem | EasyInputMessage | InputMessageItem | CompactionTriggerItem | ContextCompactionItem>;
|
|
145
146
|
/** @internal */
|
|
146
147
|
export declare const InputsStatusInProgress2$outboundSchema: z.ZodEnum<typeof InputsStatusInProgress2>;
|
|
147
148
|
/** @internal */
|
|
@@ -216,12 +217,12 @@ export type InputsMessage$Outbound = {
|
|
|
216
217
|
export declare const InputsMessage$outboundSchema: z.ZodType<InputsMessage$Outbound, InputsMessage>;
|
|
217
218
|
export declare function inputsMessageToJSON(inputsMessage: InputsMessage): string;
|
|
218
219
|
/** @internal */
|
|
219
|
-
export type InputsUnion1$Outbound = OutputArmorBlockedItem$Outbound | LocalShellCallItem$Outbound | McpApprovalRequestItem$Outbound | McpCallItem$Outbound | FunctionCallItem$Outbound | ApplyPatchCallItem$Outbound | OutputFileSearchCallItem$Outbound | OutputComputerCallItem$Outbound | OutputDatetimeItem$Outbound | McpListToolsItem$Outbound | CustomToolCallItem$Outbound | AgentMessageItem$Outbound | ToolSearchOutputItem$Outbound | ReasoningItem$Outbound | FunctionCallOutputItem$Outbound | ApplyPatchCallOutputItem$Outbound | InputsMessage$Outbound | InputsReasoning$Outbound | OutputWebSearchCallItem$Outbound | OutputImageGenerationCallItem$Outbound | OutputCodeInterpreterCallItem$Outbound | LocalShellCallOutputItem$Outbound | ShellCallItem$Outbound | ShellCallOutputItem$Outbound | McpApprovalResponseItem$Outbound | CustomToolCallOutputItem$Outbound | AdditionalToolsItem$Outbound | ToolSearchCallItem$Outbound | OutputWebSearchServerToolItem$Outbound | OutputCodeInterpreterServerToolItem$Outbound | OutputFileSearchServerToolItem$Outbound | OutputImageGenerationServerToolItem$Outbound | OutputBrowserUseServerToolItem$Outbound | OutputBashServerToolItem$Outbound | OutputTextEditorServerToolItem$Outbound | OutputApplyPatchServerToolItem$Outbound | OutputWebFetchServerToolItem$Outbound | OutputToolSearchServerToolItem$Outbound | OutputMemoryServerToolItem$Outbound | OutputMcpServerToolItem$Outbound | OutputSearchModelsServerToolItem$Outbound | OutputFusionServerToolItem$Outbound | OutputAdvisorServerToolItem$Outbound | OutputSubagentServerToolItem$Outbound | OutputFilesServerToolItem$Outbound | OutputShellServerToolItem$Outbound | CompactionItem$Outbound | ItemReferenceItem$Outbound | ConfigurationUpdateItem$Outbound | EasyInputMessage$Outbound | InputMessageItem$Outbound | ContextCompactionItem$Outbound;
|
|
220
|
+
export type InputsUnion1$Outbound = OutputArmorBlockedItem$Outbound | LocalShellCallItem$Outbound | McpApprovalRequestItem$Outbound | McpCallItem$Outbound | FunctionCallItem$Outbound | ApplyPatchCallItem$Outbound | OutputFileSearchCallItem$Outbound | OutputComputerCallItem$Outbound | OutputDatetimeItem$Outbound | McpListToolsItem$Outbound | CustomToolCallItem$Outbound | AgentMessageItem$Outbound | ToolSearchOutputItem$Outbound | ReasoningItem$Outbound | FunctionCallOutputItem$Outbound | ApplyPatchCallOutputItem$Outbound | InputsMessage$Outbound | InputsReasoning$Outbound | OutputWebSearchCallItem$Outbound | OutputImageGenerationCallItem$Outbound | OutputCodeInterpreterCallItem$Outbound | LocalShellCallOutputItem$Outbound | ShellCallItem$Outbound | ShellCallOutputItem$Outbound | McpApprovalResponseItem$Outbound | CustomToolCallOutputItem$Outbound | AdditionalToolsItem$Outbound | ToolSearchCallItem$Outbound | OutputWebSearchServerToolItem$Outbound | OutputCodeInterpreterServerToolItem$Outbound | OutputFileSearchServerToolItem$Outbound | OutputImageGenerationServerToolItem$Outbound | OutputBrowserUseServerToolItem$Outbound | OutputBashServerToolItem$Outbound | OutputTextEditorServerToolItem$Outbound | OutputApplyPatchServerToolItem$Outbound | OutputWebFetchServerToolItem$Outbound | OutputToolSearchServerToolItem$Outbound | OutputMemoryServerToolItem$Outbound | OutputMcpServerToolItem$Outbound | OutputSearchModelsServerToolItem$Outbound | OutputFusionServerToolItem$Outbound | OutputAdvisorServerToolItem$Outbound | OutputSubagentServerToolItem$Outbound | OutputFilesServerToolItem$Outbound | OutputShellServerToolItem$Outbound | CompactionItem$Outbound | ItemReferenceItem$Outbound | ConfigurationUpdateItem$Outbound | EasyInputMessage$Outbound | InputMessageItem$Outbound | CompactionTriggerItem$Outbound | ContextCompactionItem$Outbound;
|
|
220
221
|
/** @internal */
|
|
221
222
|
export declare const InputsUnion1$outboundSchema: z.ZodType<InputsUnion1$Outbound, InputsUnion1>;
|
|
222
223
|
export declare function inputsUnion1ToJSON(inputsUnion1: InputsUnion1): string;
|
|
223
224
|
/** @internal */
|
|
224
|
-
export type InputsUnion$Outbound = string | Array<OutputArmorBlockedItem$Outbound | LocalShellCallItem$Outbound | McpApprovalRequestItem$Outbound | McpCallItem$Outbound | FunctionCallItem$Outbound | ApplyPatchCallItem$Outbound | OutputFileSearchCallItem$Outbound | OutputComputerCallItem$Outbound | OutputDatetimeItem$Outbound | McpListToolsItem$Outbound | CustomToolCallItem$Outbound | AgentMessageItem$Outbound | ToolSearchOutputItem$Outbound | ReasoningItem$Outbound | FunctionCallOutputItem$Outbound | ApplyPatchCallOutputItem$Outbound | InputsMessage$Outbound | InputsReasoning$Outbound | OutputWebSearchCallItem$Outbound | OutputImageGenerationCallItem$Outbound | OutputCodeInterpreterCallItem$Outbound | LocalShellCallOutputItem$Outbound | ShellCallItem$Outbound | ShellCallOutputItem$Outbound | McpApprovalResponseItem$Outbound | CustomToolCallOutputItem$Outbound | AdditionalToolsItem$Outbound | ToolSearchCallItem$Outbound | OutputWebSearchServerToolItem$Outbound | OutputCodeInterpreterServerToolItem$Outbound | OutputFileSearchServerToolItem$Outbound | OutputImageGenerationServerToolItem$Outbound | OutputBrowserUseServerToolItem$Outbound | OutputBashServerToolItem$Outbound | OutputTextEditorServerToolItem$Outbound | OutputApplyPatchServerToolItem$Outbound | OutputWebFetchServerToolItem$Outbound | OutputToolSearchServerToolItem$Outbound | OutputMemoryServerToolItem$Outbound | OutputMcpServerToolItem$Outbound | OutputSearchModelsServerToolItem$Outbound | OutputFusionServerToolItem$Outbound | OutputAdvisorServerToolItem$Outbound | OutputSubagentServerToolItem$Outbound | OutputFilesServerToolItem$Outbound | OutputShellServerToolItem$Outbound | CompactionItem$Outbound | ItemReferenceItem$Outbound | ConfigurationUpdateItem$Outbound | EasyInputMessage$Outbound | InputMessageItem$Outbound | ContextCompactionItem$Outbound>;
|
|
225
|
+
export type InputsUnion$Outbound = string | Array<OutputArmorBlockedItem$Outbound | LocalShellCallItem$Outbound | McpApprovalRequestItem$Outbound | McpCallItem$Outbound | FunctionCallItem$Outbound | ApplyPatchCallItem$Outbound | OutputFileSearchCallItem$Outbound | OutputComputerCallItem$Outbound | OutputDatetimeItem$Outbound | McpListToolsItem$Outbound | CustomToolCallItem$Outbound | AgentMessageItem$Outbound | ToolSearchOutputItem$Outbound | ReasoningItem$Outbound | FunctionCallOutputItem$Outbound | ApplyPatchCallOutputItem$Outbound | InputsMessage$Outbound | InputsReasoning$Outbound | OutputWebSearchCallItem$Outbound | OutputImageGenerationCallItem$Outbound | OutputCodeInterpreterCallItem$Outbound | LocalShellCallOutputItem$Outbound | ShellCallItem$Outbound | ShellCallOutputItem$Outbound | McpApprovalResponseItem$Outbound | CustomToolCallOutputItem$Outbound | AdditionalToolsItem$Outbound | ToolSearchCallItem$Outbound | OutputWebSearchServerToolItem$Outbound | OutputCodeInterpreterServerToolItem$Outbound | OutputFileSearchServerToolItem$Outbound | OutputImageGenerationServerToolItem$Outbound | OutputBrowserUseServerToolItem$Outbound | OutputBashServerToolItem$Outbound | OutputTextEditorServerToolItem$Outbound | OutputApplyPatchServerToolItem$Outbound | OutputWebFetchServerToolItem$Outbound | OutputToolSearchServerToolItem$Outbound | OutputMemoryServerToolItem$Outbound | OutputMcpServerToolItem$Outbound | OutputSearchModelsServerToolItem$Outbound | OutputFusionServerToolItem$Outbound | OutputAdvisorServerToolItem$Outbound | OutputSubagentServerToolItem$Outbound | OutputFilesServerToolItem$Outbound | OutputShellServerToolItem$Outbound | CompactionItem$Outbound | ItemReferenceItem$Outbound | ConfigurationUpdateItem$Outbound | EasyInputMessage$Outbound | InputMessageItem$Outbound | CompactionTriggerItem$Outbound | ContextCompactionItem$Outbound>;
|
|
225
226
|
/** @internal */
|
|
226
227
|
export declare const InputsUnion$outboundSchema: z.ZodType<InputsUnion$Outbound, InputsUnion>;
|
|
227
228
|
export declare function inputsUnionToJSON(inputsUnion: InputsUnion): string;
|
|
@@ -9,6 +9,7 @@ import { AgentMessageItem$outboundSchema, } from "./agentmessageitem.js";
|
|
|
9
9
|
import { ApplyPatchCallItem$outboundSchema, } from "./applypatchcallitem.js";
|
|
10
10
|
import { ApplyPatchCallOutputItem$outboundSchema, } from "./applypatchcalloutputitem.js";
|
|
11
11
|
import { CompactionItem$outboundSchema, } from "./compactionitem.js";
|
|
12
|
+
import { CompactionTriggerItem$outboundSchema, } from "./compactiontriggeritem.js";
|
|
12
13
|
import { ConfigurationUpdateItem$outboundSchema, } from "./configurationupdateitem.js";
|
|
13
14
|
import { ContextCompactionItem$outboundSchema, } from "./contextcompactionitem.js";
|
|
14
15
|
import { CustomToolCallItem$outboundSchema, } from "./customtoolcallitem.js";
|
|
@@ -259,6 +260,7 @@ export const InputsUnion1$outboundSchema = z.union([
|
|
|
259
260
|
ConfigurationUpdateItem$outboundSchema,
|
|
260
261
|
EasyInputMessage$outboundSchema,
|
|
261
262
|
InputMessageItem$outboundSchema,
|
|
263
|
+
CompactionTriggerItem$outboundSchema,
|
|
262
264
|
ContextCompactionItem$outboundSchema,
|
|
263
265
|
]);
|
|
264
266
|
export function inputsUnion1ToJSON(inputsUnion1) {
|
|
@@ -319,6 +321,7 @@ export const InputsUnion$outboundSchema = z.union([
|
|
|
319
321
|
ConfigurationUpdateItem$outboundSchema,
|
|
320
322
|
EasyInputMessage$outboundSchema,
|
|
321
323
|
InputMessageItem$outboundSchema,
|
|
324
|
+
CompactionTriggerItem$outboundSchema,
|
|
322
325
|
ContextCompactionItem$outboundSchema,
|
|
323
326
|
])),
|
|
324
327
|
]);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
/**
|
|
5
|
+
* A compaction output item carrying the encrypted summary of the compacted conversation. Emitted in reply to a `compaction_trigger` input item.
|
|
6
|
+
*/
|
|
7
|
+
export type OutputCompactionItem = {
|
|
8
|
+
createdBy?: string | undefined;
|
|
9
|
+
encryptedContent: string;
|
|
10
|
+
id: string;
|
|
11
|
+
type: "compaction";
|
|
12
|
+
};
|
|
13
|
+
/** @internal */
|
|
14
|
+
export declare const OutputCompactionItem$inboundSchema: z.ZodType<OutputCompactionItem, unknown>;
|
|
15
|
+
export declare function outputCompactionItemFromJSON(jsonString: string): SafeParseResult<OutputCompactionItem, SDKValidationError>;
|
|
16
|
+
//# sourceMappingURL=outputcompactionitem.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: fc7ae48602c5
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const OutputCompactionItem$inboundSchema = z.object({
|
|
10
|
+
created_by: z.string().optional(),
|
|
11
|
+
encrypted_content: z.string(),
|
|
12
|
+
id: z.string(),
|
|
13
|
+
type: z.literal("compaction"),
|
|
14
|
+
}).transform((v) => {
|
|
15
|
+
return remap$(v, {
|
|
16
|
+
"created_by": "createdBy",
|
|
17
|
+
"encrypted_content": "encryptedContent",
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
export function outputCompactionItemFromJSON(jsonString) {
|
|
21
|
+
return safeParse(jsonString, (x) => OutputCompactionItem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputCompactionItem' from JSON`);
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=outputcompactionitem.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
export type OutputItemCompaction = {
|
|
5
|
+
createdBy?: string | undefined;
|
|
6
|
+
encryptedContent: string;
|
|
7
|
+
id: string;
|
|
8
|
+
type: "compaction";
|
|
9
|
+
};
|
|
10
|
+
/** @internal */
|
|
11
|
+
export declare const OutputItemCompaction$inboundSchema: z.ZodType<OutputItemCompaction, unknown>;
|
|
12
|
+
export declare function outputItemCompactionFromJSON(jsonString: string): SafeParseResult<OutputItemCompaction, SDKValidationError>;
|
|
13
|
+
//# sourceMappingURL=outputitemcompaction.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 51765cc422ec
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const OutputItemCompaction$inboundSchema = z.object({
|
|
10
|
+
created_by: z.string().optional(),
|
|
11
|
+
encrypted_content: z.string(),
|
|
12
|
+
id: z.string(),
|
|
13
|
+
type: z.literal("compaction"),
|
|
14
|
+
}).transform((v) => {
|
|
15
|
+
return remap$(v, {
|
|
16
|
+
"created_by": "createdBy",
|
|
17
|
+
"encrypted_content": "encryptedContent",
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
export function outputItemCompactionFromJSON(jsonString) {
|
|
21
|
+
return safeParse(jsonString, (x) => OutputItemCompaction$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputItemCompaction' from JSON`);
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=outputitemcompaction.js.map
|
|
@@ -10,6 +10,7 @@ import { OutputBashServerToolItem } from "./outputbashservertoolitem.js";
|
|
|
10
10
|
import { OutputBrowserUseServerToolItem } from "./outputbrowseruseservertoolitem.js";
|
|
11
11
|
import { OutputCodeInterpreterCallItem } from "./outputcodeinterpretercallitem.js";
|
|
12
12
|
import { OutputCodeInterpreterServerToolItem } from "./outputcodeinterpreterservertoolitem.js";
|
|
13
|
+
import { OutputCompactionItem } from "./outputcompactionitem.js";
|
|
13
14
|
import { OutputComputerCallItem } from "./outputcomputercallitem.js";
|
|
14
15
|
import { OutputCustomToolCallItem } from "./outputcustomtoolcallitem.js";
|
|
15
16
|
import { OutputDatetimeItem } from "./outputdatetimeitem.js";
|
|
@@ -40,7 +41,7 @@ import { OutputWebSearchServerToolItem } from "./outputwebsearchservertoolitem.j
|
|
|
40
41
|
*/
|
|
41
42
|
export type OutputItems = OutputApplyPatchCallItem | (OutputCodeInterpreterCallItem & {
|
|
42
43
|
type: "code_interpreter_call";
|
|
43
|
-
}) | (OutputComputerCallItem & {
|
|
44
|
+
}) | OutputCompactionItem | (OutputComputerCallItem & {
|
|
44
45
|
type: "computer_call";
|
|
45
46
|
}) | OutputCustomToolCallItem | (OutputFileSearchCallItem & {
|
|
46
47
|
type: "file_search_call";
|
|
@@ -13,6 +13,7 @@ import { OutputBashServerToolItem$inboundSchema, } from "./outputbashservertooli
|
|
|
13
13
|
import { OutputBrowserUseServerToolItem$inboundSchema, } from "./outputbrowseruseservertoolitem.js";
|
|
14
14
|
import { OutputCodeInterpreterCallItem$inboundSchema, } from "./outputcodeinterpretercallitem.js";
|
|
15
15
|
import { OutputCodeInterpreterServerToolItem$inboundSchema, } from "./outputcodeinterpreterservertoolitem.js";
|
|
16
|
+
import { OutputCompactionItem$inboundSchema, } from "./outputcompactionitem.js";
|
|
16
17
|
import { OutputComputerCallItem$inboundSchema, } from "./outputcomputercallitem.js";
|
|
17
18
|
import { OutputCustomToolCallItem$inboundSchema, } from "./outputcustomtoolcallitem.js";
|
|
18
19
|
import { OutputDatetimeItem$inboundSchema, } from "./outputdatetimeitem.js";
|
|
@@ -42,6 +43,7 @@ import { OutputWebSearchServerToolItem$inboundSchema, } from "./outputwebsearchs
|
|
|
42
43
|
export const OutputItems$inboundSchema = discriminatedUnion("type", {
|
|
43
44
|
apply_patch_call: OutputApplyPatchCallItem$inboundSchema,
|
|
44
45
|
code_interpreter_call: OutputCodeInterpreterCallItem$inboundSchema.and(z.object({ type: z.literal("code_interpreter_call") })),
|
|
46
|
+
compaction: OutputCompactionItem$inboundSchema,
|
|
45
47
|
computer_call: OutputComputerCallItem$inboundSchema.and(z.object({ type: z.literal("computer_call") })),
|
|
46
48
|
custom_tool_call: OutputCustomToolCallItem$inboundSchema,
|
|
47
49
|
file_search_call: OutputFileSearchCallItem$inboundSchema.and(z.object({ type: z.literal("file_search_call") })),
|
|
@@ -3,14 +3,16 @@ import { OpenEnum } from "../types/enums.js";
|
|
|
3
3
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
4
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
5
|
/**
|
|
6
|
-
* Role of the member in the workspace
|
|
6
|
+
* Role of the member in the workspace. `viewer` and `restricted_viewer` are read-only: `viewer` can view the whole workspace, and `restricted_viewer` can view only their own activity.
|
|
7
7
|
*/
|
|
8
8
|
export declare const WorkspaceMemberRole: {
|
|
9
9
|
readonly Admin: "admin";
|
|
10
10
|
readonly Member: "member";
|
|
11
|
+
readonly Viewer: "viewer";
|
|
12
|
+
readonly RestrictedViewer: "restricted_viewer";
|
|
11
13
|
};
|
|
12
14
|
/**
|
|
13
|
-
* Role of the member in the workspace
|
|
15
|
+
* Role of the member in the workspace. `viewer` and `restricted_viewer` are read-only: `viewer` can view the whole workspace, and `restricted_viewer` can view only their own activity.
|
|
14
16
|
*/
|
|
15
17
|
export type WorkspaceMemberRole = OpenEnum<typeof WorkspaceMemberRole>;
|
|
16
18
|
export type WorkspaceMember = {
|
|
@@ -23,7 +25,7 @@ export type WorkspaceMember = {
|
|
|
23
25
|
*/
|
|
24
26
|
id: string;
|
|
25
27
|
/**
|
|
26
|
-
* Role of the member in the workspace
|
|
28
|
+
* Role of the member in the workspace. `viewer` and `restricted_viewer` are read-only: `viewer` can view the whole workspace, and `restricted_viewer` can view only their own activity.
|
|
27
29
|
*/
|
|
28
30
|
role: WorkspaceMemberRole;
|
|
29
31
|
/**
|
|
@@ -7,11 +7,13 @@ import { remap as remap$ } from "../lib/primitives.js";
|
|
|
7
7
|
import { safeParse } from "../lib/schemas.js";
|
|
8
8
|
import * as openEnums from "../types/enums.js";
|
|
9
9
|
/**
|
|
10
|
-
* Role of the member in the workspace
|
|
10
|
+
* Role of the member in the workspace. `viewer` and `restricted_viewer` are read-only: `viewer` can view the whole workspace, and `restricted_viewer` can view only their own activity.
|
|
11
11
|
*/
|
|
12
12
|
export const WorkspaceMemberRole = {
|
|
13
13
|
Admin: "admin",
|
|
14
14
|
Member: "member",
|
|
15
|
+
Viewer: "viewer",
|
|
16
|
+
RestrictedViewer: "restricted_viewer",
|
|
15
17
|
};
|
|
16
18
|
/** @internal */
|
|
17
19
|
export const WorkspaceMemberRole$inboundSchema = openEnums.inboundSchema(WorkspaceMemberRole);
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openrouter/sdk",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.50",
|
|
4
4
|
"author": "OpenRouter",
|
|
5
5
|
"description": "The OpenRouter TypeScript SDK is a type-safe toolkit for building AI applications with access to 400+ language models through a unified API.",
|
|
6
6
|
"keywords": [
|
|
@@ -73,15 +73,15 @@
|
|
|
73
73
|
"lint": "eslint --cache --max-warnings=0 src",
|
|
74
74
|
"build": "tsc && node scripts/unbarrel-imports.js",
|
|
75
75
|
"prepublishOnly": "npm run build",
|
|
76
|
-
"postinstall": "node scripts/check-types.js || true",
|
|
77
|
-
"prepare": "npm run build",
|
|
78
76
|
"test:e2e": "vitest --run --project e2e",
|
|
79
77
|
"test:transit": "exit 0",
|
|
78
|
+
"typecheck:transit": "exit 0",
|
|
79
|
+
"test": "vitest --run --project unit",
|
|
80
80
|
"test:watch": "vitest --watch --project unit",
|
|
81
81
|
"typecheck": "tsc --noEmit",
|
|
82
82
|
"compile": "tsc && node scripts/unbarrel-imports.js",
|
|
83
|
-
"
|
|
84
|
-
"
|
|
83
|
+
"postinstall": "node scripts/check-types.js || true",
|
|
84
|
+
"prepare": "npm run build"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
87
|
|