@openrouter/sdk 0.0.0-beta.37 → 0.0.0-beta.38

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 (113) hide show
  1. package/dist/commonjs/funcs/betaResponsesSend.d.ts +2 -2
  2. package/dist/commonjs/funcs/betaResponsesSend.d.ts.map +1 -1
  3. package/dist/commonjs/funcs/betaResponsesSend.js.map +1 -1
  4. package/dist/commonjs/lib/config.d.ts +3 -3
  5. package/dist/commonjs/lib/config.js +3 -3
  6. package/dist/commonjs/models/createapikeydata.d.ts +120 -0
  7. package/dist/commonjs/models/createapikeydata.d.ts.map +1 -0
  8. package/dist/commonjs/models/createapikeydata.js +134 -0
  9. package/dist/commonjs/models/createapikeydata.js.map +1 -0
  10. package/dist/commonjs/models/getapikeydata.d.ts +120 -0
  11. package/dist/commonjs/models/getapikeydata.d.ts.map +1 -0
  12. package/dist/commonjs/models/getapikeydata.js +134 -0
  13. package/dist/commonjs/models/getapikeydata.js.map +1 -0
  14. package/dist/commonjs/models/index.d.ts +4 -0
  15. package/dist/commonjs/models/index.d.ts.map +1 -1
  16. package/dist/commonjs/models/index.js +4 -0
  17. package/dist/commonjs/models/index.js.map +1 -1
  18. package/dist/commonjs/models/keyinfo.d.ts +8 -8
  19. package/dist/commonjs/models/listapikeysdata.d.ts +117 -0
  20. package/dist/commonjs/models/listapikeysdata.d.ts.map +1 -0
  21. package/dist/commonjs/models/listapikeysdata.js +134 -0
  22. package/dist/commonjs/models/listapikeysdata.js.map +1 -0
  23. package/dist/commonjs/models/operations/create.d.ts +43 -68
  24. package/dist/commonjs/models/operations/create.d.ts.map +1 -1
  25. package/dist/commonjs/models/operations/create.js +31 -54
  26. package/dist/commonjs/models/operations/create.js.map +1 -1
  27. package/dist/commonjs/models/operations/getapikey.d.ts +3 -68
  28. package/dist/commonjs/models/operations/getapikey.d.ts.map +1 -1
  29. package/dist/commonjs/models/operations/getapikey.js +4 -55
  30. package/dist/commonjs/models/operations/getapikey.js.map +1 -1
  31. package/dist/commonjs/models/operations/listapikeys.d.ts +3 -65
  32. package/dist/commonjs/models/operations/listapikeys.d.ts.map +1 -1
  33. package/dist/commonjs/models/operations/listapikeys.js +4 -54
  34. package/dist/commonjs/models/operations/listapikeys.js.map +1 -1
  35. package/dist/commonjs/models/operations/update.d.ts +43 -68
  36. package/dist/commonjs/models/operations/update.d.ts.map +1 -1
  37. package/dist/commonjs/models/operations/update.js +31 -54
  38. package/dist/commonjs/models/operations/update.js.map +1 -1
  39. package/dist/commonjs/models/responsesoutputitemreasoning.d.ts +3 -0
  40. package/dist/commonjs/models/responsesoutputitemreasoning.d.ts.map +1 -1
  41. package/dist/commonjs/models/responsesoutputitemreasoning.js +1 -0
  42. package/dist/commonjs/models/responsesoutputitemreasoning.js.map +1 -1
  43. package/dist/commonjs/models/updateapikeydata.d.ts +120 -0
  44. package/dist/commonjs/models/updateapikeydata.d.ts.map +1 -0
  45. package/dist/commonjs/models/updateapikeydata.js +134 -0
  46. package/dist/commonjs/models/updateapikeydata.js.map +1 -0
  47. package/dist/commonjs/sdk/responses.d.ts +2 -2
  48. package/dist/commonjs/sdk/responses.d.ts.map +1 -1
  49. package/dist/esm/funcs/betaResponsesSend.d.ts +2 -2
  50. package/dist/esm/funcs/betaResponsesSend.d.ts.map +1 -1
  51. package/dist/esm/funcs/betaResponsesSend.js.map +1 -1
  52. package/dist/esm/lib/config.d.ts +3 -3
  53. package/dist/esm/lib/config.js +3 -3
  54. package/dist/esm/models/createapikeydata.d.ts +120 -0
  55. package/dist/esm/models/createapikeydata.d.ts.map +1 -0
  56. package/dist/esm/models/createapikeydata.js +96 -0
  57. package/dist/esm/models/createapikeydata.js.map +1 -0
  58. package/dist/esm/models/getapikeydata.d.ts +120 -0
  59. package/dist/esm/models/getapikeydata.d.ts.map +1 -0
  60. package/dist/esm/models/getapikeydata.js +96 -0
  61. package/dist/esm/models/getapikeydata.js.map +1 -0
  62. package/dist/esm/models/index.d.ts +4 -0
  63. package/dist/esm/models/index.d.ts.map +1 -1
  64. package/dist/esm/models/index.js +4 -0
  65. package/dist/esm/models/index.js.map +1 -1
  66. package/dist/esm/models/keyinfo.d.ts +8 -8
  67. package/dist/esm/models/listapikeysdata.d.ts +117 -0
  68. package/dist/esm/models/listapikeysdata.d.ts.map +1 -0
  69. package/dist/esm/models/listapikeysdata.js +96 -0
  70. package/dist/esm/models/listapikeysdata.js.map +1 -0
  71. package/dist/esm/models/operations/create.d.ts +43 -68
  72. package/dist/esm/models/operations/create.d.ts.map +1 -1
  73. package/dist/esm/models/operations/create.js +30 -51
  74. package/dist/esm/models/operations/create.js.map +1 -1
  75. package/dist/esm/models/operations/getapikey.d.ts +3 -68
  76. package/dist/esm/models/operations/getapikey.d.ts.map +1 -1
  77. package/dist/esm/models/operations/getapikey.js +3 -52
  78. package/dist/esm/models/operations/getapikey.js.map +1 -1
  79. package/dist/esm/models/operations/listapikeys.d.ts +3 -65
  80. package/dist/esm/models/operations/listapikeys.d.ts.map +1 -1
  81. package/dist/esm/models/operations/listapikeys.js +3 -51
  82. package/dist/esm/models/operations/listapikeys.js.map +1 -1
  83. package/dist/esm/models/operations/update.d.ts +43 -68
  84. package/dist/esm/models/operations/update.d.ts.map +1 -1
  85. package/dist/esm/models/operations/update.js +30 -51
  86. package/dist/esm/models/operations/update.js.map +1 -1
  87. package/dist/esm/models/responsesoutputitemreasoning.d.ts +3 -0
  88. package/dist/esm/models/responsesoutputitemreasoning.d.ts.map +1 -1
  89. package/dist/esm/models/responsesoutputitemreasoning.js +1 -0
  90. package/dist/esm/models/responsesoutputitemreasoning.js.map +1 -1
  91. package/dist/esm/models/updateapikeydata.d.ts +120 -0
  92. package/dist/esm/models/updateapikeydata.d.ts.map +1 -0
  93. package/dist/esm/models/updateapikeydata.js +96 -0
  94. package/dist/esm/models/updateapikeydata.js.map +1 -0
  95. package/dist/esm/sdk/responses.d.ts +2 -2
  96. package/dist/esm/sdk/responses.d.ts.map +1 -1
  97. package/docs/sdks/apikeys/README.md +4 -0
  98. package/jsr.json +1 -1
  99. package/package.json +1 -1
  100. package/src/funcs/betaResponsesSend.ts +2 -2
  101. package/src/lib/config.ts +3 -3
  102. package/src/models/createapikeydata.ts +222 -0
  103. package/src/models/getapikeydata.ts +218 -0
  104. package/src/models/index.ts +4 -0
  105. package/src/models/keyinfo.ts +8 -8
  106. package/src/models/listapikeysdata.ts +217 -0
  107. package/src/models/operations/create.ts +49 -123
  108. package/src/models/operations/getapikey.ts +5 -124
  109. package/src/models/operations/listapikeys.ts +5 -122
  110. package/src/models/operations/update.ts +49 -123
  111. package/src/models/responsesoutputitemreasoning.ts +1 -0
  112. package/src/models/updateapikeydata.ts +222 -0
  113. package/src/sdk/responses.ts +2 -2
@@ -5,8 +5,23 @@
5
5
  import * as z from "zod";
6
6
  import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { safeParse } from "../../lib/schemas.js";
8
+ import { ClosedEnum } from "../../types/enums.js";
8
9
  import { Result as SafeParseResult } from "../../types/fp.js";
9
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+ import * as models from "../index.js";
12
+
13
+ /**
14
+ * 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.
15
+ */
16
+ export const UpdateLimitReset = {
17
+ Daily: "daily",
18
+ Weekly: "weekly",
19
+ Monthly: "monthly",
20
+ } as const;
21
+ /**
22
+ * 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.
23
+ */
24
+ export type UpdateLimitReset = ClosedEnum<typeof UpdateLimitReset>;
10
25
 
11
26
  export type UpdateRequestBody = {
12
27
  /**
@@ -21,6 +36,10 @@ export type UpdateRequestBody = {
21
36
  * New spending limit for the API key in USD
22
37
  */
23
38
  limit?: number | null | undefined;
39
+ /**
40
+ * 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.
41
+ */
42
+ limitReset?: UpdateLimitReset | null | undefined;
24
43
  /**
25
44
  * Whether to include BYOK usage in the limit
26
45
  */
@@ -32,44 +51,6 @@ export type UpdateRequest = {
32
51
  requestBody: UpdateRequestBody;
33
52
  };
34
53
 
35
- /**
36
- * The updated API key information
37
- */
38
- export type UpdateData = {
39
- /**
40
- * Unique hash identifier for the API key
41
- */
42
- hash: string;
43
- /**
44
- * Name of the API key
45
- */
46
- name: string;
47
- /**
48
- * Human-readable label for the API key
49
- */
50
- label: string;
51
- /**
52
- * Whether the API key is disabled
53
- */
54
- disabled: boolean;
55
- /**
56
- * Spending limit for the API key in USD
57
- */
58
- limit: number | null;
59
- /**
60
- * Current usage of the API key in USD
61
- */
62
- usage: number;
63
- /**
64
- * ISO 8601 timestamp of when the API key was created
65
- */
66
- createdAt: string;
67
- /**
68
- * ISO 8601 timestamp of when the API key was last updated
69
- */
70
- updatedAt: string | null;
71
- };
72
-
73
54
  /**
74
55
  * API key updated successfully
75
56
  */
@@ -77,9 +58,30 @@ export type UpdateResponse = {
77
58
  /**
78
59
  * The updated API key information
79
60
  */
80
- data: UpdateData;
61
+ data: models.UpdateAPIKeyData;
81
62
  };
82
63
 
64
+ /** @internal */
65
+ export const UpdateLimitReset$inboundSchema: z.ZodNativeEnum<
66
+ typeof UpdateLimitReset
67
+ > = z.nativeEnum(UpdateLimitReset);
68
+
69
+ /** @internal */
70
+ export const UpdateLimitReset$outboundSchema: z.ZodNativeEnum<
71
+ typeof UpdateLimitReset
72
+ > = UpdateLimitReset$inboundSchema;
73
+
74
+ /**
75
+ * @internal
76
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
77
+ */
78
+ export namespace UpdateLimitReset$ {
79
+ /** @deprecated use `UpdateLimitReset$inboundSchema` instead. */
80
+ export const inboundSchema = UpdateLimitReset$inboundSchema;
81
+ /** @deprecated use `UpdateLimitReset$outboundSchema` instead. */
82
+ export const outboundSchema = UpdateLimitReset$outboundSchema;
83
+ }
84
+
83
85
  /** @internal */
84
86
  export const UpdateRequestBody$inboundSchema: z.ZodType<
85
87
  UpdateRequestBody,
@@ -89,9 +91,11 @@ export const UpdateRequestBody$inboundSchema: z.ZodType<
89
91
  name: z.string().optional(),
90
92
  disabled: z.boolean().optional(),
91
93
  limit: z.nullable(z.number()).optional(),
94
+ limit_reset: z.nullable(UpdateLimitReset$inboundSchema).optional(),
92
95
  include_byok_in_limit: z.boolean().optional(),
93
96
  }).transform((v) => {
94
97
  return remap$(v, {
98
+ "limit_reset": "limitReset",
95
99
  "include_byok_in_limit": "includeByokInLimit",
96
100
  });
97
101
  });
@@ -101,6 +105,7 @@ export type UpdateRequestBody$Outbound = {
101
105
  name?: string | undefined;
102
106
  disabled?: boolean | undefined;
103
107
  limit?: number | null | undefined;
108
+ limit_reset?: string | null | undefined;
104
109
  include_byok_in_limit?: boolean | undefined;
105
110
  };
106
111
 
@@ -113,9 +118,11 @@ export const UpdateRequestBody$outboundSchema: z.ZodType<
113
118
  name: z.string().optional(),
114
119
  disabled: z.boolean().optional(),
115
120
  limit: z.nullable(z.number()).optional(),
121
+ limitReset: z.nullable(UpdateLimitReset$outboundSchema).optional(),
116
122
  includeByokInLimit: z.boolean().optional(),
117
123
  }).transform((v) => {
118
124
  return remap$(v, {
125
+ limitReset: "limit_reset",
119
126
  includeByokInLimit: "include_byok_in_limit",
120
127
  });
121
128
  });
@@ -212,99 +219,18 @@ export function updateRequestFromJSON(
212
219
  );
213
220
  }
214
221
 
215
- /** @internal */
216
- export const UpdateData$inboundSchema: z.ZodType<
217
- UpdateData,
218
- z.ZodTypeDef,
219
- unknown
220
- > = z.object({
221
- hash: z.string(),
222
- name: z.string(),
223
- label: z.string(),
224
- disabled: z.boolean(),
225
- limit: z.nullable(z.number()),
226
- usage: z.number(),
227
- created_at: z.string(),
228
- updated_at: z.nullable(z.string()),
229
- }).transform((v) => {
230
- return remap$(v, {
231
- "created_at": "createdAt",
232
- "updated_at": "updatedAt",
233
- });
234
- });
235
-
236
- /** @internal */
237
- export type UpdateData$Outbound = {
238
- hash: string;
239
- name: string;
240
- label: string;
241
- disabled: boolean;
242
- limit: number | null;
243
- usage: number;
244
- created_at: string;
245
- updated_at: string | null;
246
- };
247
-
248
- /** @internal */
249
- export const UpdateData$outboundSchema: z.ZodType<
250
- UpdateData$Outbound,
251
- z.ZodTypeDef,
252
- UpdateData
253
- > = z.object({
254
- hash: z.string(),
255
- name: z.string(),
256
- label: z.string(),
257
- disabled: z.boolean(),
258
- limit: z.nullable(z.number()),
259
- usage: z.number(),
260
- createdAt: z.string(),
261
- updatedAt: z.nullable(z.string()),
262
- }).transform((v) => {
263
- return remap$(v, {
264
- createdAt: "created_at",
265
- updatedAt: "updated_at",
266
- });
267
- });
268
-
269
- /**
270
- * @internal
271
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
272
- */
273
- export namespace UpdateData$ {
274
- /** @deprecated use `UpdateData$inboundSchema` instead. */
275
- export const inboundSchema = UpdateData$inboundSchema;
276
- /** @deprecated use `UpdateData$outboundSchema` instead. */
277
- export const outboundSchema = UpdateData$outboundSchema;
278
- /** @deprecated use `UpdateData$Outbound` instead. */
279
- export type Outbound = UpdateData$Outbound;
280
- }
281
-
282
- export function updateDataToJSON(updateData: UpdateData): string {
283
- return JSON.stringify(UpdateData$outboundSchema.parse(updateData));
284
- }
285
-
286
- export function updateDataFromJSON(
287
- jsonString: string,
288
- ): SafeParseResult<UpdateData, SDKValidationError> {
289
- return safeParse(
290
- jsonString,
291
- (x) => UpdateData$inboundSchema.parse(JSON.parse(x)),
292
- `Failed to parse 'UpdateData' from JSON`,
293
- );
294
- }
295
-
296
222
  /** @internal */
297
223
  export const UpdateResponse$inboundSchema: z.ZodType<
298
224
  UpdateResponse,
299
225
  z.ZodTypeDef,
300
226
  unknown
301
227
  > = z.object({
302
- data: z.lazy(() => UpdateData$inboundSchema),
228
+ data: models.UpdateAPIKeyData$inboundSchema,
303
229
  });
304
230
 
305
231
  /** @internal */
306
232
  export type UpdateResponse$Outbound = {
307
- data: UpdateData$Outbound;
233
+ data: models.UpdateAPIKeyData$Outbound;
308
234
  };
309
235
 
310
236
  /** @internal */
@@ -313,7 +239,7 @@ export const UpdateResponse$outboundSchema: z.ZodType<
313
239
  z.ZodTypeDef,
314
240
  UpdateResponse
315
241
  > = z.object({
316
- data: z.lazy(() => UpdateData$outboundSchema),
242
+ data: models.UpdateAPIKeyData$outboundSchema,
317
243
  });
318
244
 
319
245
  /**
@@ -31,6 +31,7 @@ export type ResponsesOutputItemReasoningType = ClosedEnum<
31
31
  export const ResponsesOutputItemReasoningFormat = {
32
32
  Unknown: "unknown",
33
33
  OpenaiResponsesV1: "openai-responses-v1",
34
+ XaiResponsesV1: "xai-responses-v1",
34
35
  AnthropicClaudeV1: "anthropic-claude-v1",
35
36
  } as const;
36
37
  export type ResponsesOutputItemReasoningFormat = ClosedEnum<
@@ -0,0 +1,222 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ import { safeParse } from "../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../types/fp.js";
9
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
10
+
11
+ /**
12
+ * The updated API key information
13
+ */
14
+ export type UpdateAPIKeyData = {
15
+ /**
16
+ * Unique hash identifier for the API key
17
+ */
18
+ hash: string;
19
+ /**
20
+ * Name of the API key
21
+ */
22
+ name: string;
23
+ /**
24
+ * Human-readable label for the API key
25
+ */
26
+ label: string;
27
+ /**
28
+ * Whether the API key is disabled
29
+ */
30
+ disabled: boolean;
31
+ /**
32
+ * Spending limit for the API key in USD
33
+ */
34
+ limit: number | null;
35
+ /**
36
+ * Remaining spending limit in USD
37
+ */
38
+ limitRemaining: number | null;
39
+ /**
40
+ * Type of limit reset for the API key
41
+ */
42
+ limitReset: string | null;
43
+ /**
44
+ * Whether to include external BYOK usage in the credit limit
45
+ */
46
+ includeByokInLimit: boolean;
47
+ /**
48
+ * Total OpenRouter credit usage (in USD) for the API key
49
+ */
50
+ usage: number;
51
+ /**
52
+ * OpenRouter credit usage (in USD) for the current UTC day
53
+ */
54
+ usageDaily: number;
55
+ /**
56
+ * OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)
57
+ */
58
+ usageWeekly: number;
59
+ /**
60
+ * OpenRouter credit usage (in USD) for the current UTC month
61
+ */
62
+ usageMonthly: number;
63
+ /**
64
+ * Total external BYOK usage (in USD) for the API key
65
+ */
66
+ byokUsage: number;
67
+ /**
68
+ * External BYOK usage (in USD) for the current UTC day
69
+ */
70
+ byokUsageDaily: number;
71
+ /**
72
+ * External BYOK usage (in USD) for the current UTC week (Monday-Sunday)
73
+ */
74
+ byokUsageWeekly: number;
75
+ /**
76
+ * External BYOK usage (in USD) for current UTC month
77
+ */
78
+ byokUsageMonthly: number;
79
+ /**
80
+ * ISO 8601 timestamp of when the API key was created
81
+ */
82
+ createdAt: string;
83
+ /**
84
+ * ISO 8601 timestamp of when the API key was last updated
85
+ */
86
+ updatedAt: string | null;
87
+ };
88
+
89
+ /** @internal */
90
+ export const UpdateAPIKeyData$inboundSchema: z.ZodType<
91
+ UpdateAPIKeyData,
92
+ z.ZodTypeDef,
93
+ unknown
94
+ > = z.object({
95
+ hash: z.string(),
96
+ name: z.string(),
97
+ label: z.string(),
98
+ disabled: z.boolean(),
99
+ limit: z.nullable(z.number()),
100
+ limit_remaining: z.nullable(z.number()),
101
+ limit_reset: z.nullable(z.string()),
102
+ include_byok_in_limit: z.boolean(),
103
+ usage: z.number(),
104
+ usage_daily: z.number(),
105
+ usage_weekly: z.number(),
106
+ usage_monthly: z.number(),
107
+ byok_usage: z.number(),
108
+ byok_usage_daily: z.number(),
109
+ byok_usage_weekly: z.number(),
110
+ byok_usage_monthly: z.number(),
111
+ created_at: z.string(),
112
+ updated_at: z.nullable(z.string()),
113
+ }).transform((v) => {
114
+ return remap$(v, {
115
+ "limit_remaining": "limitRemaining",
116
+ "limit_reset": "limitReset",
117
+ "include_byok_in_limit": "includeByokInLimit",
118
+ "usage_daily": "usageDaily",
119
+ "usage_weekly": "usageWeekly",
120
+ "usage_monthly": "usageMonthly",
121
+ "byok_usage": "byokUsage",
122
+ "byok_usage_daily": "byokUsageDaily",
123
+ "byok_usage_weekly": "byokUsageWeekly",
124
+ "byok_usage_monthly": "byokUsageMonthly",
125
+ "created_at": "createdAt",
126
+ "updated_at": "updatedAt",
127
+ });
128
+ });
129
+
130
+ /** @internal */
131
+ export type UpdateAPIKeyData$Outbound = {
132
+ hash: string;
133
+ name: string;
134
+ label: string;
135
+ disabled: boolean;
136
+ limit: number | null;
137
+ limit_remaining: number | null;
138
+ limit_reset: string | null;
139
+ include_byok_in_limit: boolean;
140
+ usage: number;
141
+ usage_daily: number;
142
+ usage_weekly: number;
143
+ usage_monthly: number;
144
+ byok_usage: number;
145
+ byok_usage_daily: number;
146
+ byok_usage_weekly: number;
147
+ byok_usage_monthly: number;
148
+ created_at: string;
149
+ updated_at: string | null;
150
+ };
151
+
152
+ /** @internal */
153
+ export const UpdateAPIKeyData$outboundSchema: z.ZodType<
154
+ UpdateAPIKeyData$Outbound,
155
+ z.ZodTypeDef,
156
+ UpdateAPIKeyData
157
+ > = z.object({
158
+ hash: z.string(),
159
+ name: z.string(),
160
+ label: z.string(),
161
+ disabled: z.boolean(),
162
+ limit: z.nullable(z.number()),
163
+ limitRemaining: z.nullable(z.number()),
164
+ limitReset: z.nullable(z.string()),
165
+ includeByokInLimit: z.boolean(),
166
+ usage: z.number(),
167
+ usageDaily: z.number(),
168
+ usageWeekly: z.number(),
169
+ usageMonthly: z.number(),
170
+ byokUsage: z.number(),
171
+ byokUsageDaily: z.number(),
172
+ byokUsageWeekly: z.number(),
173
+ byokUsageMonthly: z.number(),
174
+ createdAt: z.string(),
175
+ updatedAt: z.nullable(z.string()),
176
+ }).transform((v) => {
177
+ return remap$(v, {
178
+ limitRemaining: "limit_remaining",
179
+ limitReset: "limit_reset",
180
+ includeByokInLimit: "include_byok_in_limit",
181
+ usageDaily: "usage_daily",
182
+ usageWeekly: "usage_weekly",
183
+ usageMonthly: "usage_monthly",
184
+ byokUsage: "byok_usage",
185
+ byokUsageDaily: "byok_usage_daily",
186
+ byokUsageWeekly: "byok_usage_weekly",
187
+ byokUsageMonthly: "byok_usage_monthly",
188
+ createdAt: "created_at",
189
+ updatedAt: "updated_at",
190
+ });
191
+ });
192
+
193
+ /**
194
+ * @internal
195
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
196
+ */
197
+ export namespace UpdateAPIKeyData$ {
198
+ /** @deprecated use `UpdateAPIKeyData$inboundSchema` instead. */
199
+ export const inboundSchema = UpdateAPIKeyData$inboundSchema;
200
+ /** @deprecated use `UpdateAPIKeyData$outboundSchema` instead. */
201
+ export const outboundSchema = UpdateAPIKeyData$outboundSchema;
202
+ /** @deprecated use `UpdateAPIKeyData$Outbound` instead. */
203
+ export type Outbound = UpdateAPIKeyData$Outbound;
204
+ }
205
+
206
+ export function updateAPIKeyDataToJSON(
207
+ updateAPIKeyData: UpdateAPIKeyData,
208
+ ): string {
209
+ return JSON.stringify(
210
+ UpdateAPIKeyData$outboundSchema.parse(updateAPIKeyData),
211
+ );
212
+ }
213
+
214
+ export function updateAPIKeyDataFromJSON(
215
+ jsonString: string,
216
+ ): SafeParseResult<UpdateAPIKeyData, SDKValidationError> {
217
+ return safeParse(
218
+ jsonString,
219
+ (x) => UpdateAPIKeyData$inboundSchema.parse(JSON.parse(x)),
220
+ `Failed to parse 'UpdateAPIKeyData' from JSON`,
221
+ );
222
+ }
@@ -5,8 +5,8 @@
5
5
  import { betaResponsesSend } from "../funcs/betaResponsesSend.js";
6
6
  import { EventStream } from "../lib/event-streams.js";
7
7
  import { ClientSDK, RequestOptions } from "../lib/sdks.js";
8
+ import * as models from "../models/index.js";
8
9
  import * as operations from "../models/operations/index.js";
9
- import type { ResponsesNonStreamingResponse } from "../models/responsesnonstreamingresponse.js";
10
10
  import { unwrapAsync } from "../types/fp.js";
11
11
 
12
12
  export class Responses extends ClientSDK {
@@ -21,7 +21,7 @@ export class Responses extends ClientSDK {
21
21
  stream?: false | undefined;
22
22
  },
23
23
  options?: RequestOptions,
24
- ): Promise<ResponsesNonStreamingResponse>;
24
+ ): Promise<models.ResponsesNonStreamingResponse>;
25
25
  async send(
26
26
  request: operations.SendResponsesRequestRequest & { stream: true },
27
27
  options?: RequestOptions,