mirror of
https://github.com/better-auth/better-auth.git
synced 2026-10-20 20:26:55 -05:00
fix: update client schema types to allow all server schema options
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import type { BetterAuthClientPlugin } from "@better-auth/core";
|
||||
import type { DBFieldAttribute } from "@better-auth/core/db";
|
||||
import { atom } from "nanostores";
|
||||
import { useAuthQuery } from "../../client";
|
||||
import type {
|
||||
@@ -42,35 +41,7 @@ interface OrganizationClientOptions {
|
||||
enabled: boolean;
|
||||
}
|
||||
| undefined;
|
||||
schema?:
|
||||
| {
|
||||
organization?: {
|
||||
additionalFields?: {
|
||||
[key: string]: DBFieldAttribute;
|
||||
};
|
||||
};
|
||||
member?: {
|
||||
additionalFields?: {
|
||||
[key: string]: DBFieldAttribute;
|
||||
};
|
||||
};
|
||||
invitation?: {
|
||||
additionalFields?: {
|
||||
[key: string]: DBFieldAttribute;
|
||||
};
|
||||
};
|
||||
team?: {
|
||||
additionalFields?: {
|
||||
[key: string]: DBFieldAttribute;
|
||||
};
|
||||
};
|
||||
organizationRole?: {
|
||||
additionalFields?: {
|
||||
[key: string]: DBFieldAttribute;
|
||||
};
|
||||
};
|
||||
}
|
||||
| undefined;
|
||||
schema?: OrganizationOptions["schema"];
|
||||
dynamicAccessControl?:
|
||||
| {
|
||||
enabled: boolean;
|
||||
|
||||
@@ -60,6 +60,7 @@ describe("dynamic access control", async (it) => {
|
||||
},
|
||||
schema: {
|
||||
organizationRole: {
|
||||
modelName: "organizationRole",
|
||||
additionalFields,
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user