@refinedev/core 4.51.0 → 4.52.0
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.
- package/CHANGELOG.md +31 -0
- package/LICENSE +21 -0
- package/dist/components/authenticated/index.d.mts.map +75 -1
- package/dist/components/autoSaveIndicator/index.d.cts.map +1 -1
- package/dist/components/autoSaveIndicator/index.d.mts.map +24 -1
- package/dist/components/autoSaveIndicator/index.d.ts.map +1 -1
- package/dist/components/canAccess/index.d.mts.map +52 -1
- package/dist/components/containers/index.d.mts.map +2 -1
- package/dist/components/containers/refine/index.d.mts.map +11 -1
- package/dist/components/gh-banner/index.d.mts.map +7 -1
- package/dist/components/gh-banner/styles.d.mts.map +2 -1
- package/dist/components/index.d.mts.map +10 -1
- package/dist/components/layoutWrapper/defaultLayout/index.d.mts.map +4 -1
- package/dist/components/layoutWrapper/index.d.mts.map +46 -1
- package/dist/components/pages/auth/components/forgotPassword/index.d.mts.map +7 -1
- package/dist/components/pages/auth/components/index.d.mts.map +5 -1
- package/dist/components/pages/auth/components/login/index.d.mts.map +7 -1
- package/dist/components/pages/auth/components/register/index.d.mts.map +7 -1
- package/dist/components/pages/auth/components/updatePassword/index.d.mts.map +7 -1
- package/dist/components/pages/auth/index.d.mts.map +12 -1
- package/dist/components/pages/auth/types.d.mts.map +179 -1
- package/dist/components/pages/config-error/index.d.mts.map +3 -1
- package/dist/components/pages/config-success/index.d.mts.map +6 -1
- package/dist/components/pages/error/index.d.mts.map +9 -1
- package/dist/components/pages/index.d.mts.map +7 -1
- package/dist/components/pages/login/index.d.mts.map +13 -1
- package/dist/components/pages/ready/index.d.mts.map +8 -1
- package/dist/components/pages/welcome/index.d.mts.map +3 -1
- package/dist/components/routeChangeHandler/index.d.mts.map +3 -1
- package/dist/components/telemetry/index.d.mts.map +3 -1
- package/dist/components/telemetry/types.d.mts.map +16 -1
- package/dist/components/undoableQueue/index.d.mts.map +6 -1
- package/dist/contexts/accessControl/index.d.mts.map +7 -1
- package/dist/contexts/accessControl/types.d.mts.map +84 -1
- package/dist/contexts/auditLog/index.d.mts.map +5 -1
- package/dist/contexts/auditLog/types.d.mts.map +41 -1
- package/dist/contexts/auth/index.d.mts.map +18 -1
- package/dist/contexts/auth/types.d.mts.map +101 -1
- package/dist/contexts/data/index.d.mts.map +10 -1
- package/dist/contexts/data/types.d.mts.map +347 -1
- package/dist/contexts/i18n/index.d.mts.map +7 -1
- package/dist/contexts/i18n/types.d.mts.map +13 -1
- package/dist/contexts/live/index.d.mts.map +5 -1
- package/dist/contexts/live/types.d.mts.map +96 -1
- package/dist/contexts/notification/index.d.mts.map +7 -1
- package/dist/contexts/notification/types.d.mts.map +27 -1
- package/dist/contexts/refine/index.d.mts.map +6 -1
- package/dist/contexts/refine/types.d.mts.map +325 -1
- package/dist/contexts/resource/index.d.mts.map +7 -1
- package/dist/contexts/resource/types.d.mts.map +168 -1
- package/dist/contexts/router/index.d.mts.map +7 -1
- package/dist/contexts/router/legacy/index.d.mts.map +6 -1
- package/dist/contexts/router/legacy/types.d.mts.map +47 -1
- package/dist/contexts/router/picker/index.d.mts.map +15 -1
- package/dist/contexts/router/types.d.mts.map +67 -1
- package/dist/contexts/undoableQueue/index.d.mts.map +6 -1
- package/dist/contexts/undoableQueue/types.d.mts.map +21 -1
- package/dist/contexts/unsavedWarn/index.d.mts.map +5 -1
- package/dist/contexts/unsavedWarn/types.d.mts.map +5 -1
- package/dist/definitions/helpers/async-debounce/index.d.mts.map +18 -1
- package/dist/definitions/helpers/check-router-prop-misuse/index.d.mts.map +4 -1
- package/dist/definitions/helpers/defer-execution/index.d.mts.map +9 -1
- package/dist/definitions/helpers/downloadInBrowser/index.d.mts.map +2 -1
- package/dist/definitions/helpers/flatten-object-keys/index.d.mts.map +4 -1
- package/dist/definitions/helpers/generateDocumentTitle/index.d.mts.map +7 -1
- package/dist/definitions/helpers/handleMultiple/index.d.mts.map +6 -1
- package/dist/definitions/helpers/handlePaginationParams/index.d.mts.map +9 -1
- package/dist/definitions/helpers/handleRefineOptions/index.d.mts.map +26 -1
- package/dist/definitions/helpers/handleUseParams/index.d.mts.map +2 -1
- package/dist/definitions/helpers/hasPermission/index.d.mts.map +2 -1
- package/dist/definitions/helpers/humanizeString/index.d.mts.map +2 -1
- package/dist/definitions/helpers/importCSVMapper/index.d.mts.map +3 -1
- package/dist/definitions/helpers/index.d.mts.map +34 -1
- package/dist/definitions/helpers/keys/index.d.mts.map +64 -1
- package/dist/definitions/helpers/legacy-resource-transform/index.d.mts.map +9 -1
- package/dist/definitions/helpers/menu/create-resource-key.d.mts.map +3 -1
- package/dist/definitions/helpers/menu/create-tree.d.mts.map +13 -1
- package/dist/definitions/helpers/pick-resource/index.d.mts.map +8 -1
- package/dist/definitions/helpers/pickDataProvider/index.d.mts.map +6 -1
- package/dist/definitions/helpers/pickNotDeprecated/index.d.mts.map +2 -1
- package/dist/definitions/helpers/prepare-query-context/index.d.mts.map +3 -1
- package/dist/definitions/helpers/property-path-to-array/index.d.mts.map +2 -1
- package/dist/definitions/helpers/queryKeys/index.d.mts.map +7 -1
- package/dist/definitions/helpers/redirectPage/index.d.mts.map +11 -1
- package/dist/definitions/helpers/routeGenerator/index.d.mts.map +7 -1
- package/dist/definitions/helpers/router/check-by-segments.d.mts.map +9 -1
- package/dist/definitions/helpers/router/compose-route.d.mts.map +11 -1
- package/dist/definitions/helpers/router/get-action-routes-from-resource.d.mts.map +16 -1
- package/dist/definitions/helpers/router/get-default-action-path.d.mts.map +8 -1
- package/dist/definitions/helpers/router/get-parent-prefix-for-resource.d.mts.map +7 -1
- package/dist/definitions/helpers/router/get-parent-resource.d.mts.map +7 -1
- package/dist/definitions/helpers/router/index.d.mts.map +10 -1
- package/dist/definitions/helpers/router/is-parameter.d.mts.map +5 -1
- package/dist/definitions/helpers/router/is-segment-counts-same.d.mts.map +5 -1
- package/dist/definitions/helpers/router/match-resource-from-route.d.mts.map +15 -1
- package/dist/definitions/helpers/router/pick-matched-route.d.mts.map +8 -1
- package/dist/definitions/helpers/router/pick-route-params.d.mts.map +6 -1
- package/dist/definitions/helpers/router/prepare-route-params.d.mts.map +8 -1
- package/dist/definitions/helpers/router/remove-leading-trailing-slashes.d.mts.map +5 -1
- package/dist/definitions/helpers/router/split-to-segments.d.mts.map +5 -1
- package/dist/definitions/helpers/safe-translate/index.d.mts.map +3 -1
- package/dist/definitions/helpers/sanitize-resource/index.d.mts.map +8 -1
- package/dist/definitions/helpers/sequentialPromises/index.d.mts.map +5 -1
- package/dist/definitions/helpers/treeView/createTreeView/index.d.mts.map +6 -1
- package/dist/definitions/helpers/treeView/index.d.mts.map +2 -1
- package/dist/definitions/helpers/useActiveAuthProvider/index.d.cts +7 -7
- package/dist/definitions/helpers/useActiveAuthProvider/index.d.mts +7 -7
- package/dist/definitions/helpers/useActiveAuthProvider/index.d.mts.map +34 -1
- package/dist/definitions/helpers/useActiveAuthProvider/index.d.ts +7 -7
- package/dist/definitions/helpers/useInfinitePagination/index.d.mts.map +4 -1
- package/dist/definitions/helpers/useMediaQuery/index.d.mts.map +2 -1
- package/dist/definitions/helpers/useUserFriendlyName/index.d.mts.map +6 -1
- package/dist/definitions/helpers/userFriendlyResourceName/index.d.mts.map +7 -1
- package/dist/definitions/helpers/userFriendlySeconds/index.d.mts.map +2 -1
- package/dist/definitions/index.d.mts.map +4 -1
- package/dist/definitions/table/index.d.mts.map +34 -1
- package/dist/definitions/upload/file2Base64/index.d.mts.map +2 -1
- package/dist/definitions/upload/index.d.mts.map +2 -1
- package/dist/hooks/accessControl/index.d.mts.map +3 -1
- package/dist/hooks/accessControl/useCan/index.d.mts.map +18 -1
- package/dist/hooks/accessControl/useCanWithoutCache.d.mts.map +3 -1
- package/dist/hooks/auditLog/index.d.mts.map +3 -1
- package/dist/hooks/auditLog/useLog/index.d.mts.map +27 -1
- package/dist/hooks/auditLog/useLogList/index.d.mts.map +22 -1
- package/dist/hooks/auth/index.d.mts.map +11 -1
- package/dist/hooks/auth/useForgotPassword/index.d.mts.map +22 -1
- package/dist/hooks/auth/useGetIdentity/index.d.mts.map +21 -1
- package/dist/hooks/auth/useInvalidateAuthStore/index.d.mts.map +2 -1
- package/dist/hooks/auth/useIsAuthenticated/index.d.mts.map +25 -1
- package/dist/hooks/auth/useIsExistAuthentication/index.d.mts.map +6 -1
- package/dist/hooks/auth/useLogin/index.d.mts.map +22 -1
- package/dist/hooks/auth/useLogout/index.d.mts.map +26 -1
- package/dist/hooks/auth/useOnError/index.d.mts.map +22 -1
- package/dist/hooks/auth/usePermissions/index.d.mts.map +24 -1
- package/dist/hooks/auth/useRegister/index.d.mts.map +22 -1
- package/dist/hooks/auth/useUpdatePassword/index.d.mts.map +23 -1
- package/dist/hooks/breadcrumb/index.d.mts.map +18 -1
- package/dist/hooks/button/actionable-button/index.d.mts.map +8 -1
- package/dist/hooks/button/button-can-access/index.d.mts.map +22 -1
- package/dist/hooks/button/delete-button/index.d.mts.map +28 -1
- package/dist/hooks/button/index.d.mts.map +13 -1
- package/dist/hooks/button/navigation-button/index.d.mts.map +28 -1
- package/dist/hooks/button/refresh-button/index.d.mts.map +14 -1
- package/dist/hooks/data/index.d.cts +12 -12
- package/dist/hooks/data/index.d.cts.map +1 -1
- package/dist/hooks/data/index.d.mts +12 -12
- package/dist/hooks/data/index.d.mts.map +15 -1
- package/dist/hooks/data/index.d.ts +12 -12
- package/dist/hooks/data/index.d.ts.map +1 -1
- package/dist/hooks/data/useApiUrl.d.mts.map +2 -1
- package/dist/hooks/data/useCreate.d.mts.map +49 -1
- package/dist/hooks/data/useCreateMany.d.mts.map +31 -1
- package/dist/hooks/data/useCustom.d.mts.map +63 -1
- package/dist/hooks/data/useCustomMutation.d.mts.map +42 -1
- package/dist/hooks/data/useDataProvider.d.mts.map +7 -1
- package/dist/hooks/data/useDelete.d.mts.map +65 -1
- package/dist/hooks/data/useDeleteMany.d.mts.map +65 -1
- package/dist/hooks/data/useInfiniteList.d.mts.map +74 -1
- package/dist/hooks/data/useList.d.mts.map +73 -1
- package/dist/hooks/data/useMany.d.mts.map +48 -1
- package/dist/hooks/data/useOne.d.mts.map +50 -1
- package/dist/hooks/data/useUpdate.d.mts.map +83 -1
- package/dist/hooks/data/useUpdateMany.d.cts +1 -1
- package/dist/hooks/data/useUpdateMany.d.cts.map +1 -1
- package/dist/hooks/data/useUpdateMany.d.mts +1 -1
- package/dist/hooks/data/useUpdateMany.d.mts.map +84 -1
- package/dist/hooks/data/useUpdateMany.d.ts +1 -1
- package/dist/hooks/data/useUpdateMany.d.ts.map +1 -1
- package/dist/hooks/deepMemo/index.d.mts.map +7 -1
- package/dist/hooks/export/index.d.mts.map +99 -1
- package/dist/hooks/export/types.d.mts.map +21 -1
- package/dist/hooks/form/index.d.mts.map +18 -1
- package/dist/hooks/form/types.d.mts.map +146 -1
- package/dist/hooks/i18n/index.d.mts.map +5 -1
- package/dist/hooks/i18n/useGetLocale.d.mts.map +9 -1
- package/dist/hooks/i18n/useSetLocale.d.mts.map +8 -1
- package/dist/hooks/i18n/useTranslate.d.mts.map +11 -1
- package/dist/hooks/i18n/useTranslation.d.mts.map +18 -1
- package/dist/hooks/import/index.d.mts.map +101 -1
- package/dist/hooks/index.d.mts.map +31 -1
- package/dist/hooks/invalidate/index.d.mts.map +12 -1
- package/dist/hooks/legacy-router/index.d.mts.map +2 -1
- package/dist/hooks/legacy-router/useRouterContext.d.mts.map +10 -1
- package/dist/hooks/live/index.d.mts.map +5 -1
- package/dist/hooks/live/useLiveMode/index.d.mts.map +3 -1
- package/dist/hooks/live/usePublish/index.d.mts.map +3 -1
- package/dist/hooks/live/useResourceSubscription/index.d.mts.map +43 -1
- package/dist/hooks/live/useSubscription/index.d.mts.map +57 -1
- package/dist/hooks/memoized/index.d.mts.map +6 -1
- package/dist/hooks/menu/index.d.mts.map +2 -1
- package/dist/hooks/menu/useMenu.d.mts.map +28 -1
- package/dist/hooks/modal/index.d.mts.map +2 -1
- package/dist/hooks/modal/useModal/index.d.mts.map +13 -1
- package/dist/hooks/navigation/index.d.mts.map +28 -1
- package/dist/hooks/notification/index.d.mts.map +4 -1
- package/dist/hooks/notification/useCancelNotification/index.d.mts.map +8 -1
- package/dist/hooks/notification/useHandleNotification/index.d.mts.map +3 -1
- package/dist/hooks/notification/useNotification/index.d.mts.map +3 -1
- package/dist/hooks/redirection/index.d.mts.map +11 -1
- package/dist/hooks/refine/index.d.mts.map +6 -1
- package/dist/hooks/refine/useMutationMode.d.mts.map +16 -1
- package/dist/hooks/refine/useRefineContext.d.cts +1 -1
- package/dist/hooks/refine/useRefineContext.d.mts +1 -1
- package/dist/hooks/refine/useRefineContext.d.mts.map +20 -1
- package/dist/hooks/refine/useRefineContext.d.ts +1 -1
- package/dist/hooks/refine/useSyncWithLocation.d.mts.map +13 -1
- package/dist/hooks/refine/useTitle.d.mts.map +10 -1
- package/dist/hooks/refine/useWarnAboutChange/index.d.mts.map +16 -1
- package/dist/hooks/resource/index.d.mts.map +3 -1
- package/dist/hooks/resource/useResource/index.d.mts.map +63 -1
- package/dist/hooks/resource/useResourceWithRoute/index.d.mts.map +8 -1
- package/dist/hooks/router/index.d.mts.map +8 -1
- package/dist/hooks/router/use-back/index.d.mts.map +2 -1
- package/dist/hooks/router/use-get-to-path/index.d.mts.map +19 -1
- package/dist/hooks/router/use-go/index.d.mts.map +33 -1
- package/dist/hooks/router/use-link/index.d.mts.map +6 -1
- package/dist/hooks/router/use-parse/index.d.mts.map +5 -1
- package/dist/hooks/router/use-parsed/index.d.mts.map +2 -1
- package/dist/hooks/router/use-router-misuse-warning/index.d.mts.map +3 -1
- package/dist/hooks/router/use-to-path/index.d.mts.map +18 -1
- package/dist/hooks/show/index.d.mts.map +17 -1
- package/dist/hooks/show/types.d.mts.map +52 -1
- package/dist/hooks/show/useShow.d.mts.map +57 -1
- package/dist/hooks/use-refine-options/index.d.mts.map +2 -1
- package/dist/hooks/use-resource-params/index.d.mts.map +43 -1
- package/dist/hooks/use-resource-params/use-action/index.d.mts.map +12 -1
- package/dist/hooks/use-resource-params/use-id/index.d.mts.map +12 -1
- package/dist/hooks/useKeys/index.d.mts.map +5 -1
- package/dist/hooks/useLoadingOvertime/index.d.mts.map +49 -1
- package/dist/hooks/useMeta/index.d.mts.map +19 -1
- package/dist/hooks/useSelect/index.d.cts +6 -0
- package/dist/hooks/useSelect/index.d.cts.map +1 -1
- package/dist/hooks/useSelect/index.d.mts +6 -0
- package/dist/hooks/useSelect/index.d.mts.map +137 -1
- package/dist/hooks/useSelect/index.d.ts +6 -0
- package/dist/hooks/useSelect/index.d.ts.map +1 -1
- package/dist/hooks/useTable/index.d.mts.map +167 -1
- package/dist/hooks/useTelemetryData/index.d.mts.map +3 -1
- package/dist/index.cjs +18 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -7
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +8 -7
- package/dist/index.d.mts.map +25 -1
- package/dist/index.d.ts +8 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +18 -18
- package/dist/index.mjs.map +1 -1
- package/package.json +12 -13
- package/src/components/autoSaveIndicator/index.tsx +21 -7
- package/src/hooks/data/index.ts +28 -12
- package/src/hooks/data/useUpdateMany.ts +1 -1
- package/src/hooks/useSelect/index.ts +15 -1
- package/src/index.tsx +39 -0
|
@@ -1 +1,15 @@
|
|
|
1
|
-
{
|
|
1
|
+
import type { IResourceItem } from "../../../contexts/resource/types";
|
|
2
|
+
import type { Action } from "../../../contexts/router/types";
|
|
3
|
+
/**
|
|
4
|
+
* Match the resource from the route
|
|
5
|
+
* - It will calculate all possible routes for resources and their actions
|
|
6
|
+
* - It will check if the route matches any of the possible routes
|
|
7
|
+
* - It will return the most eligible resource and action
|
|
8
|
+
*/
|
|
9
|
+
export declare const matchResourceFromRoute: (route: string, resources: IResourceItem[]) => {
|
|
10
|
+
found: boolean;
|
|
11
|
+
resource?: IResourceItem;
|
|
12
|
+
action?: Action;
|
|
13
|
+
matchedRoute?: string;
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=match-resource-from-route.d.ts.map
|
|
@@ -1 +1,8 @@
|
|
|
1
|
-
{"
|
|
1
|
+
import type { ResourceActionRoute } from "./get-action-routes-from-resource";
|
|
2
|
+
/**
|
|
3
|
+
* Picks the most eligible route from the given matched routes.
|
|
4
|
+
* - If there's only one route, it returns it.
|
|
5
|
+
* - If there's more than one route, it picks the best non-greedy match.
|
|
6
|
+
*/
|
|
7
|
+
export declare const pickMatchedRoute: (routes: ResourceActionRoute[]) => ResourceActionRoute | undefined;
|
|
8
|
+
//# sourceMappingURL=pick-matched-route.d.ts.map
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Picks the route parameters from the given route.
|
|
3
|
+
* (e.g. /users/:id/posts/:postId => ['id', 'postId'])
|
|
4
|
+
*/
|
|
5
|
+
export declare const pickRouteParams: (route: string) => string[];
|
|
6
|
+
//# sourceMappingURL=pick-route-params.d.ts.map
|
|
@@ -1 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Prepares the route params by checking the existing params and meta data.
|
|
3
|
+
* Meta data is prioritized over params.
|
|
4
|
+
* Params are prioritized over predetermined id, action and resource.
|
|
5
|
+
* This means, we can use `meta` for user supplied params (both manually or from the query string)
|
|
6
|
+
*/
|
|
7
|
+
export declare const prepareRouteParams: <TRouteParams extends Record<string, unknown> = Record<string, unknown>>(routeParams: (keyof TRouteParams)[], meta?: Record<string, unknown>) => Partial<TRouteParams>;
|
|
8
|
+
//# sourceMappingURL=prepare-route-params.d.ts.map
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Remove leading and trailing slashes from a route.
|
|
3
|
+
*/
|
|
4
|
+
export declare const removeLeadingTrailingSlashes: (route: string) => string;
|
|
5
|
+
//# sourceMappingURL=remove-leading-trailing-slashes.d.ts.map
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Split a path to segments.
|
|
3
|
+
*/
|
|
4
|
+
export declare const splitToSegments: (path: string) => string[];
|
|
5
|
+
//# sourceMappingURL=split-to-segments.d.ts.map
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
{"
|
|
1
|
+
import type { useTranslate } from "@hooks/i18n";
|
|
2
|
+
export declare const safeTranslate: (translate: ReturnType<typeof useTranslate>, key: string, defaultMessage?: string, options?: any) => string;
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,8 @@
|
|
|
1
|
-
{"
|
|
1
|
+
import type { IResourceItem } from "../../../contexts/resource/types";
|
|
2
|
+
/**
|
|
3
|
+
* Remove all properties that are non-serializable from a resource object.
|
|
4
|
+
*/
|
|
5
|
+
export declare const sanitizeResource: (resource?: Partial<IResourceItem> & Required<Pick<IResourceItem, "name">> & {
|
|
6
|
+
children?: unknown;
|
|
7
|
+
}) => (Partial<IResourceItem> & Required<Pick<IResourceItem, "name">>) | undefined;
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
type EachResolve<TResolve, Response> = (result: TResolve, index: number) => Response;
|
|
2
|
+
type EachReject<TReject, Response> = (error: TReject, index: number) => Response;
|
|
3
|
+
export declare const sequentialPromises: <TResolve = unknown, TReject = unknown, TResolveResponse = unknown, TRejectResponse = unknown>(promises: (() => Promise<TResolve>)[], onEachResolve: EachResolve<TResolve, TResolveResponse>, onEachReject: EachReject<TReject, TRejectResponse>) => Promise<(TResolveResponse | TRejectResponse)[]>;
|
|
4
|
+
export {};
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
{
|
|
1
|
+
import type { IMenuItem, IResourceItem, ITreeMenu } from "../../../../contexts/resource/types";
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated This helper is deprecated. Please use `createTree` instead.
|
|
4
|
+
*/
|
|
5
|
+
export declare const createTreeView: (resources: IResourceItem[] | IMenuItem[]) => ITreeMenu[] | ITreeMenu[];
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
{"
|
|
1
|
+
export { createTreeView } from "./createTreeView";
|
|
2
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export declare const useActiveAuthProvider: () => {
|
|
7
7
|
isProvided?: boolean | undefined;
|
|
8
|
-
login?: ((params: any) => Promise<import("
|
|
9
|
-
logout?: ((params: any) => Promise<import("
|
|
10
|
-
check?: ((params?: any) => Promise<import("
|
|
11
|
-
onError?: ((error: any) => Promise<import("
|
|
12
|
-
register?: ((params: any) => Promise<import("
|
|
13
|
-
forgotPassword?: ((params: any) => Promise<import("
|
|
14
|
-
updatePassword?: ((params: any) => Promise<import("
|
|
8
|
+
login?: ((params: any) => Promise<import("../../..").AuthActionResponse>) | undefined;
|
|
9
|
+
logout?: ((params: any) => Promise<import("../../..").AuthActionResponse>) | undefined;
|
|
10
|
+
check?: ((params?: any) => Promise<import("../../..").CheckResponse>) | undefined;
|
|
11
|
+
onError?: ((error: any) => Promise<import("../../..").OnErrorResponse>) | undefined;
|
|
12
|
+
register?: ((params: any) => Promise<import("../../..").AuthActionResponse>) | undefined;
|
|
13
|
+
forgotPassword?: ((params: any) => Promise<import("../../..").AuthActionResponse>) | undefined;
|
|
14
|
+
updatePassword?: ((params: any) => Promise<import("../../..").AuthActionResponse>) | undefined;
|
|
15
15
|
getPermissions?: ((params?: Record<string, any> | undefined) => Promise<unknown>) | undefined;
|
|
16
16
|
getIdentity?: ((params?: any) => Promise<unknown>) | undefined;
|
|
17
17
|
isLegacy: boolean;
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export declare const useActiveAuthProvider: () => {
|
|
7
7
|
isProvided?: boolean | undefined;
|
|
8
|
-
login?: ((params: any) => Promise<import("
|
|
9
|
-
logout?: ((params: any) => Promise<import("
|
|
10
|
-
check?: ((params?: any) => Promise<import("
|
|
11
|
-
onError?: ((error: any) => Promise<import("
|
|
12
|
-
register?: ((params: any) => Promise<import("
|
|
13
|
-
forgotPassword?: ((params: any) => Promise<import("
|
|
14
|
-
updatePassword?: ((params: any) => Promise<import("
|
|
8
|
+
login?: ((params: any) => Promise<import("../../..").AuthActionResponse>) | undefined;
|
|
9
|
+
logout?: ((params: any) => Promise<import("../../..").AuthActionResponse>) | undefined;
|
|
10
|
+
check?: ((params?: any) => Promise<import("../../..").CheckResponse>) | undefined;
|
|
11
|
+
onError?: ((error: any) => Promise<import("../../..").OnErrorResponse>) | undefined;
|
|
12
|
+
register?: ((params: any) => Promise<import("../../..").AuthActionResponse>) | undefined;
|
|
13
|
+
forgotPassword?: ((params: any) => Promise<import("../../..").AuthActionResponse>) | undefined;
|
|
14
|
+
updatePassword?: ((params: any) => Promise<import("../../..").AuthActionResponse>) | undefined;
|
|
15
15
|
getPermissions?: ((params?: Record<string, any> | undefined) => Promise<unknown>) | undefined;
|
|
16
16
|
getIdentity?: ((params?: any) => Promise<unknown>) | undefined;
|
|
17
17
|
isLegacy: boolean;
|
|
@@ -1 +1,34 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @returns authProvider or legacyAuthProvider if provided, otherwise null
|
|
3
|
+
* @internal
|
|
4
|
+
* NOTE: Will be removed in v5
|
|
5
|
+
*/
|
|
6
|
+
export declare const useActiveAuthProvider: () => {
|
|
7
|
+
isProvided?: boolean | undefined;
|
|
8
|
+
login?: ((params: any) => Promise<import("../../..").AuthActionResponse>) | undefined;
|
|
9
|
+
logout?: ((params: any) => Promise<import("../../..").AuthActionResponse>) | undefined;
|
|
10
|
+
check?: ((params?: any) => Promise<import("../../..").CheckResponse>) | undefined;
|
|
11
|
+
onError?: ((error: any) => Promise<import("../../..").OnErrorResponse>) | undefined;
|
|
12
|
+
register?: ((params: any) => Promise<import("../../..").AuthActionResponse>) | undefined;
|
|
13
|
+
forgotPassword?: ((params: any) => Promise<import("../../..").AuthActionResponse>) | undefined;
|
|
14
|
+
updatePassword?: ((params: any) => Promise<import("../../..").AuthActionResponse>) | undefined;
|
|
15
|
+
getPermissions?: ((params?: Record<string, any> | undefined) => Promise<unknown>) | undefined;
|
|
16
|
+
getIdentity?: ((params?: any) => Promise<unknown>) | undefined;
|
|
17
|
+
isLegacy: boolean;
|
|
18
|
+
} | {
|
|
19
|
+
check: ((params?: any) => Promise<any>) | undefined;
|
|
20
|
+
onError: ((error: any) => Promise<void>) | undefined;
|
|
21
|
+
getIdentity: ((params?: any) => Promise<any>) | undefined;
|
|
22
|
+
isProvided?: boolean | undefined;
|
|
23
|
+
login?: ((params: any) => Promise<import("../../../contexts/auth/types").TLoginData>) | undefined;
|
|
24
|
+
register?: ((params: any) => Promise<import("../../../contexts/auth/types").TRegisterData>) | undefined;
|
|
25
|
+
forgotPassword?: ((params: any) => Promise<import("../../../contexts/auth/types").TForgotPasswordData>) | undefined;
|
|
26
|
+
updatePassword?: ((params: any) => Promise<import("../../../contexts/auth/types").TUpdatePasswordData>) | undefined;
|
|
27
|
+
logout?: ((params: any) => Promise<import("../../../contexts/auth/types").TLogoutData>) | undefined;
|
|
28
|
+
checkAuth?: ((params?: any) => Promise<any>) | undefined;
|
|
29
|
+
checkError?: ((error: any) => Promise<void>) | undefined;
|
|
30
|
+
getPermissions?: ((params?: Record<string, any> | undefined) => Promise<any>) | undefined;
|
|
31
|
+
getUserIdentity?: ((params?: any) => Promise<any>) | undefined;
|
|
32
|
+
isLegacy: boolean;
|
|
33
|
+
} | null;
|
|
34
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export declare const useActiveAuthProvider: () => {
|
|
7
7
|
isProvided?: boolean | undefined;
|
|
8
|
-
login?: ((params: any) => Promise<import("
|
|
9
|
-
logout?: ((params: any) => Promise<import("
|
|
10
|
-
check?: ((params?: any) => Promise<import("
|
|
11
|
-
onError?: ((error: any) => Promise<import("
|
|
12
|
-
register?: ((params: any) => Promise<import("
|
|
13
|
-
forgotPassword?: ((params: any) => Promise<import("
|
|
14
|
-
updatePassword?: ((params: any) => Promise<import("
|
|
8
|
+
login?: ((params: any) => Promise<import("../../..").AuthActionResponse>) | undefined;
|
|
9
|
+
logout?: ((params: any) => Promise<import("../../..").AuthActionResponse>) | undefined;
|
|
10
|
+
check?: ((params?: any) => Promise<import("../../..").CheckResponse>) | undefined;
|
|
11
|
+
onError?: ((error: any) => Promise<import("../../..").OnErrorResponse>) | undefined;
|
|
12
|
+
register?: ((params: any) => Promise<import("../../..").AuthActionResponse>) | undefined;
|
|
13
|
+
forgotPassword?: ((params: any) => Promise<import("../../..").AuthActionResponse>) | undefined;
|
|
14
|
+
updatePassword?: ((params: any) => Promise<import("../../..").AuthActionResponse>) | undefined;
|
|
15
15
|
getPermissions?: ((params?: Record<string, any> | undefined) => Promise<unknown>) | undefined;
|
|
16
16
|
getIdentity?: ((params?: any) => Promise<unknown>) | undefined;
|
|
17
17
|
isLegacy: boolean;
|
|
@@ -1 +1,4 @@
|
|
|
1
|
-
{"
|
|
1
|
+
import type { GetListResponse } from "../../../contexts/data/types";
|
|
2
|
+
export declare const getNextPageParam: (lastPage: GetListResponse) => any;
|
|
3
|
+
export declare const getPreviousPageParam: (lastPage: GetListResponse) => any;
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
export declare const useMediaQuery: (query: string) => boolean;
|
|
2
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* A method that the internal uses
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export declare const useUserFriendlyName: () => (name: string | undefined, type: "singular" | "plural") => string;
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* A method that the internal uses
|
|
3
|
+
* @internal
|
|
4
|
+
* @deprecated use `useUserFriendlyName` instead.
|
|
5
|
+
*/
|
|
6
|
+
export declare const userFriendlyResourceName: (resource: string | undefined, type: "singular" | "plural") => string;
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
export declare const userFriendlySecond: (miliseconds: number) => number;
|
|
2
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
export * from "./table";
|
|
2
|
+
export * from "./helpers";
|
|
3
|
+
export * from "./upload";
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,34 @@
|
|
|
1
|
-
{
|
|
1
|
+
import type { CrudFilter, CrudOperators, CrudSort, SortOrder } from "../../contexts/data/types";
|
|
2
|
+
export declare const parseTableParams: (url: string) => {
|
|
3
|
+
parsedCurrent: number | "" | undefined;
|
|
4
|
+
parsedPageSize: number | "" | undefined;
|
|
5
|
+
parsedSorter: CrudSort[];
|
|
6
|
+
parsedFilters: CrudFilter[];
|
|
7
|
+
};
|
|
8
|
+
export declare const parseTableParamsFromQuery: (params: any) => {
|
|
9
|
+
parsedCurrent: number | "" | undefined;
|
|
10
|
+
parsedPageSize: number | "" | undefined;
|
|
11
|
+
parsedSorter: CrudSort[];
|
|
12
|
+
parsedFilters: CrudFilter[];
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* @internal This function is used to stringify table params from the useTable hook.
|
|
16
|
+
*/
|
|
17
|
+
export declare const stringifyTableParams: (params: {
|
|
18
|
+
pagination?: {
|
|
19
|
+
current?: number;
|
|
20
|
+
pageSize?: number;
|
|
21
|
+
};
|
|
22
|
+
sorters: CrudSort[];
|
|
23
|
+
filters: CrudFilter[];
|
|
24
|
+
[key: string]: any;
|
|
25
|
+
}) => string;
|
|
26
|
+
export declare const compareFilters: (left: CrudFilter, right: CrudFilter) => boolean;
|
|
27
|
+
export declare const compareSorters: (left: CrudSort, right: CrudSort) => boolean;
|
|
28
|
+
export declare const unionFilters: (permanentFilter: CrudFilter[], newFilters: CrudFilter[], prevFilters?: CrudFilter[]) => CrudFilter[];
|
|
29
|
+
export declare const unionSorters: (permanentSorter: CrudSort[], newSorters: CrudSort[]) => CrudSort[];
|
|
30
|
+
export declare const setInitialFilters: (permanentFilter: CrudFilter[], defaultFilter: CrudFilter[]) => CrudFilter[];
|
|
31
|
+
export declare const setInitialSorters: (permanentSorter: CrudSort[], defaultSorter: CrudSort[]) => CrudSort[];
|
|
32
|
+
export declare const getDefaultSortOrder: (columnName: string, sorter?: CrudSort[]) => SortOrder | undefined;
|
|
33
|
+
export declare const getDefaultFilter: (columnName: string, filters?: CrudFilter[], operatorType?: CrudOperators) => CrudFilter["value"] | undefined;
|
|
34
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
export declare const file2Base64: (file: any) => Promise<string>;
|
|
2
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
export * from "./file2Base64";
|
|
2
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
export * from "./useCan";
|
|
2
|
+
export * from "./useCanWithoutCache";
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,18 @@
|
|
|
1
|
-
{
|
|
1
|
+
import { type UseQueryOptions, type UseQueryResult } from "@tanstack/react-query";
|
|
2
|
+
import type { CanParams, CanReturnType } from "../../../contexts/accessControl/types";
|
|
3
|
+
export type UseCanProps = CanParams & {
|
|
4
|
+
/**
|
|
5
|
+
* react-query's [useQuery](https://tanstack.com/query/v4/docs/reference/useQuery) options
|
|
6
|
+
*/
|
|
7
|
+
queryOptions?: UseQueryOptions<CanReturnType>;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* `useCan` uses the `can` as the query function for `react-query`'s {@link https://react-query.tanstack.com/guides/queries `useQuery`}. It takes the parameters that `can` takes. It can also be configured with `queryOptions` for `useQuery`. Returns the result of `useQuery`.
|
|
11
|
+
* @see {@link https://refine.dev/docs/api-reference/core/hooks/accessControl/useCan} for more details.
|
|
12
|
+
*
|
|
13
|
+
* @typeParam CanParams {@link https://refine.dev/docs/core/interfaceReferences#canparams}
|
|
14
|
+
* @typeParam CanReturnType {@link https://refine.dev/docs/core/interfaceReferences#canreturntype}
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
export declare const useCan: ({ action, resource, params, queryOptions: hookQueryOptions, }: UseCanProps) => UseQueryResult<CanReturnType>;
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
{"
|
|
1
|
+
import type { IAccessControlContext } from "../../contexts/accessControl/types";
|
|
2
|
+
export declare const useCanWithoutCache: () => IAccessControlContext;
|
|
3
|
+
//# sourceMappingURL=useCanWithoutCache.d.ts.map
|
|
@@ -1 +1,27 @@
|
|
|
1
|
-
{
|
|
1
|
+
import { type UseMutationOptions, type UseMutationResult } from "@tanstack/react-query";
|
|
2
|
+
import type { LogParams } from "../../../contexts/auditLog/types";
|
|
3
|
+
import type { BaseKey } from "../../../contexts/data/types";
|
|
4
|
+
type LogRenameData = {
|
|
5
|
+
resource?: string;
|
|
6
|
+
} | undefined;
|
|
7
|
+
export type UseLogReturnType<TLogData, TLogRenameData> = {
|
|
8
|
+
log: UseMutationResult<TLogData, Error, LogParams>;
|
|
9
|
+
rename: UseMutationResult<TLogRenameData, Error, {
|
|
10
|
+
id: BaseKey;
|
|
11
|
+
name: string;
|
|
12
|
+
}>;
|
|
13
|
+
};
|
|
14
|
+
export type UseLogMutationProps<TLogData, TLogRenameData extends LogRenameData = LogRenameData> = {
|
|
15
|
+
logMutationOptions?: Omit<UseMutationOptions<TLogData, Error, LogParams, unknown>, "mutationFn">;
|
|
16
|
+
renameMutationOptions?: Omit<UseMutationOptions<TLogRenameData, Error, {
|
|
17
|
+
id: BaseKey;
|
|
18
|
+
name: string;
|
|
19
|
+
}, unknown>, "mutationFn" | "onSuccess">;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* useLog is used to `create` a new and `rename` the existing audit log.
|
|
23
|
+
* @see {@link https://refine.dev/docs/api-reference/core/hooks/audit-log/useLog} for more details.
|
|
24
|
+
*/
|
|
25
|
+
export declare const useLog: <TLogData, TLogRenameData extends LogRenameData = LogRenameData>({ logMutationOptions, renameMutationOptions, }?: UseLogMutationProps<TLogData, TLogRenameData>) => UseLogReturnType<TLogData, TLogRenameData>;
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,22 @@
|
|
|
1
|
-
{
|
|
1
|
+
import { type UseQueryOptions, type UseQueryResult } from "@tanstack/react-query";
|
|
2
|
+
import type { HttpError, MetaQuery } from "../../../contexts/data/types";
|
|
3
|
+
export type UseLogProps<TQueryFnData, TError, TData> = {
|
|
4
|
+
resource: string;
|
|
5
|
+
action?: string;
|
|
6
|
+
meta?: Record<number | string, any>;
|
|
7
|
+
author?: Record<number | string, any>;
|
|
8
|
+
queryOptions?: UseQueryOptions<TQueryFnData, TError, TData>;
|
|
9
|
+
metaData?: MetaQuery;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* useLogList is used to get and filter audit logs.
|
|
13
|
+
*
|
|
14
|
+
* @see {@link https://refine.dev/docs/api-reference/core/hooks/audit-log/useLogList} for more details.
|
|
15
|
+
*
|
|
16
|
+
* @typeParam TQueryFnData - Result data returned by the query function.
|
|
17
|
+
* @typeParam TError - Custom error object that extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences#httperror `HttpError`}
|
|
18
|
+
* @typeParam TData - Result data returned by the `select` function. Defaults to `TQueryFnData`
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
export declare const useLogList: <TQueryFnData = any, TError extends HttpError = HttpError, TData = TQueryFnData>({ resource, action, meta, author, metaData, queryOptions, }: UseLogProps<TQueryFnData, TError, TData>) => UseQueryResult<TData>;
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,11 @@
|
|
|
1
|
-
{"
|
|
1
|
+
export { usePermissions } from "./usePermissions";
|
|
2
|
+
export { useGetIdentity } from "./useGetIdentity";
|
|
3
|
+
export { useLogout } from "./useLogout";
|
|
4
|
+
export { useLogin } from "./useLogin";
|
|
5
|
+
export { useRegister } from "./useRegister";
|
|
6
|
+
export { useForgotPassword } from "./useForgotPassword";
|
|
7
|
+
export { useUpdatePassword } from "./useUpdatePassword";
|
|
8
|
+
export { useAuthenticated, useIsAuthenticated } from "./useIsAuthenticated";
|
|
9
|
+
export { useCheckError, useOnError } from "./useOnError";
|
|
10
|
+
export { useIsExistAuthentication } from "./useIsExistAuthentication";
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,22 @@
|
|
|
1
|
-
{
|
|
1
|
+
import { type UseMutationOptions, type UseMutationResult } from "@tanstack/react-query";
|
|
2
|
+
import type { AuthActionResponse, TForgotPasswordData } from "../../../contexts/auth/types";
|
|
3
|
+
import type { RefineError } from "../../../contexts/data/types";
|
|
4
|
+
export type UseForgotPasswordLegacyProps<TVariables> = {
|
|
5
|
+
v3LegacyAuthProviderCompatible: true;
|
|
6
|
+
mutationOptions?: Omit<UseMutationOptions<TForgotPasswordData, Error | RefineError, TVariables, unknown>, "mutationFn" | "onError" | "onSuccess">;
|
|
7
|
+
};
|
|
8
|
+
export type UseForgotPasswordProps<TVariables> = {
|
|
9
|
+
v3LegacyAuthProviderCompatible?: false;
|
|
10
|
+
mutationOptions?: Omit<UseMutationOptions<AuthActionResponse, Error | RefineError, TVariables, unknown>, "mutationFn">;
|
|
11
|
+
};
|
|
12
|
+
export type UseForgotPasswordCombinedProps<TVariables> = {
|
|
13
|
+
v3LegacyAuthProviderCompatible: boolean;
|
|
14
|
+
mutationOptions?: Omit<UseMutationOptions<AuthActionResponse | TForgotPasswordData, Error | RefineError, TVariables, unknown>, "mutationFn">;
|
|
15
|
+
};
|
|
16
|
+
export type UseForgotPasswordLegacyReturnType<TVariables> = UseMutationResult<TForgotPasswordData, Error | RefineError, TVariables, unknown>;
|
|
17
|
+
export type UseForgotPasswordReturnType<TVariables> = UseMutationResult<AuthActionResponse, Error | RefineError, TVariables, unknown>;
|
|
18
|
+
export type UseForgotPasswordCombinedReturnType<TVariables> = UseMutationResult<AuthActionResponse | TForgotPasswordData, Error | RefineError, TVariables, unknown>;
|
|
19
|
+
export declare function useForgotPassword<TVariables = {}>(props: UseForgotPasswordLegacyProps<TVariables>): UseForgotPasswordLegacyReturnType<TVariables>;
|
|
20
|
+
export declare function useForgotPassword<TVariables = {}>(props?: UseForgotPasswordProps<TVariables>): UseForgotPasswordReturnType<TVariables>;
|
|
21
|
+
export declare function useForgotPassword<TVariables = {}>(props?: UseForgotPasswordCombinedProps<TVariables>): UseForgotPasswordCombinedReturnType<TVariables>;
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,21 @@
|
|
|
1
|
-
{
|
|
1
|
+
import { type UseQueryOptions, type UseQueryResult } from "@tanstack/react-query";
|
|
2
|
+
import type { IdentityResponse } from "../../../contexts/auth/types";
|
|
3
|
+
export type UseGetIdentityLegacyProps<TData> = {
|
|
4
|
+
v3LegacyAuthProviderCompatible: true;
|
|
5
|
+
queryOptions?: UseQueryOptions<TData>;
|
|
6
|
+
};
|
|
7
|
+
export type UseGetIdentityProps<TData = IdentityResponse> = {
|
|
8
|
+
v3LegacyAuthProviderCompatible?: false;
|
|
9
|
+
queryOptions?: UseQueryOptions<TData>;
|
|
10
|
+
};
|
|
11
|
+
export type UseGetIdentityCombinedProps<TData = any> = {
|
|
12
|
+
v3LegacyAuthProviderCompatible: boolean;
|
|
13
|
+
queryOptions?: UseQueryOptions<TData> | UseQueryOptions<IdentityResponse>;
|
|
14
|
+
};
|
|
15
|
+
export type UseGetIdentityLegacyReturnType<TData> = UseQueryResult<TData, unknown>;
|
|
16
|
+
export type UseGetIdentityReturnType<TData = IdentityResponse> = UseQueryResult<TData, unknown>;
|
|
17
|
+
export type UsePermissionsCombinedReturnType<TData = any> = UseQueryResult<TData, unknown> | UseQueryResult<IdentityResponse, unknown>;
|
|
18
|
+
export declare function useGetIdentity<TData = any>(props: UseGetIdentityLegacyProps<TData>): UseGetIdentityLegacyReturnType<TData>;
|
|
19
|
+
export declare function useGetIdentity<TData = IdentityResponse>(props?: UseGetIdentityProps<TData>): UseGetIdentityReturnType<TData>;
|
|
20
|
+
export declare function useGetIdentity<TData = any>(props?: UseGetIdentityCombinedProps<TData>): UsePermissionsCombinedReturnType<TData>;
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
export declare const useInvalidateAuthStore: () => () => Promise<void>;
|
|
2
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,25 @@
|
|
|
1
|
-
{"
|
|
1
|
+
import { type UseQueryResult } from "@tanstack/react-query";
|
|
2
|
+
import type { CheckResponse } from "../../../contexts/auth/types";
|
|
3
|
+
export type UseIsAuthenticatedLegacyProps = {
|
|
4
|
+
v3LegacyAuthProviderCompatible: true;
|
|
5
|
+
params?: any;
|
|
6
|
+
};
|
|
7
|
+
export type UseIsAuthenticatedProps = {
|
|
8
|
+
v3LegacyAuthProviderCompatible?: false;
|
|
9
|
+
params?: any;
|
|
10
|
+
};
|
|
11
|
+
export type UseIsAuthenticatedCombinedProps = {
|
|
12
|
+
v3LegacyAuthProviderCompatible: boolean;
|
|
13
|
+
params?: any;
|
|
14
|
+
};
|
|
15
|
+
export type UseIsAuthenticatedLegacyReturnType = UseQueryResult<any, any>;
|
|
16
|
+
export type UseIsAuthenticatedReturnType = UseQueryResult<CheckResponse, any>;
|
|
17
|
+
export type UseIsAuthenticatedCombinedReturnType = UseQueryResult<CheckResponse | any, any>;
|
|
18
|
+
export declare function useIsAuthenticated(props: UseIsAuthenticatedLegacyProps): UseIsAuthenticatedLegacyReturnType;
|
|
19
|
+
export declare function useIsAuthenticated(props?: UseIsAuthenticatedProps): UseIsAuthenticatedReturnType;
|
|
20
|
+
export declare function useIsAuthenticated(props?: UseIsAuthenticatedCombinedProps): UseIsAuthenticatedCombinedReturnType;
|
|
21
|
+
/**
|
|
22
|
+
* @deprecated `useAuthenticated` is deprecated with refine@4, use `useIsAuthenticated` instead, however, we still support `useAuthenticated` for backward compatibility.
|
|
23
|
+
*/
|
|
24
|
+
export declare const useAuthenticated: typeof useIsAuthenticated;
|
|
25
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* A hook that the UI uses
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export declare const useIsExistAuthentication: () => boolean;
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,22 @@
|
|
|
1
|
-
{
|
|
1
|
+
import { type UseMutationOptions, type UseMutationResult } from "@tanstack/react-query";
|
|
2
|
+
import type { AuthActionResponse, TLoginData } from "../../../contexts/auth/types";
|
|
3
|
+
import type { RefineError } from "../../../contexts/data/types";
|
|
4
|
+
export type UseLoginLegacyProps<TVariables> = {
|
|
5
|
+
v3LegacyAuthProviderCompatible: true;
|
|
6
|
+
mutationOptions?: Omit<UseMutationOptions<TLoginData, Error | RefineError, TVariables, unknown>, "mutationFn" | "onError" | "onSuccess">;
|
|
7
|
+
};
|
|
8
|
+
export type UseLoginProps<TVariables> = {
|
|
9
|
+
v3LegacyAuthProviderCompatible?: false;
|
|
10
|
+
mutationOptions?: Omit<UseMutationOptions<AuthActionResponse, Error | RefineError, TVariables, unknown>, "mutationFn">;
|
|
11
|
+
};
|
|
12
|
+
export type UseLoginCombinedProps<TVariables> = {
|
|
13
|
+
v3LegacyAuthProviderCompatible: boolean;
|
|
14
|
+
mutationOptions?: Omit<UseMutationOptions<AuthActionResponse | TLoginData, Error | RefineError, TVariables, unknown>, "mutationFn">;
|
|
15
|
+
};
|
|
16
|
+
export type UseLoginLegacyReturnType<TVariables> = UseMutationResult<TLoginData, Error | RefineError, TVariables, unknown>;
|
|
17
|
+
export type UseLoginReturnType<TVariables> = UseMutationResult<AuthActionResponse, Error | RefineError, TVariables, unknown>;
|
|
18
|
+
export type UseLoginCombinedReturnType<TVariables> = UseMutationResult<AuthActionResponse | TLoginData, Error | RefineError, TVariables, unknown>;
|
|
19
|
+
export declare function useLogin<TVariables = {}>(props: UseLoginLegacyProps<TVariables>): UseLoginLegacyReturnType<TVariables>;
|
|
20
|
+
export declare function useLogin<TVariables = {}>(props?: UseLoginProps<TVariables>): UseLoginReturnType<TVariables>;
|
|
21
|
+
export declare function useLogin<TVariables = {}>(props?: UseLoginCombinedProps<TVariables>): UseLoginCombinedReturnType<TVariables>;
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,26 @@
|
|
|
1
|
-
{
|
|
1
|
+
import { type UseMutationOptions, type UseMutationResult } from "@tanstack/react-query";
|
|
2
|
+
import type { AuthActionResponse, TLogoutData } from "../../../contexts/auth/types";
|
|
3
|
+
import type { RefineError } from "../../../contexts/data/types";
|
|
4
|
+
type Variables = {
|
|
5
|
+
redirectPath?: string | false;
|
|
6
|
+
};
|
|
7
|
+
export type UseLogoutLegacyProps<TVariables> = {
|
|
8
|
+
v3LegacyAuthProviderCompatible: true;
|
|
9
|
+
mutationOptions?: Omit<UseMutationOptions<TLogoutData, Error | RefineError, (TVariables & Variables) | void, unknown>, "mutationFn" | "onError" | "onSuccess">;
|
|
10
|
+
};
|
|
11
|
+
export type UseLogoutProps<TVariables> = {
|
|
12
|
+
v3LegacyAuthProviderCompatible?: false;
|
|
13
|
+
mutationOptions?: Omit<UseMutationOptions<AuthActionResponse, Error | RefineError, (TVariables & Variables) | void, unknown>, "mutationFn">;
|
|
14
|
+
};
|
|
15
|
+
export type UseLogoutCombinedProps<TVariables> = {
|
|
16
|
+
v3LegacyAuthProviderCompatible: boolean;
|
|
17
|
+
mutationOptions?: Omit<UseMutationOptions<AuthActionResponse | TLogoutData, Error | RefineError, (TVariables & Variables) | void, unknown>, "mutationFn">;
|
|
18
|
+
};
|
|
19
|
+
export type UseLogoutLegacyReturnType<TVariables> = UseMutationResult<TLogoutData, Error | RefineError, (TVariables & Variables) | void, unknown>;
|
|
20
|
+
export type UseLogoutReturnType<TVariables> = UseMutationResult<AuthActionResponse, Error | RefineError, (TVariables & Variables) | void, unknown>;
|
|
21
|
+
export type UseLogoutCombinedReturnType<TVariables> = UseMutationResult<AuthActionResponse | TLogoutData, Error | RefineError, (TVariables & Variables) | void, unknown>;
|
|
22
|
+
export declare function useLogout<TVariables = {}>(props: UseLogoutLegacyProps<TVariables>): UseLogoutLegacyReturnType<TVariables>;
|
|
23
|
+
export declare function useLogout<TVariables = {}>(props?: UseLogoutProps<TVariables>): UseLogoutReturnType<TVariables>;
|
|
24
|
+
export declare function useLogout<TVariables = {}>(props?: UseLogoutCombinedProps<TVariables>): UseLogoutCombinedReturnType<TVariables>;
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=index.d.ts.map
|