@szymonpiatek/nextwordpress 0.0.16 → 0.0.17
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/dist/client/index.cjs +5 -4
- package/dist/client/index.cjs.map +1 -1
- package/dist/client/index.d.cts +1 -1
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.js +5 -4
- package/dist/client/index.js.map +1 -1
- package/dist/hooks/index.cjs +5 -4
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.cts +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.js +5 -4
- package/dist/hooks/index.js.map +1 -1
- package/dist/index.cjs +5 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +5 -4
- package/dist/index.js.map +1 -1
- package/dist/server/index.cjs +5 -4
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.d.cts +1 -1
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.js +5 -4
- package/dist/server/index.js.map +1 -1
- package/dist/{types-CvO7Ijbs.d.cts → types-DVzJO3P-.d.cts} +0 -3
- package/dist/{types-CvO7Ijbs.d.ts → types-DVzJO3P-.d.ts} +0 -3
- package/package.json +1 -1
package/dist/client/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { AuthContextValue, AuthProvider, AuthUser, CartAction, CartContextValue, CartItem, CartProvider, CheckoutOptions, CustomerContextValue, WooCommerceCustomerProvider, cartReducer, useAuth, useCF7Submit, useCart, useCookieConsent, useCustomer, useFeaturedProducts, useGQLPostBySlug, useGQLPosts, usePost, usePostBySlug, usePosts, usePostsPaginated, useProduct, useProductBySlug, useProducts, useProductsPaginated, useResetUserPassword, useSendPasswordResetEmail, useWPGraphQL, useWPULike, useWPULikeCheck, useWPULikeStats } from '../hooks/index.cjs';
|
|
2
2
|
import 'react';
|
|
3
|
-
import '../types-
|
|
3
|
+
import '../types-DVzJO3P-.cjs';
|
|
4
4
|
import 'swr/mutation';
|
|
5
5
|
import 'swr';
|
package/dist/client/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { AuthContextValue, AuthProvider, AuthUser, CartAction, CartContextValue, CartItem, CartProvider, CheckoutOptions, CustomerContextValue, WooCommerceCustomerProvider, cartReducer, useAuth, useCF7Submit, useCart, useCookieConsent, useCustomer, useFeaturedProducts, useGQLPostBySlug, useGQLPosts, usePost, usePostBySlug, usePosts, usePostsPaginated, useProduct, useProductBySlug, useProducts, useProductsPaginated, useResetUserPassword, useSendPasswordResetEmail, useWPGraphQL, useWPULike, useWPULikeCheck, useWPULikeStats } from '../hooks/index.js';
|
|
2
2
|
import 'react';
|
|
3
|
-
import '../types-
|
|
3
|
+
import '../types-DVzJO3P-.js';
|
|
4
4
|
import 'swr/mutation';
|
|
5
5
|
import 'swr';
|
package/dist/client/index.js
CHANGED
|
@@ -305,9 +305,6 @@ var GQL_SEND_PASSWORD_RESET_EMAIL = `
|
|
|
305
305
|
mutation SendPasswordResetEmail($input: SendPasswordResetEmailInput!) {
|
|
306
306
|
sendPasswordResetEmail(input: $input) {
|
|
307
307
|
success
|
|
308
|
-
user {
|
|
309
|
-
email
|
|
310
|
-
}
|
|
311
308
|
}
|
|
312
309
|
}
|
|
313
310
|
`;
|
|
@@ -326,7 +323,11 @@ function createPasswordResetMutations(fetcher) {
|
|
|
326
323
|
const { gqlMutate } = fetcher;
|
|
327
324
|
async function sendPasswordResetEmail(input) {
|
|
328
325
|
const data = await gqlMutate(GQL_SEND_PASSWORD_RESET_EMAIL, { input });
|
|
329
|
-
|
|
326
|
+
const result = data.sendPasswordResetEmail;
|
|
327
|
+
if (!result.success) {
|
|
328
|
+
throw new WPGraphQLError(ErrorCode.GQL_ERRORS_IN_RESPONSE, 200, "sendPasswordResetEmail", "User not found");
|
|
329
|
+
}
|
|
330
|
+
return result;
|
|
330
331
|
}
|
|
331
332
|
async function resetUserPassword(input) {
|
|
332
333
|
const data = await gqlMutate(GQL_RESET_USER_PASSWORD, { input });
|