@superinterface/react 2.0.3 → 2.0.4

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.
@@ -0,0 +1,11 @@
1
+ declare const useSuperinterfaceContext: () => {
2
+ baseUrl: string | null;
3
+ variables: Record<string, any>;
4
+ defaultOptions: {
5
+ queries: Record<string, any>;
6
+ mutations: Record<string, any>;
7
+ };
8
+ publicApiKey?: string | undefined;
9
+ };
10
+
11
+ export { useSuperinterfaceContext as u };
@@ -0,0 +1,11 @@
1
+ declare const useSuperinterfaceContext: () => {
2
+ baseUrl: string | null;
3
+ variables: Record<string, any>;
4
+ defaultOptions: {
5
+ queries: Record<string, any>;
6
+ mutations: Record<string, any>;
7
+ };
8
+ publicApiKey?: string | undefined;
9
+ };
10
+
11
+ export { useSuperinterfaceContext as u };
package/dist/index.cjs CHANGED
@@ -541,6 +541,19 @@ var queryOptions = function(param) {
541
541
  queryKey: queryKey
542
542
  }), threadContext.defaultOptions.queries));
543
543
  };
544
+ // src/lib/messages/messagesQueryOptions.ts
545
+ var messagesQueryOptions = function(param) {
546
+ var queryClient = param.queryClient, threadContext = param.threadContext, superinterfaceContext = param.superinterfaceContext;
547
+ return queryOptions({
548
+ queryKeyBase: [
549
+ "messages"
550
+ ],
551
+ path: "/messages",
552
+ queryClient: queryClient,
553
+ threadContext: threadContext,
554
+ superinterfaceContext: superinterfaceContext
555
+ });
556
+ };
544
557
  // src/hooks/messages/useMessages/index.tsx
545
558
  var messages = function(param) {
546
559
  var props = param.props;
@@ -553,11 +566,7 @@ var useMessages = function() {
553
566
  var queryClient = (0, import_react_query2.useQueryClient)();
554
567
  var threadContext = useSuperinterfaceContext();
555
568
  var superinterfaceContext = useSuperinterfaceContext();
556
- var props = (0, import_react_query2.useInfiniteQuery)(queryOptions({
557
- queryKeyBase: [
558
- "messages"
559
- ],
560
- path: "/messages",
569
+ var props = (0, import_react_query2.useInfiniteQuery)(messagesQueryOptions({
561
570
  queryClient: queryClient,
562
571
  threadContext: threadContext,
563
572
  superinterfaceContext: superinterfaceContext
@@ -1331,6 +1340,19 @@ var import_react20 = require("react");
1331
1340
  // src/hooks/runs/useRuns/index.tsx
1332
1341
  var import_react19 = require("react");
1333
1342
  var import_react_query3 = require("@tanstack/react-query");
1343
+ // src/lib/runs/runsQueryOptions.ts
1344
+ var runsQueryOptions = function(param) {
1345
+ var queryClient = param.queryClient, threadContext = param.threadContext, superinterfaceContext = param.superinterfaceContext;
1346
+ return queryOptions({
1347
+ queryKeyBase: [
1348
+ "runs"
1349
+ ],
1350
+ path: "/runs",
1351
+ queryClient: queryClient,
1352
+ threadContext: threadContext,
1353
+ superinterfaceContext: superinterfaceContext
1354
+ });
1355
+ };
1334
1356
  // src/hooks/runs/useRuns/lib/getRuns.ts
1335
1357
  var getRuns = function(param) {
1336
1358
  var data3 = param.data;
@@ -1344,11 +1366,7 @@ var useRuns = function() {
1344
1366
  var queryClient = (0, import_react_query3.useQueryClient)();
1345
1367
  var superinterfaceContext = useSuperinterfaceContext();
1346
1368
  var threadContext = useSuperinterfaceContext();
1347
- var props = (0, import_react_query3.useInfiniteQuery)(queryOptions({
1348
- queryKeyBase: [
1349
- "runs"
1350
- ],
1351
- path: "/runs",
1369
+ var props = (0, import_react_query3.useInfiniteQuery)(runsQueryOptions({
1352
1370
  queryClient: queryClient,
1353
1371
  threadContext: threadContext,
1354
1372
  superinterfaceContext: superinterfaceContext