@openrouter/sdk 0.1.17 → 0.1.18

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 (63) hide show
  1. package/README.md +0 -8
  2. package/esm/lib/config.d.ts +10 -2
  3. package/esm/lib/config.js +2 -2
  4. package/esm/lib/env.d.ts +13 -0
  5. package/esm/lib/env.js +16 -0
  6. package/esm/lib/sdks.js +2 -2
  7. package/jsr.json +1 -1
  8. package/package.json +2 -16
  9. package/REACT_QUERY.md +0 -296
  10. package/esm/react-query/_context.d.ts +0 -8
  11. package/esm/react-query/_context.js +0 -14
  12. package/esm/react-query/_types.d.ts +0 -27
  13. package/esm/react-query/_types.js +0 -5
  14. package/esm/react-query/analyticsGetUserActivity.d.ts +0 -36
  15. package/esm/react-query/analyticsGetUserActivity.js +0 -77
  16. package/esm/react-query/apiKeysCreate.d.ts +0 -20
  17. package/esm/react-query/apiKeysCreate.js +0 -39
  18. package/esm/react-query/apiKeysDelete.d.ts +0 -20
  19. package/esm/react-query/apiKeysDelete.js +0 -39
  20. package/esm/react-query/apiKeysGet.d.ts +0 -24
  21. package/esm/react-query/apiKeysGet.js +0 -66
  22. package/esm/react-query/apiKeysGetCurrentKeyMetadata.d.ts +0 -29
  23. package/esm/react-query/apiKeysGetCurrentKeyMetadata.js +0 -66
  24. package/esm/react-query/apiKeysList.d.ts +0 -37
  25. package/esm/react-query/apiKeysList.js +0 -69
  26. package/esm/react-query/apiKeysUpdate.d.ts +0 -20
  27. package/esm/react-query/apiKeysUpdate.js +0 -39
  28. package/esm/react-query/betaResponsesSend.d.ts +0 -24
  29. package/esm/react-query/betaResponsesSend.js +0 -42
  30. package/esm/react-query/chatSend.d.ts +0 -24
  31. package/esm/react-query/chatSend.js +0 -42
  32. package/esm/react-query/completionsGenerate.d.ts +0 -23
  33. package/esm/react-query/completionsGenerate.js +0 -42
  34. package/esm/react-query/creditsCreateCoinbaseCharge.d.ts +0 -25
  35. package/esm/react-query/creditsCreateCoinbaseCharge.js +0 -42
  36. package/esm/react-query/creditsGetCredits.d.ts +0 -29
  37. package/esm/react-query/creditsGetCredits.js +0 -66
  38. package/esm/react-query/embeddingsGenerate.d.ts +0 -23
  39. package/esm/react-query/embeddingsGenerate.js +0 -42
  40. package/esm/react-query/embeddingsListModels.d.ts +0 -29
  41. package/esm/react-query/embeddingsListModels.js +0 -66
  42. package/esm/react-query/endpointsList.d.ts +0 -24
  43. package/esm/react-query/endpointsList.js +0 -66
  44. package/esm/react-query/endpointsListZdrEndpoints.d.ts +0 -23
  45. package/esm/react-query/endpointsListZdrEndpoints.js +0 -60
  46. package/esm/react-query/generationsGetGeneration.d.ts +0 -30
  47. package/esm/react-query/generationsGetGeneration.js +0 -71
  48. package/esm/react-query/index.d.ts +0 -27
  49. package/esm/react-query/index.js +0 -30
  50. package/esm/react-query/modelsCount.d.ts +0 -23
  51. package/esm/react-query/modelsCount.js +0 -60
  52. package/esm/react-query/modelsList.d.ts +0 -38
  53. package/esm/react-query/modelsList.js +0 -69
  54. package/esm/react-query/modelsListForUser.d.ts +0 -24
  55. package/esm/react-query/modelsListForUser.js +0 -60
  56. package/esm/react-query/oAuthCreateAuthCode.d.ts +0 -23
  57. package/esm/react-query/oAuthCreateAuthCode.js +0 -42
  58. package/esm/react-query/oAuthExchangeAuthCodeForAPIKey.d.ts +0 -23
  59. package/esm/react-query/oAuthExchangeAuthCodeForAPIKey.js +0 -42
  60. package/esm/react-query/parametersGetParameters.d.ts +0 -38
  61. package/esm/react-query/parametersGetParameters.js +0 -80
  62. package/esm/react-query/providersList.d.ts +0 -23
  63. package/esm/react-query/providersList.js +0 -60
@@ -1,60 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
- import { useQuery, useSuspenseQuery, } from "@tanstack/react-query";
5
- import { providersList } from "../funcs/providersList.js";
6
- import { combineSignals } from "../lib/primitives.js";
7
- import { unwrapAsync } from "../types/fp.js";
8
- import { useOpenRouterContext } from "./_context.js";
9
- /**
10
- * List all providers
11
- */
12
- export function useProvidersList(options) {
13
- const client = useOpenRouterContext();
14
- return useQuery({
15
- ...buildProvidersListQuery(client, options),
16
- ...options,
17
- });
18
- }
19
- /**
20
- * List all providers
21
- */
22
- export function useProvidersListSuspense(options) {
23
- const client = useOpenRouterContext();
24
- return useSuspenseQuery({
25
- ...buildProvidersListQuery(client, options),
26
- ...options,
27
- });
28
- }
29
- export function prefetchProvidersList(queryClient, client$) {
30
- return queryClient.prefetchQuery({
31
- ...buildProvidersListQuery(client$),
32
- });
33
- }
34
- export function setProvidersListData(client, data) {
35
- const key = queryKeyProvidersList();
36
- return client.setQueryData(key, data);
37
- }
38
- export function invalidateAllProvidersList(client, filters) {
39
- return client.invalidateQueries({
40
- ...filters,
41
- queryKey: ["@openrouter/sdk", "Providers", "list"],
42
- });
43
- }
44
- export function buildProvidersListQuery(client$, options) {
45
- return {
46
- queryKey: queryKeyProvidersList(),
47
- queryFn: async function providersListQueryFn(ctx) {
48
- const sig = combineSignals(ctx.signal, options?.fetchOptions?.signal);
49
- const mergedOptions = {
50
- ...options,
51
- fetchOptions: { ...options?.fetchOptions, signal: sig },
52
- };
53
- return unwrapAsync(providersList(client$, mergedOptions));
54
- },
55
- };
56
- }
57
- export function queryKeyProvidersList() {
58
- return ["@openrouter/sdk", "Providers", "list"];
59
- }
60
- //# sourceMappingURL=providersList.js.map