better-auth 1.3.8-beta.7 → 1.3.8-beta.9
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/adapters/drizzle-adapter/index.d.cts +2 -2
- package/dist/adapters/drizzle-adapter/index.d.mts +2 -2
- package/dist/adapters/drizzle-adapter/index.d.ts +2 -2
- package/dist/adapters/index.d.cts +3 -3
- package/dist/adapters/index.d.mts +3 -3
- package/dist/adapters/index.d.ts +3 -3
- package/dist/adapters/kysely-adapter/index.d.cts +2 -2
- package/dist/adapters/kysely-adapter/index.d.mts +2 -2
- package/dist/adapters/kysely-adapter/index.d.ts +2 -2
- package/dist/adapters/memory-adapter/index.d.cts +2 -2
- package/dist/adapters/memory-adapter/index.d.mts +2 -2
- package/dist/adapters/memory-adapter/index.d.ts +2 -2
- package/dist/adapters/mongodb-adapter/index.d.cts +2 -2
- package/dist/adapters/mongodb-adapter/index.d.mts +2 -2
- package/dist/adapters/mongodb-adapter/index.d.ts +2 -2
- package/dist/adapters/prisma-adapter/index.d.cts +2 -2
- package/dist/adapters/prisma-adapter/index.d.mts +2 -2
- package/dist/adapters/prisma-adapter/index.d.ts +2 -2
- package/dist/adapters/test.d.cts +2 -2
- package/dist/adapters/test.d.mts +2 -2
- package/dist/adapters/test.d.ts +2 -2
- package/dist/api/index.cjs +1 -1
- package/dist/api/index.d.cts +2 -2
- package/dist/api/index.d.mts +2 -2
- package/dist/api/index.d.ts +2 -2
- package/dist/api/index.mjs +2 -2
- package/dist/client/index.cjs +2 -2
- package/dist/client/index.d.cts +4 -4
- package/dist/client/index.d.mts +4 -4
- package/dist/client/index.d.ts +4 -4
- package/dist/client/index.mjs +2 -2
- package/dist/client/plugins/index.cjs +31 -3
- package/dist/client/plugins/index.d.cts +39 -9
- package/dist/client/plugins/index.d.mts +39 -9
- package/dist/client/plugins/index.d.ts +39 -9
- package/dist/client/plugins/index.mjs +33 -5
- package/dist/client/react/index.cjs +1 -1
- package/dist/client/react/index.d.cts +9 -9
- package/dist/client/react/index.d.mts +9 -9
- package/dist/client/react/index.d.ts +9 -9
- package/dist/client/react/index.mjs +1 -1
- package/dist/client/solid/index.cjs +1 -1
- package/dist/client/solid/index.d.cts +3 -3
- package/dist/client/solid/index.d.mts +3 -3
- package/dist/client/solid/index.d.ts +3 -3
- package/dist/client/solid/index.mjs +1 -1
- package/dist/client/svelte/index.cjs +1 -1
- package/dist/client/svelte/index.d.cts +3 -3
- package/dist/client/svelte/index.d.mts +3 -3
- package/dist/client/svelte/index.d.ts +3 -3
- package/dist/client/svelte/index.mjs +1 -1
- package/dist/client/vue/index.cjs +1 -1
- package/dist/client/vue/index.d.cts +12 -12
- package/dist/client/vue/index.d.mts +12 -12
- package/dist/client/vue/index.d.ts +12 -12
- package/dist/client/vue/index.mjs +1 -1
- package/dist/cookies/index.d.cts +2 -2
- package/dist/cookies/index.d.mts +2 -2
- package/dist/cookies/index.d.ts +2 -2
- package/dist/db/index.d.cts +3 -3
- package/dist/db/index.d.mts +3 -3
- package/dist/db/index.d.ts +3 -3
- package/dist/index.cjs +10 -9
- package/dist/index.d.cts +6 -5
- package/dist/index.d.mts +6 -5
- package/dist/index.d.ts +6 -5
- package/dist/index.mjs +9 -9
- package/dist/integrations/next-js.cjs +2 -2
- package/dist/integrations/next-js.d.cts +2 -2
- package/dist/integrations/next-js.d.mts +2 -2
- package/dist/integrations/next-js.d.ts +2 -2
- package/dist/integrations/next-js.mjs +2 -2
- package/dist/integrations/node.d.cts +2 -2
- package/dist/integrations/node.d.mts +2 -2
- package/dist/integrations/node.d.ts +2 -2
- package/dist/integrations/react-start.cjs +2 -2
- package/dist/integrations/react-start.d.cts +2 -2
- package/dist/integrations/react-start.d.mts +2 -2
- package/dist/integrations/react-start.d.ts +2 -2
- package/dist/integrations/react-start.mjs +2 -2
- package/dist/integrations/svelte-kit.cjs +1 -1
- package/dist/integrations/svelte-kit.d.cts +2 -2
- package/dist/integrations/svelte-kit.d.mts +2 -2
- package/dist/integrations/svelte-kit.d.ts +2 -2
- package/dist/integrations/svelte-kit.mjs +1 -1
- package/dist/oauth2/index.cjs +1 -1
- package/dist/oauth2/index.d.cts +4 -4
- package/dist/oauth2/index.d.mts +4 -4
- package/dist/oauth2/index.d.ts +4 -4
- package/dist/oauth2/index.mjs +1 -1
- package/dist/plugins/admin/index.cjs +2 -2
- package/dist/plugins/admin/index.d.cts +4 -4
- package/dist/plugins/admin/index.d.mts +4 -4
- package/dist/plugins/admin/index.d.ts +4 -4
- package/dist/plugins/admin/index.mjs +2 -2
- package/dist/plugins/anonymous/index.cjs +1 -1
- package/dist/plugins/anonymous/index.d.cts +2 -2
- package/dist/plugins/anonymous/index.d.mts +2 -2
- package/dist/plugins/anonymous/index.d.ts +2 -2
- package/dist/plugins/anonymous/index.mjs +1 -1
- package/dist/plugins/bearer/index.cjs +1 -1
- package/dist/plugins/bearer/index.d.cts +2 -2
- package/dist/plugins/bearer/index.d.mts +2 -2
- package/dist/plugins/bearer/index.d.ts +2 -2
- package/dist/plugins/bearer/index.mjs +1 -1
- package/dist/plugins/captcha/index.d.cts +2 -2
- package/dist/plugins/captcha/index.d.mts +2 -2
- package/dist/plugins/captcha/index.d.ts +2 -2
- package/dist/plugins/custom-session/index.cjs +1 -1
- package/dist/plugins/custom-session/index.d.cts +2 -2
- package/dist/plugins/custom-session/index.d.mts +2 -2
- package/dist/plugins/custom-session/index.d.ts +2 -2
- package/dist/plugins/custom-session/index.mjs +1 -1
- package/dist/plugins/device-authorization/index.d.cts +2 -2
- package/dist/plugins/device-authorization/index.d.mts +2 -2
- package/dist/plugins/device-authorization/index.d.ts +2 -2
- package/dist/plugins/email-otp/index.cjs +1 -1
- package/dist/plugins/email-otp/index.d.cts +2 -2
- package/dist/plugins/email-otp/index.d.mts +2 -2
- package/dist/plugins/email-otp/index.d.ts +2 -2
- package/dist/plugins/email-otp/index.mjs +1 -1
- package/dist/plugins/generic-oauth/index.cjs +1 -1
- package/dist/plugins/generic-oauth/index.d.cts +2 -2
- package/dist/plugins/generic-oauth/index.d.mts +2 -2
- package/dist/plugins/generic-oauth/index.d.ts +2 -2
- package/dist/plugins/generic-oauth/index.mjs +1 -1
- package/dist/plugins/haveibeenpwned/index.cjs +1 -1
- package/dist/plugins/haveibeenpwned/index.d.cts +2 -2
- package/dist/plugins/haveibeenpwned/index.d.mts +2 -2
- package/dist/plugins/haveibeenpwned/index.d.ts +2 -2
- package/dist/plugins/haveibeenpwned/index.mjs +1 -1
- package/dist/plugins/index.cjs +7 -7
- package/dist/plugins/index.d.cts +5 -5
- package/dist/plugins/index.d.mts +5 -5
- package/dist/plugins/index.d.ts +5 -5
- package/dist/plugins/index.mjs +8 -8
- package/dist/plugins/jwt/index.cjs +1 -1
- package/dist/plugins/jwt/index.d.cts +2 -2
- package/dist/plugins/jwt/index.d.mts +2 -2
- package/dist/plugins/jwt/index.d.ts +2 -2
- package/dist/plugins/jwt/index.mjs +1 -1
- package/dist/plugins/magic-link/index.cjs +1 -1
- package/dist/plugins/magic-link/index.mjs +1 -1
- package/dist/plugins/multi-session/index.cjs +1 -1
- package/dist/plugins/multi-session/index.d.cts +2 -2
- package/dist/plugins/multi-session/index.d.mts +2 -2
- package/dist/plugins/multi-session/index.d.ts +2 -2
- package/dist/plugins/multi-session/index.mjs +1 -1
- package/dist/plugins/oauth-proxy/index.cjs +1 -1
- package/dist/plugins/oauth-proxy/index.d.cts +2 -2
- package/dist/plugins/oauth-proxy/index.d.mts +2 -2
- package/dist/plugins/oauth-proxy/index.d.ts +2 -2
- package/dist/plugins/oauth-proxy/index.mjs +1 -1
- package/dist/plugins/oidc-provider/index.cjs +2 -2
- package/dist/plugins/oidc-provider/index.d.cts +6 -6
- package/dist/plugins/oidc-provider/index.d.mts +6 -6
- package/dist/plugins/oidc-provider/index.d.ts +6 -6
- package/dist/plugins/oidc-provider/index.mjs +2 -2
- package/dist/plugins/one-tap/index.cjs +1 -1
- package/dist/plugins/one-tap/index.mjs +1 -1
- package/dist/plugins/one-time-token/index.cjs +3 -3
- package/dist/plugins/one-time-token/index.d.cts +2 -2
- package/dist/plugins/one-time-token/index.d.mts +2 -2
- package/dist/plugins/one-time-token/index.d.ts +2 -2
- package/dist/plugins/one-time-token/index.mjs +3 -3
- package/dist/plugins/open-api/index.cjs +1 -1
- package/dist/plugins/open-api/index.d.cts +2 -2
- package/dist/plugins/open-api/index.d.mts +2 -2
- package/dist/plugins/open-api/index.d.ts +2 -2
- package/dist/plugins/open-api/index.mjs +1 -1
- package/dist/plugins/organization/access/index.cjs +9 -4
- package/dist/plugins/organization/access/index.d.cts +56 -25
- package/dist/plugins/organization/access/index.d.mts +56 -25
- package/dist/plugins/organization/access/index.d.ts +56 -25
- package/dist/plugins/organization/access/index.mjs +9 -4
- package/dist/plugins/organization/index.cjs +4 -4
- package/dist/plugins/organization/index.d.cts +12104 -2664
- package/dist/plugins/organization/index.d.mts +12104 -2664
- package/dist/plugins/organization/index.d.ts +12104 -2664
- package/dist/plugins/organization/index.mjs +4 -4
- package/dist/plugins/passkey/index.cjs +1 -1
- package/dist/plugins/passkey/index.d.cts +2 -2
- package/dist/plugins/passkey/index.d.mts +2 -2
- package/dist/plugins/passkey/index.d.ts +2 -2
- package/dist/plugins/passkey/index.mjs +1 -1
- package/dist/plugins/phone-number/index.cjs +1 -1
- package/dist/plugins/phone-number/index.d.cts +2 -2
- package/dist/plugins/phone-number/index.d.mts +2 -2
- package/dist/plugins/phone-number/index.d.ts +2 -2
- package/dist/plugins/phone-number/index.mjs +1 -1
- package/dist/plugins/siwe/index.cjs +1 -1
- package/dist/plugins/siwe/index.d.cts +2 -2
- package/dist/plugins/siwe/index.d.mts +2 -2
- package/dist/plugins/siwe/index.d.ts +2 -2
- package/dist/plugins/siwe/index.mjs +1 -1
- package/dist/plugins/sso/index.cjs +1 -1
- package/dist/plugins/sso/index.d.cts +4 -4
- package/dist/plugins/sso/index.d.mts +4 -4
- package/dist/plugins/sso/index.d.ts +4 -4
- package/dist/plugins/sso/index.mjs +1 -1
- package/dist/plugins/two-factor/index.cjs +1 -1
- package/dist/plugins/two-factor/index.d.cts +2 -2
- package/dist/plugins/two-factor/index.d.mts +2 -2
- package/dist/plugins/two-factor/index.d.ts +2 -2
- package/dist/plugins/two-factor/index.mjs +1 -1
- package/dist/plugins/username/index.cjs +1 -1
- package/dist/plugins/username/index.d.cts +2 -2
- package/dist/plugins/username/index.d.mts +2 -2
- package/dist/plugins/username/index.d.ts +2 -2
- package/dist/plugins/username/index.mjs +1 -1
- package/dist/shared/{better-auth.BXZFHeKS.d.cts → better-auth.3m3MTRoL.d.cts} +1 -1
- package/dist/shared/{better-auth.BVRe9oUF.d.cts → better-auth.B2sdtpa-.d.cts} +2 -13
- package/dist/shared/{better-auth.srwANuMX.cjs → better-auth.B4ss9kvz.cjs} +1798 -247
- package/dist/shared/{better-auth.B4s085TW.cjs → better-auth.BEsywhdZ.cjs} +1 -7
- package/dist/shared/{better-auth.DygnLQW5.mjs → better-auth.BI4JniQN.mjs} +1 -7
- package/dist/shared/{better-auth.BZ1rl9jb.cjs → better-auth.BKTHmemy.cjs} +1 -1
- package/dist/shared/{better-auth.B5XPvU4V.d.mts → better-auth.BKoHQyy0.d.mts} +1 -1
- package/dist/shared/{better-auth.BYiXvdJQ.cjs → better-auth.BUvUa_Fh.cjs} +9 -1
- package/dist/shared/{better-auth.CApDACtr.mjs → better-auth.B_KS59W1.mjs} +1798 -247
- package/dist/shared/{better-auth.BpZ2qzWn.d.mts → better-auth.BeqVmFDy.d.mts} +1 -1
- package/dist/shared/{better-auth.Ctgkdy7x.d.mts → better-auth.Bh5GST-4.d.mts} +1 -1
- package/dist/shared/better-auth.BusfdPsj.cjs +87 -0
- package/dist/shared/{better-auth.efEqxJ3k.d.mts → better-auth.CBUKWpSt.d.mts} +2 -13
- package/dist/shared/{better-auth.DX9TcqCt.mjs → better-auth.CBdfkPoe.mjs} +1 -1
- package/dist/shared/{better-auth.BDe8YvTr.cjs → better-auth.CZpfmhXT.cjs} +1 -1
- package/dist/shared/{better-auth.BF-28VnX.d.mts → better-auth.Cl6lMoDP.d.mts} +1 -1
- package/dist/shared/{better-auth.BhdSraHG.cjs → better-auth.CnfAXqRG.cjs} +1 -1
- package/dist/shared/{better-auth.lTCLLcGt.d.ts → better-auth.CrW7XRZx.d.ts} +1 -1
- package/dist/shared/{better-auth.CnJoIxG_.d.ts → better-auth.CySkohPi.d.ts} +2 -13
- package/dist/shared/{better-auth._2xnM2S3.mjs → better-auth.D7PawI_-.mjs} +1 -12
- package/dist/shared/{better-auth.BLYxY3m3.d.ts → better-auth.DLXmZJi-.d.ts} +1 -1
- package/dist/shared/better-auth.DOFt_82p.mjs +70 -0
- package/dist/shared/{better-auth.Ca_NjiGd.d.cts → better-auth.DUztHusY.d.cts} +1 -1
- package/dist/shared/{better-auth.CxKBteqV.cjs → better-auth.Di5iHMA7.cjs} +1 -1
- package/dist/shared/{better-auth.BgjEx6dy.d.cts → better-auth.DqvNU_YJ.d.cts} +1 -1
- package/dist/shared/{better-auth.CG9DHk60.mjs → better-auth.DskHRUA7.mjs} +9 -1
- package/dist/shared/{better-auth.DNf2m_JT.d.ts → better-auth.Du6fl8yS.d.ts} +1 -1
- package/dist/shared/{better-auth.g2ow3cc2.cjs → better-auth.NTJWm3qM.cjs} +0 -12
- package/dist/shared/{better-auth.DqbGTNEt.mjs → better-auth.PPeYAZw9.mjs} +1 -1
- package/dist/shared/{better-auth.BcTT5K5S.mjs → better-auth.ifuaFFT6.mjs} +1 -1
- package/dist/shared/{better-auth.vI-5STVo.mjs → better-auth.ni8tK7Wv.mjs} +2 -2
- package/dist/shared/{better-auth.K0z8EJFS.mjs → better-auth.sJR84kSG.mjs} +1 -1
- package/dist/shared/{better-auth.D7tWjP25.d.cts → better-auth.ucmRbPom.d.cts} +1 -1
- package/dist/shared/{better-auth.BCH1iVsI.d.ts → better-auth.v9lHrfe7.d.ts} +1 -1
- package/dist/shared/{better-auth.Cm_V_J8I.cjs → better-auth.yYFlLPlP.cjs} +2 -2
- package/dist/social-providers/index.cjs +1 -2
- package/dist/social-providers/index.d.cts +1 -1
- package/dist/social-providers/index.d.mts +1 -1
- package/dist/social-providers/index.d.ts +1 -1
- package/dist/social-providers/index.mjs +1 -1
- package/dist/test-utils/index.cjs +5 -5
- package/dist/test-utils/index.d.cts +3 -3
- package/dist/test-utils/index.d.mts +3 -3
- package/dist/test-utils/index.d.ts +3 -3
- package/dist/test-utils/index.mjs +5 -5
- package/dist/types/index.d.cts +3 -3
- package/dist/types/index.d.mts +3 -3
- package/dist/types/index.d.ts +3 -3
- package/package.json +1 -1
- package/dist/shared/better-auth.D7N9YNr5.cjs +0 -25
- package/dist/shared/better-auth.Dt0CvI2z.mjs +0 -23
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { organization, InferMember, InferInvitation, Team, Organization, Member, Invitation, OrganizationOptions, TeamMember } from '../../plugins/organization/index.cjs';
|
|
1
|
+
import { organization, InferMember, InferInvitation, Team, Organization, Member, Invitation, OrganizationOptions, TeamMember, OrganizationRole } from '../../plugins/organization/index.cjs';
|
|
2
2
|
import { AccessControl, Role, Statements } from '../../plugins/access/index.cjs';
|
|
3
|
-
import
|
|
3
|
+
import * as nanostores from 'nanostores';
|
|
4
|
+
import { atom } from 'nanostores';
|
|
5
|
+
import { J as FieldAttribute, B as BetterAuthOptions, U as User, h as BetterAuthPlugin } from '../../shared/better-auth.3m3MTRoL.cjs';
|
|
4
6
|
import { a as Prettify } from '../../shared/better-auth.DTtXpZYr.cjs';
|
|
5
|
-
import {
|
|
7
|
+
import { e as Store, C as ClientOptions, S as SessionQueryParams } from '../../shared/better-auth.DqvNU_YJ.cjs';
|
|
6
8
|
import * as _better_fetch_fetch from '@better-fetch/fetch';
|
|
7
9
|
import { BetterFetch, BetterFetchOption } from '@better-fetch/fetch';
|
|
8
|
-
import * as nanostores from 'nanostores';
|
|
9
|
-
import { atom } from 'nanostores';
|
|
10
10
|
import { username } from '../../plugins/username/index.cjs';
|
|
11
11
|
import { Session } from 'inspector';
|
|
12
12
|
import { Passkey, passkey } from '../../plugins/passkey/index.cjs';
|
|
@@ -21,7 +21,7 @@ import { multiSession } from '../../plugins/multi-session/index.cjs';
|
|
|
21
21
|
import { emailOTP } from '../../plugins/email-otp/index.cjs';
|
|
22
22
|
import { sso } from '../../plugins/sso/index.cjs';
|
|
23
23
|
import { oidcProvider } from '../../plugins/oidc-provider/index.cjs';
|
|
24
|
-
import { a as apiKey } from '../../shared/better-auth.
|
|
24
|
+
import { a as apiKey } from '../../shared/better-auth.ucmRbPom.cjs';
|
|
25
25
|
import { oneTimeToken } from '../../plugins/one-time-token/index.cjs';
|
|
26
26
|
import { siwe } from '../../plugins/siwe/index.cjs';
|
|
27
27
|
export { deviceAuthorizationClient } from '../../plugins/device-authorization/index.cjs';
|
|
@@ -31,7 +31,7 @@ import 'zod/v4';
|
|
|
31
31
|
import 'better-call';
|
|
32
32
|
import '../../plugins/organization/access/index.cjs';
|
|
33
33
|
import 'kysely';
|
|
34
|
-
import '../../shared/better-auth.
|
|
34
|
+
import '../../shared/better-auth.B2sdtpa-.cjs';
|
|
35
35
|
import 'jose';
|
|
36
36
|
import 'zod/v4/core';
|
|
37
37
|
import 'zod';
|
|
@@ -68,6 +68,14 @@ interface OrganizationClientOptions {
|
|
|
68
68
|
[key: string]: FieldAttribute;
|
|
69
69
|
};
|
|
70
70
|
};
|
|
71
|
+
organizationRole?: {
|
|
72
|
+
additionalFields?: {
|
|
73
|
+
[key: string]: FieldAttribute;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
dynamicAccessControl?: {
|
|
78
|
+
enabled: boolean;
|
|
71
79
|
};
|
|
72
80
|
}
|
|
73
81
|
declare const organizationClient: <CO extends OrganizationClientOptions>(options?: CO) => {
|
|
@@ -78,6 +86,7 @@ declare const organizationClient: <CO extends OrganizationClientOptions>(options
|
|
|
78
86
|
readonly member: readonly ["create", "update", "delete"];
|
|
79
87
|
readonly invitation: readonly ["create", "cancel"];
|
|
80
88
|
readonly team: readonly ["create", "update", "delete"];
|
|
89
|
+
readonly ac: readonly ["create", "read", "update", "delete"];
|
|
81
90
|
}>;
|
|
82
91
|
roles: CO["roles"] extends Record<string, Role> ? CO["roles"] : {
|
|
83
92
|
admin: Role;
|
|
@@ -90,8 +99,13 @@ declare const organizationClient: <CO extends OrganizationClientOptions>(options
|
|
|
90
99
|
} ? true : false;
|
|
91
100
|
};
|
|
92
101
|
schema: CO["schema"];
|
|
102
|
+
dynamicAccessControl: {
|
|
103
|
+
enabled: CO["dynamicAccessControl"] extends {
|
|
104
|
+
enabled: true;
|
|
105
|
+
} ? true : false;
|
|
106
|
+
};
|
|
93
107
|
}>>;
|
|
94
|
-
getActions: ($fetch: _better_fetch_fetch.BetterFetch) => {
|
|
108
|
+
getActions: ($fetch: _better_fetch_fetch.BetterFetch, _$store: Store, co: ClientOptions | undefined) => {
|
|
95
109
|
$Infer: {
|
|
96
110
|
ActiveOrganization: CO["teams"] extends {
|
|
97
111
|
enabled: true;
|
|
@@ -134,16 +148,19 @@ declare const organizationClient: <CO extends OrganizationClientOptions>(options
|
|
|
134
148
|
readonly member: readonly ["create", "update", "delete"];
|
|
135
149
|
readonly invitation: readonly ["create", "cancel"];
|
|
136
150
|
readonly team: readonly ["create", "update", "delete"];
|
|
151
|
+
readonly ac: readonly ["create", "read", "update", "delete"];
|
|
137
152
|
})]?: ((CO["ac"] extends AccessControl<infer S extends Statements> ? S : {
|
|
138
153
|
readonly organization: readonly ["update", "delete"];
|
|
139
154
|
readonly member: readonly ["create", "update", "delete"];
|
|
140
155
|
readonly invitation: readonly ["create", "cancel"];
|
|
141
156
|
readonly team: readonly ["create", "update", "delete"];
|
|
157
|
+
readonly ac: readonly ["create", "read", "update", "delete"];
|
|
142
158
|
})[key] extends readonly unknown[] ? (CO["ac"] extends AccessControl<infer S extends Statements> ? S : {
|
|
143
159
|
readonly organization: readonly ["update", "delete"];
|
|
144
160
|
readonly member: readonly ["create", "update", "delete"];
|
|
145
161
|
readonly invitation: readonly ["create", "cancel"];
|
|
146
162
|
readonly team: readonly ["create", "update", "delete"];
|
|
163
|
+
readonly ac: readonly ["create", "read", "update", "delete"];
|
|
147
164
|
})[key][number] : never)[] | undefined; };
|
|
148
165
|
permissions?: never;
|
|
149
166
|
} | {
|
|
@@ -152,21 +169,24 @@ declare const organizationClient: <CO extends OrganizationClientOptions>(options
|
|
|
152
169
|
readonly member: readonly ["create", "update", "delete"];
|
|
153
170
|
readonly invitation: readonly ["create", "cancel"];
|
|
154
171
|
readonly team: readonly ["create", "update", "delete"];
|
|
172
|
+
readonly ac: readonly ["create", "read", "update", "delete"];
|
|
155
173
|
})]?: ((CO["ac"] extends AccessControl<infer S extends Statements> ? S : {
|
|
156
174
|
readonly organization: readonly ["update", "delete"];
|
|
157
175
|
readonly member: readonly ["create", "update", "delete"];
|
|
158
176
|
readonly invitation: readonly ["create", "cancel"];
|
|
159
177
|
readonly team: readonly ["create", "update", "delete"];
|
|
178
|
+
readonly ac: readonly ["create", "read", "update", "delete"];
|
|
160
179
|
})[key] extends readonly unknown[] ? (CO["ac"] extends AccessControl<infer S extends Statements> ? S : {
|
|
161
180
|
readonly organization: readonly ["update", "delete"];
|
|
162
181
|
readonly member: readonly ["create", "update", "delete"];
|
|
163
182
|
readonly invitation: readonly ["create", "cancel"];
|
|
164
183
|
readonly team: readonly ["create", "update", "delete"];
|
|
184
|
+
readonly ac: readonly ["create", "read", "update", "delete"];
|
|
165
185
|
})[key][number] : never)[] | undefined; };
|
|
166
186
|
permission?: never;
|
|
167
187
|
}) & {
|
|
168
188
|
role: R;
|
|
169
|
-
}) => boolean
|
|
189
|
+
}) => Promise<boolean>;
|
|
170
190
|
};
|
|
171
191
|
};
|
|
172
192
|
getAtoms: ($fetch: _better_fetch_fetch.BetterFetch) => {
|
|
@@ -281,6 +301,11 @@ declare const inferOrgAdditionalFields: <O extends {
|
|
|
281
301
|
modelName?: string;
|
|
282
302
|
fields?: { [key in keyof Omit<TeamMember, "id">]?: string; };
|
|
283
303
|
};
|
|
304
|
+
organizationRole?: {
|
|
305
|
+
modelName?: string;
|
|
306
|
+
fields?: { [key in keyof Omit<OrganizationRole, "id">]?: string; };
|
|
307
|
+
additionalFields?: { [key in string]: FieldAttribute; };
|
|
308
|
+
};
|
|
284
309
|
} ? O : ((O extends {
|
|
285
310
|
options: any;
|
|
286
311
|
} ? O : {
|
|
@@ -330,6 +355,11 @@ declare const inferOrgAdditionalFields: <O extends {
|
|
|
330
355
|
modelName?: string;
|
|
331
356
|
fields?: { [key in keyof Omit<TeamMember, "id">]?: string; };
|
|
332
357
|
};
|
|
358
|
+
organizationRole?: {
|
|
359
|
+
modelName?: string;
|
|
360
|
+
fields?: { [key in keyof Omit<OrganizationRole, "id">]?: string; };
|
|
361
|
+
additionalFields?: { [key in string]: FieldAttribute; };
|
|
362
|
+
};
|
|
333
363
|
} | undefined ? S_1 : undefined : undefined : undefined : S;
|
|
334
364
|
|
|
335
365
|
declare const usernameClient: () => {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { organization, InferMember, InferInvitation, Team, Organization, Member, Invitation, OrganizationOptions, TeamMember } from '../../plugins/organization/index.mjs';
|
|
1
|
+
import { organization, InferMember, InferInvitation, Team, Organization, Member, Invitation, OrganizationOptions, TeamMember, OrganizationRole } from '../../plugins/organization/index.mjs';
|
|
2
2
|
import { AccessControl, Role, Statements } from '../../plugins/access/index.mjs';
|
|
3
|
-
import
|
|
3
|
+
import * as nanostores from 'nanostores';
|
|
4
|
+
import { atom } from 'nanostores';
|
|
5
|
+
import { J as FieldAttribute, B as BetterAuthOptions, U as User, h as BetterAuthPlugin } from '../../shared/better-auth.BeqVmFDy.mjs';
|
|
4
6
|
import { a as Prettify } from '../../shared/better-auth.DTtXpZYr.mjs';
|
|
5
|
-
import {
|
|
7
|
+
import { e as Store, C as ClientOptions, S as SessionQueryParams } from '../../shared/better-auth.Bh5GST-4.mjs';
|
|
6
8
|
import * as _better_fetch_fetch from '@better-fetch/fetch';
|
|
7
9
|
import { BetterFetch, BetterFetchOption } from '@better-fetch/fetch';
|
|
8
|
-
import * as nanostores from 'nanostores';
|
|
9
|
-
import { atom } from 'nanostores';
|
|
10
10
|
import { username } from '../../plugins/username/index.mjs';
|
|
11
11
|
import { Session } from 'inspector';
|
|
12
12
|
import { Passkey, passkey } from '../../plugins/passkey/index.mjs';
|
|
@@ -21,7 +21,7 @@ import { multiSession } from '../../plugins/multi-session/index.mjs';
|
|
|
21
21
|
import { emailOTP } from '../../plugins/email-otp/index.mjs';
|
|
22
22
|
import { sso } from '../../plugins/sso/index.mjs';
|
|
23
23
|
import { oidcProvider } from '../../plugins/oidc-provider/index.mjs';
|
|
24
|
-
import { a as apiKey } from '../../shared/better-auth.
|
|
24
|
+
import { a as apiKey } from '../../shared/better-auth.BKoHQyy0.mjs';
|
|
25
25
|
import { oneTimeToken } from '../../plugins/one-time-token/index.mjs';
|
|
26
26
|
import { siwe } from '../../plugins/siwe/index.mjs';
|
|
27
27
|
export { deviceAuthorizationClient } from '../../plugins/device-authorization/index.mjs';
|
|
@@ -31,7 +31,7 @@ import 'zod/v4';
|
|
|
31
31
|
import 'better-call';
|
|
32
32
|
import '../../plugins/organization/access/index.mjs';
|
|
33
33
|
import 'kysely';
|
|
34
|
-
import '../../shared/better-auth.
|
|
34
|
+
import '../../shared/better-auth.CBUKWpSt.mjs';
|
|
35
35
|
import 'jose';
|
|
36
36
|
import 'zod/v4/core';
|
|
37
37
|
import 'zod';
|
|
@@ -68,6 +68,14 @@ interface OrganizationClientOptions {
|
|
|
68
68
|
[key: string]: FieldAttribute;
|
|
69
69
|
};
|
|
70
70
|
};
|
|
71
|
+
organizationRole?: {
|
|
72
|
+
additionalFields?: {
|
|
73
|
+
[key: string]: FieldAttribute;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
dynamicAccessControl?: {
|
|
78
|
+
enabled: boolean;
|
|
71
79
|
};
|
|
72
80
|
}
|
|
73
81
|
declare const organizationClient: <CO extends OrganizationClientOptions>(options?: CO) => {
|
|
@@ -78,6 +86,7 @@ declare const organizationClient: <CO extends OrganizationClientOptions>(options
|
|
|
78
86
|
readonly member: readonly ["create", "update", "delete"];
|
|
79
87
|
readonly invitation: readonly ["create", "cancel"];
|
|
80
88
|
readonly team: readonly ["create", "update", "delete"];
|
|
89
|
+
readonly ac: readonly ["create", "read", "update", "delete"];
|
|
81
90
|
}>;
|
|
82
91
|
roles: CO["roles"] extends Record<string, Role> ? CO["roles"] : {
|
|
83
92
|
admin: Role;
|
|
@@ -90,8 +99,13 @@ declare const organizationClient: <CO extends OrganizationClientOptions>(options
|
|
|
90
99
|
} ? true : false;
|
|
91
100
|
};
|
|
92
101
|
schema: CO["schema"];
|
|
102
|
+
dynamicAccessControl: {
|
|
103
|
+
enabled: CO["dynamicAccessControl"] extends {
|
|
104
|
+
enabled: true;
|
|
105
|
+
} ? true : false;
|
|
106
|
+
};
|
|
93
107
|
}>>;
|
|
94
|
-
getActions: ($fetch: _better_fetch_fetch.BetterFetch) => {
|
|
108
|
+
getActions: ($fetch: _better_fetch_fetch.BetterFetch, _$store: Store, co: ClientOptions | undefined) => {
|
|
95
109
|
$Infer: {
|
|
96
110
|
ActiveOrganization: CO["teams"] extends {
|
|
97
111
|
enabled: true;
|
|
@@ -134,16 +148,19 @@ declare const organizationClient: <CO extends OrganizationClientOptions>(options
|
|
|
134
148
|
readonly member: readonly ["create", "update", "delete"];
|
|
135
149
|
readonly invitation: readonly ["create", "cancel"];
|
|
136
150
|
readonly team: readonly ["create", "update", "delete"];
|
|
151
|
+
readonly ac: readonly ["create", "read", "update", "delete"];
|
|
137
152
|
})]?: ((CO["ac"] extends AccessControl<infer S extends Statements> ? S : {
|
|
138
153
|
readonly organization: readonly ["update", "delete"];
|
|
139
154
|
readonly member: readonly ["create", "update", "delete"];
|
|
140
155
|
readonly invitation: readonly ["create", "cancel"];
|
|
141
156
|
readonly team: readonly ["create", "update", "delete"];
|
|
157
|
+
readonly ac: readonly ["create", "read", "update", "delete"];
|
|
142
158
|
})[key] extends readonly unknown[] ? (CO["ac"] extends AccessControl<infer S extends Statements> ? S : {
|
|
143
159
|
readonly organization: readonly ["update", "delete"];
|
|
144
160
|
readonly member: readonly ["create", "update", "delete"];
|
|
145
161
|
readonly invitation: readonly ["create", "cancel"];
|
|
146
162
|
readonly team: readonly ["create", "update", "delete"];
|
|
163
|
+
readonly ac: readonly ["create", "read", "update", "delete"];
|
|
147
164
|
})[key][number] : never)[] | undefined; };
|
|
148
165
|
permissions?: never;
|
|
149
166
|
} | {
|
|
@@ -152,21 +169,24 @@ declare const organizationClient: <CO extends OrganizationClientOptions>(options
|
|
|
152
169
|
readonly member: readonly ["create", "update", "delete"];
|
|
153
170
|
readonly invitation: readonly ["create", "cancel"];
|
|
154
171
|
readonly team: readonly ["create", "update", "delete"];
|
|
172
|
+
readonly ac: readonly ["create", "read", "update", "delete"];
|
|
155
173
|
})]?: ((CO["ac"] extends AccessControl<infer S extends Statements> ? S : {
|
|
156
174
|
readonly organization: readonly ["update", "delete"];
|
|
157
175
|
readonly member: readonly ["create", "update", "delete"];
|
|
158
176
|
readonly invitation: readonly ["create", "cancel"];
|
|
159
177
|
readonly team: readonly ["create", "update", "delete"];
|
|
178
|
+
readonly ac: readonly ["create", "read", "update", "delete"];
|
|
160
179
|
})[key] extends readonly unknown[] ? (CO["ac"] extends AccessControl<infer S extends Statements> ? S : {
|
|
161
180
|
readonly organization: readonly ["update", "delete"];
|
|
162
181
|
readonly member: readonly ["create", "update", "delete"];
|
|
163
182
|
readonly invitation: readonly ["create", "cancel"];
|
|
164
183
|
readonly team: readonly ["create", "update", "delete"];
|
|
184
|
+
readonly ac: readonly ["create", "read", "update", "delete"];
|
|
165
185
|
})[key][number] : never)[] | undefined; };
|
|
166
186
|
permission?: never;
|
|
167
187
|
}) & {
|
|
168
188
|
role: R;
|
|
169
|
-
}) => boolean
|
|
189
|
+
}) => Promise<boolean>;
|
|
170
190
|
};
|
|
171
191
|
};
|
|
172
192
|
getAtoms: ($fetch: _better_fetch_fetch.BetterFetch) => {
|
|
@@ -281,6 +301,11 @@ declare const inferOrgAdditionalFields: <O extends {
|
|
|
281
301
|
modelName?: string;
|
|
282
302
|
fields?: { [key in keyof Omit<TeamMember, "id">]?: string; };
|
|
283
303
|
};
|
|
304
|
+
organizationRole?: {
|
|
305
|
+
modelName?: string;
|
|
306
|
+
fields?: { [key in keyof Omit<OrganizationRole, "id">]?: string; };
|
|
307
|
+
additionalFields?: { [key in string]: FieldAttribute; };
|
|
308
|
+
};
|
|
284
309
|
} ? O : ((O extends {
|
|
285
310
|
options: any;
|
|
286
311
|
} ? O : {
|
|
@@ -330,6 +355,11 @@ declare const inferOrgAdditionalFields: <O extends {
|
|
|
330
355
|
modelName?: string;
|
|
331
356
|
fields?: { [key in keyof Omit<TeamMember, "id">]?: string; };
|
|
332
357
|
};
|
|
358
|
+
organizationRole?: {
|
|
359
|
+
modelName?: string;
|
|
360
|
+
fields?: { [key in keyof Omit<OrganizationRole, "id">]?: string; };
|
|
361
|
+
additionalFields?: { [key in string]: FieldAttribute; };
|
|
362
|
+
};
|
|
333
363
|
} | undefined ? S_1 : undefined : undefined : undefined : S;
|
|
334
364
|
|
|
335
365
|
declare const usernameClient: () => {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { organization, InferMember, InferInvitation, Team, Organization, Member, Invitation, OrganizationOptions, TeamMember } from '../../plugins/organization/index.js';
|
|
1
|
+
import { organization, InferMember, InferInvitation, Team, Organization, Member, Invitation, OrganizationOptions, TeamMember, OrganizationRole } from '../../plugins/organization/index.js';
|
|
2
2
|
import { AccessControl, Role, Statements } from '../../plugins/access/index.js';
|
|
3
|
-
import
|
|
3
|
+
import * as nanostores from 'nanostores';
|
|
4
|
+
import { atom } from 'nanostores';
|
|
5
|
+
import { J as FieldAttribute, B as BetterAuthOptions, U as User, h as BetterAuthPlugin } from '../../shared/better-auth.v9lHrfe7.js';
|
|
4
6
|
import { a as Prettify } from '../../shared/better-auth.DTtXpZYr.js';
|
|
5
|
-
import {
|
|
7
|
+
import { e as Store, C as ClientOptions, S as SessionQueryParams } from '../../shared/better-auth.DLXmZJi-.js';
|
|
6
8
|
import * as _better_fetch_fetch from '@better-fetch/fetch';
|
|
7
9
|
import { BetterFetch, BetterFetchOption } from '@better-fetch/fetch';
|
|
8
|
-
import * as nanostores from 'nanostores';
|
|
9
|
-
import { atom } from 'nanostores';
|
|
10
10
|
import { username } from '../../plugins/username/index.js';
|
|
11
11
|
import { Session } from 'inspector';
|
|
12
12
|
import { Passkey, passkey } from '../../plugins/passkey/index.js';
|
|
@@ -21,7 +21,7 @@ import { multiSession } from '../../plugins/multi-session/index.js';
|
|
|
21
21
|
import { emailOTP } from '../../plugins/email-otp/index.js';
|
|
22
22
|
import { sso } from '../../plugins/sso/index.js';
|
|
23
23
|
import { oidcProvider } from '../../plugins/oidc-provider/index.js';
|
|
24
|
-
import { a as apiKey } from '../../shared/better-auth.
|
|
24
|
+
import { a as apiKey } from '../../shared/better-auth.CrW7XRZx.js';
|
|
25
25
|
import { oneTimeToken } from '../../plugins/one-time-token/index.js';
|
|
26
26
|
import { siwe } from '../../plugins/siwe/index.js';
|
|
27
27
|
export { deviceAuthorizationClient } from '../../plugins/device-authorization/index.js';
|
|
@@ -31,7 +31,7 @@ import 'zod/v4';
|
|
|
31
31
|
import 'better-call';
|
|
32
32
|
import '../../plugins/organization/access/index.js';
|
|
33
33
|
import 'kysely';
|
|
34
|
-
import '../../shared/better-auth.
|
|
34
|
+
import '../../shared/better-auth.CySkohPi.js';
|
|
35
35
|
import 'jose';
|
|
36
36
|
import 'zod/v4/core';
|
|
37
37
|
import 'zod';
|
|
@@ -68,6 +68,14 @@ interface OrganizationClientOptions {
|
|
|
68
68
|
[key: string]: FieldAttribute;
|
|
69
69
|
};
|
|
70
70
|
};
|
|
71
|
+
organizationRole?: {
|
|
72
|
+
additionalFields?: {
|
|
73
|
+
[key: string]: FieldAttribute;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
dynamicAccessControl?: {
|
|
78
|
+
enabled: boolean;
|
|
71
79
|
};
|
|
72
80
|
}
|
|
73
81
|
declare const organizationClient: <CO extends OrganizationClientOptions>(options?: CO) => {
|
|
@@ -78,6 +86,7 @@ declare const organizationClient: <CO extends OrganizationClientOptions>(options
|
|
|
78
86
|
readonly member: readonly ["create", "update", "delete"];
|
|
79
87
|
readonly invitation: readonly ["create", "cancel"];
|
|
80
88
|
readonly team: readonly ["create", "update", "delete"];
|
|
89
|
+
readonly ac: readonly ["create", "read", "update", "delete"];
|
|
81
90
|
}>;
|
|
82
91
|
roles: CO["roles"] extends Record<string, Role> ? CO["roles"] : {
|
|
83
92
|
admin: Role;
|
|
@@ -90,8 +99,13 @@ declare const organizationClient: <CO extends OrganizationClientOptions>(options
|
|
|
90
99
|
} ? true : false;
|
|
91
100
|
};
|
|
92
101
|
schema: CO["schema"];
|
|
102
|
+
dynamicAccessControl: {
|
|
103
|
+
enabled: CO["dynamicAccessControl"] extends {
|
|
104
|
+
enabled: true;
|
|
105
|
+
} ? true : false;
|
|
106
|
+
};
|
|
93
107
|
}>>;
|
|
94
|
-
getActions: ($fetch: _better_fetch_fetch.BetterFetch) => {
|
|
108
|
+
getActions: ($fetch: _better_fetch_fetch.BetterFetch, _$store: Store, co: ClientOptions | undefined) => {
|
|
95
109
|
$Infer: {
|
|
96
110
|
ActiveOrganization: CO["teams"] extends {
|
|
97
111
|
enabled: true;
|
|
@@ -134,16 +148,19 @@ declare const organizationClient: <CO extends OrganizationClientOptions>(options
|
|
|
134
148
|
readonly member: readonly ["create", "update", "delete"];
|
|
135
149
|
readonly invitation: readonly ["create", "cancel"];
|
|
136
150
|
readonly team: readonly ["create", "update", "delete"];
|
|
151
|
+
readonly ac: readonly ["create", "read", "update", "delete"];
|
|
137
152
|
})]?: ((CO["ac"] extends AccessControl<infer S extends Statements> ? S : {
|
|
138
153
|
readonly organization: readonly ["update", "delete"];
|
|
139
154
|
readonly member: readonly ["create", "update", "delete"];
|
|
140
155
|
readonly invitation: readonly ["create", "cancel"];
|
|
141
156
|
readonly team: readonly ["create", "update", "delete"];
|
|
157
|
+
readonly ac: readonly ["create", "read", "update", "delete"];
|
|
142
158
|
})[key] extends readonly unknown[] ? (CO["ac"] extends AccessControl<infer S extends Statements> ? S : {
|
|
143
159
|
readonly organization: readonly ["update", "delete"];
|
|
144
160
|
readonly member: readonly ["create", "update", "delete"];
|
|
145
161
|
readonly invitation: readonly ["create", "cancel"];
|
|
146
162
|
readonly team: readonly ["create", "update", "delete"];
|
|
163
|
+
readonly ac: readonly ["create", "read", "update", "delete"];
|
|
147
164
|
})[key][number] : never)[] | undefined; };
|
|
148
165
|
permissions?: never;
|
|
149
166
|
} | {
|
|
@@ -152,21 +169,24 @@ declare const organizationClient: <CO extends OrganizationClientOptions>(options
|
|
|
152
169
|
readonly member: readonly ["create", "update", "delete"];
|
|
153
170
|
readonly invitation: readonly ["create", "cancel"];
|
|
154
171
|
readonly team: readonly ["create", "update", "delete"];
|
|
172
|
+
readonly ac: readonly ["create", "read", "update", "delete"];
|
|
155
173
|
})]?: ((CO["ac"] extends AccessControl<infer S extends Statements> ? S : {
|
|
156
174
|
readonly organization: readonly ["update", "delete"];
|
|
157
175
|
readonly member: readonly ["create", "update", "delete"];
|
|
158
176
|
readonly invitation: readonly ["create", "cancel"];
|
|
159
177
|
readonly team: readonly ["create", "update", "delete"];
|
|
178
|
+
readonly ac: readonly ["create", "read", "update", "delete"];
|
|
160
179
|
})[key] extends readonly unknown[] ? (CO["ac"] extends AccessControl<infer S extends Statements> ? S : {
|
|
161
180
|
readonly organization: readonly ["update", "delete"];
|
|
162
181
|
readonly member: readonly ["create", "update", "delete"];
|
|
163
182
|
readonly invitation: readonly ["create", "cancel"];
|
|
164
183
|
readonly team: readonly ["create", "update", "delete"];
|
|
184
|
+
readonly ac: readonly ["create", "read", "update", "delete"];
|
|
165
185
|
})[key][number] : never)[] | undefined; };
|
|
166
186
|
permission?: never;
|
|
167
187
|
}) & {
|
|
168
188
|
role: R;
|
|
169
|
-
}) => boolean
|
|
189
|
+
}) => Promise<boolean>;
|
|
170
190
|
};
|
|
171
191
|
};
|
|
172
192
|
getAtoms: ($fetch: _better_fetch_fetch.BetterFetch) => {
|
|
@@ -281,6 +301,11 @@ declare const inferOrgAdditionalFields: <O extends {
|
|
|
281
301
|
modelName?: string;
|
|
282
302
|
fields?: { [key in keyof Omit<TeamMember, "id">]?: string; };
|
|
283
303
|
};
|
|
304
|
+
organizationRole?: {
|
|
305
|
+
modelName?: string;
|
|
306
|
+
fields?: { [key in keyof Omit<OrganizationRole, "id">]?: string; };
|
|
307
|
+
additionalFields?: { [key in string]: FieldAttribute; };
|
|
308
|
+
};
|
|
284
309
|
} ? O : ((O extends {
|
|
285
310
|
options: any;
|
|
286
311
|
} ? O : {
|
|
@@ -330,6 +355,11 @@ declare const inferOrgAdditionalFields: <O extends {
|
|
|
330
355
|
modelName?: string;
|
|
331
356
|
fields?: { [key in keyof Omit<TeamMember, "id">]?: string; };
|
|
332
357
|
};
|
|
358
|
+
organizationRole?: {
|
|
359
|
+
modelName?: string;
|
|
360
|
+
fields?: { [key in keyof Omit<OrganizationRole, "id">]?: string; };
|
|
361
|
+
additionalFields?: { [key in string]: FieldAttribute; };
|
|
362
|
+
};
|
|
333
363
|
} | undefined ? S_1 : undefined : undefined : undefined : S;
|
|
334
364
|
|
|
335
365
|
declare const usernameClient: () => {
|
|
@@ -3,14 +3,42 @@ import '@better-fetch/fetch';
|
|
|
3
3
|
import '../../shared/better-auth.CMQ3rA-I.mjs';
|
|
4
4
|
import { u as useAuthQuery } from '../../shared/better-auth.kTs0zHGZ.mjs';
|
|
5
5
|
import { ownerAc, memberAc, adminAc } from '../../plugins/organization/access/index.mjs';
|
|
6
|
-
import {
|
|
6
|
+
import { c as clientSideHasPermission } from '../../shared/better-auth.DOFt_82p.mjs';
|
|
7
7
|
import { startRegistration, WebAuthnError, startAuthentication } from '@simplewebauthn/browser';
|
|
8
8
|
export { t as twoFactorClient } from '../../shared/better-auth.Ddw8bVyV.mjs';
|
|
9
9
|
import { userAc, adminAc as adminAc$1 } from '../../plugins/admin/access/index.mjs';
|
|
10
|
-
import { h as hasPermission
|
|
10
|
+
import { h as hasPermission } from '../../shared/better-auth.bkwPl2G4.mjs';
|
|
11
|
+
import 'zod/v4';
|
|
12
|
+
import 'better-call';
|
|
13
|
+
import '../../shared/better-auth.D7PawI_-.mjs';
|
|
14
|
+
import '../../shared/better-auth.DV5EHeYG.mjs';
|
|
15
|
+
import '@better-auth/utils/base64';
|
|
16
|
+
import '@better-auth/utils/hmac';
|
|
17
|
+
import '../../shared/better-auth.BjBlybv-.mjs';
|
|
18
|
+
import '@better-auth/utils/binary';
|
|
19
|
+
import '../../shared/better-auth.n2KFGwjY.mjs';
|
|
11
20
|
export { d as deviceAuthorizationClient } from '../../shared/better-auth.BpA03GIs.mjs';
|
|
12
21
|
import '../../plugins/access/index.mjs';
|
|
13
22
|
import '../../shared/better-auth.DdzSJf-n.mjs';
|
|
23
|
+
import '../../shared/better-auth.CW6D9eSx.mjs';
|
|
24
|
+
import '@better-auth/utils/hash';
|
|
25
|
+
import '../../crypto/index.mjs';
|
|
26
|
+
import '@noble/ciphers/chacha';
|
|
27
|
+
import '@noble/ciphers/utils';
|
|
28
|
+
import '@noble/ciphers/webcrypto';
|
|
29
|
+
import 'jose';
|
|
30
|
+
import '@noble/hashes/scrypt';
|
|
31
|
+
import '@better-auth/utils';
|
|
32
|
+
import '@better-auth/utils/hex';
|
|
33
|
+
import '@noble/hashes/utils';
|
|
34
|
+
import '../../shared/better-auth.B4Qoxdgc.mjs';
|
|
35
|
+
import '@better-auth/utils/random';
|
|
36
|
+
import '../../shared/better-auth.CuS_eDdK.mjs';
|
|
37
|
+
import '../../shared/better-auth.UfVWArIB.mjs';
|
|
38
|
+
import '../../shared/better-auth.BZZKN1g7.mjs';
|
|
39
|
+
import 'jose/errors';
|
|
40
|
+
import '../../shared/better-auth.BUPPRXfK.mjs';
|
|
41
|
+
import 'defu';
|
|
14
42
|
|
|
15
43
|
const organizationClient = (options) => {
|
|
16
44
|
const $listOrg = atom(false);
|
|
@@ -25,7 +53,7 @@ const organizationClient = (options) => {
|
|
|
25
53
|
return {
|
|
26
54
|
id: "organization",
|
|
27
55
|
$InferServerPlugin: {},
|
|
28
|
-
getActions: ($fetch) => ({
|
|
56
|
+
getActions: ($fetch, _$store, co) => ({
|
|
29
57
|
$Infer: {
|
|
30
58
|
ActiveOrganization: {},
|
|
31
59
|
Organization: {},
|
|
@@ -35,7 +63,7 @@ const organizationClient = (options) => {
|
|
|
35
63
|
},
|
|
36
64
|
organization: {
|
|
37
65
|
checkRolePermission: (data) => {
|
|
38
|
-
const isAuthorized =
|
|
66
|
+
const isAuthorized = clientSideHasPermission({
|
|
39
67
|
role: data.role,
|
|
40
68
|
options: {
|
|
41
69
|
ac: options?.ac,
|
|
@@ -348,7 +376,7 @@ const adminClient = (options) => {
|
|
|
348
376
|
getActions: () => ({
|
|
349
377
|
admin: {
|
|
350
378
|
checkRolePermission: (data) => {
|
|
351
|
-
const isAuthorized = hasPermission
|
|
379
|
+
const isAuthorized = hasPermission({
|
|
352
380
|
role: data.role,
|
|
353
381
|
options: {
|
|
354
382
|
ac: options?.ac,
|
|
@@ -4,14 +4,14 @@ export * from 'nanostores';
|
|
|
4
4
|
import * as _better_fetch_fetch from '@better-fetch/fetch';
|
|
5
5
|
import { BetterFetchError } from '@better-fetch/fetch';
|
|
6
6
|
export * from '@better-fetch/fetch';
|
|
7
|
-
import { C as ClientOptions, B as BetterAuthClientPlugin, I as IsSignal, a as InferClientAPI, b as InferActions, S as SessionQueryParams, c as InferErrorCodes } from '../../shared/better-auth.
|
|
7
|
+
import { C as ClientOptions, B as BetterAuthClientPlugin, I as IsSignal, a as InferClientAPI, b as InferActions, S as SessionQueryParams, c as InferErrorCodes } from '../../shared/better-auth.DqvNU_YJ.cjs';
|
|
8
8
|
import { U as UnionToIntersection, P as PrettifyDeep } from '../../shared/better-auth.DTtXpZYr.cjs';
|
|
9
9
|
import { DependencyList } from 'react';
|
|
10
|
-
import { f as BASE_ERROR_CODES } from '../../shared/better-auth.
|
|
10
|
+
import { f as BASE_ERROR_CODES } from '../../shared/better-auth.3m3MTRoL.cjs';
|
|
11
11
|
import 'better-call';
|
|
12
12
|
import 'kysely';
|
|
13
13
|
import 'zod/v4';
|
|
14
|
-
import '../../shared/better-auth.
|
|
14
|
+
import '../../shared/better-auth.B2sdtpa-.cjs';
|
|
15
15
|
import 'jose';
|
|
16
16
|
import 'zod/v4/core';
|
|
17
17
|
import 'zod';
|
|
@@ -69,15 +69,15 @@ declare function createAuthClient<Option extends ClientOptions>(options?: Option
|
|
|
69
69
|
data: InferClientAPI<Option> extends {
|
|
70
70
|
getSession: () => Promise<infer Res>;
|
|
71
71
|
} ? Res extends {
|
|
72
|
+
data: infer S;
|
|
73
|
+
error: null;
|
|
74
|
+
} | {
|
|
72
75
|
data: null;
|
|
73
76
|
error: {
|
|
74
77
|
message?: string | undefined;
|
|
75
78
|
status: number;
|
|
76
79
|
statusText: string;
|
|
77
80
|
};
|
|
78
|
-
} | {
|
|
79
|
-
data: infer S;
|
|
80
|
-
error: null;
|
|
81
81
|
} ? S : Res : never;
|
|
82
82
|
isPending: boolean;
|
|
83
83
|
error: BetterFetchError | null;
|
|
@@ -89,15 +89,15 @@ declare function createAuthClient<Option extends ClientOptions>(options?: Option
|
|
|
89
89
|
Session: NonNullable<InferClientAPI<Option> extends {
|
|
90
90
|
getSession: () => Promise<infer Res>;
|
|
91
91
|
} ? Res extends {
|
|
92
|
+
data: infer S;
|
|
93
|
+
error: null;
|
|
94
|
+
} | {
|
|
92
95
|
data: null;
|
|
93
96
|
error: {
|
|
94
97
|
message?: string | undefined;
|
|
95
98
|
status: number;
|
|
96
99
|
statusText: string;
|
|
97
100
|
};
|
|
98
|
-
} | {
|
|
99
|
-
data: infer S;
|
|
100
|
-
error: null;
|
|
101
101
|
} ? S : Res : never>;
|
|
102
102
|
};
|
|
103
103
|
$fetch: _better_fetch_fetch.BetterFetch<{
|
|
@@ -4,14 +4,14 @@ export * from 'nanostores';
|
|
|
4
4
|
import * as _better_fetch_fetch from '@better-fetch/fetch';
|
|
5
5
|
import { BetterFetchError } from '@better-fetch/fetch';
|
|
6
6
|
export * from '@better-fetch/fetch';
|
|
7
|
-
import { C as ClientOptions, B as BetterAuthClientPlugin, I as IsSignal, a as InferClientAPI, b as InferActions, S as SessionQueryParams, c as InferErrorCodes } from '../../shared/better-auth.
|
|
7
|
+
import { C as ClientOptions, B as BetterAuthClientPlugin, I as IsSignal, a as InferClientAPI, b as InferActions, S as SessionQueryParams, c as InferErrorCodes } from '../../shared/better-auth.Bh5GST-4.mjs';
|
|
8
8
|
import { U as UnionToIntersection, P as PrettifyDeep } from '../../shared/better-auth.DTtXpZYr.mjs';
|
|
9
9
|
import { DependencyList } from 'react';
|
|
10
|
-
import { f as BASE_ERROR_CODES } from '../../shared/better-auth.
|
|
10
|
+
import { f as BASE_ERROR_CODES } from '../../shared/better-auth.BeqVmFDy.mjs';
|
|
11
11
|
import 'better-call';
|
|
12
12
|
import 'kysely';
|
|
13
13
|
import 'zod/v4';
|
|
14
|
-
import '../../shared/better-auth.
|
|
14
|
+
import '../../shared/better-auth.CBUKWpSt.mjs';
|
|
15
15
|
import 'jose';
|
|
16
16
|
import 'zod/v4/core';
|
|
17
17
|
import 'zod';
|
|
@@ -69,15 +69,15 @@ declare function createAuthClient<Option extends ClientOptions>(options?: Option
|
|
|
69
69
|
data: InferClientAPI<Option> extends {
|
|
70
70
|
getSession: () => Promise<infer Res>;
|
|
71
71
|
} ? Res extends {
|
|
72
|
+
data: infer S;
|
|
73
|
+
error: null;
|
|
74
|
+
} | {
|
|
72
75
|
data: null;
|
|
73
76
|
error: {
|
|
74
77
|
message?: string | undefined;
|
|
75
78
|
status: number;
|
|
76
79
|
statusText: string;
|
|
77
80
|
};
|
|
78
|
-
} | {
|
|
79
|
-
data: infer S;
|
|
80
|
-
error: null;
|
|
81
81
|
} ? S : Res : never;
|
|
82
82
|
isPending: boolean;
|
|
83
83
|
error: BetterFetchError | null;
|
|
@@ -89,15 +89,15 @@ declare function createAuthClient<Option extends ClientOptions>(options?: Option
|
|
|
89
89
|
Session: NonNullable<InferClientAPI<Option> extends {
|
|
90
90
|
getSession: () => Promise<infer Res>;
|
|
91
91
|
} ? Res extends {
|
|
92
|
+
data: infer S;
|
|
93
|
+
error: null;
|
|
94
|
+
} | {
|
|
92
95
|
data: null;
|
|
93
96
|
error: {
|
|
94
97
|
message?: string | undefined;
|
|
95
98
|
status: number;
|
|
96
99
|
statusText: string;
|
|
97
100
|
};
|
|
98
|
-
} | {
|
|
99
|
-
data: infer S;
|
|
100
|
-
error: null;
|
|
101
101
|
} ? S : Res : never>;
|
|
102
102
|
};
|
|
103
103
|
$fetch: _better_fetch_fetch.BetterFetch<{
|