@@ -5,10 +5,6 @@ import { queryOptions, type UseMutationOptions } from "@tanstack/react-query";
55import {
66 client ,
77 healthCheckHealthGet ,
8- v1GetMessages ,
9- v1GetAlerts ,
10- v1StreamSse ,
11- v1VersionCheck ,
128 v1ListWorkspaces ,
139 v1CreateWorkspace ,
1410 v1ListActiveWorkspaces ,
@@ -22,6 +18,8 @@ import {
2218 v1GetWorkspaceCustomInstructions ,
2319 v1SetWorkspaceCustomInstructions ,
2420 v1DeleteWorkspaceCustomInstructions ,
21+ v1StreamSse ,
22+ v1VersionCheck ,
2523} from "../sdk.gen" ;
2624import type {
2725 V1CreateWorkspaceData ,
@@ -103,82 +101,6 @@ export const healthCheckHealthGetOptions = (options?: OptionsLegacyParser) => {
103101 } ) ;
104102} ;
105103
106- export const v1GetMessagesQueryKey = ( options ?: OptionsLegacyParser ) => [
107- createQueryKey ( "v1GetMessages" , options ) ,
108- ] ;
109-
110- export const v1GetMessagesOptions = ( options ?: OptionsLegacyParser ) => {
111- return queryOptions ( {
112- queryFn : async ( { queryKey, signal } ) => {
113- const { data } = await v1GetMessages ( {
114- ...options ,
115- ...queryKey [ 0 ] ,
116- signal,
117- throwOnError : true ,
118- } ) ;
119- return data ;
120- } ,
121- queryKey : v1GetMessagesQueryKey ( options ) ,
122- } ) ;
123- } ;
124-
125- export const v1GetAlertsQueryKey = ( options ?: OptionsLegacyParser ) => [
126- createQueryKey ( "v1GetAlerts" , options ) ,
127- ] ;
128-
129- export const v1GetAlertsOptions = ( options ?: OptionsLegacyParser ) => {
130- return queryOptions ( {
131- queryFn : async ( { queryKey, signal } ) => {
132- const { data } = await v1GetAlerts ( {
133- ...options ,
134- ...queryKey [ 0 ] ,
135- signal,
136- throwOnError : true ,
137- } ) ;
138- return data ;
139- } ,
140- queryKey : v1GetAlertsQueryKey ( options ) ,
141- } ) ;
142- } ;
143-
144- export const v1StreamSseQueryKey = ( options ?: OptionsLegacyParser ) => [
145- createQueryKey ( "v1StreamSse" , options ) ,
146- ] ;
147-
148- export const v1StreamSseOptions = ( options ?: OptionsLegacyParser ) => {
149- return queryOptions ( {
150- queryFn : async ( { queryKey, signal } ) => {
151- const { data } = await v1StreamSse ( {
152- ...options ,
153- ...queryKey [ 0 ] ,
154- signal,
155- throwOnError : true ,
156- } ) ;
157- return data ;
158- } ,
159- queryKey : v1StreamSseQueryKey ( options ) ,
160- } ) ;
161- } ;
162-
163- export const v1VersionCheckQueryKey = ( options ?: OptionsLegacyParser ) => [
164- createQueryKey ( "v1VersionCheck" , options ) ,
165- ] ;
166-
167- export const v1VersionCheckOptions = ( options ?: OptionsLegacyParser ) => {
168- return queryOptions ( {
169- queryFn : async ( { queryKey, signal } ) => {
170- const { data } = await v1VersionCheck ( {
171- ...options ,
172- ...queryKey [ 0 ] ,
173- signal,
174- throwOnError : true ,
175- } ) ;
176- return data ;
177- } ,
178- queryKey : v1VersionCheckQueryKey ( options ) ,
179- } ) ;
180- } ;
181-
182104export const v1ListWorkspacesQueryKey = ( options ?: OptionsLegacyParser ) => [
183105 createQueryKey ( "v1ListWorkspaces" , options ) ,
184106] ;
@@ -507,3 +429,41 @@ export const v1DeleteWorkspaceCustomInstructionsMutation = (
507429 } ;
508430 return mutationOptions ;
509431} ;
432+
433+ export const v1StreamSseQueryKey = ( options ?: OptionsLegacyParser ) => [
434+ createQueryKey ( "v1StreamSse" , options ) ,
435+ ] ;
436+
437+ export const v1StreamSseOptions = ( options ?: OptionsLegacyParser ) => {
438+ return queryOptions ( {
439+ queryFn : async ( { queryKey, signal } ) => {
440+ const { data } = await v1StreamSse ( {
441+ ...options ,
442+ ...queryKey [ 0 ] ,
443+ signal,
444+ throwOnError : true ,
445+ } ) ;
446+ return data ;
447+ } ,
448+ queryKey : v1StreamSseQueryKey ( options ) ,
449+ } ) ;
450+ } ;
451+
452+ export const v1VersionCheckQueryKey = ( options ?: OptionsLegacyParser ) => [
453+ createQueryKey ( "v1VersionCheck" , options ) ,
454+ ] ;
455+
456+ export const v1VersionCheckOptions = ( options ?: OptionsLegacyParser ) => {
457+ return queryOptions ( {
458+ queryFn : async ( { queryKey, signal } ) => {
459+ const { data } = await v1VersionCheck ( {
460+ ...options ,
461+ ...queryKey [ 0 ] ,
462+ signal,
463+ throwOnError : true ,
464+ } ) ;
465+ return data ;
466+ } ,
467+ queryKey : v1VersionCheckQueryKey ( options ) ,
468+ } ) ;
469+ } ;
0 commit comments