Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,7 @@ repos:
^clients/gen/go\.sh$|
^\.gitmodules$|
^airflow-core/src/airflow/ui/openapi-gen/|
^airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/openapi-gen/|
^providers/edge3/src/airflow/providers/edge3/plugins/www/openapi-gen/|
.*/dist/.*|
\.go$|
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// generated with @7nohe/openapi-react-query-codegen@2.0.0
import { type Options } from "@hey-api/client-axios";
// generated with @7nohe/openapi-react-query-codegen@2.1.0
import { UseQueryResult } from "@tanstack/react-query";

import { createToken, createTokenAllAdmins, createTokenCli, loginAllAdmins } from "../requests/services.gen";
import type { Options } from "../requests/sdk.gen";
import { createToken, createTokenAllAdmins, createTokenCli, loginAllAdmins } from "../requests/sdk.gen";
import { CreateTokenAllAdminsData, LoginAllAdminsData } from "../requests/types.gen";

export type CreateTokenAllAdminsDefaultResponse = Awaited<ReturnType<typeof createTokenAllAdmins>>["data"];
export type CreateTokenAllAdminsQueryResult<
Expand All @@ -11,7 +12,7 @@ export type CreateTokenAllAdminsQueryResult<
> = UseQueryResult<TData, TError>;
export const useCreateTokenAllAdminsKey = "CreateTokenAllAdmins";
export const UseCreateTokenAllAdminsKeyFn = (
clientOptions: Options<unknown, true> = {},
clientOptions: Options<CreateTokenAllAdminsData, true> = {},
queryKey?: Array<unknown>,
) => [useCreateTokenAllAdminsKey, ...(queryKey ?? [clientOptions])];
export type LoginAllAdminsDefaultResponse = Awaited<ReturnType<typeof loginAllAdmins>>["data"];
Expand All @@ -21,7 +22,7 @@ export type LoginAllAdminsQueryResult<
> = UseQueryResult<TData, TError>;
export const useLoginAllAdminsKey = "LoginAllAdmins";
export const UseLoginAllAdminsKeyFn = (
clientOptions: Options<unknown, true> = {},
clientOptions: Options<LoginAllAdminsData, true> = {},
queryKey?: Array<unknown>,
) => [useLoginAllAdminsKey, ...(queryKey ?? [clientOptions])];
export type CreateTokenMutationResult = Awaited<ReturnType<typeof createToken>>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,32 @@
// generated with @7nohe/openapi-react-query-codegen@2.0.0
import { type Options } from "@hey-api/client-axios";
// generated with @7nohe/openapi-react-query-codegen@2.1.0
import { type QueryClient } from "@tanstack/react-query";

import { createTokenAllAdmins, loginAllAdmins } from "../requests/services.gen";
import type { Options } from "../requests/sdk.gen";
import { createTokenAllAdmins, loginAllAdmins } from "../requests/sdk.gen";
import { CreateTokenAllAdminsData, LoginAllAdminsData } from "../requests/types.gen";
import * as Common from "./common";

/**
* Create Token All Admins
*
* Create a token with no credentials only if ``simple_auth_manager_all_admins`` is True.
*/
export const ensureUseCreateTokenAllAdminsData = (
queryClient: QueryClient,
clientOptions: Options<unknown, true> = {},
clientOptions: Options<CreateTokenAllAdminsData, true> = {},
) =>
queryClient.ensureQueryData({
queryKey: Common.UseCreateTokenAllAdminsKeyFn(clientOptions),
queryFn: () => createTokenAllAdmins({ ...clientOptions }).then((response) => response.data),
});
/**
* Login All Admins
*
* Login the user with no credentials.
*/
export const ensureUseLoginAllAdminsData = (
queryClient: QueryClient,
clientOptions: Options<unknown, true> = {},
clientOptions: Options<LoginAllAdminsData, true> = {},
) =>
queryClient.ensureQueryData({
queryKey: Common.UseLoginAllAdminsKeyFn(clientOptions),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// generated with @7nohe/openapi-react-query-codegen@2.0.0
// generated with @7nohe/openapi-react-query-codegen@2.1.0

export * from "./common";
export * from "./queries";
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// generated with @7nohe/openapi-react-query-codegen@2.0.0
// generated with @7nohe/openapi-react-query-codegen@2.1.0
Original file line number Diff line number Diff line change
@@ -1,21 +1,32 @@
// generated with @7nohe/openapi-react-query-codegen@2.0.0
import { type Options } from "@hey-api/client-axios";
// generated with @7nohe/openapi-react-query-codegen@2.1.0
import { type QueryClient } from "@tanstack/react-query";

import { createTokenAllAdmins, loginAllAdmins } from "../requests/services.gen";
import type { Options } from "../requests/sdk.gen";
import { createTokenAllAdmins, loginAllAdmins } from "../requests/sdk.gen";
import { CreateTokenAllAdminsData, LoginAllAdminsData } from "../requests/types.gen";
import * as Common from "./common";

/**
* Create Token All Admins
*
* Create a token with no credentials only if ``simple_auth_manager_all_admins`` is True.
*/
export const prefetchUseCreateTokenAllAdmins = (
queryClient: QueryClient,
clientOptions: Options<unknown, true> = {},
clientOptions: Options<CreateTokenAllAdminsData, true> = {},
) =>
queryClient.prefetchQuery({
queryKey: Common.UseCreateTokenAllAdminsKeyFn(clientOptions),
queryFn: () => createTokenAllAdmins({ ...clientOptions }).then((response) => response.data),
});
/**
* Login All Admins
*
* Login the user with no credentials.
*/
export const prefetchUseLoginAllAdmins = (
queryClient: QueryClient,
clientOptions: Options<unknown, true> = {},
clientOptions: Options<LoginAllAdminsData, true> = {},
) =>
queryClient.prefetchQuery({
queryKey: Common.UseLoginAllAdminsKeyFn(clientOptions),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,32 @@
// generated with @7nohe/openapi-react-query-codegen@2.0.0
import { type Options } from "@hey-api/client-axios";
// generated with @7nohe/openapi-react-query-codegen@2.1.0
import { useMutation, UseMutationOptions, useQuery, UseQueryOptions } from "@tanstack/react-query";
import { AxiosError } from "axios";

import { createToken, createTokenAllAdmins, createTokenCli, loginAllAdmins } from "../requests/services.gen";
import type { Options } from "../requests/sdk.gen";
import { createToken, createTokenAllAdmins, createTokenCli, loginAllAdmins } from "../requests/sdk.gen";
import {
CreateTokenAllAdminsData,
CreateTokenAllAdminsError,
CreateTokenCliData,
CreateTokenCliError,
CreateTokenData,
CreateTokenError,
LoginAllAdminsData,
LoginAllAdminsError,
} from "../requests/types.gen";
import * as Common from "./common";

/**
* Create Token All Admins
*
* Create a token with no credentials only if ``simple_auth_manager_all_admins`` is True.
*/
export const useCreateTokenAllAdmins = <
TData = Common.CreateTokenAllAdminsDefaultResponse,
TError = AxiosError<CreateTokenAllAdminsError>,
TQueryKey extends Array<unknown> = unknown[],
>(
clientOptions: Options<unknown, true> = {},
clientOptions: Options<CreateTokenAllAdminsData, true> = {},
queryKey?: TQueryKey,
options?: Omit<UseQueryOptions<TData, TError>, "queryKey" | "queryFn">,
) =>
Expand All @@ -28,12 +36,17 @@ export const useCreateTokenAllAdmins = <
createTokenAllAdmins({ ...clientOptions }).then((response) => response.data as TData) as TData,
...options,
});
/**
* Login All Admins
*
* Login the user with no credentials.
*/
export const useLoginAllAdmins = <
TData = Common.LoginAllAdminsDefaultResponse,
TError = AxiosError<LoginAllAdminsError>,
TQueryKey extends Array<unknown> = unknown[],
>(
clientOptions: Options<unknown, true> = {},
clientOptions: Options<LoginAllAdminsData, true> = {},
queryKey?: TQueryKey,
options?: Omit<UseQueryOptions<TData, TError>, "queryKey" | "queryFn">,
) =>
Expand All @@ -42,6 +55,11 @@ export const useLoginAllAdmins = <
queryFn: () => loginAllAdmins({ ...clientOptions }).then((response) => response.data as TData) as TData,
...options,
});
/**
* Create Token
*
* Authenticate the user.
*/
export const useCreateToken = <
TData = Common.CreateTokenMutationResult,
TError = AxiosError<CreateTokenError>,
Expand All @@ -59,6 +77,11 @@ export const useCreateToken = <
mutationFn: (clientOptions) => createToken(clientOptions) as unknown as Promise<TData>,
...options,
});
/**
* Create Token Cli
*
* Authenticate the user for the CLI.
*/
export const useCreateTokenCli = <
TData = Common.CreateTokenCliMutationResult,
TError = AxiosError<CreateTokenCliError>,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,28 @@
// generated with @7nohe/openapi-react-query-codegen@2.0.0
import { type Options } from "@hey-api/client-axios";
// generated with @7nohe/openapi-react-query-codegen@2.1.0
import { useSuspenseQuery, UseSuspenseQueryOptions } from "@tanstack/react-query";
import { AxiosError } from "axios";

import { createTokenAllAdmins, loginAllAdmins } from "../requests/services.gen";
import { CreateTokenAllAdminsError } from "../requests/types.gen";
import type { Options } from "../requests/sdk.gen";
import { createTokenAllAdmins, loginAllAdmins } from "../requests/sdk.gen";
import {
CreateTokenAllAdminsData,
CreateTokenAllAdminsError,
LoginAllAdminsData,
LoginAllAdminsError,
} from "../requests/types.gen";
import * as Common from "./common";

/**
* Create Token All Admins
*
* Create a token with no credentials only if ``simple_auth_manager_all_admins`` is True.
*/
export const useCreateTokenAllAdminsSuspense = <
TData = NonNullable<Common.CreateTokenAllAdminsDefaultResponse>,
TError = AxiosError<CreateTokenAllAdminsError>,
TQueryKey extends Array<unknown> = unknown[],
>(
clientOptions: Options<unknown, true> = {},
clientOptions: Options<CreateTokenAllAdminsData, true> = {},
queryKey?: TQueryKey,
options?: Omit<UseSuspenseQueryOptions<TData, TError>, "queryKey" | "queryFn">,
) =>
Expand All @@ -22,12 +32,17 @@ export const useCreateTokenAllAdminsSuspense = <
createTokenAllAdmins({ ...clientOptions }).then((response) => response.data as TData) as TData,
...options,
});
/**
* Login All Admins
*
* Login the user with no credentials.
*/
export const useLoginAllAdminsSuspense = <
TData = NonNullable<Common.LoginAllAdminsDefaultResponse>,
TError = AxiosError<LoginAllAdminsError>,
TQueryKey extends Array<unknown> = unknown[],
>(
clientOptions: Options<unknown, true> = {},
clientOptions: Options<LoginAllAdminsData, true> = {},
queryKey?: TQueryKey,
options?: Omit<UseSuspenseQueryOptions<TData, TError>, "queryKey" | "queryFn">,
) =>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// This file is auto-generated by @hey-api/openapi-ts

import { type ClientOptions, type Config, createClient, createConfig } from './client';
import type { ClientOptions as ClientOptions2 } from './types.gen';

/**
* The `createClientConfig()` function will be called on client initialization
* and the returned object will become the client's initial configuration.
*
* You may want to initialize your client this way instead of calling
* `setConfig()`. This is useful for example if you're using Next.js
* to ensure your client always has the correct values.
*/
export type CreateClientConfig<T extends ClientOptions = ClientOptions2> = (override?: Config<ClientOptions & T>) => Config<Required<ClientOptions> & T>;

export const client = createClient(createConfig<ClientOptions2>());
Loading
Loading