@refinedev/core 4.45.1 → 4.46.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.
Files changed (39) hide show
  1. package/CHANGELOG.md +74 -0
  2. package/README.md +61 -77
  3. package/dist/components/authenticated/index.d.ts +34 -0
  4. package/dist/components/authenticated/index.d.ts.map +1 -1
  5. package/dist/components/pages/auth/components/login/index.d.ts.map +1 -1
  6. package/dist/components/pages/auth/components/register/index.d.ts.map +1 -1
  7. package/dist/components/pages/welcome/index.d.ts.map +1 -1
  8. package/dist/esm/index.js +6 -6
  9. package/dist/esm/index.js.map +1 -1
  10. package/dist/hooks/data/useMany.d.ts +1 -1
  11. package/dist/hooks/data/useMany.d.ts.map +1 -1
  12. package/dist/hooks/data/useOne.d.ts +1 -1
  13. package/dist/hooks/data/useOne.d.ts.map +1 -1
  14. package/dist/hooks/form/useForm.d.ts +1 -1
  15. package/dist/hooks/form/useForm.d.ts.map +1 -1
  16. package/dist/hooks/show/useShow.d.ts +3 -3
  17. package/dist/hooks/show/useShow.d.ts.map +1 -1
  18. package/dist/hooks/useSelect/index.d.ts +3 -3
  19. package/dist/hooks/useSelect/index.d.ts.map +1 -1
  20. package/dist/iife/index.js +6 -6
  21. package/dist/iife/index.js.map +1 -1
  22. package/dist/index.js +6 -6
  23. package/dist/index.js.map +1 -1
  24. package/dist/interfaces/auth.d.ts +12 -0
  25. package/dist/interfaces/auth.d.ts.map +1 -1
  26. package/package.json +1 -1
  27. package/src/components/authenticated/index.tsx +118 -139
  28. package/src/components/pages/auth/components/login/index.tsx +110 -84
  29. package/src/components/pages/auth/components/register/index.tsx +88 -65
  30. package/src/components/pages/welcome/index.tsx +125 -124
  31. package/src/hooks/auth/useLogin/index.ts +4 -4
  32. package/src/hooks/auth/useLogout/index.ts +4 -4
  33. package/src/hooks/auth/useRegister/index.ts +5 -4
  34. package/src/hooks/data/useMany.ts +1 -1
  35. package/src/hooks/data/useOne.ts +1 -1
  36. package/src/hooks/form/useForm.ts +1 -1
  37. package/src/hooks/show/useShow.ts +3 -3
  38. package/src/hooks/useSelect/index.ts +3 -2
  39. package/src/interfaces/auth.tsx +12 -0
@@ -26,6 +26,7 @@ export const RegisterPage: React.FC<RegisterProps> = ({
26
26
  renderContent,
27
27
  formProps,
28
28
  title = undefined,
29
+ hideForm,
29
30
  }) => {
30
31
  const routerType = useRouterType();
31
32
  const Link = useLink();
@@ -85,75 +86,97 @@ export const RegisterPage: React.FC<RegisterProps> = ({
85
86
  {translate("pages.register.title", "Sign up for your account")}
86
87
  </h1>
87
88
  {renderProviders()}
88
- <hr />
89
- <form
90
- onSubmit={(e) => {
91
- e.preventDefault();
92
- register({ email, password });
93
- }}
94
- {...formProps}
95
- >
96
- <div
97
- style={{
98
- display: "flex",
99
- flexDirection: "column",
100
- padding: 25,
101
- }}
102
- >
103
- <label htmlFor="email-input">
104
- {translate("pages.register.fields.email", "Email")}
105
- </label>
106
- <input
107
- id="email-input"
108
- name="email"
109
- type="email"
110
- size={20}
111
- autoCorrect="off"
112
- spellCheck={false}
113
- autoCapitalize="off"
114
- required
115
- value={email}
116
- onChange={(e) => setEmail(e.target.value)}
117
- />
118
- <label htmlFor="password-input">
119
- {translate(
120
- "pages.register.fields.password",
121
- "Password",
122
- )}
123
- </label>
124
- <input
125
- id="password-input"
126
- name="password"
127
- type="password"
128
- required
129
- size={20}
130
- value={password}
131
- onChange={(e) => setPassword(e.target.value)}
132
- />
133
- <input
134
- type="submit"
135
- value={translate(
136
- "pages.register.buttons.submit",
137
- "Sign up",
138
- )}
139
- disabled={isLoading}
140
- />
141
- {loginLink ?? (
142
- <>
143
- <span>
89
+ {!hideForm && (
90
+ <>
91
+ <hr />
92
+ <form
93
+ onSubmit={(e) => {
94
+ e.preventDefault();
95
+ register({ email, password });
96
+ }}
97
+ {...formProps}
98
+ >
99
+ <div
100
+ style={{
101
+ display: "flex",
102
+ flexDirection: "column",
103
+ padding: 25,
104
+ }}
105
+ >
106
+ <label htmlFor="email-input">
144
107
  {translate(
145
- "pages.login.buttons.haveAccount",
146
- "Have an account?",
147
- )}{" "}
148
- {renderLink(
149
- "/login",
150
- translate("pages.login.signin", "Sign in"),
108
+ "pages.register.fields.email",
109
+ "Email",
110
+ )}
111
+ </label>
112
+ <input
113
+ id="email-input"
114
+ name="email"
115
+ type="email"
116
+ size={20}
117
+ autoCorrect="off"
118
+ spellCheck={false}
119
+ autoCapitalize="off"
120
+ required
121
+ value={email}
122
+ onChange={(e) => setEmail(e.target.value)}
123
+ />
124
+ <label htmlFor="password-input">
125
+ {translate(
126
+ "pages.register.fields.password",
127
+ "Password",
128
+ )}
129
+ </label>
130
+ <input
131
+ id="password-input"
132
+ name="password"
133
+ type="password"
134
+ required
135
+ size={20}
136
+ value={password}
137
+ onChange={(e) => setPassword(e.target.value)}
138
+ />
139
+ <input
140
+ type="submit"
141
+ value={translate(
142
+ "pages.register.buttons.submit",
143
+ "Sign up",
151
144
  )}
152
- </span>
153
- </>
145
+ disabled={isLoading}
146
+ />
147
+ {loginLink ?? (
148
+ <>
149
+ <span>
150
+ {translate(
151
+ "pages.login.buttons.haveAccount",
152
+ "Have an account?",
153
+ )}{" "}
154
+ {renderLink(
155
+ "/login",
156
+ translate(
157
+ "pages.login.signin",
158
+ "Sign in",
159
+ ),
160
+ )}
161
+ </span>
162
+ </>
163
+ )}
164
+ </div>
165
+ </form>
166
+ </>
167
+ )}
168
+ {loginLink !== false && hideForm && (
169
+ <div style={{ textAlign: "center" }}>
170
+ {translate(
171
+ "pages.login.buttons.haveAccount",
172
+ "Have an account?",
173
+ )}{" "}
174
+ {renderLink(
175
+ "/login",
176
+ translate("pages.login.signin", "Sign in"),
154
177
  )}
155
178
  </div>
156
- </form>
179
+ )}
157
180
  </div>
158
181
  );
159
182
 
@@ -6,95 +6,41 @@ type CardInfo = {
6
6
  title: string;
7
7
  description: string;
8
8
  link: string;
9
- icon: React.ReactNode;
9
+ iconUrl: string;
10
10
  };
11
11
 
12
- const CARDS: CardInfo[] = [
12
+ const cards: CardInfo[] = [
13
13
  {
14
14
  title: "Documentation",
15
15
  description:
16
16
  "Learn about the technical details of using refine in your projects.",
17
17
  link: "https://refine.dev/",
18
- icon: (
19
- <svg
20
- width="14"
21
- height="16"
22
- fill="none"
23
- xmlns="http://www.w3.org/2000/svg"
24
- >
25
- <path
26
- d="M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V5a1 1 0 0 0-1-1H3a1 1 0 0 1 0-2h10a1 1 0 1 0 0-2H2Z"
27
- fill="#fff"
28
- />
29
- </svg>
30
- ),
18
+ iconUrl:
19
+ "https://refine.ams3.cdn.digitaloceanspaces.com/welcome-page/book.svg",
31
20
  },
32
21
  {
33
22
  title: "Tutorial",
34
23
  description:
35
24
  "Learn how to use refine by building a fully-functioning CRUD app, from scratch to full launch.",
36
25
  link: "https://refine.dev/docs/tutorial/introduction/index/",
37
- icon: (
38
- <svg
39
- width="16"
40
- height="14"
41
- fill="none"
42
- xmlns="http://www.w3.org/2000/svg"
43
- >
44
- <path
45
- d="M0 4.573c0-.475.163-.948.53-1.25a4.57 4.57 0 0 1 .854-.553L5.956.485a4.571 4.571 0 0 1 4.088 0l4.572 2.285c.308.154.594.34.853.553.306.251.47.62.517 1.01.01.055.014.112.014.169v6.5a1 1 0 0 1-2 0V6.684l-3.956 1.978a4.571 4.571 0 0 1-4.088 0L1.384 6.376a4.57 4.57 0 0 1-.853-.553C.163 5.522 0 5.05 0 4.573Z"
46
- fill="#fff"
47
- />
48
- <path
49
- d="M5.061 13.305 3 12.274V9.42l2.061 1.031a6.571 6.571 0 0 0 5.878 0L13 9.421v2.853l-2.061 1.03a6.571 6.571 0 0 1-5.878 0Z"
50
- fill="#fff"
51
- />
52
- </svg>
53
- ),
26
+ iconUrl:
27
+ "https://refine.ams3.cdn.digitaloceanspaces.com/welcome-page/hat.svg",
54
28
  },
55
29
  {
56
30
  title: "Examples",
57
31
  description:
58
32
  "A collection of reference applications you can use as a starting point.",
59
33
  link: "https://refine.dev/examples",
60
- icon: (
61
- <svg
62
- width="16"
63
- height="16"
64
- fill="none"
65
- xmlns="http://www.w3.org/2000/svg"
66
- >
67
- <path
68
- fillRule="evenodd"
69
- clipRule="evenodd"
70
- d="M0 2a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v4H0V2Zm3 2a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm4-1a1 1 0 1 1-2 0 1 1 0 0 1 2 0Zm2 1a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"
71
- fill="#fff"
72
- />
73
- <path
74
- d="M0 14V8h16v6a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2Z"
75
- fill="#fff"
76
- />
77
- </svg>
78
- ),
34
+ iconUrl:
35
+ "https://refine.ams3.cdn.digitaloceanspaces.com/welcome-page/application.svg",
79
36
  },
80
37
  {
81
38
  title: "Community",
82
39
  description:
83
40
  "Join our Discord community and keep up with the latest news.",
84
41
  link: "https://discord.gg/refine",
85
- icon: (
86
- <svg
87
- width="16"
88
- height="12"
89
- fill="none"
90
- xmlns="http://www.w3.org/2000/svg"
91
- >
92
- <path
93
- d="M13.553 1.005A13.334 13.334 0 0 0 10.253 0c-.156.276-.298.56-.423.85a12.42 12.42 0 0 0-3.664 0A8.975 8.975 0 0 0 5.744 0 13.43 13.43 0 0 0 2.44 1.007C.351 4.066-.215 7.05.068 9.99A13.36 13.36 0 0 0 4.116 12c.328-.436.618-.9.867-1.384a8.647 8.647 0 0 1-1.365-.645c.115-.082.227-.167.335-.249a9.594 9.594 0 0 0 8.094 0c.11.089.222.173.335.25-.436.254-.894.47-1.368.646.249.484.539.946.867 1.382a13.3 13.3 0 0 0 4.051-2.01c.332-3.41-.568-6.365-2.379-8.985Zm-8.21 7.176c-.79 0-1.442-.709-1.442-1.58 0-.872.63-1.587 1.439-1.587s1.456.715 1.442 1.586c-.014.872-.636 1.58-1.44 1.58Zm5.315 0c-.79 0-1.44-.709-1.44-1.58 0-.872.63-1.587 1.44-1.587.81 0 1.452.715 1.438 1.586-.014.872-.634 1.58-1.438 1.58Z"
94
- fill="#fff"
95
- />
96
- </svg>
97
- ),
42
+ iconUrl:
43
+ "https://refine.ams3.cdn.digitaloceanspaces.com/welcome-page/discord.svg",
98
44
  },
99
45
  ];
100
46
 
@@ -111,7 +57,7 @@ export const WelcomePage: React.FC = () => {
111
57
  } else if (isTablet) {
112
58
  return "2, 280px";
113
59
  } else {
114
- return "4, 208px";
60
+ return "4, 1fr";
115
61
  }
116
62
  };
117
63
 
@@ -138,76 +84,122 @@ export const WelcomePage: React.FC = () => {
138
84
  return (
139
85
  <div
140
86
  style={{
141
- backgroundImage:
142
- "url(https://refine.ams3.cdn.digitaloceanspaces.com/welcome-page/welcome-page.webp)",
143
- backgroundPosition: "center top",
144
- backgroundSize: "cover",
145
- backgroundRepeat: "no-repeat",
146
- minHeight: "100vh",
147
- backgroundColor: "#0D0D12",
148
- fontFamily: "Arial",
149
- color: "#FFFFFF",
87
+ position: "fixed",
88
+ zIndex: 10,
89
+ inset: 0,
90
+ overflow: "auto",
91
+ width: "100dvw",
92
+ height: "100dvh",
150
93
  }}
151
94
  >
152
- <div style={{ height: "89px" }}></div>
153
- <div style={{ display: "flex", justifyContent: "center" }}>
154
- <img
155
- src="https://refine.ams3.cdn.digitaloceanspaces.com/welcome-page/welcome-logo.webp"
156
- width="198"
157
- height="54"
158
- />
159
- </div>
160
95
  <div
161
96
  style={{
162
- height: isTablet ? "270px" : "22vw",
163
- minHeight: isTablet ? "270px" : "313px",
164
- }}
165
- ></div>
166
- <div
167
- style={{
168
- display: "flex",
169
- flexDirection: "column",
170
- gap: "16px",
171
- textAlign: "center",
97
+ overflow: "hidden",
98
+ position: "relative",
99
+ backgroundSize: "cover",
100
+ backgroundRepeat: "no-repeat",
101
+ background: isMobile
102
+ ? "url(https://refine.ams3.cdn.digitaloceanspaces.com/website/static/assets/landing-noise.webp), radial-gradient(88.89% 50% at 50% 100%, rgba(38, 217, 127, 0.10) 0%, rgba(38, 217, 127, 0.00) 100%), radial-gradient(88.89% 50% at 50% 0%, rgba(71, 235, 235, 0.15) 0%, rgba(71, 235, 235, 0.00) 100%), #1D1E30"
103
+ : isTablet
104
+ ? "url(https://refine.ams3.cdn.digitaloceanspaces.com/website/static/assets/landing-noise.webp), radial-gradient(66.67% 50% at 50% 100%, rgba(38, 217, 127, 0.10) 0%, rgba(38, 217, 127, 0.00) 100%), radial-gradient(66.67% 50% at 50% 0%, rgba(71, 235, 235, 0.15) 0%, rgba(71, 235, 235, 0.00) 100%), #1D1E30"
105
+ : "url(https://refine.ams3.cdn.digitaloceanspaces.com/website/static/assets/landing-noise.webp), radial-gradient(35.56% 50% at 50% 100%, rgba(38, 217, 127, 0.12) 0%, rgba(38, 217, 127, 0) 100%), radial-gradient(35.56% 50% at 50% 0%, rgba(71, 235, 235, 0.18) 0%, rgba(71, 235, 235, 0) 100%), #1D1E30",
106
+ minHeight: "100%",
107
+ minWidth: "100%",
108
+ fontFamily: "Arial",
109
+ color: "#FFFFFF",
172
110
  }}
173
111
  >
174
- <h1
112
+ <div
113
+ style={{
114
+ zIndex: 2,
115
+ position: "absolute",
116
+ width: isMobile ? "400px" : "800px",
117
+ height: "552px",
118
+ opacity: "0.5",
119
+ background:
120
+ "url(https://refine.ams3.cdn.digitaloceanspaces.com/assets/welcome-page-hexagon.png)",
121
+ backgroundRepeat: "no-repeat",
122
+ backgroundSize: "contain",
123
+ top: "0",
124
+ left: "50%",
125
+ transform: "translateX(-50%)",
126
+ }}
127
+ />
128
+ <div style={{ height: isMobile ? "40px" : "80px" }}></div>
129
+ <div style={{ display: "flex", justifyContent: "center" }}>
130
+ <div
131
+ style={{
132
+ backgroundRepeat: "no-repeat",
133
+ backgroundSize: isMobile
134
+ ? "112px 58px"
135
+ : "224px 116px",
136
+ backgroundImage:
137
+ "url(https://refine.ams3.cdn.digitaloceanspaces.com/assets/refine-logo.svg)",
138
+ width: isMobile ? 112 : 224,
139
+ height: isMobile ? 58 : 116,
140
+ }}
141
+ />
142
+ </div>
143
+ <div
175
144
  style={{
176
- fontSize: getHeaderFontSize(),
177
- fontWeight: 700,
178
- margin: "0px",
145
+ height: isMobile
146
+ ? "120px"
147
+ : isTablet
148
+ ? "270px"
149
+ : "40vh",
150
+ minHeight: isMobile
151
+ ? "120px"
152
+ : isTablet
153
+ ? "270px"
154
+ : "270px",
155
+ }}
156
+ ></div>
157
+ <div
158
+ style={{
159
+ display: "flex",
160
+ flexDirection: "column",
161
+ gap: "16px",
162
+ textAlign: "center",
179
163
  }}
180
164
  >
181
- Welcome Aboard!
182
- </h1>
183
- <h4
165
+ <h1
166
+ style={{
167
+ fontSize: getHeaderFontSize(),
168
+ fontWeight: 700,
169
+ margin: "0px",
170
+ }}
171
+ >
172
+ Welcome Aboard!
173
+ </h1>
174
+ <h4
175
+ style={{
176
+ fontSize: getSubHeaderFontSize(),
177
+ fontWeight: 400,
178
+ margin: "0px",
179
+ }}
180
+ >
181
+ Your configuration is completed.
182
+ </h4>
183
+ </div>
184
+ <div style={{ height: "64px" }}></div>
185
+ <div
184
186
  style={{
185
- fontSize: getSubHeaderFontSize(),
186
- fontWeight: 400,
187
- margin: "0px",
187
+ display: "grid",
188
+ gridTemplateColumns: `repeat(${getGridTemplateColumns()})`,
189
+ justifyContent: "center",
190
+ gap: "48px",
191
+ paddingRight: "16px",
192
+ paddingLeft: "16px",
193
+ paddingBottom: "32px",
194
+ maxWidth: "976px",
195
+ margin: "auto",
188
196
  }}
189
197
  >
190
- Your configuration is completed.
191
- </h4>
198
+ {cards.map((card) => (
199
+ <Card key={`welcome-page-${card.title}`} card={card} />
200
+ ))}
201
+ </div>
192
202
  </div>
193
- <div style={{ height: "64px" }}></div>
194
- <div
195
- style={{
196
- display: "grid",
197
- gridTemplateColumns: `repeat(${getGridTemplateColumns()})`,
198
- justifyContent: "center",
199
- gap: "48px",
200
- paddingRight: "16px",
201
- paddingLeft: "16px",
202
- maxWidth: "976px",
203
- margin: "auto",
204
- }}
205
- >
206
- {CARDS.map((card) => (
207
- <Card key={`welcome-page-${card.title}`} card={card} />
208
- ))}
209
- </div>
210
- <div style={{ height: "64px" }}></div>
211
203
  </div>
212
204
  );
213
205
  };
@@ -217,7 +209,7 @@ type CardProps = {
217
209
  };
218
210
 
219
211
  const Card: React.FC<CardProps> = ({ card }) => {
220
- const { title, description, icon, link } = card;
212
+ const { title, description, iconUrl, link } = card;
221
213
 
222
214
  const [isHover, setIsHover] = useState(false);
223
215
 
@@ -246,7 +238,16 @@ const Card: React.FC<CardProps> = ({ card }) => {
246
238
  }}
247
239
  href={link}
248
240
  >
249
- {icon}
241
+ <div
242
+ style={{
243
+ width: "16px",
244
+ height: "16px",
245
+ backgroundPosition: "center",
246
+ backgroundSize: "contain",
247
+ backgroundRepeat: "no-repeat",
248
+ backgroundImage: `url(${iconUrl})`,
249
+ }}
250
+ />
250
251
  <span
251
252
  style={{
252
253
  fontSize: "16px",
@@ -155,8 +155,6 @@ export function useLogin<TVariables = {}>({
155
155
  open?.(buildNotification(error));
156
156
  }
157
157
 
158
- await invalidateAuthStore();
159
-
160
158
  if (to && success) {
161
159
  if (routerType === "legacy") {
162
160
  replace(to as string);
@@ -174,6 +172,8 @@ export function useLogin<TVariables = {}>({
174
172
  replace("/");
175
173
  }
176
174
  }
175
+
176
+ await invalidateAuthStore();
177
177
  },
178
178
  onError: (error: any) => {
179
179
  open?.(buildNotification(error));
@@ -200,8 +200,6 @@ export function useLogin<TVariables = {}>({
200
200
  legacyLoginFromContext,
201
201
  {
202
202
  onSuccess: async (redirectPathFromAuth) => {
203
- await invalidateAuthStore();
204
-
205
203
  if (to) {
206
204
  replace(to as string);
207
205
  }
@@ -222,6 +220,8 @@ export function useLogin<TVariables = {}>({
222
220
  }
223
221
  }
224
222
 
223
+ await invalidateAuthStore();
224
+
225
225
  close?.("login-error");
226
226
  },
227
227
  onError: (error: any) => {
@@ -133,8 +133,6 @@ export function useLogout<TVariables = {}>({
133
133
  open?.(buildNotification(error));
134
134
  }
135
135
 
136
- await invalidateAuthStore();
137
-
138
136
  if (redirect !== false) {
139
137
  if (routerType === "legacy") {
140
138
  push(redirect ?? "/login");
@@ -144,6 +142,8 @@ export function useLogout<TVariables = {}>({
144
142
  }
145
143
  }
146
144
  }
145
+
146
+ await invalidateAuthStore();
147
147
  },
148
148
  onError: (error: any) => {
149
149
  open?.(buildNotification(error));
@@ -172,8 +172,6 @@ export function useLogout<TVariables = {}>({
172
172
  onSuccess: async (data, variables) => {
173
173
  const redirectPath = variables?.redirectPath ?? data;
174
174
 
175
- await invalidateAuthStore();
176
-
177
175
  if (redirectPath === false) {
178
176
  return;
179
177
  }
@@ -192,6 +190,8 @@ export function useLogout<TVariables = {}>({
192
190
  } else {
193
191
  go({ to: "/login" });
194
192
  }
193
+
194
+ await invalidateAuthStore();
195
195
  },
196
196
  onError: (error: any) => {
197
197
  open?.(buildNotification(error));
@@ -133,8 +133,6 @@ export function useRegister<TVariables = {}>({
133
133
  open?.(buildNotification(error));
134
134
  }
135
135
 
136
- await invalidateAuthStore();
137
-
138
136
  if (redirectTo) {
139
137
  if (routerType === "legacy") {
140
138
  replace(redirectTo);
@@ -146,6 +144,8 @@ export function useRegister<TVariables = {}>({
146
144
  replace("/");
147
145
  }
148
146
  }
147
+
148
+ await invalidateAuthStore();
149
149
  },
150
150
  onError: (error: any) => {
151
151
  open?.(buildNotification(error));
@@ -173,8 +173,6 @@ export function useRegister<TVariables = {}>({
173
173
  legacyRegisterFromContext,
174
174
  {
175
175
  onSuccess: async (redirectPathFromAuth) => {
176
- await invalidateAuthStore();
177
-
178
176
  if (redirectPathFromAuth !== false) {
179
177
  if (redirectPathFromAuth) {
180
178
  if (routerType === "legacy") {
@@ -189,6 +187,9 @@ export function useRegister<TVariables = {}>({
189
187
  go({ to: "/", type: "replace" });
190
188
  }
191
189
  }
190
+
191
+ await invalidateAuthStore();
192
+
192
193
  close?.("register-error");
193
194
  }
194
195
  },
@@ -103,7 +103,7 @@ export const useMany = <
103
103
  dataProviderName,
104
104
  overtimeOptions,
105
105
  }: UseManyProps<TQueryFnData, TError, TData>): QueryObserverResult<
106
- GetManyResponse<TData>
106
+ GetManyResponse<TData>, TError
107
107
  > &
108
108
  UseLoadingOvertimeReturnType => {
109
109
  const { resources, resource, identifier } = useResource(resourceFromProp);
@@ -107,7 +107,7 @@ export const useOne = <
107
107
  dataProviderName,
108
108
  overtimeOptions,
109
109
  }: UseOneProps<TQueryFnData, TError, TData>): QueryObserverResult<
110
- GetOneResponse<TData>
110
+ GetOneResponse<TData>, TError
111
111
  > &
112
112
  UseLoadingOvertimeReturnType => {
113
113
  const { resources, resource, identifier } = useResource(resourceFromProp);
@@ -206,7 +206,7 @@ export type UseFormReturnType<
206
206
  > = {
207
207
  id?: BaseKey;
208
208
  setId: Dispatch<SetStateAction<BaseKey | undefined>>;
209
- queryResult?: QueryObserverResult<GetOneResponse<TData>>;
209
+ queryResult?: QueryObserverResult<GetOneResponse<TData>, TError>;
210
210
  mutationResult:
211
211
  | UseUpdateReturnType<TResponse, TResponseError, TVariables>
212
212
  | UseCreateReturnType<TResponse, TResponseError, TVariables>;
@@ -22,8 +22,8 @@ import {
22
22
  UseLoadingOvertimeReturnType,
23
23
  } from "../useLoadingOvertime";
24
24
 
25
- export type useShowReturnType<TData extends BaseRecord = BaseRecord> = {
26
- queryResult: QueryObserverResult<GetOneResponse<TData>>;
25
+ export type useShowReturnType<TData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError> = {
26
+ queryResult: QueryObserverResult<GetOneResponse<TData>, TError>;
27
27
  showId?: BaseKey;
28
28
  setShowId: React.Dispatch<React.SetStateAction<BaseKey | undefined>>;
29
29
  } & UseLoadingOvertimeReturnType;
@@ -106,7 +106,7 @@ export const useShow = <
106
106
  TQueryFnData,
107
107
  TError,
108
108
  TData
109
- > = {}): useShowReturnType<TData> => {
109
+ > = {}): useShowReturnType<TData, TError> => {
110
110
  const {
111
111
  resource,
112
112
  id: idFromRoute,