Deprecate legacy Login/Register, add admin events, members, webhooks

- Mark Register() and Login() as Deprecated (use Better Auth directly)
- Add admin_events.go, members.go, webhooks.go to match backend API
- Sync types with backend changes

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 4.6 committed 2026-03-25 00:48:39 -04:00
1 parent 75c2095f30
commit 99b0948da9
7 files changed
+280 -18

No files matched your search

+4
View File
@@ -28,6 +28,8 @@ func WithOrgName(name string) RegisterOption {
}
// Register creates a new user and organization.
//
// Deprecated: Use Better Auth endpoints directly. See docs.
func Register(baseURL, email, password string, opts ...RegisterOption) (*AuthRegisterResponse, error) {
if baseURL == "" {
baseURL = defaultBaseURL
@@ -50,6 +52,8 @@ func Register(baseURL, email, password string, opts ...RegisterOption) (*AuthReg
}
// Login authenticates a user and returns a session token.
//
// Deprecated: Use Better Auth endpoints directly. See docs.
func Login(baseURL, email, password string) (*AuthLoginResponse, error) {
if baseURL == "" {
baseURL = defaultBaseURL