@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
|
@@ -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 { OpenResponsesErrorMetadata } from "./openresponseserrormetadata.js";
|
|
5
6
|
export declare const CodeEnum: {
|
|
6
7
|
readonly ServerError: "server_error";
|
|
7
8
|
readonly RateLimitExceeded: "rate_limit_exceeded";
|
|
@@ -28,15 +29,19 @@ export declare const CodeEnum: {
|
|
|
28
29
|
};
|
|
29
30
|
export type CodeEnum = OpenEnum<typeof CodeEnum>;
|
|
30
31
|
/**
|
|
31
|
-
* Error
|
|
32
|
+
* Error of a failed response; `metadata` carries OpenRouter-specific details.
|
|
32
33
|
*/
|
|
33
|
-
export type
|
|
34
|
+
export type OpenResponsesErrorField = {
|
|
34
35
|
code: CodeEnum;
|
|
35
36
|
message: string;
|
|
37
|
+
/**
|
|
38
|
+
* OpenRouter-specific details of a failed response, such as the alignment object of an alignment error.
|
|
39
|
+
*/
|
|
40
|
+
metadata?: OpenResponsesErrorMetadata | undefined;
|
|
36
41
|
};
|
|
37
42
|
/** @internal */
|
|
38
43
|
export declare const CodeEnum$inboundSchema: z.ZodType<CodeEnum, unknown>;
|
|
39
44
|
/** @internal */
|
|
40
|
-
export declare const
|
|
41
|
-
export declare function
|
|
42
|
-
//# sourceMappingURL=
|
|
45
|
+
export declare const OpenResponsesErrorField$inboundSchema: z.ZodType<OpenResponsesErrorField, unknown>;
|
|
46
|
+
export declare function openResponsesErrorFieldFromJSON(jsonString: string): SafeParseResult<OpenResponsesErrorField, SDKValidationError>;
|
|
47
|
+
//# sourceMappingURL=openresponseserrorfield.d.ts.map
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
* @generated-id:
|
|
3
|
+
* @generated-id: 5e6568bba8ea
|
|
4
4
|
*/
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
6
|
import { safeParse } from "../lib/schemas.js";
|
|
7
7
|
import * as openEnums from "../types/enums.js";
|
|
8
|
+
import { OpenResponsesErrorMetadata$inboundSchema, } from "./openresponseserrormetadata.js";
|
|
8
9
|
export const CodeEnum = {
|
|
9
10
|
ServerError: "server_error",
|
|
10
11
|
RateLimitExceeded: "rate_limit_exceeded",
|
|
@@ -33,11 +34,12 @@ export const CodeEnum = {
|
|
|
33
34
|
export const CodeEnum$inboundSchema = openEnums
|
|
34
35
|
.inboundSchema(CodeEnum);
|
|
35
36
|
/** @internal */
|
|
36
|
-
export const
|
|
37
|
+
export const OpenResponsesErrorField$inboundSchema = z.object({
|
|
37
38
|
code: CodeEnum$inboundSchema,
|
|
38
39
|
message: z.string(),
|
|
40
|
+
metadata: OpenResponsesErrorMetadata$inboundSchema.optional(),
|
|
39
41
|
});
|
|
40
|
-
export function
|
|
41
|
-
return safeParse(jsonString, (x) =>
|
|
42
|
+
export function openResponsesErrorFieldFromJSON(jsonString) {
|
|
43
|
+
return safeParse(jsonString, (x) => OpenResponsesErrorField$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OpenResponsesErrorField' from JSON`);
|
|
42
44
|
}
|
|
43
|
-
//# sourceMappingURL=
|
|
45
|
+
//# sourceMappingURL=openresponseserrorfield.js.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { AlignmentCallRecord } from "./alignmentcallrecord.js";
|
|
4
|
+
import { AlignmentRejected } from "./alignmentrejected.js";
|
|
5
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
6
|
+
/**
|
|
7
|
+
* Beta. The result of the alignment plugin for this request; the shape may change.
|
|
8
|
+
*/
|
|
9
|
+
export type OpenResponsesErrorMetadataAlignment = {
|
|
10
|
+
/**
|
|
11
|
+
* One record per evaluated assistant message of the request, in the order the messages were produced.
|
|
12
|
+
*/
|
|
13
|
+
calls: Array<AlignmentCallRecord>;
|
|
14
|
+
rejected?: AlignmentRejected | undefined;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* OpenRouter-specific details of a failed response, such as the alignment object of an alignment error.
|
|
18
|
+
*/
|
|
19
|
+
export type OpenResponsesErrorMetadata = {
|
|
20
|
+
/**
|
|
21
|
+
* Beta. The result of the alignment plugin for this request; the shape may change.
|
|
22
|
+
*/
|
|
23
|
+
alignment?: OpenResponsesErrorMetadataAlignment | undefined;
|
|
24
|
+
};
|
|
25
|
+
/** @internal */
|
|
26
|
+
export declare const OpenResponsesErrorMetadataAlignment$inboundSchema: z.ZodType<OpenResponsesErrorMetadataAlignment, unknown>;
|
|
27
|
+
export declare function openResponsesErrorMetadataAlignmentFromJSON(jsonString: string): SafeParseResult<OpenResponsesErrorMetadataAlignment, SDKValidationError>;
|
|
28
|
+
/** @internal */
|
|
29
|
+
export declare const OpenResponsesErrorMetadata$inboundSchema: z.ZodType<OpenResponsesErrorMetadata, unknown>;
|
|
30
|
+
export declare function openResponsesErrorMetadataFromJSON(jsonString: string): SafeParseResult<OpenResponsesErrorMetadata, SDKValidationError>;
|
|
31
|
+
//# sourceMappingURL=openresponseserrormetadata.d.ts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: ddcf2da5f265
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { AlignmentCallRecord$inboundSchema, } from "./alignmentcallrecord.js";
|
|
8
|
+
import { AlignmentRejected$inboundSchema, } from "./alignmentrejected.js";
|
|
9
|
+
/** @internal */
|
|
10
|
+
export const OpenResponsesErrorMetadataAlignment$inboundSchema = z.object({
|
|
11
|
+
calls: z.array(AlignmentCallRecord$inboundSchema),
|
|
12
|
+
rejected: AlignmentRejected$inboundSchema.optional(),
|
|
13
|
+
});
|
|
14
|
+
export function openResponsesErrorMetadataAlignmentFromJSON(jsonString) {
|
|
15
|
+
return safeParse(jsonString, (x) => OpenResponsesErrorMetadataAlignment$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OpenResponsesErrorMetadataAlignment' from JSON`);
|
|
16
|
+
}
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const OpenResponsesErrorMetadata$inboundSchema = z.object({
|
|
19
|
+
alignment: z.lazy(() => OpenResponsesErrorMetadataAlignment$inboundSchema)
|
|
20
|
+
.optional(),
|
|
21
|
+
});
|
|
22
|
+
export function openResponsesErrorMetadataFromJSON(jsonString) {
|
|
23
|
+
return safeParse(jsonString, (x) => OpenResponsesErrorMetadata$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OpenResponsesErrorMetadata' from JSON`);
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=openresponseserrormetadata.js.map
|
|
@@ -2,6 +2,7 @@ import * as z from "zod/v4";
|
|
|
2
2
|
import * as discriminatedUnionTypes from "../types/discriminatedUnion.js";
|
|
3
3
|
import { ClosedEnum } from "../types/enums.js";
|
|
4
4
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
5
|
+
import { Alignment } from "./alignment.js";
|
|
5
6
|
import { ApiErrorType } from "./apierrortype.js";
|
|
6
7
|
import { ApplyPatchServerTool } from "./applypatchservertool.js";
|
|
7
8
|
import { BaseInputsUnion } from "./baseinputsunion.js";
|
|
@@ -19,12 +20,12 @@ import { McpServerTool } from "./mcpservertool.js";
|
|
|
19
20
|
import { NamespaceTool } from "./namespacetool.js";
|
|
20
21
|
import { OpenAIResponsesResponseStatus } from "./openairesponsesresponsestatus.js";
|
|
21
22
|
import { OpenAIResponsesToolChoiceUnion } from "./openairesponsestoolchoiceunion.js";
|
|
23
|
+
import { OpenResponsesErrorField } from "./openresponseserrorfield.js";
|
|
22
24
|
import { OpenRouterMetadata } from "./openroutermetadata.js";
|
|
23
25
|
import { OutputItems } from "./outputitems.js";
|
|
24
26
|
import { Preview20250311WebSearchServerTool } from "./preview20250311websearchservertool.js";
|
|
25
27
|
import { PreviewWebSearchServerTool } from "./previewwebsearchservertool.js";
|
|
26
28
|
import { PromptCacheOptions } from "./promptcacheoptions.js";
|
|
27
|
-
import { ResponsesErrorField } from "./responseserrorfield.js";
|
|
28
29
|
import { ServerToolUseDetails } from "./servertoolusedetails.js";
|
|
29
30
|
import { ShellServerTool } from "./shellservertool.js";
|
|
30
31
|
import { StoredPromptTemplate } from "./storedprompttemplate.js";
|
|
@@ -128,9 +129,9 @@ export type OpenResponsesResult = {
|
|
|
128
129
|
completedAt: number | null;
|
|
129
130
|
createdAt: number;
|
|
130
131
|
/**
|
|
131
|
-
* Error
|
|
132
|
+
* Error of a failed response; `metadata` carries OpenRouter-specific details.
|
|
132
133
|
*/
|
|
133
|
-
error:
|
|
134
|
+
error: OpenResponsesErrorField | null;
|
|
134
135
|
frequencyPenalty: number | null;
|
|
135
136
|
id: string;
|
|
136
137
|
incompleteDetails: IncompleteDetails | null;
|
|
@@ -204,6 +205,10 @@ export type OpenResponsesResult = {
|
|
|
204
205
|
*/
|
|
205
206
|
usage?: Usage | null | undefined;
|
|
206
207
|
user?: string | null | undefined;
|
|
208
|
+
/**
|
|
209
|
+
* Beta. The result of the alignment plugin for this request; the shape may change.
|
|
210
|
+
*/
|
|
211
|
+
alignment?: Alignment | undefined;
|
|
207
212
|
/**
|
|
208
213
|
* Canonical OpenRouter error type, stable across all API formats
|
|
209
214
|
*/
|
|
@@ -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 { discriminatedUnion } from "../types/discriminatedUnion.js";
|
|
9
|
+
import { Alignment$inboundSchema } from "./alignment.js";
|
|
9
10
|
import { ApiErrorType$inboundSchema } from "./apierrortype.js";
|
|
10
11
|
import { ApplyPatchServerTool$inboundSchema, } from "./applypatchservertool.js";
|
|
11
12
|
import { BaseInputsUnion$inboundSchema, } from "./baseinputsunion.js";
|
|
@@ -22,12 +23,12 @@ import { McpServerTool$inboundSchema } from "./mcpservertool.js";
|
|
|
22
23
|
import { NamespaceTool$inboundSchema } from "./namespacetool.js";
|
|
23
24
|
import { OpenAIResponsesResponseStatus$inboundSchema, } from "./openairesponsesresponsestatus.js";
|
|
24
25
|
import { OpenAIResponsesToolChoiceUnion$inboundSchema, } from "./openairesponsestoolchoiceunion.js";
|
|
26
|
+
import { OpenResponsesErrorField$inboundSchema, } from "./openresponseserrorfield.js";
|
|
25
27
|
import { OpenRouterMetadata$inboundSchema, } from "./openroutermetadata.js";
|
|
26
28
|
import { OutputItems$inboundSchema } from "./outputitems.js";
|
|
27
29
|
import { Preview20250311WebSearchServerTool$inboundSchema, } from "./preview20250311websearchservertool.js";
|
|
28
30
|
import { PreviewWebSearchServerTool$inboundSchema, } from "./previewwebsearchservertool.js";
|
|
29
31
|
import { PromptCacheOptions$inboundSchema, } from "./promptcacheoptions.js";
|
|
30
|
-
import { ResponsesErrorField$inboundSchema, } from "./responseserrorfield.js";
|
|
31
32
|
import { ServerToolUseDetails$inboundSchema, } from "./servertoolusedetails.js";
|
|
32
33
|
import { ShellServerTool$inboundSchema, } from "./shellservertool.js";
|
|
33
34
|
import { StoredPromptTemplate$inboundSchema, } from "./storedprompttemplate.js";
|
|
@@ -150,7 +151,7 @@ export const OpenResponsesResult$inboundSchema = z.object({
|
|
|
150
151
|
background: z.nullable(z.boolean()).optional(),
|
|
151
152
|
completed_at: z.nullable(z.int()),
|
|
152
153
|
created_at: z.int(),
|
|
153
|
-
error: z.nullable(
|
|
154
|
+
error: z.nullable(OpenResponsesErrorField$inboundSchema),
|
|
154
155
|
frequency_penalty: z.nullable(z.number()),
|
|
155
156
|
id: z.string(),
|
|
156
157
|
incomplete_details: z.nullable(IncompleteDetails$inboundSchema),
|
|
@@ -198,6 +199,7 @@ export const OpenResponsesResult$inboundSchema = z.object({
|
|
|
198
199
|
truncation: z.nullable(Truncation$inboundSchema).optional(),
|
|
199
200
|
usage: z.nullable(z.lazy(() => Usage$inboundSchema)).optional(),
|
|
200
201
|
user: z.nullable(z.string()).optional(),
|
|
202
|
+
alignment: Alignment$inboundSchema.optional(),
|
|
201
203
|
error_type: ApiErrorType$inboundSchema.optional(),
|
|
202
204
|
openrouter_metadata: OpenRouterMetadata$inboundSchema.optional(),
|
|
203
205
|
}).transform((v) => {
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import * as models from "../index.js";
|
|
3
|
+
export type CreateEndUserGlobals = {
|
|
4
|
+
/**
|
|
5
|
+
* The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
6
|
+
*
|
|
7
|
+
* @remarks
|
|
8
|
+
* This is used to track API usage per application.
|
|
9
|
+
*/
|
|
10
|
+
httpReferer?: string | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
*/
|
|
16
|
+
appTitle?: string | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
|
|
19
|
+
*
|
|
20
|
+
* @remarks
|
|
21
|
+
*/
|
|
22
|
+
appCategories?: string | undefined;
|
|
23
|
+
};
|
|
24
|
+
export type CreateEndUserRequest = {
|
|
25
|
+
/**
|
|
26
|
+
* The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
27
|
+
*
|
|
28
|
+
* @remarks
|
|
29
|
+
* This is used to track API usage per application.
|
|
30
|
+
*/
|
|
31
|
+
httpReferer?: string | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
34
|
+
*
|
|
35
|
+
* @remarks
|
|
36
|
+
*/
|
|
37
|
+
appTitle?: string | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
|
|
40
|
+
*
|
|
41
|
+
* @remarks
|
|
42
|
+
*/
|
|
43
|
+
appCategories?: string | undefined;
|
|
44
|
+
createEndUserRequest: models.CreateEndUserRequest;
|
|
45
|
+
};
|
|
46
|
+
/** @internal */
|
|
47
|
+
export type CreateEndUserRequest$Outbound = {
|
|
48
|
+
"HTTP-Referer"?: string | undefined;
|
|
49
|
+
appTitle?: string | undefined;
|
|
50
|
+
appCategories?: string | undefined;
|
|
51
|
+
CreateEndUserRequest: models.CreateEndUserRequest$Outbound;
|
|
52
|
+
};
|
|
53
|
+
/** @internal */
|
|
54
|
+
export declare const CreateEndUserRequest$outboundSchema: z.ZodType<CreateEndUserRequest$Outbound, CreateEndUserRequest>;
|
|
55
|
+
export declare function createEndUserRequestToJSON(createEndUserRequest: CreateEndUserRequest): string;
|
|
56
|
+
//# sourceMappingURL=createenduser.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 0f247a9b55fb
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { CreateEndUserRequest$outboundSchema as models_CreateEndUserRequest$outboundSchema } from "../createenduserrequest.js";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const CreateEndUserRequest$outboundSchema = z.object({
|
|
10
|
+
httpReferer: z.string().optional(),
|
|
11
|
+
appTitle: z.string().optional(),
|
|
12
|
+
appCategories: z.string().optional(),
|
|
13
|
+
createEndUserRequest: models_CreateEndUserRequest$outboundSchema,
|
|
14
|
+
}).transform((v) => {
|
|
15
|
+
return remap$(v, {
|
|
16
|
+
httpReferer: "HTTP-Referer",
|
|
17
|
+
createEndUserRequest: "CreateEndUserRequest",
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
export function createEndUserRequestToJSON(createEndUserRequest) {
|
|
21
|
+
return JSON.stringify(CreateEndUserRequest$outboundSchema.parse(createEndUserRequest));
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=createenduser.js.map
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
export type DeleteEndUserGlobals = {
|
|
3
|
+
/**
|
|
4
|
+
* The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* This is used to track API usage per application.
|
|
8
|
+
*/
|
|
9
|
+
httpReferer?: string | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
*/
|
|
15
|
+
appTitle?: string | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
*/
|
|
21
|
+
appCategories?: string | undefined;
|
|
22
|
+
};
|
|
23
|
+
export type DeleteEndUserRequest = {
|
|
24
|
+
/**
|
|
25
|
+
* The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
26
|
+
*
|
|
27
|
+
* @remarks
|
|
28
|
+
* This is used to track API usage per application.
|
|
29
|
+
*/
|
|
30
|
+
httpReferer?: string | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
33
|
+
*
|
|
34
|
+
* @remarks
|
|
35
|
+
*/
|
|
36
|
+
appTitle?: string | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
|
|
39
|
+
*
|
|
40
|
+
* @remarks
|
|
41
|
+
*/
|
|
42
|
+
appCategories?: string | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* Immutable case-sensitive tracking string supplied as user on inference requests. URL-encode it in resource paths.
|
|
45
|
+
*/
|
|
46
|
+
user: string;
|
|
47
|
+
};
|
|
48
|
+
/** @internal */
|
|
49
|
+
export type DeleteEndUserRequest$Outbound = {
|
|
50
|
+
"HTTP-Referer"?: string | undefined;
|
|
51
|
+
appTitle?: string | undefined;
|
|
52
|
+
appCategories?: string | undefined;
|
|
53
|
+
user: string;
|
|
54
|
+
};
|
|
55
|
+
/** @internal */
|
|
56
|
+
export declare const DeleteEndUserRequest$outboundSchema: z.ZodType<DeleteEndUserRequest$Outbound, DeleteEndUserRequest>;
|
|
57
|
+
export declare function deleteEndUserRequestToJSON(deleteEndUserRequest: DeleteEndUserRequest): string;
|
|
58
|
+
//# sourceMappingURL=deleteenduser.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 3ae73f681eb2
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export const DeleteEndUserRequest$outboundSchema = z.object({
|
|
9
|
+
httpReferer: z.string().optional(),
|
|
10
|
+
appTitle: z.string().optional(),
|
|
11
|
+
appCategories: z.string().optional(),
|
|
12
|
+
user: z.string(),
|
|
13
|
+
}).transform((v) => {
|
|
14
|
+
return remap$(v, {
|
|
15
|
+
httpReferer: "HTTP-Referer",
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
export function deleteEndUserRequestToJSON(deleteEndUserRequest) {
|
|
19
|
+
return JSON.stringify(DeleteEndUserRequest$outboundSchema.parse(deleteEndUserRequest));
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=deleteenduser.js.map
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
export type GetEndUserGlobals = {
|
|
3
|
+
/**
|
|
4
|
+
* The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* This is used to track API usage per application.
|
|
8
|
+
*/
|
|
9
|
+
httpReferer?: string | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
*/
|
|
15
|
+
appTitle?: string | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
*/
|
|
21
|
+
appCategories?: string | undefined;
|
|
22
|
+
};
|
|
23
|
+
export type GetEndUserRequest = {
|
|
24
|
+
/**
|
|
25
|
+
* The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
26
|
+
*
|
|
27
|
+
* @remarks
|
|
28
|
+
* This is used to track API usage per application.
|
|
29
|
+
*/
|
|
30
|
+
httpReferer?: string | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
33
|
+
*
|
|
34
|
+
* @remarks
|
|
35
|
+
*/
|
|
36
|
+
appTitle?: string | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
|
|
39
|
+
*
|
|
40
|
+
* @remarks
|
|
41
|
+
*/
|
|
42
|
+
appCategories?: string | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* Immutable case-sensitive tracking string supplied as user on inference requests. URL-encode it in resource paths.
|
|
45
|
+
*/
|
|
46
|
+
user: string;
|
|
47
|
+
};
|
|
48
|
+
/** @internal */
|
|
49
|
+
export type GetEndUserRequest$Outbound = {
|
|
50
|
+
"HTTP-Referer"?: string | undefined;
|
|
51
|
+
appTitle?: string | undefined;
|
|
52
|
+
appCategories?: string | undefined;
|
|
53
|
+
user: string;
|
|
54
|
+
};
|
|
55
|
+
/** @internal */
|
|
56
|
+
export declare const GetEndUserRequest$outboundSchema: z.ZodType<GetEndUserRequest$Outbound, GetEndUserRequest>;
|
|
57
|
+
export declare function getEndUserRequestToJSON(getEndUserRequest: GetEndUserRequest): string;
|
|
58
|
+
//# sourceMappingURL=getenduser.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: a59cb5362b77
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export const GetEndUserRequest$outboundSchema = z.object({
|
|
9
|
+
httpReferer: z.string().optional(),
|
|
10
|
+
appTitle: z.string().optional(),
|
|
11
|
+
appCategories: z.string().optional(),
|
|
12
|
+
user: z.string(),
|
|
13
|
+
}).transform((v) => {
|
|
14
|
+
return remap$(v, {
|
|
15
|
+
httpReferer: "HTTP-Referer",
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
export function getEndUserRequestToJSON(getEndUserRequest) {
|
|
19
|
+
return JSON.stringify(GetEndUserRequest$outboundSchema.parse(getEndUserRequest));
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=getenduser.js.map
|
|
@@ -14,6 +14,7 @@ export * from "./createauthkeyscode.js";
|
|
|
14
14
|
export * from "./createbatches.js";
|
|
15
15
|
export * from "./createbyokkey.js";
|
|
16
16
|
export * from "./createembeddings.js";
|
|
17
|
+
export * from "./createenduser.js";
|
|
17
18
|
export * from "./createguardrail.js";
|
|
18
19
|
export * from "./createimages.js";
|
|
19
20
|
export * from "./createintern.js";
|
|
@@ -34,6 +35,7 @@ export * from "./createvideos.js";
|
|
|
34
35
|
export * from "./createworkspace.js";
|
|
35
36
|
export * from "./deletebatch.js";
|
|
36
37
|
export * from "./deletebyokkey.js";
|
|
38
|
+
export * from "./deleteenduser.js";
|
|
37
39
|
export * from "./deletefile.js";
|
|
38
40
|
export * from "./deleteguardrail.js";
|
|
39
41
|
export * from "./deleteintern.js";
|
|
@@ -58,6 +60,7 @@ export * from "./getbyokkey.js";
|
|
|
58
60
|
export * from "./getcontainerfile.js";
|
|
59
61
|
export * from "./getcredits.js";
|
|
60
62
|
export * from "./getcurrentkey.js";
|
|
63
|
+
export * from "./getenduser.js";
|
|
61
64
|
export * from "./getfilemetadata.js";
|
|
62
65
|
export * from "./getgeneration.js";
|
|
63
66
|
export * from "./getguardrail.js";
|
|
@@ -89,6 +92,7 @@ export * from "./listcontainerfiles.js";
|
|
|
89
92
|
export * from "./listembeddingsmodels.js";
|
|
90
93
|
export * from "./listendpoints.js";
|
|
91
94
|
export * from "./listendpointszdr.js";
|
|
95
|
+
export * from "./listendusers.js";
|
|
92
96
|
export * from "./listfiles.js";
|
|
93
97
|
export * from "./listgenerationcontent.js";
|
|
94
98
|
export * from "./listguardrailkeyassignments.js";
|
|
@@ -128,6 +132,7 @@ export * from "./storevaultsecret.js";
|
|
|
128
132
|
export * from "./submitgenerationfeedback.js";
|
|
129
133
|
export * from "./suspendintern.js";
|
|
130
134
|
export * from "./updatebyokkey.js";
|
|
135
|
+
export * from "./updateenduser.js";
|
|
131
136
|
export * from "./updateguardrail.js";
|
|
132
137
|
export * from "./updateintern.js";
|
|
133
138
|
export * from "./updatekeys.js";
|
|
@@ -18,6 +18,7 @@ export * from "./createauthkeyscode.js";
|
|
|
18
18
|
export * from "./createbatches.js";
|
|
19
19
|
export * from "./createbyokkey.js";
|
|
20
20
|
export * from "./createembeddings.js";
|
|
21
|
+
export * from "./createenduser.js";
|
|
21
22
|
export * from "./createguardrail.js";
|
|
22
23
|
export * from "./createimages.js";
|
|
23
24
|
export * from "./createintern.js";
|
|
@@ -38,6 +39,7 @@ export * from "./createvideos.js";
|
|
|
38
39
|
export * from "./createworkspace.js";
|
|
39
40
|
export * from "./deletebatch.js";
|
|
40
41
|
export * from "./deletebyokkey.js";
|
|
42
|
+
export * from "./deleteenduser.js";
|
|
41
43
|
export * from "./deletefile.js";
|
|
42
44
|
export * from "./deleteguardrail.js";
|
|
43
45
|
export * from "./deleteintern.js";
|
|
@@ -62,6 +64,7 @@ export * from "./getbyokkey.js";
|
|
|
62
64
|
export * from "./getcontainerfile.js";
|
|
63
65
|
export * from "./getcredits.js";
|
|
64
66
|
export * from "./getcurrentkey.js";
|
|
67
|
+
export * from "./getenduser.js";
|
|
65
68
|
export * from "./getfilemetadata.js";
|
|
66
69
|
export * from "./getgeneration.js";
|
|
67
70
|
export * from "./getguardrail.js";
|
|
@@ -93,6 +96,7 @@ export * from "./listcontainerfiles.js";
|
|
|
93
96
|
export * from "./listembeddingsmodels.js";
|
|
94
97
|
export * from "./listendpoints.js";
|
|
95
98
|
export * from "./listendpointszdr.js";
|
|
99
|
+
export * from "./listendusers.js";
|
|
96
100
|
export * from "./listfiles.js";
|
|
97
101
|
export * from "./listgenerationcontent.js";
|
|
98
102
|
export * from "./listguardrailkeyassignments.js";
|
|
@@ -132,6 +136,7 @@ export * from "./storevaultsecret.js";
|
|
|
132
136
|
export * from "./submitgenerationfeedback.js";
|
|
133
137
|
export * from "./suspendintern.js";
|
|
134
138
|
export * from "./updatebyokkey.js";
|
|
139
|
+
export * from "./updateenduser.js";
|
|
135
140
|
export * from "./updateguardrail.js";
|
|
136
141
|
export * from "./updateintern.js";
|
|
137
142
|
export * from "./updatekeys.js";
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
4
|
+
import * as models from "../index.js";
|
|
5
|
+
export type ListEndUsersGlobals = {
|
|
6
|
+
/**
|
|
7
|
+
* The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
* This is used to track API usage per application.
|
|
11
|
+
*/
|
|
12
|
+
httpReferer?: string | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
*/
|
|
18
|
+
appTitle?: string | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
|
|
21
|
+
*
|
|
22
|
+
* @remarks
|
|
23
|
+
*/
|
|
24
|
+
appCategories?: string | undefined;
|
|
25
|
+
};
|
|
26
|
+
export type ListEndUsersRequest = {
|
|
27
|
+
/**
|
|
28
|
+
* The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
29
|
+
*
|
|
30
|
+
* @remarks
|
|
31
|
+
* This is used to track API usage per application.
|
|
32
|
+
*/
|
|
33
|
+
httpReferer?: string | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
36
|
+
*
|
|
37
|
+
* @remarks
|
|
38
|
+
*/
|
|
39
|
+
appTitle?: string | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
|
|
42
|
+
*
|
|
43
|
+
* @remarks
|
|
44
|
+
*/
|
|
45
|
+
appCategories?: string | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* Number of records to skip for pagination
|
|
48
|
+
*/
|
|
49
|
+
offset?: number | null | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* Maximum number of records to return (max 100)
|
|
52
|
+
*/
|
|
53
|
+
limit?: number | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* Immutable case-sensitive tracking string supplied as user on inference requests. URL-encode it in resource paths.
|
|
56
|
+
*/
|
|
57
|
+
user?: string | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* Include deactivated registrations.
|
|
60
|
+
*/
|
|
61
|
+
includeInactive?: boolean | undefined;
|
|
62
|
+
};
|
|
63
|
+
export type ListEndUsersResponse = {
|
|
64
|
+
result: models.ListEndUsersResponse;
|
|
65
|
+
};
|
|
66
|
+
/** @internal */
|
|
67
|
+
export type ListEndUsersRequest$Outbound = {
|
|
68
|
+
"HTTP-Referer"?: string | undefined;
|
|
69
|
+
appTitle?: string | undefined;
|
|
70
|
+
appCategories?: string | undefined;
|
|
71
|
+
offset: number | null;
|
|
72
|
+
limit: number;
|
|
73
|
+
user?: string | undefined;
|
|
74
|
+
include_inactive: boolean;
|
|
75
|
+
};
|
|
76
|
+
/** @internal */
|
|
77
|
+
export declare const ListEndUsersRequest$outboundSchema: z.ZodType<ListEndUsersRequest$Outbound, ListEndUsersRequest>;
|
|
78
|
+
export declare function listEndUsersRequestToJSON(listEndUsersRequest: ListEndUsersRequest): string;
|
|
79
|
+
/** @internal */
|
|
80
|
+
export declare const ListEndUsersResponse$inboundSchema: z.ZodType<ListEndUsersResponse, unknown>;
|
|
81
|
+
export declare function listEndUsersResponseFromJSON(jsonString: string): SafeParseResult<ListEndUsersResponse, SDKValidationError>;
|
|
82
|
+
//# sourceMappingURL=listendusers.d.ts.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: a9ea0c370613
|
|
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 { ListEndUsersResponse$inboundSchema as models_ListEndUsersResponse$inboundSchema } from "../listendusersresponse.js";
|
|
9
|
+
/** @internal */
|
|
10
|
+
export const ListEndUsersRequest$outboundSchema = z.object({
|
|
11
|
+
httpReferer: z.string().optional(),
|
|
12
|
+
appTitle: z.string().optional(),
|
|
13
|
+
appCategories: z.string().optional(),
|
|
14
|
+
offset: z.nullable(z.int().default(0)),
|
|
15
|
+
limit: z.int().default(50),
|
|
16
|
+
user: z.string().optional(),
|
|
17
|
+
includeInactive: z.boolean().default(false),
|
|
18
|
+
}).transform((v) => {
|
|
19
|
+
return remap$(v, {
|
|
20
|
+
httpReferer: "HTTP-Referer",
|
|
21
|
+
includeInactive: "include_inactive",
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
export function listEndUsersRequestToJSON(listEndUsersRequest) {
|
|
25
|
+
return JSON.stringify(ListEndUsersRequest$outboundSchema.parse(listEndUsersRequest));
|
|
26
|
+
}
|
|
27
|
+
/** @internal */
|
|
28
|
+
export const ListEndUsersResponse$inboundSchema = z.object({
|
|
29
|
+
Result: models_ListEndUsersResponse$inboundSchema,
|
|
30
|
+
}).transform((v) => {
|
|
31
|
+
return remap$(v, {
|
|
32
|
+
"Result": "result",
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
export function listEndUsersResponseFromJSON(jsonString) {
|
|
36
|
+
return safeParse(jsonString, (x) => ListEndUsersResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListEndUsersResponse' from JSON`);
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=listendusers.js.map
|