import * as React from "react"; import { QueryOptions } from "react-query"; import { ApiResult } from "glow-core"; import { UseSubmit, ProblemDetails } from "glow-core/es/actions/use-submit"; import { FormikFormProps } from "formik"; import * as Glow_TestAutomation from "./Glow.TestAutomation"; import * as Glow_Core_EfCore from "./Glow.Core.EfCore"; import * as Glow_Core_OpenIdConnect from "./Glow.Core.OpenIdConnect"; import * as Glow_Core_Application from "./Glow.Core.Application"; import * as MediatR from "./MediatR"; declare type QueryInputs = { "/api/glow/test-automation/get-available-fake-users": Glow_TestAutomation.GetAvailableFakeUsers; }; declare type QueryOutputs = { "/api/glow/test-automation/get-available-fake-users": Glow_TestAutomation.FakeUsers; }; export declare type Outputs = { "/api/glow/db/reset-database": MediatR.Unit; "/api/glow/set-openid-connect-options": MediatR.Unit; "/api/glow/restart-application": MediatR.Unit; }; export declare type Actions = { "/api/glow/db/reset-database": Glow_Core_EfCore.ResetDatabase; "/api/glow/set-openid-connect-options": Glow_Core_OpenIdConnect.SetOpenIdConnectOptions; "/api/glow/restart-application": Glow_Core_Application.RestartApplication; }; declare type TagWithKey = { [K in keyof T]: { [_ in TagName]: K; } & T[K]; }; export declare type ActionTable = TagWithKey<"url", Actions>; export declare type TypedActionHookResult = UseSubmit; export declare type TypedActionHook = (key: ActionName) => TypedActionHookResult; export declare const useTypedAction: TypedActionHook; declare type QueryTable = TagWithKey<"url", QueryInputs>; export declare function useTypedQuery(key: ActionName, { placeholder, input, queryOptions, }: { placeholder: QueryOutputs[ActionName]; input: QueryInputs[ActionName]; queryOptions?: QueryOptions; }): ApiResult; export declare function TypedForm({ initialValues, actionName, formProps, children, onSuccess, onError, }: React.PropsWithChildren<{ actionName: ActionName; initialValues: Actions[ActionName]; formProps?: FormikFormProps; onSuccess?: (payload: Outputs[ActionName]) => void; onError?: (error: ProblemDetails) => void; }>): JSX.Element; export {}; //# sourceMappingURL=api.d.ts.map