@meistrari/auth-core 4.0.0 → 4.0.1
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/index.d.mts +9 -4
- package/dist/index.d.ts +9 -4
- package/dist/index.mjs +1 -1
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -1518,6 +1518,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
1518
1518
|
EMAIL_VERIFICATION_REQUIRED_BEFORE_ACCEPTING_OR_REJECTING_INVITATION: better_auth.RawError<"EMAIL_VERIFICATION_REQUIRED_BEFORE_ACCEPTING_OR_REJECTING_INVITATION">;
|
|
1519
1519
|
EMAIL_VERIFICATION_REQUIRED_FOR_INVITATION: better_auth.RawError<"EMAIL_VERIFICATION_REQUIRED_FOR_INVITATION">;
|
|
1520
1520
|
YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION: better_auth.RawError<"YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION">;
|
|
1521
|
+
YOU_ARE_NOT_ALLOWED_TO_LIST_INVITATIONS: better_auth.RawError<"YOU_ARE_NOT_ALLOWED_TO_LIST_INVITATIONS">;
|
|
1521
1522
|
INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION: better_auth.RawError<"INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION">;
|
|
1522
1523
|
YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE: better_auth.RawError<"YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE">;
|
|
1523
1524
|
FAILED_TO_RETRIEVE_INVITATION: better_auth.RawError<"FAILED_TO_RETRIEVE_INVITATION">;
|
|
@@ -1700,7 +1701,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
1700
1701
|
$InferServerPlugin: {
|
|
1701
1702
|
id: "admin";
|
|
1702
1703
|
version: string;
|
|
1703
|
-
init(): {
|
|
1704
|
+
init(authContext: better_auth.AuthContext): {
|
|
1704
1705
|
options: {
|
|
1705
1706
|
databaseHooks: {
|
|
1706
1707
|
user: {
|
|
@@ -2507,7 +2508,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
2507
2508
|
$Infer: {
|
|
2508
2509
|
body: {
|
|
2509
2510
|
permissions: {
|
|
2510
|
-
readonly user?: ("update" | "delete" | "create" | "list" | "set-role" | "ban" | "impersonate" | "impersonate-admins" | "set-password" | "set-email" | "get")[] | undefined;
|
|
2511
|
+
readonly user?: ("update" | "delete" | "create" | "list" | "set-role" | "ban" | "impersonate" | "impersonate-admins" | "set-password" | "set-email" | "set-phone" | "get")[] | undefined;
|
|
2511
2512
|
readonly session?: ("delete" | "list" | "revoke")[] | undefined;
|
|
2512
2513
|
};
|
|
2513
2514
|
} & {
|
|
@@ -2544,7 +2545,9 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
2544
2545
|
YOU_CANNOT_IMPERSONATE_ADMINS: better_auth.RawError<"YOU_CANNOT_IMPERSONATE_ADMINS">;
|
|
2545
2546
|
INVALID_ROLE_TYPE: better_auth.RawError<"INVALID_ROLE_TYPE">;
|
|
2546
2547
|
YOU_ARE_NOT_ALLOWED_TO_SET_USERS_EMAIL: better_auth.RawError<"YOU_ARE_NOT_ALLOWED_TO_SET_USERS_EMAIL">;
|
|
2548
|
+
YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PHONE_NUMBER: better_auth.RawError<"YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PHONE_NUMBER">;
|
|
2547
2549
|
PASSWORD_CANNOT_BE_UPDATED_VIA_UPDATE_USER: better_auth.RawError<"PASSWORD_CANNOT_BE_UPDATED_VIA_UPDATE_USER">;
|
|
2550
|
+
USER_ID_CANNOT_BE_UPDATED: better_auth.RawError<"USER_ID_CANNOT_BE_UPDATED">;
|
|
2548
2551
|
};
|
|
2549
2552
|
schema: {
|
|
2550
2553
|
user: {
|
|
@@ -2584,7 +2587,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
2584
2587
|
};
|
|
2585
2588
|
options: NoInfer<{
|
|
2586
2589
|
ac: better_auth_plugins.AccessControl<{
|
|
2587
|
-
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "impersonate-admins", "delete", "set-password", "set-email", "get", "update"];
|
|
2590
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "impersonate-admins", "delete", "set-password", "set-email", "set-phone", "get", "update"];
|
|
2588
2591
|
readonly session: readonly ["list", "revoke", "delete"];
|
|
2589
2592
|
}>;
|
|
2590
2593
|
roles: {
|
|
@@ -2597,7 +2600,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
2597
2600
|
admin: {
|
|
2598
2601
|
checkRolePermission: <R extends "admin" | "user">(data: {
|
|
2599
2602
|
permissions: {
|
|
2600
|
-
readonly user?: ("update" | "delete" | "create" | "list" | "set-role" | "ban" | "impersonate" | "impersonate-admins" | "set-password" | "set-email" | "get")[] | undefined;
|
|
2603
|
+
readonly user?: ("update" | "delete" | "create" | "list" | "set-role" | "ban" | "impersonate" | "impersonate-admins" | "set-password" | "set-email" | "set-phone" | "get")[] | undefined;
|
|
2601
2604
|
readonly session?: ("delete" | "list" | "revoke")[] | undefined;
|
|
2602
2605
|
};
|
|
2603
2606
|
} & {
|
|
@@ -2637,7 +2640,9 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
2637
2640
|
YOU_CANNOT_IMPERSONATE_ADMINS: better_auth.RawError<"YOU_CANNOT_IMPERSONATE_ADMINS">;
|
|
2638
2641
|
INVALID_ROLE_TYPE: better_auth.RawError<"INVALID_ROLE_TYPE">;
|
|
2639
2642
|
YOU_ARE_NOT_ALLOWED_TO_SET_USERS_EMAIL: better_auth.RawError<"YOU_ARE_NOT_ALLOWED_TO_SET_USERS_EMAIL">;
|
|
2643
|
+
YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PHONE_NUMBER: better_auth.RawError<"YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PHONE_NUMBER">;
|
|
2640
2644
|
PASSWORD_CANNOT_BE_UPDATED_VIA_UPDATE_USER: better_auth.RawError<"PASSWORD_CANNOT_BE_UPDATED_VIA_UPDATE_USER">;
|
|
2645
|
+
USER_ID_CANNOT_BE_UPDATED: better_auth.RawError<"USER_ID_CANNOT_BE_UPDATED">;
|
|
2641
2646
|
};
|
|
2642
2647
|
} | {
|
|
2643
2648
|
id: "additional-fields-client";
|
package/dist/index.d.ts
CHANGED
|
@@ -1518,6 +1518,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
1518
1518
|
EMAIL_VERIFICATION_REQUIRED_BEFORE_ACCEPTING_OR_REJECTING_INVITATION: better_auth.RawError<"EMAIL_VERIFICATION_REQUIRED_BEFORE_ACCEPTING_OR_REJECTING_INVITATION">;
|
|
1519
1519
|
EMAIL_VERIFICATION_REQUIRED_FOR_INVITATION: better_auth.RawError<"EMAIL_VERIFICATION_REQUIRED_FOR_INVITATION">;
|
|
1520
1520
|
YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION: better_auth.RawError<"YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION">;
|
|
1521
|
+
YOU_ARE_NOT_ALLOWED_TO_LIST_INVITATIONS: better_auth.RawError<"YOU_ARE_NOT_ALLOWED_TO_LIST_INVITATIONS">;
|
|
1521
1522
|
INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION: better_auth.RawError<"INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION">;
|
|
1522
1523
|
YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE: better_auth.RawError<"YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE">;
|
|
1523
1524
|
FAILED_TO_RETRIEVE_INVITATION: better_auth.RawError<"FAILED_TO_RETRIEVE_INVITATION">;
|
|
@@ -1700,7 +1701,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
1700
1701
|
$InferServerPlugin: {
|
|
1701
1702
|
id: "admin";
|
|
1702
1703
|
version: string;
|
|
1703
|
-
init(): {
|
|
1704
|
+
init(authContext: better_auth.AuthContext): {
|
|
1704
1705
|
options: {
|
|
1705
1706
|
databaseHooks: {
|
|
1706
1707
|
user: {
|
|
@@ -2507,7 +2508,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
2507
2508
|
$Infer: {
|
|
2508
2509
|
body: {
|
|
2509
2510
|
permissions: {
|
|
2510
|
-
readonly user?: ("update" | "delete" | "create" | "list" | "set-role" | "ban" | "impersonate" | "impersonate-admins" | "set-password" | "set-email" | "get")[] | undefined;
|
|
2511
|
+
readonly user?: ("update" | "delete" | "create" | "list" | "set-role" | "ban" | "impersonate" | "impersonate-admins" | "set-password" | "set-email" | "set-phone" | "get")[] | undefined;
|
|
2511
2512
|
readonly session?: ("delete" | "list" | "revoke")[] | undefined;
|
|
2512
2513
|
};
|
|
2513
2514
|
} & {
|
|
@@ -2544,7 +2545,9 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
2544
2545
|
YOU_CANNOT_IMPERSONATE_ADMINS: better_auth.RawError<"YOU_CANNOT_IMPERSONATE_ADMINS">;
|
|
2545
2546
|
INVALID_ROLE_TYPE: better_auth.RawError<"INVALID_ROLE_TYPE">;
|
|
2546
2547
|
YOU_ARE_NOT_ALLOWED_TO_SET_USERS_EMAIL: better_auth.RawError<"YOU_ARE_NOT_ALLOWED_TO_SET_USERS_EMAIL">;
|
|
2548
|
+
YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PHONE_NUMBER: better_auth.RawError<"YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PHONE_NUMBER">;
|
|
2547
2549
|
PASSWORD_CANNOT_BE_UPDATED_VIA_UPDATE_USER: better_auth.RawError<"PASSWORD_CANNOT_BE_UPDATED_VIA_UPDATE_USER">;
|
|
2550
|
+
USER_ID_CANNOT_BE_UPDATED: better_auth.RawError<"USER_ID_CANNOT_BE_UPDATED">;
|
|
2548
2551
|
};
|
|
2549
2552
|
schema: {
|
|
2550
2553
|
user: {
|
|
@@ -2584,7 +2587,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
2584
2587
|
};
|
|
2585
2588
|
options: NoInfer<{
|
|
2586
2589
|
ac: better_auth_plugins.AccessControl<{
|
|
2587
|
-
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "impersonate-admins", "delete", "set-password", "set-email", "get", "update"];
|
|
2590
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "impersonate-admins", "delete", "set-password", "set-email", "set-phone", "get", "update"];
|
|
2588
2591
|
readonly session: readonly ["list", "revoke", "delete"];
|
|
2589
2592
|
}>;
|
|
2590
2593
|
roles: {
|
|
@@ -2597,7 +2600,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
2597
2600
|
admin: {
|
|
2598
2601
|
checkRolePermission: <R extends "admin" | "user">(data: {
|
|
2599
2602
|
permissions: {
|
|
2600
|
-
readonly user?: ("update" | "delete" | "create" | "list" | "set-role" | "ban" | "impersonate" | "impersonate-admins" | "set-password" | "set-email" | "get")[] | undefined;
|
|
2603
|
+
readonly user?: ("update" | "delete" | "create" | "list" | "set-role" | "ban" | "impersonate" | "impersonate-admins" | "set-password" | "set-email" | "set-phone" | "get")[] | undefined;
|
|
2601
2604
|
readonly session?: ("delete" | "list" | "revoke")[] | undefined;
|
|
2602
2605
|
};
|
|
2603
2606
|
} & {
|
|
@@ -2637,7 +2640,9 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
2637
2640
|
YOU_CANNOT_IMPERSONATE_ADMINS: better_auth.RawError<"YOU_CANNOT_IMPERSONATE_ADMINS">;
|
|
2638
2641
|
INVALID_ROLE_TYPE: better_auth.RawError<"INVALID_ROLE_TYPE">;
|
|
2639
2642
|
YOU_ARE_NOT_ALLOWED_TO_SET_USERS_EMAIL: better_auth.RawError<"YOU_ARE_NOT_ALLOWED_TO_SET_USERS_EMAIL">;
|
|
2643
|
+
YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PHONE_NUMBER: better_auth.RawError<"YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PHONE_NUMBER">;
|
|
2640
2644
|
PASSWORD_CANNOT_BE_UPDATED_VIA_UPDATE_USER: better_auth.RawError<"PASSWORD_CANNOT_BE_UPDATED_VIA_UPDATE_USER">;
|
|
2645
|
+
USER_ID_CANNOT_BE_UPDATED: better_auth.RawError<"USER_ID_CANNOT_BE_UPDATED">;
|
|
2641
2646
|
};
|
|
2642
2647
|
} | {
|
|
2643
2648
|
id: "additional-fields-client";
|
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meistrari/auth-core",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
"docs": "typedoc"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@better-auth/api-key": "1.7.
|
|
22
|
-
"@better-auth/sso": "1.7.
|
|
23
|
-
"better-auth": "1.7.
|
|
21
|
+
"@better-auth/api-key": "1.7.16",
|
|
22
|
+
"@better-auth/sso": "1.7.16",
|
|
23
|
+
"better-auth": "1.7.16",
|
|
24
24
|
"jose": "6.2.14",
|
|
25
25
|
"zod": "4.6.7"
|
|
26
26
|
},
|