@better-auth-ui/react 1.6.8 → 1.6.10
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/components/auth/auth-context.d.ts +3 -0
- package/dist/components/auth/email/email-localization.d.ts +11 -3
- package/dist/components/auth/email/index.d.ts +1 -0
- package/dist/components/auth/email/organization-invitation.d.ts +121 -0
- package/dist/components/mutation-invalidator.d.ts +1 -0
- package/dist/email.js +1348 -11
- package/dist/hooks/auth/use-authenticate.d.ts +1 -1
- package/dist/hooks/auth/use-user.d.ts +12 -12
- package/dist/hooks/use-auth-query.d.ts +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +2469 -79
- package/dist/lib/auth-client.d.ts +4 -1
- package/dist/lib/auth-plugin.d.ts +16 -0
- package/dist/lib/auth-server.d.ts +8 -1
- package/dist/lib/settings-tab.d.ts +19 -0
- package/dist/mutations/api-key/create-api-key-mutation.d.ts +6 -4
- package/dist/mutations/api-key/delete-api-key-mutation.d.ts +7 -3
- package/dist/mutations/auth/sign-in-email-mutation.d.ts +5 -5
- package/dist/mutations/auth/sign-out-mutation.d.ts +6 -4
- package/dist/mutations/auth/sign-up-email-mutation.d.ts +5 -5
- package/dist/mutations/multi-session/revoke-multi-session-mutation.d.ts +5 -5
- package/dist/mutations/multi-session/set-active-session-mutation.d.ts +5 -6
- package/dist/mutations/organization/accept-invitation-mutation.d.ts +43 -0
- package/dist/mutations/organization/cancel-invitation-mutation.d.ts +25 -0
- package/dist/mutations/organization/check-slug-mutation.d.ts +21 -0
- package/dist/mutations/organization/create-organization-mutation.d.ts +39 -0
- package/dist/mutations/organization/delete-organization-mutation.d.ts +21 -0
- package/dist/mutations/organization/index.d.ts +12 -0
- package/dist/mutations/organization/invite-member-mutation.d.ts +43 -0
- package/dist/mutations/organization/leave-organization-mutation.d.ts +65 -0
- package/dist/mutations/organization/reject-invitation-mutation.d.ts +31 -0
- package/dist/mutations/organization/remove-member-mutation.d.ts +35 -0
- package/dist/mutations/organization/set-active-organization-mutation.d.ts +71 -0
- package/dist/mutations/organization/update-member-role-mutation.d.ts +31 -0
- package/dist/mutations/organization/update-organization-mutation.d.ts +21 -0
- package/dist/mutations/passkey/add-passkey-mutation.d.ts +5 -5
- package/dist/mutations/passkey/delete-passkey-mutation.d.ts +5 -5
- package/dist/mutations/passkey/sign-in-passkey-mutation.d.ts +5 -5
- package/dist/mutations/settings/change-email-mutation.d.ts +6 -5
- package/dist/mutations/settings/revoke-session-mutation.d.ts +5 -5
- package/dist/mutations/settings/unlink-account-mutation.d.ts +5 -5
- package/dist/mutations/settings/update-user-mutation.d.ts +5 -5
- package/dist/mutations/username/sign-in-username-mutation.d.ts +5 -5
- package/dist/plugins/captcha-plugin.d.ts +2 -2
- package/dist/plugins.js +27 -2
- package/dist/queries/api-key/list-api-keys-query.d.ts +17 -8
- package/dist/queries/auth/session-query.d.ts +1 -1
- package/dist/queries/multi-session/list-device-sessions-query.d.ts +5 -5
- package/dist/queries/organization/active-organization-query.d.ts +39 -0
- package/dist/queries/organization/full-organization-query.d.ts +37 -0
- package/dist/queries/organization/has-permission-query.d.ts +21 -0
- package/dist/queries/organization/index.d.ts +7 -0
- package/dist/queries/organization/list-invitations-query.d.ts +29 -0
- package/dist/queries/organization/list-members-query.d.ts +61 -0
- package/dist/queries/organization/list-organizations-query.d.ts +22 -0
- package/dist/queries/organization/list-user-invitations-query.d.ts +29 -0
- package/dist/queries/passkey/list-passkeys-query.d.ts +5 -5
- package/dist/queries/settings/account-info-query.d.ts +1 -1
- package/dist/queries/settings/list-accounts-query.d.ts +1 -1
- package/dist/queries/settings/list-sessions-query.d.ts +1 -1
- package/dist/server/queries/api-key/list-api-keys-query.d.ts +83 -0
- package/dist/server/queries/multi-session/list-device-sessions-query.d.ts +4 -4
- package/dist/server/queries/organization/active-organization-query.d.ts +61 -0
- package/dist/server/queries/organization/full-organization-query.d.ts +42 -0
- package/dist/server/queries/organization/has-permission-query.d.ts +66 -0
- package/dist/server/queries/organization/list-invitations-query.d.ts +34 -0
- package/dist/server/queries/organization/list-members-query.d.ts +66 -0
- package/dist/server/queries/organization/list-organizations-query.d.ts +27 -0
- package/dist/server/queries/organization/list-user-invitations-query.d.ts +34 -0
- package/dist/server/queries/passkey/list-passkeys-query.d.ts +4 -4
- package/dist/server.d.ts +8 -0
- package/dist/server.js +131 -7
- package/dist/use-auth-plugin-ClcP84Uz.js +80 -0
- package/package.json +19 -16
- package/src/components/auth/auth-context.tsx +7 -0
- package/src/components/auth/auth-provider.tsx +19 -31
- package/src/components/auth/email/email-localization.tsx +5 -3
- package/src/components/auth/email/index.ts +1 -0
- package/src/components/auth/email/organization-invitation.tsx +454 -0
- package/src/components/mutation-invalidator.tsx +67 -0
- package/src/index.ts +3 -0
- package/src/lib/auth-client.ts +7 -0
- package/src/lib/auth-plugin.ts +17 -0
- package/src/lib/auth-server.ts +17 -1
- package/src/lib/settings-tab.ts +21 -0
- package/src/mutations/api-key/create-api-key-mutation.ts +34 -19
- package/src/mutations/api-key/delete-api-key-mutation.ts +36 -19
- package/src/mutations/auth/sign-in-email-mutation.ts +18 -22
- package/src/mutations/auth/sign-out-mutation.ts +19 -13
- package/src/mutations/auth/sign-up-email-mutation.ts +18 -22
- package/src/mutations/multi-session/revoke-multi-session-mutation.ts +31 -20
- package/src/mutations/multi-session/set-active-session-mutation.ts +25 -44
- package/src/mutations/organization/accept-invitation-mutation.ts +71 -0
- package/src/mutations/organization/cancel-invitation-mutation.ts +67 -0
- package/src/mutations/organization/check-slug-mutation.ts +55 -0
- package/src/mutations/organization/create-organization-mutation.ts +71 -0
- package/src/mutations/organization/delete-organization-mutation.ts +71 -0
- package/src/mutations/organization/index.ts +12 -0
- package/src/mutations/organization/invite-member-mutation.ts +81 -0
- package/src/mutations/organization/leave-organization-mutation.ts +74 -0
- package/src/mutations/organization/reject-invitation-mutation.ts +64 -0
- package/src/mutations/organization/remove-member-mutation.ts +67 -0
- package/src/mutations/organization/set-active-organization-mutation.ts +142 -0
- package/src/mutations/organization/update-member-role-mutation.ts +81 -0
- package/src/mutations/organization/update-organization-mutation.ts +84 -0
- package/src/mutations/passkey/add-passkey-mutation.ts +28 -17
- package/src/mutations/passkey/delete-passkey-mutation.ts +27 -17
- package/src/mutations/passkey/sign-in-passkey-mutation.ts +18 -21
- package/src/mutations/settings/change-email-mutation.ts +22 -18
- package/src/mutations/settings/delete-user-mutation.ts +2 -2
- package/src/mutations/settings/revoke-session-mutation.ts +24 -19
- package/src/mutations/settings/unlink-account-mutation.ts +24 -17
- package/src/mutations/settings/update-user-mutation.ts +18 -30
- package/src/mutations/username/is-username-available-mutation.ts +2 -2
- package/src/mutations/username/sign-in-username-mutation.ts +20 -23
- package/src/queries/api-key/list-api-keys-query.ts +20 -8
- package/src/queries/multi-session/list-device-sessions-query.ts +2 -2
- package/src/queries/organization/active-organization-query.ts +140 -0
- package/src/queries/organization/full-organization-query.ts +113 -0
- package/src/queries/organization/has-permission-query.ts +124 -0
- package/src/queries/organization/index.ts +7 -0
- package/src/queries/organization/list-invitations-query.ts +133 -0
- package/src/queries/organization/list-members-query.ts +133 -0
- package/src/queries/organization/list-organizations-query.ts +122 -0
- package/src/queries/organization/list-user-invitations-query.ts +122 -0
- package/src/queries/passkey/list-passkeys-query.ts +2 -2
- package/src/server/queries/api-key/list-api-keys-query.ts +94 -0
- package/src/server/queries/multi-session/list-device-sessions-query.ts +2 -2
- package/src/server/queries/organization/active-organization-query.ts +92 -0
- package/src/server/queries/organization/full-organization-query.ts +64 -0
- package/src/server/queries/organization/has-permission-query.ts +66 -0
- package/src/server/queries/organization/list-invitations-query.ts +81 -0
- package/src/server/queries/organization/list-members-query.ts +75 -0
- package/src/server/queries/organization/list-organizations-query.ts +67 -0
- package/src/server/queries/organization/list-user-invitations-query.ts +68 -0
- package/src/server/queries/passkey/list-passkeys-query.ts +2 -2
- package/src/server.ts +8 -0
- package/dist/components/auth/auth-provider.js +0 -44
- package/dist/components/auth/email/email-changed.js +0 -156
- package/dist/components/auth/email/email-localization.js +0 -19
- package/dist/components/auth/email/email-styles.js +0 -104
- package/dist/components/auth/email/email-verification.js +0 -140
- package/dist/components/auth/email/index.js +0 -9
- package/dist/components/auth/email/magic-link.js +0 -141
- package/dist/components/auth/email/new-device.js +0 -223
- package/dist/components/auth/email/otp-email.js +0 -129
- package/dist/components/auth/email/password-changed.js +0 -159
- package/dist/components/auth/email/reset-password.js +0 -140
- package/dist/components/auth/fetch-options-provider.js +0 -30
- package/dist/components/icons/apple.js +0 -17
- package/dist/components/icons/atlassian.js +0 -39
- package/dist/components/icons/cognito.js +0 -20
- package/dist/components/icons/discord.js +0 -17
- package/dist/components/icons/dropbox.js +0 -17
- package/dist/components/icons/facebook.js +0 -20
- package/dist/components/icons/figma.js +0 -35
- package/dist/components/icons/github.js +0 -17
- package/dist/components/icons/gitlab.js +0 -31
- package/dist/components/icons/google.js +0 -40
- package/dist/components/icons/huggingface.js +0 -39
- package/dist/components/icons/index.js +0 -35
- package/dist/components/icons/kakao.js +0 -17
- package/dist/components/icons/kick.js +0 -21
- package/dist/components/icons/line.js +0 -17
- package/dist/components/icons/linear.js +0 -17
- package/dist/components/icons/linkedin.js +0 -34
- package/dist/components/icons/microsoft.js +0 -31
- package/dist/components/icons/naver.js +0 -17
- package/dist/components/icons/notion.js +0 -17
- package/dist/components/icons/paybin.js +0 -33
- package/dist/components/icons/paypal.js +0 -31
- package/dist/components/icons/polar.js +0 -25
- package/dist/components/icons/railway.js +0 -17
- package/dist/components/icons/reddit.js +0 -22
- package/dist/components/icons/roblox.js +0 -18
- package/dist/components/icons/salesforce.js +0 -17
- package/dist/components/icons/slack.js +0 -31
- package/dist/components/icons/spotify.js +0 -17
- package/dist/components/icons/tiktok.js +0 -24
- package/dist/components/icons/twitch.js +0 -44
- package/dist/components/icons/vercel.js +0 -17
- package/dist/components/icons/vk.js +0 -17
- package/dist/components/icons/wechat.js +0 -17
- package/dist/components/icons/x.js +0 -17
- package/dist/components/icons/zoom.js +0 -70
- package/dist/components/settings/account/theme-preview.js +0 -289
- package/dist/hooks/auth/use-authenticate.js +0 -23
- package/dist/hooks/auth/use-user.js +0 -11
- package/dist/hooks/use-auth-mutation.js +0 -11
- package/dist/hooks/use-auth-plugin.js +0 -10
- package/dist/hooks/use-auth-query.js +0 -15
- package/dist/lib/provider-icons.js +0 -76
- package/dist/lib/utils.js +0 -8
- package/dist/mutations/api-key/create-api-key-mutation.js +0 -29
- package/dist/mutations/api-key/delete-api-key-mutation.js +0 -29
- package/dist/mutations/auth/request-password-reset-mutation.js +0 -24
- package/dist/mutations/auth/reset-password-mutation.js +0 -24
- package/dist/mutations/auth/send-verification-email-mutation.js +0 -24
- package/dist/mutations/auth/sign-in-email-mutation.js +0 -29
- package/dist/mutations/auth/sign-in-social-mutation.js +0 -24
- package/dist/mutations/auth/sign-out-mutation.js +0 -28
- package/dist/mutations/auth/sign-up-email-mutation.js +0 -29
- package/dist/mutations/auth-mutation-options.js +0 -19
- package/dist/mutations/magic-link/sign-in-magic-link-mutation.js +0 -24
- package/dist/mutations/multi-session/revoke-multi-session-mutation.js +0 -29
- package/dist/mutations/multi-session/set-active-session-mutation.js +0 -31
- package/dist/mutations/passkey/add-passkey-mutation.js +0 -29
- package/dist/mutations/passkey/delete-passkey-mutation.js +0 -29
- package/dist/mutations/passkey/sign-in-passkey-mutation.js +0 -29
- package/dist/mutations/settings/change-email-mutation.js +0 -29
- package/dist/mutations/settings/change-password-mutation.js +0 -24
- package/dist/mutations/settings/delete-user-mutation.js +0 -24
- package/dist/mutations/settings/link-social-mutation.js +0 -24
- package/dist/mutations/settings/revoke-session-mutation.js +0 -29
- package/dist/mutations/settings/unlink-account-mutation.js +0 -29
- package/dist/mutations/settings/update-user-mutation.js +0 -35
- package/dist/mutations/username/is-username-available-mutation.js +0 -24
- package/dist/mutations/username/sign-in-username-mutation.js +0 -29
- package/dist/plugins/captcha-plugin.js +0 -29
- package/dist/queries/api-key/list-api-keys-query.js +0 -31
- package/dist/queries/auth/session-query.js +0 -30
- package/dist/queries/auth-query-options.js +0 -17
- package/dist/queries/multi-session/list-device-sessions-query.js +0 -31
- package/dist/queries/passkey/list-passkeys-query.js +0 -31
- package/dist/queries/settings/account-info-query.js +0 -31
- package/dist/queries/settings/list-accounts-query.js +0 -31
- package/dist/queries/settings/list-sessions-query.js +0 -31
- package/dist/server/queries/auth/session-query.js +0 -13
- package/dist/server/queries/multi-session/list-device-sessions-query.js +0 -12
- package/dist/server/queries/passkey/list-passkeys-query.js +0 -12
- package/dist/server/queries/settings/account-info-query.js +0 -12
- package/dist/server/queries/settings/list-accounts-query.js +0 -12
- package/dist/server/queries/settings/list-sessions-query.js +0 -12
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { sessionOptions as e } from "../../queries/auth/session-query.js";
|
|
2
|
-
import { authMutationKeys as t } from "@better-auth-ui/core";
|
|
3
|
-
import { mutationOptions as n, useMutation as r, useQueryClient as i } from "@tanstack/react-query";
|
|
4
|
-
//#region src/mutations/auth/sign-up-email-mutation.ts
|
|
5
|
-
function a(e) {
|
|
6
|
-
let r = t.signUp.email;
|
|
7
|
-
return n({
|
|
8
|
-
mutationKey: r,
|
|
9
|
-
mutationFn: (t) => e.signUp.email({
|
|
10
|
-
...t,
|
|
11
|
-
fetchOptions: {
|
|
12
|
-
...t?.fetchOptions,
|
|
13
|
-
throw: !0
|
|
14
|
-
}
|
|
15
|
-
})
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
function o(t, n) {
|
|
19
|
-
let o = i();
|
|
20
|
-
return r({
|
|
21
|
-
...a(t),
|
|
22
|
-
...n,
|
|
23
|
-
onSuccess: async (...r) => {
|
|
24
|
-
o.resetQueries({ queryKey: e(t).queryKey }), await n?.onSuccess?.(...r);
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
//#endregion
|
|
29
|
-
export { a as signUpEmailOptions, o as useSignUpEmail };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { mutationOptions as e } from "@tanstack/react-query";
|
|
2
|
-
//#region src/mutations/auth-mutation-options.ts
|
|
3
|
-
function t(t, n) {
|
|
4
|
-
return e({
|
|
5
|
-
mutationKey: n,
|
|
6
|
-
mutationFn: (e) => {
|
|
7
|
-
let n = e ?? {};
|
|
8
|
-
return t({
|
|
9
|
-
...n,
|
|
10
|
-
fetchOptions: {
|
|
11
|
-
...n.fetchOptions,
|
|
12
|
-
throw: !0
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
//#endregion
|
|
19
|
-
export { t as authMutationOptions };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { mutationOptions as e, useMutation as t } from "@tanstack/react-query";
|
|
2
|
-
import { magicLinkMutationKeys as n } from "@better-auth-ui/core/plugins";
|
|
3
|
-
//#region src/mutations/magic-link/sign-in-magic-link-mutation.ts
|
|
4
|
-
function r(t) {
|
|
5
|
-
let r = n.signIn;
|
|
6
|
-
return e({
|
|
7
|
-
mutationKey: r,
|
|
8
|
-
mutationFn: (e) => t.signIn.magicLink({
|
|
9
|
-
...e,
|
|
10
|
-
fetchOptions: {
|
|
11
|
-
...e?.fetchOptions,
|
|
12
|
-
throw: !0
|
|
13
|
-
}
|
|
14
|
-
})
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
function i(e, n) {
|
|
18
|
-
return t({
|
|
19
|
-
...r(e),
|
|
20
|
-
...n
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
//#endregion
|
|
24
|
-
export { r as signInMagicLinkOptions, i as useSignInMagicLink };
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { useListDeviceSessions as e } from "../../queries/multi-session/list-device-sessions-query.js";
|
|
2
|
-
import { authMutationKeys as t } from "@better-auth-ui/core";
|
|
3
|
-
import { mutationOptions as n, useMutation as r } from "@tanstack/react-query";
|
|
4
|
-
//#region src/mutations/multi-session/revoke-multi-session-mutation.ts
|
|
5
|
-
function i(e) {
|
|
6
|
-
let r = t.multiSession.revoke;
|
|
7
|
-
return n({
|
|
8
|
-
mutationKey: r,
|
|
9
|
-
mutationFn: (t) => e.multiSession.revoke({
|
|
10
|
-
...t,
|
|
11
|
-
fetchOptions: {
|
|
12
|
-
...t?.fetchOptions,
|
|
13
|
-
throw: !0
|
|
14
|
-
}
|
|
15
|
-
})
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
function a(t, n) {
|
|
19
|
-
let { refetch: a } = e(t, { refetchOnMount: !1 });
|
|
20
|
-
return r({
|
|
21
|
-
...i(t),
|
|
22
|
-
...n,
|
|
23
|
-
onSuccess: async (...e) => {
|
|
24
|
-
await a(), await n?.onSuccess?.(...e);
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
//#endregion
|
|
29
|
-
export { i as revokeMultiSessionOptions, a as useRevokeMultiSession };
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { sessionOptions as e, useSession as t } from "../../queries/auth/session-query.js";
|
|
2
|
-
import { useListDeviceSessions as n } from "../../queries/multi-session/list-device-sessions-query.js";
|
|
3
|
-
import { authMutationKeys as r } from "@better-auth-ui/core";
|
|
4
|
-
import { mutationOptions as i, useMutation as a, useQueryClient as o } from "@tanstack/react-query";
|
|
5
|
-
//#region src/mutations/multi-session/set-active-session-mutation.ts
|
|
6
|
-
function s(e) {
|
|
7
|
-
let t = r.multiSession.setActive;
|
|
8
|
-
return i({
|
|
9
|
-
mutationKey: t,
|
|
10
|
-
mutationFn: (t) => e.multiSession.setActive({
|
|
11
|
-
...t,
|
|
12
|
-
fetchOptions: {
|
|
13
|
-
...t?.fetchOptions,
|
|
14
|
-
throw: !0
|
|
15
|
-
}
|
|
16
|
-
})
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
function c(r, i) {
|
|
20
|
-
let c = o(), { refetch: l } = t(r, { refetchOnMount: !1 }), { data: u, refetch: d } = n(r, { refetchOnMount: !1 });
|
|
21
|
-
return a({
|
|
22
|
-
...s(r),
|
|
23
|
-
...i,
|
|
24
|
-
onSuccess: async (t, n, ...a) => {
|
|
25
|
-
let o = n?.sessionToken, s = u?.find(({ session: { token: e } }) => e === o);
|
|
26
|
-
s && c.setQueryData(e(r).queryKey, s), await l(), await d(), await i?.onSuccess?.(t, n, ...a);
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
//#endregion
|
|
31
|
-
export { s as setActiveSessionOptions, c as useSetActiveSession };
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { useListPasskeys as e } from "../../queries/passkey/list-passkeys-query.js";
|
|
2
|
-
import { mutationOptions as t, useMutation as n } from "@tanstack/react-query";
|
|
3
|
-
import { passkeyMutationKeys as r } from "@better-auth-ui/core/plugins";
|
|
4
|
-
//#region src/mutations/passkey/add-passkey-mutation.ts
|
|
5
|
-
function i(e) {
|
|
6
|
-
let n = r.addPasskey;
|
|
7
|
-
return t({
|
|
8
|
-
mutationKey: n,
|
|
9
|
-
mutationFn: (t) => e.passkey.addPasskey({
|
|
10
|
-
...t ?? {},
|
|
11
|
-
fetchOptions: {
|
|
12
|
-
...t?.fetchOptions,
|
|
13
|
-
throw: !0
|
|
14
|
-
}
|
|
15
|
-
})
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
function a(t, r) {
|
|
19
|
-
let { refetch: a } = e(t, { refetchOnMount: !1 });
|
|
20
|
-
return n({
|
|
21
|
-
...i(t),
|
|
22
|
-
...r,
|
|
23
|
-
onSuccess: async (...e) => {
|
|
24
|
-
await a(), await r?.onSuccess?.(...e);
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
//#endregion
|
|
29
|
-
export { i as addPasskeyOptions, a as useAddPasskey };
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { useListPasskeys as e } from "../../queries/passkey/list-passkeys-query.js";
|
|
2
|
-
import { mutationOptions as t, useMutation as n } from "@tanstack/react-query";
|
|
3
|
-
import { passkeyMutationKeys as r } from "@better-auth-ui/core/plugins";
|
|
4
|
-
//#region src/mutations/passkey/delete-passkey-mutation.ts
|
|
5
|
-
function i(e) {
|
|
6
|
-
let n = r.deletePasskey;
|
|
7
|
-
return t({
|
|
8
|
-
mutationKey: n,
|
|
9
|
-
mutationFn: (t) => e.passkey.deletePasskey({
|
|
10
|
-
...t,
|
|
11
|
-
fetchOptions: {
|
|
12
|
-
...t?.fetchOptions,
|
|
13
|
-
throw: !0
|
|
14
|
-
}
|
|
15
|
-
})
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
function a(t, r) {
|
|
19
|
-
let { refetch: a } = e(t, { refetchOnMount: !1 });
|
|
20
|
-
return n({
|
|
21
|
-
...i(t),
|
|
22
|
-
...r,
|
|
23
|
-
onSuccess: async (...e) => {
|
|
24
|
-
await a(), await r?.onSuccess?.(...e);
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
//#endregion
|
|
29
|
-
export { i as deletePasskeyOptions, a as useDeletePasskey };
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { sessionOptions as e } from "../../queries/auth/session-query.js";
|
|
2
|
-
import { mutationOptions as t, useMutation as n, useQueryClient as r } from "@tanstack/react-query";
|
|
3
|
-
import { passkeyMutationKeys as i } from "@better-auth-ui/core/plugins";
|
|
4
|
-
//#region src/mutations/passkey/sign-in-passkey-mutation.ts
|
|
5
|
-
function a(e) {
|
|
6
|
-
let n = i.signIn;
|
|
7
|
-
return t({
|
|
8
|
-
mutationKey: n,
|
|
9
|
-
mutationFn: (t) => e.signIn.passkey({
|
|
10
|
-
...t ?? {},
|
|
11
|
-
fetchOptions: {
|
|
12
|
-
...t?.fetchOptions,
|
|
13
|
-
throw: !0
|
|
14
|
-
}
|
|
15
|
-
})
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
function o(t, i) {
|
|
19
|
-
let o = r();
|
|
20
|
-
return n({
|
|
21
|
-
...a(t),
|
|
22
|
-
...i,
|
|
23
|
-
onSuccess: async (...n) => {
|
|
24
|
-
o.resetQueries({ queryKey: e(t).queryKey }), await i?.onSuccess?.(...n);
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
//#endregion
|
|
29
|
-
export { a as signInPasskeyOptions, o as useSignInPasskey };
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { useSession as e } from "../../queries/auth/session-query.js";
|
|
2
|
-
import { authMutationKeys as t } from "@better-auth-ui/core";
|
|
3
|
-
import { mutationOptions as n, useMutation as r } from "@tanstack/react-query";
|
|
4
|
-
//#region src/mutations/settings/change-email-mutation.ts
|
|
5
|
-
function i(e) {
|
|
6
|
-
let r = t.changeEmail;
|
|
7
|
-
return n({
|
|
8
|
-
mutationKey: r,
|
|
9
|
-
mutationFn: (t) => e.changeEmail({
|
|
10
|
-
...t,
|
|
11
|
-
fetchOptions: {
|
|
12
|
-
...t?.fetchOptions,
|
|
13
|
-
throw: !0
|
|
14
|
-
}
|
|
15
|
-
})
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
function a(t, n) {
|
|
19
|
-
let { refetch: a } = e(t, { refetchOnMount: !1 });
|
|
20
|
-
return r({
|
|
21
|
-
...i(t),
|
|
22
|
-
...n,
|
|
23
|
-
onSuccess: async (...e) => {
|
|
24
|
-
await a(), await n?.onSuccess?.(...e);
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
//#endregion
|
|
29
|
-
export { i as changeEmailOptions, a as useChangeEmail };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { authMutationKeys as e } from "@better-auth-ui/core";
|
|
2
|
-
import { mutationOptions as t, useMutation as n } from "@tanstack/react-query";
|
|
3
|
-
//#region src/mutations/settings/change-password-mutation.ts
|
|
4
|
-
function r(n) {
|
|
5
|
-
let r = e.changePassword;
|
|
6
|
-
return t({
|
|
7
|
-
mutationKey: r,
|
|
8
|
-
mutationFn: (e) => n.changePassword({
|
|
9
|
-
...e,
|
|
10
|
-
fetchOptions: {
|
|
11
|
-
...e?.fetchOptions,
|
|
12
|
-
throw: !0
|
|
13
|
-
}
|
|
14
|
-
})
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
function i(e, t) {
|
|
18
|
-
return n({
|
|
19
|
-
...r(e),
|
|
20
|
-
...t
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
//#endregion
|
|
24
|
-
export { r as changePasswordOptions, i as useChangePassword };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { authMutationKeys as e } from "@better-auth-ui/core";
|
|
2
|
-
import { mutationOptions as t, useMutation as n } from "@tanstack/react-query";
|
|
3
|
-
//#region src/mutations/settings/delete-user-mutation.ts
|
|
4
|
-
function r(n) {
|
|
5
|
-
let r = e.deleteUser;
|
|
6
|
-
return t({
|
|
7
|
-
mutationKey: r,
|
|
8
|
-
mutationFn: (e) => n.deleteUser({
|
|
9
|
-
...e,
|
|
10
|
-
fetchOptions: {
|
|
11
|
-
...e?.fetchOptions,
|
|
12
|
-
throw: !0
|
|
13
|
-
}
|
|
14
|
-
})
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
function i(e, t) {
|
|
18
|
-
return n({
|
|
19
|
-
...r(e),
|
|
20
|
-
...t
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
//#endregion
|
|
24
|
-
export { r as deleteUserOptions, i as useDeleteUser };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { authMutationKeys as e } from "@better-auth-ui/core";
|
|
2
|
-
import { mutationOptions as t, useMutation as n } from "@tanstack/react-query";
|
|
3
|
-
//#region src/mutations/settings/link-social-mutation.ts
|
|
4
|
-
function r(n) {
|
|
5
|
-
let r = e.linkSocial;
|
|
6
|
-
return t({
|
|
7
|
-
mutationKey: r,
|
|
8
|
-
mutationFn: (e) => n.linkSocial({
|
|
9
|
-
...e,
|
|
10
|
-
fetchOptions: {
|
|
11
|
-
...e?.fetchOptions,
|
|
12
|
-
throw: !0
|
|
13
|
-
}
|
|
14
|
-
})
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
function i(e, t) {
|
|
18
|
-
return n({
|
|
19
|
-
...r(e),
|
|
20
|
-
...t
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
//#endregion
|
|
24
|
-
export { r as linkSocialOptions, i as useLinkSocial };
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { useListSessions as e } from "../../queries/settings/list-sessions-query.js";
|
|
2
|
-
import { authMutationKeys as t } from "@better-auth-ui/core";
|
|
3
|
-
import { mutationOptions as n, useMutation as r } from "@tanstack/react-query";
|
|
4
|
-
//#region src/mutations/settings/revoke-session-mutation.ts
|
|
5
|
-
function i(e) {
|
|
6
|
-
let r = t.revokeSession;
|
|
7
|
-
return n({
|
|
8
|
-
mutationKey: r,
|
|
9
|
-
mutationFn: (t) => e.revokeSession({
|
|
10
|
-
...t,
|
|
11
|
-
fetchOptions: {
|
|
12
|
-
...t?.fetchOptions,
|
|
13
|
-
throw: !0
|
|
14
|
-
}
|
|
15
|
-
})
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
function a(t, n) {
|
|
19
|
-
let { refetch: a } = e(t, { refetchOnMount: !1 });
|
|
20
|
-
return r({
|
|
21
|
-
...i(t),
|
|
22
|
-
...n,
|
|
23
|
-
onSuccess: async (...e) => {
|
|
24
|
-
await a(), await n?.onSuccess?.(...e);
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
//#endregion
|
|
29
|
-
export { i as revokeSessionOptions, a as useRevokeSession };
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { useListAccounts as e } from "../../queries/settings/list-accounts-query.js";
|
|
2
|
-
import { authMutationKeys as t } from "@better-auth-ui/core";
|
|
3
|
-
import { mutationOptions as n, useMutation as r } from "@tanstack/react-query";
|
|
4
|
-
//#region src/mutations/settings/unlink-account-mutation.ts
|
|
5
|
-
function i(e) {
|
|
6
|
-
let r = t.unlinkAccount;
|
|
7
|
-
return n({
|
|
8
|
-
mutationKey: r,
|
|
9
|
-
mutationFn: (t) => e.unlinkAccount({
|
|
10
|
-
...t,
|
|
11
|
-
fetchOptions: {
|
|
12
|
-
...t?.fetchOptions,
|
|
13
|
-
throw: !0
|
|
14
|
-
}
|
|
15
|
-
})
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
function a(t, n) {
|
|
19
|
-
let { refetch: a } = e(t, { refetchOnMount: !1 });
|
|
20
|
-
return r({
|
|
21
|
-
...i(t),
|
|
22
|
-
...n,
|
|
23
|
-
onSuccess: async (...e) => {
|
|
24
|
-
await a(), await n?.onSuccess?.(...e);
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
//#endregion
|
|
29
|
-
export { i as unlinkAccountOptions, a as useUnlinkAccount };
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { sessionOptions as e, useSession as t } from "../../queries/auth/session-query.js";
|
|
2
|
-
import { authMutationKeys as n } from "@better-auth-ui/core";
|
|
3
|
-
import { mutationOptions as r, useMutation as i, useQueryClient as a } from "@tanstack/react-query";
|
|
4
|
-
//#region src/mutations/settings/update-user-mutation.ts
|
|
5
|
-
function o(e) {
|
|
6
|
-
let t = n.updateUser;
|
|
7
|
-
return r({
|
|
8
|
-
mutationKey: t,
|
|
9
|
-
mutationFn: (t) => e.updateUser({
|
|
10
|
-
...t,
|
|
11
|
-
fetchOptions: {
|
|
12
|
-
...t?.fetchOptions,
|
|
13
|
-
throw: !0
|
|
14
|
-
}
|
|
15
|
-
})
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
function s(n, r) {
|
|
19
|
-
let { data: s, refetch: c } = t(n, { refetchOnMount: !1 }), l = a();
|
|
20
|
-
return i({
|
|
21
|
-
...o(n),
|
|
22
|
-
...r,
|
|
23
|
-
onSuccess: async (t, i, ...a) => {
|
|
24
|
-
s && l.setQueryData(e(n).queryKey, {
|
|
25
|
-
...s,
|
|
26
|
-
user: {
|
|
27
|
-
...s.user,
|
|
28
|
-
...i
|
|
29
|
-
}
|
|
30
|
-
}), c(), await r?.onSuccess?.(t, i, ...a);
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
//#endregion
|
|
35
|
-
export { o as updateUserOptions, s as useUpdateUser };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { authMutationKeys as e } from "@better-auth-ui/core";
|
|
2
|
-
import { mutationOptions as t, useMutation as n } from "@tanstack/react-query";
|
|
3
|
-
//#region src/mutations/username/is-username-available-mutation.ts
|
|
4
|
-
function r(n) {
|
|
5
|
-
let r = e.isUsernameAvailable;
|
|
6
|
-
return t({
|
|
7
|
-
mutationKey: r,
|
|
8
|
-
mutationFn: (e) => n.isUsernameAvailable({
|
|
9
|
-
...e,
|
|
10
|
-
fetchOptions: {
|
|
11
|
-
...e?.fetchOptions,
|
|
12
|
-
throw: !0
|
|
13
|
-
}
|
|
14
|
-
})
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
function i(e, t) {
|
|
18
|
-
return n({
|
|
19
|
-
...r(e),
|
|
20
|
-
...t
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
//#endregion
|
|
24
|
-
export { r as isUsernameAvailableOptions, i as useIsUsernameAvailable };
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { sessionOptions as e } from "../../queries/auth/session-query.js";
|
|
2
|
-
import { authMutationKeys as t } from "@better-auth-ui/core";
|
|
3
|
-
import { mutationOptions as n, useMutation as r, useQueryClient as i } from "@tanstack/react-query";
|
|
4
|
-
//#region src/mutations/username/sign-in-username-mutation.ts
|
|
5
|
-
function a(e) {
|
|
6
|
-
let r = t.signIn.username;
|
|
7
|
-
return n({
|
|
8
|
-
mutationKey: r,
|
|
9
|
-
mutationFn: (t) => e.signIn.username({
|
|
10
|
-
...t,
|
|
11
|
-
fetchOptions: {
|
|
12
|
-
...t?.fetchOptions,
|
|
13
|
-
throw: !0
|
|
14
|
-
}
|
|
15
|
-
})
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
function o(t, n) {
|
|
19
|
-
let o = i();
|
|
20
|
-
return r({
|
|
21
|
-
...a(t),
|
|
22
|
-
...n,
|
|
23
|
-
onSuccess: async (...r) => {
|
|
24
|
-
o.resetQueries({ queryKey: e(t).queryKey }), await n?.onSuccess?.(...r);
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
//#endregion
|
|
29
|
-
export { a as signInUsernameOptions, o as useSignInUsername };
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { useFetchOptions as e } from "../components/auth/fetch-options-provider.js";
|
|
3
|
-
import { useAuthPlugin as t } from "../hooks/use-auth-plugin.js";
|
|
4
|
-
import { createAuthPlugin as n } from "@better-auth-ui/core";
|
|
5
|
-
import { useCallback as r, useEffect as i } from "react";
|
|
6
|
-
import { jsx as a } from "react/jsx-runtime";
|
|
7
|
-
//#region src/plugins/captcha-plugin.tsx
|
|
8
|
-
function o() {
|
|
9
|
-
let { render: n } = t(s), { setFetchOptions: o, registerReset: c } = e(), l = r((e) => {
|
|
10
|
-
o({ headers: { "x-captcha-response": e } });
|
|
11
|
-
}, [o]), u = r(() => {
|
|
12
|
-
o(void 0);
|
|
13
|
-
}, [o]), d = r((e) => {
|
|
14
|
-
c(e);
|
|
15
|
-
}, [c]);
|
|
16
|
-
return i(() => () => {
|
|
17
|
-
o(void 0), c(null);
|
|
18
|
-
}, [o, c]), /* @__PURE__ */ a(n, {
|
|
19
|
-
setToken: l,
|
|
20
|
-
clearToken: u,
|
|
21
|
-
setReset: d
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
var s = n("captcha", ({ render: e }) => ({
|
|
25
|
-
render: e,
|
|
26
|
-
captchaComponent: /* @__PURE__ */ a(o, {})
|
|
27
|
-
}));
|
|
28
|
-
//#endregion
|
|
29
|
-
export { s as captchaPlugin };
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { useSession as e } from "../auth/session-query.js";
|
|
2
|
-
import { authQueryKeys as t } from "@better-auth-ui/core";
|
|
3
|
-
import { queryOptions as n, skipToken as r, useQuery as i } from "@tanstack/react-query";
|
|
4
|
-
//#region src/queries/api-key/list-api-keys-query.ts
|
|
5
|
-
function a(e, r, i) {
|
|
6
|
-
return n({
|
|
7
|
-
queryKey: t.listApiKeys(r, i?.query),
|
|
8
|
-
queryFn: ({ signal: t }) => e.apiKey.list({
|
|
9
|
-
...i,
|
|
10
|
-
fetchOptions: {
|
|
11
|
-
...i?.fetchOptions,
|
|
12
|
-
signal: t,
|
|
13
|
-
throw: !0
|
|
14
|
-
}
|
|
15
|
-
})
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
var o = (e, t, n, r) => e.ensureQueryData(a(t, n, r)), s = (e, t, n, r) => e.prefetchQuery(a(t, n, r)), c = (e, t, n, r) => e.fetchQuery(a(t, n, r));
|
|
19
|
-
function l(t, n = {}, o) {
|
|
20
|
-
let { data: s } = e(t, void 0, o), c = s?.user.id, { query: l, fetchOptions: u, ...d } = n, f = a(t, c, {
|
|
21
|
-
query: l,
|
|
22
|
-
fetchOptions: u
|
|
23
|
-
});
|
|
24
|
-
return i({
|
|
25
|
-
...d,
|
|
26
|
-
...f,
|
|
27
|
-
queryFn: c ? f.queryFn : r
|
|
28
|
-
}, o);
|
|
29
|
-
}
|
|
30
|
-
//#endregion
|
|
31
|
-
export { o as ensureListApiKeys, c as fetchListApiKeys, a as listApiKeysOptions, s as prefetchListApiKeys, l as useListApiKeys };
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { authQueryKeys as e } from "@better-auth-ui/core";
|
|
2
|
-
import { queryOptions as t, useQuery as n } from "@tanstack/react-query";
|
|
3
|
-
//#region src/queries/auth/session-query.ts
|
|
4
|
-
function r(n, r) {
|
|
5
|
-
let i = e.session;
|
|
6
|
-
return t({
|
|
7
|
-
queryKey: i,
|
|
8
|
-
queryFn: ({ signal: e }) => n.getSession({
|
|
9
|
-
...r,
|
|
10
|
-
fetchOptions: {
|
|
11
|
-
...r?.fetchOptions,
|
|
12
|
-
signal: e,
|
|
13
|
-
throw: !0
|
|
14
|
-
}
|
|
15
|
-
})
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
var i = (e, t, n) => e.ensureQueryData(r(t, n)), a = (e, t, n) => e.prefetchQuery(r(t, n)), o = (e, t, n) => e.fetchQuery(r(t, n));
|
|
19
|
-
function s(e, t = {}, i) {
|
|
20
|
-
let { query: a, fetchOptions: o, ...s } = t;
|
|
21
|
-
return n({
|
|
22
|
-
...r(e, {
|
|
23
|
-
query: a,
|
|
24
|
-
fetchOptions: o
|
|
25
|
-
}),
|
|
26
|
-
...s
|
|
27
|
-
}, i);
|
|
28
|
-
}
|
|
29
|
-
//#endregion
|
|
30
|
-
export { i as ensureSession, o as fetchSession, a as prefetchSession, r as sessionOptions, s as useSession };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { queryOptions as e } from "@tanstack/react-query";
|
|
2
|
-
//#region src/queries/auth-query-options.ts
|
|
3
|
-
function t(t, n, r) {
|
|
4
|
-
return e({
|
|
5
|
-
queryKey: [...n, r?.query ?? null],
|
|
6
|
-
queryFn: ({ signal: e }) => t({
|
|
7
|
-
...r,
|
|
8
|
-
fetchOptions: {
|
|
9
|
-
...r?.fetchOptions,
|
|
10
|
-
signal: e,
|
|
11
|
-
throw: !0
|
|
12
|
-
}
|
|
13
|
-
})
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
//#endregion
|
|
17
|
-
export { t as authQueryOptions };
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { useSession as e } from "../auth/session-query.js";
|
|
2
|
-
import { authQueryKeys as t } from "@better-auth-ui/core";
|
|
3
|
-
import { queryOptions as n, skipToken as r, useQuery as i } from "@tanstack/react-query";
|
|
4
|
-
//#region src/queries/multi-session/list-device-sessions-query.ts
|
|
5
|
-
function a(e, r, i) {
|
|
6
|
-
return n({
|
|
7
|
-
queryKey: t.listDeviceSessions(r, i?.query),
|
|
8
|
-
queryFn: ({ signal: t }) => e.multiSession.listDeviceSessions({
|
|
9
|
-
...i,
|
|
10
|
-
fetchOptions: {
|
|
11
|
-
...i?.fetchOptions,
|
|
12
|
-
signal: t,
|
|
13
|
-
throw: !0
|
|
14
|
-
}
|
|
15
|
-
})
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
var o = (e, t, n, r) => e.ensureQueryData(a(t, n, r)), s = (e, t, n, r) => e.prefetchQuery(a(t, n, r)), c = (e, t, n, r) => e.fetchQuery(a(t, n, r));
|
|
19
|
-
function l(t, n = {}, o) {
|
|
20
|
-
let { data: s } = e(t, void 0, o), c = s?.user.id, { query: l, fetchOptions: u, ...d } = n, f = a(t, c, {
|
|
21
|
-
query: l,
|
|
22
|
-
fetchOptions: u
|
|
23
|
-
});
|
|
24
|
-
return i({
|
|
25
|
-
...d,
|
|
26
|
-
...f,
|
|
27
|
-
queryFn: c ? f.queryFn : r
|
|
28
|
-
}, o);
|
|
29
|
-
}
|
|
30
|
-
//#endregion
|
|
31
|
-
export { o as ensureListDeviceSessions, c as fetchListDeviceSessions, a as listDeviceSessionsOptions, s as prefetchListDeviceSessions, l as useListDeviceSessions };
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { useSession as e } from "../auth/session-query.js";
|
|
2
|
-
import { authQueryKeys as t } from "@better-auth-ui/core";
|
|
3
|
-
import { queryOptions as n, skipToken as r, useQuery as i } from "@tanstack/react-query";
|
|
4
|
-
//#region src/queries/passkey/list-passkeys-query.ts
|
|
5
|
-
function a(e, r, i) {
|
|
6
|
-
return n({
|
|
7
|
-
queryKey: t.listPasskeys(r, i?.query),
|
|
8
|
-
queryFn: ({ signal: t }) => e.passkey.listUserPasskeys({
|
|
9
|
-
...i,
|
|
10
|
-
fetchOptions: {
|
|
11
|
-
...i?.fetchOptions,
|
|
12
|
-
signal: t,
|
|
13
|
-
throw: !0
|
|
14
|
-
}
|
|
15
|
-
})
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
var o = (e, t, n, r) => e.ensureQueryData(a(t, n, r)), s = (e, t, n, r) => e.prefetchQuery(a(t, n, r)), c = (e, t, n, r) => e.fetchQuery(a(t, n, r));
|
|
19
|
-
function l(t, n = {}, o) {
|
|
20
|
-
let { data: s } = e(t, void 0, o), c = s?.user.id, { query: l, fetchOptions: u, ...d } = n, f = a(t, c, {
|
|
21
|
-
query: l,
|
|
22
|
-
fetchOptions: u
|
|
23
|
-
});
|
|
24
|
-
return i({
|
|
25
|
-
...d,
|
|
26
|
-
...f,
|
|
27
|
-
queryFn: c ? f.queryFn : r
|
|
28
|
-
}, o);
|
|
29
|
-
}
|
|
30
|
-
//#endregion
|
|
31
|
-
export { o as ensureListPasskeys, c as fetchListPasskeys, a as listPasskeysOptions, s as prefetchListPasskeys, l as useListPasskeys };
|