@openrouter/sdk 0.0.0-beta.4 → 0.0.0-beta.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/REACT_QUERY.md +4 -4
- package/README.md +32 -17
- package/dist/{esm/funcs/postCreditsCoinbase.d.ts → commonjs/funcs/creditsPostCreditsCoinbase.d.ts} +2 -2
- package/dist/commonjs/funcs/creditsPostCreditsCoinbase.d.ts.map +1 -0
- package/dist/commonjs/funcs/{postCreditsCoinbase.js → creditsPostCreditsCoinbase.js} +3 -3
- package/dist/commonjs/funcs/creditsPostCreditsCoinbase.js.map +1 -0
- package/dist/commonjs/funcs/{embeddingsPostEmbeddings.d.ts → embeddingsGenerate.d.ts} +2 -2
- package/dist/commonjs/funcs/embeddingsGenerate.d.ts.map +1 -0
- package/dist/commonjs/funcs/{embeddingsPostEmbeddings.js → embeddingsGenerate.js} +3 -3
- package/dist/commonjs/funcs/embeddingsGenerate.js.map +1 -0
- package/dist/{esm/funcs/parametersGetParametersAuthorSlug.d.ts → commonjs/funcs/modelGetParametersAuthorSlug.d.ts} +2 -2
- package/dist/commonjs/funcs/modelGetParametersAuthorSlug.d.ts.map +1 -0
- package/dist/commonjs/funcs/{parametersGetParametersAuthorSlug.js → modelGetParametersAuthorSlug.js} +3 -3
- package/dist/commonjs/funcs/modelGetParametersAuthorSlug.js.map +1 -0
- package/dist/commonjs/funcs/oAuthPostAuthKeys.d.ts +17 -0
- package/dist/commonjs/funcs/oAuthPostAuthKeys.d.ts.map +1 -0
- package/dist/commonjs/funcs/oAuthPostAuthKeys.js +116 -0
- package/dist/commonjs/funcs/oAuthPostAuthKeys.js.map +1 -0
- package/dist/commonjs/funcs/oAuthPostAuthKeysCode.d.ts +17 -0
- package/dist/commonjs/funcs/oAuthPostAuthKeysCode.d.ts.map +1 -0
- package/dist/commonjs/funcs/oAuthPostAuthKeysCode.js +116 -0
- package/dist/commonjs/funcs/oAuthPostAuthKeysCode.js.map +1 -0
- package/dist/{esm/funcs/getProviders.d.ts → commonjs/funcs/providersGetProviders.d.ts} +5 -2
- package/dist/commonjs/funcs/providersGetProviders.d.ts.map +1 -0
- package/dist/commonjs/funcs/{getProviders.js → providersGetProviders.js} +6 -3
- package/dist/commonjs/funcs/providersGetProviders.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/models/operations/index.d.ts +2 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +2 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/postauthkeys.d.ts +132 -0
- package/dist/commonjs/models/operations/postauthkeys.d.ts.map +1 -0
- package/dist/commonjs/models/operations/postauthkeys.js +175 -0
- package/dist/commonjs/models/operations/postauthkeys.js.map +1 -0
- package/dist/commonjs/models/operations/postauthkeyscode.d.ts +167 -0
- package/dist/commonjs/models/operations/postauthkeyscode.d.ts.map +1 -0
- package/dist/commonjs/models/operations/postauthkeyscode.js +210 -0
- package/dist/commonjs/models/operations/postauthkeyscode.js.map +1 -0
- package/dist/commonjs/react-query/creditsPostCreditsCoinbase.d.ts +21 -0
- package/dist/commonjs/react-query/creditsPostCreditsCoinbase.d.ts.map +1 -0
- package/dist/commonjs/react-query/creditsPostCreditsCoinbase.js +44 -0
- package/dist/commonjs/react-query/creditsPostCreditsCoinbase.js.map +1 -0
- package/dist/commonjs/react-query/embeddingsGenerate.d.ts +23 -0
- package/dist/commonjs/react-query/embeddingsGenerate.d.ts.map +1 -0
- package/dist/commonjs/react-query/{embeddingsPostEmbeddings.js → embeddingsGenerate.js} +13 -13
- package/dist/commonjs/react-query/embeddingsGenerate.js.map +1 -0
- package/dist/commonjs/react-query/index.d.ts +6 -4
- package/dist/commonjs/react-query/index.d.ts.map +1 -1
- package/dist/commonjs/react-query/index.js +6 -4
- package/dist/commonjs/react-query/index.js.map +1 -1
- package/dist/commonjs/react-query/modelGetParametersAuthorSlug.d.ts +38 -0
- package/dist/commonjs/react-query/modelGetParametersAuthorSlug.d.ts.map +1 -0
- package/dist/commonjs/react-query/modelGetParametersAuthorSlug.js +88 -0
- package/dist/commonjs/react-query/modelGetParametersAuthorSlug.js.map +1 -0
- package/dist/commonjs/react-query/oAuthPostAuthKeys.d.ts +23 -0
- package/dist/commonjs/react-query/oAuthPostAuthKeys.d.ts.map +1 -0
- package/dist/commonjs/react-query/oAuthPostAuthKeys.js +47 -0
- package/dist/commonjs/react-query/oAuthPostAuthKeys.js.map +1 -0
- package/dist/commonjs/react-query/oAuthPostAuthKeysCode.d.ts +23 -0
- package/dist/commonjs/react-query/oAuthPostAuthKeysCode.d.ts.map +1 -0
- package/dist/commonjs/react-query/oAuthPostAuthKeysCode.js +47 -0
- package/dist/commonjs/react-query/oAuthPostAuthKeysCode.js.map +1 -0
- package/dist/commonjs/react-query/providersGetProviders.d.ts +23 -0
- package/dist/commonjs/react-query/providersGetProviders.d.ts.map +1 -0
- package/dist/commonjs/react-query/providersGetProviders.js +69 -0
- package/dist/commonjs/react-query/providersGetProviders.js.map +1 -0
- package/dist/commonjs/sdk/credits.d.ts +9 -0
- package/dist/commonjs/sdk/credits.d.ts.map +1 -0
- package/dist/commonjs/sdk/credits.js +19 -0
- package/dist/commonjs/sdk/credits.js.map +1 -0
- package/dist/commonjs/sdk/embeddings.d.ts +1 -1
- package/dist/commonjs/sdk/embeddings.d.ts.map +1 -1
- package/dist/commonjs/sdk/embeddings.js +3 -3
- package/dist/commonjs/sdk/embeddings.js.map +1 -1
- package/dist/commonjs/sdk/{parameters.d.ts → model.d.ts} +2 -2
- package/dist/commonjs/sdk/model.d.ts.map +1 -0
- package/dist/commonjs/sdk/model.js +19 -0
- package/dist/commonjs/sdk/model.js.map +1 -0
- package/dist/commonjs/sdk/oauth.d.ts +19 -0
- package/dist/commonjs/sdk/oauth.d.ts.map +1 -0
- package/dist/commonjs/sdk/oauth.js +32 -0
- package/dist/commonjs/sdk/oauth.js.map +1 -0
- package/dist/commonjs/sdk/providers.d.ts +9 -0
- package/dist/commonjs/sdk/providers.d.ts.map +1 -0
- package/dist/commonjs/sdk/providers.js +19 -0
- package/dist/commonjs/sdk/providers.js.map +1 -0
- package/dist/commonjs/sdk/sdk.d.ts +12 -8
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +15 -14
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/{commonjs/funcs/postCreditsCoinbase.d.ts → esm/funcs/creditsPostCreditsCoinbase.d.ts} +2 -2
- package/dist/esm/funcs/creditsPostCreditsCoinbase.d.ts.map +1 -0
- package/dist/esm/funcs/{postCreditsCoinbase.js → creditsPostCreditsCoinbase.js} +2 -2
- package/dist/esm/funcs/creditsPostCreditsCoinbase.js.map +1 -0
- package/dist/esm/funcs/{embeddingsPostEmbeddings.d.ts → embeddingsGenerate.d.ts} +2 -2
- package/dist/esm/funcs/embeddingsGenerate.d.ts.map +1 -0
- package/dist/esm/funcs/{embeddingsPostEmbeddings.js → embeddingsGenerate.js} +2 -2
- package/dist/esm/funcs/embeddingsGenerate.js.map +1 -0
- package/dist/{commonjs/funcs/parametersGetParametersAuthorSlug.d.ts → esm/funcs/modelGetParametersAuthorSlug.d.ts} +2 -2
- package/dist/esm/funcs/modelGetParametersAuthorSlug.d.ts.map +1 -0
- package/dist/esm/funcs/{parametersGetParametersAuthorSlug.js → modelGetParametersAuthorSlug.js} +2 -2
- package/dist/esm/funcs/modelGetParametersAuthorSlug.js.map +1 -0
- package/dist/esm/funcs/oAuthPostAuthKeys.d.ts +17 -0
- package/dist/esm/funcs/oAuthPostAuthKeys.d.ts.map +1 -0
- package/dist/esm/funcs/oAuthPostAuthKeys.js +80 -0
- package/dist/esm/funcs/oAuthPostAuthKeys.js.map +1 -0
- package/dist/esm/funcs/oAuthPostAuthKeysCode.d.ts +17 -0
- package/dist/esm/funcs/oAuthPostAuthKeysCode.d.ts.map +1 -0
- package/dist/esm/funcs/oAuthPostAuthKeysCode.js +80 -0
- package/dist/esm/funcs/oAuthPostAuthKeysCode.js.map +1 -0
- package/dist/{commonjs/funcs/getProviders.d.ts → esm/funcs/providersGetProviders.d.ts} +5 -2
- package/dist/esm/funcs/providersGetProviders.d.ts.map +1 -0
- package/dist/esm/funcs/{getProviders.js → providersGetProviders.js} +5 -2
- package/dist/esm/funcs/providersGetProviders.js.map +1 -0
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/models/operations/index.d.ts +2 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +2 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/postauthkeys.d.ts +132 -0
- package/dist/esm/models/operations/postauthkeys.d.ts.map +1 -0
- package/dist/esm/models/operations/postauthkeys.js +133 -0
- package/dist/esm/models/operations/postauthkeys.js.map +1 -0
- package/dist/esm/models/operations/postauthkeyscode.d.ts +167 -0
- package/dist/esm/models/operations/postauthkeyscode.d.ts.map +1 -0
- package/dist/esm/models/operations/postauthkeyscode.js +166 -0
- package/dist/esm/models/operations/postauthkeyscode.js.map +1 -0
- package/dist/esm/react-query/creditsPostCreditsCoinbase.d.ts +21 -0
- package/dist/esm/react-query/creditsPostCreditsCoinbase.d.ts.map +1 -0
- package/dist/esm/react-query/{postCreditsCoinbase.js → creditsPostCreditsCoinbase.js} +10 -10
- package/dist/esm/react-query/creditsPostCreditsCoinbase.js.map +1 -0
- package/dist/esm/react-query/embeddingsGenerate.d.ts +23 -0
- package/dist/esm/react-query/embeddingsGenerate.d.ts.map +1 -0
- package/dist/esm/react-query/{embeddingsPostEmbeddings.js → embeddingsGenerate.js} +10 -10
- package/dist/esm/react-query/embeddingsGenerate.js.map +1 -0
- package/dist/esm/react-query/index.d.ts +6 -4
- package/dist/esm/react-query/index.d.ts.map +1 -1
- package/dist/esm/react-query/index.js +6 -4
- package/dist/esm/react-query/index.js.map +1 -1
- package/dist/esm/react-query/modelGetParametersAuthorSlug.d.ts +38 -0
- package/dist/esm/react-query/modelGetParametersAuthorSlug.d.ts.map +1 -0
- package/dist/esm/react-query/modelGetParametersAuthorSlug.js +78 -0
- package/dist/esm/react-query/modelGetParametersAuthorSlug.js.map +1 -0
- package/dist/esm/react-query/oAuthPostAuthKeys.d.ts +23 -0
- package/dist/esm/react-query/oAuthPostAuthKeys.d.ts.map +1 -0
- package/dist/esm/react-query/oAuthPostAuthKeys.js +42 -0
- package/dist/esm/react-query/oAuthPostAuthKeys.js.map +1 -0
- package/dist/esm/react-query/oAuthPostAuthKeysCode.d.ts +23 -0
- package/dist/esm/react-query/oAuthPostAuthKeysCode.d.ts.map +1 -0
- package/dist/esm/react-query/oAuthPostAuthKeysCode.js +42 -0
- package/dist/esm/react-query/oAuthPostAuthKeysCode.js.map +1 -0
- package/dist/esm/react-query/providersGetProviders.d.ts +23 -0
- package/dist/esm/react-query/providersGetProviders.d.ts.map +1 -0
- package/dist/esm/react-query/providersGetProviders.js +60 -0
- package/dist/esm/react-query/providersGetProviders.js.map +1 -0
- package/dist/esm/sdk/credits.d.ts +9 -0
- package/dist/esm/sdk/credits.d.ts.map +1 -0
- package/dist/esm/sdk/credits.js +15 -0
- package/dist/esm/sdk/credits.js.map +1 -0
- package/dist/esm/sdk/embeddings.d.ts +1 -1
- package/dist/esm/sdk/embeddings.d.ts.map +1 -1
- package/dist/esm/sdk/embeddings.js +3 -3
- package/dist/esm/sdk/embeddings.js.map +1 -1
- package/dist/esm/sdk/{parameters.d.ts → model.d.ts} +2 -2
- package/dist/esm/sdk/model.d.ts.map +1 -0
- package/dist/esm/sdk/{parameters.js → model.js} +4 -4
- package/dist/esm/sdk/model.js.map +1 -0
- package/dist/esm/sdk/oauth.d.ts +19 -0
- package/dist/esm/sdk/oauth.d.ts.map +1 -0
- package/dist/esm/sdk/oauth.js +28 -0
- package/dist/esm/sdk/oauth.js.map +1 -0
- package/dist/esm/sdk/providers.d.ts +9 -0
- package/dist/esm/sdk/providers.d.ts.map +1 -0
- package/dist/esm/sdk/providers.js +15 -0
- package/dist/esm/sdk/providers.js.map +1 -0
- package/dist/esm/sdk/sdk.d.ts +12 -8
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +15 -14
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/docs/sdks/credits/README.md +95 -0
- package/docs/sdks/embeddings/README.md +8 -8
- package/docs/sdks/{parameters → model}/README.md +12 -12
- package/docs/sdks/oauth/README.md +199 -0
- package/docs/sdks/openrouter/README.md +0 -183
- package/docs/sdks/providers/README.md +104 -0
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/{postCreditsCoinbase.ts → creditsPostCreditsCoinbase.ts} +1 -1
- package/src/funcs/{embeddingsPostEmbeddings.ts → embeddingsGenerate.ts} +1 -1
- package/src/funcs/{parametersGetParametersAuthorSlug.ts → modelGetParametersAuthorSlug.ts} +1 -1
- package/src/funcs/oAuthPostAuthKeys.ts +164 -0
- package/src/funcs/oAuthPostAuthKeysCode.ts +164 -0
- package/src/funcs/{getProviders.ts → providersGetProviders.ts} +4 -1
- package/src/lib/config.ts +3 -3
- package/src/models/operations/index.ts +2 -0
- package/src/models/operations/postauthkeys.ts +272 -0
- package/src/models/operations/postauthkeyscode.ts +352 -0
- package/src/react-query/{postCreditsCoinbase.ts → creditsPostCreditsCoinbase.ts} +18 -18
- package/src/react-query/{embeddingsPostEmbeddings.ts → embeddingsGenerate.ts} +18 -19
- package/src/react-query/index.ts +6 -4
- package/src/react-query/{parametersGetParametersAuthorSlug.ts → modelGetParametersAuthorSlug.ts} +29 -34
- package/src/react-query/oAuthPostAuthKeys.ts +88 -0
- package/src/react-query/oAuthPostAuthKeysCode.ts +89 -0
- package/src/react-query/{getProviders.ts → providersGetProviders.ts} +35 -27
- package/src/sdk/credits.ts +26 -0
- package/src/sdk/embeddings.ts +3 -3
- package/src/sdk/{parameters.ts → model.ts} +3 -3
- package/src/sdk/oauth.ts +45 -0
- package/src/sdk/providers.ts +22 -0
- package/src/sdk/sdk.ts +22 -31
- package/dist/commonjs/funcs/embeddingsPostEmbeddings.d.ts.map +0 -1
- package/dist/commonjs/funcs/embeddingsPostEmbeddings.js.map +0 -1
- package/dist/commonjs/funcs/getProviders.d.ts.map +0 -1
- package/dist/commonjs/funcs/getProviders.js.map +0 -1
- package/dist/commonjs/funcs/parametersGetParametersAuthorSlug.d.ts.map +0 -1
- package/dist/commonjs/funcs/parametersGetParametersAuthorSlug.js.map +0 -1
- package/dist/commonjs/funcs/postCreditsCoinbase.d.ts.map +0 -1
- package/dist/commonjs/funcs/postCreditsCoinbase.js.map +0 -1
- package/dist/commonjs/react-query/embeddingsPostEmbeddings.d.ts +0 -23
- package/dist/commonjs/react-query/embeddingsPostEmbeddings.d.ts.map +0 -1
- package/dist/commonjs/react-query/embeddingsPostEmbeddings.js.map +0 -1
- package/dist/commonjs/react-query/getProviders.d.ts +0 -17
- package/dist/commonjs/react-query/getProviders.d.ts.map +0 -1
- package/dist/commonjs/react-query/getProviders.js +0 -63
- package/dist/commonjs/react-query/getProviders.js.map +0 -1
- package/dist/commonjs/react-query/parametersGetParametersAuthorSlug.d.ts +0 -38
- package/dist/commonjs/react-query/parametersGetParametersAuthorSlug.d.ts.map +0 -1
- package/dist/commonjs/react-query/parametersGetParametersAuthorSlug.js +0 -88
- package/dist/commonjs/react-query/parametersGetParametersAuthorSlug.js.map +0 -1
- package/dist/commonjs/react-query/postCreditsCoinbase.d.ts +0 -21
- package/dist/commonjs/react-query/postCreditsCoinbase.d.ts.map +0 -1
- package/dist/commonjs/react-query/postCreditsCoinbase.js +0 -44
- package/dist/commonjs/react-query/postCreditsCoinbase.js.map +0 -1
- package/dist/commonjs/sdk/parameters.d.ts.map +0 -1
- package/dist/commonjs/sdk/parameters.js +0 -19
- package/dist/commonjs/sdk/parameters.js.map +0 -1
- package/dist/esm/funcs/embeddingsPostEmbeddings.d.ts.map +0 -1
- package/dist/esm/funcs/embeddingsPostEmbeddings.js.map +0 -1
- package/dist/esm/funcs/getProviders.d.ts.map +0 -1
- package/dist/esm/funcs/getProviders.js.map +0 -1
- package/dist/esm/funcs/parametersGetParametersAuthorSlug.d.ts.map +0 -1
- package/dist/esm/funcs/parametersGetParametersAuthorSlug.js.map +0 -1
- package/dist/esm/funcs/postCreditsCoinbase.d.ts.map +0 -1
- package/dist/esm/funcs/postCreditsCoinbase.js.map +0 -1
- package/dist/esm/react-query/embeddingsPostEmbeddings.d.ts +0 -23
- package/dist/esm/react-query/embeddingsPostEmbeddings.d.ts.map +0 -1
- package/dist/esm/react-query/embeddingsPostEmbeddings.js.map +0 -1
- package/dist/esm/react-query/getProviders.d.ts +0 -17
- package/dist/esm/react-query/getProviders.d.ts.map +0 -1
- package/dist/esm/react-query/getProviders.js +0 -54
- package/dist/esm/react-query/getProviders.js.map +0 -1
- package/dist/esm/react-query/parametersGetParametersAuthorSlug.d.ts +0 -38
- package/dist/esm/react-query/parametersGetParametersAuthorSlug.d.ts.map +0 -1
- package/dist/esm/react-query/parametersGetParametersAuthorSlug.js +0 -78
- package/dist/esm/react-query/parametersGetParametersAuthorSlug.js.map +0 -1
- package/dist/esm/react-query/postCreditsCoinbase.d.ts +0 -21
- package/dist/esm/react-query/postCreditsCoinbase.d.ts.map +0 -1
- package/dist/esm/react-query/postCreditsCoinbase.js.map +0 -1
- package/dist/esm/sdk/parameters.d.ts.map +0 -1
- package/dist/esm/sdk/parameters.js.map +0 -1
package/src/react-query/{parametersGetParametersAuthorSlug.ts → modelGetParametersAuthorSlug.ts}
RENAMED
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
UseSuspenseQueryResult,
|
|
14
14
|
} from "@tanstack/react-query";
|
|
15
15
|
import { OpenRouterCore } from "../core.js";
|
|
16
|
-
import {
|
|
16
|
+
import { modelGetParametersAuthorSlug } from "../funcs/modelGetParametersAuthorSlug.js";
|
|
17
17
|
import { combineSignals } from "../lib/primitives.js";
|
|
18
18
|
import { RequestOptions } from "../lib/sdks.js";
|
|
19
19
|
import * as operations from "../models/operations/index.js";
|
|
@@ -25,20 +25,20 @@ import {
|
|
|
25
25
|
TupleToPrefixes,
|
|
26
26
|
} from "./_types.js";
|
|
27
27
|
|
|
28
|
-
export type
|
|
28
|
+
export type ModelGetParametersAuthorSlugQueryData =
|
|
29
29
|
operations.GetParametersAuthorSlugResponse;
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
32
|
* Get a model's supported parameters and data about which are most popular
|
|
33
33
|
*/
|
|
34
|
-
export function
|
|
34
|
+
export function useModelGetParametersAuthorSlug(
|
|
35
35
|
security: operations.GetParametersAuthorSlugSecurity,
|
|
36
36
|
request: operations.GetParametersAuthorSlugRequest,
|
|
37
|
-
options?: QueryHookOptions<
|
|
38
|
-
): UseQueryResult<
|
|
37
|
+
options?: QueryHookOptions<ModelGetParametersAuthorSlugQueryData>,
|
|
38
|
+
): UseQueryResult<ModelGetParametersAuthorSlugQueryData, Error> {
|
|
39
39
|
const client = useOpenRouterContext();
|
|
40
40
|
return useQuery({
|
|
41
|
-
...
|
|
41
|
+
...buildModelGetParametersAuthorSlugQuery(
|
|
42
42
|
client,
|
|
43
43
|
security,
|
|
44
44
|
request,
|
|
@@ -51,16 +51,14 @@ export function useParametersGetParametersAuthorSlug(
|
|
|
51
51
|
/**
|
|
52
52
|
* Get a model's supported parameters and data about which are most popular
|
|
53
53
|
*/
|
|
54
|
-
export function
|
|
54
|
+
export function useModelGetParametersAuthorSlugSuspense(
|
|
55
55
|
security: operations.GetParametersAuthorSlugSecurity,
|
|
56
56
|
request: operations.GetParametersAuthorSlugRequest,
|
|
57
|
-
options?: SuspenseQueryHookOptions<
|
|
58
|
-
|
|
59
|
-
>,
|
|
60
|
-
): UseSuspenseQueryResult<ParametersGetParametersAuthorSlugQueryData, Error> {
|
|
57
|
+
options?: SuspenseQueryHookOptions<ModelGetParametersAuthorSlugQueryData>,
|
|
58
|
+
): UseSuspenseQueryResult<ModelGetParametersAuthorSlugQueryData, Error> {
|
|
61
59
|
const client = useOpenRouterContext();
|
|
62
60
|
return useSuspenseQuery({
|
|
63
|
-
...
|
|
61
|
+
...buildModelGetParametersAuthorSlugQuery(
|
|
64
62
|
client,
|
|
65
63
|
security,
|
|
66
64
|
request,
|
|
@@ -70,14 +68,14 @@ export function useParametersGetParametersAuthorSlugSuspense(
|
|
|
70
68
|
});
|
|
71
69
|
}
|
|
72
70
|
|
|
73
|
-
export function
|
|
71
|
+
export function prefetchModelGetParametersAuthorSlug(
|
|
74
72
|
queryClient: QueryClient,
|
|
75
73
|
client$: OpenRouterCore,
|
|
76
74
|
security: operations.GetParametersAuthorSlugSecurity,
|
|
77
75
|
request: operations.GetParametersAuthorSlugRequest,
|
|
78
76
|
): Promise<void> {
|
|
79
77
|
return queryClient.prefetchQuery({
|
|
80
|
-
...
|
|
78
|
+
...buildModelGetParametersAuthorSlugQuery(
|
|
81
79
|
client$,
|
|
82
80
|
security,
|
|
83
81
|
request,
|
|
@@ -85,7 +83,7 @@ export function prefetchParametersGetParametersAuthorSlug(
|
|
|
85
83
|
});
|
|
86
84
|
}
|
|
87
85
|
|
|
88
|
-
export function
|
|
86
|
+
export function setModelGetParametersAuthorSlugData(
|
|
89
87
|
client: QueryClient,
|
|
90
88
|
queryKeyBase: [
|
|
91
89
|
author: string,
|
|
@@ -94,17 +92,14 @@ export function setParametersGetParametersAuthorSlugData(
|
|
|
94
92
|
provider?: operations.GetParametersAuthorSlugProvider | undefined;
|
|
95
93
|
},
|
|
96
94
|
],
|
|
97
|
-
data:
|
|
98
|
-
):
|
|
99
|
-
const key =
|
|
95
|
+
data: ModelGetParametersAuthorSlugQueryData,
|
|
96
|
+
): ModelGetParametersAuthorSlugQueryData | undefined {
|
|
97
|
+
const key = queryKeyModelGetParametersAuthorSlug(...queryKeyBase);
|
|
100
98
|
|
|
101
|
-
return client.setQueryData<
|
|
102
|
-
key,
|
|
103
|
-
data,
|
|
104
|
-
);
|
|
99
|
+
return client.setQueryData<ModelGetParametersAuthorSlugQueryData>(key, data);
|
|
105
100
|
}
|
|
106
101
|
|
|
107
|
-
export function
|
|
102
|
+
export function invalidateModelGetParametersAuthorSlug(
|
|
108
103
|
client: QueryClient,
|
|
109
104
|
queryKeyBase: TupleToPrefixes<
|
|
110
105
|
[
|
|
@@ -121,24 +116,24 @@ export function invalidateParametersGetParametersAuthorSlug(
|
|
|
121
116
|
...filters,
|
|
122
117
|
queryKey: [
|
|
123
118
|
"@openrouter/sdk",
|
|
124
|
-
"
|
|
119
|
+
"Model",
|
|
125
120
|
"getParametersAuthorSlug",
|
|
126
121
|
...queryKeyBase,
|
|
127
122
|
],
|
|
128
123
|
});
|
|
129
124
|
}
|
|
130
125
|
|
|
131
|
-
export function
|
|
126
|
+
export function invalidateAllModelGetParametersAuthorSlug(
|
|
132
127
|
client: QueryClient,
|
|
133
128
|
filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">,
|
|
134
129
|
): Promise<void> {
|
|
135
130
|
return client.invalidateQueries({
|
|
136
131
|
...filters,
|
|
137
|
-
queryKey: ["@openrouter/sdk", "
|
|
132
|
+
queryKey: ["@openrouter/sdk", "Model", "getParametersAuthorSlug"],
|
|
138
133
|
});
|
|
139
134
|
}
|
|
140
135
|
|
|
141
|
-
export function
|
|
136
|
+
export function buildModelGetParametersAuthorSlugQuery(
|
|
142
137
|
client$: OpenRouterCore,
|
|
143
138
|
security: operations.GetParametersAuthorSlugSecurity,
|
|
144
139
|
request: operations.GetParametersAuthorSlugRequest,
|
|
@@ -147,24 +142,24 @@ export function buildParametersGetParametersAuthorSlugQuery(
|
|
|
147
142
|
queryKey: QueryKey;
|
|
148
143
|
queryFn: (
|
|
149
144
|
context: QueryFunctionContext,
|
|
150
|
-
) => Promise<
|
|
145
|
+
) => Promise<ModelGetParametersAuthorSlugQueryData>;
|
|
151
146
|
} {
|
|
152
147
|
return {
|
|
153
|
-
queryKey:
|
|
148
|
+
queryKey: queryKeyModelGetParametersAuthorSlug(
|
|
154
149
|
request.author,
|
|
155
150
|
request.slug,
|
|
156
151
|
{ provider: request.provider },
|
|
157
152
|
),
|
|
158
|
-
queryFn: async function
|
|
153
|
+
queryFn: async function modelGetParametersAuthorSlugQueryFn(
|
|
159
154
|
ctx,
|
|
160
|
-
): Promise<
|
|
155
|
+
): Promise<ModelGetParametersAuthorSlugQueryData> {
|
|
161
156
|
const sig = combineSignals(ctx.signal, options?.fetchOptions?.signal);
|
|
162
157
|
const mergedOptions = {
|
|
163
158
|
...options,
|
|
164
159
|
fetchOptions: { ...options?.fetchOptions, signal: sig },
|
|
165
160
|
};
|
|
166
161
|
|
|
167
|
-
return unwrapAsync(
|
|
162
|
+
return unwrapAsync(modelGetParametersAuthorSlug(
|
|
168
163
|
client$,
|
|
169
164
|
security,
|
|
170
165
|
request,
|
|
@@ -174,7 +169,7 @@ export function buildParametersGetParametersAuthorSlugQuery(
|
|
|
174
169
|
};
|
|
175
170
|
}
|
|
176
171
|
|
|
177
|
-
export function
|
|
172
|
+
export function queryKeyModelGetParametersAuthorSlug(
|
|
178
173
|
author: string,
|
|
179
174
|
slug: string,
|
|
180
175
|
parameters: {
|
|
@@ -183,7 +178,7 @@ export function queryKeyParametersGetParametersAuthorSlug(
|
|
|
183
178
|
): QueryKey {
|
|
184
179
|
return [
|
|
185
180
|
"@openrouter/sdk",
|
|
186
|
-
"
|
|
181
|
+
"Model",
|
|
187
182
|
"getParametersAuthorSlug",
|
|
188
183
|
author,
|
|
189
184
|
slug,
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
MutationKey,
|
|
7
|
+
useMutation,
|
|
8
|
+
UseMutationResult,
|
|
9
|
+
} from "@tanstack/react-query";
|
|
10
|
+
import { OpenRouterCore } from "../core.js";
|
|
11
|
+
import { oAuthPostAuthKeys } from "../funcs/oAuthPostAuthKeys.js";
|
|
12
|
+
import { combineSignals } from "../lib/primitives.js";
|
|
13
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
14
|
+
import * as operations from "../models/operations/index.js";
|
|
15
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
16
|
+
import { useOpenRouterContext } from "./_context.js";
|
|
17
|
+
import { MutationHookOptions } from "./_types.js";
|
|
18
|
+
|
|
19
|
+
export type OAuthPostAuthKeysMutationVariables = {
|
|
20
|
+
request?: operations.PostAuthKeysRequest | undefined;
|
|
21
|
+
options?: RequestOptions;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export type OAuthPostAuthKeysMutationData = operations.PostAuthKeysResponse;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Exchange authorization code for API key
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* Exchange an authorization code from the PKCE flow for a user-controlled API key
|
|
31
|
+
*/
|
|
32
|
+
export function useOAuthPostAuthKeysMutation(
|
|
33
|
+
options?: MutationHookOptions<
|
|
34
|
+
OAuthPostAuthKeysMutationData,
|
|
35
|
+
Error,
|
|
36
|
+
OAuthPostAuthKeysMutationVariables
|
|
37
|
+
>,
|
|
38
|
+
): UseMutationResult<
|
|
39
|
+
OAuthPostAuthKeysMutationData,
|
|
40
|
+
Error,
|
|
41
|
+
OAuthPostAuthKeysMutationVariables
|
|
42
|
+
> {
|
|
43
|
+
const client = useOpenRouterContext();
|
|
44
|
+
return useMutation({
|
|
45
|
+
...buildOAuthPostAuthKeysMutation(client, options),
|
|
46
|
+
...options,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function mutationKeyOAuthPostAuthKeys(): MutationKey {
|
|
51
|
+
return ["@openrouter/sdk", "OAuth", "postAuthKeys"];
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function buildOAuthPostAuthKeysMutation(
|
|
55
|
+
client$: OpenRouterCore,
|
|
56
|
+
hookOptions?: RequestOptions,
|
|
57
|
+
): {
|
|
58
|
+
mutationKey: MutationKey;
|
|
59
|
+
mutationFn: (
|
|
60
|
+
variables: OAuthPostAuthKeysMutationVariables,
|
|
61
|
+
) => Promise<OAuthPostAuthKeysMutationData>;
|
|
62
|
+
} {
|
|
63
|
+
return {
|
|
64
|
+
mutationKey: mutationKeyOAuthPostAuthKeys(),
|
|
65
|
+
mutationFn: function oAuthPostAuthKeysMutationFn({
|
|
66
|
+
request,
|
|
67
|
+
options,
|
|
68
|
+
}): Promise<OAuthPostAuthKeysMutationData> {
|
|
69
|
+
const mergedOptions = {
|
|
70
|
+
...hookOptions,
|
|
71
|
+
...options,
|
|
72
|
+
fetchOptions: {
|
|
73
|
+
...hookOptions?.fetchOptions,
|
|
74
|
+
...options?.fetchOptions,
|
|
75
|
+
signal: combineSignals(
|
|
76
|
+
hookOptions?.fetchOptions?.signal,
|
|
77
|
+
options?.fetchOptions?.signal,
|
|
78
|
+
),
|
|
79
|
+
},
|
|
80
|
+
};
|
|
81
|
+
return unwrapAsync(oAuthPostAuthKeys(
|
|
82
|
+
client$,
|
|
83
|
+
request,
|
|
84
|
+
mergedOptions,
|
|
85
|
+
));
|
|
86
|
+
},
|
|
87
|
+
};
|
|
88
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
MutationKey,
|
|
7
|
+
useMutation,
|
|
8
|
+
UseMutationResult,
|
|
9
|
+
} from "@tanstack/react-query";
|
|
10
|
+
import { OpenRouterCore } from "../core.js";
|
|
11
|
+
import { oAuthPostAuthKeysCode } from "../funcs/oAuthPostAuthKeysCode.js";
|
|
12
|
+
import { combineSignals } from "../lib/primitives.js";
|
|
13
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
14
|
+
import * as operations from "../models/operations/index.js";
|
|
15
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
16
|
+
import { useOpenRouterContext } from "./_context.js";
|
|
17
|
+
import { MutationHookOptions } from "./_types.js";
|
|
18
|
+
|
|
19
|
+
export type OAuthPostAuthKeysCodeMutationVariables = {
|
|
20
|
+
request?: operations.PostAuthKeysCodeRequest | undefined;
|
|
21
|
+
options?: RequestOptions;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export type OAuthPostAuthKeysCodeMutationData =
|
|
25
|
+
operations.PostAuthKeysCodeResponse;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Create authorization code
|
|
29
|
+
*
|
|
30
|
+
* @remarks
|
|
31
|
+
* Create an authorization code for the PKCE flow to generate a user-controlled API key
|
|
32
|
+
*/
|
|
33
|
+
export function useOAuthPostAuthKeysCodeMutation(
|
|
34
|
+
options?: MutationHookOptions<
|
|
35
|
+
OAuthPostAuthKeysCodeMutationData,
|
|
36
|
+
Error,
|
|
37
|
+
OAuthPostAuthKeysCodeMutationVariables
|
|
38
|
+
>,
|
|
39
|
+
): UseMutationResult<
|
|
40
|
+
OAuthPostAuthKeysCodeMutationData,
|
|
41
|
+
Error,
|
|
42
|
+
OAuthPostAuthKeysCodeMutationVariables
|
|
43
|
+
> {
|
|
44
|
+
const client = useOpenRouterContext();
|
|
45
|
+
return useMutation({
|
|
46
|
+
...buildOAuthPostAuthKeysCodeMutation(client, options),
|
|
47
|
+
...options,
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function mutationKeyOAuthPostAuthKeysCode(): MutationKey {
|
|
52
|
+
return ["@openrouter/sdk", "OAuth", "postAuthKeysCode"];
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function buildOAuthPostAuthKeysCodeMutation(
|
|
56
|
+
client$: OpenRouterCore,
|
|
57
|
+
hookOptions?: RequestOptions,
|
|
58
|
+
): {
|
|
59
|
+
mutationKey: MutationKey;
|
|
60
|
+
mutationFn: (
|
|
61
|
+
variables: OAuthPostAuthKeysCodeMutationVariables,
|
|
62
|
+
) => Promise<OAuthPostAuthKeysCodeMutationData>;
|
|
63
|
+
} {
|
|
64
|
+
return {
|
|
65
|
+
mutationKey: mutationKeyOAuthPostAuthKeysCode(),
|
|
66
|
+
mutationFn: function oAuthPostAuthKeysCodeMutationFn({
|
|
67
|
+
request,
|
|
68
|
+
options,
|
|
69
|
+
}): Promise<OAuthPostAuthKeysCodeMutationData> {
|
|
70
|
+
const mergedOptions = {
|
|
71
|
+
...hookOptions,
|
|
72
|
+
...options,
|
|
73
|
+
fetchOptions: {
|
|
74
|
+
...hookOptions?.fetchOptions,
|
|
75
|
+
...options?.fetchOptions,
|
|
76
|
+
signal: combineSignals(
|
|
77
|
+
hookOptions?.fetchOptions?.signal,
|
|
78
|
+
options?.fetchOptions?.signal,
|
|
79
|
+
),
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
return unwrapAsync(oAuthPostAuthKeysCode(
|
|
83
|
+
client$,
|
|
84
|
+
request,
|
|
85
|
+
mergedOptions,
|
|
86
|
+
));
|
|
87
|
+
},
|
|
88
|
+
};
|
|
89
|
+
}
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
UseSuspenseQueryResult,
|
|
14
14
|
} from "@tanstack/react-query";
|
|
15
15
|
import { OpenRouterCore } from "../core.js";
|
|
16
|
-
import {
|
|
16
|
+
import { providersGetProviders } from "../funcs/providersGetProviders.js";
|
|
17
17
|
import { combineSignals } from "../lib/primitives.js";
|
|
18
18
|
import { RequestOptions } from "../lib/sdks.js";
|
|
19
19
|
import * as operations from "../models/operations/index.js";
|
|
@@ -21,14 +21,17 @@ import { unwrapAsync } from "../types/fp.js";
|
|
|
21
21
|
import { useOpenRouterContext } from "./_context.js";
|
|
22
22
|
import { QueryHookOptions, SuspenseQueryHookOptions } from "./_types.js";
|
|
23
23
|
|
|
24
|
-
export type
|
|
24
|
+
export type ProvidersGetProvidersQueryData = operations.GetProvidersResponse;
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
/**
|
|
27
|
+
* List all available model providers
|
|
28
|
+
*/
|
|
29
|
+
export function useProvidersGetProviders(
|
|
30
|
+
options?: QueryHookOptions<ProvidersGetProvidersQueryData>,
|
|
31
|
+
): UseQueryResult<ProvidersGetProvidersQueryData, Error> {
|
|
29
32
|
const client = useOpenRouterContext();
|
|
30
33
|
return useQuery({
|
|
31
|
-
...
|
|
34
|
+
...buildProvidersGetProvidersQuery(
|
|
32
35
|
client,
|
|
33
36
|
options,
|
|
34
37
|
),
|
|
@@ -36,12 +39,15 @@ export function useGetProviders(
|
|
|
36
39
|
});
|
|
37
40
|
}
|
|
38
41
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
+
/**
|
|
43
|
+
* List all available model providers
|
|
44
|
+
*/
|
|
45
|
+
export function useProvidersGetProvidersSuspense(
|
|
46
|
+
options?: SuspenseQueryHookOptions<ProvidersGetProvidersQueryData>,
|
|
47
|
+
): UseSuspenseQueryResult<ProvidersGetProvidersQueryData, Error> {
|
|
42
48
|
const client = useOpenRouterContext();
|
|
43
49
|
return useSuspenseQuery({
|
|
44
|
-
...
|
|
50
|
+
...buildProvidersGetProvidersQuery(
|
|
45
51
|
client,
|
|
46
52
|
options,
|
|
47
53
|
),
|
|
@@ -49,55 +55,57 @@ export function useGetProvidersSuspense(
|
|
|
49
55
|
});
|
|
50
56
|
}
|
|
51
57
|
|
|
52
|
-
export function
|
|
58
|
+
export function prefetchProvidersGetProviders(
|
|
53
59
|
queryClient: QueryClient,
|
|
54
60
|
client$: OpenRouterCore,
|
|
55
61
|
): Promise<void> {
|
|
56
62
|
return queryClient.prefetchQuery({
|
|
57
|
-
...
|
|
63
|
+
...buildProvidersGetProvidersQuery(
|
|
58
64
|
client$,
|
|
59
65
|
),
|
|
60
66
|
});
|
|
61
67
|
}
|
|
62
68
|
|
|
63
|
-
export function
|
|
69
|
+
export function setProvidersGetProvidersData(
|
|
64
70
|
client: QueryClient,
|
|
65
|
-
data:
|
|
66
|
-
):
|
|
67
|
-
const key =
|
|
71
|
+
data: ProvidersGetProvidersQueryData,
|
|
72
|
+
): ProvidersGetProvidersQueryData | undefined {
|
|
73
|
+
const key = queryKeyProvidersGetProviders();
|
|
68
74
|
|
|
69
|
-
return client.setQueryData<
|
|
75
|
+
return client.setQueryData<ProvidersGetProvidersQueryData>(key, data);
|
|
70
76
|
}
|
|
71
77
|
|
|
72
|
-
export function
|
|
78
|
+
export function invalidateAllProvidersGetProviders(
|
|
73
79
|
client: QueryClient,
|
|
74
80
|
filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">,
|
|
75
81
|
): Promise<void> {
|
|
76
82
|
return client.invalidateQueries({
|
|
77
83
|
...filters,
|
|
78
|
-
queryKey: ["@openrouter/sdk", "getProviders"],
|
|
84
|
+
queryKey: ["@openrouter/sdk", "Providers", "getProviders"],
|
|
79
85
|
});
|
|
80
86
|
}
|
|
81
87
|
|
|
82
|
-
export function
|
|
88
|
+
export function buildProvidersGetProvidersQuery(
|
|
83
89
|
client$: OpenRouterCore,
|
|
84
90
|
options?: RequestOptions,
|
|
85
91
|
): {
|
|
86
92
|
queryKey: QueryKey;
|
|
87
|
-
queryFn: (
|
|
93
|
+
queryFn: (
|
|
94
|
+
context: QueryFunctionContext,
|
|
95
|
+
) => Promise<ProvidersGetProvidersQueryData>;
|
|
88
96
|
} {
|
|
89
97
|
return {
|
|
90
|
-
queryKey:
|
|
91
|
-
queryFn: async function
|
|
98
|
+
queryKey: queryKeyProvidersGetProviders(),
|
|
99
|
+
queryFn: async function providersGetProvidersQueryFn(
|
|
92
100
|
ctx,
|
|
93
|
-
): Promise<
|
|
101
|
+
): Promise<ProvidersGetProvidersQueryData> {
|
|
94
102
|
const sig = combineSignals(ctx.signal, options?.fetchOptions?.signal);
|
|
95
103
|
const mergedOptions = {
|
|
96
104
|
...options,
|
|
97
105
|
fetchOptions: { ...options?.fetchOptions, signal: sig },
|
|
98
106
|
};
|
|
99
107
|
|
|
100
|
-
return unwrapAsync(
|
|
108
|
+
return unwrapAsync(providersGetProviders(
|
|
101
109
|
client$,
|
|
102
110
|
mergedOptions,
|
|
103
111
|
));
|
|
@@ -105,6 +113,6 @@ export function buildGetProvidersQuery(
|
|
|
105
113
|
};
|
|
106
114
|
}
|
|
107
115
|
|
|
108
|
-
export function
|
|
109
|
-
return ["@openrouter/sdk", "getProviders"];
|
|
116
|
+
export function queryKeyProvidersGetProviders(): QueryKey {
|
|
117
|
+
return ["@openrouter/sdk", "Providers", "getProviders"];
|
|
110
118
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { creditsPostCreditsCoinbase } from "../funcs/creditsPostCreditsCoinbase.js";
|
|
6
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
7
|
+
import * as operations from "../models/operations/index.js";
|
|
8
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
9
|
+
|
|
10
|
+
export class Credits extends ClientSDK {
|
|
11
|
+
/**
|
|
12
|
+
* Create a Coinbase charge for crypto payment
|
|
13
|
+
*/
|
|
14
|
+
async postCreditsCoinbase(
|
|
15
|
+
security: operations.PostCreditsCoinbaseSecurity,
|
|
16
|
+
request?: operations.PostCreditsCoinbaseRequest | undefined,
|
|
17
|
+
options?: RequestOptions,
|
|
18
|
+
): Promise<operations.PostCreditsCoinbaseResponse> {
|
|
19
|
+
return unwrapAsync(creditsPostCreditsCoinbase(
|
|
20
|
+
this,
|
|
21
|
+
security,
|
|
22
|
+
request,
|
|
23
|
+
options,
|
|
24
|
+
));
|
|
25
|
+
}
|
|
26
|
+
}
|
package/src/sdk/embeddings.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { embeddingsGenerate } from "../funcs/embeddingsGenerate.js";
|
|
6
6
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
7
7
|
import * as operations from "../models/operations/index.js";
|
|
8
8
|
import { unwrapAsync } from "../types/fp.js";
|
|
@@ -14,11 +14,11 @@ export class Embeddings extends ClientSDK {
|
|
|
14
14
|
* @remarks
|
|
15
15
|
* Submits an embedding request to the embeddings router
|
|
16
16
|
*/
|
|
17
|
-
async
|
|
17
|
+
async generate(
|
|
18
18
|
request?: operations.PostEmbeddingsRequest | undefined,
|
|
19
19
|
options?: RequestOptions,
|
|
20
20
|
): Promise<operations.PostEmbeddingsResponse> {
|
|
21
|
-
return unwrapAsync(
|
|
21
|
+
return unwrapAsync(embeddingsGenerate(
|
|
22
22
|
this,
|
|
23
23
|
request,
|
|
24
24
|
options,
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { modelGetParametersAuthorSlug } from "../funcs/modelGetParametersAuthorSlug.js";
|
|
6
6
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
7
7
|
import * as operations from "../models/operations/index.js";
|
|
8
8
|
import { unwrapAsync } from "../types/fp.js";
|
|
9
9
|
|
|
10
|
-
export class
|
|
10
|
+
export class Model extends ClientSDK {
|
|
11
11
|
/**
|
|
12
12
|
* Get a model's supported parameters and data about which are most popular
|
|
13
13
|
*/
|
|
@@ -16,7 +16,7 @@ export class ParametersT extends ClientSDK {
|
|
|
16
16
|
request: operations.GetParametersAuthorSlugRequest,
|
|
17
17
|
options?: RequestOptions,
|
|
18
18
|
): Promise<operations.GetParametersAuthorSlugResponse> {
|
|
19
|
-
return unwrapAsync(
|
|
19
|
+
return unwrapAsync(modelGetParametersAuthorSlug(
|
|
20
20
|
this,
|
|
21
21
|
security,
|
|
22
22
|
request,
|
package/src/sdk/oauth.ts
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { oAuthPostAuthKeys } from "../funcs/oAuthPostAuthKeys.js";
|
|
6
|
+
import { oAuthPostAuthKeysCode } from "../funcs/oAuthPostAuthKeysCode.js";
|
|
7
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
8
|
+
import * as operations from "../models/operations/index.js";
|
|
9
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
10
|
+
|
|
11
|
+
export class OAuth extends ClientSDK {
|
|
12
|
+
/**
|
|
13
|
+
* Exchange authorization code for API key
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* Exchange an authorization code from the PKCE flow for a user-controlled API key
|
|
17
|
+
*/
|
|
18
|
+
async postAuthKeys(
|
|
19
|
+
request?: operations.PostAuthKeysRequest | undefined,
|
|
20
|
+
options?: RequestOptions,
|
|
21
|
+
): Promise<operations.PostAuthKeysResponse> {
|
|
22
|
+
return unwrapAsync(oAuthPostAuthKeys(
|
|
23
|
+
this,
|
|
24
|
+
request,
|
|
25
|
+
options,
|
|
26
|
+
));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Create authorization code
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* Create an authorization code for the PKCE flow to generate a user-controlled API key
|
|
34
|
+
*/
|
|
35
|
+
async postAuthKeysCode(
|
|
36
|
+
request?: operations.PostAuthKeysCodeRequest | undefined,
|
|
37
|
+
options?: RequestOptions,
|
|
38
|
+
): Promise<operations.PostAuthKeysCodeResponse> {
|
|
39
|
+
return unwrapAsync(oAuthPostAuthKeysCode(
|
|
40
|
+
this,
|
|
41
|
+
request,
|
|
42
|
+
options,
|
|
43
|
+
));
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { providersGetProviders } from "../funcs/providersGetProviders.js";
|
|
6
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
7
|
+
import * as operations from "../models/operations/index.js";
|
|
8
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
9
|
+
|
|
10
|
+
export class Providers extends ClientSDK {
|
|
11
|
+
/**
|
|
12
|
+
* List all available model providers
|
|
13
|
+
*/
|
|
14
|
+
async getProviders(
|
|
15
|
+
options?: RequestOptions,
|
|
16
|
+
): Promise<operations.GetProvidersResponse> {
|
|
17
|
+
return unwrapAsync(providersGetProviders(
|
|
18
|
+
this,
|
|
19
|
+
options,
|
|
20
|
+
));
|
|
21
|
+
}
|
|
22
|
+
}
|