-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathuseLogoutUserQuery.ts
43 lines (36 loc) · 1.1 KB
/
useLogoutUserQuery.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/* This is a sample header */
/* eslint-disable */
// This code is autogenerated using @harnessio/oats-cli.
// Please do not modify this code directly.
import { useQuery, UseQueryOptions } from '@tanstack/react-query';
import { fetcher, FetcherOptions } from './fetcher';
export type LogoutUserOkResponse = unknown;
export type LogoutUserErrorResponse = unknown;
export interface LogoutUserProps extends Omit<FetcherOptions<unknown, unknown>, 'url'> {}
export interface LogoutUserResponseContainer {
content: LogoutUserOkResponse;
headers: HeadersInit;
}
export function logoutUser(props: LogoutUserProps): Promise<LogoutUserResponseContainer> {
return fetcher<LogoutUserOkResponse, unknown, unknown>({
url: `/user/logout`,
method: 'GET',
...props,
});
}
/**
*
*/
export function useLogoutUserQuery(
props: LogoutUserProps,
options?: Omit<
UseQueryOptions<LogoutUserResponseContainer, LogoutUserErrorResponse>,
'queryKey' | 'queryFn'
>,
) {
return useQuery<LogoutUserResponseContainer, LogoutUserErrorResponse>(
['logoutUser'],
({ signal }) => logoutUser({ ...props, signal }),
options,
);
}