@szymonpiatek/nextwordpress 0.0.17 → 0.0.18
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 +84 -38
- package/dist/client/index.cjs.map +1 -1
- package/dist/client/index.d.cts +2 -2
- package/dist/client/index.d.ts +2 -2
- package/dist/client/index.js +83 -39
- package/dist/client/index.js.map +1 -1
- package/dist/hooks/index.cjs +84 -38
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.cts +16 -4
- package/dist/hooks/index.d.ts +16 -4
- package/dist/hooks/index.js +83 -39
- package/dist/hooks/index.js.map +1 -1
- package/dist/index.cjs +24 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -11
- package/dist/index.d.ts +13 -11
- package/dist/index.js +24 -3
- package/dist/index.js.map +1 -1
- package/dist/server/index.cjs +24 -3
- 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 +24 -3
- package/dist/server/index.js.map +1 -1
- package/dist/{types-DVzJO3P-.d.cts → types-CM3v08Fh.d.cts} +31 -16
- package/dist/{types-DVzJO3P-.d.ts → types-CM3v08Fh.d.ts} +31 -16
- package/package.json +1 -1
package/dist/server/index.cjs
CHANGED
|
@@ -309,6 +309,26 @@ function createMediaMutations(fetcher) {
|
|
|
309
309
|
return { uploadMedia, updateMedia, deleteMedia };
|
|
310
310
|
}
|
|
311
311
|
|
|
312
|
+
// src/integrations/restApi/core/mutations/passwordReset/mutations.ts
|
|
313
|
+
function createPasswordResetMutations(fetcher) {
|
|
314
|
+
const { wpMutate } = fetcher;
|
|
315
|
+
async function sendPasswordResetEmail(input) {
|
|
316
|
+
return wpMutate(
|
|
317
|
+
"/wp-json/wp/v2/users/lost-password",
|
|
318
|
+
input,
|
|
319
|
+
"POST"
|
|
320
|
+
);
|
|
321
|
+
}
|
|
322
|
+
async function resetUserPassword(input) {
|
|
323
|
+
return wpMutate(
|
|
324
|
+
"/wp-json/wp/v2/users/reset-password",
|
|
325
|
+
input,
|
|
326
|
+
"POST"
|
|
327
|
+
);
|
|
328
|
+
}
|
|
329
|
+
return { sendPasswordResetEmail, resetUserPassword };
|
|
330
|
+
}
|
|
331
|
+
|
|
312
332
|
// src/integrations/restApi/core/client/types.ts
|
|
313
333
|
var WordPressAPIError = class extends Error {
|
|
314
334
|
constructor(code, status, endpoint, message, detail) {
|
|
@@ -443,7 +463,8 @@ function createWordPressMutationsClient(config) {
|
|
|
443
463
|
...createTagsMutations(fetcher),
|
|
444
464
|
...createAuthorsMutations(fetcher),
|
|
445
465
|
...createMenusMutations(fetcher),
|
|
446
|
-
...createMediaMutations(fetcher)
|
|
466
|
+
...createMediaMutations(fetcher),
|
|
467
|
+
...createPasswordResetMutations(fetcher)
|
|
447
468
|
};
|
|
448
469
|
}
|
|
449
470
|
|
|
@@ -3413,7 +3434,7 @@ var GQL_RESET_USER_PASSWORD = `
|
|
|
3413
3434
|
}
|
|
3414
3435
|
}
|
|
3415
3436
|
`;
|
|
3416
|
-
function
|
|
3437
|
+
function createPasswordResetMutations2(fetcher) {
|
|
3417
3438
|
const { gqlMutate } = fetcher;
|
|
3418
3439
|
async function sendPasswordResetEmail(input) {
|
|
3419
3440
|
const data = await gqlMutate(GQL_SEND_PASSWORD_RESET_EMAIL, { input });
|
|
@@ -3441,7 +3462,7 @@ function createWPGraphQLMutationsClient(config) {
|
|
|
3441
3462
|
...createTagsMutations3(fetcher),
|
|
3442
3463
|
...createAuthorsMutations2(fetcher),
|
|
3443
3464
|
...createMediaMutations2(fetcher),
|
|
3444
|
-
...
|
|
3465
|
+
...createPasswordResetMutations2(fetcher)
|
|
3445
3466
|
};
|
|
3446
3467
|
}
|
|
3447
3468
|
|