@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.
Files changed (102) hide show
  1. package/esm/funcs/endUsersCreate.d.ts +19 -0
  2. package/esm/funcs/endUsersCreate.js +100 -0
  3. package/esm/funcs/endUsersDelete.d.ts +18 -0
  4. package/esm/funcs/endUsersDelete.js +103 -0
  5. package/esm/funcs/endUsersGet.d.ts +19 -0
  6. package/esm/funcs/endUsersGet.js +103 -0
  7. package/esm/funcs/endUsersList.d.ts +21 -0
  8. package/esm/funcs/endUsersList.js +135 -0
  9. package/esm/funcs/endUsersUpdate.d.ts +19 -0
  10. package/esm/funcs/endUsersUpdate.js +106 -0
  11. package/esm/lib/config.d.ts +2 -2
  12. package/esm/lib/config.js +2 -2
  13. package/esm/models/alignment.d.ts +17 -0
  14. package/esm/models/alignment.js +15 -0
  15. package/esm/models/alignmentallowedcallrecord.d.ts +19 -0
  16. package/esm/models/alignmentallowedcallrecord.js +17 -0
  17. package/esm/models/alignmentblockedcallrecord.d.ts +19 -0
  18. package/esm/models/alignmentblockedcallrecord.js +17 -0
  19. package/esm/models/alignmentcallrecord.d.ts +12 -0
  20. package/esm/models/alignmentcallrecord.js +19 -0
  21. package/esm/models/alignmentchataudio.d.ts +20 -0
  22. package/esm/models/alignmentchataudio.js +15 -0
  23. package/esm/models/alignmentchatimage.d.ts +24 -0
  24. package/esm/models/alignmentchatimage.js +32 -0
  25. package/esm/models/alignmentchatrejected.d.ts +31 -0
  26. package/esm/models/alignmentchatrejected.js +32 -0
  27. package/esm/models/alignmentchattoolcall.d.ts +26 -0
  28. package/esm/models/alignmentchattoolcall.js +29 -0
  29. package/esm/models/alignmentplugin.d.ts +54 -0
  30. package/esm/models/alignmentplugin.js +33 -0
  31. package/esm/models/alignmentrejected.d.ts +10 -0
  32. package/esm/models/alignmentrejected.js +17 -0
  33. package/esm/models/alignmentresponsesrejected.d.ts +18 -0
  34. package/esm/models/alignmentresponsesrejected.js +31 -0
  35. package/esm/models/alignmentrulerecord.d.ts +17 -0
  36. package/esm/models/alignmentrulerecord.js +15 -0
  37. package/esm/models/alignmentunavailablecallrecord.d.ts +25 -0
  38. package/esm/models/alignmentunavailablecallrecord.js +25 -0
  39. package/esm/models/batchobject.d.ts +5 -0
  40. package/esm/models/batchobject.js +2 -0
  41. package/esm/models/chatrequest.d.ts +5 -4
  42. package/esm/models/chatrequest.js +3 -0
  43. package/esm/models/createenduserrequest.d.ts +15 -0
  44. package/esm/models/createenduserrequest.js +13 -0
  45. package/esm/models/enduser.d.ts +25 -0
  46. package/esm/models/enduser.js +24 -0
  47. package/esm/models/enduserresponse.d.ts +11 -0
  48. package/esm/models/enduserresponse.js +15 -0
  49. package/esm/models/index.d.ts +27 -1
  50. package/esm/models/index.js +27 -1
  51. package/esm/models/listendusersresponse.d.ts +15 -0
  52. package/esm/models/listendusersresponse.js +21 -0
  53. package/esm/models/messagesrequest.d.ts +5 -4
  54. package/esm/models/messagesrequest.js +3 -0
  55. package/esm/models/{responseserrorfield.d.ts → openresponseserrorfield.d.ts} +10 -5
  56. package/esm/models/{responseserrorfield.js → openresponseserrorfield.js} +7 -5
  57. package/esm/models/openresponseserrormetadata.d.ts +31 -0
  58. package/esm/models/openresponseserrormetadata.js +25 -0
  59. package/esm/models/openresponsesresult.d.ts +8 -3
  60. package/esm/models/openresponsesresult.js +4 -2
  61. package/esm/models/operations/createenduser.d.ts +56 -0
  62. package/esm/models/operations/createenduser.js +23 -0
  63. package/esm/models/operations/deleteenduser.d.ts +58 -0
  64. package/esm/models/operations/deleteenduser.js +21 -0
  65. package/esm/models/operations/getenduser.d.ts +58 -0
  66. package/esm/models/operations/getenduser.js +21 -0
  67. package/esm/models/operations/index.d.ts +5 -0
  68. package/esm/models/operations/index.js +5 -0
  69. package/esm/models/operations/listendusers.d.ts +82 -0
  70. package/esm/models/operations/listendusers.js +38 -0
  71. package/esm/models/operations/updateenduser.d.ts +61 -0
  72. package/esm/models/operations/updateenduser.js +24 -0
  73. package/esm/models/outputitemapplypatchcall.d.ts +31 -0
  74. package/esm/models/outputitemapplypatchcall.js +49 -0
  75. package/esm/models/outputitemcodeinterpretercall.d.ts +37 -0
  76. package/esm/models/outputitemcodeinterpretercall.js +51 -0
  77. package/esm/models/outputitemcustomtoolcall.d.ts +32 -0
  78. package/esm/models/outputitemcustomtoolcall.js +34 -0
  79. package/esm/models/outputitemfilesearchcall.d.ts +14 -0
  80. package/esm/models/outputitemfilesearchcall.js +18 -0
  81. package/esm/models/outputitemfunctioncall.d.ts +46 -0
  82. package/esm/models/outputitemfunctioncall.js +54 -0
  83. package/esm/models/outputitemimagegenerationcall.d.ts +1 -8
  84. package/esm/models/outputitemimagegenerationcall.js +1 -6
  85. package/esm/models/outputitemreasoning.d.ts +40 -0
  86. package/esm/models/outputitemreasoning.js +54 -0
  87. package/esm/models/outputitemwebsearchcall.d.ts +47 -0
  88. package/esm/models/outputitemwebsearchcall.js +60 -0
  89. package/esm/models/outputmessage.d.ts +1 -7
  90. package/esm/models/outputmessage.js +1 -6
  91. package/esm/models/outputwebsearchcallitem.d.ts +25 -25
  92. package/esm/models/outputwebsearchcallitem.js +31 -32
  93. package/esm/models/responsesrequest.d.ts +5 -4
  94. package/esm/models/responsesrequest.js +3 -0
  95. package/esm/models/updateenduserrequest.d.ts +15 -0
  96. package/esm/models/updateenduserrequest.js +18 -0
  97. package/esm/sdk/endusers.d.ts +44 -0
  98. package/esm/sdk/endusers.js +60 -0
  99. package/esm/sdk/sdk.d.ts +3 -0
  100. package/esm/sdk/sdk.js +4 -0
  101. package/jsr.json +1 -1
  102. package/package.json +9 -9
@@ -0,0 +1,31 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 8e48ae5ace26
4
+ */
5
+ import { safeParse } from "../lib/schemas.js";
6
+ import { discriminatedUnion } from "../types/discriminatedUnion.js";
7
+ import { OutputItemApplyPatchCall$inboundSchema, } from "./outputitemapplypatchcall.js";
8
+ import { OutputItemCodeInterpreterCall$inboundSchema, } from "./outputitemcodeinterpretercall.js";
9
+ import { OutputItemCustomToolCall$inboundSchema, } from "./outputitemcustomtoolcall.js";
10
+ import { OutputItemFileSearchCall$inboundSchema, } from "./outputitemfilesearchcall.js";
11
+ import { OutputItemFunctionCall$inboundSchema, } from "./outputitemfunctioncall.js";
12
+ import { OutputItemImageGenerationCall$inboundSchema, } from "./outputitemimagegenerationcall.js";
13
+ import { OutputItemReasoning$inboundSchema, } from "./outputitemreasoning.js";
14
+ import { OutputItemWebSearchCall$inboundSchema, } from "./outputitemwebsearchcall.js";
15
+ import { OutputMessage$inboundSchema } from "./outputmessage.js";
16
+ /** @internal */
17
+ export const AlignmentResponsesRejected$inboundSchema = discriminatedUnion("type", {
18
+ apply_patch_call: OutputItemApplyPatchCall$inboundSchema,
19
+ code_interpreter_call: OutputItemCodeInterpreterCall$inboundSchema,
20
+ custom_tool_call: OutputItemCustomToolCall$inboundSchema,
21
+ file_search_call: OutputItemFileSearchCall$inboundSchema,
22
+ function_call: OutputItemFunctionCall$inboundSchema,
23
+ image_generation_call: OutputItemImageGenerationCall$inboundSchema,
24
+ message: OutputMessage$inboundSchema,
25
+ reasoning: OutputItemReasoning$inboundSchema,
26
+ web_search_call: OutputItemWebSearchCall$inboundSchema,
27
+ });
28
+ export function alignmentResponsesRejectedFromJSON(jsonString) {
29
+ return safeParse(jsonString, (x) => AlignmentResponsesRejected$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AlignmentResponsesRejected' from JSON`);
30
+ }
31
+ //# sourceMappingURL=alignmentresponsesrejected.js.map
@@ -0,0 +1,17 @@
1
+ import * as z from "zod/v4";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
+ export type AlignmentRuleRecord = {
5
+ /**
6
+ * Whether probability is at or above the threshold.
7
+ */
8
+ broken: boolean;
9
+ /**
10
+ * The evaluator's probability that the turn breaks the rule.
11
+ */
12
+ probability: number;
13
+ };
14
+ /** @internal */
15
+ export declare const AlignmentRuleRecord$inboundSchema: z.ZodType<AlignmentRuleRecord, unknown>;
16
+ export declare function alignmentRuleRecordFromJSON(jsonString: string): SafeParseResult<AlignmentRuleRecord, SDKValidationError>;
17
+ //# sourceMappingURL=alignmentrulerecord.d.ts.map
@@ -0,0 +1,15 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: d6edb8594120
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { safeParse } from "../lib/schemas.js";
7
+ /** @internal */
8
+ export const AlignmentRuleRecord$inboundSchema = z.object({
9
+ broken: z.boolean(),
10
+ probability: z.number(),
11
+ });
12
+ export function alignmentRuleRecordFromJSON(jsonString) {
13
+ return safeParse(jsonString, (x) => AlignmentRuleRecord$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AlignmentRuleRecord' from JSON`);
14
+ }
15
+ //# sourceMappingURL=alignmentrulerecord.js.map
@@ -0,0 +1,25 @@
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
+ export declare const AlignmentUnavailableCallRecordReason: {
6
+ readonly Cut: "cut";
7
+ readonly EvaluatorError: "evaluator_error";
8
+ readonly MalformedAnswer: "malformed_answer";
9
+ readonly TimeLimit: "time_limit";
10
+ };
11
+ export type AlignmentUnavailableCallRecordReason = OpenEnum<typeof AlignmentUnavailableCallRecordReason>;
12
+ export type AlignmentUnavailableCallRecord = {
13
+ /**
14
+ * Number of the record, from 1. A record is one evaluated assistant message; a model call of a server-tool loop that produces several messages has one record per message, and a retry continues the numbering.
15
+ */
16
+ call: number;
17
+ outcome: "unavailable";
18
+ reason: AlignmentUnavailableCallRecordReason;
19
+ };
20
+ /** @internal */
21
+ export declare const AlignmentUnavailableCallRecordReason$inboundSchema: z.ZodType<AlignmentUnavailableCallRecordReason, unknown>;
22
+ /** @internal */
23
+ export declare const AlignmentUnavailableCallRecord$inboundSchema: z.ZodType<AlignmentUnavailableCallRecord, unknown>;
24
+ export declare function alignmentUnavailableCallRecordFromJSON(jsonString: string): SafeParseResult<AlignmentUnavailableCallRecord, SDKValidationError>;
25
+ //# sourceMappingURL=alignmentunavailablecallrecord.d.ts.map
@@ -0,0 +1,25 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 82c9449590f6
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { safeParse } from "../lib/schemas.js";
7
+ import * as openEnums from "../types/enums.js";
8
+ export const AlignmentUnavailableCallRecordReason = {
9
+ Cut: "cut",
10
+ EvaluatorError: "evaluator_error",
11
+ MalformedAnswer: "malformed_answer",
12
+ TimeLimit: "time_limit",
13
+ };
14
+ /** @internal */
15
+ export const AlignmentUnavailableCallRecordReason$inboundSchema = openEnums.inboundSchema(AlignmentUnavailableCallRecordReason);
16
+ /** @internal */
17
+ export const AlignmentUnavailableCallRecord$inboundSchema = z.object({
18
+ call: z.int(),
19
+ outcome: z.literal("unavailable"),
20
+ reason: AlignmentUnavailableCallRecordReason$inboundSchema,
21
+ });
22
+ export function alignmentUnavailableCallRecordFromJSON(jsonString) {
23
+ return safeParse(jsonString, (x) => AlignmentUnavailableCallRecord$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AlignmentUnavailableCallRecord' from JSON`);
24
+ }
25
+ //# sourceMappingURL=alignmentunavailablecallrecord.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, OpenEnum } from "../types/enums.js";
4
4
  import { Result as SafeParseResult } from "../types/fp.js";
5
+ import { Alignment } from "./alignment.js";
5
6
  import { AnthropicCacheCreation } from "./anthropiccachecreation.js";
6
7
  import { AnthropicContainer } from "./anthropiccontainer.js";
7
8
  import { AnthropicInputTransformation } from "./anthropicinputtransformation.js";
@@ -429,6 +430,10 @@ export type BodyUsage1 = {
429
430
  totalTokens: number;
430
431
  };
431
432
  export type BodyChatCompletion = {
433
+ /**
434
+ * Beta. The result of the alignment plugin for this request; the shape may change.
435
+ */
436
+ alignment?: Alignment | undefined;
432
437
  choices: Array<Choice>;
433
438
  created: number;
434
439
  debug?: BatchObjectDebug | undefined;
@@ -7,6 +7,7 @@ import { remap as remap$ } from "../lib/primitives.js";
7
7
  import { collectExtraKeys as collectExtraKeys$, safeParse, } from "../lib/schemas.js";
8
8
  import { discriminatedUnion } from "../types/discriminatedUnion.js";
9
9
  import * as openEnums from "../types/enums.js";
10
+ import { Alignment$inboundSchema } from "./alignment.js";
10
11
  import { AnthropicCacheCreation$inboundSchema, } from "./anthropiccachecreation.js";
11
12
  import { AnthropicContainer$inboundSchema, } from "./anthropiccontainer.js";
12
13
  import { AnthropicInputTransformation$inboundSchema, } from "./anthropicinputtransformation.js";
@@ -633,6 +634,7 @@ export function bodyUsage1FromJSON(jsonString) {
633
634
  }
634
635
  /** @internal */
635
636
  export const BodyChatCompletion$inboundSchema = z.object({
637
+ alignment: Alignment$inboundSchema.optional(),
636
638
  choices: z.array(z.lazy(() => Choice$inboundSchema)),
637
639
  created: z.int(),
638
640
  debug: z.lazy(() => BatchObjectDebug$inboundSchema).optional(),
@@ -1,5 +1,6 @@
1
1
  import * as z from "zod/v4";
2
2
  import { OpenEnum } from "../types/enums.js";
3
+ import { AlignmentPlugin, AlignmentPlugin$Outbound } from "./alignmentplugin.js";
3
4
  import { AnthropicCacheControlDirective, AnthropicCacheControlDirective$Outbound } from "./anthropiccachecontroldirective.js";
4
5
  import { AutoBetaRouterPlugin, AutoBetaRouterPlugin$Outbound } from "./autobetarouterplugin.js";
5
6
  import { AutoRouterPlugin, AutoRouterPlugin$Outbound } from "./autorouterplugin.js";
@@ -36,7 +37,7 @@ export declare const Modality: {
36
37
  readonly Audio: "audio";
37
38
  };
38
39
  export type Modality = OpenEnum<typeof Modality>;
39
- export type ChatRequestPlugin = AutoBetaRouterPlugin | AutoRouterPlugin | ContextCompressionPlugin | FileParserPlugin | FusionPlugin | JevRouterPlugin | ModerationPlugin | ParetoRouterPlugin | ResponseHealingPlugin | SwitchyardRouterPlugin | WebSearchPlugin | WebFetchPlugin;
40
+ export type ChatRequestPlugin = AlignmentPlugin | AutoBetaRouterPlugin | AutoRouterPlugin | ContextCompressionPlugin | FileParserPlugin | FusionPlugin | JevRouterPlugin | ModerationPlugin | ParetoRouterPlugin | ResponseHealingPlugin | SwitchyardRouterPlugin | WebSearchPlugin | WebFetchPlugin;
40
41
  /**
41
42
  * Constrains effort on reasoning for reasoning models
42
43
  */
@@ -176,7 +177,7 @@ export type ChatRequest = {
176
177
  /**
177
178
  * Plugins you want to enable for this request, including their settings.
178
179
  */
179
- plugins?: Array<AutoBetaRouterPlugin | AutoRouterPlugin | ContextCompressionPlugin | FileParserPlugin | FusionPlugin | JevRouterPlugin | ModerationPlugin | ParetoRouterPlugin | ResponseHealingPlugin | SwitchyardRouterPlugin | WebSearchPlugin | WebFetchPlugin> | undefined;
180
+ plugins?: Array<AlignmentPlugin | AutoBetaRouterPlugin | AutoRouterPlugin | ContextCompressionPlugin | FileParserPlugin | FusionPlugin | JevRouterPlugin | ModerationPlugin | ParetoRouterPlugin | ResponseHealingPlugin | SwitchyardRouterPlugin | WebSearchPlugin | WebFetchPlugin> | undefined;
180
181
  /**
181
182
  * Static predicted output content. Supported models can use this to reduce latency when much of the response is known in advance.
182
183
  */
@@ -278,7 +279,7 @@ export type ChatRequest = {
278
279
  /** @internal */
279
280
  export declare const Modality$outboundSchema: z.ZodType<string, Modality>;
280
281
  /** @internal */
281
- export type ChatRequestPlugin$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;
282
+ export type ChatRequestPlugin$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;
282
283
  /** @internal */
283
284
  export declare const ChatRequestPlugin$outboundSchema: z.ZodType<ChatRequestPlugin$Outbound, ChatRequestPlugin>;
284
285
  export declare function chatRequestPluginToJSON(chatRequestPlugin: ChatRequestPlugin): string;
@@ -329,7 +330,7 @@ export type ChatRequest$Outbound = {
329
330
  model?: string | undefined;
330
331
  models?: Array<string> | undefined;
331
332
  parallel_tool_calls?: boolean | null | undefined;
332
- 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;
333
+ 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;
333
334
  prediction?: Prediction$Outbound | null | undefined;
334
335
  presence_penalty?: number | null | undefined;
335
336
  prompt_cache_key?: string | null | undefined;
@@ -5,6 +5,7 @@
5
5
  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
+ import { AlignmentPlugin$outboundSchema, } from "./alignmentplugin.js";
8
9
  import { AnthropicCacheControlDirective$outboundSchema, } from "./anthropiccachecontroldirective.js";
9
10
  import { AutoBetaRouterPlugin$outboundSchema, } from "./autobetarouterplugin.js";
10
11
  import { AutoRouterPlugin$outboundSchema, } from "./autorouterplugin.js";
@@ -81,6 +82,7 @@ export const Modality$outboundSchema = openEnums
81
82
  .outboundSchema(Modality);
82
83
  /** @internal */
83
84
  export const ChatRequestPlugin$outboundSchema = z.union([
85
+ AlignmentPlugin$outboundSchema,
84
86
  AutoBetaRouterPlugin$outboundSchema,
85
87
  AutoRouterPlugin$outboundSchema,
86
88
  ContextCompressionPlugin$outboundSchema,
@@ -149,6 +151,7 @@ export const ChatRequest$outboundSchema = z.object({
149
151
  models: z.array(z.string()).optional(),
150
152
  parallelToolCalls: z.nullable(z.boolean()).optional(),
151
153
  plugins: z.array(z.union([
154
+ AlignmentPlugin$outboundSchema,
152
155
  AutoBetaRouterPlugin$outboundSchema,
153
156
  AutoRouterPlugin$outboundSchema,
154
157
  ContextCompressionPlugin$outboundSchema,
@@ -0,0 +1,15 @@
1
+ import * as z from "zod/v4";
2
+ export type CreateEndUserRequest = {
3
+ /**
4
+ * Immutable case-sensitive tracking string supplied as user on inference requests. URL-encode it in resource paths.
5
+ */
6
+ user: string;
7
+ };
8
+ /** @internal */
9
+ export type CreateEndUserRequest$Outbound = {
10
+ user: string;
11
+ };
12
+ /** @internal */
13
+ export declare const CreateEndUserRequest$outboundSchema: z.ZodType<CreateEndUserRequest$Outbound, CreateEndUserRequest>;
14
+ export declare function createEndUserRequestToJSON(createEndUserRequest: CreateEndUserRequest): string;
15
+ //# sourceMappingURL=createenduserrequest.d.ts.map
@@ -0,0 +1,13 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: ff82d51467ad
4
+ */
5
+ import * as z from "zod/v4";
6
+ /** @internal */
7
+ export const CreateEndUserRequest$outboundSchema = z.object({
8
+ user: z.string(),
9
+ });
10
+ export function createEndUserRequestToJSON(createEndUserRequest) {
11
+ return JSON.stringify(CreateEndUserRequest$outboundSchema.parse(createEndUserRequest));
12
+ }
13
+ //# sourceMappingURL=createenduserrequest.js.map
@@ -0,0 +1,25 @@
1
+ import * as z from "zod/v4";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
+ export type EndUser = {
5
+ /**
6
+ * Registration creation time.
7
+ */
8
+ createdAt: Date;
9
+ /**
10
+ * Whether this registration is active. Not an inference authorization decision.
11
+ */
12
+ isActive: boolean;
13
+ /**
14
+ * Last registration lifecycle update time.
15
+ */
16
+ updatedAt: Date;
17
+ /**
18
+ * Immutable case-sensitive tracking string supplied as user on inference requests. URL-encode it in resource paths.
19
+ */
20
+ user: string;
21
+ };
22
+ /** @internal */
23
+ export declare const EndUser$inboundSchema: z.ZodType<EndUser, unknown>;
24
+ export declare function endUserFromJSON(jsonString: string): SafeParseResult<EndUser, SDKValidationError>;
25
+ //# sourceMappingURL=enduser.d.ts.map
@@ -0,0 +1,24 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: f0f7f996359a
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ import { safeParse } from "../lib/schemas.js";
8
+ /** @internal */
9
+ export const EndUser$inboundSchema = z.object({
10
+ created_at: z.iso.datetime({ offset: true }).transform(v => new Date(v)),
11
+ is_active: z.boolean(),
12
+ updated_at: z.iso.datetime({ offset: true }).transform(v => new Date(v)),
13
+ user: z.string(),
14
+ }).transform((v) => {
15
+ return remap$(v, {
16
+ "created_at": "createdAt",
17
+ "is_active": "isActive",
18
+ "updated_at": "updatedAt",
19
+ });
20
+ });
21
+ export function endUserFromJSON(jsonString) {
22
+ return safeParse(jsonString, (x) => EndUser$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EndUser' from JSON`);
23
+ }
24
+ //# sourceMappingURL=enduser.js.map
@@ -0,0 +1,11 @@
1
+ import * as z from "zod/v4";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { EndUser } from "./enduser.js";
4
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
+ export type EndUserResponse = {
6
+ data: EndUser;
7
+ };
8
+ /** @internal */
9
+ export declare const EndUserResponse$inboundSchema: z.ZodType<EndUserResponse, unknown>;
10
+ export declare function endUserResponseFromJSON(jsonString: string): SafeParseResult<EndUserResponse, SDKValidationError>;
11
+ //# sourceMappingURL=enduserresponse.d.ts.map
@@ -0,0 +1,15 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 8e60bf584de3
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { safeParse } from "../lib/schemas.js";
7
+ import { EndUser$inboundSchema } from "./enduser.js";
8
+ /** @internal */
9
+ export const EndUserResponse$inboundSchema = z.object({
10
+ data: EndUser$inboundSchema,
11
+ });
12
+ export function endUserResponseFromJSON(jsonString) {
13
+ return safeParse(jsonString, (x) => EndUserResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EndUserResponse' from JSON`);
14
+ }
15
+ //# sourceMappingURL=enduserresponse.js.map
@@ -6,6 +6,19 @@ export * from "./advisorreasoning.js";
6
6
  export * from "./advisorservertoolconfig.js";
7
7
  export * from "./advisorservertoolopenrouter.js";
8
8
  export * from "./agentmessageitem.js";
9
+ export * from "./alignment.js";
10
+ export * from "./alignmentallowedcallrecord.js";
11
+ export * from "./alignmentblockedcallrecord.js";
12
+ export * from "./alignmentcallrecord.js";
13
+ export * from "./alignmentchataudio.js";
14
+ export * from "./alignmentchatimage.js";
15
+ export * from "./alignmentchatrejected.js";
16
+ export * from "./alignmentchattoolcall.js";
17
+ export * from "./alignmentplugin.js";
18
+ export * from "./alignmentrejected.js";
19
+ export * from "./alignmentresponsesrejected.js";
20
+ export * from "./alignmentrulerecord.js";
21
+ export * from "./alignmentunavailablecallrecord.js";
9
22
  export * from "./annotationaddedevent.js";
10
23
  export * from "./anthropicadvisormessageusageiteration.js";
11
24
  export * from "./anthropicadvisortoolresult.js";
@@ -247,6 +260,7 @@ export * from "./contextcompressionplugin.js";
247
260
  export * from "./costdetails.js";
248
261
  export * from "./createbyokkeyrequest.js";
249
262
  export * from "./createbyokkeyresponse.js";
263
+ export * from "./createenduserrequest.js";
250
264
  export * from "./createguardrailrequest.js";
251
265
  export * from "./createguardrailresponse.js";
252
266
  export * from "./createinternrequest.js";
@@ -292,6 +306,8 @@ export * from "./edgenetworktimeoutresponseerrordata.js";
292
306
  export * from "./endpointinfo.js";
293
307
  export * from "./endpointsmetadata.js";
294
308
  export * from "./endpointstatus.js";
309
+ export * from "./enduser.js";
310
+ export * from "./enduserresponse.js";
295
311
  export * from "./enumcapability.js";
296
312
  export * from "./errorevent.js";
297
313
  export * from "./failabletoolcallstatus.js";
@@ -428,6 +444,7 @@ export * from "./legacychatcontentvideoinput.js";
428
444
  export * from "./legacywebsearchservertool.js";
429
445
  export * from "./listbyokkeysresponse.js";
430
446
  export * from "./listendpointsresponse.js";
447
+ export * from "./listendusersresponse.js";
431
448
  export * from "./listguardrailsresponse.js";
432
449
  export * from "./listkeyassignmentsresponse.js";
433
450
  export * from "./listmemberassignmentsresponse.js";
@@ -520,6 +537,8 @@ export * from "./openairesponsesresponsestatus.js";
520
537
  export * from "./openairesponsestoolchoiceunion.js";
521
538
  export * from "./openairesponsestruncation.js";
522
539
  export * from "./openresponsescreatedevent.js";
540
+ export * from "./openresponseserrorfield.js";
541
+ export * from "./openresponseserrormetadata.js";
523
542
  export * from "./openresponsesinprogressevent.js";
524
543
  export * from "./openresponsesresult.js";
525
544
  export * from "./openrouterfile.js";
@@ -550,8 +569,15 @@ export * from "./outputfunctioncallitem.js";
550
569
  export * from "./outputfusionservertoolitem.js";
551
570
  export * from "./outputimagegenerationcallitem.js";
552
571
  export * from "./outputimagegenerationservertoolitem.js";
572
+ export * from "./outputitemapplypatchcall.js";
573
+ export * from "./outputitemcodeinterpretercall.js";
574
+ export * from "./outputitemcustomtoolcall.js";
575
+ export * from "./outputitemfilesearchcall.js";
576
+ export * from "./outputitemfunctioncall.js";
553
577
  export * from "./outputitemimagegenerationcall.js";
578
+ export * from "./outputitemreasoning.js";
554
579
  export * from "./outputitems.js";
580
+ export * from "./outputitemwebsearchcall.js";
555
581
  export * from "./outputmcpservertoolitem.js";
556
582
  export * from "./outputmemoryservertoolitem.js";
557
583
  export * from "./outputmessage.js";
@@ -648,7 +674,6 @@ export * from "./requesttimeoutresponseerrordata.js";
648
674
  export * from "./responsehealingplugin.js";
649
675
  export * from "./responseincludesenum.js";
650
676
  export * from "./responseoutputtext.js";
651
- export * from "./responseserrorfield.js";
652
677
  export * from "./responsesrequest.js";
653
678
  export * from "./responsesstreamingresponse.js";
654
679
  export * from "./routerattempt.js";
@@ -755,6 +780,7 @@ export * from "./unifiedbenchmarkssearchrunconfig.js";
755
780
  export * from "./unprocessableentityresponseerrordata.js";
756
781
  export * from "./updatebyokkeyrequest.js";
757
782
  export * from "./updatebyokkeyresponse.js";
783
+ export * from "./updateenduserrequest.js";
758
784
  export * from "./updateguardrailrequest.js";
759
785
  export * from "./updateguardrailresponse.js";
760
786
  export * from "./updateinternrequest.js";
@@ -10,6 +10,19 @@ export * from "./advisorreasoning.js";
10
10
  export * from "./advisorservertoolconfig.js";
11
11
  export * from "./advisorservertoolopenrouter.js";
12
12
  export * from "./agentmessageitem.js";
13
+ export * from "./alignment.js";
14
+ export * from "./alignmentallowedcallrecord.js";
15
+ export * from "./alignmentblockedcallrecord.js";
16
+ export * from "./alignmentcallrecord.js";
17
+ export * from "./alignmentchataudio.js";
18
+ export * from "./alignmentchatimage.js";
19
+ export * from "./alignmentchatrejected.js";
20
+ export * from "./alignmentchattoolcall.js";
21
+ export * from "./alignmentplugin.js";
22
+ export * from "./alignmentrejected.js";
23
+ export * from "./alignmentresponsesrejected.js";
24
+ export * from "./alignmentrulerecord.js";
25
+ export * from "./alignmentunavailablecallrecord.js";
13
26
  export * from "./annotationaddedevent.js";
14
27
  export * from "./anthropicadvisormessageusageiteration.js";
15
28
  export * from "./anthropicadvisortoolresult.js";
@@ -251,6 +264,7 @@ export * from "./contextcompressionplugin.js";
251
264
  export * from "./costdetails.js";
252
265
  export * from "./createbyokkeyrequest.js";
253
266
  export * from "./createbyokkeyresponse.js";
267
+ export * from "./createenduserrequest.js";
254
268
  export * from "./createguardrailrequest.js";
255
269
  export * from "./createguardrailresponse.js";
256
270
  export * from "./createinternrequest.js";
@@ -296,6 +310,8 @@ export * from "./edgenetworktimeoutresponseerrordata.js";
296
310
  export * from "./endpointinfo.js";
297
311
  export * from "./endpointsmetadata.js";
298
312
  export * from "./endpointstatus.js";
313
+ export * from "./enduser.js";
314
+ export * from "./enduserresponse.js";
299
315
  export * from "./enumcapability.js";
300
316
  export * from "./errorevent.js";
301
317
  export * from "./failabletoolcallstatus.js";
@@ -432,6 +448,7 @@ export * from "./legacychatcontentvideoinput.js";
432
448
  export * from "./legacywebsearchservertool.js";
433
449
  export * from "./listbyokkeysresponse.js";
434
450
  export * from "./listendpointsresponse.js";
451
+ export * from "./listendusersresponse.js";
435
452
  export * from "./listguardrailsresponse.js";
436
453
  export * from "./listkeyassignmentsresponse.js";
437
454
  export * from "./listmemberassignmentsresponse.js";
@@ -524,6 +541,8 @@ export * from "./openairesponsesresponsestatus.js";
524
541
  export * from "./openairesponsestoolchoiceunion.js";
525
542
  export * from "./openairesponsestruncation.js";
526
543
  export * from "./openresponsescreatedevent.js";
544
+ export * from "./openresponseserrorfield.js";
545
+ export * from "./openresponseserrormetadata.js";
527
546
  export * from "./openresponsesinprogressevent.js";
528
547
  export * from "./openresponsesresult.js";
529
548
  export * from "./openrouterfile.js";
@@ -554,8 +573,15 @@ export * from "./outputfunctioncallitem.js";
554
573
  export * from "./outputfusionservertoolitem.js";
555
574
  export * from "./outputimagegenerationcallitem.js";
556
575
  export * from "./outputimagegenerationservertoolitem.js";
576
+ export * from "./outputitemapplypatchcall.js";
577
+ export * from "./outputitemcodeinterpretercall.js";
578
+ export * from "./outputitemcustomtoolcall.js";
579
+ export * from "./outputitemfilesearchcall.js";
580
+ export * from "./outputitemfunctioncall.js";
557
581
  export * from "./outputitemimagegenerationcall.js";
582
+ export * from "./outputitemreasoning.js";
558
583
  export * from "./outputitems.js";
584
+ export * from "./outputitemwebsearchcall.js";
559
585
  export * from "./outputmcpservertoolitem.js";
560
586
  export * from "./outputmemoryservertoolitem.js";
561
587
  export * from "./outputmessage.js";
@@ -652,7 +678,6 @@ export * from "./requesttimeoutresponseerrordata.js";
652
678
  export * from "./responsehealingplugin.js";
653
679
  export * from "./responseincludesenum.js";
654
680
  export * from "./responseoutputtext.js";
655
- export * from "./responseserrorfield.js";
656
681
  export * from "./responsesrequest.js";
657
682
  export * from "./responsesstreamingresponse.js";
658
683
  export * from "./routerattempt.js";
@@ -759,6 +784,7 @@ export * from "./unifiedbenchmarkssearchrunconfig.js";
759
784
  export * from "./unprocessableentityresponseerrordata.js";
760
785
  export * from "./updatebyokkeyrequest.js";
761
786
  export * from "./updatebyokkeyresponse.js";
787
+ export * from "./updateenduserrequest.js";
762
788
  export * from "./updateguardrailrequest.js";
763
789
  export * from "./updateguardrailresponse.js";
764
790
  export * from "./updateinternrequest.js";
@@ -0,0 +1,15 @@
1
+ import * as z from "zod/v4";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { EndUser } from "./enduser.js";
4
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
+ export type ListEndUsersResponse = {
6
+ data: Array<EndUser>;
7
+ /**
8
+ * Number of registrations matching the filters before pagination.
9
+ */
10
+ totalCount: number;
11
+ };
12
+ /** @internal */
13
+ export declare const ListEndUsersResponse$inboundSchema: z.ZodType<ListEndUsersResponse, unknown>;
14
+ export declare function listEndUsersResponseFromJSON(jsonString: string): SafeParseResult<ListEndUsersResponse, SDKValidationError>;
15
+ //# sourceMappingURL=listendusersresponse.d.ts.map
@@ -0,0 +1,21 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: dc07ec7c7cd3
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 { EndUser$inboundSchema } from "./enduser.js";
9
+ /** @internal */
10
+ export const ListEndUsersResponse$inboundSchema = z.object({
11
+ data: z.array(EndUser$inboundSchema),
12
+ total_count: z.int(),
13
+ }).transform((v) => {
14
+ return remap$(v, {
15
+ "total_count": "totalCount",
16
+ });
17
+ });
18
+ export function listEndUsersResponseFromJSON(jsonString) {
19
+ return safeParse(jsonString, (x) => ListEndUsersResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListEndUsersResponse' from JSON`);
20
+ }
21
+ //# sourceMappingURL=listendusersresponse.js.map
@@ -1,5 +1,6 @@
1
1
  import * as z from "zod/v4";
2
2
  import { ClosedEnum, OpenEnum } from "../types/enums.js";
3
+ import { AlignmentPlugin, AlignmentPlugin$Outbound } from "./alignmentplugin.js";
3
4
  import { AnthropicAllowedCallers } from "./anthropicallowedcallers.js";
4
5
  import { AnthropicCacheControlDirective, AnthropicCacheControlDirective$Outbound } from "./anthropiccachecontroldirective.js";
5
6
  import { AnthropicInputTokensClearAtLeast, AnthropicInputTokensClearAtLeast$Outbound } from "./anthropicinputtokensclearatleast.js";
@@ -87,7 +88,7 @@ export type ContextManagement = {
87
88
  export type MessagesRequestMetadata = {
88
89
  userId?: string | null | undefined;
89
90
  };
90
- export type MessagesRequestPlugin = AutoBetaRouterPlugin | AutoRouterPlugin | ContextCompressionPlugin | FileParserPlugin | FusionPlugin | JevRouterPlugin | ModerationPlugin | ParetoRouterPlugin | ResponseHealingPlugin | SwitchyardRouterPlugin | WebSearchPlugin | WebFetchPlugin;
91
+ export type MessagesRequestPlugin = AlignmentPlugin | AutoBetaRouterPlugin | AutoRouterPlugin | ContextCompressionPlugin | FileParserPlugin | FusionPlugin | JevRouterPlugin | ModerationPlugin | ParetoRouterPlugin | ResponseHealingPlugin | SwitchyardRouterPlugin | WebSearchPlugin | WebFetchPlugin;
91
92
  /**
92
93
  * Controls output generation speed. When set to `fast`, uses a higher-speed inference configuration at premium pricing. Defaults to `standard` when omitted.
93
94
  */
@@ -285,7 +286,7 @@ export type MessagesRequest = {
285
286
  /**
286
287
  * Plugins you want to enable for this request, including their settings.
287
288
  */
288
- plugins?: Array<AutoBetaRouterPlugin | AutoRouterPlugin | ContextCompressionPlugin | FileParserPlugin | FusionPlugin | JevRouterPlugin | ModerationPlugin | ParetoRouterPlugin | ResponseHealingPlugin | SwitchyardRouterPlugin | WebSearchPlugin | WebFetchPlugin> | undefined;
289
+ plugins?: Array<AlignmentPlugin | AutoBetaRouterPlugin | AutoRouterPlugin | ContextCompressionPlugin | FileParserPlugin | FusionPlugin | JevRouterPlugin | ModerationPlugin | ParetoRouterPlugin | ResponseHealingPlugin | SwitchyardRouterPlugin | WebSearchPlugin | WebFetchPlugin> | undefined;
289
290
  /**
290
291
  * When multiple model providers are available, optionally indicate your routing preference.
291
292
  */
@@ -405,7 +406,7 @@ export type MessagesRequestMetadata$Outbound = {
405
406
  export declare const MessagesRequestMetadata$outboundSchema: z.ZodType<MessagesRequestMetadata$Outbound, MessagesRequestMetadata>;
406
407
  export declare function messagesRequestMetadataToJSON(messagesRequestMetadata: MessagesRequestMetadata): string;
407
408
  /** @internal */
408
- export type MessagesRequestPlugin$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;
409
+ export type MessagesRequestPlugin$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;
409
410
  /** @internal */
410
411
  export declare const MessagesRequestPlugin$outboundSchema: z.ZodType<MessagesRequestPlugin$Outbound, MessagesRequestPlugin>;
411
412
  export declare function messagesRequestPluginToJSON(messagesRequestPlugin: MessagesRequestPlugin): string;
@@ -619,7 +620,7 @@ export type MessagesRequest$Outbound = {
619
620
  model: string;
620
621
  models?: Array<string> | undefined;
621
622
  output_config?: MessagesOutputConfig$Outbound | undefined;
622
- 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;
623
+ 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;
623
624
  provider?: ProviderPreferences$Outbound | null | undefined;
624
625
  safeguards?: Array<AnthropicSafeguard$Outbound> | null | undefined;
625
626
  service_tier?: string | undefined;
@@ -5,6 +5,7 @@
5
5
  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
+ import { AlignmentPlugin$outboundSchema, } from "./alignmentplugin.js";
8
9
  import { AnthropicAllowedCallers$outboundSchema, } from "./anthropicallowedcallers.js";
9
10
  import { AnthropicCacheControlDirective$outboundSchema, } from "./anthropiccachecontroldirective.js";
10
11
  import { AnthropicInputTokensClearAtLeast$outboundSchema, } from "./anthropicinputtokensclearatleast.js";
@@ -222,6 +223,7 @@ export function messagesRequestMetadataToJSON(messagesRequestMetadata) {
222
223
  }
223
224
  /** @internal */
224
225
  export const MessagesRequestPlugin$outboundSchema = z.union([
226
+ AlignmentPlugin$outboundSchema,
225
227
  AutoBetaRouterPlugin$outboundSchema,
226
228
  AutoRouterPlugin$outboundSchema,
227
229
  ContextCompressionPlugin$outboundSchema,
@@ -562,6 +564,7 @@ export const MessagesRequest$outboundSchema = z.object({
562
564
  models: z.array(z.string()).optional(),
563
565
  outputConfig: MessagesOutputConfig$outboundSchema.optional(),
564
566
  plugins: z.array(z.union([
567
+ AlignmentPlugin$outboundSchema,
565
568
  AutoBetaRouterPlugin$outboundSchema,
566
569
  AutoRouterPlugin$outboundSchema,
567
570
  ContextCompressionPlugin$outboundSchema,