fix: update client schema types to allow all server schema options

This commit is contained in:
Jonathan Samines
2025-11-28 11:01:33 -06:00
parent 0f97e281b4
commit da9784fd35
2 changed files with 2 additions and 30 deletions
@@ -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,
},
},