@refinedev/core 4.42.4 → 4.44.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.
@@ -1,2 +1,29 @@
1
- export declare const useGo: () => import("../../..").GoFunction;
1
+ import type { Action, BaseKey, GoConfig as GoConfigBase, IResourceItem } from "../../../interfaces";
2
+ declare type ResourceWithoutId = {
3
+ /**
4
+ * The name or identifier of the resource.
5
+ */
6
+ resource: string;
7
+ action: Extract<Action, "create" | "list">;
8
+ id?: never;
9
+ };
10
+ declare type ResourceWithId = {
11
+ /**
12
+ * The name or identifier of the resource.
13
+ */
14
+ resource: string;
15
+ action: Extract<Action, "edit" | "show" | "clone">;
16
+ id: BaseKey;
17
+ };
18
+ export declare type Resource = ResourceWithoutId | ResourceWithId;
19
+ export declare type GoConfigWithResource = Omit<GoConfigBase, "to"> & {
20
+ to?: GoConfigBase["to"] | Resource;
21
+ };
22
+ export declare const useGo: () => (config: GoConfigWithResource | GoConfigBase) => string | void;
23
+ /**
24
+ * handle errors for resource
25
+ * @internal
26
+ */
27
+ export declare const handleResourceErrors: (to: Resource, resource: IResourceItem) => void;
28
+ export {};
2
29
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/router/use-go/index.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,KAAK,qCAWjB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/router/use-go/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACR,MAAM,EACN,OAAO,EACP,QAAQ,IAAI,YAAY,EACxB,aAAa,EAChB,MAAM,qBAAqB,CAAC;AAG7B,aAAK,iBAAiB,GAAG;IACrB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,QAAQ,GAAG,MAAM,CAAC,CAAC;IAC3C,EAAE,CAAC,EAAE,KAAK,CAAC;CACd,CAAC;AAEF,aAAK,cAAc,GAAG;IAClB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;IACnD,EAAE,EAAE,OAAO,CAAC;CACf,CAAC;AAEF,oBAAY,QAAQ,GAAG,iBAAiB,GAAG,cAAc,CAAC;AAE1D,oBAAY,oBAAoB,GAAG,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,GAAG;IAC1D,EAAE,CAAC,EAAE,YAAY,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC;CACtC,CAAC;AAEF,eAAO,MAAM,KAAK,iBAaD,oBAAoB,GAAG,YAAY,kBA0BnD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,OAAQ,QAAQ,YAAY,aAAa,SAiBzE,CAAC"}