@openrouter/sdk 0.13.39 → 0.13.41
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/agentmessageitem.d.ts +99 -0
- package/esm/models/agentmessageitem.js +101 -0
- package/esm/models/compactionitem.d.ts +4 -0
- package/esm/models/compactionitem.js +8 -3
- package/esm/models/contextcompactionitem.d.ts +30 -0
- package/esm/models/contextcompactionitem.js +30 -0
- package/esm/models/index.d.ts +2 -0
- package/esm/models/index.js +2 -0
- package/esm/models/inputsunion.d.ts +6 -4
- package/esm/models/inputsunion.js +6 -0
- package/esm/models/operations/queryanalytics.d.ts +89 -0
- package/esm/models/operations/queryanalytics.js +59 -0
- package/jsr.json +1 -1
- package/package.json +6 -6
package/esm/lib/config.d.ts
CHANGED
|
@@ -49,8 +49,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
|
|
|
49
49
|
export declare const SDK_METADATA: {
|
|
50
50
|
readonly language: "typescript";
|
|
51
51
|
readonly openapiDocVersion: "1.0.0";
|
|
52
|
-
readonly sdkVersion: "0.13.
|
|
52
|
+
readonly sdkVersion: "0.13.41";
|
|
53
53
|
readonly genVersion: "2.884.4";
|
|
54
|
-
readonly userAgent: "speakeasy-sdk/typescript 0.13.
|
|
54
|
+
readonly userAgent: "speakeasy-sdk/typescript 0.13.41 2.884.4 1.0.0 @openrouter/sdk";
|
|
55
55
|
};
|
|
56
56
|
//# sourceMappingURL=config.d.ts.map
|
package/esm/lib/config.js
CHANGED
|
@@ -26,8 +26,8 @@ export function serverURLFromOptions(options) {
|
|
|
26
26
|
export const SDK_METADATA = {
|
|
27
27
|
language: "typescript",
|
|
28
28
|
openapiDocVersion: "1.0.0",
|
|
29
|
-
sdkVersion: "0.13.
|
|
29
|
+
sdkVersion: "0.13.41",
|
|
30
30
|
genVersion: "2.884.4",
|
|
31
|
-
userAgent: "speakeasy-sdk/typescript 0.13.
|
|
31
|
+
userAgent: "speakeasy-sdk/typescript 0.13.41 2.884.4 1.0.0 @openrouter/sdk",
|
|
32
32
|
};
|
|
33
33
|
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { ClosedEnum, OpenEnum } from "../types/enums.js";
|
|
3
|
+
import { InputText, InputText$Outbound } from "./inputtext.js";
|
|
4
|
+
export type Agent = {
|
|
5
|
+
agentName: string;
|
|
6
|
+
additionalProperties?: {
|
|
7
|
+
[k: string]: any | null;
|
|
8
|
+
} | undefined;
|
|
9
|
+
};
|
|
10
|
+
export type ContentEncryptedContent = {
|
|
11
|
+
encryptedContent: string;
|
|
12
|
+
type: "encrypted_content";
|
|
13
|
+
additionalProperties?: {
|
|
14
|
+
[k: string]: any | null;
|
|
15
|
+
} | undefined;
|
|
16
|
+
};
|
|
17
|
+
export declare const AgentMessageItemDetail: {
|
|
18
|
+
readonly Auto: "auto";
|
|
19
|
+
readonly High: "high";
|
|
20
|
+
readonly Low: "low";
|
|
21
|
+
readonly Original: "original";
|
|
22
|
+
};
|
|
23
|
+
export type AgentMessageItemDetail = OpenEnum<typeof AgentMessageItemDetail>;
|
|
24
|
+
/**
|
|
25
|
+
* Image input content item
|
|
26
|
+
*/
|
|
27
|
+
export type AgentMessageItemContentInputImage = {
|
|
28
|
+
detail: AgentMessageItemDetail;
|
|
29
|
+
imageUrl?: string | null | undefined;
|
|
30
|
+
type: "input_image";
|
|
31
|
+
};
|
|
32
|
+
export type AgentMessageItemContentUnion = InputText | AgentMessageItemContentInputImage | ContentEncryptedContent;
|
|
33
|
+
export declare const TypeAgentMessage: {
|
|
34
|
+
readonly AgentMessage: "agent_message";
|
|
35
|
+
};
|
|
36
|
+
export type TypeAgentMessage = ClosedEnum<typeof TypeAgentMessage>;
|
|
37
|
+
/**
|
|
38
|
+
* A message routed between agents in a multi-agent session
|
|
39
|
+
*/
|
|
40
|
+
export type AgentMessageItem = {
|
|
41
|
+
agent?: Agent | null | undefined;
|
|
42
|
+
author: string;
|
|
43
|
+
content: Array<InputText | AgentMessageItemContentInputImage | ContentEncryptedContent>;
|
|
44
|
+
id?: string | null | undefined;
|
|
45
|
+
recipient: string;
|
|
46
|
+
type: TypeAgentMessage;
|
|
47
|
+
additionalProperties?: {
|
|
48
|
+
[k: string]: any | null;
|
|
49
|
+
} | undefined;
|
|
50
|
+
};
|
|
51
|
+
/** @internal */
|
|
52
|
+
export type Agent$Outbound = {
|
|
53
|
+
agent_name: string;
|
|
54
|
+
[additionalProperties: string]: unknown;
|
|
55
|
+
};
|
|
56
|
+
/** @internal */
|
|
57
|
+
export declare const Agent$outboundSchema: z.ZodType<Agent$Outbound, Agent>;
|
|
58
|
+
export declare function agentToJSON(agent: Agent): string;
|
|
59
|
+
/** @internal */
|
|
60
|
+
export type ContentEncryptedContent$Outbound = {
|
|
61
|
+
encrypted_content: string;
|
|
62
|
+
type: "encrypted_content";
|
|
63
|
+
[additionalProperties: string]: unknown;
|
|
64
|
+
};
|
|
65
|
+
/** @internal */
|
|
66
|
+
export declare const ContentEncryptedContent$outboundSchema: z.ZodType<ContentEncryptedContent$Outbound, ContentEncryptedContent>;
|
|
67
|
+
export declare function contentEncryptedContentToJSON(contentEncryptedContent: ContentEncryptedContent): string;
|
|
68
|
+
/** @internal */
|
|
69
|
+
export declare const AgentMessageItemDetail$outboundSchema: z.ZodType<string, AgentMessageItemDetail>;
|
|
70
|
+
/** @internal */
|
|
71
|
+
export type AgentMessageItemContentInputImage$Outbound = {
|
|
72
|
+
detail: string;
|
|
73
|
+
image_url?: string | null | undefined;
|
|
74
|
+
type: "input_image";
|
|
75
|
+
};
|
|
76
|
+
/** @internal */
|
|
77
|
+
export declare const AgentMessageItemContentInputImage$outboundSchema: z.ZodType<AgentMessageItemContentInputImage$Outbound, AgentMessageItemContentInputImage>;
|
|
78
|
+
export declare function agentMessageItemContentInputImageToJSON(agentMessageItemContentInputImage: AgentMessageItemContentInputImage): string;
|
|
79
|
+
/** @internal */
|
|
80
|
+
export type AgentMessageItemContentUnion$Outbound = InputText$Outbound | AgentMessageItemContentInputImage$Outbound | ContentEncryptedContent$Outbound;
|
|
81
|
+
/** @internal */
|
|
82
|
+
export declare const AgentMessageItemContentUnion$outboundSchema: z.ZodType<AgentMessageItemContentUnion$Outbound, AgentMessageItemContentUnion>;
|
|
83
|
+
export declare function agentMessageItemContentUnionToJSON(agentMessageItemContentUnion: AgentMessageItemContentUnion): string;
|
|
84
|
+
/** @internal */
|
|
85
|
+
export declare const TypeAgentMessage$outboundSchema: z.ZodEnum<typeof TypeAgentMessage>;
|
|
86
|
+
/** @internal */
|
|
87
|
+
export type AgentMessageItem$Outbound = {
|
|
88
|
+
agent?: Agent$Outbound | null | undefined;
|
|
89
|
+
author: string;
|
|
90
|
+
content: Array<InputText$Outbound | AgentMessageItemContentInputImage$Outbound | ContentEncryptedContent$Outbound>;
|
|
91
|
+
id?: string | null | undefined;
|
|
92
|
+
recipient: string;
|
|
93
|
+
type: string;
|
|
94
|
+
[additionalProperties: string]: unknown;
|
|
95
|
+
};
|
|
96
|
+
/** @internal */
|
|
97
|
+
export declare const AgentMessageItem$outboundSchema: z.ZodType<AgentMessageItem$Outbound, AgentMessageItem>;
|
|
98
|
+
export declare function agentMessageItemToJSON(agentMessageItem: AgentMessageItem): string;
|
|
99
|
+
//# sourceMappingURL=agentmessageitem.d.ts.map
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: fc9151085f62
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import * as openEnums from "../types/enums.js";
|
|
8
|
+
import { InputText$outboundSchema, } from "./inputtext.js";
|
|
9
|
+
export const AgentMessageItemDetail = {
|
|
10
|
+
Auto: "auto",
|
|
11
|
+
High: "high",
|
|
12
|
+
Low: "low",
|
|
13
|
+
Original: "original",
|
|
14
|
+
};
|
|
15
|
+
export const TypeAgentMessage = {
|
|
16
|
+
AgentMessage: "agent_message",
|
|
17
|
+
};
|
|
18
|
+
/** @internal */
|
|
19
|
+
export const Agent$outboundSchema = z.object({
|
|
20
|
+
agentName: z.string(),
|
|
21
|
+
additionalProperties: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
22
|
+
}).transform((v) => {
|
|
23
|
+
return {
|
|
24
|
+
...v.additionalProperties,
|
|
25
|
+
...remap$(v, {
|
|
26
|
+
agentName: "agent_name",
|
|
27
|
+
additionalProperties: null,
|
|
28
|
+
}),
|
|
29
|
+
};
|
|
30
|
+
});
|
|
31
|
+
export function agentToJSON(agent) {
|
|
32
|
+
return JSON.stringify(Agent$outboundSchema.parse(agent));
|
|
33
|
+
}
|
|
34
|
+
/** @internal */
|
|
35
|
+
export const ContentEncryptedContent$outboundSchema = z.object({
|
|
36
|
+
encryptedContent: z.string(),
|
|
37
|
+
type: z.literal("encrypted_content"),
|
|
38
|
+
additionalProperties: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
39
|
+
}).transform((v) => {
|
|
40
|
+
return {
|
|
41
|
+
...v.additionalProperties,
|
|
42
|
+
...remap$(v, {
|
|
43
|
+
encryptedContent: "encrypted_content",
|
|
44
|
+
additionalProperties: null,
|
|
45
|
+
}),
|
|
46
|
+
};
|
|
47
|
+
});
|
|
48
|
+
export function contentEncryptedContentToJSON(contentEncryptedContent) {
|
|
49
|
+
return JSON.stringify(ContentEncryptedContent$outboundSchema.parse(contentEncryptedContent));
|
|
50
|
+
}
|
|
51
|
+
/** @internal */
|
|
52
|
+
export const AgentMessageItemDetail$outboundSchema = openEnums.outboundSchema(AgentMessageItemDetail);
|
|
53
|
+
/** @internal */
|
|
54
|
+
export const AgentMessageItemContentInputImage$outboundSchema = z.object({
|
|
55
|
+
detail: AgentMessageItemDetail$outboundSchema,
|
|
56
|
+
imageUrl: z.nullable(z.string()).optional(),
|
|
57
|
+
type: z.literal("input_image"),
|
|
58
|
+
}).transform((v) => {
|
|
59
|
+
return remap$(v, {
|
|
60
|
+
imageUrl: "image_url",
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
export function agentMessageItemContentInputImageToJSON(agentMessageItemContentInputImage) {
|
|
64
|
+
return JSON.stringify(AgentMessageItemContentInputImage$outboundSchema.parse(agentMessageItemContentInputImage));
|
|
65
|
+
}
|
|
66
|
+
/** @internal */
|
|
67
|
+
export const AgentMessageItemContentUnion$outboundSchema = z.union([
|
|
68
|
+
InputText$outboundSchema,
|
|
69
|
+
z.lazy(() => AgentMessageItemContentInputImage$outboundSchema),
|
|
70
|
+
z.lazy(() => ContentEncryptedContent$outboundSchema),
|
|
71
|
+
]);
|
|
72
|
+
export function agentMessageItemContentUnionToJSON(agentMessageItemContentUnion) {
|
|
73
|
+
return JSON.stringify(AgentMessageItemContentUnion$outboundSchema.parse(agentMessageItemContentUnion));
|
|
74
|
+
}
|
|
75
|
+
/** @internal */
|
|
76
|
+
export const TypeAgentMessage$outboundSchema = z.enum(TypeAgentMessage);
|
|
77
|
+
/** @internal */
|
|
78
|
+
export const AgentMessageItem$outboundSchema = z.object({
|
|
79
|
+
agent: z.nullable(z.lazy(() => Agent$outboundSchema)).optional(),
|
|
80
|
+
author: z.string(),
|
|
81
|
+
content: z.array(z.union([
|
|
82
|
+
InputText$outboundSchema,
|
|
83
|
+
z.lazy(() => AgentMessageItemContentInputImage$outboundSchema),
|
|
84
|
+
z.lazy(() => ContentEncryptedContent$outboundSchema),
|
|
85
|
+
])),
|
|
86
|
+
id: z.nullable(z.string()).optional(),
|
|
87
|
+
recipient: z.string(),
|
|
88
|
+
type: TypeAgentMessage$outboundSchema,
|
|
89
|
+
additionalProperties: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
90
|
+
}).transform((v) => {
|
|
91
|
+
return {
|
|
92
|
+
...v.additionalProperties,
|
|
93
|
+
...remap$(v, {
|
|
94
|
+
additionalProperties: null,
|
|
95
|
+
}),
|
|
96
|
+
};
|
|
97
|
+
});
|
|
98
|
+
export function agentMessageItemToJSON(agentMessageItem) {
|
|
99
|
+
return JSON.stringify(AgentMessageItem$outboundSchema.parse(agentMessageItem));
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=agentmessageitem.js.map
|
|
@@ -11,6 +11,9 @@ export type CompactionItem = {
|
|
|
11
11
|
encryptedContent: string;
|
|
12
12
|
id?: string | null | undefined;
|
|
13
13
|
type: CompactionItemType;
|
|
14
|
+
additionalProperties?: {
|
|
15
|
+
[k: string]: any | null;
|
|
16
|
+
} | undefined;
|
|
14
17
|
};
|
|
15
18
|
/** @internal */
|
|
16
19
|
export declare const CompactionItemType$outboundSchema: z.ZodEnum<typeof CompactionItemType>;
|
|
@@ -19,6 +22,7 @@ export type CompactionItem$Outbound = {
|
|
|
19
22
|
encrypted_content: string;
|
|
20
23
|
id?: string | null | undefined;
|
|
21
24
|
type: string;
|
|
25
|
+
[additionalProperties: string]: unknown;
|
|
22
26
|
};
|
|
23
27
|
/** @internal */
|
|
24
28
|
export declare const CompactionItem$outboundSchema: z.ZodType<CompactionItem$Outbound, CompactionItem>;
|
|
@@ -14,10 +14,15 @@ export const CompactionItem$outboundSchema = z.object({
|
|
|
14
14
|
encryptedContent: z.string(),
|
|
15
15
|
id: z.nullable(z.string()).optional(),
|
|
16
16
|
type: CompactionItemType$outboundSchema,
|
|
17
|
+
additionalProperties: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
17
18
|
}).transform((v) => {
|
|
18
|
-
return
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
return {
|
|
20
|
+
...v.additionalProperties,
|
|
21
|
+
...remap$(v, {
|
|
22
|
+
encryptedContent: "encrypted_content",
|
|
23
|
+
additionalProperties: null,
|
|
24
|
+
}),
|
|
25
|
+
};
|
|
21
26
|
});
|
|
22
27
|
export function compactionItemToJSON(compactionItem) {
|
|
23
28
|
return JSON.stringify(CompactionItem$outboundSchema.parse(compactionItem));
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
3
|
+
export declare const ContextCompactionItemType: {
|
|
4
|
+
readonly ContextCompaction: "context_compaction";
|
|
5
|
+
};
|
|
6
|
+
export type ContextCompactionItemType = ClosedEnum<typeof ContextCompactionItemType>;
|
|
7
|
+
/**
|
|
8
|
+
* A context compaction marker with an optional encrypted summary
|
|
9
|
+
*/
|
|
10
|
+
export type ContextCompactionItem = {
|
|
11
|
+
encryptedContent?: string | null | undefined;
|
|
12
|
+
id?: string | null | undefined;
|
|
13
|
+
type: ContextCompactionItemType;
|
|
14
|
+
additionalProperties?: {
|
|
15
|
+
[k: string]: any | null;
|
|
16
|
+
} | undefined;
|
|
17
|
+
};
|
|
18
|
+
/** @internal */
|
|
19
|
+
export declare const ContextCompactionItemType$outboundSchema: z.ZodEnum<typeof ContextCompactionItemType>;
|
|
20
|
+
/** @internal */
|
|
21
|
+
export type ContextCompactionItem$Outbound = {
|
|
22
|
+
encrypted_content?: string | null | undefined;
|
|
23
|
+
id?: string | null | undefined;
|
|
24
|
+
type: string;
|
|
25
|
+
[additionalProperties: string]: unknown;
|
|
26
|
+
};
|
|
27
|
+
/** @internal */
|
|
28
|
+
export declare const ContextCompactionItem$outboundSchema: z.ZodType<ContextCompactionItem$Outbound, ContextCompactionItem>;
|
|
29
|
+
export declare function contextCompactionItemToJSON(contextCompactionItem: ContextCompactionItem): string;
|
|
30
|
+
//# sourceMappingURL=contextcompactionitem.d.ts.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 8f97e5138d46
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
export const ContextCompactionItemType = {
|
|
8
|
+
ContextCompaction: "context_compaction",
|
|
9
|
+
};
|
|
10
|
+
/** @internal */
|
|
11
|
+
export const ContextCompactionItemType$outboundSchema = z.enum(ContextCompactionItemType);
|
|
12
|
+
/** @internal */
|
|
13
|
+
export const ContextCompactionItem$outboundSchema = z.object({
|
|
14
|
+
encryptedContent: z.nullable(z.string()).optional(),
|
|
15
|
+
id: z.nullable(z.string()).optional(),
|
|
16
|
+
type: ContextCompactionItemType$outboundSchema,
|
|
17
|
+
additionalProperties: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
18
|
+
}).transform((v) => {
|
|
19
|
+
return {
|
|
20
|
+
...v.additionalProperties,
|
|
21
|
+
...remap$(v, {
|
|
22
|
+
encryptedContent: "encrypted_content",
|
|
23
|
+
additionalProperties: null,
|
|
24
|
+
}),
|
|
25
|
+
};
|
|
26
|
+
});
|
|
27
|
+
export function contextCompactionItemToJSON(contextCompactionItem) {
|
|
28
|
+
return JSON.stringify(ContextCompactionItem$outboundSchema.parse(contextCompactionItem));
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=contextcompactionitem.js.map
|
package/esm/models/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export * from "./advisornestedtool.js";
|
|
|
6
6
|
export * from "./advisorreasoning.js";
|
|
7
7
|
export * from "./advisorservertoolconfig.js";
|
|
8
8
|
export * from "./advisorservertoolopenrouter.js";
|
|
9
|
+
export * from "./agentmessageitem.js";
|
|
9
10
|
export * from "./annotationaddedevent.js";
|
|
10
11
|
export * from "./anthropicadvisormessageusageiteration.js";
|
|
11
12
|
export * from "./anthropicallowedcallers.js";
|
|
@@ -147,6 +148,7 @@ export * from "./contentpartinputaudio.js";
|
|
|
147
148
|
export * from "./contentpartinputfile.js";
|
|
148
149
|
export * from "./contentpartinputvideo.js";
|
|
149
150
|
export * from "./contentpartvideo.js";
|
|
151
|
+
export * from "./contextcompactionitem.js";
|
|
150
152
|
export * from "./contextcompressionengine.js";
|
|
151
153
|
export * from "./contextcompressionplugin.js";
|
|
152
154
|
export * from "./costdetails.js";
|
package/esm/models/index.js
CHANGED
|
@@ -10,6 +10,7 @@ export * from "./advisornestedtool.js";
|
|
|
10
10
|
export * from "./advisorreasoning.js";
|
|
11
11
|
export * from "./advisorservertoolconfig.js";
|
|
12
12
|
export * from "./advisorservertoolopenrouter.js";
|
|
13
|
+
export * from "./agentmessageitem.js";
|
|
13
14
|
export * from "./annotationaddedevent.js";
|
|
14
15
|
export * from "./anthropicadvisormessageusageiteration.js";
|
|
15
16
|
export * from "./anthropicallowedcallers.js";
|
|
@@ -151,6 +152,7 @@ export * from "./contentpartinputaudio.js";
|
|
|
151
152
|
export * from "./contentpartinputfile.js";
|
|
152
153
|
export * from "./contentpartinputvideo.js";
|
|
153
154
|
export * from "./contentpartvideo.js";
|
|
155
|
+
export * from "./contextcompactionitem.js";
|
|
154
156
|
export * from "./contextcompressionengine.js";
|
|
155
157
|
export * from "./contextcompressionplugin.js";
|
|
156
158
|
export * from "./costdetails.js";
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
2
|
import { ClosedEnum } from "../types/enums.js";
|
|
3
3
|
import { AdditionalToolsItem, AdditionalToolsItem$Outbound } from "./additionaltoolsitem.js";
|
|
4
|
+
import { AgentMessageItem, AgentMessageItem$Outbound } from "./agentmessageitem.js";
|
|
4
5
|
import { ApplyPatchCallItem, ApplyPatchCallItem$Outbound } from "./applypatchcallitem.js";
|
|
5
6
|
import { ApplyPatchCallOutputItem, ApplyPatchCallOutputItem$Outbound } from "./applypatchcalloutputitem.js";
|
|
6
7
|
import { CompactionItem, CompactionItem$Outbound } from "./compactionitem.js";
|
|
8
|
+
import { ContextCompactionItem, ContextCompactionItem$Outbound } from "./contextcompactionitem.js";
|
|
7
9
|
import { CustomToolCallItem, CustomToolCallItem$Outbound } from "./customtoolcallitem.js";
|
|
8
10
|
import { CustomToolCallOutputItem, CustomToolCallOutputItem$Outbound } from "./customtoolcalloutputitem.js";
|
|
9
11
|
import { EasyInputMessage, EasyInputMessage$Outbound } from "./easyinputmessage.js";
|
|
@@ -132,11 +134,11 @@ export type InputsMessage = {
|
|
|
132
134
|
status?: InputsStatusCompleted1 | InputsStatusIncomplete1 | InputsStatusInProgress1 | undefined;
|
|
133
135
|
type: InputsTypeMessage;
|
|
134
136
|
};
|
|
135
|
-
export type InputsUnion1 = OutputCodeInterpreterCallItem | FunctionCallItem | LocalShellCallItem | McpApprovalRequestItem | McpCallItem | ApplyPatchCallItem | InputsMessage | OutputFunctionCallItem | OutputCustomToolCallItem | OutputFileSearchCallItem | OutputComputerCallItem | OutputDatetimeItem | McpListToolsItem | CustomToolCallItem | ReasoningItem | FunctionCallOutputItem | ApplyPatchCallOutputItem | InputsReasoning | OutputWebSearchCallItem | OutputImageGenerationCallItem | LocalShellCallOutputItem | ShellCallItem | ShellCallOutputItem | McpApprovalResponseItem | CustomToolCallOutputItem | AdditionalToolsItem | OutputWebSearchServerToolItem | OutputCodeInterpreterServerToolItem | OutputFileSearchServerToolItem | OutputImageGenerationServerToolItem | OutputBrowserUseServerToolItem | OutputBashServerToolItem | OutputTextEditorServerToolItem | OutputApplyPatchServerToolItem | OutputWebFetchServerToolItem | OutputToolSearchServerToolItem | OutputMemoryServerToolItem | OutputMcpServerToolItem | OutputSearchModelsServerToolItem | OutputFusionServerToolItem | OutputAdvisorServerToolItem | OutputSubagentServerToolItem | OutputFilesServerToolItem | CompactionItem | ItemReferenceItem | EasyInputMessage | InputMessageItem;
|
|
137
|
+
export type InputsUnion1 = OutputCodeInterpreterCallItem | FunctionCallItem | LocalShellCallItem | McpApprovalRequestItem | McpCallItem | ApplyPatchCallItem | InputsMessage | OutputFunctionCallItem | OutputCustomToolCallItem | OutputFileSearchCallItem | OutputComputerCallItem | OutputDatetimeItem | McpListToolsItem | CustomToolCallItem | AgentMessageItem | ReasoningItem | FunctionCallOutputItem | ApplyPatchCallOutputItem | InputsReasoning | OutputWebSearchCallItem | OutputImageGenerationCallItem | LocalShellCallOutputItem | ShellCallItem | ShellCallOutputItem | McpApprovalResponseItem | CustomToolCallOutputItem | AdditionalToolsItem | OutputWebSearchServerToolItem | OutputCodeInterpreterServerToolItem | OutputFileSearchServerToolItem | OutputImageGenerationServerToolItem | OutputBrowserUseServerToolItem | OutputBashServerToolItem | OutputTextEditorServerToolItem | OutputApplyPatchServerToolItem | OutputWebFetchServerToolItem | OutputToolSearchServerToolItem | OutputMemoryServerToolItem | OutputMcpServerToolItem | OutputSearchModelsServerToolItem | OutputFusionServerToolItem | OutputAdvisorServerToolItem | OutputSubagentServerToolItem | OutputFilesServerToolItem | CompactionItem | ItemReferenceItem | EasyInputMessage | InputMessageItem | ContextCompactionItem;
|
|
136
138
|
/**
|
|
137
139
|
* Input for a response request - can be a string or array of items
|
|
138
140
|
*/
|
|
139
|
-
export type InputsUnion = string | Array<OutputCodeInterpreterCallItem | FunctionCallItem | LocalShellCallItem | McpApprovalRequestItem | McpCallItem | ApplyPatchCallItem | InputsMessage | OutputFunctionCallItem | OutputCustomToolCallItem | OutputFileSearchCallItem | OutputComputerCallItem | OutputDatetimeItem | McpListToolsItem | CustomToolCallItem | ReasoningItem | FunctionCallOutputItem | ApplyPatchCallOutputItem | InputsReasoning | OutputWebSearchCallItem | OutputImageGenerationCallItem | LocalShellCallOutputItem | ShellCallItem | ShellCallOutputItem | McpApprovalResponseItem | CustomToolCallOutputItem | AdditionalToolsItem | OutputWebSearchServerToolItem | OutputCodeInterpreterServerToolItem | OutputFileSearchServerToolItem | OutputImageGenerationServerToolItem | OutputBrowserUseServerToolItem | OutputBashServerToolItem | OutputTextEditorServerToolItem | OutputApplyPatchServerToolItem | OutputWebFetchServerToolItem | OutputToolSearchServerToolItem | OutputMemoryServerToolItem | OutputMcpServerToolItem | OutputSearchModelsServerToolItem | OutputFusionServerToolItem | OutputAdvisorServerToolItem | OutputSubagentServerToolItem | OutputFilesServerToolItem | CompactionItem | ItemReferenceItem | EasyInputMessage | InputMessageItem>;
|
|
141
|
+
export type InputsUnion = string | Array<OutputCodeInterpreterCallItem | FunctionCallItem | LocalShellCallItem | McpApprovalRequestItem | McpCallItem | ApplyPatchCallItem | InputsMessage | OutputFunctionCallItem | OutputCustomToolCallItem | OutputFileSearchCallItem | OutputComputerCallItem | OutputDatetimeItem | McpListToolsItem | CustomToolCallItem | AgentMessageItem | ReasoningItem | FunctionCallOutputItem | ApplyPatchCallOutputItem | InputsReasoning | OutputWebSearchCallItem | OutputImageGenerationCallItem | LocalShellCallOutputItem | ShellCallItem | ShellCallOutputItem | McpApprovalResponseItem | CustomToolCallOutputItem | AdditionalToolsItem | OutputWebSearchServerToolItem | OutputCodeInterpreterServerToolItem | OutputFileSearchServerToolItem | OutputImageGenerationServerToolItem | OutputBrowserUseServerToolItem | OutputBashServerToolItem | OutputTextEditorServerToolItem | OutputApplyPatchServerToolItem | OutputWebFetchServerToolItem | OutputToolSearchServerToolItem | OutputMemoryServerToolItem | OutputMcpServerToolItem | OutputSearchModelsServerToolItem | OutputFusionServerToolItem | OutputAdvisorServerToolItem | OutputSubagentServerToolItem | OutputFilesServerToolItem | CompactionItem | ItemReferenceItem | EasyInputMessage | InputMessageItem | ContextCompactionItem>;
|
|
140
142
|
/** @internal */
|
|
141
143
|
export declare const InputsStatusInProgress2$outboundSchema: z.ZodEnum<typeof InputsStatusInProgress2>;
|
|
142
144
|
/** @internal */
|
|
@@ -211,12 +213,12 @@ export type InputsMessage$Outbound = {
|
|
|
211
213
|
export declare const InputsMessage$outboundSchema: z.ZodType<InputsMessage$Outbound, InputsMessage>;
|
|
212
214
|
export declare function inputsMessageToJSON(inputsMessage: InputsMessage): string;
|
|
213
215
|
/** @internal */
|
|
214
|
-
export type InputsUnion1$Outbound = OutputCodeInterpreterCallItem$Outbound | FunctionCallItem$Outbound | LocalShellCallItem$Outbound | McpApprovalRequestItem$Outbound | McpCallItem$Outbound | ApplyPatchCallItem$Outbound | InputsMessage$Outbound | OutputFunctionCallItem$Outbound | OutputCustomToolCallItem$Outbound | OutputFileSearchCallItem$Outbound | OutputComputerCallItem$Outbound | OutputDatetimeItem$Outbound | McpListToolsItem$Outbound | CustomToolCallItem$Outbound | ReasoningItem$Outbound | FunctionCallOutputItem$Outbound | ApplyPatchCallOutputItem$Outbound | InputsReasoning$Outbound | OutputWebSearchCallItem$Outbound | OutputImageGenerationCallItem$Outbound | LocalShellCallOutputItem$Outbound | ShellCallItem$Outbound | ShellCallOutputItem$Outbound | McpApprovalResponseItem$Outbound | CustomToolCallOutputItem$Outbound | AdditionalToolsItem$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 | CompactionItem$Outbound | ItemReferenceItem$Outbound | EasyInputMessage$Outbound | InputMessageItem$Outbound;
|
|
216
|
+
export type InputsUnion1$Outbound = OutputCodeInterpreterCallItem$Outbound | FunctionCallItem$Outbound | LocalShellCallItem$Outbound | McpApprovalRequestItem$Outbound | McpCallItem$Outbound | ApplyPatchCallItem$Outbound | InputsMessage$Outbound | OutputFunctionCallItem$Outbound | OutputCustomToolCallItem$Outbound | OutputFileSearchCallItem$Outbound | OutputComputerCallItem$Outbound | OutputDatetimeItem$Outbound | McpListToolsItem$Outbound | CustomToolCallItem$Outbound | AgentMessageItem$Outbound | ReasoningItem$Outbound | FunctionCallOutputItem$Outbound | ApplyPatchCallOutputItem$Outbound | InputsReasoning$Outbound | OutputWebSearchCallItem$Outbound | OutputImageGenerationCallItem$Outbound | LocalShellCallOutputItem$Outbound | ShellCallItem$Outbound | ShellCallOutputItem$Outbound | McpApprovalResponseItem$Outbound | CustomToolCallOutputItem$Outbound | AdditionalToolsItem$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 | CompactionItem$Outbound | ItemReferenceItem$Outbound | EasyInputMessage$Outbound | InputMessageItem$Outbound | ContextCompactionItem$Outbound;
|
|
215
217
|
/** @internal */
|
|
216
218
|
export declare const InputsUnion1$outboundSchema: z.ZodType<InputsUnion1$Outbound, InputsUnion1>;
|
|
217
219
|
export declare function inputsUnion1ToJSON(inputsUnion1: InputsUnion1): string;
|
|
218
220
|
/** @internal */
|
|
219
|
-
export type InputsUnion$Outbound = string | Array<OutputCodeInterpreterCallItem$Outbound | FunctionCallItem$Outbound | LocalShellCallItem$Outbound | McpApprovalRequestItem$Outbound | McpCallItem$Outbound | ApplyPatchCallItem$Outbound | InputsMessage$Outbound | OutputFunctionCallItem$Outbound | OutputCustomToolCallItem$Outbound | OutputFileSearchCallItem$Outbound | OutputComputerCallItem$Outbound | OutputDatetimeItem$Outbound | McpListToolsItem$Outbound | CustomToolCallItem$Outbound | ReasoningItem$Outbound | FunctionCallOutputItem$Outbound | ApplyPatchCallOutputItem$Outbound | InputsReasoning$Outbound | OutputWebSearchCallItem$Outbound | OutputImageGenerationCallItem$Outbound | LocalShellCallOutputItem$Outbound | ShellCallItem$Outbound | ShellCallOutputItem$Outbound | McpApprovalResponseItem$Outbound | CustomToolCallOutputItem$Outbound | AdditionalToolsItem$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 | CompactionItem$Outbound | ItemReferenceItem$Outbound | EasyInputMessage$Outbound | InputMessageItem$Outbound>;
|
|
221
|
+
export type InputsUnion$Outbound = string | Array<OutputCodeInterpreterCallItem$Outbound | FunctionCallItem$Outbound | LocalShellCallItem$Outbound | McpApprovalRequestItem$Outbound | McpCallItem$Outbound | ApplyPatchCallItem$Outbound | InputsMessage$Outbound | OutputFunctionCallItem$Outbound | OutputCustomToolCallItem$Outbound | OutputFileSearchCallItem$Outbound | OutputComputerCallItem$Outbound | OutputDatetimeItem$Outbound | McpListToolsItem$Outbound | CustomToolCallItem$Outbound | AgentMessageItem$Outbound | ReasoningItem$Outbound | FunctionCallOutputItem$Outbound | ApplyPatchCallOutputItem$Outbound | InputsReasoning$Outbound | OutputWebSearchCallItem$Outbound | OutputImageGenerationCallItem$Outbound | LocalShellCallOutputItem$Outbound | ShellCallItem$Outbound | ShellCallOutputItem$Outbound | McpApprovalResponseItem$Outbound | CustomToolCallOutputItem$Outbound | AdditionalToolsItem$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 | CompactionItem$Outbound | ItemReferenceItem$Outbound | EasyInputMessage$Outbound | InputMessageItem$Outbound | ContextCompactionItem$Outbound>;
|
|
220
222
|
/** @internal */
|
|
221
223
|
export declare const InputsUnion$outboundSchema: z.ZodType<InputsUnion$Outbound, InputsUnion>;
|
|
222
224
|
export declare function inputsUnionToJSON(inputsUnion: InputsUnion): string;
|
|
@@ -5,9 +5,11 @@
|
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
6
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
7
|
import { AdditionalToolsItem$outboundSchema, } from "./additionaltoolsitem.js";
|
|
8
|
+
import { AgentMessageItem$outboundSchema, } from "./agentmessageitem.js";
|
|
8
9
|
import { ApplyPatchCallItem$outboundSchema, } from "./applypatchcallitem.js";
|
|
9
10
|
import { ApplyPatchCallOutputItem$outboundSchema, } from "./applypatchcalloutputitem.js";
|
|
10
11
|
import { CompactionItem$outboundSchema, } from "./compactionitem.js";
|
|
12
|
+
import { ContextCompactionItem$outboundSchema, } from "./contextcompactionitem.js";
|
|
11
13
|
import { CustomToolCallItem$outboundSchema, } from "./customtoolcallitem.js";
|
|
12
14
|
import { CustomToolCallOutputItem$outboundSchema, } from "./customtoolcalloutputitem.js";
|
|
13
15
|
import { EasyInputMessage$outboundSchema, } from "./easyinputmessage.js";
|
|
@@ -221,6 +223,7 @@ export const InputsUnion1$outboundSchema = z.union([
|
|
|
221
223
|
OutputDatetimeItem$outboundSchema,
|
|
222
224
|
McpListToolsItem$outboundSchema,
|
|
223
225
|
CustomToolCallItem$outboundSchema,
|
|
226
|
+
AgentMessageItem$outboundSchema,
|
|
224
227
|
ReasoningItem$outboundSchema,
|
|
225
228
|
FunctionCallOutputItem$outboundSchema,
|
|
226
229
|
ApplyPatchCallOutputItem$outboundSchema,
|
|
@@ -254,6 +257,7 @@ export const InputsUnion1$outboundSchema = z.union([
|
|
|
254
257
|
ItemReferenceItem$outboundSchema,
|
|
255
258
|
EasyInputMessage$outboundSchema,
|
|
256
259
|
InputMessageItem$outboundSchema,
|
|
260
|
+
ContextCompactionItem$outboundSchema,
|
|
257
261
|
]);
|
|
258
262
|
export function inputsUnion1ToJSON(inputsUnion1) {
|
|
259
263
|
return JSON.stringify(InputsUnion1$outboundSchema.parse(inputsUnion1));
|
|
@@ -276,6 +280,7 @@ export const InputsUnion$outboundSchema = z.union([
|
|
|
276
280
|
OutputDatetimeItem$outboundSchema,
|
|
277
281
|
McpListToolsItem$outboundSchema,
|
|
278
282
|
CustomToolCallItem$outboundSchema,
|
|
283
|
+
AgentMessageItem$outboundSchema,
|
|
279
284
|
ReasoningItem$outboundSchema,
|
|
280
285
|
FunctionCallOutputItem$outboundSchema,
|
|
281
286
|
ApplyPatchCallOutputItem$outboundSchema,
|
|
@@ -309,6 +314,7 @@ export const InputsUnion$outboundSchema = z.union([
|
|
|
309
314
|
ItemReferenceItem$outboundSchema,
|
|
310
315
|
EasyInputMessage$outboundSchema,
|
|
311
316
|
InputMessageItem$outboundSchema,
|
|
317
|
+
ContextCompactionItem$outboundSchema,
|
|
312
318
|
])),
|
|
313
319
|
]);
|
|
314
320
|
export function inputsUnionToJSON(inputsUnion) {
|
|
@@ -23,6 +23,49 @@ export type QueryAnalyticsGlobals = {
|
|
|
23
23
|
*/
|
|
24
24
|
appCategories?: string | undefined;
|
|
25
25
|
};
|
|
26
|
+
/**
|
|
27
|
+
* Group results by custom classifier tags, breaking down metrics by the specified dimension values. Requires an active classifier on the workspace.
|
|
28
|
+
*/
|
|
29
|
+
export type ClassifierDimensions = {
|
|
30
|
+
/**
|
|
31
|
+
* UUID of the classifier whose tags to group by.
|
|
32
|
+
*/
|
|
33
|
+
classifierId: string;
|
|
34
|
+
dimensionNames?: Array<string> | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* When true, also include generations that have no tag from this classifier. Defaults to false, which returns only classified generations.
|
|
37
|
+
*/
|
|
38
|
+
includeNulls?: boolean | undefined;
|
|
39
|
+
};
|
|
40
|
+
export type ValueClassifierFilters = string | number;
|
|
41
|
+
/**
|
|
42
|
+
* Filter value. Use a scalar (string or number) for eq/neq, or an array for in/not_in.
|
|
43
|
+
*/
|
|
44
|
+
export type ClassifierFiltersValue = string | number | Array<string | number>;
|
|
45
|
+
export type ClassifierFiltersFilter = {
|
|
46
|
+
/**
|
|
47
|
+
* Classifier dimension name to filter on (snake_case identifier, e.g. "department", "work_type").
|
|
48
|
+
*/
|
|
49
|
+
field: string;
|
|
50
|
+
/**
|
|
51
|
+
* Filter operator. Only equality/set operators are supported (eq, neq, in, not_in) — ordered comparisons are not available because classification values are strings.
|
|
52
|
+
*/
|
|
53
|
+
operator: string;
|
|
54
|
+
/**
|
|
55
|
+
* Filter value. Use a scalar (string or number) for eq/neq, or an array for in/not_in.
|
|
56
|
+
*/
|
|
57
|
+
value: string | number | Array<string | number>;
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Filter results to generations with specific classifier tag values. Can be combined with classifier_dimensions (must use the same classifier_id) or used independently with standard dimensions.
|
|
61
|
+
*/
|
|
62
|
+
export type ClassifierFilters = {
|
|
63
|
+
/**
|
|
64
|
+
* UUID of the classifier whose tags to filter by. Must match classifier_dimensions.classifier_id when both are specified.
|
|
65
|
+
*/
|
|
66
|
+
classifierId: string;
|
|
67
|
+
filters: Array<ClassifierFiltersFilter>;
|
|
68
|
+
};
|
|
26
69
|
export type Value2 = string | number;
|
|
27
70
|
/**
|
|
28
71
|
* Filter value (scalar or array depending on operator). Several dimensions are enriched in responses (returned as human-readable labels), but filters must use the underlying ID: `api_key_id` — numeric ID (from generation metadata) or key hash (64-char hex from GET /api/v1/keys, resolved server-side); `user` — Clerk user ID (e.g. "user_abc123"), not the display name; `workspace` — workspace UUID, not the workspace name; `app` — numeric app ID, not the app title; `model` — permaslug (e.g. "openai/gpt-4o"), not the display name. Other dimensions (provider, origin, country, etc.) are not enriched and accept the value as returned.
|
|
@@ -59,6 +102,14 @@ export type TimeRange = {
|
|
|
59
102
|
start: Date;
|
|
60
103
|
};
|
|
61
104
|
export type QueryAnalyticsRequestBody = {
|
|
105
|
+
/**
|
|
106
|
+
* Group results by custom classifier tags, breaking down metrics by the specified dimension values. Requires an active classifier on the workspace.
|
|
107
|
+
*/
|
|
108
|
+
classifierDimensions?: ClassifierDimensions | undefined;
|
|
109
|
+
/**
|
|
110
|
+
* Filter results to generations with specific classifier tag values. Can be combined with classifier_dimensions (must use the same classifier_id) or used independently with standard dimensions.
|
|
111
|
+
*/
|
|
112
|
+
classifierFilters?: ClassifierFilters | undefined;
|
|
62
113
|
dimensions?: Array<string> | undefined;
|
|
63
114
|
filters?: Array<Filter> | undefined;
|
|
64
115
|
/**
|
|
@@ -124,6 +175,42 @@ export type QueryAnalyticsResponse = {
|
|
|
124
175
|
data: QueryAnalyticsData2;
|
|
125
176
|
};
|
|
126
177
|
/** @internal */
|
|
178
|
+
export type ClassifierDimensions$Outbound = {
|
|
179
|
+
classifier_id: string;
|
|
180
|
+
dimension_names?: Array<string> | undefined;
|
|
181
|
+
include_nulls?: boolean | undefined;
|
|
182
|
+
};
|
|
183
|
+
/** @internal */
|
|
184
|
+
export declare const ClassifierDimensions$outboundSchema: z.ZodType<ClassifierDimensions$Outbound, ClassifierDimensions>;
|
|
185
|
+
export declare function classifierDimensionsToJSON(classifierDimensions: ClassifierDimensions): string;
|
|
186
|
+
/** @internal */
|
|
187
|
+
export type ValueClassifierFilters$Outbound = string | number;
|
|
188
|
+
/** @internal */
|
|
189
|
+
export declare const ValueClassifierFilters$outboundSchema: z.ZodType<ValueClassifierFilters$Outbound, ValueClassifierFilters>;
|
|
190
|
+
export declare function valueClassifierFiltersToJSON(valueClassifierFilters: ValueClassifierFilters): string;
|
|
191
|
+
/** @internal */
|
|
192
|
+
export type ClassifierFiltersValue$Outbound = string | number | Array<string | number>;
|
|
193
|
+
/** @internal */
|
|
194
|
+
export declare const ClassifierFiltersValue$outboundSchema: z.ZodType<ClassifierFiltersValue$Outbound, ClassifierFiltersValue>;
|
|
195
|
+
export declare function classifierFiltersValueToJSON(classifierFiltersValue: ClassifierFiltersValue): string;
|
|
196
|
+
/** @internal */
|
|
197
|
+
export type ClassifierFiltersFilter$Outbound = {
|
|
198
|
+
field: string;
|
|
199
|
+
operator: string;
|
|
200
|
+
value: string | number | Array<string | number>;
|
|
201
|
+
};
|
|
202
|
+
/** @internal */
|
|
203
|
+
export declare const ClassifierFiltersFilter$outboundSchema: z.ZodType<ClassifierFiltersFilter$Outbound, ClassifierFiltersFilter>;
|
|
204
|
+
export declare function classifierFiltersFilterToJSON(classifierFiltersFilter: ClassifierFiltersFilter): string;
|
|
205
|
+
/** @internal */
|
|
206
|
+
export type ClassifierFilters$Outbound = {
|
|
207
|
+
classifier_id: string;
|
|
208
|
+
filters: Array<ClassifierFiltersFilter$Outbound>;
|
|
209
|
+
};
|
|
210
|
+
/** @internal */
|
|
211
|
+
export declare const ClassifierFilters$outboundSchema: z.ZodType<ClassifierFilters$Outbound, ClassifierFilters>;
|
|
212
|
+
export declare function classifierFiltersToJSON(classifierFilters: ClassifierFilters): string;
|
|
213
|
+
/** @internal */
|
|
127
214
|
export type Value2$Outbound = string | number;
|
|
128
215
|
/** @internal */
|
|
129
216
|
export declare const Value2$outboundSchema: z.ZodType<Value2$Outbound, Value2>;
|
|
@@ -162,6 +249,8 @@ export declare const TimeRange$outboundSchema: z.ZodType<TimeRange$Outbound, Tim
|
|
|
162
249
|
export declare function timeRangeToJSON(timeRange: TimeRange): string;
|
|
163
250
|
/** @internal */
|
|
164
251
|
export type QueryAnalyticsRequestBody$Outbound = {
|
|
252
|
+
classifier_dimensions?: ClassifierDimensions$Outbound | undefined;
|
|
253
|
+
classifier_filters?: ClassifierFilters$Outbound | undefined;
|
|
165
254
|
dimensions?: Array<string> | undefined;
|
|
166
255
|
filters?: Array<Filter$Outbound> | undefined;
|
|
167
256
|
granularity?: string | undefined;
|
|
@@ -11,6 +11,60 @@ export const Direction = {
|
|
|
11
11
|
Desc: "desc",
|
|
12
12
|
};
|
|
13
13
|
/** @internal */
|
|
14
|
+
export const ClassifierDimensions$outboundSchema = z.object({
|
|
15
|
+
classifierId: z.string(),
|
|
16
|
+
dimensionNames: z.array(z.string()).optional(),
|
|
17
|
+
includeNulls: z.boolean().optional(),
|
|
18
|
+
}).transform((v) => {
|
|
19
|
+
return remap$(v, {
|
|
20
|
+
classifierId: "classifier_id",
|
|
21
|
+
dimensionNames: "dimension_names",
|
|
22
|
+
includeNulls: "include_nulls",
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
export function classifierDimensionsToJSON(classifierDimensions) {
|
|
26
|
+
return JSON.stringify(ClassifierDimensions$outboundSchema.parse(classifierDimensions));
|
|
27
|
+
}
|
|
28
|
+
/** @internal */
|
|
29
|
+
export const ValueClassifierFilters$outboundSchema = z.union([z.string(), z.number()]);
|
|
30
|
+
export function valueClassifierFiltersToJSON(valueClassifierFilters) {
|
|
31
|
+
return JSON.stringify(ValueClassifierFilters$outboundSchema.parse(valueClassifierFilters));
|
|
32
|
+
}
|
|
33
|
+
/** @internal */
|
|
34
|
+
export const ClassifierFiltersValue$outboundSchema = z.union([
|
|
35
|
+
z.string(),
|
|
36
|
+
z.number(),
|
|
37
|
+
z.array(z.union([z.string(), z.number()])),
|
|
38
|
+
]);
|
|
39
|
+
export function classifierFiltersValueToJSON(classifierFiltersValue) {
|
|
40
|
+
return JSON.stringify(ClassifierFiltersValue$outboundSchema.parse(classifierFiltersValue));
|
|
41
|
+
}
|
|
42
|
+
/** @internal */
|
|
43
|
+
export const ClassifierFiltersFilter$outboundSchema = z.object({
|
|
44
|
+
field: z.string(),
|
|
45
|
+
operator: z.string(),
|
|
46
|
+
value: z.union([
|
|
47
|
+
z.string(),
|
|
48
|
+
z.number(),
|
|
49
|
+
z.array(z.union([z.string(), z.number()])),
|
|
50
|
+
]),
|
|
51
|
+
});
|
|
52
|
+
export function classifierFiltersFilterToJSON(classifierFiltersFilter) {
|
|
53
|
+
return JSON.stringify(ClassifierFiltersFilter$outboundSchema.parse(classifierFiltersFilter));
|
|
54
|
+
}
|
|
55
|
+
/** @internal */
|
|
56
|
+
export const ClassifierFilters$outboundSchema = z.object({
|
|
57
|
+
classifierId: z.string(),
|
|
58
|
+
filters: z.array(z.lazy(() => ClassifierFiltersFilter$outboundSchema)),
|
|
59
|
+
}).transform((v) => {
|
|
60
|
+
return remap$(v, {
|
|
61
|
+
classifierId: "classifier_id",
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
export function classifierFiltersToJSON(classifierFilters) {
|
|
65
|
+
return JSON.stringify(ClassifierFilters$outboundSchema.parse(classifierFilters));
|
|
66
|
+
}
|
|
67
|
+
/** @internal */
|
|
14
68
|
export const Value2$outboundSchema = z
|
|
15
69
|
.union([z.string(), z.number()]);
|
|
16
70
|
export function value2ToJSON(value2) {
|
|
@@ -58,6 +112,9 @@ export function timeRangeToJSON(timeRange) {
|
|
|
58
112
|
}
|
|
59
113
|
/** @internal */
|
|
60
114
|
export const QueryAnalyticsRequestBody$outboundSchema = z.object({
|
|
115
|
+
classifierDimensions: z.lazy(() => ClassifierDimensions$outboundSchema)
|
|
116
|
+
.optional(),
|
|
117
|
+
classifierFilters: z.lazy(() => ClassifierFilters$outboundSchema).optional(),
|
|
61
118
|
dimensions: z.array(z.string()).optional(),
|
|
62
119
|
filters: z.array(z.lazy(() => Filter$outboundSchema)).optional(),
|
|
63
120
|
granularity: z.string().optional(),
|
|
@@ -68,6 +125,8 @@ export const QueryAnalyticsRequestBody$outboundSchema = z.object({
|
|
|
68
125
|
timeRange: z.lazy(() => TimeRange$outboundSchema).optional(),
|
|
69
126
|
}).transform((v) => {
|
|
70
127
|
return remap$(v, {
|
|
128
|
+
classifierDimensions: "classifier_dimensions",
|
|
129
|
+
classifierFilters: "classifier_filters",
|
|
71
130
|
groupLimit: "group_limit",
|
|
72
131
|
orderBy: "order_by",
|
|
73
132
|
timeRange: "time_range",
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openrouter/sdk",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.41",
|
|
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",
|
|
75
75
|
"prepublishOnly": "npm run build",
|
|
76
|
+
"prepare": "npm run build",
|
|
77
|
+
"test:e2e": "vitest --run --project e2e",
|
|
78
|
+
"test:transit": "exit 0",
|
|
79
|
+
"typecheck:transit": "exit 0",
|
|
76
80
|
"compile": "tsc",
|
|
77
81
|
"postinstall": "node scripts/check-types.js || true",
|
|
78
|
-
"prepare": "npm run build",
|
|
79
82
|
"test": "vitest --run --project unit",
|
|
80
|
-
"test:transit": "exit 0",
|
|
81
83
|
"test:watch": "vitest --watch --project unit",
|
|
82
|
-
"typecheck": "tsc --noEmit"
|
|
83
|
-
"typecheck:transit": "exit 0",
|
|
84
|
-
"test:e2e": "vitest --run --project e2e"
|
|
84
|
+
"typecheck": "tsc --noEmit"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {},
|
|
87
87
|
"devDependencies": {
|