@m5kdev/frontend 0.20.8 → 0.20.34
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/src/modules/auth/auth.lib.d.mts +362 -357
- package/dist/src/modules/auth/auth.lib.d.mts.map +1 -1
- package/dist/src/modules/auth/auth.lib.d.ts +362 -357
- package/dist/src/modules/auth/auth.lib.d.ts.map +1 -1
- package/dist/src/modules/auth/auth.lib.js +8 -1
- package/dist/src/modules/auth/auth.lib.js.map +1 -1
- package/dist/src/modules/auth/auth.lib.mjs +9 -2
- package/dist/src/modules/auth/auth.lib.mjs.map +1 -1
- package/dist/src/modules/auth/hooks/useSession.d.mts +1 -0
- package/dist/src/modules/auth/hooks/useSession.d.ts +1 -0
- package/dist/src/modules/auth/hooks/useUserOrganizations.d.mts +2 -1
- package/dist/src/modules/auth/hooks/useUserOrganizations.d.ts +2 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.lib.d.ts","names":[],"sources":["../../../../src/modules/auth/auth.lib.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"auth.lib.d.ts","names":[],"sources":["../../../../src/modules/auth/auth.lib.ts"],"mappings":";;;;;cAUa,UAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6BAKJ,kBAAA;IAAA;;;;;;;;;;;;;;;6BAAA,kBAAA;IAAA;;;;;;;;;;;;;;6BAAA,kBAAA;IAAA;;;;;;;;;;6BAAA,kBAAA;IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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kBAAA,qBAAA,CAAmG,gBAAA;;;;;uBAAuM,IAAA"}
|
|
@@ -5,7 +5,10 @@ const authClient = (0, require("better-auth/react").createAuthClient)({
|
|
|
5
5
|
baseURL: {}.env.VITE_SERVER_URL,
|
|
6
6
|
plugins: [
|
|
7
7
|
(0, better_auth_client_plugins.lastLoginMethodClient)(),
|
|
8
|
-
(0, better_auth_client_plugins.organizationClient)({
|
|
8
|
+
(0, better_auth_client_plugins.organizationClient)({
|
|
9
|
+
teams: { enabled: true },
|
|
10
|
+
schema: (0, better_auth_client_plugins.inferOrgAdditionalFields)()
|
|
11
|
+
}),
|
|
9
12
|
(0, better_auth_client_plugins.adminClient)(),
|
|
10
13
|
(0, better_auth_client_plugins.inferAdditionalFields)({
|
|
11
14
|
session: {
|
|
@@ -39,6 +42,10 @@ const authClient = (0, require("better-auth/react").createAuthClient)({
|
|
|
39
42
|
type: "string",
|
|
40
43
|
required: false
|
|
41
44
|
},
|
|
45
|
+
metadata: {
|
|
46
|
+
type: "string",
|
|
47
|
+
required: false
|
|
48
|
+
},
|
|
42
49
|
flags: {
|
|
43
50
|
type: "string",
|
|
44
51
|
required: false
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.lib.js","names":[],"sources":["../../../../src/modules/auth/auth.lib.ts"],"sourcesContent":["import {\n adminClient,\n inferAdditionalFields,\n lastLoginMethodClient,\n organizationClient,\n} from \"better-auth/client/plugins\";\nimport { createAuthClient } from \"better-auth/react\";\n\nexport const authClient = createAuthClient({\n baseURL: import.meta.env.VITE_SERVER_URL,\n plugins: [\n lastLoginMethodClient(),\n organizationClient({\n teams: {\n enabled: true,\n },\n }),\n adminClient(),\n inferAdditionalFields({\n session: {\n activeOrganizationId: {\n type: \"string\",\n required: false,\n },\n activeTeamId: {\n type: \"string\",\n required: false,\n },\n activeTeamRole: {\n type: \"string\",\n required: false,\n },\n activeOrganizationRole: {\n type: \"string\",\n required: false,\n },\n activeOrganizationType: {\n type: \"string\",\n required: false,\n },\n },\n user: {\n onboarding: {\n type: \"number\",\n required: false,\n },\n preferences: {\n type: \"string\",\n required: false,\n },\n flags: {\n type: \"string\",\n required: false,\n },\n stripeCustomerId: {\n type: \"string\",\n required: false,\n },\n },\n teamMembers: {\n role: {\n type: \"string\",\n required: true,\n },\n },\n }),\n ],\n});\n"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"auth.lib.js","names":[],"sources":["../../../../src/modules/auth/auth.lib.ts"],"sourcesContent":["import {\n adminClient,\n inferAdditionalFields,\n inferOrgAdditionalFields,\n lastLoginMethodClient,\n organizationClient,\n} from \"better-auth/client/plugins\";\nimport type { BetterAuth } from \"@m5kdev/backend/modules/auth/auth.lib\";\nimport { createAuthClient } from \"better-auth/react\";\n\nexport const authClient = createAuthClient({\n baseURL: import.meta.env.VITE_SERVER_URL,\n plugins: [\n lastLoginMethodClient(),\n organizationClient({\n teams: {\n enabled: true,\n },\n schema: inferOrgAdditionalFields<BetterAuth>(),\n }),\n adminClient(),\n inferAdditionalFields({\n session: {\n activeOrganizationId: {\n type: \"string\",\n required: false,\n },\n activeTeamId: {\n type: \"string\",\n required: false,\n },\n activeTeamRole: {\n type: \"string\",\n required: false,\n },\n activeOrganizationRole: {\n type: \"string\",\n required: false,\n },\n activeOrganizationType: {\n type: \"string\",\n required: false,\n },\n },\n user: {\n onboarding: {\n type: \"number\",\n required: false,\n },\n preferences: {\n type: \"string\",\n required: false,\n },\n metadata: {\n type: \"string\",\n required: false,\n },\n flags: {\n type: \"string\",\n required: false,\n },\n stripeCustomerId: {\n type: \"string\",\n required: false,\n },\n },\n teamMembers: {\n role: {\n type: \"string\",\n required: true,\n },\n },\n }),\n ],\n});\n"],"mappings":";;;AAUA,MAAa,cAAA,gCAAA,kBAA8B;CACzC,SAAA,EAAA,CAAqB,IAAI;CACzB,SAAS;yDACgB;qDACJ;GACjB,OAAO,EACL,SAAS,MACV;GACD,SAAA,GAAA,2BAAA,2BAA8C;GAC/C,CAAC;+CACW;wDACS;GACpB,SAAS;IACP,sBAAsB;KACpB,MAAM;KACN,UAAU;KACX;IACD,cAAc;KACZ,MAAM;KACN,UAAU;KACX;IACD,gBAAgB;KACd,MAAM;KACN,UAAU;KACX;IACD,wBAAwB;KACtB,MAAM;KACN,UAAU;KACX;IACD,wBAAwB;KACtB,MAAM;KACN,UAAU;KACX;IACF;GACD,MAAM;IACJ,YAAY;KACV,MAAM;KACN,UAAU;KACX;IACD,aAAa;KACX,MAAM;KACN,UAAU;KACX;IACD,UAAU;KACR,MAAM;KACN,UAAU;KACX;IACD,OAAO;KACL,MAAM;KACN,UAAU;KACX;IACD,kBAAkB;KAChB,MAAM;KACN,UAAU;KACX;IACF;GACD,aAAa,EACX,MAAM;IACJ,MAAM;IACN,UAAU;IACX,EACF;GACF,CAAC;EACH;CACF,CAAC"}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import { adminClient, inferAdditionalFields, lastLoginMethodClient, organizationClient } from "better-auth/client/plugins";
|
|
1
|
+
import { adminClient, inferAdditionalFields, inferOrgAdditionalFields, lastLoginMethodClient, organizationClient } from "better-auth/client/plugins";
|
|
2
2
|
import { createAuthClient } from "better-auth/react";
|
|
3
3
|
//#region src/modules/auth/auth.lib.ts
|
|
4
4
|
const authClient = createAuthClient({
|
|
5
5
|
baseURL: import.meta.env.VITE_SERVER_URL,
|
|
6
6
|
plugins: [
|
|
7
7
|
lastLoginMethodClient(),
|
|
8
|
-
organizationClient({
|
|
8
|
+
organizationClient({
|
|
9
|
+
teams: { enabled: true },
|
|
10
|
+
schema: inferOrgAdditionalFields()
|
|
11
|
+
}),
|
|
9
12
|
adminClient(),
|
|
10
13
|
inferAdditionalFields({
|
|
11
14
|
session: {
|
|
@@ -39,6 +42,10 @@ const authClient = createAuthClient({
|
|
|
39
42
|
type: "string",
|
|
40
43
|
required: false
|
|
41
44
|
},
|
|
45
|
+
metadata: {
|
|
46
|
+
type: "string",
|
|
47
|
+
required: false
|
|
48
|
+
},
|
|
42
49
|
flags: {
|
|
43
50
|
type: "string",
|
|
44
51
|
required: false
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.lib.mjs","names":[],"sources":["../../../../src/modules/auth/auth.lib.ts"],"sourcesContent":["import {\n adminClient,\n inferAdditionalFields,\n lastLoginMethodClient,\n organizationClient,\n} from \"better-auth/client/plugins\";\nimport { createAuthClient } from \"better-auth/react\";\n\nexport const authClient = createAuthClient({\n baseURL: import.meta.env.VITE_SERVER_URL,\n plugins: [\n lastLoginMethodClient(),\n organizationClient({\n teams: {\n enabled: true,\n },\n }),\n adminClient(),\n inferAdditionalFields({\n session: {\n activeOrganizationId: {\n type: \"string\",\n required: false,\n },\n activeTeamId: {\n type: \"string\",\n required: false,\n },\n activeTeamRole: {\n type: \"string\",\n required: false,\n },\n activeOrganizationRole: {\n type: \"string\",\n required: false,\n },\n activeOrganizationType: {\n type: \"string\",\n required: false,\n },\n },\n user: {\n onboarding: {\n type: \"number\",\n required: false,\n },\n preferences: {\n type: \"string\",\n required: false,\n },\n flags: {\n type: \"string\",\n required: false,\n },\n stripeCustomerId: {\n type: \"string\",\n required: false,\n },\n },\n teamMembers: {\n role: {\n type: \"string\",\n required: true,\n },\n },\n }),\n ],\n});\n"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"auth.lib.mjs","names":[],"sources":["../../../../src/modules/auth/auth.lib.ts"],"sourcesContent":["import {\n adminClient,\n inferAdditionalFields,\n inferOrgAdditionalFields,\n lastLoginMethodClient,\n organizationClient,\n} from \"better-auth/client/plugins\";\nimport type { BetterAuth } from \"@m5kdev/backend/modules/auth/auth.lib\";\nimport { createAuthClient } from \"better-auth/react\";\n\nexport const authClient = createAuthClient({\n baseURL: import.meta.env.VITE_SERVER_URL,\n plugins: [\n lastLoginMethodClient(),\n organizationClient({\n teams: {\n enabled: true,\n },\n schema: inferOrgAdditionalFields<BetterAuth>(),\n }),\n adminClient(),\n inferAdditionalFields({\n session: {\n activeOrganizationId: {\n type: \"string\",\n required: false,\n },\n activeTeamId: {\n type: \"string\",\n required: false,\n },\n activeTeamRole: {\n type: \"string\",\n required: false,\n },\n activeOrganizationRole: {\n type: \"string\",\n required: false,\n },\n activeOrganizationType: {\n type: \"string\",\n required: false,\n },\n },\n user: {\n onboarding: {\n type: \"number\",\n required: false,\n },\n preferences: {\n type: \"string\",\n required: false,\n },\n metadata: {\n type: \"string\",\n required: false,\n },\n flags: {\n type: \"string\",\n required: false,\n },\n stripeCustomerId: {\n type: \"string\",\n required: false,\n },\n },\n teamMembers: {\n role: {\n type: \"string\",\n required: true,\n },\n },\n }),\n ],\n});\n"],"mappings":";;;AAUA,MAAa,aAAa,iBAAiB;CACzC,SAAS,OAAO,KAAK,IAAI;CACzB,SAAS;EACP,uBAAuB;EACvB,mBAAmB;GACjB,OAAO,EACL,SAAS,MACV;GACD,QAAQ,0BAAsC;GAC/C,CAAC;EACF,aAAa;EACb,sBAAsB;GACpB,SAAS;IACP,sBAAsB;KACpB,MAAM;KACN,UAAU;KACX;IACD,cAAc;KACZ,MAAM;KACN,UAAU;KACX;IACD,gBAAgB;KACd,MAAM;KACN,UAAU;KACX;IACD,wBAAwB;KACtB,MAAM;KACN,UAAU;KACX;IACD,wBAAwB;KACtB,MAAM;KACN,UAAU;KACX;IACF;GACD,MAAM;IACJ,YAAY;KACV,MAAM;KACN,UAAU;KACX;IACD,aAAa;KACX,MAAM;KACN,UAAU;KACX;IACD,UAAU;KACR,MAAM;KACN,UAAU;KACX;IACD,OAAO;KACL,MAAM;KACN,UAAU;KACX;IACD,kBAAkB;KAChB,MAAM;KACN,UAAU;KACX;IACF;GACD,aAAa,EACX,MAAM;IACJ,MAAM;IACN,UAAU;IACX,EACF;GACF,CAAC;EACH;CACF,CAAC"}
|
|
@@ -14,6 +14,7 @@ declare function useSession(): {
|
|
|
14
14
|
role?: string | null | undefined;
|
|
15
15
|
banReason?: string | null | undefined;
|
|
16
16
|
banExpires?: Date | null | undefined;
|
|
17
|
+
metadata?: string | null | undefined;
|
|
17
18
|
onboarding?: number | null | undefined;
|
|
18
19
|
preferences?: string | null | undefined;
|
|
19
20
|
flags?: string | null | undefined;
|
|
@@ -14,6 +14,7 @@ declare function useSession(): {
|
|
|
14
14
|
role?: string | null | undefined;
|
|
15
15
|
banReason?: string | null | undefined;
|
|
16
16
|
banExpires?: Date | null | undefined;
|
|
17
|
+
metadata?: string | null | undefined;
|
|
17
18
|
onboarding?: number | null | undefined;
|
|
18
19
|
preferences?: string | null | undefined;
|
|
19
20
|
flags?: string | null | undefined;
|
|
@@ -6,8 +6,9 @@ import * as _$_trpc_server0 from "@trpc/server";
|
|
|
6
6
|
declare const useUserOrganizations: () => _$_tanstack_react_query0.UseQueryResult<{
|
|
7
7
|
id: string;
|
|
8
8
|
name: string;
|
|
9
|
-
createdAt: Date;
|
|
10
9
|
type: string | null;
|
|
10
|
+
createdAt: Date;
|
|
11
|
+
onboarding: number | null;
|
|
11
12
|
slug: string | null;
|
|
12
13
|
logo: string | null;
|
|
13
14
|
parentId: string | null;
|
|
@@ -6,8 +6,9 @@ import * as _$_trpc_server0 from "@trpc/server";
|
|
|
6
6
|
declare const useUserOrganizations: () => _$_tanstack_react_query0.UseQueryResult<{
|
|
7
7
|
id: string;
|
|
8
8
|
name: string;
|
|
9
|
-
createdAt: Date;
|
|
10
9
|
type: string | null;
|
|
10
|
+
createdAt: Date;
|
|
11
|
+
onboarding: number | null;
|
|
11
12
|
slug: string | null;
|
|
12
13
|
logo: string | null;
|
|
13
14
|
parentId: string | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m5kdev/frontend",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.34",
|
|
4
4
|
"license": "GPL-3.0-only",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"react": "19.2.1",
|
|
27
27
|
"react-dom": "19.2.1",
|
|
28
28
|
"zod": "4.2.1",
|
|
29
|
-
"@m5kdev/commons": "0.20.
|
|
29
|
+
"@m5kdev/commons": "0.20.34"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"@trpc/server": "11.4.3"
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"tsdown": "0.21.7",
|
|
42
42
|
"typescript": "6.0.3",
|
|
43
43
|
"vite": "7.0.4",
|
|
44
|
-
"@m5kdev/config": "0.20.
|
|
45
|
-
"@m5kdev/backend": "0.20.
|
|
44
|
+
"@m5kdev/config": "0.20.34",
|
|
45
|
+
"@m5kdev/backend": "0.20.34"
|
|
46
46
|
},
|
|
47
47
|
"exports": {
|
|
48
48
|
"./modules/app/components/*": {
|