@openrouter/sdk 0.12.3 → 0.12.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/chatfunctiontool.d.ts +3 -2
- package/esm/models/chatfunctiontool.js +2 -0
- package/esm/models/chatrequest.d.ts +19 -24
- package/esm/models/chatrequest.js +10 -14
- package/esm/models/chatusage.d.ts +4 -4
- package/esm/models/chatusage.js +4 -4
- package/esm/models/createguardrailrequest.d.ts +2 -2
- package/esm/models/createguardrailrequest.js +1 -1
- package/esm/models/guardrail.d.ts +1 -1
- package/esm/models/guardrail.js +1 -1
- package/esm/models/imageconfig.d.ts +8 -0
- package/esm/models/imageconfig.js +11 -0
- package/esm/models/imagegenerationservertoolconfig.d.ts +23 -0
- package/esm/models/imagegenerationservertoolconfig.js +23 -0
- package/esm/models/imagegenerationservertoolconfigunion.d.ts +8 -0
- package/esm/models/imagegenerationservertoolconfigunion.js +11 -0
- package/esm/models/imagegenerationservertoolopenrouter.d.ts +28 -0
- package/esm/models/imagegenerationservertoolopenrouter.js +20 -0
- package/esm/models/index.d.ts +4 -0
- package/esm/models/index.js +4 -0
- package/esm/models/model.d.ts +1 -1
- package/esm/models/model.js +1 -1
- package/esm/models/openresponsesresult.d.ts +5 -5
- package/esm/models/openresponsesresult.js +5 -5
- package/esm/models/operations/createkeys.d.ts +4 -4
- package/esm/models/operations/createkeys.js +3 -3
- package/esm/models/operations/getcurrentkey.d.ts +2 -2
- package/esm/models/operations/getcurrentkey.js +2 -2
- package/esm/models/operations/getgeneration.d.ts +17 -17
- package/esm/models/operations/getgeneration.js +17 -17
- package/esm/models/operations/getkey.d.ts +2 -2
- package/esm/models/operations/getkey.js +2 -2
- package/esm/models/operations/list.d.ts +4 -4
- package/esm/models/operations/list.js +3 -3
- package/esm/models/operations/listguardrailkeyassignments.d.ts +2 -2
- package/esm/models/operations/listguardrailkeyassignments.js +1 -1
- package/esm/models/operations/listguardrailmemberassignments.d.ts +2 -2
- package/esm/models/operations/listguardrailmemberassignments.js +1 -1
- package/esm/models/operations/listguardrails.d.ts +2 -2
- package/esm/models/operations/listguardrails.js +1 -1
- package/esm/models/operations/listkeyassignments.d.ts +2 -2
- package/esm/models/operations/listkeyassignments.js +1 -1
- package/esm/models/operations/listmemberassignments.d.ts +2 -2
- package/esm/models/operations/listmemberassignments.js +1 -1
- package/esm/models/operations/listorganizationmembers.d.ts +2 -2
- package/esm/models/operations/listorganizationmembers.js +1 -1
- package/esm/models/operations/updatekeys.d.ts +4 -4
- package/esm/models/operations/updatekeys.js +3 -3
- package/esm/models/percentilelatencycutoffs.d.ts +8 -8
- package/esm/models/percentilelatencycutoffs.js +4 -4
- package/esm/models/percentilethroughputcutoffs.d.ts +8 -8
- package/esm/models/percentilethroughputcutoffs.js +4 -4
- package/esm/models/publicendpoint.d.ts +5 -5
- package/esm/models/publicendpoint.js +5 -5
- package/esm/models/reasoningconfig.d.ts +2 -2
- package/esm/models/reasoningconfig.js +1 -1
- package/esm/models/responsesrequest.d.ts +27 -23
- package/esm/models/responsesrequest.js +12 -14
- package/esm/models/updateguardrailrequest.d.ts +2 -2
- package/esm/models/updateguardrailrequest.js +1 -1
- package/esm/models/usage.d.ts +2 -2
- package/esm/models/usage.js +2 -2
- package/esm/models/videogenerationusage.d.ts +1 -1
- package/esm/models/videogenerationusage.js +1 -1
- package/jsr.json +1 -1
- package/package.json +6 -6
|
@@ -69,10 +69,10 @@ export function openResponsesResultToolUnionFromJSON(jsonString) {
|
|
|
69
69
|
/** @internal */
|
|
70
70
|
export const OpenResponsesResult$inboundSchema = z.object({
|
|
71
71
|
background: z.nullable(z.boolean()).optional(),
|
|
72
|
-
completed_at: z.int(),
|
|
72
|
+
completed_at: z.nullable(z.int()),
|
|
73
73
|
created_at: z.int(),
|
|
74
74
|
error: z.nullable(ResponsesErrorField$inboundSchema),
|
|
75
|
-
frequency_penalty: z.number(),
|
|
75
|
+
frequency_penalty: z.nullable(z.number()),
|
|
76
76
|
id: z.string(),
|
|
77
77
|
incomplete_details: z.nullable(IncompleteDetails$inboundSchema),
|
|
78
78
|
instructions: z.nullable(BaseInputsUnion$inboundSchema),
|
|
@@ -84,7 +84,7 @@ export const OpenResponsesResult$inboundSchema = z.object({
|
|
|
84
84
|
output: z.array(OutputItems$inboundSchema),
|
|
85
85
|
output_text: z.string().optional(),
|
|
86
86
|
parallel_tool_calls: z.boolean(),
|
|
87
|
-
presence_penalty: z.number(),
|
|
87
|
+
presence_penalty: z.nullable(z.number()),
|
|
88
88
|
previous_response_id: z.nullable(z.string()).optional(),
|
|
89
89
|
prompt: z.nullable(StoredPromptTemplate$inboundSchema).optional(),
|
|
90
90
|
prompt_cache_key: z.nullable(z.string()).optional(),
|
|
@@ -93,7 +93,7 @@ export const OpenResponsesResult$inboundSchema = z.object({
|
|
|
93
93
|
service_tier: z.nullable(z.string()).optional(),
|
|
94
94
|
status: OpenAIResponsesResponseStatus$inboundSchema,
|
|
95
95
|
store: z.boolean().optional(),
|
|
96
|
-
temperature: z.number(),
|
|
96
|
+
temperature: z.nullable(z.number()),
|
|
97
97
|
text: TextConfig$inboundSchema.optional(),
|
|
98
98
|
tool_choice: OpenAIResponsesToolChoiceUnion$inboundSchema,
|
|
99
99
|
tools: z.array(discriminatedUnion("type", {
|
|
@@ -113,7 +113,7 @@ export const OpenResponsesResult$inboundSchema = z.object({
|
|
|
113
113
|
custom: CustomTool$inboundSchema,
|
|
114
114
|
})),
|
|
115
115
|
top_logprobs: z.nullable(z.int()).optional(),
|
|
116
|
-
top_p: z.number(),
|
|
116
|
+
top_p: z.nullable(z.number()),
|
|
117
117
|
truncation: z.nullable(Truncation$inboundSchema).optional(),
|
|
118
118
|
usage: z.nullable(Usage$inboundSchema).optional(),
|
|
119
119
|
user: z.nullable(z.string()).optional(),
|
|
@@ -51,7 +51,7 @@ export type CreateKeysRequestBody = {
|
|
|
51
51
|
/**
|
|
52
52
|
* Optional spending limit for the API key in USD
|
|
53
53
|
*/
|
|
54
|
-
limit?: number | undefined;
|
|
54
|
+
limit?: number | null | undefined;
|
|
55
55
|
/**
|
|
56
56
|
* Type of limit reset for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday.
|
|
57
57
|
*/
|
|
@@ -134,11 +134,11 @@ export type CreateKeysData = {
|
|
|
134
134
|
/**
|
|
135
135
|
* Spending limit for the API key in USD
|
|
136
136
|
*/
|
|
137
|
-
limit: number;
|
|
137
|
+
limit: number | null;
|
|
138
138
|
/**
|
|
139
139
|
* Remaining spending limit in USD
|
|
140
140
|
*/
|
|
141
|
-
limitRemaining: number;
|
|
141
|
+
limitRemaining: number | null;
|
|
142
142
|
/**
|
|
143
143
|
* Type of limit reset for the API key
|
|
144
144
|
*/
|
|
@@ -188,7 +188,7 @@ export type CreateKeysRequestBody$Outbound = {
|
|
|
188
188
|
creator_user_id?: string | null | undefined;
|
|
189
189
|
expires_at?: string | null | undefined;
|
|
190
190
|
include_byok_in_limit?: boolean | undefined;
|
|
191
|
-
limit?: number | undefined;
|
|
191
|
+
limit?: number | null | undefined;
|
|
192
192
|
limit_reset?: string | null | undefined;
|
|
193
193
|
name: string;
|
|
194
194
|
};
|
|
@@ -21,7 +21,7 @@ export const CreateKeysRequestBody$outboundSchema = z.object({
|
|
|
21
21
|
creatorUserId: z.nullable(z.string()).optional(),
|
|
22
22
|
expiresAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
|
|
23
23
|
includeByokInLimit: z.boolean().optional(),
|
|
24
|
-
limit: z.number().optional(),
|
|
24
|
+
limit: z.nullable(z.number()).optional(),
|
|
25
25
|
limitReset: z.nullable(CreateKeysLimitReset$outboundSchema).optional(),
|
|
26
26
|
name: z.string(),
|
|
27
27
|
}).transform((v) => {
|
|
@@ -63,8 +63,8 @@ export const CreateKeysData$inboundSchema = z.object({
|
|
|
63
63
|
hash: z.string(),
|
|
64
64
|
include_byok_in_limit: z.boolean(),
|
|
65
65
|
label: z.string(),
|
|
66
|
-
limit: z.number(),
|
|
67
|
-
limit_remaining: z.number(),
|
|
66
|
+
limit: z.nullable(z.number()),
|
|
67
|
+
limit_remaining: z.nullable(z.number()),
|
|
68
68
|
limit_reset: z.nullable(z.string()),
|
|
69
69
|
name: z.string(),
|
|
70
70
|
updated_at: z.nullable(z.string()),
|
|
@@ -115,11 +115,11 @@ export type GetCurrentKeyData = {
|
|
|
115
115
|
/**
|
|
116
116
|
* Spending limit for the API key in USD
|
|
117
117
|
*/
|
|
118
|
-
limit: number;
|
|
118
|
+
limit: number | null;
|
|
119
119
|
/**
|
|
120
120
|
* Remaining spending limit in USD
|
|
121
121
|
*/
|
|
122
|
-
limitRemaining: number;
|
|
122
|
+
limitRemaining: number | null;
|
|
123
123
|
/**
|
|
124
124
|
* Type of limit reset for the API key
|
|
125
125
|
*/
|
|
@@ -40,8 +40,8 @@ export const GetCurrentKeyData$inboundSchema = z.object({
|
|
|
40
40
|
is_management_key: z.boolean(),
|
|
41
41
|
is_provisioning_key: z.boolean(),
|
|
42
42
|
label: z.string(),
|
|
43
|
-
limit: z.number(),
|
|
44
|
-
limit_remaining: z.number(),
|
|
43
|
+
limit: z.nullable(z.number()),
|
|
44
|
+
limit_remaining: z.nullable(z.number()),
|
|
45
45
|
limit_reset: z.nullable(z.string()),
|
|
46
46
|
rate_limit: z.lazy(() => RateLimit$inboundSchema),
|
|
47
47
|
usage: z.number(),
|
|
@@ -73,11 +73,11 @@ export type GetGenerationData = {
|
|
|
73
73
|
/**
|
|
74
74
|
* ID of the app that made the request
|
|
75
75
|
*/
|
|
76
|
-
appId: number;
|
|
76
|
+
appId: number | null;
|
|
77
77
|
/**
|
|
78
78
|
* Discount applied due to caching
|
|
79
79
|
*/
|
|
80
|
-
cacheDiscount: number;
|
|
80
|
+
cacheDiscount: number | null;
|
|
81
81
|
/**
|
|
82
82
|
* Whether the generation was cancelled
|
|
83
83
|
*/
|
|
@@ -97,7 +97,7 @@ export type GetGenerationData = {
|
|
|
97
97
|
/**
|
|
98
98
|
* Time taken for generation in milliseconds
|
|
99
99
|
*/
|
|
100
|
-
generationTime: number;
|
|
100
|
+
generationTime: number | null;
|
|
101
101
|
/**
|
|
102
102
|
* Referer header from the request
|
|
103
103
|
*/
|
|
@@ -113,7 +113,7 @@ export type GetGenerationData = {
|
|
|
113
113
|
/**
|
|
114
114
|
* Total latency in milliseconds
|
|
115
115
|
*/
|
|
116
|
-
latency: number;
|
|
116
|
+
latency: number | null;
|
|
117
117
|
/**
|
|
118
118
|
* Model used for the generation
|
|
119
119
|
*/
|
|
@@ -121,7 +121,7 @@ export type GetGenerationData = {
|
|
|
121
121
|
/**
|
|
122
122
|
* Moderation latency in milliseconds
|
|
123
123
|
*/
|
|
124
|
-
moderationLatency: number;
|
|
124
|
+
moderationLatency: number | null;
|
|
125
125
|
/**
|
|
126
126
|
* Native finish reason as reported by provider
|
|
127
127
|
*/
|
|
@@ -129,39 +129,39 @@ export type GetGenerationData = {
|
|
|
129
129
|
/**
|
|
130
130
|
* Native cached tokens as reported by provider
|
|
131
131
|
*/
|
|
132
|
-
nativeTokensCached: number;
|
|
132
|
+
nativeTokensCached: number | null;
|
|
133
133
|
/**
|
|
134
134
|
* Native completion tokens as reported by provider
|
|
135
135
|
*/
|
|
136
|
-
nativeTokensCompletion: number;
|
|
136
|
+
nativeTokensCompletion: number | null;
|
|
137
137
|
/**
|
|
138
138
|
* Native completion image tokens as reported by provider
|
|
139
139
|
*/
|
|
140
|
-
nativeTokensCompletionImages: number;
|
|
140
|
+
nativeTokensCompletionImages: number | null;
|
|
141
141
|
/**
|
|
142
142
|
* Native prompt tokens as reported by provider
|
|
143
143
|
*/
|
|
144
|
-
nativeTokensPrompt: number;
|
|
144
|
+
nativeTokensPrompt: number | null;
|
|
145
145
|
/**
|
|
146
146
|
* Native reasoning tokens as reported by provider
|
|
147
147
|
*/
|
|
148
|
-
nativeTokensReasoning: number;
|
|
148
|
+
nativeTokensReasoning: number | null;
|
|
149
149
|
/**
|
|
150
150
|
* Number of audio inputs in the prompt
|
|
151
151
|
*/
|
|
152
|
-
numInputAudioPrompt: number;
|
|
152
|
+
numInputAudioPrompt: number | null;
|
|
153
153
|
/**
|
|
154
154
|
* Number of media items in the completion
|
|
155
155
|
*/
|
|
156
|
-
numMediaCompletion: number;
|
|
156
|
+
numMediaCompletion: number | null;
|
|
157
157
|
/**
|
|
158
158
|
* Number of media items in the prompt
|
|
159
159
|
*/
|
|
160
|
-
numMediaPrompt: number;
|
|
160
|
+
numMediaPrompt: number | null;
|
|
161
161
|
/**
|
|
162
162
|
* Number of search results included
|
|
163
163
|
*/
|
|
164
|
-
numSearchResults: number;
|
|
164
|
+
numSearchResults: number | null;
|
|
165
165
|
/**
|
|
166
166
|
* Origin URL of the request
|
|
167
167
|
*/
|
|
@@ -193,11 +193,11 @@ export type GetGenerationData = {
|
|
|
193
193
|
/**
|
|
194
194
|
* Number of tokens in the completion
|
|
195
195
|
*/
|
|
196
|
-
tokensCompletion: number;
|
|
196
|
+
tokensCompletion: number | null;
|
|
197
197
|
/**
|
|
198
198
|
* Number of tokens in the prompt
|
|
199
199
|
*/
|
|
200
|
-
tokensPrompt: number;
|
|
200
|
+
tokensPrompt: number | null;
|
|
201
201
|
/**
|
|
202
202
|
* Total cost of the generation in USD
|
|
203
203
|
*/
|
|
@@ -209,7 +209,7 @@ export type GetGenerationData = {
|
|
|
209
209
|
/**
|
|
210
210
|
* Cost charged by the upstream provider
|
|
211
211
|
*/
|
|
212
|
-
upstreamInferenceCost: number;
|
|
212
|
+
upstreamInferenceCost: number | null;
|
|
213
213
|
/**
|
|
214
214
|
* Usage amount in USD
|
|
215
215
|
*/
|
|
@@ -36,29 +36,29 @@ export const ApiType$inboundSchema = openEnums
|
|
|
36
36
|
/** @internal */
|
|
37
37
|
export const GetGenerationData$inboundSchema = z.object({
|
|
38
38
|
api_type: z.nullable(ApiType$inboundSchema),
|
|
39
|
-
app_id: z.int(),
|
|
40
|
-
cache_discount: z.number(),
|
|
39
|
+
app_id: z.nullable(z.int()),
|
|
40
|
+
cache_discount: z.nullable(z.number()),
|
|
41
41
|
cancelled: z.nullable(z.boolean()),
|
|
42
42
|
created_at: z.string(),
|
|
43
43
|
external_user: z.nullable(z.string()),
|
|
44
44
|
finish_reason: z.nullable(z.string()),
|
|
45
|
-
generation_time: z.number(),
|
|
45
|
+
generation_time: z.nullable(z.number()),
|
|
46
46
|
http_referer: z.nullable(z.string()),
|
|
47
47
|
id: z.string(),
|
|
48
48
|
is_byok: z.boolean(),
|
|
49
|
-
latency: z.number(),
|
|
49
|
+
latency: z.nullable(z.number()),
|
|
50
50
|
model: z.string(),
|
|
51
|
-
moderation_latency: z.number(),
|
|
51
|
+
moderation_latency: z.nullable(z.number()),
|
|
52
52
|
native_finish_reason: z.nullable(z.string()),
|
|
53
|
-
native_tokens_cached: z.int(),
|
|
54
|
-
native_tokens_completion: z.int(),
|
|
55
|
-
native_tokens_completion_images: z.int(),
|
|
56
|
-
native_tokens_prompt: z.int(),
|
|
57
|
-
native_tokens_reasoning: z.int(),
|
|
58
|
-
num_input_audio_prompt: z.int(),
|
|
59
|
-
num_media_completion: z.int(),
|
|
60
|
-
num_media_prompt: z.int(),
|
|
61
|
-
num_search_results: z.int(),
|
|
53
|
+
native_tokens_cached: z.nullable(z.int()),
|
|
54
|
+
native_tokens_completion: z.nullable(z.int()),
|
|
55
|
+
native_tokens_completion_images: z.nullable(z.int()),
|
|
56
|
+
native_tokens_prompt: z.nullable(z.int()),
|
|
57
|
+
native_tokens_reasoning: z.nullable(z.int()),
|
|
58
|
+
num_input_audio_prompt: z.nullable(z.int()),
|
|
59
|
+
num_media_completion: z.nullable(z.int()),
|
|
60
|
+
num_media_prompt: z.nullable(z.int()),
|
|
61
|
+
num_search_results: z.nullable(z.int()),
|
|
62
62
|
origin: z.string(),
|
|
63
63
|
provider_name: z.nullable(z.string()),
|
|
64
64
|
provider_responses: z.nullable(z.array(models.ProviderResponse$inboundSchema)),
|
|
@@ -66,11 +66,11 @@ export const GetGenerationData$inboundSchema = z.object({
|
|
|
66
66
|
router: z.nullable(z.string()),
|
|
67
67
|
session_id: z.nullable(z.string()).optional(),
|
|
68
68
|
streamed: z.nullable(z.boolean()),
|
|
69
|
-
tokens_completion: z.int(),
|
|
70
|
-
tokens_prompt: z.int(),
|
|
69
|
+
tokens_completion: z.nullable(z.int()),
|
|
70
|
+
tokens_prompt: z.nullable(z.int()),
|
|
71
71
|
total_cost: z.number(),
|
|
72
72
|
upstream_id: z.nullable(z.string()),
|
|
73
|
-
upstream_inference_cost: z.number(),
|
|
73
|
+
upstream_inference_cost: z.nullable(z.number()),
|
|
74
74
|
usage: z.number(),
|
|
75
75
|
user_agent: z.nullable(z.string()),
|
|
76
76
|
}).transform((v) => {
|
|
@@ -98,11 +98,11 @@ export type GetKeyData = {
|
|
|
98
98
|
/**
|
|
99
99
|
* Spending limit for the API key in USD
|
|
100
100
|
*/
|
|
101
|
-
limit: number;
|
|
101
|
+
limit: number | null;
|
|
102
102
|
/**
|
|
103
103
|
* Remaining spending limit in USD
|
|
104
104
|
*/
|
|
105
|
-
limitRemaining: number;
|
|
105
|
+
limitRemaining: number | null;
|
|
106
106
|
/**
|
|
107
107
|
* Type of limit reset for the API key
|
|
108
108
|
*/
|
|
@@ -33,8 +33,8 @@ export const GetKeyData$inboundSchema = z
|
|
|
33
33
|
hash: z.string(),
|
|
34
34
|
include_byok_in_limit: z.boolean(),
|
|
35
35
|
label: z.string(),
|
|
36
|
-
limit: z.number(),
|
|
37
|
-
limit_remaining: z.number(),
|
|
36
|
+
limit: z.nullable(z.number()),
|
|
37
|
+
limit_remaining: z.nullable(z.number()),
|
|
38
38
|
limit_reset: z.nullable(z.string()),
|
|
39
39
|
name: z.string(),
|
|
40
40
|
updated_at: z.nullable(z.string()),
|
|
@@ -49,7 +49,7 @@ export type ListRequest = {
|
|
|
49
49
|
/**
|
|
50
50
|
* Number of API keys to skip for pagination
|
|
51
51
|
*/
|
|
52
|
-
offset?: number | undefined;
|
|
52
|
+
offset?: number | null | undefined;
|
|
53
53
|
};
|
|
54
54
|
export type ListData = {
|
|
55
55
|
/**
|
|
@@ -99,11 +99,11 @@ export type ListData = {
|
|
|
99
99
|
/**
|
|
100
100
|
* Spending limit for the API key in USD
|
|
101
101
|
*/
|
|
102
|
-
limit: number;
|
|
102
|
+
limit: number | null;
|
|
103
103
|
/**
|
|
104
104
|
* Remaining spending limit in USD
|
|
105
105
|
*/
|
|
106
|
-
limitRemaining: number;
|
|
106
|
+
limitRemaining: number | null;
|
|
107
107
|
/**
|
|
108
108
|
* Type of limit reset for the API key
|
|
109
109
|
*/
|
|
@@ -148,7 +148,7 @@ export type ListRequest$Outbound = {
|
|
|
148
148
|
appTitle?: string | undefined;
|
|
149
149
|
appCategories?: string | undefined;
|
|
150
150
|
include_disabled?: boolean | undefined;
|
|
151
|
-
offset?: number | undefined;
|
|
151
|
+
offset?: number | null | undefined;
|
|
152
152
|
};
|
|
153
153
|
/** @internal */
|
|
154
154
|
export declare const ListRequest$outboundSchema: z.ZodType<ListRequest$Outbound, ListRequest>;
|
|
@@ -11,7 +11,7 @@ export const ListRequest$outboundSchema = z.object({
|
|
|
11
11
|
appTitle: z.string().optional(),
|
|
12
12
|
appCategories: z.string().optional(),
|
|
13
13
|
includeDisabled: z.boolean().optional(),
|
|
14
|
-
offset: z.int().optional(),
|
|
14
|
+
offset: z.nullable(z.int()).optional(),
|
|
15
15
|
}).transform((v) => {
|
|
16
16
|
return remap$(v, {
|
|
17
17
|
httpReferer: "HTTP-Referer",
|
|
@@ -34,8 +34,8 @@ export const ListData$inboundSchema = z.object({
|
|
|
34
34
|
hash: z.string(),
|
|
35
35
|
include_byok_in_limit: z.boolean(),
|
|
36
36
|
label: z.string(),
|
|
37
|
-
limit: z.number(),
|
|
38
|
-
limit_remaining: z.number(),
|
|
37
|
+
limit: z.nullable(z.number()),
|
|
38
|
+
limit_remaining: z.nullable(z.number()),
|
|
39
39
|
limit_reset: z.nullable(z.string()),
|
|
40
40
|
name: z.string(),
|
|
41
41
|
updated_at: z.nullable(z.string()),
|
|
@@ -50,7 +50,7 @@ export type ListGuardrailKeyAssignmentsRequest = {
|
|
|
50
50
|
/**
|
|
51
51
|
* Number of records to skip for pagination
|
|
52
52
|
*/
|
|
53
|
-
offset?: number | undefined;
|
|
53
|
+
offset?: number | null | undefined;
|
|
54
54
|
/**
|
|
55
55
|
* Maximum number of records to return (max 100)
|
|
56
56
|
*/
|
|
@@ -65,7 +65,7 @@ export type ListGuardrailKeyAssignmentsRequest$Outbound = {
|
|
|
65
65
|
appTitle?: string | undefined;
|
|
66
66
|
appCategories?: string | undefined;
|
|
67
67
|
id: string;
|
|
68
|
-
offset?: number | undefined;
|
|
68
|
+
offset?: number | null | undefined;
|
|
69
69
|
limit?: number | undefined;
|
|
70
70
|
};
|
|
71
71
|
/** @internal */
|
|
@@ -12,7 +12,7 @@ export const ListGuardrailKeyAssignmentsRequest$outboundSchema = z.object({
|
|
|
12
12
|
appTitle: z.string().optional(),
|
|
13
13
|
appCategories: z.string().optional(),
|
|
14
14
|
id: z.string(),
|
|
15
|
-
offset: z.int().optional(),
|
|
15
|
+
offset: z.nullable(z.int()).optional(),
|
|
16
16
|
limit: z.int().optional(),
|
|
17
17
|
}).transform((v) => {
|
|
18
18
|
return remap$(v, {
|
|
@@ -50,7 +50,7 @@ export type ListGuardrailMemberAssignmentsRequest = {
|
|
|
50
50
|
/**
|
|
51
51
|
* Number of records to skip for pagination
|
|
52
52
|
*/
|
|
53
|
-
offset?: number | undefined;
|
|
53
|
+
offset?: number | null | undefined;
|
|
54
54
|
/**
|
|
55
55
|
* Maximum number of records to return (max 100)
|
|
56
56
|
*/
|
|
@@ -65,7 +65,7 @@ export type ListGuardrailMemberAssignmentsRequest$Outbound = {
|
|
|
65
65
|
appTitle?: string | undefined;
|
|
66
66
|
appCategories?: string | undefined;
|
|
67
67
|
id: string;
|
|
68
|
-
offset?: number | undefined;
|
|
68
|
+
offset?: number | null | undefined;
|
|
69
69
|
limit?: number | undefined;
|
|
70
70
|
};
|
|
71
71
|
/** @internal */
|
|
@@ -12,7 +12,7 @@ export const ListGuardrailMemberAssignmentsRequest$outboundSchema = z.object({
|
|
|
12
12
|
appTitle: z.string().optional(),
|
|
13
13
|
appCategories: z.string().optional(),
|
|
14
14
|
id: z.string(),
|
|
15
|
-
offset: z.int().optional(),
|
|
15
|
+
offset: z.nullable(z.int()).optional(),
|
|
16
16
|
limit: z.int().optional(),
|
|
17
17
|
}).transform((v) => {
|
|
18
18
|
return remap$(v, {
|
|
@@ -46,7 +46,7 @@ export type ListGuardrailsRequest = {
|
|
|
46
46
|
/**
|
|
47
47
|
* Number of records to skip for pagination
|
|
48
48
|
*/
|
|
49
|
-
offset?: number | undefined;
|
|
49
|
+
offset?: number | null | undefined;
|
|
50
50
|
/**
|
|
51
51
|
* Maximum number of records to return (max 100)
|
|
52
52
|
*/
|
|
@@ -60,7 +60,7 @@ export type ListGuardrailsRequest$Outbound = {
|
|
|
60
60
|
"HTTP-Referer"?: string | undefined;
|
|
61
61
|
appTitle?: string | undefined;
|
|
62
62
|
appCategories?: string | undefined;
|
|
63
|
-
offset?: number | undefined;
|
|
63
|
+
offset?: number | null | undefined;
|
|
64
64
|
limit?: number | undefined;
|
|
65
65
|
};
|
|
66
66
|
/** @internal */
|
|
@@ -11,7 +11,7 @@ export const ListGuardrailsRequest$outboundSchema = z.object({
|
|
|
11
11
|
httpReferer: z.string().optional(),
|
|
12
12
|
appTitle: z.string().optional(),
|
|
13
13
|
appCategories: z.string().optional(),
|
|
14
|
-
offset: z.int().optional(),
|
|
14
|
+
offset: z.nullable(z.int()).optional(),
|
|
15
15
|
limit: z.int().optional(),
|
|
16
16
|
}).transform((v) => {
|
|
17
17
|
return remap$(v, {
|
|
@@ -46,7 +46,7 @@ export type ListKeyAssignmentsRequest = {
|
|
|
46
46
|
/**
|
|
47
47
|
* Number of records to skip for pagination
|
|
48
48
|
*/
|
|
49
|
-
offset?: number | undefined;
|
|
49
|
+
offset?: number | null | undefined;
|
|
50
50
|
/**
|
|
51
51
|
* Maximum number of records to return (max 100)
|
|
52
52
|
*/
|
|
@@ -60,7 +60,7 @@ export type ListKeyAssignmentsRequest$Outbound = {
|
|
|
60
60
|
"HTTP-Referer"?: string | undefined;
|
|
61
61
|
appTitle?: string | undefined;
|
|
62
62
|
appCategories?: string | undefined;
|
|
63
|
-
offset?: number | undefined;
|
|
63
|
+
offset?: number | null | undefined;
|
|
64
64
|
limit?: number | undefined;
|
|
65
65
|
};
|
|
66
66
|
/** @internal */
|
|
@@ -11,7 +11,7 @@ export const ListKeyAssignmentsRequest$outboundSchema = z.object({
|
|
|
11
11
|
httpReferer: z.string().optional(),
|
|
12
12
|
appTitle: z.string().optional(),
|
|
13
13
|
appCategories: z.string().optional(),
|
|
14
|
-
offset: z.int().optional(),
|
|
14
|
+
offset: z.nullable(z.int()).optional(),
|
|
15
15
|
limit: z.int().optional(),
|
|
16
16
|
}).transform((v) => {
|
|
17
17
|
return remap$(v, {
|
|
@@ -46,7 +46,7 @@ export type ListMemberAssignmentsRequest = {
|
|
|
46
46
|
/**
|
|
47
47
|
* Number of records to skip for pagination
|
|
48
48
|
*/
|
|
49
|
-
offset?: number | undefined;
|
|
49
|
+
offset?: number | null | undefined;
|
|
50
50
|
/**
|
|
51
51
|
* Maximum number of records to return (max 100)
|
|
52
52
|
*/
|
|
@@ -60,7 +60,7 @@ export type ListMemberAssignmentsRequest$Outbound = {
|
|
|
60
60
|
"HTTP-Referer"?: string | undefined;
|
|
61
61
|
appTitle?: string | undefined;
|
|
62
62
|
appCategories?: string | undefined;
|
|
63
|
-
offset?: number | undefined;
|
|
63
|
+
offset?: number | null | undefined;
|
|
64
64
|
limit?: number | undefined;
|
|
65
65
|
};
|
|
66
66
|
/** @internal */
|
|
@@ -11,7 +11,7 @@ export const ListMemberAssignmentsRequest$outboundSchema = z.object({
|
|
|
11
11
|
httpReferer: z.string().optional(),
|
|
12
12
|
appTitle: z.string().optional(),
|
|
13
13
|
appCategories: z.string().optional(),
|
|
14
|
-
offset: z.int().optional(),
|
|
14
|
+
offset: z.nullable(z.int()).optional(),
|
|
15
15
|
limit: z.int().optional(),
|
|
16
16
|
}).transform((v) => {
|
|
17
17
|
return remap$(v, {
|
|
@@ -46,7 +46,7 @@ export type ListOrganizationMembersRequest = {
|
|
|
46
46
|
/**
|
|
47
47
|
* Number of records to skip for pagination
|
|
48
48
|
*/
|
|
49
|
-
offset?: number | undefined;
|
|
49
|
+
offset?: number | null | undefined;
|
|
50
50
|
/**
|
|
51
51
|
* Maximum number of records to return (max 100)
|
|
52
52
|
*/
|
|
@@ -106,7 +106,7 @@ export type ListOrganizationMembersRequest$Outbound = {
|
|
|
106
106
|
"HTTP-Referer"?: string | undefined;
|
|
107
107
|
appTitle?: string | undefined;
|
|
108
108
|
appCategories?: string | undefined;
|
|
109
|
-
offset?: number | undefined;
|
|
109
|
+
offset?: number | null | undefined;
|
|
110
110
|
limit?: number | undefined;
|
|
111
111
|
};
|
|
112
112
|
/** @internal */
|
|
@@ -18,7 +18,7 @@ export const ListOrganizationMembersRequest$outboundSchema = z.object({
|
|
|
18
18
|
httpReferer: z.string().optional(),
|
|
19
19
|
appTitle: z.string().optional(),
|
|
20
20
|
appCategories: z.string().optional(),
|
|
21
|
-
offset: z.int().optional(),
|
|
21
|
+
offset: z.nullable(z.int()).optional(),
|
|
22
22
|
limit: z.int().optional(),
|
|
23
23
|
}).transform((v) => {
|
|
24
24
|
return remap$(v, {
|
|
@@ -47,7 +47,7 @@ export type UpdateKeysRequestBody = {
|
|
|
47
47
|
/**
|
|
48
48
|
* New spending limit for the API key in USD
|
|
49
49
|
*/
|
|
50
|
-
limit?: number | undefined;
|
|
50
|
+
limit?: number | null | undefined;
|
|
51
51
|
/**
|
|
52
52
|
* New limit reset type for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday.
|
|
53
53
|
*/
|
|
@@ -134,11 +134,11 @@ export type UpdateKeysData = {
|
|
|
134
134
|
/**
|
|
135
135
|
* Spending limit for the API key in USD
|
|
136
136
|
*/
|
|
137
|
-
limit: number;
|
|
137
|
+
limit: number | null;
|
|
138
138
|
/**
|
|
139
139
|
* Remaining spending limit in USD
|
|
140
140
|
*/
|
|
141
|
-
limitRemaining: number;
|
|
141
|
+
limitRemaining: number | null;
|
|
142
142
|
/**
|
|
143
143
|
* Type of limit reset for the API key
|
|
144
144
|
*/
|
|
@@ -183,7 +183,7 @@ export declare const UpdateKeysLimitReset$outboundSchema: z.ZodType<string, Upda
|
|
|
183
183
|
export type UpdateKeysRequestBody$Outbound = {
|
|
184
184
|
disabled?: boolean | undefined;
|
|
185
185
|
include_byok_in_limit?: boolean | undefined;
|
|
186
|
-
limit?: number | undefined;
|
|
186
|
+
limit?: number | null | undefined;
|
|
187
187
|
limit_reset?: string | null | undefined;
|
|
188
188
|
name?: string | undefined;
|
|
189
189
|
};
|
|
@@ -20,7 +20,7 @@ export const UpdateKeysLimitReset$outboundSchema = openEnums.outboundSchema(Upda
|
|
|
20
20
|
export const UpdateKeysRequestBody$outboundSchema = z.object({
|
|
21
21
|
disabled: z.boolean().optional(),
|
|
22
22
|
includeByokInLimit: z.boolean().optional(),
|
|
23
|
-
limit: z.number().optional(),
|
|
23
|
+
limit: z.nullable(z.number()).optional(),
|
|
24
24
|
limitReset: z.nullable(UpdateKeysLimitReset$outboundSchema).optional(),
|
|
25
25
|
name: z.string().optional(),
|
|
26
26
|
}).transform((v) => {
|
|
@@ -61,8 +61,8 @@ export const UpdateKeysData$inboundSchema = z.object({
|
|
|
61
61
|
hash: z.string(),
|
|
62
62
|
include_byok_in_limit: z.boolean(),
|
|
63
63
|
label: z.string(),
|
|
64
|
-
limit: z.number(),
|
|
65
|
-
limit_remaining: z.number(),
|
|
64
|
+
limit: z.nullable(z.number()),
|
|
65
|
+
limit_remaining: z.nullable(z.number()),
|
|
66
66
|
limit_reset: z.nullable(z.string()),
|
|
67
67
|
name: z.string(),
|
|
68
68
|
updated_at: z.nullable(z.string()),
|
|
@@ -6,26 +6,26 @@ export type PercentileLatencyCutoffs = {
|
|
|
6
6
|
/**
|
|
7
7
|
* Maximum p50 latency (seconds)
|
|
8
8
|
*/
|
|
9
|
-
p50?: number | undefined;
|
|
9
|
+
p50?: number | null | undefined;
|
|
10
10
|
/**
|
|
11
11
|
* Maximum p75 latency (seconds)
|
|
12
12
|
*/
|
|
13
|
-
p75?: number | undefined;
|
|
13
|
+
p75?: number | null | undefined;
|
|
14
14
|
/**
|
|
15
15
|
* Maximum p90 latency (seconds)
|
|
16
16
|
*/
|
|
17
|
-
p90?: number | undefined;
|
|
17
|
+
p90?: number | null | undefined;
|
|
18
18
|
/**
|
|
19
19
|
* Maximum p99 latency (seconds)
|
|
20
20
|
*/
|
|
21
|
-
p99?: number | undefined;
|
|
21
|
+
p99?: number | null | undefined;
|
|
22
22
|
};
|
|
23
23
|
/** @internal */
|
|
24
24
|
export type PercentileLatencyCutoffs$Outbound = {
|
|
25
|
-
p50?: number | undefined;
|
|
26
|
-
p75?: number | undefined;
|
|
27
|
-
p90?: number | undefined;
|
|
28
|
-
p99?: number | undefined;
|
|
25
|
+
p50?: number | null | undefined;
|
|
26
|
+
p75?: number | null | undefined;
|
|
27
|
+
p90?: number | null | undefined;
|
|
28
|
+
p99?: number | null | undefined;
|
|
29
29
|
};
|
|
30
30
|
/** @internal */
|
|
31
31
|
export declare const PercentileLatencyCutoffs$outboundSchema: z.ZodType<PercentileLatencyCutoffs$Outbound, PercentileLatencyCutoffs>;
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
6
|
/** @internal */
|
|
7
7
|
export const PercentileLatencyCutoffs$outboundSchema = z.object({
|
|
8
|
-
p50: z.number().optional(),
|
|
9
|
-
p75: z.number().optional(),
|
|
10
|
-
p90: z.number().optional(),
|
|
11
|
-
p99: z.number().optional(),
|
|
8
|
+
p50: z.nullable(z.number()).optional(),
|
|
9
|
+
p75: z.nullable(z.number()).optional(),
|
|
10
|
+
p90: z.nullable(z.number()).optional(),
|
|
11
|
+
p99: z.nullable(z.number()).optional(),
|
|
12
12
|
});
|
|
13
13
|
export function percentileLatencyCutoffsToJSON(percentileLatencyCutoffs) {
|
|
14
14
|
return JSON.stringify(PercentileLatencyCutoffs$outboundSchema.parse(percentileLatencyCutoffs));
|