@openrouter/sdk 0.0.1-beta.11 → 0.0.1-beta.12

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 (197) hide show
  1. package/FUNCTIONS.md +110 -1
  2. package/REACT_QUERY.md +110 -1
  3. package/README.md +682 -14
  4. package/esm/funcs/analyticsGetUserActivity.d.ts +1 -1
  5. package/esm/funcs/analyticsGetUserActivity.js +2 -2
  6. package/esm/funcs/apiKeysCreate.d.ts +1 -1
  7. package/esm/funcs/apiKeysCreate.js +2 -2
  8. package/esm/funcs/apiKeysDelete.d.ts +1 -1
  9. package/esm/funcs/apiKeysDelete.js +2 -2
  10. package/esm/funcs/apiKeysGet.d.ts +1 -1
  11. package/esm/funcs/apiKeysGet.js +2 -2
  12. package/esm/funcs/apiKeysGetCurrentKeyMetadata.d.ts +1 -1
  13. package/esm/funcs/apiKeysGetCurrentKeyMetadata.js +2 -2
  14. package/esm/funcs/apiKeysList.d.ts +1 -1
  15. package/esm/funcs/apiKeysList.js +2 -2
  16. package/esm/funcs/apiKeysUpdate.d.ts +1 -1
  17. package/esm/funcs/apiKeysUpdate.js +2 -2
  18. package/esm/funcs/betaResponsesSend.d.ts +9 -1
  19. package/esm/funcs/betaResponsesSend.js +36 -12
  20. package/esm/funcs/creditsCreateCoinbaseCharge.d.ts +1 -1
  21. package/esm/funcs/creditsCreateCoinbaseCharge.js +15 -5
  22. package/esm/funcs/creditsGetCredits.d.ts +1 -1
  23. package/esm/funcs/creditsGetCredits.js +2 -2
  24. package/esm/funcs/endpointsList.d.ts +1 -1
  25. package/esm/funcs/endpointsList.js +2 -2
  26. package/esm/funcs/endpointsListZdrEndpoints.d.ts +2 -1
  27. package/esm/funcs/endpointsListZdrEndpoints.js +6 -2
  28. package/esm/funcs/generationsGetGeneration.d.ts +1 -1
  29. package/esm/funcs/generationsGetGeneration.js +13 -2
  30. package/esm/funcs/modelsCount.d.ts +3 -2
  31. package/esm/funcs/modelsCount.js +7 -3
  32. package/esm/funcs/modelsList.d.ts +2 -1
  33. package/esm/funcs/modelsList.js +6 -2
  34. package/esm/funcs/modelsListForUser.d.ts +3 -1
  35. package/esm/funcs/modelsListForUser.js +7 -3
  36. package/esm/funcs/parametersGetParameters.d.ts +1 -1
  37. package/esm/funcs/parametersGetParameters.js +2 -2
  38. package/esm/funcs/providersList.d.ts +1 -1
  39. package/esm/funcs/providersList.js +1 -1
  40. package/esm/lib/config.d.ts +2 -2
  41. package/esm/lib/config.js +2 -2
  42. package/esm/models/badgatewayresponseerrordata.d.ts +40 -0
  43. package/esm/models/badgatewayresponseerrordata.js +35 -0
  44. package/esm/models/badrequestresponseerrordata.d.ts +40 -0
  45. package/esm/models/badrequestresponseerrordata.js +35 -0
  46. package/esm/models/chatmessagecontentitemaudio.d.ts +10 -10
  47. package/esm/models/chatmessagecontentitemaudio.js +14 -14
  48. package/esm/models/chatstreamingresponsechunk.d.ts +15 -15
  49. package/esm/models/chatstreamingresponsechunk.js +15 -15
  50. package/esm/models/createchargerequest.d.ts +31 -2
  51. package/esm/models/createchargerequest.js +47 -2
  52. package/esm/models/defaultparameters.d.ts +36 -0
  53. package/esm/models/defaultparameters.js +46 -0
  54. package/esm/models/edgenetworktimeoutresponseerrordata.d.ts +40 -0
  55. package/esm/models/edgenetworktimeoutresponseerrordata.js +35 -0
  56. package/esm/models/endpointstatus.d.ts +26 -0
  57. package/esm/models/endpointstatus.js +36 -0
  58. package/esm/models/errors/badgatewayresponseerror.d.ts +52 -0
  59. package/esm/models/errors/badgatewayresponseerror.js +63 -0
  60. package/esm/models/errors/badrequestresponseerror.d.ts +52 -0
  61. package/esm/models/errors/badrequestresponseerror.js +63 -0
  62. package/esm/models/errors/edgenetworktimeoutresponseerror.d.ts +52 -0
  63. package/esm/models/errors/edgenetworktimeoutresponseerror.js +63 -0
  64. package/esm/models/errors/forbiddenresponseerror.d.ts +52 -0
  65. package/esm/models/errors/forbiddenresponseerror.js +63 -0
  66. package/esm/models/errors/index.d.ts +14 -2
  67. package/esm/models/errors/index.js +14 -2
  68. package/esm/models/errors/internalserverresponseerror.d.ts +52 -0
  69. package/esm/models/errors/internalserverresponseerror.js +63 -0
  70. package/esm/models/errors/notfoundresponseerror.d.ts +52 -0
  71. package/esm/models/errors/{errorresponse.js → notfoundresponseerror.js} +16 -17
  72. package/esm/models/errors/payloadtoolargeresponseerror.d.ts +52 -0
  73. package/esm/models/errors/payloadtoolargeresponseerror.js +63 -0
  74. package/esm/models/errors/paymentrequiredresponseerror.d.ts +52 -0
  75. package/esm/models/errors/paymentrequiredresponseerror.js +63 -0
  76. package/esm/models/errors/provideroverloadedresponseerror.d.ts +52 -0
  77. package/esm/models/errors/provideroverloadedresponseerror.js +63 -0
  78. package/esm/models/errors/requesttimeoutresponseerror.d.ts +52 -0
  79. package/esm/models/errors/requesttimeoutresponseerror.js +63 -0
  80. package/esm/models/errors/serviceunavailableresponseerror.d.ts +52 -0
  81. package/esm/models/errors/serviceunavailableresponseerror.js +63 -0
  82. package/esm/models/errors/toomanyrequestsresponseerror.d.ts +52 -0
  83. package/esm/models/errors/toomanyrequestsresponseerror.js +63 -0
  84. package/esm/models/errors/unauthorizedresponseerror.d.ts +52 -0
  85. package/esm/models/errors/unauthorizedresponseerror.js +63 -0
  86. package/esm/models/errors/unprocessableentityresponseerror.d.ts +52 -0
  87. package/esm/models/errors/unprocessableentityresponseerror.js +63 -0
  88. package/esm/models/forbiddenresponseerrordata.d.ts +40 -0
  89. package/esm/models/forbiddenresponseerrordata.js +35 -0
  90. package/esm/models/index.d.ts +37 -1
  91. package/esm/models/index.js +37 -1
  92. package/esm/models/inputmodality.d.ts +24 -0
  93. package/esm/models/inputmodality.js +34 -0
  94. package/esm/models/instructtype.d.ts +48 -0
  95. package/esm/models/instructtype.js +55 -0
  96. package/esm/models/internalserverresponseerrordata.d.ts +40 -0
  97. package/esm/models/internalserverresponseerrordata.js +35 -0
  98. package/esm/models/listendpointsresponse.d.ts +126 -2
  99. package/esm/models/listendpointsresponse.js +115 -2
  100. package/esm/models/model.d.ts +101 -0
  101. package/esm/models/model.js +82 -0
  102. package/esm/models/modelarchitecture.d.ts +104 -0
  103. package/esm/models/modelarchitecture.js +107 -0
  104. package/esm/models/modelgroup.d.ts +45 -0
  105. package/esm/models/modelgroup.js +53 -0
  106. package/esm/models/modelscountresponse.d.ts +40 -2
  107. package/esm/models/modelscountresponse.js +31 -2
  108. package/esm/models/modelslistresponse.d.ts +10 -2
  109. package/esm/models/modelslistresponse.js +7 -2
  110. package/esm/models/notfoundresponseerrordata.d.ts +40 -0
  111. package/esm/models/notfoundresponseerrordata.js +35 -0
  112. package/esm/models/openairesponsesincludable.d.ts +25 -0
  113. package/esm/models/openairesponsesincludable.js +35 -0
  114. package/esm/models/openairesponsesinputunion.d.ts +78 -78
  115. package/esm/models/openairesponsesinputunion.js +124 -126
  116. package/esm/models/openresponseseasyinputmessage.d.ts +246 -0
  117. package/esm/models/openresponseseasyinputmessage.js +283 -0
  118. package/esm/models/openresponsesfunctioncalloutput.d.ts +64 -0
  119. package/esm/models/openresponsesfunctioncalloutput.js +67 -0
  120. package/esm/models/openresponsesfunctiontoolcall.d.ts +66 -0
  121. package/esm/models/openresponsesfunctiontoolcall.js +69 -0
  122. package/esm/models/openresponsesinput.d.ts +60 -0
  123. package/esm/models/openresponsesinput.js +113 -0
  124. package/esm/models/openresponsesinputmessageitem.d.ts +193 -0
  125. package/esm/models/openresponsesinputmessageitem.js +210 -0
  126. package/esm/models/openresponsesnonstreamingresponse.d.ts +13 -13
  127. package/esm/models/openresponsesnonstreamingresponse.js +13 -13
  128. package/esm/models/openresponsesreasoning.d.ts +179 -0
  129. package/esm/models/openresponsesreasoning.js +194 -0
  130. package/esm/models/openresponsesreasoningconfig.d.ts +40 -0
  131. package/esm/models/openresponsesreasoningconfig.js +48 -0
  132. package/esm/models/openresponsesrequest.d.ts +736 -2
  133. package/esm/models/openresponsesrequest.js +789 -2
  134. package/esm/models/openresponsesresponsetext.d.ts +59 -0
  135. package/esm/models/openresponsesresponsetext.js +64 -0
  136. package/esm/models/operations/createapialpharesponses.d.ts +3 -3
  137. package/esm/models/operations/createapialpharesponses.js +0 -2
  138. package/esm/models/operations/getmodels.d.ts +2 -2
  139. package/esm/models/operations/getmodels.js +2 -10
  140. package/esm/models/operations/index.d.ts +0 -1
  141. package/esm/models/operations/index.js +0 -1
  142. package/esm/models/operations/listendpointszdr.d.ts +3 -24
  143. package/esm/models/operations/listendpointszdr.js +2 -29
  144. package/esm/models/operations/listmodelsuser.d.ts +0 -22
  145. package/esm/models/operations/listmodelsuser.js +0 -28
  146. package/esm/models/operations/listproviders.d.ts +0 -36
  147. package/esm/models/operations/listproviders.js +0 -28
  148. package/esm/models/outputmodality.d.ts +23 -0
  149. package/esm/models/outputmodality.js +33 -0
  150. package/esm/models/parameter.d.ts +43 -0
  151. package/esm/models/parameter.js +54 -0
  152. package/esm/models/payloadtoolargeresponseerrordata.d.ts +40 -0
  153. package/esm/models/payloadtoolargeresponseerrordata.js +35 -0
  154. package/esm/models/paymentrequiredresponseerrordata.d.ts +40 -0
  155. package/esm/models/paymentrequiredresponseerrordata.js +35 -0
  156. package/esm/models/perrequestlimits.d.ts +40 -0
  157. package/esm/models/perrequestlimits.js +44 -0
  158. package/esm/models/providername.d.ts +106 -0
  159. package/esm/models/providername.js +116 -0
  160. package/esm/models/provideroverloadedresponseerrordata.d.ts +40 -0
  161. package/esm/models/provideroverloadedresponseerrordata.js +35 -0
  162. package/esm/models/publicendpoint.d.ts +140 -2
  163. package/esm/models/publicendpoint.js +156 -2
  164. package/esm/models/publicpricing.d.ts +87 -0
  165. package/esm/models/publicpricing.js +73 -0
  166. package/esm/models/quantization.d.ts +29 -0
  167. package/esm/models/quantization.js +39 -0
  168. package/esm/models/requesttimeoutresponseerrordata.d.ts +40 -0
  169. package/esm/models/requesttimeoutresponseerrordata.js +35 -0
  170. package/esm/models/responseserrorfield.d.ts +10 -10
  171. package/esm/models/responseserrorfield.js +14 -14
  172. package/esm/models/responsetextconfig.d.ts +10 -10
  173. package/esm/models/responsetextconfig.js +14 -15
  174. package/esm/models/serviceunavailableresponseerrordata.d.ts +40 -0
  175. package/esm/models/serviceunavailableresponseerrordata.js +35 -0
  176. package/esm/models/toomanyrequestsresponseerrordata.d.ts +40 -0
  177. package/esm/models/toomanyrequestsresponseerrordata.js +35 -0
  178. package/esm/models/topproviderinfo.d.ts +45 -0
  179. package/esm/models/topproviderinfo.js +48 -0
  180. package/esm/models/unauthorizedresponseerrordata.d.ts +40 -0
  181. package/esm/models/unauthorizedresponseerrordata.js +35 -0
  182. package/esm/models/unprocessableentityresponseerrordata.d.ts +40 -0
  183. package/esm/models/unprocessableentityresponseerrordata.js +35 -0
  184. package/esm/react-query/modelsCount.d.ts +2 -2
  185. package/esm/react-query/modelsListForUser.d.ts +2 -1
  186. package/esm/sdk/models.d.ts +3 -2
  187. package/esm/sdk/responses.d.ts +7 -0
  188. package/esm/sdk/responses.js +0 -6
  189. package/jsr.json +1 -1
  190. package/package.json +1 -1
  191. package/esm/models/errorresponse.d.ts +0 -155
  192. package/esm/models/errorresponse.js +0 -167
  193. package/esm/models/errors/errorresponse.d.ts +0 -46
  194. package/esm/models/errors/listproviders.d.ts +0 -49
  195. package/esm/models/errors/listproviders.js +0 -51
  196. package/esm/models/operations/listmodelscount.d.ts +0 -26
  197. package/esm/models/operations/listmodelscount.js +0 -34
@@ -7,6 +7,7 @@ import { compactMap } from "../lib/primitives.js";
7
7
  import { safeParse } from "../lib/schemas.js";
8
8
  import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
9
9
  import { pathToFunc } from "../lib/url.js";
10
+ import * as errors from "../models/errors/index.js";
10
11
  import * as operations from "../models/operations/index.js";
11
12
  import { APIPromise } from "../types/async.js";
12
13
  /**
@@ -64,7 +65,7 @@ async function $do(client, request, options) {
64
65
  const req = requestRes.value;
65
66
  const doResult = await client._do(req, {
66
67
  context,
67
- errorCodes: ["4XX", "5XX"],
68
+ errorCodes: ["400", "4XX", "500", "5XX"],
68
69
  retryConfig: context.retryConfig,
69
70
  retryCodes: context.retryCodes,
70
71
  });
@@ -72,9 +73,12 @@ async function $do(client, request, options) {
72
73
  return [doResult, { status: "request-error", request: req }];
73
74
  }
74
75
  const response = doResult.value;
76
+ const responseFields = {
77
+ HttpMeta: { Response: response, Request: req },
78
+ };
75
79
  const [result] = await M.match(M.json(200, operations.GetModelsResponse$inboundSchema), M.text(200, operations.GetModelsResponse$inboundSchema, {
76
80
  ctype: "application/rss+xml",
77
- }), M.fail("4XX"), M.fail("5XX"), M.json("default", operations.GetModelsResponse$inboundSchema))(response, req);
81
+ }), M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
78
82
  if (!result.ok) {
79
83
  return [result, { status: "complete", request: req, response }];
80
84
  }
@@ -1,14 +1,16 @@
1
1
  import { OpenRouterCore } from "../core.js";
2
2
  import { RequestOptions } from "../lib/sdks.js";
3
3
  import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
4
+ import * as errors from "../models/errors/index.js";
4
5
  import { OpenRouterError } from "../models/errors/openroutererror.js";
5
6
  import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
6
7
  import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
8
+ import * as models from "../models/index.js";
7
9
  import * as operations from "../models/operations/index.js";
8
10
  import { APIPromise } from "../types/async.js";
9
11
  import { Result } from "../types/fp.js";
10
12
  /**
11
13
  * List models filtered by user provider preferences
12
14
  */
13
- export declare function modelsListForUser(client: OpenRouterCore, security: operations.ListModelsUserSecurity, options?: RequestOptions): APIPromise<Result<operations.ListModelsUserResponse, OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
15
+ export declare function modelsListForUser(client: OpenRouterCore, security: operations.ListModelsUserSecurity, options?: RequestOptions): APIPromise<Result<models.ModelsListResponse, errors.UnauthorizedResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
14
16
  //# sourceMappingURL=modelsListForUser.d.ts.map
@@ -5,7 +5,8 @@ import * as M from "../lib/matchers.js";
5
5
  import { compactMap } from "../lib/primitives.js";
6
6
  import { resolveSecurity } from "../lib/security.js";
7
7
  import { pathToFunc } from "../lib/url.js";
8
- import * as operations from "../models/operations/index.js";
8
+ import * as errors from "../models/errors/index.js";
9
+ import * as models from "../models/index.js";
9
10
  import { APIPromise } from "../types/async.js";
10
11
  /**
11
12
  * List models filtered by user provider preferences
@@ -52,7 +53,7 @@ async function $do(client, security, options) {
52
53
  const req = requestRes.value;
53
54
  const doResult = await client._do(req, {
54
55
  context,
55
- errorCodes: ["4XX", "5XX"],
56
+ errorCodes: ["401", "4XX", "500", "5XX"],
56
57
  retryConfig: context.retryConfig,
57
58
  retryCodes: context.retryCodes,
58
59
  });
@@ -60,7 +61,10 @@ async function $do(client, security, options) {
60
61
  return [doResult, { status: "request-error", request: req }];
61
62
  }
62
63
  const response = doResult.value;
63
- const [result] = await M.match(M.json(200, operations.ListModelsUserResponse$inboundSchema), M.fail("4XX"), M.fail("5XX"), M.json("default", operations.ListModelsUserResponse$inboundSchema))(response, req);
64
+ const responseFields = {
65
+ HttpMeta: { Response: response, Request: req },
66
+ };
67
+ const [result] = await M.match(M.json(200, models.ModelsListResponse$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
64
68
  if (!result.ok) {
65
69
  return [result, { status: "complete", request: req, response }];
66
70
  }
@@ -11,5 +11,5 @@ import { Result } from "../types/fp.js";
11
11
  /**
12
12
  * Get a model's supported parameters and data about which are most popular
13
13
  */
14
- export declare function parametersGetParameters(client: OpenRouterCore, security: operations.GetParametersSecurity, request: operations.GetParametersRequest, options?: RequestOptions): APIPromise<Result<operations.GetParametersResponse, errors.ErrorResponse | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
14
+ export declare function parametersGetParameters(client: OpenRouterCore, security: operations.GetParametersSecurity, request: operations.GetParametersRequest, options?: RequestOptions): APIPromise<Result<operations.GetParametersResponse, errors.UnauthorizedResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
15
15
  //# sourceMappingURL=parametersGetParameters.d.ts.map
@@ -76,7 +76,7 @@ async function $do(client, security, request, options) {
76
76
  const req = requestRes.value;
77
77
  const doResult = await client._do(req, {
78
78
  context,
79
- errorCodes: ["4XX", "5XX"],
79
+ errorCodes: ["401", "404", "4XX", "500", "5XX"],
80
80
  retryConfig: context.retryConfig,
81
81
  retryCodes: context.retryCodes,
82
82
  });
@@ -87,7 +87,7 @@ async function $do(client, security, request, options) {
87
87
  const responseFields = {
88
88
  HttpMeta: { Response: response, Request: req },
89
89
  };
90
- const [result] = await M.match(M.json(200, operations.GetParametersResponse$inboundSchema), M.jsonErr("4XX", errors.ErrorResponse$inboundSchema), M.jsonErr("5XX", errors.ErrorResponse$inboundSchema))(response, req, { extraFields: responseFields });
90
+ const [result] = await M.match(M.json(200, operations.GetParametersResponse$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
91
91
  if (!result.ok) {
92
92
  return [result, { status: "complete", request: req, response }];
93
93
  }
@@ -11,5 +11,5 @@ import { Result } from "../types/fp.js";
11
11
  /**
12
12
  * List all providers
13
13
  */
14
- export declare function providersList(client: OpenRouterCore, options?: RequestOptions): APIPromise<Result<operations.ListProvidersResponse, errors.InternalServerError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
14
+ export declare function providersList(client: OpenRouterCore, options?: RequestOptions): APIPromise<Result<operations.ListProvidersResponse, errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
15
15
  //# sourceMappingURL=providersList.d.ts.map
@@ -60,7 +60,7 @@ async function $do(client, options) {
60
60
  const responseFields = {
61
61
  HttpMeta: { Response: response, Request: req },
62
62
  };
63
- const [result] = await M.match(M.json(200, operations.ListProvidersResponse$inboundSchema), M.jsonErr(500, errors.InternalServerError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
63
+ const [result] = await M.match(M.json(200, operations.ListProvidersResponse$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
64
64
  if (!result.ok) {
65
65
  return [result, { status: "complete", request: req, response }];
66
66
  }
@@ -37,8 +37,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
37
37
  export declare const SDK_METADATA: {
38
38
  readonly language: "typescript";
39
39
  readonly openapiDocVersion: "1.0.0";
40
- readonly sdkVersion: "0.0.1-beta.11";
40
+ readonly sdkVersion: "0.0.1-beta.12";
41
41
  readonly genVersion: "2.731.4";
42
- readonly userAgent: "speakeasy-sdk/typescript 0.0.1-beta.11 2.731.4 1.0.0 @openrouter/sdk";
42
+ readonly userAgent: "speakeasy-sdk/typescript 0.0.1-beta.12 2.731.4 1.0.0 @openrouter/sdk";
43
43
  };
44
44
  //# sourceMappingURL=config.d.ts.map
package/esm/lib/config.js CHANGED
@@ -25,8 +25,8 @@ export function serverURLFromOptions(options) {
25
25
  export const SDK_METADATA = {
26
26
  language: "typescript",
27
27
  openapiDocVersion: "1.0.0",
28
- sdkVersion: "0.0.1-beta.11",
28
+ sdkVersion: "0.0.1-beta.12",
29
29
  genVersion: "2.731.4",
30
- userAgent: "speakeasy-sdk/typescript 0.0.1-beta.11 2.731.4 1.0.0 @openrouter/sdk",
30
+ userAgent: "speakeasy-sdk/typescript 0.0.1-beta.12 2.731.4 1.0.0 @openrouter/sdk",
31
31
  };
32
32
  //# sourceMappingURL=config.js.map
@@ -0,0 +1,40 @@
1
+ import * as z from "zod/v4";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
+ /**
5
+ * Error data for BadGatewayResponse
6
+ */
7
+ export type BadGatewayResponseErrorData = {
8
+ code: number;
9
+ message: string;
10
+ metadata?: {
11
+ [k: string]: any | null;
12
+ } | null | undefined;
13
+ };
14
+ /** @internal */
15
+ export declare const BadGatewayResponseErrorData$inboundSchema: z.ZodType<BadGatewayResponseErrorData, unknown>;
16
+ /** @internal */
17
+ export type BadGatewayResponseErrorData$Outbound = {
18
+ code: number;
19
+ message: string;
20
+ metadata?: {
21
+ [k: string]: any | null;
22
+ } | null | undefined;
23
+ };
24
+ /** @internal */
25
+ export declare const BadGatewayResponseErrorData$outboundSchema: z.ZodType<BadGatewayResponseErrorData$Outbound, BadGatewayResponseErrorData>;
26
+ /**
27
+ * @internal
28
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
29
+ */
30
+ export declare namespace BadGatewayResponseErrorData$ {
31
+ /** @deprecated use `BadGatewayResponseErrorData$inboundSchema` instead. */
32
+ const inboundSchema: z.ZodType<BadGatewayResponseErrorData, unknown, z.core.$ZodTypeInternals<BadGatewayResponseErrorData, unknown>>;
33
+ /** @deprecated use `BadGatewayResponseErrorData$outboundSchema` instead. */
34
+ const outboundSchema: z.ZodType<BadGatewayResponseErrorData$Outbound, BadGatewayResponseErrorData, z.core.$ZodTypeInternals<BadGatewayResponseErrorData$Outbound, BadGatewayResponseErrorData>>;
35
+ /** @deprecated use `BadGatewayResponseErrorData$Outbound` instead. */
36
+ type Outbound = BadGatewayResponseErrorData$Outbound;
37
+ }
38
+ export declare function badGatewayResponseErrorDataToJSON(badGatewayResponseErrorData: BadGatewayResponseErrorData): string;
39
+ export declare function badGatewayResponseErrorDataFromJSON(jsonString: string): SafeParseResult<BadGatewayResponseErrorData, SDKValidationError>;
40
+ //# sourceMappingURL=badgatewayresponseerrordata.d.ts.map
@@ -0,0 +1,35 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import * as z from "zod/v4";
5
+ import { safeParse } from "../lib/schemas.js";
6
+ /** @internal */
7
+ export const BadGatewayResponseErrorData$inboundSchema = z.object({
8
+ code: z.number().int(),
9
+ message: z.string(),
10
+ metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(),
11
+ });
12
+ /** @internal */
13
+ export const BadGatewayResponseErrorData$outboundSchema = z.object({
14
+ code: z.number().int(),
15
+ message: z.string(),
16
+ metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(),
17
+ });
18
+ /**
19
+ * @internal
20
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
21
+ */
22
+ export var BadGatewayResponseErrorData$;
23
+ (function (BadGatewayResponseErrorData$) {
24
+ /** @deprecated use `BadGatewayResponseErrorData$inboundSchema` instead. */
25
+ BadGatewayResponseErrorData$.inboundSchema = BadGatewayResponseErrorData$inboundSchema;
26
+ /** @deprecated use `BadGatewayResponseErrorData$outboundSchema` instead. */
27
+ BadGatewayResponseErrorData$.outboundSchema = BadGatewayResponseErrorData$outboundSchema;
28
+ })(BadGatewayResponseErrorData$ || (BadGatewayResponseErrorData$ = {}));
29
+ export function badGatewayResponseErrorDataToJSON(badGatewayResponseErrorData) {
30
+ return JSON.stringify(BadGatewayResponseErrorData$outboundSchema.parse(badGatewayResponseErrorData));
31
+ }
32
+ export function badGatewayResponseErrorDataFromJSON(jsonString) {
33
+ return safeParse(jsonString, (x) => BadGatewayResponseErrorData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BadGatewayResponseErrorData' from JSON`);
34
+ }
35
+ //# sourceMappingURL=badgatewayresponseerrordata.js.map
@@ -0,0 +1,40 @@
1
+ import * as z from "zod/v4";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
+ /**
5
+ * Error data for BadRequestResponse
6
+ */
7
+ export type BadRequestResponseErrorData = {
8
+ code: number;
9
+ message: string;
10
+ metadata?: {
11
+ [k: string]: any | null;
12
+ } | null | undefined;
13
+ };
14
+ /** @internal */
15
+ export declare const BadRequestResponseErrorData$inboundSchema: z.ZodType<BadRequestResponseErrorData, unknown>;
16
+ /** @internal */
17
+ export type BadRequestResponseErrorData$Outbound = {
18
+ code: number;
19
+ message: string;
20
+ metadata?: {
21
+ [k: string]: any | null;
22
+ } | null | undefined;
23
+ };
24
+ /** @internal */
25
+ export declare const BadRequestResponseErrorData$outboundSchema: z.ZodType<BadRequestResponseErrorData$Outbound, BadRequestResponseErrorData>;
26
+ /**
27
+ * @internal
28
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
29
+ */
30
+ export declare namespace BadRequestResponseErrorData$ {
31
+ /** @deprecated use `BadRequestResponseErrorData$inboundSchema` instead. */
32
+ const inboundSchema: z.ZodType<BadRequestResponseErrorData, unknown, z.core.$ZodTypeInternals<BadRequestResponseErrorData, unknown>>;
33
+ /** @deprecated use `BadRequestResponseErrorData$outboundSchema` instead. */
34
+ const outboundSchema: z.ZodType<BadRequestResponseErrorData$Outbound, BadRequestResponseErrorData, z.core.$ZodTypeInternals<BadRequestResponseErrorData$Outbound, BadRequestResponseErrorData>>;
35
+ /** @deprecated use `BadRequestResponseErrorData$Outbound` instead. */
36
+ type Outbound = BadRequestResponseErrorData$Outbound;
37
+ }
38
+ export declare function badRequestResponseErrorDataToJSON(badRequestResponseErrorData: BadRequestResponseErrorData): string;
39
+ export declare function badRequestResponseErrorDataFromJSON(jsonString: string): SafeParseResult<BadRequestResponseErrorData, SDKValidationError>;
40
+ //# sourceMappingURL=badrequestresponseerrordata.d.ts.map
@@ -0,0 +1,35 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import * as z from "zod/v4";
5
+ import { safeParse } from "../lib/schemas.js";
6
+ /** @internal */
7
+ export const BadRequestResponseErrorData$inboundSchema = z.object({
8
+ code: z.number().int(),
9
+ message: z.string(),
10
+ metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(),
11
+ });
12
+ /** @internal */
13
+ export const BadRequestResponseErrorData$outboundSchema = z.object({
14
+ code: z.number().int(),
15
+ message: z.string(),
16
+ metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(),
17
+ });
18
+ /**
19
+ * @internal
20
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
21
+ */
22
+ export var BadRequestResponseErrorData$;
23
+ (function (BadRequestResponseErrorData$) {
24
+ /** @deprecated use `BadRequestResponseErrorData$inboundSchema` instead. */
25
+ BadRequestResponseErrorData$.inboundSchema = BadRequestResponseErrorData$inboundSchema;
26
+ /** @deprecated use `BadRequestResponseErrorData$outboundSchema` instead. */
27
+ BadRequestResponseErrorData$.outboundSchema = BadRequestResponseErrorData$outboundSchema;
28
+ })(BadRequestResponseErrorData$ || (BadRequestResponseErrorData$ = {}));
29
+ export function badRequestResponseErrorDataToJSON(badRequestResponseErrorData) {
30
+ return JSON.stringify(BadRequestResponseErrorData$outboundSchema.parse(badRequestResponseErrorData));
31
+ }
32
+ export function badRequestResponseErrorDataFromJSON(jsonString) {
33
+ return safeParse(jsonString, (x) => BadRequestResponseErrorData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BadRequestResponseErrorData' from JSON`);
34
+ }
35
+ //# sourceMappingURL=badrequestresponseerrordata.js.map
@@ -2,7 +2,7 @@ import * as z from "zod/v4";
2
2
  import { OpenEnum } from "../types/enums.js";
3
3
  import { Result as SafeParseResult } from "../types/fp.js";
4
4
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
- export declare const Format: {
5
+ export declare const ChatMessageContentItemAudioFormat: {
6
6
  readonly Wav: "wav";
7
7
  readonly Mp3: "mp3";
8
8
  readonly Flac: "flac";
@@ -11,28 +11,28 @@ export declare const Format: {
11
11
  readonly Pcm16: "pcm16";
12
12
  readonly Pcm24: "pcm24";
13
13
  };
14
- export type Format = OpenEnum<typeof Format>;
14
+ export type ChatMessageContentItemAudioFormat = OpenEnum<typeof ChatMessageContentItemAudioFormat>;
15
15
  export type InputAudio = {
16
16
  data: string;
17
- format: Format;
17
+ format: ChatMessageContentItemAudioFormat;
18
18
  };
19
19
  export type ChatMessageContentItemAudio = {
20
20
  type: "input_audio";
21
21
  inputAudio: InputAudio;
22
22
  };
23
23
  /** @internal */
24
- export declare const Format$inboundSchema: z.ZodType<Format, unknown>;
24
+ export declare const ChatMessageContentItemAudioFormat$inboundSchema: z.ZodType<ChatMessageContentItemAudioFormat, unknown>;
25
25
  /** @internal */
26
- export declare const Format$outboundSchema: z.ZodType<Format, Format>;
26
+ export declare const ChatMessageContentItemAudioFormat$outboundSchema: z.ZodType<ChatMessageContentItemAudioFormat, ChatMessageContentItemAudioFormat>;
27
27
  /**
28
28
  * @internal
29
29
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
30
30
  */
31
- export declare namespace Format$ {
32
- /** @deprecated use `Format$inboundSchema` instead. */
33
- const inboundSchema: z.ZodType<Format, unknown, z.core.$ZodTypeInternals<Format, unknown>>;
34
- /** @deprecated use `Format$outboundSchema` instead. */
35
- const outboundSchema: z.ZodType<Format, Format, z.core.$ZodTypeInternals<Format, Format>>;
31
+ export declare namespace ChatMessageContentItemAudioFormat$ {
32
+ /** @deprecated use `ChatMessageContentItemAudioFormat$inboundSchema` instead. */
33
+ const inboundSchema: z.ZodType<ChatMessageContentItemAudioFormat, unknown, z.core.$ZodTypeInternals<ChatMessageContentItemAudioFormat, unknown>>;
34
+ /** @deprecated use `ChatMessageContentItemAudioFormat$outboundSchema` instead. */
35
+ const outboundSchema: z.ZodType<ChatMessageContentItemAudioFormat, ChatMessageContentItemAudioFormat, z.core.$ZodTypeInternals<ChatMessageContentItemAudioFormat, ChatMessageContentItemAudioFormat>>;
36
36
  }
37
37
  /** @internal */
38
38
  export declare const InputAudio$inboundSchema: z.ZodType<InputAudio, unknown>;
@@ -5,7 +5,7 @@ import * as z from "zod/v4";
5
5
  import { remap as remap$ } from "../lib/primitives.js";
6
6
  import { safeParse } from "../lib/schemas.js";
7
7
  import { catchUnrecognizedEnum, } from "../types/enums.js";
8
- export const Format = {
8
+ export const ChatMessageContentItemAudioFormat = {
9
9
  Wav: "wav",
10
10
  Mp3: "mp3",
11
11
  Flac: "flac",
@@ -15,37 +15,37 @@ export const Format = {
15
15
  Pcm24: "pcm24",
16
16
  };
17
17
  /** @internal */
18
- export const Format$inboundSchema = z
18
+ export const ChatMessageContentItemAudioFormat$inboundSchema = z
19
19
  .union([
20
- z.enum(Format),
20
+ z.enum(ChatMessageContentItemAudioFormat),
21
21
  z.string().transform(catchUnrecognizedEnum),
22
22
  ]);
23
23
  /** @internal */
24
- export const Format$outboundSchema = z.union([
25
- z.enum(Format),
24
+ export const ChatMessageContentItemAudioFormat$outboundSchema = z.union([
25
+ z.enum(ChatMessageContentItemAudioFormat),
26
26
  z.string().and(z.custom()),
27
27
  ]);
28
28
  /**
29
29
  * @internal
30
30
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
31
31
  */
32
- export var Format$;
33
- (function (Format$) {
34
- /** @deprecated use `Format$inboundSchema` instead. */
35
- Format$.inboundSchema = Format$inboundSchema;
36
- /** @deprecated use `Format$outboundSchema` instead. */
37
- Format$.outboundSchema = Format$outboundSchema;
38
- })(Format$ || (Format$ = {}));
32
+ export var ChatMessageContentItemAudioFormat$;
33
+ (function (ChatMessageContentItemAudioFormat$) {
34
+ /** @deprecated use `ChatMessageContentItemAudioFormat$inboundSchema` instead. */
35
+ ChatMessageContentItemAudioFormat$.inboundSchema = ChatMessageContentItemAudioFormat$inboundSchema;
36
+ /** @deprecated use `ChatMessageContentItemAudioFormat$outboundSchema` instead. */
37
+ ChatMessageContentItemAudioFormat$.outboundSchema = ChatMessageContentItemAudioFormat$outboundSchema;
38
+ })(ChatMessageContentItemAudioFormat$ || (ChatMessageContentItemAudioFormat$ = {}));
39
39
  /** @internal */
40
40
  export const InputAudio$inboundSchema = z
41
41
  .object({
42
42
  data: z.string(),
43
- format: Format$inboundSchema,
43
+ format: ChatMessageContentItemAudioFormat$inboundSchema,
44
44
  });
45
45
  /** @internal */
46
46
  export const InputAudio$outboundSchema = z.object({
47
47
  data: z.string(),
48
- format: Format$outboundSchema,
48
+ format: ChatMessageContentItemAudioFormat$outboundSchema,
49
49
  });
50
50
  /**
51
51
  * @internal
@@ -7,7 +7,7 @@ export type ChatStreamingResponseChunkError = {
7
7
  message: string;
8
8
  code: number;
9
9
  };
10
- export type Data = {
10
+ export type ChatStreamingResponseChunkData = {
11
11
  id: string;
12
12
  choices: Array<ChatStreamingChoice>;
13
13
  created: number;
@@ -18,7 +18,7 @@ export type Data = {
18
18
  usage?: ChatGenerationTokenUsage | undefined;
19
19
  };
20
20
  export type ChatStreamingResponseChunk = {
21
- data: Data;
21
+ data: ChatStreamingResponseChunkData;
22
22
  };
23
23
  /** @internal */
24
24
  export declare const ChatStreamingResponseChunkError$inboundSchema: z.ZodType<ChatStreamingResponseChunkError, unknown>;
@@ -44,9 +44,9 @@ export declare namespace ChatStreamingResponseChunkError$ {
44
44
  export declare function chatStreamingResponseChunkErrorToJSON(chatStreamingResponseChunkError: ChatStreamingResponseChunkError): string;
45
45
  export declare function chatStreamingResponseChunkErrorFromJSON(jsonString: string): SafeParseResult<ChatStreamingResponseChunkError, SDKValidationError>;
46
46
  /** @internal */
47
- export declare const Data$inboundSchema: z.ZodType<Data, unknown>;
47
+ export declare const ChatStreamingResponseChunkData$inboundSchema: z.ZodType<ChatStreamingResponseChunkData, unknown>;
48
48
  /** @internal */
49
- export type Data$Outbound = {
49
+ export type ChatStreamingResponseChunkData$Outbound = {
50
50
  id: string;
51
51
  choices: Array<ChatStreamingChoice$Outbound>;
52
52
  created: number;
@@ -57,26 +57,26 @@ export type Data$Outbound = {
57
57
  usage?: ChatGenerationTokenUsage$Outbound | undefined;
58
58
  };
59
59
  /** @internal */
60
- export declare const Data$outboundSchema: z.ZodType<Data$Outbound, Data>;
60
+ export declare const ChatStreamingResponseChunkData$outboundSchema: z.ZodType<ChatStreamingResponseChunkData$Outbound, ChatStreamingResponseChunkData>;
61
61
  /**
62
62
  * @internal
63
63
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
64
64
  */
65
- export declare namespace Data$ {
66
- /** @deprecated use `Data$inboundSchema` instead. */
67
- const inboundSchema: z.ZodType<Data, unknown, z.core.$ZodTypeInternals<Data, unknown>>;
68
- /** @deprecated use `Data$outboundSchema` instead. */
69
- const outboundSchema: z.ZodType<Data$Outbound, Data, z.core.$ZodTypeInternals<Data$Outbound, Data>>;
70
- /** @deprecated use `Data$Outbound` instead. */
71
- type Outbound = Data$Outbound;
65
+ export declare namespace ChatStreamingResponseChunkData$ {
66
+ /** @deprecated use `ChatStreamingResponseChunkData$inboundSchema` instead. */
67
+ const inboundSchema: z.ZodType<ChatStreamingResponseChunkData, unknown, z.core.$ZodTypeInternals<ChatStreamingResponseChunkData, unknown>>;
68
+ /** @deprecated use `ChatStreamingResponseChunkData$outboundSchema` instead. */
69
+ const outboundSchema: z.ZodType<ChatStreamingResponseChunkData$Outbound, ChatStreamingResponseChunkData, z.core.$ZodTypeInternals<ChatStreamingResponseChunkData$Outbound, ChatStreamingResponseChunkData>>;
70
+ /** @deprecated use `ChatStreamingResponseChunkData$Outbound` instead. */
71
+ type Outbound = ChatStreamingResponseChunkData$Outbound;
72
72
  }
73
- export declare function dataToJSON(data: Data): string;
74
- export declare function dataFromJSON(jsonString: string): SafeParseResult<Data, SDKValidationError>;
73
+ export declare function chatStreamingResponseChunkDataToJSON(chatStreamingResponseChunkData: ChatStreamingResponseChunkData): string;
74
+ export declare function chatStreamingResponseChunkDataFromJSON(jsonString: string): SafeParseResult<ChatStreamingResponseChunkData, SDKValidationError>;
75
75
  /** @internal */
76
76
  export declare const ChatStreamingResponseChunk$inboundSchema: z.ZodType<ChatStreamingResponseChunk, unknown>;
77
77
  /** @internal */
78
78
  export type ChatStreamingResponseChunk$Outbound = {
79
- data: Data$Outbound;
79
+ data: ChatStreamingResponseChunkData$Outbound;
80
80
  };
81
81
  /** @internal */
82
82
  export declare const ChatStreamingResponseChunk$outboundSchema: z.ZodType<ChatStreamingResponseChunk$Outbound, ChatStreamingResponseChunk>;
@@ -34,7 +34,7 @@ export function chatStreamingResponseChunkErrorFromJSON(jsonString) {
34
34
  return safeParse(jsonString, (x) => ChatStreamingResponseChunkError$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ChatStreamingResponseChunkError' from JSON`);
35
35
  }
36
36
  /** @internal */
37
- export const Data$inboundSchema = z.object({
37
+ export const ChatStreamingResponseChunkData$inboundSchema = z.object({
38
38
  id: z.string(),
39
39
  choices: z.array(ChatStreamingChoice$inboundSchema),
40
40
  created: z.number(),
@@ -49,7 +49,7 @@ export const Data$inboundSchema = z.object({
49
49
  });
50
50
  });
51
51
  /** @internal */
52
- export const Data$outboundSchema = z.object({
52
+ export const ChatStreamingResponseChunkData$outboundSchema = z.object({
53
53
  id: z.string(),
54
54
  choices: z.array(ChatStreamingChoice$outboundSchema),
55
55
  created: z.number(),
@@ -68,18 +68,18 @@ export const Data$outboundSchema = z.object({
68
68
  * @internal
69
69
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
70
70
  */
71
- export var Data$;
72
- (function (Data$) {
73
- /** @deprecated use `Data$inboundSchema` instead. */
74
- Data$.inboundSchema = Data$inboundSchema;
75
- /** @deprecated use `Data$outboundSchema` instead. */
76
- Data$.outboundSchema = Data$outboundSchema;
77
- })(Data$ || (Data$ = {}));
78
- export function dataToJSON(data) {
79
- return JSON.stringify(Data$outboundSchema.parse(data));
71
+ export var ChatStreamingResponseChunkData$;
72
+ (function (ChatStreamingResponseChunkData$) {
73
+ /** @deprecated use `ChatStreamingResponseChunkData$inboundSchema` instead. */
74
+ ChatStreamingResponseChunkData$.inboundSchema = ChatStreamingResponseChunkData$inboundSchema;
75
+ /** @deprecated use `ChatStreamingResponseChunkData$outboundSchema` instead. */
76
+ ChatStreamingResponseChunkData$.outboundSchema = ChatStreamingResponseChunkData$outboundSchema;
77
+ })(ChatStreamingResponseChunkData$ || (ChatStreamingResponseChunkData$ = {}));
78
+ export function chatStreamingResponseChunkDataToJSON(chatStreamingResponseChunkData) {
79
+ return JSON.stringify(ChatStreamingResponseChunkData$outboundSchema.parse(chatStreamingResponseChunkData));
80
80
  }
81
- export function dataFromJSON(jsonString) {
82
- return safeParse(jsonString, (x) => Data$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Data' from JSON`);
81
+ export function chatStreamingResponseChunkDataFromJSON(jsonString) {
82
+ return safeParse(jsonString, (x) => ChatStreamingResponseChunkData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ChatStreamingResponseChunkData' from JSON`);
83
83
  }
84
84
  /** @internal */
85
85
  export const ChatStreamingResponseChunk$inboundSchema = z.object({
@@ -94,11 +94,11 @@ export const ChatStreamingResponseChunk$inboundSchema = z.object({
94
94
  });
95
95
  return z.NEVER;
96
96
  }
97
- }).pipe(z.lazy(() => Data$inboundSchema)),
97
+ }).pipe(z.lazy(() => ChatStreamingResponseChunkData$inboundSchema)),
98
98
  });
99
99
  /** @internal */
100
100
  export const ChatStreamingResponseChunk$outboundSchema = z.object({
101
- data: z.lazy(() => Data$outboundSchema),
101
+ data: z.lazy(() => ChatStreamingResponseChunkData$outboundSchema),
102
102
  });
103
103
  /**
104
104
  * @internal
@@ -1,14 +1,43 @@
1
1
  import * as z from "zod/v4";
2
+ import { OpenEnum } from "../types/enums.js";
2
3
  import { Result as SafeParseResult } from "../types/fp.js";
3
4
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
+ export declare const ChainId: {
6
+ readonly One: 1;
7
+ readonly OneHundredAndThirtySeven: 137;
8
+ readonly EightThousandFourHundredAndFiftyThree: 8453;
9
+ };
10
+ export type ChainId = OpenEnum<typeof ChainId>;
4
11
  /**
5
12
  * Create a Coinbase charge for crypto payment
6
13
  */
7
- export type CreateChargeRequest = {};
14
+ export type CreateChargeRequest = {
15
+ amount: number;
16
+ sender: string;
17
+ chainId: ChainId;
18
+ };
19
+ /** @internal */
20
+ export declare const ChainId$inboundSchema: z.ZodType<ChainId, unknown>;
21
+ /** @internal */
22
+ export declare const ChainId$outboundSchema: z.ZodType<ChainId, ChainId>;
23
+ /**
24
+ * @internal
25
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
26
+ */
27
+ export declare namespace ChainId$ {
28
+ /** @deprecated use `ChainId$inboundSchema` instead. */
29
+ const inboundSchema: z.ZodType<ChainId, unknown, z.core.$ZodTypeInternals<ChainId, unknown>>;
30
+ /** @deprecated use `ChainId$outboundSchema` instead. */
31
+ const outboundSchema: z.ZodType<ChainId, ChainId, z.core.$ZodTypeInternals<ChainId, ChainId>>;
32
+ }
8
33
  /** @internal */
9
34
  export declare const CreateChargeRequest$inboundSchema: z.ZodType<CreateChargeRequest, unknown>;
10
35
  /** @internal */
11
- export type CreateChargeRequest$Outbound = {};
36
+ export type CreateChargeRequest$Outbound = {
37
+ amount: number;
38
+ sender: string;
39
+ chain_id: number;
40
+ };
12
41
  /** @internal */
13
42
  export declare const CreateChargeRequest$outboundSchema: z.ZodType<CreateChargeRequest$Outbound, CreateChargeRequest>;
14
43
  /**