@openrouter/sdk 1.4.9 → 1.4.11
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/funcs/endUsersCreate.d.ts +19 -0
- package/esm/funcs/endUsersCreate.js +100 -0
- package/esm/funcs/endUsersDelete.d.ts +18 -0
- package/esm/funcs/endUsersDelete.js +103 -0
- package/esm/funcs/endUsersGet.d.ts +19 -0
- package/esm/funcs/endUsersGet.js +103 -0
- package/esm/funcs/endUsersList.d.ts +21 -0
- package/esm/funcs/endUsersList.js +135 -0
- package/esm/funcs/endUsersUpdate.d.ts +19 -0
- package/esm/funcs/endUsersUpdate.js +106 -0
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/alignment.d.ts +17 -0
- package/esm/models/alignment.js +15 -0
- package/esm/models/alignmentallowedcallrecord.d.ts +19 -0
- package/esm/models/alignmentallowedcallrecord.js +17 -0
- package/esm/models/alignmentblockedcallrecord.d.ts +19 -0
- package/esm/models/alignmentblockedcallrecord.js +17 -0
- package/esm/models/alignmentcallrecord.d.ts +12 -0
- package/esm/models/alignmentcallrecord.js +19 -0
- package/esm/models/alignmentchataudio.d.ts +20 -0
- package/esm/models/alignmentchataudio.js +15 -0
- package/esm/models/alignmentchatimage.d.ts +24 -0
- package/esm/models/alignmentchatimage.js +32 -0
- package/esm/models/alignmentchatrejected.d.ts +31 -0
- package/esm/models/alignmentchatrejected.js +32 -0
- package/esm/models/alignmentchattoolcall.d.ts +26 -0
- package/esm/models/alignmentchattoolcall.js +29 -0
- package/esm/models/alignmentplugin.d.ts +54 -0
- package/esm/models/alignmentplugin.js +33 -0
- package/esm/models/alignmentrejected.d.ts +10 -0
- package/esm/models/alignmentrejected.js +17 -0
- package/esm/models/alignmentresponsesrejected.d.ts +18 -0
- package/esm/models/alignmentresponsesrejected.js +31 -0
- package/esm/models/alignmentrulerecord.d.ts +17 -0
- package/esm/models/alignmentrulerecord.js +15 -0
- package/esm/models/alignmentunavailablecallrecord.d.ts +25 -0
- package/esm/models/alignmentunavailablecallrecord.js +25 -0
- package/esm/models/batchobject.d.ts +5 -0
- package/esm/models/batchobject.js +2 -0
- package/esm/models/chatrequest.d.ts +5 -4
- package/esm/models/chatrequest.js +3 -0
- package/esm/models/createenduserrequest.d.ts +15 -0
- package/esm/models/createenduserrequest.js +13 -0
- package/esm/models/enduser.d.ts +25 -0
- package/esm/models/enduser.js +24 -0
- package/esm/models/enduserresponse.d.ts +11 -0
- package/esm/models/enduserresponse.js +15 -0
- package/esm/models/index.d.ts +27 -1
- package/esm/models/index.js +27 -1
- package/esm/models/listendusersresponse.d.ts +15 -0
- package/esm/models/listendusersresponse.js +21 -0
- package/esm/models/messagesrequest.d.ts +5 -4
- package/esm/models/messagesrequest.js +3 -0
- package/esm/models/{responseserrorfield.d.ts → openresponseserrorfield.d.ts} +10 -5
- package/esm/models/{responseserrorfield.js → openresponseserrorfield.js} +7 -5
- package/esm/models/openresponseserrormetadata.d.ts +31 -0
- package/esm/models/openresponseserrormetadata.js +25 -0
- package/esm/models/openresponsesresult.d.ts +8 -3
- package/esm/models/openresponsesresult.js +4 -2
- package/esm/models/operations/createenduser.d.ts +56 -0
- package/esm/models/operations/createenduser.js +23 -0
- package/esm/models/operations/deleteenduser.d.ts +58 -0
- package/esm/models/operations/deleteenduser.js +21 -0
- package/esm/models/operations/getenduser.d.ts +58 -0
- package/esm/models/operations/getenduser.js +21 -0
- package/esm/models/operations/index.d.ts +5 -0
- package/esm/models/operations/index.js +5 -0
- package/esm/models/operations/listendusers.d.ts +82 -0
- package/esm/models/operations/listendusers.js +38 -0
- package/esm/models/operations/updateenduser.d.ts +61 -0
- package/esm/models/operations/updateenduser.js +24 -0
- package/esm/models/outputitemapplypatchcall.d.ts +31 -0
- package/esm/models/outputitemapplypatchcall.js +49 -0
- package/esm/models/outputitemcodeinterpretercall.d.ts +37 -0
- package/esm/models/outputitemcodeinterpretercall.js +51 -0
- package/esm/models/outputitemcustomtoolcall.d.ts +32 -0
- package/esm/models/outputitemcustomtoolcall.js +34 -0
- package/esm/models/outputitemfilesearchcall.d.ts +14 -0
- package/esm/models/outputitemfilesearchcall.js +18 -0
- package/esm/models/outputitemfunctioncall.d.ts +46 -0
- package/esm/models/outputitemfunctioncall.js +54 -0
- package/esm/models/outputitemimagegenerationcall.d.ts +1 -8
- package/esm/models/outputitemimagegenerationcall.js +1 -6
- package/esm/models/outputitemreasoning.d.ts +40 -0
- package/esm/models/outputitemreasoning.js +54 -0
- package/esm/models/outputitemwebsearchcall.d.ts +47 -0
- package/esm/models/outputitemwebsearchcall.js +60 -0
- package/esm/models/outputmessage.d.ts +1 -7
- package/esm/models/outputmessage.js +1 -6
- package/esm/models/outputwebsearchcallitem.d.ts +25 -25
- package/esm/models/outputwebsearchcallitem.js +31 -32
- package/esm/models/responsesrequest.d.ts +5 -4
- package/esm/models/responsesrequest.js +3 -0
- package/esm/models/updateenduserrequest.d.ts +15 -0
- package/esm/models/updateenduserrequest.js +18 -0
- package/esm/sdk/endusers.d.ts +44 -0
- package/esm/sdk/endusers.js +60 -0
- package/esm/sdk/sdk.d.ts +3 -0
- package/esm/sdk/sdk.js +4 -0
- package/jsr.json +1 -1
- package/package.json +9 -9
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 759b367102df
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { collectExtraKeys as collectExtraKeys$, safeParse, } from "../lib/schemas.js";
|
|
7
|
+
import { discriminatedUnion } from "../types/discriminatedUnion.js";
|
|
8
|
+
import { WebSearchSource$inboundSchema, } from "./websearchsource.js";
|
|
9
|
+
import { WebSearchStatus$inboundSchema, } from "./websearchstatus.js";
|
|
10
|
+
/** @internal */
|
|
11
|
+
export const OutputItemWebSearchCallActionFindInPage$inboundSchema = z.object({
|
|
12
|
+
pattern: z.string(),
|
|
13
|
+
type: z.literal("find_in_page"),
|
|
14
|
+
url: z.string(),
|
|
15
|
+
});
|
|
16
|
+
export function outputItemWebSearchCallActionFindInPageFromJSON(jsonString) {
|
|
17
|
+
return safeParse(jsonString, (x) => OutputItemWebSearchCallActionFindInPage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputItemWebSearchCallActionFindInPage' from JSON`);
|
|
18
|
+
}
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const OutputItemWebSearchCallActionOpenPage$inboundSchema = z.object({
|
|
21
|
+
type: z.literal("open_page"),
|
|
22
|
+
url: z.nullable(z.string()).optional(),
|
|
23
|
+
});
|
|
24
|
+
export function outputItemWebSearchCallActionOpenPageFromJSON(jsonString) {
|
|
25
|
+
return safeParse(jsonString, (x) => OutputItemWebSearchCallActionOpenPage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputItemWebSearchCallActionOpenPage' from JSON`);
|
|
26
|
+
}
|
|
27
|
+
/** @internal */
|
|
28
|
+
export const OutputItemWebSearchCallActionSearch$inboundSchema = z.object({
|
|
29
|
+
queries: z.array(z.string()).optional(),
|
|
30
|
+
query: z.string(),
|
|
31
|
+
sources: z.array(WebSearchSource$inboundSchema).optional(),
|
|
32
|
+
type: z.literal("search"),
|
|
33
|
+
});
|
|
34
|
+
export function outputItemWebSearchCallActionSearchFromJSON(jsonString) {
|
|
35
|
+
return safeParse(jsonString, (x) => OutputItemWebSearchCallActionSearch$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputItemWebSearchCallActionSearch' from JSON`);
|
|
36
|
+
}
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const OutputItemWebSearchCallActionUnion$inboundSchema = discriminatedUnion("type", {
|
|
39
|
+
search: z.lazy(() => OutputItemWebSearchCallActionSearch$inboundSchema),
|
|
40
|
+
open_page: z.lazy(() => OutputItemWebSearchCallActionOpenPage$inboundSchema),
|
|
41
|
+
find_in_page: z.lazy(() => OutputItemWebSearchCallActionFindInPage$inboundSchema),
|
|
42
|
+
});
|
|
43
|
+
export function outputItemWebSearchCallActionUnionFromJSON(jsonString) {
|
|
44
|
+
return safeParse(jsonString, (x) => OutputItemWebSearchCallActionUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputItemWebSearchCallActionUnion' from JSON`);
|
|
45
|
+
}
|
|
46
|
+
/** @internal */
|
|
47
|
+
export const OutputItemWebSearchCall$inboundSchema = collectExtraKeys$(z.object({
|
|
48
|
+
action: discriminatedUnion("type", {
|
|
49
|
+
search: z.lazy(() => OutputItemWebSearchCallActionSearch$inboundSchema),
|
|
50
|
+
open_page: z.lazy(() => OutputItemWebSearchCallActionOpenPage$inboundSchema),
|
|
51
|
+
find_in_page: z.lazy(() => OutputItemWebSearchCallActionFindInPage$inboundSchema),
|
|
52
|
+
}).optional(),
|
|
53
|
+
id: z.string(),
|
|
54
|
+
status: WebSearchStatus$inboundSchema,
|
|
55
|
+
type: z.literal("web_search_call"),
|
|
56
|
+
}).catchall(z.any()), "additionalProperties", true);
|
|
57
|
+
export function outputItemWebSearchCallFromJSON(jsonString) {
|
|
58
|
+
return safeParse(jsonString, (x) => OutputItemWebSearchCall$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputItemWebSearchCall' from JSON`);
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=outputitemwebsearchcall.js.map
|
|
@@ -35,10 +35,6 @@ export declare const OutputMessageStatusCompleted: {
|
|
|
35
35
|
};
|
|
36
36
|
export type OutputMessageStatusCompleted = ClosedEnum<typeof OutputMessageStatusCompleted>;
|
|
37
37
|
export type OutputMessageStatusUnion = OutputMessageStatusCompleted | OutputMessageStatusIncomplete | OutputMessageStatusInProgress;
|
|
38
|
-
export declare const OutputMessageType: {
|
|
39
|
-
readonly Message: "message";
|
|
40
|
-
};
|
|
41
|
-
export type OutputMessageType = ClosedEnum<typeof OutputMessageType>;
|
|
42
38
|
export type OutputMessage = {
|
|
43
39
|
content: Array<ResponseOutputText | OpenAIResponsesRefusalContent | discriminatedUnionTypes.Unknown<"type">>;
|
|
44
40
|
id: string;
|
|
@@ -48,7 +44,7 @@ export type OutputMessage = {
|
|
|
48
44
|
phase?: OutputMessagePhaseCommentary | OutputMessagePhaseFinalAnswer | null | undefined;
|
|
49
45
|
role: OutputMessageRole;
|
|
50
46
|
status?: OutputMessageStatusCompleted | OutputMessageStatusIncomplete | OutputMessageStatusInProgress | undefined;
|
|
51
|
-
type:
|
|
47
|
+
type: "message";
|
|
52
48
|
};
|
|
53
49
|
/** @internal */
|
|
54
50
|
export declare const OutputMessageContent$inboundSchema: z.ZodType<OutputMessageContent, unknown>;
|
|
@@ -72,8 +68,6 @@ export declare const OutputMessageStatusCompleted$inboundSchema: z.ZodEnum<typeo
|
|
|
72
68
|
export declare const OutputMessageStatusUnion$inboundSchema: z.ZodType<OutputMessageStatusUnion, unknown>;
|
|
73
69
|
export declare function outputMessageStatusUnionFromJSON(jsonString: string): SafeParseResult<OutputMessageStatusUnion, SDKValidationError>;
|
|
74
70
|
/** @internal */
|
|
75
|
-
export declare const OutputMessageType$inboundSchema: z.ZodEnum<typeof OutputMessageType>;
|
|
76
|
-
/** @internal */
|
|
77
71
|
export declare const OutputMessage$inboundSchema: z.ZodType<OutputMessage, unknown>;
|
|
78
72
|
export declare function outputMessageFromJSON(jsonString: string): SafeParseResult<OutputMessage, SDKValidationError>;
|
|
79
73
|
//# sourceMappingURL=outputmessage.d.ts.map
|
|
@@ -25,9 +25,6 @@ export const OutputMessageStatusIncomplete = {
|
|
|
25
25
|
export const OutputMessageStatusCompleted = {
|
|
26
26
|
Completed: "completed",
|
|
27
27
|
};
|
|
28
|
-
export const OutputMessageType = {
|
|
29
|
-
Message: "message",
|
|
30
|
-
};
|
|
31
28
|
/** @internal */
|
|
32
29
|
export const OutputMessageContent$inboundSchema = discriminatedUnion("type", {
|
|
33
30
|
output_text: ResponseOutputText$inboundSchema,
|
|
@@ -66,8 +63,6 @@ export function outputMessageStatusUnionFromJSON(jsonString) {
|
|
|
66
63
|
return safeParse(jsonString, (x) => OutputMessageStatusUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputMessageStatusUnion' from JSON`);
|
|
67
64
|
}
|
|
68
65
|
/** @internal */
|
|
69
|
-
export const OutputMessageType$inboundSchema = z.enum(OutputMessageType);
|
|
70
|
-
/** @internal */
|
|
71
66
|
export const OutputMessage$inboundSchema = z
|
|
72
67
|
.object({
|
|
73
68
|
content: z.array(discriminatedUnion("type", {
|
|
@@ -85,7 +80,7 @@ export const OutputMessage$inboundSchema = z
|
|
|
85
80
|
OutputMessageStatusIncomplete$inboundSchema,
|
|
86
81
|
OutputMessageStatusInProgress$inboundSchema,
|
|
87
82
|
]).optional(),
|
|
88
|
-
type:
|
|
83
|
+
type: z.literal("message"),
|
|
89
84
|
});
|
|
90
85
|
export function outputMessageFromJSON(jsonString) {
|
|
91
86
|
return safeParse(jsonString, (x) => OutputMessage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputMessage' from JSON`);
|
|
@@ -5,12 +5,12 @@ import { Result as SafeParseResult } from "../types/fp.js";
|
|
|
5
5
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
6
6
|
import { WebSearchSource, WebSearchSource$Outbound } from "./websearchsource.js";
|
|
7
7
|
import { WebSearchStatus } from "./websearchstatus.js";
|
|
8
|
-
export type
|
|
8
|
+
export type OutputWebSearchCallItemActionFindInPage = {
|
|
9
9
|
pattern: string;
|
|
10
10
|
type: "find_in_page";
|
|
11
11
|
url: string;
|
|
12
12
|
};
|
|
13
|
-
export type
|
|
13
|
+
export type OutputWebSearchCallItemActionOpenPage = {
|
|
14
14
|
type: "open_page";
|
|
15
15
|
url?: string | null | undefined;
|
|
16
16
|
};
|
|
@@ -20,43 +20,43 @@ export type OutputWebSearchCallItemActionSearch = {
|
|
|
20
20
|
sources?: Array<WebSearchSource> | undefined;
|
|
21
21
|
type: "search";
|
|
22
22
|
};
|
|
23
|
-
export type
|
|
24
|
-
export declare const
|
|
23
|
+
export type OutputWebSearchCallItemActionUnion = OutputWebSearchCallItemActionSearch | OutputWebSearchCallItemActionOpenPage | OutputWebSearchCallItemActionFindInPage | discriminatedUnionTypes.Unknown<"type">;
|
|
24
|
+
export declare const OutputWebSearchCallItemTypeWebSearchCall: {
|
|
25
25
|
readonly WebSearchCall: "web_search_call";
|
|
26
26
|
};
|
|
27
|
-
export type
|
|
27
|
+
export type OutputWebSearchCallItemTypeWebSearchCall = ClosedEnum<typeof OutputWebSearchCallItemTypeWebSearchCall>;
|
|
28
28
|
export type OutputWebSearchCallItem = {
|
|
29
|
-
action?: OutputWebSearchCallItemActionSearch |
|
|
29
|
+
action?: OutputWebSearchCallItemActionSearch | OutputWebSearchCallItemActionOpenPage | OutputWebSearchCallItemActionFindInPage | discriminatedUnionTypes.Unknown<"type"> | undefined;
|
|
30
30
|
id: string;
|
|
31
31
|
status: WebSearchStatus;
|
|
32
|
-
type:
|
|
32
|
+
type: OutputWebSearchCallItemTypeWebSearchCall;
|
|
33
33
|
additionalProperties?: {
|
|
34
34
|
[k: string]: any;
|
|
35
35
|
} | undefined;
|
|
36
36
|
};
|
|
37
37
|
/** @internal */
|
|
38
|
-
export declare const
|
|
38
|
+
export declare const OutputWebSearchCallItemActionFindInPage$inboundSchema: z.ZodType<OutputWebSearchCallItemActionFindInPage, unknown>;
|
|
39
39
|
/** @internal */
|
|
40
|
-
export type
|
|
40
|
+
export type OutputWebSearchCallItemActionFindInPage$Outbound = {
|
|
41
41
|
pattern: string;
|
|
42
42
|
type: "find_in_page";
|
|
43
43
|
url: string;
|
|
44
44
|
};
|
|
45
45
|
/** @internal */
|
|
46
|
-
export declare const
|
|
47
|
-
export declare function
|
|
48
|
-
export declare function
|
|
46
|
+
export declare const OutputWebSearchCallItemActionFindInPage$outboundSchema: z.ZodType<OutputWebSearchCallItemActionFindInPage$Outbound, OutputWebSearchCallItemActionFindInPage>;
|
|
47
|
+
export declare function outputWebSearchCallItemActionFindInPageToJSON(outputWebSearchCallItemActionFindInPage: OutputWebSearchCallItemActionFindInPage): string;
|
|
48
|
+
export declare function outputWebSearchCallItemActionFindInPageFromJSON(jsonString: string): SafeParseResult<OutputWebSearchCallItemActionFindInPage, SDKValidationError>;
|
|
49
49
|
/** @internal */
|
|
50
|
-
export declare const
|
|
50
|
+
export declare const OutputWebSearchCallItemActionOpenPage$inboundSchema: z.ZodType<OutputWebSearchCallItemActionOpenPage, unknown>;
|
|
51
51
|
/** @internal */
|
|
52
|
-
export type
|
|
52
|
+
export type OutputWebSearchCallItemActionOpenPage$Outbound = {
|
|
53
53
|
type: "open_page";
|
|
54
54
|
url?: string | null | undefined;
|
|
55
55
|
};
|
|
56
56
|
/** @internal */
|
|
57
|
-
export declare const
|
|
58
|
-
export declare function
|
|
59
|
-
export declare function
|
|
57
|
+
export declare const OutputWebSearchCallItemActionOpenPage$outboundSchema: z.ZodType<OutputWebSearchCallItemActionOpenPage$Outbound, OutputWebSearchCallItemActionOpenPage>;
|
|
58
|
+
export declare function outputWebSearchCallItemActionOpenPageToJSON(outputWebSearchCallItemActionOpenPage: OutputWebSearchCallItemActionOpenPage): string;
|
|
59
|
+
export declare function outputWebSearchCallItemActionOpenPageFromJSON(jsonString: string): SafeParseResult<OutputWebSearchCallItemActionOpenPage, SDKValidationError>;
|
|
60
60
|
/** @internal */
|
|
61
61
|
export declare const OutputWebSearchCallItemActionSearch$inboundSchema: z.ZodType<OutputWebSearchCallItemActionSearch, unknown>;
|
|
62
62
|
/** @internal */
|
|
@@ -71,22 +71,22 @@ export declare const OutputWebSearchCallItemActionSearch$outboundSchema: z.ZodTy
|
|
|
71
71
|
export declare function outputWebSearchCallItemActionSearchToJSON(outputWebSearchCallItemActionSearch: OutputWebSearchCallItemActionSearch): string;
|
|
72
72
|
export declare function outputWebSearchCallItemActionSearchFromJSON(jsonString: string): SafeParseResult<OutputWebSearchCallItemActionSearch, SDKValidationError>;
|
|
73
73
|
/** @internal */
|
|
74
|
-
export declare const
|
|
74
|
+
export declare const OutputWebSearchCallItemActionUnion$inboundSchema: z.ZodType<OutputWebSearchCallItemActionUnion, unknown>;
|
|
75
75
|
/** @internal */
|
|
76
|
-
export type
|
|
76
|
+
export type OutputWebSearchCallItemActionUnion$Outbound = OutputWebSearchCallItemActionSearch$Outbound | OutputWebSearchCallItemActionOpenPage$Outbound | OutputWebSearchCallItemActionFindInPage$Outbound;
|
|
77
77
|
/** @internal */
|
|
78
|
-
export declare const
|
|
79
|
-
export declare function
|
|
80
|
-
export declare function
|
|
78
|
+
export declare const OutputWebSearchCallItemActionUnion$outboundSchema: z.ZodType<OutputWebSearchCallItemActionUnion$Outbound, OutputWebSearchCallItemActionUnion>;
|
|
79
|
+
export declare function outputWebSearchCallItemActionUnionToJSON(outputWebSearchCallItemActionUnion: OutputWebSearchCallItemActionUnion): string;
|
|
80
|
+
export declare function outputWebSearchCallItemActionUnionFromJSON(jsonString: string): SafeParseResult<OutputWebSearchCallItemActionUnion, SDKValidationError>;
|
|
81
81
|
/** @internal */
|
|
82
|
-
export declare const
|
|
82
|
+
export declare const OutputWebSearchCallItemTypeWebSearchCall$inboundSchema: z.ZodEnum<typeof OutputWebSearchCallItemTypeWebSearchCall>;
|
|
83
83
|
/** @internal */
|
|
84
|
-
export declare const
|
|
84
|
+
export declare const OutputWebSearchCallItemTypeWebSearchCall$outboundSchema: z.ZodEnum<typeof OutputWebSearchCallItemTypeWebSearchCall>;
|
|
85
85
|
/** @internal */
|
|
86
86
|
export declare const OutputWebSearchCallItem$inboundSchema: z.ZodType<OutputWebSearchCallItem, unknown>;
|
|
87
87
|
/** @internal */
|
|
88
88
|
export type OutputWebSearchCallItem$Outbound = {
|
|
89
|
-
action?: OutputWebSearchCallItemActionSearch$Outbound |
|
|
89
|
+
action?: OutputWebSearchCallItemActionSearch$Outbound | OutputWebSearchCallItemActionOpenPage$Outbound | OutputWebSearchCallItemActionFindInPage$Outbound | undefined;
|
|
90
90
|
id: string;
|
|
91
91
|
status: string;
|
|
92
92
|
type: string;
|
|
@@ -8,42 +8,42 @@ import { collectExtraKeys as collectExtraKeys$, safeParse, } from "../lib/schema
|
|
|
8
8
|
import { discriminatedUnion } from "../types/discriminatedUnion.js";
|
|
9
9
|
import { WebSearchSource$inboundSchema, WebSearchSource$outboundSchema, } from "./websearchsource.js";
|
|
10
10
|
import { WebSearchStatus$inboundSchema, WebSearchStatus$outboundSchema, } from "./websearchstatus.js";
|
|
11
|
-
export const
|
|
11
|
+
export const OutputWebSearchCallItemTypeWebSearchCall = {
|
|
12
12
|
WebSearchCall: "web_search_call",
|
|
13
13
|
};
|
|
14
14
|
/** @internal */
|
|
15
|
-
export const
|
|
15
|
+
export const OutputWebSearchCallItemActionFindInPage$inboundSchema = z.object({
|
|
16
16
|
pattern: z.string(),
|
|
17
17
|
type: z.literal("find_in_page"),
|
|
18
18
|
url: z.string(),
|
|
19
19
|
});
|
|
20
20
|
/** @internal */
|
|
21
|
-
export const
|
|
21
|
+
export const OutputWebSearchCallItemActionFindInPage$outboundSchema = z.object({
|
|
22
22
|
pattern: z.string(),
|
|
23
23
|
type: z.literal("find_in_page"),
|
|
24
24
|
url: z.string(),
|
|
25
25
|
});
|
|
26
|
-
export function
|
|
27
|
-
return JSON.stringify(
|
|
26
|
+
export function outputWebSearchCallItemActionFindInPageToJSON(outputWebSearchCallItemActionFindInPage) {
|
|
27
|
+
return JSON.stringify(OutputWebSearchCallItemActionFindInPage$outboundSchema.parse(outputWebSearchCallItemActionFindInPage));
|
|
28
28
|
}
|
|
29
|
-
export function
|
|
30
|
-
return safeParse(jsonString, (x) =>
|
|
29
|
+
export function outputWebSearchCallItemActionFindInPageFromJSON(jsonString) {
|
|
30
|
+
return safeParse(jsonString, (x) => OutputWebSearchCallItemActionFindInPage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputWebSearchCallItemActionFindInPage' from JSON`);
|
|
31
31
|
}
|
|
32
32
|
/** @internal */
|
|
33
|
-
export const
|
|
33
|
+
export const OutputWebSearchCallItemActionOpenPage$inboundSchema = z.object({
|
|
34
34
|
type: z.literal("open_page"),
|
|
35
35
|
url: z.nullable(z.string()).optional(),
|
|
36
36
|
});
|
|
37
37
|
/** @internal */
|
|
38
|
-
export const
|
|
38
|
+
export const OutputWebSearchCallItemActionOpenPage$outboundSchema = z.object({
|
|
39
39
|
type: z.literal("open_page"),
|
|
40
40
|
url: z.nullable(z.string()).optional(),
|
|
41
41
|
});
|
|
42
|
-
export function
|
|
43
|
-
return JSON.stringify(
|
|
42
|
+
export function outputWebSearchCallItemActionOpenPageToJSON(outputWebSearchCallItemActionOpenPage) {
|
|
43
|
+
return JSON.stringify(OutputWebSearchCallItemActionOpenPage$outboundSchema.parse(outputWebSearchCallItemActionOpenPage));
|
|
44
44
|
}
|
|
45
|
-
export function
|
|
46
|
-
return safeParse(jsonString, (x) =>
|
|
45
|
+
export function outputWebSearchCallItemActionOpenPageFromJSON(jsonString) {
|
|
46
|
+
return safeParse(jsonString, (x) => OutputWebSearchCallItemActionOpenPage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputWebSearchCallItemActionOpenPage' from JSON`);
|
|
47
47
|
}
|
|
48
48
|
/** @internal */
|
|
49
49
|
export const OutputWebSearchCallItemActionSearch$inboundSchema = z.object({
|
|
@@ -66,49 +66,48 @@ export function outputWebSearchCallItemActionSearchFromJSON(jsonString) {
|
|
|
66
66
|
return safeParse(jsonString, (x) => OutputWebSearchCallItemActionSearch$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputWebSearchCallItemActionSearch' from JSON`);
|
|
67
67
|
}
|
|
68
68
|
/** @internal */
|
|
69
|
-
export const
|
|
69
|
+
export const OutputWebSearchCallItemActionUnion$inboundSchema = discriminatedUnion("type", {
|
|
70
70
|
search: z.lazy(() => OutputWebSearchCallItemActionSearch$inboundSchema),
|
|
71
|
-
open_page: z.lazy(() =>
|
|
72
|
-
find_in_page: z.lazy(() =>
|
|
71
|
+
open_page: z.lazy(() => OutputWebSearchCallItemActionOpenPage$inboundSchema),
|
|
72
|
+
find_in_page: z.lazy(() => OutputWebSearchCallItemActionFindInPage$inboundSchema),
|
|
73
73
|
});
|
|
74
74
|
/** @internal */
|
|
75
|
-
export const
|
|
76
|
-
.union([
|
|
75
|
+
export const OutputWebSearchCallItemActionUnion$outboundSchema = z.union([
|
|
77
76
|
z.lazy(() => OutputWebSearchCallItemActionSearch$outboundSchema),
|
|
78
|
-
z.lazy(() =>
|
|
79
|
-
z.lazy(() =>
|
|
77
|
+
z.lazy(() => OutputWebSearchCallItemActionOpenPage$outboundSchema),
|
|
78
|
+
z.lazy(() => OutputWebSearchCallItemActionFindInPage$outboundSchema),
|
|
80
79
|
]);
|
|
81
|
-
export function
|
|
82
|
-
return JSON.stringify(
|
|
80
|
+
export function outputWebSearchCallItemActionUnionToJSON(outputWebSearchCallItemActionUnion) {
|
|
81
|
+
return JSON.stringify(OutputWebSearchCallItemActionUnion$outboundSchema.parse(outputWebSearchCallItemActionUnion));
|
|
83
82
|
}
|
|
84
|
-
export function
|
|
85
|
-
return safeParse(jsonString, (x) =>
|
|
83
|
+
export function outputWebSearchCallItemActionUnionFromJSON(jsonString) {
|
|
84
|
+
return safeParse(jsonString, (x) => OutputWebSearchCallItemActionUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputWebSearchCallItemActionUnion' from JSON`);
|
|
86
85
|
}
|
|
87
86
|
/** @internal */
|
|
88
|
-
export const
|
|
87
|
+
export const OutputWebSearchCallItemTypeWebSearchCall$inboundSchema = z.enum(OutputWebSearchCallItemTypeWebSearchCall);
|
|
89
88
|
/** @internal */
|
|
90
|
-
export const
|
|
89
|
+
export const OutputWebSearchCallItemTypeWebSearchCall$outboundSchema = OutputWebSearchCallItemTypeWebSearchCall$inboundSchema;
|
|
91
90
|
/** @internal */
|
|
92
91
|
export const OutputWebSearchCallItem$inboundSchema = collectExtraKeys$(z.object({
|
|
93
92
|
action: discriminatedUnion("type", {
|
|
94
93
|
search: z.lazy(() => OutputWebSearchCallItemActionSearch$inboundSchema),
|
|
95
|
-
open_page: z.lazy(() =>
|
|
96
|
-
find_in_page: z.lazy(() =>
|
|
94
|
+
open_page: z.lazy(() => OutputWebSearchCallItemActionOpenPage$inboundSchema),
|
|
95
|
+
find_in_page: z.lazy(() => OutputWebSearchCallItemActionFindInPage$inboundSchema),
|
|
97
96
|
}).optional(),
|
|
98
97
|
id: z.string(),
|
|
99
98
|
status: WebSearchStatus$inboundSchema,
|
|
100
|
-
type:
|
|
99
|
+
type: OutputWebSearchCallItemTypeWebSearchCall$inboundSchema,
|
|
101
100
|
}).catchall(z.any()), "additionalProperties", true);
|
|
102
101
|
/** @internal */
|
|
103
102
|
export const OutputWebSearchCallItem$outboundSchema = z.object({
|
|
104
103
|
action: z.union([
|
|
105
104
|
z.lazy(() => OutputWebSearchCallItemActionSearch$outboundSchema),
|
|
106
|
-
z.lazy(() =>
|
|
107
|
-
z.lazy(() =>
|
|
105
|
+
z.lazy(() => OutputWebSearchCallItemActionOpenPage$outboundSchema),
|
|
106
|
+
z.lazy(() => OutputWebSearchCallItemActionFindInPage$outboundSchema),
|
|
108
107
|
]).optional(),
|
|
109
108
|
id: z.string(),
|
|
110
109
|
status: WebSearchStatus$outboundSchema,
|
|
111
|
-
type:
|
|
110
|
+
type: OutputWebSearchCallItemTypeWebSearchCall$outboundSchema,
|
|
112
111
|
additionalProperties: z.record(z.string(), z.any()).optional(),
|
|
113
112
|
}).transform((v) => {
|
|
114
113
|
return {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
2
|
import { OpenEnum } from "../types/enums.js";
|
|
3
3
|
import { AdvisorServerToolOpenRouter, AdvisorServerToolOpenRouter$Outbound } from "./advisorservertoolopenrouter.js";
|
|
4
|
+
import { AlignmentPlugin, AlignmentPlugin$Outbound } from "./alignmentplugin.js";
|
|
4
5
|
import { AnthropicCacheControlDirective, AnthropicCacheControlDirective$Outbound } from "./anthropiccachecontroldirective.js";
|
|
5
6
|
import { ApplyPatchServerTool, ApplyPatchServerTool$Outbound } from "./applypatchservertool.js";
|
|
6
7
|
import { ApplyPatchServerToolOpenRouter, ApplyPatchServerToolOpenRouter$Outbound } from "./applypatchservertoolopenrouter.js";
|
|
@@ -57,7 +58,7 @@ import { WebFetchServerTool, WebFetchServerTool$Outbound } from "./webfetchserve
|
|
|
57
58
|
import { WebSearchPlugin, WebSearchPlugin$Outbound } from "./websearchplugin.js";
|
|
58
59
|
import { WebSearchServerTool, WebSearchServerTool$Outbound } from "./websearchservertool.js";
|
|
59
60
|
import { WebSearchServerToolOpenRouter, WebSearchServerToolOpenRouter$Outbound } from "./websearchservertoolopenrouter.js";
|
|
60
|
-
export type ResponsesRequestPlugin = AutoBetaRouterPlugin | AutoRouterPlugin | ContextCompressionPlugin | FileParserPlugin | FusionPlugin | JevRouterPlugin | ModerationPlugin | ParetoRouterPlugin | ResponseHealingPlugin | SwitchyardRouterPlugin | WebSearchPlugin | WebFetchPlugin;
|
|
61
|
+
export type ResponsesRequestPlugin = AlignmentPlugin | AutoBetaRouterPlugin | AutoRouterPlugin | ContextCompressionPlugin | FileParserPlugin | FusionPlugin | JevRouterPlugin | ModerationPlugin | ParetoRouterPlugin | ResponseHealingPlugin | SwitchyardRouterPlugin | WebSearchPlugin | WebFetchPlugin;
|
|
61
62
|
export type ReasoningConfig = {
|
|
62
63
|
/**
|
|
63
64
|
* Controls which reasoning is available to the model. `auto` uses the model default (same as omitting); `all_turns` includes reasoning from earlier turns passed in input; `current_turn` limits to the current turn only. Only supported by OpenAI GPT-5.6 and newer.
|
|
@@ -210,7 +211,7 @@ export type ResponsesRequest = {
|
|
|
210
211
|
/**
|
|
211
212
|
* Plugins you want to enable for this request, including their settings.
|
|
212
213
|
*/
|
|
213
|
-
plugins?: Array<AutoBetaRouterPlugin | AutoRouterPlugin | ContextCompressionPlugin | FileParserPlugin | FusionPlugin | JevRouterPlugin | ModerationPlugin | ParetoRouterPlugin | ResponseHealingPlugin | SwitchyardRouterPlugin | WebSearchPlugin | WebFetchPlugin> | undefined;
|
|
214
|
+
plugins?: Array<AlignmentPlugin | AutoBetaRouterPlugin | AutoRouterPlugin | ContextCompressionPlugin | FileParserPlugin | FusionPlugin | JevRouterPlugin | ModerationPlugin | ParetoRouterPlugin | ResponseHealingPlugin | SwitchyardRouterPlugin | WebSearchPlugin | WebFetchPlugin> | undefined;
|
|
214
215
|
presencePenalty?: number | null | undefined;
|
|
215
216
|
/**
|
|
216
217
|
* Not supported on this proxy. Each response request is independent: no responses are stored, so a previous response cannot be referenced. Requests with a non-null value are rejected with a 400 error. Send the full conversation history in `input` instead.
|
|
@@ -323,7 +324,7 @@ export type ResponsesRequest = {
|
|
|
323
324
|
user?: string | undefined;
|
|
324
325
|
};
|
|
325
326
|
/** @internal */
|
|
326
|
-
export type ResponsesRequestPlugin$Outbound = AutoBetaRouterPlugin$Outbound | AutoRouterPlugin$Outbound | ContextCompressionPlugin$Outbound | FileParserPlugin$Outbound | FusionPlugin$Outbound | JevRouterPlugin$Outbound | ModerationPlugin$Outbound | ParetoRouterPlugin$Outbound | ResponseHealingPlugin$Outbound | SwitchyardRouterPlugin$Outbound | WebSearchPlugin$Outbound | WebFetchPlugin$Outbound;
|
|
327
|
+
export type ResponsesRequestPlugin$Outbound = AlignmentPlugin$Outbound | AutoBetaRouterPlugin$Outbound | AutoRouterPlugin$Outbound | ContextCompressionPlugin$Outbound | FileParserPlugin$Outbound | FusionPlugin$Outbound | JevRouterPlugin$Outbound | ModerationPlugin$Outbound | ParetoRouterPlugin$Outbound | ResponseHealingPlugin$Outbound | SwitchyardRouterPlugin$Outbound | WebSearchPlugin$Outbound | WebFetchPlugin$Outbound;
|
|
327
328
|
/** @internal */
|
|
328
329
|
export declare const ResponsesRequestPlugin$outboundSchema: z.ZodType<ResponsesRequestPlugin$Outbound, ResponsesRequestPlugin>;
|
|
329
330
|
export declare function responsesRequestPluginToJSON(responsesRequestPlugin: ResponsesRequestPlugin): string;
|
|
@@ -436,7 +437,7 @@ export type ResponsesRequest$Outbound = {
|
|
|
436
437
|
model?: string | undefined;
|
|
437
438
|
models?: Array<string> | undefined;
|
|
438
439
|
parallel_tool_calls?: boolean | null | undefined;
|
|
439
|
-
plugins?: Array<AutoBetaRouterPlugin$Outbound | AutoRouterPlugin$Outbound | ContextCompressionPlugin$Outbound | FileParserPlugin$Outbound | FusionPlugin$Outbound | JevRouterPlugin$Outbound | ModerationPlugin$Outbound | ParetoRouterPlugin$Outbound | ResponseHealingPlugin$Outbound | SwitchyardRouterPlugin$Outbound | WebSearchPlugin$Outbound | WebFetchPlugin$Outbound> | undefined;
|
|
440
|
+
plugins?: Array<AlignmentPlugin$Outbound | AutoBetaRouterPlugin$Outbound | AutoRouterPlugin$Outbound | ContextCompressionPlugin$Outbound | FileParserPlugin$Outbound | FusionPlugin$Outbound | JevRouterPlugin$Outbound | ModerationPlugin$Outbound | ParetoRouterPlugin$Outbound | ResponseHealingPlugin$Outbound | SwitchyardRouterPlugin$Outbound | WebSearchPlugin$Outbound | WebFetchPlugin$Outbound> | undefined;
|
|
440
441
|
presence_penalty?: number | null | undefined;
|
|
441
442
|
previous_response_id?: any | undefined;
|
|
442
443
|
prompt?: StoredPromptTemplate$Outbound | null | undefined;
|
|
@@ -6,6 +6,7 @@ import * as z from "zod/v4";
|
|
|
6
6
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
7
|
import * as openEnums from "../types/enums.js";
|
|
8
8
|
import { AdvisorServerToolOpenRouter$outboundSchema, } from "./advisorservertoolopenrouter.js";
|
|
9
|
+
import { AlignmentPlugin$outboundSchema, } from "./alignmentplugin.js";
|
|
9
10
|
import { AnthropicCacheControlDirective$outboundSchema, } from "./anthropiccachecontroldirective.js";
|
|
10
11
|
import { ApplyPatchServerTool$outboundSchema, } from "./applypatchservertool.js";
|
|
11
12
|
import { ApplyPatchServerToolOpenRouter$outboundSchema, } from "./applypatchservertoolopenrouter.js";
|
|
@@ -76,6 +77,7 @@ export const ResponsesRequestServiceTier = {
|
|
|
76
77
|
};
|
|
77
78
|
/** @internal */
|
|
78
79
|
export const ResponsesRequestPlugin$outboundSchema = z.union([
|
|
80
|
+
AlignmentPlugin$outboundSchema,
|
|
79
81
|
AutoBetaRouterPlugin$outboundSchema,
|
|
80
82
|
AutoRouterPlugin$outboundSchema,
|
|
81
83
|
ContextCompressionPlugin$outboundSchema,
|
|
@@ -179,6 +181,7 @@ export const ResponsesRequest$outboundSchema = z.object({
|
|
|
179
181
|
models: z.array(z.string()).optional(),
|
|
180
182
|
parallelToolCalls: z.nullable(z.boolean()).optional(),
|
|
181
183
|
plugins: z.array(z.union([
|
|
184
|
+
AlignmentPlugin$outboundSchema,
|
|
182
185
|
AutoBetaRouterPlugin$outboundSchema,
|
|
183
186
|
AutoRouterPlugin$outboundSchema,
|
|
184
187
|
ContextCompressionPlugin$outboundSchema,
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
export type UpdateEndUserRequest = {
|
|
3
|
+
/**
|
|
4
|
+
* Registration state only; does not enforce inference access.
|
|
5
|
+
*/
|
|
6
|
+
isActive: boolean;
|
|
7
|
+
};
|
|
8
|
+
/** @internal */
|
|
9
|
+
export type UpdateEndUserRequest$Outbound = {
|
|
10
|
+
is_active: boolean;
|
|
11
|
+
};
|
|
12
|
+
/** @internal */
|
|
13
|
+
export declare const UpdateEndUserRequest$outboundSchema: z.ZodType<UpdateEndUserRequest$Outbound, UpdateEndUserRequest>;
|
|
14
|
+
export declare function updateEndUserRequestToJSON(updateEndUserRequest: UpdateEndUserRequest): string;
|
|
15
|
+
//# sourceMappingURL=updateenduserrequest.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 74fcb924ddd3
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export const UpdateEndUserRequest$outboundSchema = z.object({
|
|
9
|
+
isActive: z.boolean(),
|
|
10
|
+
}).transform((v) => {
|
|
11
|
+
return remap$(v, {
|
|
12
|
+
isActive: "is_active",
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
export function updateEndUserRequestToJSON(updateEndUserRequest) {
|
|
16
|
+
return JSON.stringify(UpdateEndUserRequest$outboundSchema.parse(updateEndUserRequest));
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=updateenduserrequest.js.map
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
2
|
+
import * as models from "../models/index.js";
|
|
3
|
+
import * as operations from "../models/operations/index.js";
|
|
4
|
+
import { PageIterator } from "../types/operations.js";
|
|
5
|
+
export declare class EndUsers extends ClientSDK {
|
|
6
|
+
/**
|
|
7
|
+
* List registered end users
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
* List registrations belonging to the authenticated organization. Inactive registrations are excluded by default. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
11
|
+
*/
|
|
12
|
+
list(request?: operations.ListEndUsersRequest | undefined, options?: RequestOptions): Promise<PageIterator<operations.ListEndUsersResponse, {
|
|
13
|
+
offset: number;
|
|
14
|
+
}>>;
|
|
15
|
+
/**
|
|
16
|
+
* Register an end user
|
|
17
|
+
*
|
|
18
|
+
* @remarks
|
|
19
|
+
* Register a caller-supplied tracking ID under the authenticated organization. No login account, policy, or credentials are created. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
20
|
+
*/
|
|
21
|
+
create(request: operations.CreateEndUserRequest, options?: RequestOptions): Promise<models.EndUserResponse>;
|
|
22
|
+
/**
|
|
23
|
+
* Deactivate a registered end user
|
|
24
|
+
*
|
|
25
|
+
* @remarks
|
|
26
|
+
* Soft-deactivate a registration while retaining its tracking ID. Repeat deactivation succeeds. This does not block inference; reactivate through PATCH. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
27
|
+
*/
|
|
28
|
+
delete(request: operations.DeleteEndUserRequest, options?: RequestOptions): Promise<void>;
|
|
29
|
+
/**
|
|
30
|
+
* Get a registered end user
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* Retrieve an active or inactive registration by its URL-encoded, caller-supplied tracking ID. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
34
|
+
*/
|
|
35
|
+
get(request: operations.GetEndUserRequest, options?: RequestOptions): Promise<models.EndUserResponse>;
|
|
36
|
+
/**
|
|
37
|
+
* Update a registered end user
|
|
38
|
+
*
|
|
39
|
+
* @remarks
|
|
40
|
+
* Update registration state without changing identity. State changes do not enforce inference access. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
41
|
+
*/
|
|
42
|
+
update(request: operations.UpdateEndUserRequest, options?: RequestOptions): Promise<models.EndUserResponse>;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=endusers.d.ts.map
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 8e12697ee658
|
|
4
|
+
*/
|
|
5
|
+
import { endUsersCreate } from "../funcs/endUsersCreate.js";
|
|
6
|
+
import { endUsersDelete } from "../funcs/endUsersDelete.js";
|
|
7
|
+
import { endUsersGet } from "../funcs/endUsersGet.js";
|
|
8
|
+
import { endUsersList } from "../funcs/endUsersList.js";
|
|
9
|
+
import { endUsersUpdate } from "../funcs/endUsersUpdate.js";
|
|
10
|
+
import { ClientSDK } from "../lib/sdks.js";
|
|
11
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
12
|
+
import { unwrapResultIterator } from "../types/operations.js";
|
|
13
|
+
export class EndUsers extends ClientSDK {
|
|
14
|
+
/**
|
|
15
|
+
* List registered end users
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
* List registrations belonging to the authenticated organization. Inactive registrations are excluded by default. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
19
|
+
*/
|
|
20
|
+
async list(request, options) {
|
|
21
|
+
return unwrapResultIterator(endUsersList(this, request, options));
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Register an end user
|
|
25
|
+
*
|
|
26
|
+
* @remarks
|
|
27
|
+
* Register a caller-supplied tracking ID under the authenticated organization. No login account, policy, or credentials are created. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
28
|
+
*/
|
|
29
|
+
async create(request, options) {
|
|
30
|
+
return unwrapAsync(endUsersCreate(this, request, options));
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Deactivate a registered end user
|
|
34
|
+
*
|
|
35
|
+
* @remarks
|
|
36
|
+
* Soft-deactivate a registration while retaining its tracking ID. Repeat deactivation succeeds. This does not block inference; reactivate through PATCH. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
37
|
+
*/
|
|
38
|
+
async delete(request, options) {
|
|
39
|
+
return unwrapAsync(endUsersDelete(this, request, options));
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Get a registered end user
|
|
43
|
+
*
|
|
44
|
+
* @remarks
|
|
45
|
+
* Retrieve an active or inactive registration by its URL-encoded, caller-supplied tracking ID. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
46
|
+
*/
|
|
47
|
+
async get(request, options) {
|
|
48
|
+
return unwrapAsync(endUsersGet(this, request, options));
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Update a registered end user
|
|
52
|
+
*
|
|
53
|
+
* @remarks
|
|
54
|
+
* Update registration state without changing identity. State changes do not enforce inference access. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
55
|
+
*/
|
|
56
|
+
async update(request, options) {
|
|
57
|
+
return unwrapAsync(endUsersUpdate(this, request, options));
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=endusers.js.map
|
package/esm/sdk/sdk.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ import { Credits } from "./credits.js";
|
|
|
13
13
|
import { Datasets } from "./datasets.js";
|
|
14
14
|
import { Embeddings } from "./embeddings.js";
|
|
15
15
|
import { Endpoints } from "./endpoints.js";
|
|
16
|
+
import { EndUsers } from "./endusers.js";
|
|
16
17
|
import { Files } from "./files.js";
|
|
17
18
|
import { Generations } from "./generations.js";
|
|
18
19
|
import { Guardrails } from "./guardrails.js";
|
|
@@ -70,6 +71,8 @@ export declare class OpenRouter extends ClientSDK {
|
|
|
70
71
|
get datasets(): Datasets;
|
|
71
72
|
private _embeddings?;
|
|
72
73
|
get embeddings(): Embeddings;
|
|
74
|
+
private _endUsers?;
|
|
75
|
+
get endUsers(): EndUsers;
|
|
73
76
|
private _endpoints?;
|
|
74
77
|
get endpoints(): Endpoints;
|
|
75
78
|
private _files?;
|
package/esm/sdk/sdk.js
CHANGED
|
@@ -17,6 +17,7 @@ import { Credits } from "./credits.js";
|
|
|
17
17
|
import { Datasets } from "./datasets.js";
|
|
18
18
|
import { Embeddings } from "./embeddings.js";
|
|
19
19
|
import { Endpoints } from "./endpoints.js";
|
|
20
|
+
import { EndUsers } from "./endusers.js";
|
|
20
21
|
import { Files } from "./files.js";
|
|
21
22
|
import { Generations } from "./generations.js";
|
|
22
23
|
import { Guardrails } from "./guardrails.js";
|
|
@@ -86,6 +87,9 @@ export class OpenRouter extends ClientSDK {
|
|
|
86
87
|
get embeddings() {
|
|
87
88
|
return (this._embeddings ?? (this._embeddings = new Embeddings(this._options)));
|
|
88
89
|
}
|
|
90
|
+
get endUsers() {
|
|
91
|
+
return (this._endUsers ?? (this._endUsers = new EndUsers(this._options)));
|
|
92
|
+
}
|
|
89
93
|
get endpoints() {
|
|
90
94
|
return (this._endpoints ?? (this._endpoints = new Endpoints(this._options)));
|
|
91
95
|
}
|