@openrouter/sdk 1.5.23 → 1.5.24
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/classifierfiltersfilter.d.ts +10 -0
- package/esm/models/classifierfiltersfilter.js +16 -0
- package/esm/models/classifierscalarfilter.d.ts +35 -0
- package/esm/models/classifierscalarfilter.js +21 -0
- package/esm/models/classifierscalarfilteroperator.d.ts +16 -0
- package/esm/models/classifierscalarfilteroperator.js +15 -0
- package/esm/models/classifiersetfilter.d.ts +32 -0
- package/esm/models/classifiersetfilter.js +21 -0
- package/esm/models/classifiersetfilteroperator.d.ts +16 -0
- package/esm/models/classifiersetfilteroperator.js +15 -0
- package/esm/models/filter.d.ts +10 -0
- package/esm/models/filter.js +14 -0
- package/esm/models/imagegenerationrequest.d.ts +2 -2
- package/esm/models/index.d.ts +11 -0
- package/esm/models/index.js +11 -0
- package/esm/models/observabilityfilterrulegroup.d.ts +5 -5
- package/esm/models/observabilityfilterrulegroup.js +5 -7
- package/esm/models/operations/deleteinternvaultsecret.d.ts +1 -1
- package/esm/models/operations/deletevaultsecret.d.ts +1 -1
- package/esm/models/operations/getanalyticsmeta.d.ts +6 -50
- package/esm/models/operations/getanalyticsmeta.js +6 -41
- package/esm/models/operations/queryanalytics.d.ts +5 -85
- package/esm/models/operations/queryanalytics.js +3 -60
- package/esm/models/operator.d.ts +50 -0
- package/esm/models/operator.js +46 -0
- package/esm/models/scalarfilter.d.ts +35 -0
- package/esm/models/scalarfilter.js +21 -0
- package/esm/models/scalarfilteroperator.d.ts +20 -0
- package/esm/models/scalarfilteroperator.js +19 -0
- package/esm/models/setfilter.d.ts +37 -0
- package/esm/models/setfilter.js +27 -0
- package/esm/models/setfilteroperator.d.ts +16 -0
- package/esm/models/setfilteroperator.js +15 -0
- package/esm/models/vaultsecretwriterequest.d.ts +1 -1
- package/jsr.json +1 -1
- package/package.json +8 -8
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.24";
|
|
54
54
|
readonly genVersion: "2.950.13";
|
|
55
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.5.
|
|
55
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.5.24 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.24",
|
|
33
33
|
genVersion: "2.950.13",
|
|
34
|
-
userAgent: "speakeasy-sdk/typescript 1.5.
|
|
34
|
+
userAgent: "speakeasy-sdk/typescript 1.5.24 2.950.13 1.0.0 @openrouter/sdk",
|
|
35
35
|
};
|
|
36
36
|
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { ClassifierScalarFilter, ClassifierScalarFilter$Outbound } from "./classifierscalarfilter.js";
|
|
3
|
+
import { ClassifierSetFilter, ClassifierSetFilter$Outbound } from "./classifiersetfilter.js";
|
|
4
|
+
export type ClassifierFiltersFilter = ClassifierScalarFilter | ClassifierSetFilter;
|
|
5
|
+
/** @internal */
|
|
6
|
+
export type ClassifierFiltersFilter$Outbound = ClassifierScalarFilter$Outbound | ClassifierSetFilter$Outbound;
|
|
7
|
+
/** @internal */
|
|
8
|
+
export declare const ClassifierFiltersFilter$outboundSchema: z.ZodType<ClassifierFiltersFilter$Outbound, ClassifierFiltersFilter>;
|
|
9
|
+
export declare function classifierFiltersFilterToJSON(classifierFiltersFilter: ClassifierFiltersFilter): string;
|
|
10
|
+
//# sourceMappingURL=classifierfiltersfilter.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 0dfaa0b42d0d
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { ClassifierScalarFilter$outboundSchema, } from "./classifierscalarfilter.js";
|
|
7
|
+
import { ClassifierSetFilter$outboundSchema, } from "./classifiersetfilter.js";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const ClassifierFiltersFilter$outboundSchema = z.union([
|
|
10
|
+
ClassifierScalarFilter$outboundSchema,
|
|
11
|
+
ClassifierSetFilter$outboundSchema,
|
|
12
|
+
]);
|
|
13
|
+
export function classifierFiltersFilterToJSON(classifierFiltersFilter) {
|
|
14
|
+
return JSON.stringify(ClassifierFiltersFilter$outboundSchema.parse(classifierFiltersFilter));
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=classifierfiltersfilter.js.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { ClassifierScalarFilterOperator } from "./classifierscalarfilteroperator.js";
|
|
3
|
+
/**
|
|
4
|
+
* Scalar (string or number) filter value.
|
|
5
|
+
*/
|
|
6
|
+
export type ClassifierScalarFilterValue = string | number;
|
|
7
|
+
export type ClassifierScalarFilter = {
|
|
8
|
+
/**
|
|
9
|
+
* Classifier dimension name to filter on (snake_case identifier, e.g. "department", "work_type").
|
|
10
|
+
*/
|
|
11
|
+
field: string;
|
|
12
|
+
/**
|
|
13
|
+
* Equality operator taking a scalar filter value. Ordered comparisons are not available because classification values are strings.
|
|
14
|
+
*/
|
|
15
|
+
operator: ClassifierScalarFilterOperator;
|
|
16
|
+
/**
|
|
17
|
+
* Scalar (string or number) filter value.
|
|
18
|
+
*/
|
|
19
|
+
value: string | number;
|
|
20
|
+
};
|
|
21
|
+
/** @internal */
|
|
22
|
+
export type ClassifierScalarFilterValue$Outbound = string | number;
|
|
23
|
+
/** @internal */
|
|
24
|
+
export declare const ClassifierScalarFilterValue$outboundSchema: z.ZodType<ClassifierScalarFilterValue$Outbound, ClassifierScalarFilterValue>;
|
|
25
|
+
export declare function classifierScalarFilterValueToJSON(classifierScalarFilterValue: ClassifierScalarFilterValue): string;
|
|
26
|
+
/** @internal */
|
|
27
|
+
export type ClassifierScalarFilter$Outbound = {
|
|
28
|
+
field: string;
|
|
29
|
+
operator: string;
|
|
30
|
+
value: string | number;
|
|
31
|
+
};
|
|
32
|
+
/** @internal */
|
|
33
|
+
export declare const ClassifierScalarFilter$outboundSchema: z.ZodType<ClassifierScalarFilter$Outbound, ClassifierScalarFilter>;
|
|
34
|
+
export declare function classifierScalarFilterToJSON(classifierScalarFilter: ClassifierScalarFilter): string;
|
|
35
|
+
//# sourceMappingURL=classifierscalarfilter.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 46c64a60f2ad
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { ClassifierScalarFilterOperator$outboundSchema, } from "./classifierscalarfilteroperator.js";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export const ClassifierScalarFilterValue$outboundSchema = z.union([z.string(), z.number()]);
|
|
9
|
+
export function classifierScalarFilterValueToJSON(classifierScalarFilterValue) {
|
|
10
|
+
return JSON.stringify(ClassifierScalarFilterValue$outboundSchema.parse(classifierScalarFilterValue));
|
|
11
|
+
}
|
|
12
|
+
/** @internal */
|
|
13
|
+
export const ClassifierScalarFilter$outboundSchema = z.object({
|
|
14
|
+
field: z.string(),
|
|
15
|
+
operator: ClassifierScalarFilterOperator$outboundSchema,
|
|
16
|
+
value: z.union([z.string(), z.number()]),
|
|
17
|
+
});
|
|
18
|
+
export function classifierScalarFilterToJSON(classifierScalarFilter) {
|
|
19
|
+
return JSON.stringify(ClassifierScalarFilter$outboundSchema.parse(classifierScalarFilter));
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=classifierscalarfilter.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { OpenEnum } from "../types/enums.js";
|
|
3
|
+
/**
|
|
4
|
+
* Equality operator taking a scalar filter value. Ordered comparisons are not available because classification values are strings.
|
|
5
|
+
*/
|
|
6
|
+
export declare const ClassifierScalarFilterOperator: {
|
|
7
|
+
readonly Eq: "eq";
|
|
8
|
+
readonly Neq: "neq";
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Equality operator taking a scalar filter value. Ordered comparisons are not available because classification values are strings.
|
|
12
|
+
*/
|
|
13
|
+
export type ClassifierScalarFilterOperator = OpenEnum<typeof ClassifierScalarFilterOperator>;
|
|
14
|
+
/** @internal */
|
|
15
|
+
export declare const ClassifierScalarFilterOperator$outboundSchema: z.ZodType<string, ClassifierScalarFilterOperator>;
|
|
16
|
+
//# sourceMappingURL=classifierscalarfilteroperator.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: be3daabcb488
|
|
4
|
+
*/
|
|
5
|
+
import * as openEnums from "../types/enums.js";
|
|
6
|
+
/**
|
|
7
|
+
* Equality operator taking a scalar filter value. Ordered comparisons are not available because classification values are strings.
|
|
8
|
+
*/
|
|
9
|
+
export const ClassifierScalarFilterOperator = {
|
|
10
|
+
Eq: "eq",
|
|
11
|
+
Neq: "neq",
|
|
12
|
+
};
|
|
13
|
+
/** @internal */
|
|
14
|
+
export const ClassifierScalarFilterOperator$outboundSchema = openEnums.outboundSchema(ClassifierScalarFilterOperator);
|
|
15
|
+
//# sourceMappingURL=classifierscalarfilteroperator.js.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { ClassifierSetFilterOperator } from "./classifiersetfilteroperator.js";
|
|
3
|
+
export type ClassifierSetFilterValue = string | number;
|
|
4
|
+
export type ClassifierSetFilter = {
|
|
5
|
+
/**
|
|
6
|
+
* Classifier dimension name to filter on (snake_case identifier, e.g. "department", "work_type").
|
|
7
|
+
*/
|
|
8
|
+
field: string;
|
|
9
|
+
/**
|
|
10
|
+
* Set-membership operator taking an array filter value.
|
|
11
|
+
*/
|
|
12
|
+
operator: ClassifierSetFilterOperator;
|
|
13
|
+
/**
|
|
14
|
+
* Array of scalar filter values.
|
|
15
|
+
*/
|
|
16
|
+
value: Array<string | number>;
|
|
17
|
+
};
|
|
18
|
+
/** @internal */
|
|
19
|
+
export type ClassifierSetFilterValue$Outbound = string | number;
|
|
20
|
+
/** @internal */
|
|
21
|
+
export declare const ClassifierSetFilterValue$outboundSchema: z.ZodType<ClassifierSetFilterValue$Outbound, ClassifierSetFilterValue>;
|
|
22
|
+
export declare function classifierSetFilterValueToJSON(classifierSetFilterValue: ClassifierSetFilterValue): string;
|
|
23
|
+
/** @internal */
|
|
24
|
+
export type ClassifierSetFilter$Outbound = {
|
|
25
|
+
field: string;
|
|
26
|
+
operator: string;
|
|
27
|
+
value: Array<string | number>;
|
|
28
|
+
};
|
|
29
|
+
/** @internal */
|
|
30
|
+
export declare const ClassifierSetFilter$outboundSchema: z.ZodType<ClassifierSetFilter$Outbound, ClassifierSetFilter>;
|
|
31
|
+
export declare function classifierSetFilterToJSON(classifierSetFilter: ClassifierSetFilter): string;
|
|
32
|
+
//# sourceMappingURL=classifiersetfilter.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 469f32f201f3
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { ClassifierSetFilterOperator$outboundSchema, } from "./classifiersetfilteroperator.js";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export const ClassifierSetFilterValue$outboundSchema = z.union([z.string(), z.number()]);
|
|
9
|
+
export function classifierSetFilterValueToJSON(classifierSetFilterValue) {
|
|
10
|
+
return JSON.stringify(ClassifierSetFilterValue$outboundSchema.parse(classifierSetFilterValue));
|
|
11
|
+
}
|
|
12
|
+
/** @internal */
|
|
13
|
+
export const ClassifierSetFilter$outboundSchema = z.object({
|
|
14
|
+
field: z.string(),
|
|
15
|
+
operator: ClassifierSetFilterOperator$outboundSchema,
|
|
16
|
+
value: z.array(z.union([z.string(), z.number()])),
|
|
17
|
+
});
|
|
18
|
+
export function classifierSetFilterToJSON(classifierSetFilter) {
|
|
19
|
+
return JSON.stringify(ClassifierSetFilter$outboundSchema.parse(classifierSetFilter));
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=classifiersetfilter.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { OpenEnum } from "../types/enums.js";
|
|
3
|
+
/**
|
|
4
|
+
* Set-membership operator taking an array filter value.
|
|
5
|
+
*/
|
|
6
|
+
export declare const ClassifierSetFilterOperator: {
|
|
7
|
+
readonly In: "in";
|
|
8
|
+
readonly NotIn: "not_in";
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Set-membership operator taking an array filter value.
|
|
12
|
+
*/
|
|
13
|
+
export type ClassifierSetFilterOperator = OpenEnum<typeof ClassifierSetFilterOperator>;
|
|
14
|
+
/** @internal */
|
|
15
|
+
export declare const ClassifierSetFilterOperator$outboundSchema: z.ZodType<string, ClassifierSetFilterOperator>;
|
|
16
|
+
//# sourceMappingURL=classifiersetfilteroperator.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 51a625e91249
|
|
4
|
+
*/
|
|
5
|
+
import * as openEnums from "../types/enums.js";
|
|
6
|
+
/**
|
|
7
|
+
* Set-membership operator taking an array filter value.
|
|
8
|
+
*/
|
|
9
|
+
export const ClassifierSetFilterOperator = {
|
|
10
|
+
In: "in",
|
|
11
|
+
NotIn: "not_in",
|
|
12
|
+
};
|
|
13
|
+
/** @internal */
|
|
14
|
+
export const ClassifierSetFilterOperator$outboundSchema = openEnums.outboundSchema(ClassifierSetFilterOperator);
|
|
15
|
+
//# sourceMappingURL=classifiersetfilteroperator.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { ScalarFilter, ScalarFilter$Outbound } from "./scalarfilter.js";
|
|
3
|
+
import { SetFilter, SetFilter$Outbound } from "./setfilter.js";
|
|
4
|
+
export type Filter = ScalarFilter | SetFilter;
|
|
5
|
+
/** @internal */
|
|
6
|
+
export type Filter$Outbound = ScalarFilter$Outbound | SetFilter$Outbound;
|
|
7
|
+
/** @internal */
|
|
8
|
+
export declare const Filter$outboundSchema: z.ZodType<Filter$Outbound, Filter>;
|
|
9
|
+
export declare function filterToJSON(filter: Filter): string;
|
|
10
|
+
//# sourceMappingURL=filter.d.ts.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: bf04a8cd8dcd
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { ScalarFilter$outboundSchema, } from "./scalarfilter.js";
|
|
7
|
+
import { SetFilter$outboundSchema, } from "./setfilter.js";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const Filter$outboundSchema = z
|
|
10
|
+
.union([ScalarFilter$outboundSchema, SetFilter$outboundSchema]);
|
|
11
|
+
export function filterToJSON(filter) {
|
|
12
|
+
return JSON.stringify(Filter$outboundSchema.parse(filter));
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=filter.js.map
|
|
@@ -118,7 +118,7 @@ export type ImageGenerationRequest = {
|
|
|
118
118
|
*/
|
|
119
119
|
n?: number | undefined;
|
|
120
120
|
/**
|
|
121
|
-
* Compression level (0-100) for webp
|
|
121
|
+
* Compression level (0-100) for jpeg/webp output. Ignored by providers without a compression knob; providers that honor it may reject it with other output formats (e.g. OpenAI requires output_format "jpeg" or "webp").
|
|
122
122
|
*/
|
|
123
123
|
outputCompression?: number | undefined;
|
|
124
124
|
/**
|
|
@@ -150,7 +150,7 @@ export type ImageGenerationRequest = {
|
|
|
150
150
|
*/
|
|
151
151
|
sessionId?: string | undefined;
|
|
152
152
|
/**
|
|
153
|
-
* Optional. A convenience shorthand for output dimensions — pass a tier ("2K", "4K") or explicit pixels ("2048x2048")
|
|
153
|
+
* Optional. A convenience shorthand for output dimensions — pass a tier ("2K", "4K") or explicit pixels ("2048x2048"). A tier size is equivalent to setting `resolution` and combines with `aspect_ratio`. Explicit pixel sizes are provider-dependent: providers that accept them treat the value as authoritative and reject a mismatched `resolution` or `aspect_ratio` alongside it with a 400. xAI and Sourceful V2/V2.5 reject explicit pixel sizes (use `resolution` and `aspect_ratio` there); Sourceful V2.6 supports them within its dimension limits and does not allow combining them with `resolution` or `aspect_ratio`.
|
|
154
154
|
*/
|
|
155
155
|
size?: string | undefined;
|
|
156
156
|
/**
|
package/esm/models/index.d.ts
CHANGED
|
@@ -227,6 +227,11 @@ export * from "./chattoolmessage.js";
|
|
|
227
227
|
export * from "./chatusage.js";
|
|
228
228
|
export * from "./chatusermessage.js";
|
|
229
229
|
export * from "./chatwebsearchshorthand.js";
|
|
230
|
+
export * from "./classifierfiltersfilter.js";
|
|
231
|
+
export * from "./classifierscalarfilter.js";
|
|
232
|
+
export * from "./classifierscalarfilteroperator.js";
|
|
233
|
+
export * from "./classifiersetfilter.js";
|
|
234
|
+
export * from "./classifiersetfilteroperator.js";
|
|
230
235
|
export * from "./clientclosedrequestresponseerrordata.js";
|
|
231
236
|
export * from "./codeinterpretercallcodedeltaevent.js";
|
|
232
237
|
export * from "./codeinterpretercallcodedoneevent.js";
|
|
@@ -337,6 +342,7 @@ export * from "./fileresponse.js";
|
|
|
337
342
|
export * from "./filesearchservertool.js";
|
|
338
343
|
export * from "./filesservertool.js";
|
|
339
344
|
export * from "./filesservertoolconfig.js";
|
|
345
|
+
export * from "./filter.js";
|
|
340
346
|
export * from "./finishreason.js";
|
|
341
347
|
export * from "./forbiddenresponseerrordata.js";
|
|
342
348
|
export * from "./formatjsonobjectconfig.js";
|
|
@@ -533,6 +539,7 @@ export * from "./openrouterfiledeleted.js";
|
|
|
533
539
|
export * from "./openrouterfilelist.js";
|
|
534
540
|
export * from "./openroutermetadata.js";
|
|
535
541
|
export * from "./openrouterwebsearchservertool.js";
|
|
542
|
+
export * from "./operator.js";
|
|
536
543
|
export * from "./oranthropicbashtoolresult.js";
|
|
537
544
|
export * from "./oranthropiccontentblock.js";
|
|
538
545
|
export * from "./oranthropicnullablecaller.js";
|
|
@@ -678,6 +685,8 @@ export * from "./responsesstreamingresponse.js";
|
|
|
678
685
|
export * from "./routerattempt.js";
|
|
679
686
|
export * from "./routerparams.js";
|
|
680
687
|
export * from "./routingstrategy.js";
|
|
688
|
+
export * from "./scalarfilter.js";
|
|
689
|
+
export * from "./scalarfilteroperator.js";
|
|
681
690
|
export * from "./scimgroup.js";
|
|
682
691
|
export * from "./scimgroupmapping.js";
|
|
683
692
|
export * from "./scimsyncjob.js";
|
|
@@ -700,6 +709,8 @@ export * from "./serviceunavailableresponseerrordata.js";
|
|
|
700
709
|
export * from "./sessioncostitem.js";
|
|
701
710
|
export * from "./sessioncostmeta.js";
|
|
702
711
|
export * from "./sessioncostresponse.js";
|
|
712
|
+
export * from "./setfilter.js";
|
|
713
|
+
export * from "./setfilteroperator.js";
|
|
703
714
|
export * from "./shellcallitem.js";
|
|
704
715
|
export * from "./shellcalloutputcontent.js";
|
|
705
716
|
export * from "./shellcalloutputitem.js";
|
package/esm/models/index.js
CHANGED
|
@@ -231,6 +231,11 @@ export * from "./chattoolmessage.js";
|
|
|
231
231
|
export * from "./chatusage.js";
|
|
232
232
|
export * from "./chatusermessage.js";
|
|
233
233
|
export * from "./chatwebsearchshorthand.js";
|
|
234
|
+
export * from "./classifierfiltersfilter.js";
|
|
235
|
+
export * from "./classifierscalarfilter.js";
|
|
236
|
+
export * from "./classifierscalarfilteroperator.js";
|
|
237
|
+
export * from "./classifiersetfilter.js";
|
|
238
|
+
export * from "./classifiersetfilteroperator.js";
|
|
234
239
|
export * from "./clientclosedrequestresponseerrordata.js";
|
|
235
240
|
export * from "./codeinterpretercallcodedeltaevent.js";
|
|
236
241
|
export * from "./codeinterpretercallcodedoneevent.js";
|
|
@@ -341,6 +346,7 @@ export * from "./fileresponse.js";
|
|
|
341
346
|
export * from "./filesearchservertool.js";
|
|
342
347
|
export * from "./filesservertool.js";
|
|
343
348
|
export * from "./filesservertoolconfig.js";
|
|
349
|
+
export * from "./filter.js";
|
|
344
350
|
export * from "./finishreason.js";
|
|
345
351
|
export * from "./forbiddenresponseerrordata.js";
|
|
346
352
|
export * from "./formatjsonobjectconfig.js";
|
|
@@ -537,6 +543,7 @@ export * from "./openrouterfiledeleted.js";
|
|
|
537
543
|
export * from "./openrouterfilelist.js";
|
|
538
544
|
export * from "./openroutermetadata.js";
|
|
539
545
|
export * from "./openrouterwebsearchservertool.js";
|
|
546
|
+
export * from "./operator.js";
|
|
540
547
|
export * from "./oranthropicbashtoolresult.js";
|
|
541
548
|
export * from "./oranthropiccontentblock.js";
|
|
542
549
|
export * from "./oranthropicnullablecaller.js";
|
|
@@ -682,6 +689,8 @@ export * from "./responsesstreamingresponse.js";
|
|
|
682
689
|
export * from "./routerattempt.js";
|
|
683
690
|
export * from "./routerparams.js";
|
|
684
691
|
export * from "./routingstrategy.js";
|
|
692
|
+
export * from "./scalarfilter.js";
|
|
693
|
+
export * from "./scalarfilteroperator.js";
|
|
685
694
|
export * from "./scimgroup.js";
|
|
686
695
|
export * from "./scimgroupmapping.js";
|
|
687
696
|
export * from "./scimsyncjob.js";
|
|
@@ -704,6 +713,8 @@ export * from "./serviceunavailableresponseerrordata.js";
|
|
|
704
713
|
export * from "./sessioncostitem.js";
|
|
705
714
|
export * from "./sessioncostmeta.js";
|
|
706
715
|
export * from "./sessioncostresponse.js";
|
|
716
|
+
export * from "./setfilter.js";
|
|
717
|
+
export * from "./setfilteroperator.js";
|
|
707
718
|
export * from "./shellcallitem.js";
|
|
708
719
|
export * from "./shellcalloutputcontent.js";
|
|
709
720
|
export * from "./shellcalloutputitem.js";
|
|
@@ -22,7 +22,7 @@ export declare const Field: {
|
|
|
22
22
|
readonly CompletionTokens: "completion_tokens";
|
|
23
23
|
};
|
|
24
24
|
export type Field = OpenEnum<typeof Field>;
|
|
25
|
-
export declare const
|
|
25
|
+
export declare const OperatorEnum: {
|
|
26
26
|
readonly Equals: "equals";
|
|
27
27
|
readonly NotEquals: "not_equals";
|
|
28
28
|
readonly Contains: "contains";
|
|
@@ -37,11 +37,11 @@ export declare const Operator: {
|
|
|
37
37
|
readonly Exists: "exists";
|
|
38
38
|
readonly NotExists: "not_exists";
|
|
39
39
|
};
|
|
40
|
-
export type
|
|
40
|
+
export type OperatorEnum = OpenEnum<typeof OperatorEnum>;
|
|
41
41
|
export type ObservabilityFilterRuleGroupValue = string | number;
|
|
42
42
|
export type Rule = {
|
|
43
43
|
field: Field;
|
|
44
|
-
operator:
|
|
44
|
+
operator: OperatorEnum;
|
|
45
45
|
value?: string | number | undefined;
|
|
46
46
|
};
|
|
47
47
|
export type ObservabilityFilterRuleGroup = {
|
|
@@ -57,9 +57,9 @@ export declare const Field$inboundSchema: z.ZodType<Field, unknown>;
|
|
|
57
57
|
/** @internal */
|
|
58
58
|
export declare const Field$outboundSchema: z.ZodType<string, Field>;
|
|
59
59
|
/** @internal */
|
|
60
|
-
export declare const
|
|
60
|
+
export declare const OperatorEnum$inboundSchema: z.ZodType<OperatorEnum, unknown>;
|
|
61
61
|
/** @internal */
|
|
62
|
-
export declare const
|
|
62
|
+
export declare const OperatorEnum$outboundSchema: z.ZodType<string, OperatorEnum>;
|
|
63
63
|
/** @internal */
|
|
64
64
|
export declare const ObservabilityFilterRuleGroupValue$inboundSchema: z.ZodType<ObservabilityFilterRuleGroupValue, unknown>;
|
|
65
65
|
/** @internal */
|
|
@@ -23,7 +23,7 @@ export const Field = {
|
|
|
23
23
|
PromptTokens: "prompt_tokens",
|
|
24
24
|
CompletionTokens: "completion_tokens",
|
|
25
25
|
};
|
|
26
|
-
export const
|
|
26
|
+
export const OperatorEnum = {
|
|
27
27
|
Equals: "equals",
|
|
28
28
|
NotEquals: "not_equals",
|
|
29
29
|
Contains: "contains",
|
|
@@ -51,11 +51,9 @@ export const Field$inboundSchema = openEnums
|
|
|
51
51
|
export const Field$outboundSchema = openEnums
|
|
52
52
|
.outboundSchema(Field);
|
|
53
53
|
/** @internal */
|
|
54
|
-
export const
|
|
55
|
-
.inboundSchema(Operator);
|
|
54
|
+
export const OperatorEnum$inboundSchema = openEnums.inboundSchema(OperatorEnum);
|
|
56
55
|
/** @internal */
|
|
57
|
-
export const
|
|
58
|
-
.outboundSchema(Operator);
|
|
56
|
+
export const OperatorEnum$outboundSchema = openEnums.outboundSchema(OperatorEnum);
|
|
59
57
|
/** @internal */
|
|
60
58
|
export const ObservabilityFilterRuleGroupValue$inboundSchema = z.union([z.string(), z.number()]);
|
|
61
59
|
/** @internal */
|
|
@@ -69,13 +67,13 @@ export function observabilityFilterRuleGroupValueFromJSON(jsonString) {
|
|
|
69
67
|
/** @internal */
|
|
70
68
|
export const Rule$inboundSchema = z.object({
|
|
71
69
|
field: Field$inboundSchema,
|
|
72
|
-
operator:
|
|
70
|
+
operator: OperatorEnum$inboundSchema,
|
|
73
71
|
value: z.union([z.string(), z.number()]).optional(),
|
|
74
72
|
});
|
|
75
73
|
/** @internal */
|
|
76
74
|
export const Rule$outboundSchema = z.object({
|
|
77
75
|
field: Field$outboundSchema,
|
|
78
|
-
operator:
|
|
76
|
+
operator: OperatorEnum$outboundSchema,
|
|
79
77
|
value: z.union([z.string(), z.number()]).optional(),
|
|
80
78
|
});
|
|
81
79
|
export function ruleToJSON(rule) {
|
|
@@ -45,7 +45,7 @@ export type DeleteInternVaultSecretRequest = {
|
|
|
45
45
|
*/
|
|
46
46
|
internId: string;
|
|
47
47
|
/**
|
|
48
|
-
*
|
|
48
|
+
* Existing secret name. Accepts legacy names stored before the 255-character write bound; new writes still require the documented name format.
|
|
49
49
|
*/
|
|
50
50
|
name: string;
|
|
51
51
|
};
|
|
@@ -41,7 +41,7 @@ export type DeleteVaultSecretRequest = {
|
|
|
41
41
|
*/
|
|
42
42
|
appCategories?: string | undefined;
|
|
43
43
|
/**
|
|
44
|
-
*
|
|
44
|
+
* Existing secret name. Accepts legacy names stored before the 255-character write bound; new writes still require the documented name format.
|
|
45
45
|
*/
|
|
46
46
|
name: string;
|
|
47
47
|
};
|
|
@@ -2,6 +2,7 @@ import * as z from "zod/v4";
|
|
|
2
2
|
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
|
+
import * as models from "../index.js";
|
|
5
6
|
export type GetAnalyticsMetaGlobals = {
|
|
6
7
|
/**
|
|
7
8
|
* The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
@@ -57,7 +58,7 @@ export type Dimension = {
|
|
|
57
58
|
/**
|
|
58
59
|
* Granularity identifier
|
|
59
60
|
*/
|
|
60
|
-
export declare const
|
|
61
|
+
export declare const Name: {
|
|
61
62
|
readonly Minute: "minute";
|
|
62
63
|
readonly Hour: "hour";
|
|
63
64
|
readonly Day: "day";
|
|
@@ -67,7 +68,7 @@ export declare const GranularityName: {
|
|
|
67
68
|
/**
|
|
68
69
|
* Granularity identifier
|
|
69
70
|
*/
|
|
70
|
-
export type
|
|
71
|
+
export type Name = OpenEnum<typeof Name>;
|
|
71
72
|
export type Granularity = {
|
|
72
73
|
/**
|
|
73
74
|
* Human-readable label
|
|
@@ -76,7 +77,7 @@ export type Granularity = {
|
|
|
76
77
|
/**
|
|
77
78
|
* Granularity identifier
|
|
78
79
|
*/
|
|
79
|
-
name:
|
|
80
|
+
name: Name;
|
|
80
81
|
};
|
|
81
82
|
/**
|
|
82
83
|
* How this metric value should be formatted for display (e.g. percent → multiply by 100 and append %, currency → prefix with $)
|
|
@@ -110,49 +111,11 @@ export type Metric = {
|
|
|
110
111
|
*/
|
|
111
112
|
name: string;
|
|
112
113
|
};
|
|
113
|
-
/**
|
|
114
|
-
* Operator identifier used in filter definitions
|
|
115
|
-
*/
|
|
116
|
-
export declare const OperatorName: {
|
|
117
|
-
readonly Eq: "eq";
|
|
118
|
-
readonly Neq: "neq";
|
|
119
|
-
readonly In: "in";
|
|
120
|
-
readonly NotIn: "not_in";
|
|
121
|
-
readonly Gt: "gt";
|
|
122
|
-
readonly Gte: "gte";
|
|
123
|
-
readonly Lt: "lt";
|
|
124
|
-
readonly Lte: "lte";
|
|
125
|
-
};
|
|
126
|
-
/**
|
|
127
|
-
* Operator identifier used in filter definitions
|
|
128
|
-
*/
|
|
129
|
-
export type OperatorName = OpenEnum<typeof OperatorName>;
|
|
130
|
-
/**
|
|
131
|
-
* Whether the operator expects a single value or an array
|
|
132
|
-
*/
|
|
133
|
-
export declare const ValueType: {
|
|
134
|
-
readonly Scalar: "scalar";
|
|
135
|
-
readonly Array: "array";
|
|
136
|
-
};
|
|
137
|
-
/**
|
|
138
|
-
* Whether the operator expects a single value or an array
|
|
139
|
-
*/
|
|
140
|
-
export type ValueType = OpenEnum<typeof ValueType>;
|
|
141
|
-
export type Operator = {
|
|
142
|
-
/**
|
|
143
|
-
* Operator identifier used in filter definitions
|
|
144
|
-
*/
|
|
145
|
-
name: OperatorName;
|
|
146
|
-
/**
|
|
147
|
-
* Whether the operator expects a single value or an array
|
|
148
|
-
*/
|
|
149
|
-
valueType: ValueType;
|
|
150
|
-
};
|
|
151
114
|
export type GetAnalyticsMetaData = {
|
|
152
115
|
dimensions: Array<Dimension>;
|
|
153
116
|
granularities: Array<Granularity>;
|
|
154
117
|
metrics: Array<Metric>;
|
|
155
|
-
operators: Array<Operator>;
|
|
118
|
+
operators: Array<models.Operator>;
|
|
156
119
|
};
|
|
157
120
|
/**
|
|
158
121
|
* Returns analytics query metadata
|
|
@@ -173,7 +136,7 @@ export declare function getAnalyticsMetaRequestToJSON(getAnalyticsMetaRequest: G
|
|
|
173
136
|
export declare const Dimension$inboundSchema: z.ZodType<Dimension, unknown>;
|
|
174
137
|
export declare function dimensionFromJSON(jsonString: string): SafeParseResult<Dimension, SDKValidationError>;
|
|
175
138
|
/** @internal */
|
|
176
|
-
export declare const
|
|
139
|
+
export declare const Name$inboundSchema: z.ZodType<Name, unknown>;
|
|
177
140
|
/** @internal */
|
|
178
141
|
export declare const Granularity$inboundSchema: z.ZodType<Granularity, unknown>;
|
|
179
142
|
export declare function granularityFromJSON(jsonString: string): SafeParseResult<Granularity, SDKValidationError>;
|
|
@@ -183,13 +146,6 @@ export declare const DisplayFormat$inboundSchema: z.ZodType<DisplayFormat, unkno
|
|
|
183
146
|
export declare const Metric$inboundSchema: z.ZodType<Metric, unknown>;
|
|
184
147
|
export declare function metricFromJSON(jsonString: string): SafeParseResult<Metric, SDKValidationError>;
|
|
185
148
|
/** @internal */
|
|
186
|
-
export declare const OperatorName$inboundSchema: z.ZodType<OperatorName, unknown>;
|
|
187
|
-
/** @internal */
|
|
188
|
-
export declare const ValueType$inboundSchema: z.ZodType<ValueType, unknown>;
|
|
189
|
-
/** @internal */
|
|
190
|
-
export declare const Operator$inboundSchema: z.ZodType<Operator, unknown>;
|
|
191
|
-
export declare function operatorFromJSON(jsonString: string): SafeParseResult<Operator, SDKValidationError>;
|
|
192
|
-
/** @internal */
|
|
193
149
|
export declare const GetAnalyticsMetaData$inboundSchema: z.ZodType<GetAnalyticsMetaData, unknown>;
|
|
194
150
|
export declare function getAnalyticsMetaDataFromJSON(jsonString: string): SafeParseResult<GetAnalyticsMetaData, SDKValidationError>;
|
|
195
151
|
/** @internal */
|
|
@@ -6,10 +6,11 @@ import * as z from "zod/v4";
|
|
|
6
6
|
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
|
+
import { Operator$inboundSchema as models_Operator$inboundSchema } from "../operator.js";
|
|
9
10
|
/**
|
|
10
11
|
* Granularity identifier
|
|
11
12
|
*/
|
|
12
|
-
export const
|
|
13
|
+
export const Name = {
|
|
13
14
|
Minute: "minute",
|
|
14
15
|
Hour: "hour",
|
|
15
16
|
Day: "day",
|
|
@@ -26,26 +27,6 @@ export const DisplayFormat = {
|
|
|
26
27
|
Latency: "latency",
|
|
27
28
|
Throughput: "throughput",
|
|
28
29
|
};
|
|
29
|
-
/**
|
|
30
|
-
* Operator identifier used in filter definitions
|
|
31
|
-
*/
|
|
32
|
-
export const OperatorName = {
|
|
33
|
-
Eq: "eq",
|
|
34
|
-
Neq: "neq",
|
|
35
|
-
In: "in",
|
|
36
|
-
NotIn: "not_in",
|
|
37
|
-
Gt: "gt",
|
|
38
|
-
Gte: "gte",
|
|
39
|
-
Lt: "lt",
|
|
40
|
-
Lte: "lte",
|
|
41
|
-
};
|
|
42
|
-
/**
|
|
43
|
-
* Whether the operator expects a single value or an array
|
|
44
|
-
*/
|
|
45
|
-
export const ValueType = {
|
|
46
|
-
Scalar: "scalar",
|
|
47
|
-
Array: "array",
|
|
48
|
-
};
|
|
49
30
|
/** @internal */
|
|
50
31
|
export const GetAnalyticsMetaRequest$outboundSchema = z.object({
|
|
51
32
|
httpReferer: z.string().optional(),
|
|
@@ -72,12 +53,13 @@ export function dimensionFromJSON(jsonString) {
|
|
|
72
53
|
return safeParse(jsonString, (x) => Dimension$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Dimension' from JSON`);
|
|
73
54
|
}
|
|
74
55
|
/** @internal */
|
|
75
|
-
export const
|
|
56
|
+
export const Name$inboundSchema = openEnums
|
|
57
|
+
.inboundSchema(Name);
|
|
76
58
|
/** @internal */
|
|
77
59
|
export const Granularity$inboundSchema = z
|
|
78
60
|
.object({
|
|
79
61
|
display_label: z.string(),
|
|
80
|
-
name:
|
|
62
|
+
name: Name$inboundSchema,
|
|
81
63
|
}).transform((v) => {
|
|
82
64
|
return remap$(v, {
|
|
83
65
|
"display_label": "displayLabel",
|
|
@@ -105,28 +87,11 @@ export function metricFromJSON(jsonString) {
|
|
|
105
87
|
return safeParse(jsonString, (x) => Metric$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Metric' from JSON`);
|
|
106
88
|
}
|
|
107
89
|
/** @internal */
|
|
108
|
-
export const OperatorName$inboundSchema = openEnums.inboundSchema(OperatorName);
|
|
109
|
-
/** @internal */
|
|
110
|
-
export const ValueType$inboundSchema = openEnums
|
|
111
|
-
.inboundSchema(ValueType);
|
|
112
|
-
/** @internal */
|
|
113
|
-
export const Operator$inboundSchema = z.object({
|
|
114
|
-
name: OperatorName$inboundSchema,
|
|
115
|
-
value_type: ValueType$inboundSchema,
|
|
116
|
-
}).transform((v) => {
|
|
117
|
-
return remap$(v, {
|
|
118
|
-
"value_type": "valueType",
|
|
119
|
-
});
|
|
120
|
-
});
|
|
121
|
-
export function operatorFromJSON(jsonString) {
|
|
122
|
-
return safeParse(jsonString, (x) => Operator$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Operator' from JSON`);
|
|
123
|
-
}
|
|
124
|
-
/** @internal */
|
|
125
90
|
export const GetAnalyticsMetaData$inboundSchema = z.object({
|
|
126
91
|
dimensions: z.array(z.lazy(() => Dimension$inboundSchema)),
|
|
127
92
|
granularities: z.array(z.lazy(() => Granularity$inboundSchema)),
|
|
128
93
|
metrics: z.array(z.lazy(() => Metric$inboundSchema)),
|
|
129
|
-
operators: z.array(
|
|
94
|
+
operators: z.array(models_Operator$inboundSchema),
|
|
130
95
|
});
|
|
131
96
|
export function getAnalyticsMetaDataFromJSON(jsonString) {
|
|
132
97
|
return safeParse(jsonString, (x) => GetAnalyticsMetaData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAnalyticsMetaData' from JSON`);
|
|
@@ -2,6 +2,7 @@ import * as z from "zod/v4";
|
|
|
2
2
|
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
|
+
import * as models from "../index.js";
|
|
5
6
|
export type QueryAnalyticsGlobals = {
|
|
6
7
|
/**
|
|
7
8
|
* The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
@@ -37,25 +38,6 @@ export type ClassifierDimensions = {
|
|
|
37
38
|
*/
|
|
38
39
|
includeNulls?: boolean | undefined;
|
|
39
40
|
};
|
|
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
41
|
/**
|
|
60
42
|
* 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
43
|
*/
|
|
@@ -64,30 +46,7 @@ export type ClassifierFilters = {
|
|
|
64
46
|
* UUID of the classifier whose tags to filter by. Must match classifier_dimensions.classifier_id when both are specified.
|
|
65
47
|
*/
|
|
66
48
|
classifierId: string;
|
|
67
|
-
filters: Array<ClassifierFiltersFilter>;
|
|
68
|
-
};
|
|
69
|
-
export type Value2 = string | number;
|
|
70
|
-
/**
|
|
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 (filtering or grouping by the account default workspace also covers activity recorded before workspace resolution existed, which is attributed to that default workspace); `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.
|
|
72
|
-
*/
|
|
73
|
-
export type Value1 = string | number | Array<string | number>;
|
|
74
|
-
export type Filter = {
|
|
75
|
-
/**
|
|
76
|
-
* Dimension to filter on. Use the /meta endpoint for available dimensions.
|
|
77
|
-
*/
|
|
78
|
-
field: string;
|
|
79
|
-
/**
|
|
80
|
-
* Include rows where the dimension has no value. Applies only to the `in` and `not_in` operators and dimensions that have an unset bucket.
|
|
81
|
-
*/
|
|
82
|
-
includeUnset?: boolean | undefined;
|
|
83
|
-
/**
|
|
84
|
-
* Filter operator
|
|
85
|
-
*/
|
|
86
|
-
operator: string;
|
|
87
|
-
/**
|
|
88
|
-
* 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 (filtering or grouping by the account default workspace also covers activity recorded before workspace resolution existed, which is attributed to that default workspace); `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.
|
|
89
|
-
*/
|
|
90
|
-
value: string | number | Array<string | number>;
|
|
49
|
+
filters: Array<models.ClassifierFiltersFilter>;
|
|
91
50
|
};
|
|
92
51
|
export declare const Direction: {
|
|
93
52
|
readonly Asc: "asc";
|
|
@@ -121,7 +80,7 @@ export type QueryAnalyticsRequestBody = {
|
|
|
121
80
|
*/
|
|
122
81
|
classifierFilters?: ClassifierFilters | undefined;
|
|
123
82
|
dimensions?: Array<string> | undefined;
|
|
124
|
-
filters?: Array<Filter> | undefined;
|
|
83
|
+
filters?: Array<models.Filter> | undefined;
|
|
125
84
|
/**
|
|
126
85
|
* Time granularity
|
|
127
86
|
*/
|
|
@@ -194,53 +153,14 @@ export type ClassifierDimensions$Outbound = {
|
|
|
194
153
|
export declare const ClassifierDimensions$outboundSchema: z.ZodType<ClassifierDimensions$Outbound, ClassifierDimensions>;
|
|
195
154
|
export declare function classifierDimensionsToJSON(classifierDimensions: ClassifierDimensions): string;
|
|
196
155
|
/** @internal */
|
|
197
|
-
export type ValueClassifierFilters$Outbound = string | number;
|
|
198
|
-
/** @internal */
|
|
199
|
-
export declare const ValueClassifierFilters$outboundSchema: z.ZodType<ValueClassifierFilters$Outbound, ValueClassifierFilters>;
|
|
200
|
-
export declare function valueClassifierFiltersToJSON(valueClassifierFilters: ValueClassifierFilters): string;
|
|
201
|
-
/** @internal */
|
|
202
|
-
export type ClassifierFiltersValue$Outbound = string | number | Array<string | number>;
|
|
203
|
-
/** @internal */
|
|
204
|
-
export declare const ClassifierFiltersValue$outboundSchema: z.ZodType<ClassifierFiltersValue$Outbound, ClassifierFiltersValue>;
|
|
205
|
-
export declare function classifierFiltersValueToJSON(classifierFiltersValue: ClassifierFiltersValue): string;
|
|
206
|
-
/** @internal */
|
|
207
|
-
export type ClassifierFiltersFilter$Outbound = {
|
|
208
|
-
field: string;
|
|
209
|
-
operator: string;
|
|
210
|
-
value: string | number | Array<string | number>;
|
|
211
|
-
};
|
|
212
|
-
/** @internal */
|
|
213
|
-
export declare const ClassifierFiltersFilter$outboundSchema: z.ZodType<ClassifierFiltersFilter$Outbound, ClassifierFiltersFilter>;
|
|
214
|
-
export declare function classifierFiltersFilterToJSON(classifierFiltersFilter: ClassifierFiltersFilter): string;
|
|
215
|
-
/** @internal */
|
|
216
156
|
export type ClassifierFilters$Outbound = {
|
|
217
157
|
classifier_id: string;
|
|
218
|
-
filters: Array<ClassifierFiltersFilter$Outbound>;
|
|
158
|
+
filters: Array<models.ClassifierFiltersFilter$Outbound>;
|
|
219
159
|
};
|
|
220
160
|
/** @internal */
|
|
221
161
|
export declare const ClassifierFilters$outboundSchema: z.ZodType<ClassifierFilters$Outbound, ClassifierFilters>;
|
|
222
162
|
export declare function classifierFiltersToJSON(classifierFilters: ClassifierFilters): string;
|
|
223
163
|
/** @internal */
|
|
224
|
-
export type Value2$Outbound = string | number;
|
|
225
|
-
/** @internal */
|
|
226
|
-
export declare const Value2$outboundSchema: z.ZodType<Value2$Outbound, Value2>;
|
|
227
|
-
export declare function value2ToJSON(value2: Value2): string;
|
|
228
|
-
/** @internal */
|
|
229
|
-
export type Value1$Outbound = string | number | Array<string | number>;
|
|
230
|
-
/** @internal */
|
|
231
|
-
export declare const Value1$outboundSchema: z.ZodType<Value1$Outbound, Value1>;
|
|
232
|
-
export declare function value1ToJSON(value1: Value1): string;
|
|
233
|
-
/** @internal */
|
|
234
|
-
export type Filter$Outbound = {
|
|
235
|
-
field: string;
|
|
236
|
-
include_unset?: boolean | undefined;
|
|
237
|
-
operator: string;
|
|
238
|
-
value: string | number | Array<string | number>;
|
|
239
|
-
};
|
|
240
|
-
/** @internal */
|
|
241
|
-
export declare const Filter$outboundSchema: z.ZodType<Filter$Outbound, Filter>;
|
|
242
|
-
export declare function filterToJSON(filter: Filter): string;
|
|
243
|
-
/** @internal */
|
|
244
164
|
export declare const Direction$outboundSchema: z.ZodType<string, Direction>;
|
|
245
165
|
/** @internal */
|
|
246
166
|
export type OrderBy$Outbound = {
|
|
@@ -263,7 +183,7 @@ export type QueryAnalyticsRequestBody$Outbound = {
|
|
|
263
183
|
classifier_dimensions?: ClassifierDimensions$Outbound | undefined;
|
|
264
184
|
classifier_filters?: ClassifierFilters$Outbound | undefined;
|
|
265
185
|
dimensions?: Array<string> | undefined;
|
|
266
|
-
filters?: Array<Filter$Outbound> | undefined;
|
|
186
|
+
filters?: Array<models.Filter$Outbound> | undefined;
|
|
267
187
|
granularity?: string | undefined;
|
|
268
188
|
group_limit?: number | undefined;
|
|
269
189
|
limit?: number | undefined;
|
|
@@ -6,6 +6,7 @@ import * as z from "zod/v4";
|
|
|
6
6
|
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
|
+
import { ClassifierFiltersFilter$outboundSchema as models_ClassifierFiltersFilter$outboundSchema } from "../classifierfiltersfilter.js"; import { Filter$outboundSchema as models_Filter$outboundSchema } from "../filter.js";
|
|
9
10
|
export const Direction = {
|
|
10
11
|
Asc: "asc",
|
|
11
12
|
Desc: "desc",
|
|
@@ -26,36 +27,9 @@ export function classifierDimensionsToJSON(classifierDimensions) {
|
|
|
26
27
|
return JSON.stringify(ClassifierDimensions$outboundSchema.parse(classifierDimensions));
|
|
27
28
|
}
|
|
28
29
|
/** @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
30
|
export const ClassifierFilters$outboundSchema = z.object({
|
|
57
31
|
classifierId: z.string(),
|
|
58
|
-
filters: z.array(
|
|
32
|
+
filters: z.array(models_ClassifierFiltersFilter$outboundSchema),
|
|
59
33
|
}).transform((v) => {
|
|
60
34
|
return remap$(v, {
|
|
61
35
|
classifierId: "classifier_id",
|
|
@@ -65,37 +39,6 @@ export function classifierFiltersToJSON(classifierFilters) {
|
|
|
65
39
|
return JSON.stringify(ClassifierFilters$outboundSchema.parse(classifierFilters));
|
|
66
40
|
}
|
|
67
41
|
/** @internal */
|
|
68
|
-
export const Value2$outboundSchema = z
|
|
69
|
-
.union([z.string(), z.number()]);
|
|
70
|
-
export function value2ToJSON(value2) {
|
|
71
|
-
return JSON.stringify(Value2$outboundSchema.parse(value2));
|
|
72
|
-
}
|
|
73
|
-
/** @internal */
|
|
74
|
-
export const Value1$outboundSchema = z
|
|
75
|
-
.union([z.string(), z.number(), z.array(z.union([z.string(), z.number()]))]);
|
|
76
|
-
export function value1ToJSON(value1) {
|
|
77
|
-
return JSON.stringify(Value1$outboundSchema.parse(value1));
|
|
78
|
-
}
|
|
79
|
-
/** @internal */
|
|
80
|
-
export const Filter$outboundSchema = z
|
|
81
|
-
.object({
|
|
82
|
-
field: z.string(),
|
|
83
|
-
includeUnset: z.boolean().optional(),
|
|
84
|
-
operator: z.string(),
|
|
85
|
-
value: z.union([
|
|
86
|
-
z.string(),
|
|
87
|
-
z.number(),
|
|
88
|
-
z.array(z.union([z.string(), z.number()])),
|
|
89
|
-
]),
|
|
90
|
-
}).transform((v) => {
|
|
91
|
-
return remap$(v, {
|
|
92
|
-
includeUnset: "include_unset",
|
|
93
|
-
});
|
|
94
|
-
});
|
|
95
|
-
export function filterToJSON(filter) {
|
|
96
|
-
return JSON.stringify(Filter$outboundSchema.parse(filter));
|
|
97
|
-
}
|
|
98
|
-
/** @internal */
|
|
99
42
|
export const Direction$outboundSchema = openEnums
|
|
100
43
|
.outboundSchema(Direction);
|
|
101
44
|
/** @internal */
|
|
@@ -121,7 +64,7 @@ export const QueryAnalyticsRequestBody$outboundSchema = z.object({
|
|
|
121
64
|
.optional(),
|
|
122
65
|
classifierFilters: z.lazy(() => ClassifierFilters$outboundSchema).optional(),
|
|
123
66
|
dimensions: z.array(z.string()).optional(),
|
|
124
|
-
filters: z.array(
|
|
67
|
+
filters: z.array(models_Filter$outboundSchema).optional(),
|
|
125
68
|
granularity: z.string().optional(),
|
|
126
69
|
groupLimit: z.int().optional(),
|
|
127
70
|
limit: z.int().optional(),
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { OpenEnum } from "../types/enums.js";
|
|
3
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
+
/**
|
|
6
|
+
* Operator identifier used in filter definitions
|
|
7
|
+
*/
|
|
8
|
+
export declare const OperatorName: {
|
|
9
|
+
readonly Eq: "eq";
|
|
10
|
+
readonly Neq: "neq";
|
|
11
|
+
readonly In: "in";
|
|
12
|
+
readonly NotIn: "not_in";
|
|
13
|
+
readonly Gt: "gt";
|
|
14
|
+
readonly Gte: "gte";
|
|
15
|
+
readonly Lt: "lt";
|
|
16
|
+
readonly Lte: "lte";
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Operator identifier used in filter definitions
|
|
20
|
+
*/
|
|
21
|
+
export type OperatorName = OpenEnum<typeof OperatorName>;
|
|
22
|
+
/**
|
|
23
|
+
* Whether the operator expects a single value or an array
|
|
24
|
+
*/
|
|
25
|
+
export declare const ValueType: {
|
|
26
|
+
readonly Scalar: "scalar";
|
|
27
|
+
readonly Array: "array";
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Whether the operator expects a single value or an array
|
|
31
|
+
*/
|
|
32
|
+
export type ValueType = OpenEnum<typeof ValueType>;
|
|
33
|
+
export type Operator = {
|
|
34
|
+
/**
|
|
35
|
+
* Operator identifier used in filter definitions
|
|
36
|
+
*/
|
|
37
|
+
name: OperatorName;
|
|
38
|
+
/**
|
|
39
|
+
* Whether the operator expects a single value or an array
|
|
40
|
+
*/
|
|
41
|
+
valueType: ValueType;
|
|
42
|
+
};
|
|
43
|
+
/** @internal */
|
|
44
|
+
export declare const OperatorName$inboundSchema: z.ZodType<OperatorName, unknown>;
|
|
45
|
+
/** @internal */
|
|
46
|
+
export declare const ValueType$inboundSchema: z.ZodType<ValueType, unknown>;
|
|
47
|
+
/** @internal */
|
|
48
|
+
export declare const Operator$inboundSchema: z.ZodType<Operator, unknown>;
|
|
49
|
+
export declare function operatorFromJSON(jsonString: string): SafeParseResult<Operator, SDKValidationError>;
|
|
50
|
+
//# sourceMappingURL=operator.d.ts.map
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 2c6d6b8bb46a
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
import * as openEnums from "../types/enums.js";
|
|
9
|
+
/**
|
|
10
|
+
* Operator identifier used in filter definitions
|
|
11
|
+
*/
|
|
12
|
+
export const OperatorName = {
|
|
13
|
+
Eq: "eq",
|
|
14
|
+
Neq: "neq",
|
|
15
|
+
In: "in",
|
|
16
|
+
NotIn: "not_in",
|
|
17
|
+
Gt: "gt",
|
|
18
|
+
Gte: "gte",
|
|
19
|
+
Lt: "lt",
|
|
20
|
+
Lte: "lte",
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Whether the operator expects a single value or an array
|
|
24
|
+
*/
|
|
25
|
+
export const ValueType = {
|
|
26
|
+
Scalar: "scalar",
|
|
27
|
+
Array: "array",
|
|
28
|
+
};
|
|
29
|
+
/** @internal */
|
|
30
|
+
export const OperatorName$inboundSchema = openEnums.inboundSchema(OperatorName);
|
|
31
|
+
/** @internal */
|
|
32
|
+
export const ValueType$inboundSchema = openEnums
|
|
33
|
+
.inboundSchema(ValueType);
|
|
34
|
+
/** @internal */
|
|
35
|
+
export const Operator$inboundSchema = z.object({
|
|
36
|
+
name: OperatorName$inboundSchema,
|
|
37
|
+
value_type: ValueType$inboundSchema,
|
|
38
|
+
}).transform((v) => {
|
|
39
|
+
return remap$(v, {
|
|
40
|
+
"value_type": "valueType",
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
export function operatorFromJSON(jsonString) {
|
|
44
|
+
return safeParse(jsonString, (x) => Operator$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Operator' from JSON`);
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=operator.js.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { ScalarFilterOperator } from "./scalarfilteroperator.js";
|
|
3
|
+
/**
|
|
4
|
+
* 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 (filtering or grouping by the account default workspace also covers activity recorded before workspace resolution existed, which is attributed to that default workspace); `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.
|
|
5
|
+
*/
|
|
6
|
+
export type ScalarFilterValue = string | number;
|
|
7
|
+
export type ScalarFilter = {
|
|
8
|
+
/**
|
|
9
|
+
* Dimension to filter on. Use the /meta endpoint for available dimensions.
|
|
10
|
+
*/
|
|
11
|
+
field: string;
|
|
12
|
+
/**
|
|
13
|
+
* Comparison operator taking a scalar filter value.
|
|
14
|
+
*/
|
|
15
|
+
operator: ScalarFilterOperator;
|
|
16
|
+
/**
|
|
17
|
+
* 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 (filtering or grouping by the account default workspace also covers activity recorded before workspace resolution existed, which is attributed to that default workspace); `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.
|
|
18
|
+
*/
|
|
19
|
+
value: string | number;
|
|
20
|
+
};
|
|
21
|
+
/** @internal */
|
|
22
|
+
export type ScalarFilterValue$Outbound = string | number;
|
|
23
|
+
/** @internal */
|
|
24
|
+
export declare const ScalarFilterValue$outboundSchema: z.ZodType<ScalarFilterValue$Outbound, ScalarFilterValue>;
|
|
25
|
+
export declare function scalarFilterValueToJSON(scalarFilterValue: ScalarFilterValue): string;
|
|
26
|
+
/** @internal */
|
|
27
|
+
export type ScalarFilter$Outbound = {
|
|
28
|
+
field: string;
|
|
29
|
+
operator: string;
|
|
30
|
+
value: string | number;
|
|
31
|
+
};
|
|
32
|
+
/** @internal */
|
|
33
|
+
export declare const ScalarFilter$outboundSchema: z.ZodType<ScalarFilter$Outbound, ScalarFilter>;
|
|
34
|
+
export declare function scalarFilterToJSON(scalarFilter: ScalarFilter): string;
|
|
35
|
+
//# sourceMappingURL=scalarfilter.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: a35bae1c804d
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { ScalarFilterOperator$outboundSchema, } from "./scalarfilteroperator.js";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export const ScalarFilterValue$outboundSchema = z.union([z.string(), z.number()]);
|
|
9
|
+
export function scalarFilterValueToJSON(scalarFilterValue) {
|
|
10
|
+
return JSON.stringify(ScalarFilterValue$outboundSchema.parse(scalarFilterValue));
|
|
11
|
+
}
|
|
12
|
+
/** @internal */
|
|
13
|
+
export const ScalarFilter$outboundSchema = z.object({
|
|
14
|
+
field: z.string(),
|
|
15
|
+
operator: ScalarFilterOperator$outboundSchema,
|
|
16
|
+
value: z.union([z.string(), z.number()]),
|
|
17
|
+
});
|
|
18
|
+
export function scalarFilterToJSON(scalarFilter) {
|
|
19
|
+
return JSON.stringify(ScalarFilter$outboundSchema.parse(scalarFilter));
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=scalarfilter.js.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { OpenEnum } from "../types/enums.js";
|
|
3
|
+
/**
|
|
4
|
+
* Comparison operator taking a scalar filter value.
|
|
5
|
+
*/
|
|
6
|
+
export declare const ScalarFilterOperator: {
|
|
7
|
+
readonly Eq: "eq";
|
|
8
|
+
readonly Neq: "neq";
|
|
9
|
+
readonly Gt: "gt";
|
|
10
|
+
readonly Gte: "gte";
|
|
11
|
+
readonly Lt: "lt";
|
|
12
|
+
readonly Lte: "lte";
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Comparison operator taking a scalar filter value.
|
|
16
|
+
*/
|
|
17
|
+
export type ScalarFilterOperator = OpenEnum<typeof ScalarFilterOperator>;
|
|
18
|
+
/** @internal */
|
|
19
|
+
export declare const ScalarFilterOperator$outboundSchema: z.ZodType<string, ScalarFilterOperator>;
|
|
20
|
+
//# sourceMappingURL=scalarfilteroperator.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 25c4ab8aa37c
|
|
4
|
+
*/
|
|
5
|
+
import * as openEnums from "../types/enums.js";
|
|
6
|
+
/**
|
|
7
|
+
* Comparison operator taking a scalar filter value.
|
|
8
|
+
*/
|
|
9
|
+
export const ScalarFilterOperator = {
|
|
10
|
+
Eq: "eq",
|
|
11
|
+
Neq: "neq",
|
|
12
|
+
Gt: "gt",
|
|
13
|
+
Gte: "gte",
|
|
14
|
+
Lt: "lt",
|
|
15
|
+
Lte: "lte",
|
|
16
|
+
};
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const ScalarFilterOperator$outboundSchema = openEnums.outboundSchema(ScalarFilterOperator);
|
|
19
|
+
//# sourceMappingURL=scalarfilteroperator.js.map
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { SetFilterOperator } from "./setfilteroperator.js";
|
|
3
|
+
/**
|
|
4
|
+
* 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 (filtering or grouping by the account default workspace also covers activity recorded before workspace resolution existed, which is attributed to that default workspace); `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.
|
|
5
|
+
*/
|
|
6
|
+
export type SetFilterValue = string | number;
|
|
7
|
+
export type SetFilter = {
|
|
8
|
+
/**
|
|
9
|
+
* Dimension to filter on. Use the /meta endpoint for available dimensions.
|
|
10
|
+
*/
|
|
11
|
+
field: string;
|
|
12
|
+
/**
|
|
13
|
+
* Include rows where the dimension has no value. Applies only to dimensions that have an unset bucket.
|
|
14
|
+
*/
|
|
15
|
+
includeUnset?: boolean | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Set-membership operator taking an array filter value.
|
|
18
|
+
*/
|
|
19
|
+
operator: SetFilterOperator;
|
|
20
|
+
value: Array<string | number>;
|
|
21
|
+
};
|
|
22
|
+
/** @internal */
|
|
23
|
+
export type SetFilterValue$Outbound = string | number;
|
|
24
|
+
/** @internal */
|
|
25
|
+
export declare const SetFilterValue$outboundSchema: z.ZodType<SetFilterValue$Outbound, SetFilterValue>;
|
|
26
|
+
export declare function setFilterValueToJSON(setFilterValue: SetFilterValue): string;
|
|
27
|
+
/** @internal */
|
|
28
|
+
export type SetFilter$Outbound = {
|
|
29
|
+
field: string;
|
|
30
|
+
include_unset?: boolean | undefined;
|
|
31
|
+
operator: string;
|
|
32
|
+
value: Array<string | number>;
|
|
33
|
+
};
|
|
34
|
+
/** @internal */
|
|
35
|
+
export declare const SetFilter$outboundSchema: z.ZodType<SetFilter$Outbound, SetFilter>;
|
|
36
|
+
export declare function setFilterToJSON(setFilter: SetFilter): string;
|
|
37
|
+
//# sourceMappingURL=setfilter.d.ts.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 996a872ffcc5
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { SetFilterOperator$outboundSchema, } from "./setfilteroperator.js";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const SetFilterValue$outboundSchema = z.union([z.string(), z.number()]);
|
|
10
|
+
export function setFilterValueToJSON(setFilterValue) {
|
|
11
|
+
return JSON.stringify(SetFilterValue$outboundSchema.parse(setFilterValue));
|
|
12
|
+
}
|
|
13
|
+
/** @internal */
|
|
14
|
+
export const SetFilter$outboundSchema = z.object({
|
|
15
|
+
field: z.string(),
|
|
16
|
+
includeUnset: z.boolean().optional(),
|
|
17
|
+
operator: SetFilterOperator$outboundSchema,
|
|
18
|
+
value: z.array(z.union([z.string(), z.number()])),
|
|
19
|
+
}).transform((v) => {
|
|
20
|
+
return remap$(v, {
|
|
21
|
+
includeUnset: "include_unset",
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
export function setFilterToJSON(setFilter) {
|
|
25
|
+
return JSON.stringify(SetFilter$outboundSchema.parse(setFilter));
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=setfilter.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { OpenEnum } from "../types/enums.js";
|
|
3
|
+
/**
|
|
4
|
+
* Set-membership operator taking an array filter value.
|
|
5
|
+
*/
|
|
6
|
+
export declare const SetFilterOperator: {
|
|
7
|
+
readonly In: "in";
|
|
8
|
+
readonly NotIn: "not_in";
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Set-membership operator taking an array filter value.
|
|
12
|
+
*/
|
|
13
|
+
export type SetFilterOperator = OpenEnum<typeof SetFilterOperator>;
|
|
14
|
+
/** @internal */
|
|
15
|
+
export declare const SetFilterOperator$outboundSchema: z.ZodType<string, SetFilterOperator>;
|
|
16
|
+
//# sourceMappingURL=setfilteroperator.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 96f1a2679754
|
|
4
|
+
*/
|
|
5
|
+
import * as openEnums from "../types/enums.js";
|
|
6
|
+
/**
|
|
7
|
+
* Set-membership operator taking an array filter value.
|
|
8
|
+
*/
|
|
9
|
+
export const SetFilterOperator = {
|
|
10
|
+
In: "in",
|
|
11
|
+
NotIn: "not_in",
|
|
12
|
+
};
|
|
13
|
+
/** @internal */
|
|
14
|
+
export const SetFilterOperator$outboundSchema = openEnums.outboundSchema(SetFilterOperator);
|
|
15
|
+
//# sourceMappingURL=setfilteroperator.js.map
|
|
@@ -8,7 +8,7 @@ export type VaultSecretWriteRequest = {
|
|
|
8
8
|
*/
|
|
9
9
|
hosts: Array<string>;
|
|
10
10
|
/**
|
|
11
|
-
* Secret value, 1 to 65536 characters. It is encrypted at rest and never returned.
|
|
11
|
+
* Secret value, 1 to 65536 characters; a header-set credential (a JSON object of header name to value) may run to 985721 characters. It is encrypted at rest and never returned.
|
|
12
12
|
*/
|
|
13
13
|
value: string;
|
|
14
14
|
};
|
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.24",
|
|
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": [
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"license": "Apache-2.0",
|
|
22
22
|
"packageManager": "pnpm@10.22.0",
|
|
23
23
|
"publishConfig": {
|
|
24
|
-
"
|
|
25
|
-
"
|
|
24
|
+
"access": "public",
|
|
25
|
+
"provenance": true
|
|
26
26
|
},
|
|
27
27
|
"type": "module",
|
|
28
28
|
"main": "./esm/index.js",
|
|
@@ -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
|
-
"test:e2e": "vitest --run --project e2e",
|
|
77
|
-
"typecheck": "tsc --noEmit",
|
|
78
76
|
"compile": "tsc && node scripts/unbarrel-imports.js",
|
|
79
|
-
"test": "vitest --run --project unit",
|
|
80
77
|
"test:transit": "exit 0",
|
|
81
78
|
"test:watch": "vitest --watch --project unit",
|
|
82
|
-
"typecheck
|
|
79
|
+
"typecheck": "tsc --noEmit",
|
|
83
80
|
"postinstall": "node scripts/check-types.js || true",
|
|
84
|
-
"prepare": "npm run build"
|
|
81
|
+
"prepare": "npm run build",
|
|
82
|
+
"test": "vitest --run --project unit",
|
|
83
|
+
"test:e2e": "vitest --run --project e2e",
|
|
84
|
+
"typecheck:transit": "exit 0"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
87
|
|