@delmaredigital/payload-better-auth 0.4.4 → 0.5.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.
@@ -3,7 +3,8 @@
3
3
  * Re-exports createAuthClient from better-auth/react and common plugins
4
4
  */
5
5
  export { createAuthClient } from 'better-auth/react';
6
- export { twoFactorClient, apiKeyClient } from 'better-auth/client/plugins';
6
+ export { twoFactorClient } from 'better-auth/client/plugins';
7
+ export { apiKeyClient } from '@better-auth/api-key/client';
7
8
  export { passkeyClient } from '@better-auth/passkey/client';
8
9
  /**
9
10
  * Default plugins included with Payload Better Auth.
@@ -630,15 +631,15 @@ export declare const payloadAuthPlugins: readonly [{
630
631
  max: number;
631
632
  }[];
632
633
  $ERROR_CODES: {
633
- readonly OTP_NOT_ENABLED: "OTP not enabled";
634
- readonly OTP_HAS_EXPIRED: "OTP has expired";
635
- readonly TOTP_NOT_ENABLED: "TOTP not enabled";
636
- readonly TWO_FACTOR_NOT_ENABLED: "Two factor isn't enabled";
637
- readonly BACKUP_CODES_NOT_ENABLED: "Backup codes aren't enabled";
638
- readonly INVALID_BACKUP_CODE: "Invalid backup code";
639
- readonly INVALID_CODE: "Invalid code";
640
- readonly TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE: "Too many attempts. Please request a new code.";
641
- readonly INVALID_TWO_FACTOR_COOKIE: "Invalid two factor cookie";
634
+ OTP_NOT_ENABLED: import("better-auth").RawError<"OTP_NOT_ENABLED">;
635
+ OTP_HAS_EXPIRED: import("better-auth").RawError<"OTP_HAS_EXPIRED">;
636
+ TOTP_NOT_ENABLED: import("better-auth").RawError<"TOTP_NOT_ENABLED">;
637
+ TWO_FACTOR_NOT_ENABLED: import("better-auth").RawError<"TWO_FACTOR_NOT_ENABLED">;
638
+ BACKUP_CODES_NOT_ENABLED: import("better-auth").RawError<"BACKUP_CODES_NOT_ENABLED">;
639
+ INVALID_BACKUP_CODE: import("better-auth").RawError<"INVALID_BACKUP_CODE">;
640
+ INVALID_CODE: import("better-auth").RawError<"INVALID_CODE">;
641
+ TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE: import("better-auth").RawError<"TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE">;
642
+ INVALID_TWO_FACTOR_COOKIE: import("better-auth").RawError<"INVALID_TWO_FACTOR_COOKIE">;
642
643
  };
643
644
  })>;
644
645
  atomListeners: {
@@ -662,281 +663,299 @@ export declare const payloadAuthPlugins: readonly [{
662
663
  onSuccess(context: import("better-auth/react").SuccessContext<any>): Promise<void>;
663
664
  };
664
665
  }[];
666
+ $ERROR_CODES: {
667
+ OTP_NOT_ENABLED: import("better-auth").RawError<"OTP_NOT_ENABLED">;
668
+ OTP_HAS_EXPIRED: import("better-auth").RawError<"OTP_HAS_EXPIRED">;
669
+ TOTP_NOT_ENABLED: import("better-auth").RawError<"TOTP_NOT_ENABLED">;
670
+ TWO_FACTOR_NOT_ENABLED: import("better-auth").RawError<"TWO_FACTOR_NOT_ENABLED">;
671
+ BACKUP_CODES_NOT_ENABLED: import("better-auth").RawError<"BACKUP_CODES_NOT_ENABLED">;
672
+ INVALID_BACKUP_CODE: import("better-auth").RawError<"INVALID_BACKUP_CODE">;
673
+ INVALID_CODE: import("better-auth").RawError<"INVALID_CODE">;
674
+ TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE: import("better-auth").RawError<"TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE">;
675
+ INVALID_TWO_FACTOR_COOKIE: import("better-auth").RawError<"INVALID_TWO_FACTOR_COOKIE">;
676
+ };
665
677
  }, {
666
678
  id: "api-key";
667
- $InferServerPlugin: ReturnType<(options?: import("better-auth/plugins").ApiKeyOptions | undefined) => {
668
- id: "api-key";
669
- $ERROR_CODES: {
670
- readonly INVALID_METADATA_TYPE: "metadata must be an object or undefined";
671
- readonly REFILL_AMOUNT_AND_INTERVAL_REQUIRED: "refillAmount is required when refillInterval is provided";
672
- readonly REFILL_INTERVAL_AND_AMOUNT_REQUIRED: "refillInterval is required when refillAmount is provided";
673
- readonly USER_BANNED: "User is banned";
674
- readonly UNAUTHORIZED_SESSION: "Unauthorized or invalid session";
675
- readonly KEY_NOT_FOUND: "API Key not found";
676
- readonly KEY_DISABLED: "API Key is disabled";
677
- readonly KEY_EXPIRED: "API Key has expired";
678
- readonly USAGE_EXCEEDED: "API Key has reached its usage limit";
679
- readonly KEY_NOT_RECOVERABLE: "API Key is not recoverable";
680
- readonly EXPIRES_IN_IS_TOO_SMALL: "The expiresIn is smaller than the predefined minimum value.";
681
- readonly EXPIRES_IN_IS_TOO_LARGE: "The expiresIn is larger than the predefined maximum value.";
682
- readonly INVALID_REMAINING: "The remaining count is either too large or too small.";
683
- readonly INVALID_PREFIX_LENGTH: "The prefix length is either too large or too small.";
684
- readonly INVALID_NAME_LENGTH: "The name length is either too large or too small.";
685
- readonly METADATA_DISABLED: "Metadata is disabled.";
686
- readonly RATE_LIMIT_EXCEEDED: "Rate limit exceeded.";
687
- readonly NO_VALUES_TO_UPDATE: "No values to update.";
688
- readonly KEY_DISABLED_EXPIRATION: "Custom key expiration values are disabled.";
689
- readonly INVALID_API_KEY: "Invalid API key.";
690
- readonly INVALID_USER_ID_FROM_API_KEY: "The user id from the API key is invalid.";
691
- readonly INVALID_API_KEY_GETTER_RETURN_TYPE: "API Key getter returned an invalid key type. Expected string.";
692
- readonly SERVER_ONLY_PROPERTY: "The property you're trying to set can only be set from the server auth instance only.";
693
- readonly FAILED_TO_UPDATE_API_KEY: "Failed to update API key";
694
- readonly NAME_REQUIRED: "API Key name is required.";
695
- };
696
- hooks: {
697
- before: {
698
- matcher: (ctx: import("better-auth").HookEndpointContext) => boolean;
699
- handler: (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
700
- user: {
701
- id: string;
702
- createdAt: Date;
703
- updatedAt: Date;
704
- email: string;
705
- emailVerified: boolean;
706
- name: string;
707
- image?: string | null | undefined;
708
- };
679
+ $InferServerPlugin: ReturnType<typeof import("@better-auth/api-key").apiKey>;
680
+ pathMethods: {
681
+ "/api-key/create": "POST";
682
+ "/api-key/delete": "POST";
683
+ "/api-key/delete-all-expired-api-keys": "POST";
684
+ };
685
+ $ERROR_CODES: {
686
+ INVALID_METADATA_TYPE: import("better-auth").RawError<"INVALID_METADATA_TYPE">;
687
+ REFILL_AMOUNT_AND_INTERVAL_REQUIRED: import("better-auth").RawError<"REFILL_AMOUNT_AND_INTERVAL_REQUIRED">;
688
+ REFILL_INTERVAL_AND_AMOUNT_REQUIRED: import("better-auth").RawError<"REFILL_INTERVAL_AND_AMOUNT_REQUIRED">;
689
+ USER_BANNED: import("better-auth").RawError<"USER_BANNED">;
690
+ UNAUTHORIZED_SESSION: import("better-auth").RawError<"UNAUTHORIZED_SESSION">;
691
+ KEY_NOT_FOUND: import("better-auth").RawError<"KEY_NOT_FOUND">;
692
+ KEY_DISABLED: import("better-auth").RawError<"KEY_DISABLED">;
693
+ KEY_EXPIRED: import("better-auth").RawError<"KEY_EXPIRED">;
694
+ USAGE_EXCEEDED: import("better-auth").RawError<"USAGE_EXCEEDED">;
695
+ KEY_NOT_RECOVERABLE: import("better-auth").RawError<"KEY_NOT_RECOVERABLE">;
696
+ EXPIRES_IN_IS_TOO_SMALL: import("better-auth").RawError<"EXPIRES_IN_IS_TOO_SMALL">;
697
+ EXPIRES_IN_IS_TOO_LARGE: import("better-auth").RawError<"EXPIRES_IN_IS_TOO_LARGE">;
698
+ INVALID_REMAINING: import("better-auth").RawError<"INVALID_REMAINING">;
699
+ INVALID_PREFIX_LENGTH: import("better-auth").RawError<"INVALID_PREFIX_LENGTH">;
700
+ INVALID_NAME_LENGTH: import("better-auth").RawError<"INVALID_NAME_LENGTH">;
701
+ METADATA_DISABLED: import("better-auth").RawError<"METADATA_DISABLED">;
702
+ RATE_LIMIT_EXCEEDED: import("better-auth").RawError<"RATE_LIMIT_EXCEEDED">;
703
+ NO_VALUES_TO_UPDATE: import("better-auth").RawError<"NO_VALUES_TO_UPDATE">;
704
+ KEY_DISABLED_EXPIRATION: import("better-auth").RawError<"KEY_DISABLED_EXPIRATION">;
705
+ INVALID_API_KEY: import("better-auth").RawError<"INVALID_API_KEY">;
706
+ INVALID_USER_ID_FROM_API_KEY: import("better-auth").RawError<"INVALID_USER_ID_FROM_API_KEY">;
707
+ INVALID_REFERENCE_ID_FROM_API_KEY: import("better-auth").RawError<"INVALID_REFERENCE_ID_FROM_API_KEY">;
708
+ INVALID_API_KEY_GETTER_RETURN_TYPE: import("better-auth").RawError<"INVALID_API_KEY_GETTER_RETURN_TYPE">;
709
+ SERVER_ONLY_PROPERTY: import("better-auth").RawError<"SERVER_ONLY_PROPERTY">;
710
+ FAILED_TO_UPDATE_API_KEY: import("better-auth").RawError<"FAILED_TO_UPDATE_API_KEY">;
711
+ NAME_REQUIRED: import("better-auth").RawError<"NAME_REQUIRED">;
712
+ ORGANIZATION_ID_REQUIRED: import("better-auth").RawError<"ORGANIZATION_ID_REQUIRED">;
713
+ USER_NOT_MEMBER_OF_ORGANIZATION: import("better-auth").RawError<"USER_NOT_MEMBER_OF_ORGANIZATION">;
714
+ INSUFFICIENT_API_KEY_PERMISSIONS: import("better-auth").RawError<"INSUFFICIENT_API_KEY_PERMISSIONS">;
715
+ NO_DEFAULT_API_KEY_CONFIGURATION_FOUND: import("better-auth").RawError<"NO_DEFAULT_API_KEY_CONFIGURATION_FOUND">;
716
+ ORGANIZATION_PLUGIN_REQUIRED: import("better-auth").RawError<"ORGANIZATION_PLUGIN_REQUIRED">;
717
+ };
718
+ }, {
719
+ id: "passkey";
720
+ $InferServerPlugin: ReturnType<(options?: import("@better-auth/passkey").PasskeyOptions | undefined) => {
721
+ id: "passkey";
722
+ endpoints: {
723
+ generatePasskeyRegistrationOptions: import("better-auth").StrictEndpoint<"/passkey/generate-register-options", {
724
+ method: "GET";
725
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
709
726
  session: {
710
- id: string;
711
- token: string;
712
- userId: string;
713
- userAgent: string | null;
714
- ipAddress: string | null;
715
- createdAt: Date;
716
- updatedAt: Date;
717
- expiresAt: Date;
718
- };
719
- } | {
720
- context: import("better-auth").MiddlewareContext<import("better-auth").MiddlewareOptions, {
721
- returned?: unknown | undefined;
722
- responseHeaders?: Headers | undefined;
723
- } & import("better-auth").PluginContext & import("better-auth").InfoContext & {
724
- options: import("better-auth").BetterAuthOptions;
725
- appName: string;
726
- baseURL: string;
727
- trustedOrigins: string[];
728
- isTrustedOrigin: (url: string, settings?: {
729
- allowRelativePaths: boolean;
730
- }) => boolean;
731
- oauthConfig: {
732
- skipStateCookieCheck?: boolean | undefined;
733
- storeStateStrategy: "database" | "cookie";
734
- };
735
- newSession: {
736
- session: import("better-auth").Session & Record<string, any>;
737
- user: import("better-auth").User & Record<string, any>;
738
- } | null;
739
- session: {
740
- session: import("better-auth").Session & Record<string, any>;
741
- user: import("better-auth").User & Record<string, any>;
742
- } | null;
743
- setNewSession: (session: {
744
- session: import("better-auth").Session & Record<string, any>;
745
- user: import("better-auth").User & Record<string, any>;
746
- } | null) => void;
747
- socialProviders: import("better-auth").OAuthProvider[];
748
- authCookies: import("better-auth").BetterAuthCookies;
749
- logger: ReturnType<(options?: import("better-auth").Logger | undefined) => import("better-auth").InternalLogger>;
750
- rateLimit: {
751
- enabled: boolean;
752
- window: number;
753
- max: number;
754
- storage: "memory" | "database" | "secondary-storage";
755
- } & Omit<import("better-auth").BetterAuthRateLimitOptions, "enabled" | "window" | "max" | "storage">;
756
- adapter: import("better-auth").DBAdapter<import("better-auth").BetterAuthOptions>;
757
- internalAdapter: import("better-auth").InternalAdapter<import("better-auth").BetterAuthOptions>;
758
- createAuthCookie: (cookieName: string, overrideAttributes?: Partial<import("better-auth").CookieOptions> | undefined) => import("better-auth").BetterAuthCookie;
759
- secret: string;
760
- sessionConfig: {
761
- updateAge: number;
762
- expiresIn: number;
763
- freshAge: number;
764
- cookieRefreshCache: false | {
765
- enabled: true;
766
- updateAge: number;
767
- };
727
+ session: Record<string, any> & {
728
+ id: string;
729
+ createdAt: Date;
730
+ updatedAt: Date;
731
+ userId: string;
732
+ expiresAt: Date;
733
+ token: string;
734
+ ipAddress?: string | null | undefined;
735
+ userAgent?: string | null | undefined;
768
736
  };
769
- generateId: (options: {
770
- model: import("better-auth").ModelNames;
771
- size?: number | undefined;
772
- }) => string | false;
773
- secondaryStorage: import("better-auth").SecondaryStorage | undefined;
774
- password: {
775
- hash: (password: string) => Promise<string>;
776
- verify: (data: {
777
- password: string;
778
- hash: string;
779
- }) => Promise<boolean>;
780
- config: {
781
- minPasswordLength: number;
782
- maxPasswordLength: number;
783
- };
784
- checkPassword: (userId: string, ctx: import("better-auth").GenericEndpointContext<import("better-auth").BetterAuthOptions>) => Promise<boolean>;
737
+ user: Record<string, any> & {
738
+ id: string;
739
+ createdAt: Date;
740
+ updatedAt: Date;
741
+ email: string;
742
+ emailVerified: boolean;
743
+ name: string;
744
+ image? /** Base URL for auth endpoints (defaults to window.location.origin) */: string | null | undefined;
785
745
  };
786
- tables: import("better-auth").BetterAuthDBSchema;
787
- runMigrations: () => Promise<void>;
788
- publishTelemetry: (event: {
789
- type: string;
790
- anonymousId?: string | undefined;
791
- payload: Record<string, any>;
792
- }) => Promise<void>;
793
- skipOriginCheck: boolean | string[];
794
- skipCSRFCheck: boolean;
795
- runInBackground: (promise: Promise<unknown>) => void;
796
- runInBackgroundOrAwait: (promise: Promise<unknown> | void) => import("better-auth").Awaitable<unknown>;
797
- }>;
798
- }>;
799
- }[];
800
- };
801
- endpoints: {
802
- createApiKey: import("better-auth").StrictEndpoint<"/api-key/create", {
803
- method: "POST";
804
- body: import("better-auth").ZodObject<{
746
+ };
747
+ }>)[];
748
+ query: import("better-auth").ZodOptional<import("better-auth").ZodObject<{
749
+ authenticatorAttachment: import("better-auth").ZodOptional<import("better-auth").ZodEnum<{
750
+ platform: "platform";
751
+ "cross-platform": "cross-platform";
752
+ }>>;
805
753
  name: import("better-auth").ZodOptional<import("better-auth").ZodString>;
806
- expiresIn: import("better-auth").ZodDefault<import("better-auth").ZodNullable<import("better-auth").ZodOptional<import("better-auth").ZodNumber>>>;
807
- userId: import("better-auth").ZodOptional<import("better-auth").ZodCoercedString<unknown>>;
808
- prefix: import("better-auth").ZodOptional<import("better-auth").ZodString>;
809
- remaining: import("better-auth").ZodDefault<import("better-auth").ZodNullable<import("better-auth").ZodOptional<import("better-auth").ZodNumber>>>;
810
- metadata: import("better-auth").ZodOptional<import("better-auth").ZodAny>;
811
- refillAmount: import("better-auth").ZodOptional<import("better-auth").ZodNumber>;
812
- refillInterval: import("better-auth").ZodOptional<import("better-auth").ZodNumber>;
813
- rateLimitTimeWindow: import("better-auth").ZodOptional<import("better-auth").ZodNumber>;
814
- rateLimitMax: import("better-auth").ZodOptional<import("better-auth").ZodNumber>;
815
- rateLimitEnabled: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
816
- permissions: import("better-auth").ZodOptional<import("better-auth").ZodRecord<import("better-auth").ZodString, import("better-auth").ZodArray<import("better-auth").ZodString>>>;
817
- }, import("better-auth").$strip>;
754
+ }, import("better-auth").$strip>>;
818
755
  metadata: {
819
756
  openapi: {
757
+ operationId: string;
820
758
  description: string;
821
759
  responses: {
822
- "200": {
760
+ 200: {
823
761
  description: string;
762
+ parameters: {
763
+ query: {
764
+ authenticatorAttachment: {
765
+ description: string;
766
+ required: boolean;
767
+ };
768
+ name: {
769
+ description: string;
770
+ required: boolean;
771
+ };
772
+ };
773
+ };
824
774
  content: {
825
775
  "application/json": {
826
776
  schema: {
827
777
  type: "object";
828
778
  properties: {
829
- id: {
830
- type: string;
831
- description: string;
832
- };
833
- createdAt: {
834
- type: string;
835
- format: string;
836
- description: string;
837
- };
838
- updatedAt: {
839
- type: string;
840
- format: string;
841
- description: string;
842
- };
843
- name: {
844
- type: string;
845
- nullable: boolean;
846
- description: string;
847
- };
848
- prefix: {
849
- type: string;
850
- nullable: boolean;
851
- description: string;
852
- };
853
- start: {
779
+ challenge: {
854
780
  type: string;
855
- nullable: boolean;
856
- description: string;
857
781
  };
858
- key: {
782
+ rp: {
859
783
  type: string;
860
- description: string;
784
+ properties: {
785
+ name: {
786
+ type: string;
787
+ };
788
+ id: {
789
+ type: string;
790
+ };
791
+ };
861
792
  };
862
- enabled: {
793
+ user: {
863
794
  type: string;
864
- description: string;
795
+ properties: {
796
+ id: {
797
+ type: string;
798
+ };
799
+ name: {
800
+ type: string;
801
+ };
802
+ displayName: {
803
+ type: string;
804
+ };
805
+ };
865
806
  };
866
- expiresAt: {
807
+ pubKeyCredParams: {
867
808
  type: string;
868
- format: string;
869
- nullable: boolean;
870
- description: string;
809
+ items: {
810
+ type: string;
811
+ properties: {
812
+ type: {
813
+ type: string;
814
+ };
815
+ alg: {
816
+ type: string;
817
+ };
818
+ };
819
+ };
871
820
  };
872
- userId: {
821
+ timeout: {
873
822
  type: string;
874
- description: string;
875
823
  };
876
- lastRefillAt: {
824
+ excludeCredentials: {
877
825
  type: string;
878
- format: string;
879
- nullable: boolean;
880
- description: string;
826
+ items: {
827
+ type: string;
828
+ properties: {
829
+ id: {
830
+ type: string;
831
+ };
832
+ type: {
833
+ type: string;
834
+ };
835
+ transports: {
836
+ type: string;
837
+ items: {
838
+ type: string;
839
+ };
840
+ };
841
+ };
842
+ };
881
843
  };
882
- lastRequest: {
844
+ authenticatorSelection: {
883
845
  type: string;
884
- format: string;
885
- nullable: boolean;
886
- description: string;
846
+ properties: {
847
+ authenticatorAttachment: {
848
+ type: string;
849
+ };
850
+ requireResidentKey: {
851
+ type: string;
852
+ };
853
+ userVerification: {
854
+ type: string;
855
+ };
856
+ };
887
857
  };
888
- metadata: {
858
+ attestation: {
889
859
  type: string;
890
- nullable: boolean;
891
- additionalProperties: boolean;
892
- description: string;
893
860
  };
894
- rateLimitMax: {
861
+ extensions: {
895
862
  type: string;
896
- nullable: boolean;
897
- description: string;
898
863
  };
899
- rateLimitTimeWindow: {
864
+ };
865
+ };
866
+ };
867
+ };
868
+ };
869
+ };
870
+ };
871
+ };
872
+ }, import("@better-auth/passkey/client").PublicKeyCredentialCreationOptionsJSON>;
873
+ generatePasskeyAuthenticationOptions: import("better-auth").StrictEndpoint<"/passkey/generate-authenticate-options", {
874
+ method: "GET";
875
+ metadata: {
876
+ openapi: {
877
+ operationId: string;
878
+ description: string;
879
+ responses: {
880
+ 200: {
881
+ description: string;
882
+ content: {
883
+ "application/json": {
884
+ schema: {
885
+ type: "object";
886
+ properties: {
887
+ challenge: {
900
888
  type: string;
901
- nullable: boolean;
902
- description: string;
903
889
  };
904
- remaining: {
890
+ rp: {
905
891
  type: string;
906
- nullable: boolean;
907
- description: string;
892
+ properties: {
893
+ name: {
894
+ type: string;
895
+ };
896
+ id: {
897
+ type: string;
898
+ };
899
+ };
908
900
  };
909
- refillAmount: {
901
+ user: {
910
902
  type: string;
911
- nullable: boolean;
912
- description: string;
903
+ properties: {
904
+ id: {
905
+ type: string;
906
+ };
907
+ name: {
908
+ type: string;
909
+ };
910
+ displayName: {
911
+ type: string;
912
+ };
913
+ };
913
914
  };
914
- refillInterval: {
915
+ timeout: {
915
916
  type: string;
916
- nullable: boolean;
917
- description: string;
918
917
  };
919
- rateLimitEnabled: {
918
+ allowCredentials: {
920
919
  type: string;
921
- description: string;
920
+ items: {
921
+ type: string;
922
+ properties: {
923
+ id: {
924
+ type: string;
925
+ };
926
+ type: {
927
+ type: string;
928
+ };
929
+ transports: {
930
+ type: string;
931
+ items: {
932
+ type: string;
933
+ };
934
+ };
935
+ };
936
+ };
922
937
  };
923
- requestCount: {
938
+ userVerification: {
924
939
  type: string;
925
- description: string;
926
940
  };
927
- permissions: {
941
+ authenticatorSelection: {
928
942
  type: string;
929
- nullable: boolean;
930
- additionalProperties: {
931
- type: string;
932
- items: {
943
+ properties: {
944
+ authenticatorAttachment: {
945
+ type: string;
946
+ };
947
+ requireResidentKey: {
948
+ type: string;
949
+ };
950
+ userVerification: {
933
951
  type: string;
934
952
  };
935
953
  };
936
- description: string;
954
+ };
955
+ extensions: {
956
+ type: string;
937
957
  };
938
958
  };
939
- required: string[];
940
959
  };
941
960
  };
942
961
  };
@@ -944,51 +963,12 @@ export declare const payloadAuthPlugins: readonly [{
944
963
  };
945
964
  };
946
965
  };
947
- }, {
948
- key: string;
949
- metadata: any;
950
- permissions: any;
951
- id: string;
952
- name: string | null;
953
- start: string | null;
954
- prefix: string | null;
955
- userId: string;
956
- refillInterval: number | null;
957
- refillAmount: number | null;
958
- lastRefillAt: Date | null;
959
- enabled: boolean;
960
- rateLimitEnabled: boolean;
961
- rateLimitTimeWindow: number | null;
962
- rateLimitMax: number | null;
963
- requestCount: number;
964
- remaining: number | null;
965
- lastRequest: Date | null;
966
- expiresAt: Date | null;
967
- createdAt: Date;
968
- updatedAt: Date;
969
- }>;
970
- verifyApiKey: import("better-auth").StrictEndpoint<string, {
966
+ }, import("@better-auth/passkey/client").PublicKeyCredentialRequestOptionsJSON>;
967
+ verifyPasskeyRegistration: import("better-auth").StrictEndpoint<"/passkey/verify-registration", {
971
968
  method: "POST";
972
969
  body: import("better-auth").ZodObject<{
973
- key: import("better-auth").ZodString;
974
- permissions: import("better-auth").ZodOptional<import("better-auth").ZodRecord<import("better-auth").ZodString, import("better-auth").ZodArray<import("better-auth").ZodString>>>;
975
- }, import("better-auth").$strip>;
976
- }, {
977
- valid: boolean;
978
- error: {
979
- message: string | undefined;
980
- code: string;
981
- };
982
- key: null;
983
- } | {
984
- valid: boolean;
985
- error: null;
986
- key: Omit<import("better-auth/plugins").ApiKey, "key"> | null;
987
- }>;
988
- getApiKey: import("better-auth").StrictEndpoint<"/api-key/get", {
989
- method: "GET";
990
- query: import("better-auth").ZodObject<{
991
- id: import("better-auth").ZodString;
970
+ response: import("better-auth").ZodAny;
971
+ name: import("better-auth").ZodOptional<import("better-auth").ZodString>;
992
972
  }, import("better-auth").$strip>;
993
973
  use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
994
974
  session: {
@@ -1015,314 +995,76 @@ export declare const payloadAuthPlugins: readonly [{
1015
995
  }>)[];
1016
996
  metadata: {
1017
997
  openapi: {
998
+ operationId: string;
1018
999
  description: string;
1019
1000
  responses: {
1020
- "200": {
1001
+ 200: {
1021
1002
  description: string;
1022
1003
  content: {
1023
1004
  "application/json": {
1024
1005
  schema: {
1025
- type: "object";
1026
- properties: {
1027
- id: {
1028
- type: string;
1029
- description: string;
1030
- };
1031
- name: {
1032
- type: string;
1033
- nullable: boolean;
1034
- description: string;
1035
- };
1036
- start: {
1037
- type: string;
1038
- nullable: boolean;
1039
- description: string;
1040
- };
1041
- prefix: {
1042
- type: string;
1043
- nullable: boolean;
1044
- description: string;
1045
- };
1046
- userId: {
1047
- type: string;
1048
- description: string;
1049
- };
1050
- refillInterval: {
1051
- type: string;
1052
- nullable: boolean;
1053
- description: string;
1054
- };
1055
- refillAmount: {
1056
- type: string;
1057
- nullable: boolean;
1058
- description: string;
1059
- };
1060
- lastRefillAt: {
1061
- type: string;
1062
- format: string;
1063
- nullable: boolean;
1064
- description: string;
1065
- };
1066
- enabled: {
1067
- type: string;
1068
- description: string;
1069
- default: boolean;
1070
- };
1071
- rateLimitEnabled: {
1072
- type: string;
1073
- description: string;
1074
- };
1075
- rateLimitTimeWindow: {
1076
- type: string;
1077
- nullable: boolean;
1078
- description: string;
1079
- };
1080
- rateLimitMax: {
1081
- type: string;
1082
- nullable: boolean;
1083
- description: string;
1084
- };
1085
- requestCount: {
1086
- type: string;
1087
- description: string;
1088
- };
1089
- remaining: {
1090
- type: string;
1091
- nullable: boolean;
1092
- description: string;
1093
- };
1094
- lastRequest: {
1095
- type: string;
1096
- format: string;
1097
- nullable: boolean;
1098
- description: string;
1099
- };
1100
- expiresAt: {
1101
- type: string;
1102
- format: string;
1103
- nullable: boolean;
1104
- description: string;
1105
- };
1106
- createdAt: {
1107
- type: string;
1108
- format: string;
1109
- description: string;
1110
- };
1111
- updatedAt: {
1112
- type: string;
1113
- format: string;
1114
- description: string;
1115
- };
1116
- metadata: {
1117
- type: string;
1118
- nullable: boolean;
1119
- additionalProperties: boolean;
1120
- description: string;
1121
- };
1122
- permissions: {
1123
- type: string;
1124
- nullable: boolean;
1125
- description: string;
1126
- };
1127
- };
1128
- required: string[];
1006
+ $ref: string;
1129
1007
  };
1130
1008
  };
1131
1009
  };
1132
1010
  };
1011
+ 400: {
1012
+ description: string;
1013
+ };
1133
1014
  };
1134
1015
  };
1135
1016
  };
1136
- }, {
1137
- metadata: Record<string, any> | null;
1138
- permissions: {
1139
- [key: string]: string[];
1140
- } | null;
1141
- id: string;
1142
- name: string | null;
1143
- start: string | null;
1144
- prefix: string | null;
1145
- userId: string;
1146
- refillInterval: number | null;
1147
- refillAmount: number | null;
1148
- lastRefillAt: Date | null;
1149
- enabled: boolean;
1150
- rateLimitEnabled: boolean;
1151
- rateLimitTimeWindow: number | null;
1152
- rateLimitMax: number | null;
1153
- requestCount: number;
1154
- remaining: number | null;
1155
- lastRequest: Date | null;
1156
- expiresAt: Date | null;
1157
- createdAt: Date;
1158
- updatedAt: Date;
1159
- }>;
1160
- updateApiKey: import("better-auth").StrictEndpoint<"/api-key/update", {
1017
+ }, import("@better-auth/passkey").Passkey>;
1018
+ verifyPasskeyAuthentication: import("better-auth").StrictEndpoint<"/passkey/verify-authentication", {
1161
1019
  method: "POST";
1162
1020
  body: import("better-auth").ZodObject<{
1163
- keyId: import("better-auth").ZodString;
1164
- userId: import("better-auth").ZodOptional<import("better-auth").ZodCoercedString<unknown>>;
1165
- name: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1166
- enabled: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
1167
- remaining: import("better-auth").ZodOptional<import("better-auth").ZodNumber>;
1168
- refillAmount: import("better-auth").ZodOptional<import("better-auth").ZodNumber>;
1169
- refillInterval: import("better-auth").ZodOptional<import("better-auth").ZodNumber>;
1170
- metadata: import("better-auth").ZodOptional<import("better-auth").ZodAny>;
1171
- expiresIn: import("better-auth").ZodNullable<import("better-auth").ZodOptional<import("better-auth").ZodNumber>>;
1172
- rateLimitEnabled: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
1173
- rateLimitTimeWindow: import("better-auth").ZodOptional<import("better-auth").ZodNumber>;
1174
- rateLimitMax: import("better-auth").ZodOptional<import("better-auth").ZodNumber>;
1175
- permissions: import("better-auth").ZodNullable<import("better-auth").ZodOptional<import("better-auth").ZodRecord<import("better-auth").ZodString, import("better-auth").ZodArray<import("better-auth").ZodString>>>>;
1021
+ response: import("better-auth").ZodRecord<import("better-auth").ZodAny, import("better-auth").ZodAny>;
1176
1022
  }, import("better-auth").$strip>;
1177
1023
  metadata: {
1178
1024
  openapi: {
1025
+ operationId: string;
1179
1026
  description: string;
1180
1027
  responses: {
1181
- "200": {
1028
+ 200: {
1182
1029
  description: string;
1183
1030
  content: {
1184
1031
  "application/json": {
1185
1032
  schema: {
1186
1033
  type: "object";
1187
1034
  properties: {
1188
- id: {
1189
- type: string;
1190
- description: string;
1191
- };
1192
- name: {
1193
- type: string;
1194
- nullable: boolean;
1195
- description: string;
1196
- };
1197
- start: {
1198
- type: string;
1199
- nullable: boolean;
1200
- description: string;
1201
- };
1202
- prefix: {
1203
- type: string;
1204
- nullable: boolean;
1205
- description: string;
1206
- };
1207
- userId: {
1208
- type: string;
1209
- description: string;
1210
- };
1211
- refillInterval: {
1212
- type: string;
1213
- nullable: boolean;
1214
- description: string;
1215
- };
1216
- refillAmount: {
1217
- type: string;
1218
- nullable: boolean;
1219
- description: string;
1220
- };
1221
- lastRefillAt: {
1222
- type: string;
1223
- format: string;
1224
- nullable: boolean;
1225
- description: string;
1226
- };
1227
- enabled: {
1228
- type: string;
1229
- description: string;
1230
- default: boolean;
1231
- };
1232
- rateLimitEnabled: {
1233
- type: string;
1234
- description: string;
1235
- };
1236
- rateLimitTimeWindow: {
1237
- type: string;
1238
- nullable: boolean;
1239
- description: string;
1240
- };
1241
- rateLimitMax: {
1242
- type: string;
1243
- nullable: boolean;
1244
- description: string;
1245
- };
1246
- requestCount: {
1247
- type: string;
1248
- description: string;
1249
- };
1250
- remaining: {
1251
- type: string;
1252
- nullable: boolean;
1253
- description: string;
1254
- };
1255
- lastRequest: {
1256
- type: string;
1257
- format: string;
1258
- nullable: boolean;
1259
- description: string;
1260
- };
1261
- expiresAt: {
1262
- type: string;
1263
- format: string;
1264
- nullable: boolean;
1265
- description: string;
1266
- };
1267
- createdAt: {
1268
- type: string;
1269
- format: string;
1270
- description: string;
1271
- };
1272
- updatedAt: {
1273
- type: string;
1274
- format: string;
1275
- description: string;
1276
- };
1277
- metadata: {
1278
- type: string;
1279
- nullable: boolean;
1280
- additionalProperties: boolean;
1281
- description: string;
1035
+ session: {
1036
+ $ref: string;
1282
1037
  };
1283
- permissions: {
1284
- type: string;
1285
- nullable: boolean;
1286
- description: string;
1038
+ user: {
1039
+ $ref: string;
1287
1040
  };
1288
1041
  };
1289
- required: string[];
1290
1042
  };
1291
1043
  };
1292
1044
  };
1293
1045
  };
1294
1046
  };
1295
1047
  };
1048
+ $Infer: {
1049
+ body: {
1050
+ response: import("@better-auth/passkey/client").AuthenticationResponseJSON;
1051
+ };
1052
+ };
1296
1053
  };
1297
1054
  }, {
1298
- metadata: Record<string, any> | null;
1299
- permissions: {
1300
- [key: string]: string[];
1301
- } | null;
1302
- id: string;
1303
- name: string | null;
1304
- start: string | null;
1305
- prefix: string | null;
1306
- userId: string;
1307
- refillInterval: number | null;
1308
- refillAmount: number | null;
1309
- lastRefillAt: Date | null;
1310
- enabled: boolean;
1311
- rateLimitEnabled: boolean;
1312
- rateLimitTimeWindow: number | null;
1313
- rateLimitMax: number | null;
1314
- requestCount: number;
1315
- remaining: number | null;
1316
- lastRequest: Date | null;
1317
- expiresAt: Date | null;
1318
- createdAt: Date;
1319
- updatedAt: Date;
1055
+ session: {
1056
+ id: string;
1057
+ createdAt: Date;
1058
+ updatedAt: Date;
1059
+ userId: string;
1060
+ expiresAt: Date;
1061
+ token: string;
1062
+ ipAddress?: string | null | undefined;
1063
+ userAgent?: string | null | undefined;
1064
+ };
1320
1065
  }>;
1321
- deleteApiKey: import("better-auth").StrictEndpoint<"/api-key/delete", {
1322
- method: "POST";
1323
- body: import("better-auth").ZodObject<{
1324
- keyId: import("better-auth").ZodString;
1325
- }, import("better-auth").$strip>;
1066
+ listPasskeys: import("better-auth").StrictEndpoint<"/passkey/list-user-passkeys", {
1067
+ method: "GET";
1326
1068
  use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1327
1069
  session: {
1328
1070
  session: Record<string, any> & {
@@ -1349,36 +1091,18 @@ export declare const payloadAuthPlugins: readonly [{
1349
1091
  metadata: {
1350
1092
  openapi: {
1351
1093
  description: string;
1352
- requestBody: {
1353
- content: {
1354
- "application/json": {
1355
- schema: {
1356
- type: "object";
1357
- properties: {
1358
- keyId: {
1359
- type: string;
1360
- description: string;
1361
- };
1362
- };
1363
- required: string[];
1364
- };
1365
- };
1366
- };
1367
- };
1368
1094
  responses: {
1369
1095
  "200": {
1370
1096
  description: string;
1371
1097
  content: {
1372
1098
  "application/json": {
1373
1099
  schema: {
1374
- type: "object";
1375
- properties: {
1376
- success: {
1377
- type: string;
1378
- description: string;
1379
- };
1100
+ type: "array";
1101
+ items: {
1102
+ $ref: string;
1103
+ required: string[];
1380
1104
  };
1381
- required: string[];
1105
+ description: string;
1382
1106
  };
1383
1107
  };
1384
1108
  };
@@ -1386,15 +1110,16 @@ export declare const payloadAuthPlugins: readonly [{
1386
1110
  };
1387
1111
  };
1388
1112
  };
1389
- }, {
1390
- success: boolean;
1391
- }>;
1392
- listApiKeys: import("better-auth").StrictEndpoint<"/api-key/list", {
1393
- method: "GET";
1394
- use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1395
- session: {
1396
- session: Record<string, any> & {
1397
- id: string;
1113
+ }, import("@better-auth/passkey").Passkey[]>;
1114
+ deletePasskey: import("better-auth").StrictEndpoint<"/passkey/delete-passkey", {
1115
+ method: "POST";
1116
+ body: import("better-auth").ZodObject<{
1117
+ id: import("better-auth").ZodString;
1118
+ }, import("better-auth").$strip>;
1119
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1120
+ session: {
1121
+ session: Record<string, any> & {
1122
+ id: string;
1398
1123
  createdAt: Date;
1399
1124
  updatedAt: Date;
1400
1125
  userId: string;
@@ -1423,113 +1148,14 @@ export declare const payloadAuthPlugins: readonly [{
1423
1148
  content: {
1424
1149
  "application/json": {
1425
1150
  schema: {
1426
- type: "array";
1427
- items: {
1428
- type: string;
1429
- properties: {
1430
- id: {
1431
- type: string;
1432
- description: string;
1433
- };
1434
- name: {
1435
- type: string;
1436
- nullable: boolean;
1437
- description: string;
1438
- };
1439
- start: {
1440
- type: string;
1441
- nullable: boolean;
1442
- description: string;
1443
- };
1444
- prefix: {
1445
- type: string;
1446
- nullable: boolean;
1447
- description: string;
1448
- };
1449
- userId: {
1450
- type: string;
1451
- description: string;
1452
- };
1453
- refillInterval: {
1454
- type: string;
1455
- nullable: boolean;
1456
- description: string;
1457
- };
1458
- refillAmount: {
1459
- type: string;
1460
- nullable: boolean;
1461
- description: string;
1462
- };
1463
- lastRefillAt: {
1464
- type: string;
1465
- format: string;
1466
- nullable: boolean;
1467
- description: string;
1468
- };
1469
- enabled: {
1470
- type: string;
1471
- description: string;
1472
- default: boolean;
1473
- };
1474
- rateLimitEnabled: {
1475
- type: string;
1476
- description: string;
1477
- };
1478
- rateLimitTimeWindow: {
1479
- type: string;
1480
- nullable: boolean;
1481
- description: string;
1482
- };
1483
- rateLimitMax: {
1484
- type: string;
1485
- nullable: boolean;
1486
- description: string;
1487
- };
1488
- requestCount: {
1489
- type: string;
1490
- description: string;
1491
- };
1492
- remaining: {
1493
- type: string;
1494
- nullable: boolean;
1495
- description: string;
1496
- };
1497
- lastRequest: {
1498
- type: string;
1499
- format: string;
1500
- nullable: boolean;
1501
- description: string;
1502
- };
1503
- expiresAt: {
1504
- type: string;
1505
- format: string;
1506
- nullable: boolean;
1507
- description: string;
1508
- };
1509
- createdAt: {
1510
- type: string;
1511
- format: string;
1512
- description: string;
1513
- };
1514
- updatedAt: {
1515
- type: string;
1516
- format: string;
1517
- description: string;
1518
- };
1519
- metadata: {
1520
- type: string;
1521
- nullable: boolean;
1522
- additionalProperties: boolean;
1523
- description: string;
1524
- };
1525
- permissions: {
1526
- type: string;
1527
- nullable: boolean;
1528
- description: string;
1529
- };
1151
+ type: "object";
1152
+ properties: {
1153
+ status: {
1154
+ type: string;
1155
+ description: string;
1530
1156
  };
1531
- required: string[];
1532
1157
  };
1158
+ required: string[];
1533
1159
  };
1534
1160
  };
1535
1161
  };
@@ -1538,734 +1164,126 @@ export declare const payloadAuthPlugins: readonly [{
1538
1164
  };
1539
1165
  };
1540
1166
  }, {
1541
- metadata: Record<string, any> | null;
1542
- permissions: {
1543
- [key: string]: string[];
1544
- } | null;
1545
- id: string;
1546
- name: string | null;
1547
- start: string | null;
1548
- prefix: string | null;
1549
- userId: string;
1550
- refillInterval: number | null;
1551
- refillAmount: number | null;
1552
- lastRefillAt: Date | null;
1553
- enabled: boolean;
1554
- rateLimitEnabled: boolean;
1555
- rateLimitTimeWindow: number | null;
1556
- rateLimitMax: number | null;
1557
- requestCount: number;
1558
- remaining: number | null;
1559
- lastRequest: Date | null;
1560
- expiresAt: Date | null;
1561
- createdAt: Date;
1562
- updatedAt: Date;
1563
- }[]>;
1564
- deleteAllExpiredApiKeys: import("better-auth").StrictEndpoint<string, {
1167
+ status: boolean;
1168
+ }>;
1169
+ updatePasskey: import("better-auth").StrictEndpoint<"/passkey/update-passkey", {
1565
1170
  method: "POST";
1171
+ body: import("better-auth").ZodObject<{
1172
+ id: import("better-auth").ZodString;
1173
+ name: import("better-auth").ZodString;
1174
+ }, import("better-auth").$strip>;
1175
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1176
+ session: {
1177
+ session: Record<string, any> & {
1178
+ id: string;
1179
+ createdAt: Date;
1180
+ updatedAt: Date;
1181
+ userId: string;
1182
+ expiresAt: Date;
1183
+ token: string;
1184
+ ipAddress?: string | null | undefined;
1185
+ userAgent?: string | null | undefined;
1186
+ };
1187
+ user: Record<string, any> & {
1188
+ id: string;
1189
+ createdAt: Date;
1190
+ updatedAt: Date;
1191
+ email: string;
1192
+ emailVerified: boolean;
1193
+ name: string;
1194
+ image?: string | null | undefined;
1195
+ };
1196
+ };
1197
+ }>)[];
1198
+ metadata: {
1199
+ openapi: {
1200
+ description: string;
1201
+ responses: {
1202
+ "200": {
1203
+ description: string;
1204
+ content: {
1205
+ "application/json": {
1206
+ schema: {
1207
+ type: "object";
1208
+ properties: {
1209
+ passkey: {
1210
+ $ref: string;
1211
+ };
1212
+ };
1213
+ required: string[];
1214
+ };
1215
+ };
1216
+ };
1217
+ };
1218
+ };
1219
+ };
1220
+ };
1566
1221
  }, {
1567
- success: boolean;
1568
- error: unknown;
1222
+ passkey: import("@better-auth/passkey").Passkey;
1569
1223
  }>;
1570
1224
  };
1571
1225
  schema: {
1572
- apikey: {
1226
+ passkey: {
1573
1227
  fields: {
1574
1228
  name: {
1575
1229
  type: "string";
1576
1230
  required: false;
1577
- input: false;
1578
- };
1579
- start: {
1580
- type: "string";
1581
- required: false;
1582
- input: false;
1583
- };
1584
- prefix: {
1585
- type: "string";
1586
- required: false;
1587
- input: false;
1588
1231
  };
1589
- key: {
1232
+ publicKey: {
1590
1233
  type: "string";
1591
1234
  required: true;
1592
- input: false;
1593
- index: true;
1594
1235
  };
1595
1236
  userId: {
1596
1237
  type: "string";
1597
1238
  references: {
1598
1239
  model: string;
1599
1240
  field: string;
1600
- onDelete: "cascade";
1601
1241
  };
1602
1242
  required: true;
1603
- input: false;
1604
1243
  index: true;
1605
1244
  };
1606
- refillInterval: {
1607
- type: "number";
1608
- required: false;
1609
- input: false;
1245
+ credentialID: {
1246
+ type: "string";
1247
+ required: true;
1248
+ index: true;
1610
1249
  };
1611
- refillAmount: {
1250
+ counter: {
1612
1251
  type: "number";
1613
- required: false;
1614
- input: false;
1615
- };
1616
- lastRefillAt: {
1617
- type: "date";
1618
- required: false;
1619
- input: false;
1252
+ required: true;
1620
1253
  };
1621
- enabled: {
1622
- type: "boolean";
1623
- required: false;
1624
- input: false;
1625
- defaultValue: true;
1254
+ deviceType: {
1255
+ type: "string";
1256
+ required: true;
1626
1257
  };
1627
- rateLimitEnabled: {
1258
+ backedUp: {
1628
1259
  type: "boolean";
1629
- required: false;
1630
- input: false;
1631
- defaultValue: true;
1632
- };
1633
- rateLimitTimeWindow: {
1634
- type: "number";
1635
- required: false;
1636
- input: false;
1637
- defaultValue: number;
1638
- };
1639
- rateLimitMax: {
1640
- type: "number";
1641
- required: false;
1642
- input: false;
1643
- defaultValue: number;
1644
- };
1645
- requestCount: {
1646
- type: "number";
1647
- required: false;
1648
- input: false;
1649
- defaultValue: number;
1650
- };
1651
- remaining: {
1652
- type: "number";
1653
- required: false;
1654
- input: false;
1655
- };
1656
- lastRequest: {
1657
- type: "date";
1658
- required: false;
1659
- input: false;
1260
+ required: true;
1660
1261
  };
1661
- expiresAt: {
1662
- type: "date";
1262
+ transports: {
1263
+ type: "string";
1663
1264
  required: false;
1664
- input: false;
1665
1265
  };
1666
1266
  createdAt: {
1667
1267
  type: "date";
1668
- required: true;
1669
- input: false;
1670
- };
1671
- updatedAt: {
1672
- type: "date";
1673
- required: true;
1674
- input: false;
1675
- };
1676
- permissions: {
1677
- type: "string";
1678
1268
  required: false;
1679
- input: false;
1680
1269
  };
1681
- metadata: {
1270
+ aaguid: {
1682
1271
  type: "string";
1683
1272
  required: false;
1684
- input: true;
1685
- transform: {
1686
- input(value: import("better-auth").DBPrimitive): string;
1687
- output(value: import("better-auth").DBPrimitive): any;
1688
- };
1689
1273
  };
1690
1274
  };
1691
1275
  };
1692
1276
  };
1693
- options: import("better-auth/plugins").ApiKeyOptions | undefined;
1694
- }>;
1695
- pathMethods: {
1696
- "/api-key/create": "POST";
1697
- "/api-key/delete": "POST";
1698
- "/api-key/delete-all-expired-api-keys": "POST";
1699
- };
1700
- }, {
1701
- id: "passkey";
1702
- $InferServerPlugin: ReturnType<(options?: import("@better-auth/passkey").PasskeyOptions | undefined) => {
1703
- id: "passkey";
1704
- endpoints: {
1705
- generatePasskeyRegistrationOptions: import("better-auth").StrictEndpoint<"/passkey/generate-register-options", {
1706
- method: "GET";
1707
- use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1708
- session: {
1709
- session: Record<string, any> & {
1710
- id: string;
1711
- createdAt: Date;
1712
- updatedAt: Date;
1713
- userId: string;
1714
- expiresAt: Date;
1715
- token: string;
1716
- ipAddress?: string | null | undefined;
1717
- userAgent?: string | null | undefined;
1718
- };
1719
- user: Record<string, any> & {
1720
- id: string;
1721
- createdAt: Date;
1722
- updatedAt: Date;
1723
- email: string;
1724
- emailVerified: boolean;
1725
- name: string;
1726
- image?: string | null | undefined;
1727
- };
1728
- };
1729
- }>)[];
1730
- query: import("better-auth").ZodOptional<import("better-auth").ZodObject<{
1731
- authenticatorAttachment: import("better-auth").ZodOptional<import("better-auth").ZodEnum<{
1732
- platform: "platform";
1733
- "cross-platform": "cross-platform";
1734
- }>>;
1735
- name: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1736
- }, import("better-auth").$strip>>;
1737
- metadata: {
1738
- openapi: {
1739
- operationId: string;
1740
- description: string;
1741
- responses: {
1742
- 200: {
1743
- description: string;
1744
- parameters: {
1745
- query: {
1746
- authenticatorAttachment: {
1747
- description: string;
1748
- required: boolean;
1749
- };
1750
- name: {
1751
- description: string;
1752
- required: boolean;
1753
- };
1754
- };
1755
- };
1756
- content: {
1757
- "application/json": {
1758
- schema: {
1759
- type: "object";
1760
- properties: {
1761
- challenge: {
1762
- type: string;
1763
- };
1764
- rp: {
1765
- type: string;
1766
- properties: {
1767
- name: {
1768
- type: string;
1769
- };
1770
- id: {
1771
- type: string;
1772
- };
1773
- };
1774
- };
1775
- user: {
1776
- type: string;
1777
- properties: {
1778
- id: {
1779
- type: string;
1780
- };
1781
- name: {
1782
- type: string;
1783
- };
1784
- displayName: {
1785
- type: string;
1786
- };
1787
- };
1788
- };
1789
- pubKeyCredParams: {
1790
- type: string;
1791
- items: {
1792
- type: string;
1793
- properties: {
1794
- type: {
1795
- type: string;
1796
- };
1797
- alg: {
1798
- type: string;
1799
- };
1800
- };
1801
- };
1802
- };
1803
- timeout: {
1804
- type: string;
1805
- };
1806
- excludeCredentials: {
1807
- type: string;
1808
- items: {
1809
- type: string;
1810
- properties: {
1811
- id: {
1812
- type: string;
1813
- };
1814
- type: {
1815
- type: string;
1816
- };
1817
- transports: {
1818
- type: string;
1819
- items: {
1820
- type: string;
1821
- };
1822
- };
1823
- };
1824
- };
1825
- };
1826
- authenticatorSelection: {
1827
- type: string;
1828
- properties: {
1829
- authenticatorAttachment: {
1830
- type: string;
1831
- };
1832
- requireResidentKey: {
1833
- type: string;
1834
- };
1835
- userVerification: {
1836
- type: string;
1837
- };
1838
- };
1839
- };
1840
- attestation: {
1841
- type: string;
1842
- };
1843
- extensions: {
1844
- type: string;
1845
- };
1846
- };
1847
- };
1848
- };
1849
- };
1850
- };
1851
- };
1852
- };
1853
- };
1854
- }, import("@better-auth/passkey/client").PublicKeyCredentialCreationOptionsJSON>;
1855
- generatePasskeyAuthenticationOptions: import("better-auth").StrictEndpoint<"/passkey/generate-authenticate-options", {
1856
- method: "GET";
1857
- metadata: {
1858
- openapi: {
1859
- operationId: string;
1860
- description: string;
1861
- responses: {
1862
- 200: {
1863
- description: string;
1864
- content: {
1865
- "application/json": {
1866
- schema: {
1867
- type: "object";
1868
- properties: {
1869
- challenge: {
1870
- type: string;
1871
- };
1872
- rp: {
1873
- type: string;
1874
- properties: {
1875
- name: {
1876
- type: string;
1877
- };
1878
- id: {
1879
- type: string;
1880
- };
1881
- };
1882
- };
1883
- user: {
1884
- type: string;
1885
- properties: {
1886
- id: {
1887
- type: string;
1888
- };
1889
- name: {
1890
- type: string;
1891
- };
1892
- displayName: {
1893
- type: string;
1894
- };
1895
- };
1896
- };
1897
- timeout: {
1898
- type: string;
1899
- };
1900
- allowCredentials: {
1901
- type: string;
1902
- items: {
1903
- type: string;
1904
- properties: {
1905
- id: {
1906
- type: string;
1907
- };
1908
- type: {
1909
- type: string;
1910
- };
1911
- transports: {
1912
- type: string;
1913
- items: {
1914
- type: string;
1915
- };
1916
- };
1917
- };
1918
- };
1919
- };
1920
- userVerification: {
1921
- type: string;
1922
- };
1923
- authenticatorSelection: {
1924
- type: string;
1925
- properties: {
1926
- authenticatorAttachment: {
1927
- type: string;
1928
- };
1929
- requireResidentKey: {
1930
- type: string;
1931
- };
1932
- userVerification: {
1933
- type: string;
1934
- };
1935
- };
1936
- };
1937
- extensions: {
1938
- type: string;
1939
- };
1940
- };
1941
- };
1942
- };
1943
- };
1944
- };
1945
- };
1946
- };
1947
- };
1948
- }, import("@better-auth/passkey/client").PublicKeyCredentialRequestOptionsJSON>;
1949
- verifyPasskeyRegistration: import("better-auth").StrictEndpoint<"/passkey/verify-registration", {
1950
- method: "POST";
1951
- body: import("better-auth").ZodObject<{
1952
- response: import("better-auth").ZodAny;
1953
- name: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1954
- }, import("better-auth").$strip>;
1955
- use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1956
- session: {
1957
- session: Record<string, any> & {
1958
- id: string;
1959
- createdAt: Date;
1960
- updatedAt: Date;
1961
- userId: string;
1962
- expiresAt: Date;
1963
- token: string;
1964
- ipAddress?: string | null | undefined;
1965
- userAgent?: string | null | undefined;
1966
- };
1967
- user: Record<string, any> & {
1968
- id: string;
1969
- createdAt: Date;
1970
- updatedAt: Date;
1971
- email: string;
1972
- emailVerified: boolean;
1973
- name: string;
1974
- image?: string | null | undefined;
1975
- };
1976
- };
1977
- }>)[];
1978
- metadata: {
1979
- openapi: {
1980
- operationId: string;
1981
- description: string;
1982
- responses: {
1983
- 200: {
1984
- description: string;
1985
- content: {
1986
- "application/json": {
1987
- schema: {
1988
- $ref: string;
1989
- };
1990
- };
1991
- };
1992
- };
1993
- 400: {
1994
- description: string;
1995
- };
1996
- };
1997
- };
1998
- };
1999
- }, import("@better-auth/passkey").Passkey | null>;
2000
- verifyPasskeyAuthentication: import("better-auth").StrictEndpoint<"/passkey/verify-authentication", {
2001
- method: "POST";
2002
- body: import("better-auth").ZodObject<{
2003
- response: import("better-auth").ZodRecord<import("better-auth").ZodAny, import("better-auth").ZodAny>;
2004
- }, import("better-auth").$strip>;
2005
- metadata: {
2006
- openapi: {
2007
- operationId: string;
2008
- description: string;
2009
- responses: {
2010
- 200: {
2011
- description: string;
2012
- content: {
2013
- "application/json": {
2014
- schema: {
2015
- type: "object";
2016
- properties: {
2017
- session: {
2018
- $ref: string;
2019
- };
2020
- user: {
2021
- $ref: string;
2022
- };
2023
- };
2024
- };
2025
- };
2026
- };
2027
- };
2028
- };
2029
- };
2030
- $Infer: {
2031
- body: {
2032
- response: import("@better-auth/passkey/client").AuthenticationResponseJSON;
2033
- };
2034
- };
2035
- };
2036
- }, {
2037
- session: {
2038
- id: string;
2039
- createdAt: Date;
2040
- updatedAt: Date;
2041
- userId: string;
2042
- expiresAt: Date;
2043
- token: string;
2044
- ipAddress?: string | null | undefined;
2045
- userAgent?: string | null | undefined;
2046
- };
2047
- }>;
2048
- listPasskeys: import("better-auth").StrictEndpoint<"/passkey/list-user-passkeys", {
2049
- method: "GET";
2050
- use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
2051
- session: {
2052
- session: Record<string, any> & {
2053
- id: string;
2054
- createdAt: Date;
2055
- updatedAt: Date;
2056
- userId: string;
2057
- expiresAt: Date;
2058
- token: string;
2059
- ipAddress?: string | null | undefined;
2060
- userAgent?: string | null | undefined;
2061
- };
2062
- user: Record<string, any> & {
2063
- id: string;
2064
- createdAt: Date;
2065
- updatedAt: Date;
2066
- email: string;
2067
- emailVerified: boolean;
2068
- name: string;
2069
- image?: string | null | undefined;
2070
- };
2071
- };
2072
- }>)[];
2073
- metadata: {
2074
- openapi: {
2075
- description: string;
2076
- responses: {
2077
- "200": {
2078
- description: string;
2079
- content: {
2080
- "application/json": {
2081
- schema: {
2082
- type: "array";
2083
- items: {
2084
- $ref: string;
2085
- required: string[];
2086
- };
2087
- description: string;
2088
- };
2089
- };
2090
- };
2091
- };
2092
- };
2093
- };
2094
- };
2095
- }, import("@better-auth/passkey").Passkey[]>;
2096
- deletePasskey: import("better-auth").StrictEndpoint<"/passkey/delete-passkey", {
2097
- method: "POST";
2098
- body: import("better-auth").ZodObject<{
2099
- id: import("better-auth").ZodString;
2100
- }, import("better-auth").$strip>;
2101
- use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
2102
- session: {
2103
- session: Record<string, any> & {
2104
- id: string;
2105
- createdAt: Date;
2106
- updatedAt: Date;
2107
- userId: string;
2108
- expiresAt: Date;
2109
- token: string;
2110
- ipAddress?: string | null | undefined;
2111
- userAgent?: string | null | undefined;
2112
- };
2113
- user: Record<string, any> & {
2114
- id: string;
2115
- createdAt: Date;
2116
- updatedAt: Date;
2117
- email: string;
2118
- emailVerified: boolean;
2119
- name: string;
2120
- image?: string | null | undefined;
2121
- };
2122
- };
2123
- }>)[];
2124
- metadata: {
2125
- openapi: {
2126
- description: string;
2127
- responses: {
2128
- "200": {
2129
- description: string;
2130
- content: {
2131
- "application/json": {
2132
- schema: {
2133
- type: "object";
2134
- properties: {
2135
- status: {
2136
- type: string;
2137
- description: string;
2138
- };
2139
- };
2140
- required: string[];
2141
- };
2142
- };
2143
- };
2144
- };
2145
- };
2146
- };
2147
- };
2148
- }, {
2149
- status: boolean;
2150
- }>;
2151
- updatePasskey: import("better-auth").StrictEndpoint<"/passkey/update-passkey", {
2152
- method: "POST";
2153
- body: import("better-auth").ZodObject<{
2154
- id: import("better-auth").ZodString;
2155
- name: import("better-auth").ZodString;
2156
- }, import("better-auth").$strip>;
2157
- use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
2158
- session: {
2159
- session: Record<string, any> & {
2160
- id: string;
2161
- createdAt: Date;
2162
- updatedAt: Date;
2163
- userId: string;
2164
- expiresAt: Date;
2165
- token: string;
2166
- ipAddress?: string | null | undefined;
2167
- userAgent?: string | null | undefined;
2168
- };
2169
- user: Record<string, any> & {
2170
- id: string;
2171
- createdAt: Date;
2172
- updatedAt: Date;
2173
- email: string;
2174
- emailVerified: boolean;
2175
- name: string;
2176
- image?: string | null | undefined;
2177
- };
2178
- };
2179
- }>)[];
2180
- metadata: {
2181
- openapi: {
2182
- description: string;
2183
- responses: {
2184
- "200": {
2185
- description: string;
2186
- content: {
2187
- "application/json": {
2188
- schema: {
2189
- type: "object";
2190
- properties: {
2191
- passkey: {
2192
- $ref: string;
2193
- };
2194
- };
2195
- required: string[];
2196
- };
2197
- };
2198
- };
2199
- };
2200
- };
2201
- };
2202
- };
2203
- }, {
2204
- passkey: import("@better-auth/passkey").Passkey;
2205
- }>;
2206
- };
2207
- schema: {
2208
- passkey: {
2209
- fields: {
2210
- name: {
2211
- type: "string";
2212
- required: false;
2213
- };
2214
- publicKey: {
2215
- type: "string";
2216
- required: true;
2217
- };
2218
- userId: {
2219
- type: "string";
2220
- references: {
2221
- model: string;
2222
- field: string;
2223
- };
2224
- required: true;
2225
- index: true;
2226
- };
2227
- credentialID: {
2228
- type: "string";
2229
- required: true;
2230
- index: true;
2231
- };
2232
- counter: {
2233
- type: "number";
2234
- required: true;
2235
- };
2236
- deviceType: {
2237
- type: "string";
2238
- required: true;
2239
- };
2240
- backedUp: {
2241
- type: "boolean";
2242
- required: true;
2243
- };
2244
- transports: {
2245
- type: "string";
2246
- required: false;
2247
- };
2248
- createdAt: {
2249
- type: "date";
2250
- required: false;
2251
- };
2252
- aaguid: {
2253
- type: "string";
2254
- required: false;
2255
- };
2256
- };
2257
- };
2258
- };
2259
- $ERROR_CODES: {
2260
- readonly CHALLENGE_NOT_FOUND: "Challenge not found";
2261
- readonly YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY: "You are not allowed to register this passkey";
2262
- readonly FAILED_TO_VERIFY_REGISTRATION: "Failed to verify registration";
2263
- readonly PASSKEY_NOT_FOUND: "Passkey not found";
2264
- readonly AUTHENTICATION_FAILED: "Authentication failed";
2265
- readonly UNABLE_TO_CREATE_SESSION: "Unable to create session";
2266
- readonly FAILED_TO_UPDATE_PASSKEY: "Failed to update passkey";
2267
- };
2268
- options: import("@better-auth/passkey").PasskeyOptions | undefined;
1277
+ $ERROR_CODES: {
1278
+ CHALLENGE_NOT_FOUND: import("better-auth").RawError<"CHALLENGE_NOT_FOUND">;
1279
+ YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY">;
1280
+ FAILED_TO_VERIFY_REGISTRATION: import("better-auth").RawError<"FAILED_TO_VERIFY_REGISTRATION">;
1281
+ PASSKEY_NOT_FOUND: import("better-auth").RawError<"PASSKEY_NOT_FOUND">;
1282
+ AUTHENTICATION_FAILED: import("better-auth").RawError<"AUTHENTICATION_FAILED">;
1283
+ UNABLE_TO_CREATE_SESSION: import("better-auth").RawError<"UNABLE_TO_CREATE_SESSION">;
1284
+ FAILED_TO_UPDATE_PASSKEY: import("better-auth").RawError<"FAILED_TO_UPDATE_PASSKEY">;
1285
+ };
1286
+ options: import("@better-auth/passkey").PasskeyOptions | undefined;
2269
1287
  }>;
2270
1288
  getActions: ($fetch: import("better-auth/react").BetterFetch, $store: import("better-auth").ClientStore) => {
2271
1289
  signIn: {
@@ -2340,6 +1358,15 @@ export declare const payloadAuthPlugins: readonly [{
2340
1358
  matcher: (path: string) => path is "/passkey/verify-authentication";
2341
1359
  signal: "$sessionSignal";
2342
1360
  })[];
1361
+ $ERROR_CODES: {
1362
+ CHALLENGE_NOT_FOUND: import("better-auth").RawError<"CHALLENGE_NOT_FOUND">;
1363
+ YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY">;
1364
+ FAILED_TO_VERIFY_REGISTRATION: import("better-auth").RawError<"FAILED_TO_VERIFY_REGISTRATION">;
1365
+ PASSKEY_NOT_FOUND: import("better-auth").RawError<"PASSKEY_NOT_FOUND">;
1366
+ AUTHENTICATION_FAILED: import("better-auth").RawError<"AUTHENTICATION_FAILED">;
1367
+ UNABLE_TO_CREATE_SESSION: import("better-auth").RawError<"UNABLE_TO_CREATE_SESSION">;
1368
+ FAILED_TO_UPDATE_PASSKEY: import("better-auth").RawError<"FAILED_TO_UPDATE_PASSKEY">;
1369
+ };
2343
1370
  }];
2344
1371
  export interface PayloadAuthClientOptions {
2345
1372
  /** Base URL for auth endpoints (defaults to window.location.origin) */
@@ -2425,12 +1452,246 @@ export declare function createPayloadAuthClient(options?: PayloadAuthClientOptio
2425
1452
  message?: string | undefined;
2426
1453
  }, FetchOptions["throw"] extends true ? true : false>>;
2427
1454
  } & {
2428
- sendVerificationEmail: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
2429
- email: string;
2430
- callbackURL?: string | undefined;
1455
+ sendVerificationEmail: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
1456
+ email: string;
1457
+ callbackURL?: string | undefined;
1458
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
1459
+ email: string;
1460
+ callbackURL?: string | undefined;
1461
+ } & {
1462
+ fetchOptions?: FetchOptions | undefined;
1463
+ }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
1464
+ status: boolean;
1465
+ }, {
1466
+ code?: string | undefined;
1467
+ message?: string | undefined;
1468
+ }, FetchOptions["throw"] extends true ? true : false>>;
1469
+ } & {
1470
+ changeEmail: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
1471
+ newEmail: string;
1472
+ callbackURL?: string | undefined;
1473
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
1474
+ newEmail: string;
1475
+ callbackURL?: string | undefined;
1476
+ } & {
1477
+ fetchOptions?: FetchOptions | undefined;
1478
+ }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
1479
+ status: boolean;
1480
+ }, {
1481
+ code?: string | undefined;
1482
+ message?: string | undefined;
1483
+ }, FetchOptions["throw"] extends true ? true : false>>;
1484
+ } & {
1485
+ changePassword: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
1486
+ newPassword: string;
1487
+ currentPassword: string;
1488
+ revokeOtherSessions?: boolean | undefined;
1489
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
1490
+ newPassword: string;
1491
+ currentPassword: string;
1492
+ revokeOtherSessions?: boolean | undefined;
1493
+ } & {
1494
+ fetchOptions?: FetchOptions | undefined;
1495
+ }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<Omit<{
1496
+ token: string | null;
1497
+ user: {
1498
+ id: string;
1499
+ createdAt: Date;
1500
+ updatedAt: Date;
1501
+ email: string;
1502
+ emailVerified: boolean;
1503
+ name: string;
1504
+ image?: string | null | undefined;
1505
+ } & Record<string, any> & {
1506
+ id: string;
1507
+ createdAt: Date;
1508
+ updatedAt: Date;
1509
+ email: string;
1510
+ emailVerified: boolean;
1511
+ name: string;
1512
+ image?: string | null | undefined;
1513
+ };
1514
+ }, "user"> & {
1515
+ user: import("better-auth").StripEmptyObjects<{
1516
+ id: string;
1517
+ createdAt: Date;
1518
+ updatedAt: Date;
1519
+ email: string;
1520
+ emailVerified: boolean;
1521
+ name: string;
1522
+ image?: string | null | undefined;
1523
+ } & {
1524
+ twoFactorEnabled: boolean | null | undefined;
1525
+ } & {}>;
1526
+ }, {
1527
+ code?: string | undefined;
1528
+ message?: string | undefined;
1529
+ }, FetchOptions["throw"] extends true ? true : false>>;
1530
+ } & {
1531
+ deleteUser: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
1532
+ callbackURL?: string | undefined;
1533
+ password?: string | undefined;
1534
+ token?: string | undefined;
1535
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
1536
+ callbackURL?: string | undefined;
1537
+ password?: string | undefined;
1538
+ token?: string | undefined;
1539
+ } & {
1540
+ fetchOptions?: FetchOptions | undefined;
1541
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
1542
+ success: boolean;
1543
+ message: string;
1544
+ }, {
1545
+ code?: string | undefined;
1546
+ message?: string | undefined;
1547
+ }, FetchOptions["throw"] extends true ? true : false>>;
1548
+ } & {
1549
+ requestPasswordReset: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
1550
+ email: string;
1551
+ redirectTo?: string | undefined;
1552
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
1553
+ email: string;
1554
+ redirectTo?: string | undefined;
1555
+ } & {
1556
+ fetchOptions?: FetchOptions | undefined;
1557
+ }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
1558
+ status: boolean;
1559
+ message: string;
1560
+ }, {
1561
+ code?: string | undefined;
1562
+ message?: string | undefined;
1563
+ }, FetchOptions["throw"] extends true ? true : false>>;
1564
+ } & {
1565
+ resetPassword: {
1566
+ ":token": <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
1567
+ callbackURL: string;
1568
+ }> & Record<string, any>, {
1569
+ token: string;
1570
+ }>>(data_0: import("better-auth").Prettify<{
1571
+ query: {
1572
+ callbackURL: string;
1573
+ };
1574
+ fetchOptions?: FetchOptions | undefined;
1575
+ }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<never, {
1576
+ code?: string | undefined;
1577
+ message?: string | undefined;
1578
+ }, FetchOptions["throw"] extends true ? true : false>>;
1579
+ };
1580
+ } & {
1581
+ revokeSession: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
1582
+ token: string;
1583
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
1584
+ token: string;
1585
+ } & {
1586
+ fetchOptions?: FetchOptions | undefined;
1587
+ }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
1588
+ status: boolean;
1589
+ }, {
1590
+ code?: string | undefined;
1591
+ message?: string | undefined;
1592
+ }, FetchOptions["throw"] extends true ? true : false>>;
1593
+ } & {
1594
+ revokeSessions: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
1595
+ query?: Record<string, any> | undefined;
1596
+ fetchOptions?: FetchOptions | undefined;
1597
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
1598
+ status: boolean;
1599
+ }, {
1600
+ code?: string | undefined;
1601
+ message?: string | undefined;
1602
+ }, FetchOptions["throw"] extends true ? true : false>>;
1603
+ } & {
1604
+ revokeOtherSessions: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
1605
+ query?: Record<string, any> | undefined;
1606
+ fetchOptions?: FetchOptions | undefined;
1607
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
1608
+ status: boolean;
1609
+ }, {
1610
+ code?: string | undefined;
1611
+ message?: string | undefined;
1612
+ }, FetchOptions["throw"] extends true ? true : false>>;
1613
+ } & {
1614
+ linkSocial: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
1615
+ provider: unknown;
1616
+ callbackURL?: string | undefined;
1617
+ idToken?: {
1618
+ token: string;
1619
+ nonce?: string | undefined;
1620
+ accessToken?: string | undefined;
1621
+ refreshToken?: string | undefined;
1622
+ scopes?: string[] | undefined;
1623
+ } | undefined;
1624
+ requestSignUp?: boolean | undefined;
1625
+ scopes?: string[] | undefined;
1626
+ errorCallbackURL?: string | undefined;
1627
+ disableRedirect?: boolean | undefined;
1628
+ additionalData?: Record<string, any> | undefined;
1629
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
1630
+ provider: unknown;
1631
+ callbackURL?: string | undefined;
1632
+ idToken?: {
1633
+ token: string;
1634
+ nonce?: string | undefined;
1635
+ accessToken?: string | undefined;
1636
+ refreshToken?: string | undefined;
1637
+ scopes?: string[] | undefined;
1638
+ } | undefined;
1639
+ requestSignUp?: boolean | undefined;
1640
+ scopes?: string[] | undefined;
1641
+ errorCallbackURL?: string | undefined;
1642
+ disableRedirect?: boolean | undefined;
1643
+ additionalData?: Record<string, any> | undefined;
1644
+ } & {
1645
+ fetchOptions?: FetchOptions | undefined;
1646
+ }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
1647
+ url: string;
1648
+ redirect: boolean;
1649
+ }, {
1650
+ code?: string | undefined;
1651
+ message?: string | undefined;
1652
+ }, FetchOptions["throw"] extends true ? true : false>>;
1653
+ } & {
1654
+ listAccounts: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
1655
+ query?: Record<string, any> | undefined;
1656
+ fetchOptions?: FetchOptions | undefined;
1657
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
1658
+ scopes: string[];
1659
+ id: string;
1660
+ createdAt: Date;
1661
+ updatedAt: Date;
1662
+ userId: string;
1663
+ providerId: string;
1664
+ accountId: string;
1665
+ }[], {
1666
+ code?: string | undefined;
1667
+ message?: string | undefined;
1668
+ }, FetchOptions["throw"] extends true ? true : false>>;
1669
+ } & {
1670
+ deleteUser: {
1671
+ callback: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
1672
+ token: string;
1673
+ callbackURL?: string | undefined;
1674
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
1675
+ query: {
1676
+ token: string;
1677
+ callbackURL?: string | undefined;
1678
+ };
1679
+ fetchOptions?: FetchOptions | undefined;
1680
+ }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
1681
+ success: boolean;
1682
+ message: string;
1683
+ }, {
1684
+ code?: string | undefined;
1685
+ message?: string | undefined;
1686
+ }, FetchOptions["throw"] extends true ? true : false>>;
1687
+ };
1688
+ } & {
1689
+ unlinkAccount: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
1690
+ providerId: string;
1691
+ accountId?: string | undefined;
2431
1692
  }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
2432
- email: string;
2433
- callbackURL?: string | undefined;
1693
+ providerId: string;
1694
+ accountId?: string | undefined;
2434
1695
  } & {
2435
1696
  fetchOptions?: FetchOptions | undefined;
2436
1697
  }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
@@ -2440,275 +1701,300 @@ export declare function createPayloadAuthClient(options?: PayloadAuthClientOptio
2440
1701
  message?: string | undefined;
2441
1702
  }, FetchOptions["throw"] extends true ? true : false>>;
2442
1703
  } & {
2443
- changeEmail: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
2444
- newEmail: string;
2445
- callbackURL?: string | undefined;
1704
+ refreshToken: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
1705
+ providerId: string;
1706
+ accountId?: string | undefined;
1707
+ userId?: string | undefined;
2446
1708
  }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
2447
- newEmail: string;
2448
- callbackURL?: string | undefined;
1709
+ providerId: string;
1710
+ accountId?: string | undefined;
1711
+ userId?: string | undefined;
2449
1712
  } & {
2450
1713
  fetchOptions?: FetchOptions | undefined;
2451
1714
  }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
2452
- status: boolean;
1715
+ accessToken: string | undefined;
1716
+ refreshToken: string;
1717
+ accessTokenExpiresAt: Date | undefined;
1718
+ refreshTokenExpiresAt: Date | null | undefined;
1719
+ scope: string | null | undefined;
1720
+ idToken: string | null | undefined;
1721
+ providerId: string;
1722
+ accountId: string;
2453
1723
  }, {
2454
1724
  code?: string | undefined;
2455
1725
  message?: string | undefined;
2456
1726
  }, FetchOptions["throw"] extends true ? true : false>>;
2457
1727
  } & {
2458
- changePassword: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
2459
- newPassword: string;
2460
- currentPassword: string;
2461
- revokeOtherSessions?: boolean | undefined;
1728
+ getAccessToken: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
1729
+ providerId: string;
1730
+ accountId?: string | undefined;
1731
+ userId?: string | undefined;
2462
1732
  }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
2463
- newPassword: string;
2464
- currentPassword: string;
2465
- revokeOtherSessions?: boolean | undefined;
1733
+ providerId: string;
1734
+ accountId?: string | undefined;
1735
+ userId?: string | undefined;
2466
1736
  } & {
2467
1737
  fetchOptions?: FetchOptions | undefined;
2468
1738
  }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
2469
- token: string | null;
2470
- user: {
2471
- id: string;
2472
- createdAt: Date;
2473
- updatedAt: Date;
2474
- email: string;
2475
- emailVerified: boolean;
2476
- name: string;
2477
- image?: string | null | undefined;
2478
- } & Record<string, any>;
1739
+ accessToken: string;
1740
+ accessTokenExpiresAt: Date | undefined;
1741
+ scopes: string[];
1742
+ idToken: string | undefined;
2479
1743
  }, {
2480
1744
  code?: string | undefined;
2481
1745
  message?: string | undefined;
2482
1746
  }, FetchOptions["throw"] extends true ? true : false>>;
2483
1747
  } & {
2484
- deleteUser: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
2485
- callbackURL?: string | undefined;
2486
- password?: string | undefined;
2487
- token?: string | undefined;
2488
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
2489
- callbackURL?: string | undefined;
2490
- password?: string | undefined;
2491
- token?: string | undefined;
2492
- } & {
1748
+ accountInfo: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
1749
+ accountId?: string | undefined;
1750
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
1751
+ query?: {
1752
+ accountId?: string | undefined;
1753
+ } | undefined;
2493
1754
  fetchOptions?: FetchOptions | undefined;
2494
1755
  }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
2495
- success: boolean;
2496
- message: string;
1756
+ user: import("better-auth").OAuth2UserInfo;
1757
+ data: Record<string, any>;
2497
1758
  }, {
2498
1759
  code?: string | undefined;
2499
1760
  message?: string | undefined;
2500
1761
  }, FetchOptions["throw"] extends true ? true : false>>;
2501
1762
  } & {
2502
- requestPasswordReset: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
2503
- email: string;
2504
- redirectTo?: string | undefined;
2505
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
2506
- email: string;
2507
- redirectTo?: string | undefined;
2508
- } & {
2509
- fetchOptions?: FetchOptions | undefined;
2510
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
2511
- status: boolean;
2512
- message: string;
2513
- }, {
2514
- code?: string | undefined;
2515
- message?: string | undefined;
2516
- }, FetchOptions["throw"] extends true ? true : false>>;
1763
+ signIn: {
1764
+ social: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
1765
+ provider: (string & {}) | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel";
1766
+ callbackURL?: string | undefined;
1767
+ newUserCallbackURL?: string | undefined;
1768
+ errorCallbackURL?: string | undefined;
1769
+ disableRedirect?: boolean | undefined;
1770
+ idToken?: {
1771
+ token: string;
1772
+ nonce?: string | undefined;
1773
+ accessToken?: string | undefined;
1774
+ refreshToken?: string | undefined;
1775
+ expiresAt?: number | undefined;
1776
+ } | undefined;
1777
+ scopes?: string[] | undefined;
1778
+ requestSignUp?: boolean | undefined;
1779
+ loginHint?: string | undefined;
1780
+ additionalData?: Record<string, any> | undefined;
1781
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
1782
+ provider: (string & {}) | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel";
1783
+ callbackURL?: string | undefined;
1784
+ newUserCallbackURL?: string | undefined;
1785
+ errorCallbackURL?: string | undefined;
1786
+ disableRedirect?: boolean | undefined;
1787
+ idToken?: {
1788
+ token: string;
1789
+ nonce?: string | undefined;
1790
+ accessToken?: string | undefined;
1791
+ refreshToken?: string | undefined;
1792
+ expiresAt?: number | undefined;
1793
+ } | undefined;
1794
+ scopes?: string[] | undefined;
1795
+ requestSignUp?: boolean | undefined;
1796
+ loginHint?: string | undefined;
1797
+ additionalData?: Record<string, any> | undefined;
1798
+ } & {
1799
+ fetchOptions?: FetchOptions | undefined;
1800
+ }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
1801
+ redirect: boolean;
1802
+ url: string;
1803
+ } | (Omit<{
1804
+ redirect: boolean;
1805
+ token: string;
1806
+ url: undefined;
1807
+ user: {
1808
+ id: string;
1809
+ createdAt: Date;
1810
+ updatedAt: Date;
1811
+ email: string;
1812
+ emailVerified: boolean;
1813
+ name: string;
1814
+ image?: string | null | undefined | undefined;
1815
+ };
1816
+ }, "user"> & {
1817
+ user: import("better-auth").StripEmptyObjects<{
1818
+ id: string;
1819
+ createdAt: Date;
1820
+ updatedAt: Date;
1821
+ email: string;
1822
+ emailVerified: boolean;
1823
+ name: string;
1824
+ image?: string | null | undefined;
1825
+ } & {
1826
+ twoFactorEnabled: boolean | null | undefined;
1827
+ } & {}>;
1828
+ }), {
1829
+ code?: string | undefined;
1830
+ message?: string | undefined;
1831
+ }, FetchOptions["throw"] extends true ? true : false>>;
1832
+ };
2517
1833
  } & {
2518
- resetPassword: {
2519
- ":token": <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
2520
- callbackURL: string;
2521
- }> & Record<string, any>, {
1834
+ signUp: {
1835
+ email: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
1836
+ name: string;
1837
+ email: string;
1838
+ password: string;
1839
+ image?: string | undefined;
1840
+ callbackURL?: string | undefined;
1841
+ rememberMe?: boolean | undefined;
1842
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
1843
+ email: string;
1844
+ name: string;
1845
+ password: string;
1846
+ image?: string | undefined;
1847
+ callbackURL?: string | undefined;
1848
+ fetchOptions?: FetchOptions | undefined;
1849
+ } & {} & {}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<(Omit<{
1850
+ token: null;
1851
+ user: {
1852
+ id: string;
1853
+ createdAt: Date;
1854
+ updatedAt: Date;
1855
+ email: string;
1856
+ emailVerified: boolean;
1857
+ name: string;
1858
+ image?: string | null | undefined | undefined;
1859
+ };
1860
+ }, "user"> & {
1861
+ user: import("better-auth").StripEmptyObjects<{
1862
+ id: string;
1863
+ createdAt: Date;
1864
+ updatedAt: Date;
1865
+ email: string;
1866
+ emailVerified: boolean;
1867
+ name: string;
1868
+ image?: string | null | undefined;
1869
+ } & {
1870
+ twoFactorEnabled: boolean | null | undefined;
1871
+ } & {}>;
1872
+ }) | (Omit<{
2522
1873
  token: string;
2523
- }>>(data_0: import("better-auth").Prettify<{
2524
- query: {
2525
- callbackURL: string;
1874
+ user: {
1875
+ id: string;
1876
+ createdAt: Date;
1877
+ updatedAt: Date;
1878
+ email: string;
1879
+ emailVerified: boolean;
1880
+ name: string;
1881
+ image?: string | null | undefined | undefined;
1882
+ };
1883
+ }, "user"> & {
1884
+ user: import("better-auth").StripEmptyObjects<{
1885
+ id: string;
1886
+ createdAt: Date;
1887
+ updatedAt: Date;
1888
+ email: string;
1889
+ emailVerified: boolean;
1890
+ name: string;
1891
+ image?: string | null | undefined;
1892
+ } & {
1893
+ twoFactorEnabled: boolean | null | undefined;
1894
+ } & {}>;
1895
+ }), {
1896
+ code?: string | undefined;
1897
+ message?: string | undefined;
1898
+ }, FetchOptions["throw"] extends true ? true : false>>;
1899
+ };
1900
+ } & {
1901
+ signIn: {
1902
+ email: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
1903
+ email: string;
1904
+ password: string;
1905
+ callbackURL?: string | undefined;
1906
+ rememberMe?: boolean | undefined;
1907
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
1908
+ email: string;
1909
+ password: string;
1910
+ callbackURL?: string | undefined;
1911
+ rememberMe?: boolean | undefined;
1912
+ } & {
1913
+ fetchOptions?: FetchOptions | undefined;
1914
+ }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<Omit<{
1915
+ redirect: boolean;
1916
+ token: string;
1917
+ url?: string | undefined;
1918
+ user: {
1919
+ id: string;
1920
+ createdAt: Date;
1921
+ updatedAt: Date;
1922
+ email: string;
1923
+ emailVerified: boolean;
1924
+ name: string;
1925
+ image?: string | null | undefined | undefined;
2526
1926
  };
2527
- fetchOptions?: FetchOptions | undefined;
2528
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<never, {
1927
+ }, "user"> & {
1928
+ user: import("better-auth").StripEmptyObjects<{
1929
+ id: string;
1930
+ createdAt: Date;
1931
+ updatedAt: Date;
1932
+ email: string;
1933
+ emailVerified: boolean;
1934
+ name: string;
1935
+ image?: string | null | undefined;
1936
+ } & {
1937
+ twoFactorEnabled: boolean | null | undefined;
1938
+ } & {}>;
1939
+ }, {
2529
1940
  code?: string | undefined;
2530
1941
  message?: string | undefined;
2531
1942
  }, FetchOptions["throw"] extends true ? true : false>>;
2532
1943
  };
2533
1944
  } & {
2534
- revokeSession: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
2535
- token: string;
2536
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
2537
- token: string;
2538
- } & {
2539
- fetchOptions?: FetchOptions | undefined;
2540
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
2541
- status: boolean;
2542
- }, {
2543
- code?: string | undefined;
2544
- message?: string | undefined;
2545
- }, FetchOptions["throw"] extends true ? true : false>>;
2546
- } & {
2547
- revokeSessions: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
2548
- query?: Record<string, any> | undefined;
2549
- fetchOptions?: FetchOptions | undefined;
2550
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
2551
- status: boolean;
2552
- }, {
2553
- code?: string | undefined;
2554
- message?: string | undefined;
2555
- }, FetchOptions["throw"] extends true ? true : false>>;
2556
- } & {
2557
- revokeOtherSessions: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
2558
- query?: Record<string, any> | undefined;
2559
- fetchOptions?: FetchOptions | undefined;
2560
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
2561
- status: boolean;
2562
- }, {
2563
- code?: string | undefined;
2564
- message?: string | undefined;
2565
- }, FetchOptions["throw"] extends true ? true : false>>;
1945
+ updateSession: any;
2566
1946
  } & {
2567
- linkSocial: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
2568
- provider: unknown;
2569
- callbackURL?: string | undefined;
2570
- idToken?: {
2571
- token: string;
2572
- nonce?: string | undefined;
2573
- accessToken?: string | undefined;
2574
- refreshToken?: string | undefined;
2575
- scopes?: string[] | undefined;
2576
- } | undefined;
2577
- requestSignUp?: boolean | undefined;
2578
- scopes?: string[] | undefined;
2579
- errorCallbackURL?: string | undefined;
2580
- disableRedirect?: boolean | undefined;
2581
- additionalData?: Record<string, any> | undefined;
2582
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
2583
- provider: unknown;
2584
- callbackURL?: string | undefined;
2585
- idToken?: {
2586
- token: string;
2587
- nonce?: string | undefined;
2588
- accessToken?: string | undefined;
2589
- refreshToken?: string | undefined;
2590
- scopes?: string[] | undefined;
2591
- } | undefined;
2592
- requestSignUp?: boolean | undefined;
2593
- scopes?: string[] | undefined;
2594
- errorCallbackURL?: string | undefined;
2595
- disableRedirect?: boolean | undefined;
2596
- additionalData?: Record<string, any> | undefined;
2597
- } & {
2598
- fetchOptions?: FetchOptions | undefined;
2599
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
2600
- url: string;
2601
- redirect: boolean;
2602
- }, {
2603
- code?: string | undefined;
2604
- message?: string | undefined;
2605
- }, FetchOptions["throw"] extends true ? true : false>>;
1947
+ updateUser: any;
2606
1948
  } & {
2607
- listAccounts: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
1949
+ listSessions: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
2608
1950
  query?: Record<string, any> | undefined;
2609
1951
  fetchOptions?: FetchOptions | undefined;
2610
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
2611
- scopes: string[];
1952
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<import("better-auth").Prettify<{
2612
1953
  id: string;
2613
1954
  createdAt: Date;
2614
1955
  updatedAt: Date;
2615
1956
  userId: string;
2616
- providerId: string;
2617
- accountId: string;
2618
- }[], {
2619
- code?: string | undefined;
2620
- message?: string | undefined;
2621
- }, FetchOptions["throw"] extends true ? true : false>>;
2622
- } & {
2623
- deleteUser: {
2624
- callback: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
2625
- token: string;
2626
- callbackURL?: string | undefined;
2627
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
2628
- query: {
2629
- token: string;
2630
- callbackURL?: string | undefined;
2631
- };
2632
- fetchOptions?: FetchOptions | undefined;
2633
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
2634
- success: boolean;
2635
- message: string;
2636
- }, {
2637
- code?: string | undefined;
2638
- message?: string | undefined;
2639
- }, FetchOptions["throw"] extends true ? true : false>>;
2640
- };
2641
- } & {
2642
- unlinkAccount: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
2643
- providerId: string;
2644
- accountId?: string | undefined;
2645
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
2646
- providerId: string;
2647
- accountId?: string | undefined;
2648
- } & {
2649
- fetchOptions?: FetchOptions | undefined;
2650
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
2651
- status: boolean;
2652
- }, {
2653
- code?: string | undefined;
2654
- message?: string | undefined;
2655
- }, FetchOptions["throw"] extends true ? true : false>>;
2656
- } & {
2657
- refreshToken: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
2658
- providerId: string;
2659
- accountId?: string | undefined;
2660
- userId?: string | undefined;
2661
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
2662
- providerId: string;
2663
- accountId?: string | undefined;
2664
- userId?: string | undefined;
2665
- } & {
2666
- fetchOptions?: FetchOptions | undefined;
2667
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
2668
- accessToken: string | undefined;
2669
- refreshToken: string | undefined;
2670
- accessTokenExpiresAt: Date | undefined;
2671
- refreshTokenExpiresAt: Date | undefined;
2672
- scope: string | null | undefined;
2673
- idToken: string | null | undefined;
2674
- providerId: string;
2675
- accountId: string;
2676
- }, {
2677
- code?: string | undefined;
2678
- message?: string | undefined;
2679
- }, FetchOptions["throw"] extends true ? true : false>>;
2680
- } & {
2681
- getAccessToken: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
2682
- providerId: string;
2683
- accountId?: string | undefined;
2684
- userId?: string | undefined;
2685
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
2686
- providerId: string;
2687
- accountId?: string | undefined;
2688
- userId?: string | undefined;
2689
- } & {
2690
- fetchOptions?: FetchOptions | undefined;
2691
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
2692
- accessToken: string;
2693
- accessTokenExpiresAt: Date | undefined;
2694
- scopes: string[];
2695
- idToken: string | undefined;
2696
- }, {
1957
+ expiresAt: Date;
1958
+ token: string;
1959
+ ipAddress?: string | null | undefined | undefined;
1960
+ userAgent?: string | null | undefined | undefined;
1961
+ }>[], {
2697
1962
  code?: string | undefined;
2698
1963
  message?: string | undefined;
2699
1964
  }, FetchOptions["throw"] extends true ? true : false>>;
2700
1965
  } & {
2701
- accountInfo: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
2702
- accountId?: string | undefined;
1966
+ getSession: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
1967
+ disableCookieCache?: unknown;
1968
+ disableRefresh?: unknown;
2703
1969
  }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
2704
1970
  query?: {
2705
- accountId?: string | undefined;
1971
+ disableCookieCache?: unknown;
1972
+ disableRefresh?: unknown;
2706
1973
  } | undefined;
2707
1974
  fetchOptions?: FetchOptions | undefined;
2708
1975
  }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
2709
- user: import("better-auth").OAuth2UserInfo;
2710
- data: Record<string, any>;
2711
- }, {
1976
+ user: import("better-auth").StripEmptyObjects<{
1977
+ id: string;
1978
+ createdAt: Date;
1979
+ updatedAt: Date;
1980
+ email: string;
1981
+ emailVerified: boolean;
1982
+ name: string;
1983
+ image?: string | null | undefined;
1984
+ } & {
1985
+ twoFactorEnabled: boolean | null | undefined;
1986
+ } & {}>;
1987
+ session: import("better-auth").StripEmptyObjects<{
1988
+ id: string;
1989
+ createdAt: Date;
1990
+ updatedAt: Date;
1991
+ userId: string;
1992
+ expiresAt: Date;
1993
+ token: string;
1994
+ ipAddress?: string | null | undefined;
1995
+ userAgent?: string | null | undefined;
1996
+ }>;
1997
+ } | null, {
2712
1998
  code?: string | undefined;
2713
1999
  message?: string | undefined;
2714
2000
  }, FetchOptions["throw"] extends true ? true : false>>;
@@ -2757,7 +2043,7 @@ export declare function createPayloadAuthClient(options?: PayloadAuthClientOptio
2757
2043
  trustDevice?: boolean | undefined;
2758
2044
  } & {
2759
2045
  fetchOptions?: FetchOptions | undefined;
2760
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
2046
+ }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<Omit<{
2761
2047
  token: string | undefined;
2762
2048
  user: (Record<string, any> & {
2763
2049
  id: string;
@@ -2768,6 +2054,18 @@ export declare function createPayloadAuthClient(options?: PayloadAuthClientOptio
2768
2054
  name: string;
2769
2055
  image?: string | null | undefined;
2770
2056
  }) | import("better-auth/plugins").UserWithTwoFactor;
2057
+ }, "user"> & {
2058
+ user: import("better-auth").StripEmptyObjects<{
2059
+ id: string;
2060
+ createdAt: Date;
2061
+ updatedAt: Date;
2062
+ email: string;
2063
+ emailVerified: boolean;
2064
+ name: string;
2065
+ image?: string | null | undefined;
2066
+ } & {
2067
+ twoFactorEnabled: boolean | null | undefined;
2068
+ } & {}>;
2771
2069
  }, {
2772
2070
  code?: string | undefined;
2773
2071
  message?: string | undefined;
@@ -2813,10 +2111,22 @@ export declare function createPayloadAuthClient(options?: PayloadAuthClientOptio
2813
2111
  trustDevice?: boolean | undefined;
2814
2112
  } & {
2815
2113
  fetchOptions?: FetchOptions | undefined;
2816
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<NonNullable<{
2114
+ }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<(Omit<{
2817
2115
  token: string;
2818
2116
  user: import("better-auth/plugins").UserWithTwoFactor;
2819
- } | {
2117
+ }, "user"> & {
2118
+ user: import("better-auth").StripEmptyObjects<{
2119
+ id: string;
2120
+ createdAt: Date;
2121
+ updatedAt: Date;
2122
+ email: string;
2123
+ emailVerified: boolean;
2124
+ name: string;
2125
+ image?: string | null | undefined;
2126
+ } & {
2127
+ twoFactorEnabled: boolean | null | undefined;
2128
+ } & {}>;
2129
+ }) | (Omit<{
2820
2130
  token: string;
2821
2131
  user: Record<string, any> & {
2822
2132
  id: string;
@@ -2827,7 +2137,19 @@ export declare function createPayloadAuthClient(options?: PayloadAuthClientOptio
2827
2137
  name: string;
2828
2138
  image?: string | null | undefined;
2829
2139
  };
2830
- }>, {
2140
+ }, "user"> & {
2141
+ user: import("better-auth").StripEmptyObjects<{
2142
+ id: string;
2143
+ createdAt: Date;
2144
+ updatedAt: Date;
2145
+ email: string;
2146
+ emailVerified: boolean;
2147
+ name: string;
2148
+ image?: string | null | undefined;
2149
+ } & {
2150
+ twoFactorEnabled: boolean | null | undefined;
2151
+ } & {}>;
2152
+ }), {
2831
2153
  code?: string | undefined;
2832
2154
  message?: string | undefined;
2833
2155
  }, FetchOptions["throw"] extends true ? true : false>>;
@@ -2857,10 +2179,22 @@ export declare function createPayloadAuthClient(options?: PayloadAuthClientOptio
2857
2179
  trustDevice?: boolean | undefined;
2858
2180
  } & {
2859
2181
  fetchOptions?: FetchOptions | undefined;
2860
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<NonNullable<{
2182
+ }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<(Omit<{
2861
2183
  token: string;
2862
2184
  user: import("better-auth/plugins").UserWithTwoFactor;
2863
- } | {
2185
+ }, "user"> & {
2186
+ user: import("better-auth").StripEmptyObjects<{
2187
+ id: string;
2188
+ createdAt: Date;
2189
+ updatedAt: Date;
2190
+ email: string;
2191
+ emailVerified: boolean;
2192
+ name: string;
2193
+ image?: string | null | undefined;
2194
+ } & {
2195
+ twoFactorEnabled: boolean | null | undefined;
2196
+ } & {}>;
2197
+ }) | (Omit<{
2864
2198
  token: string;
2865
2199
  user: Record<string, any> & {
2866
2200
  id: string;
@@ -2871,7 +2205,19 @@ export declare function createPayloadAuthClient(options?: PayloadAuthClientOptio
2871
2205
  name: string;
2872
2206
  image?: string | null | undefined;
2873
2207
  };
2874
- }>, {
2208
+ }, "user"> & {
2209
+ user: import("better-auth").StripEmptyObjects<{
2210
+ id: string;
2211
+ createdAt: Date;
2212
+ updatedAt: Date;
2213
+ email: string;
2214
+ emailVerified: boolean;
2215
+ name: string;
2216
+ image?: string | null | undefined;
2217
+ } & {
2218
+ twoFactorEnabled: boolean | null | undefined;
2219
+ } & {}>;
2220
+ }), {
2875
2221
  code?: string | undefined;
2876
2222
  message?: string | undefined;
2877
2223
  }, FetchOptions["throw"] extends true ? true : false>>;
@@ -2879,9 +2225,9 @@ export declare function createPayloadAuthClient(options?: PayloadAuthClientOptio
2879
2225
  } & {
2880
2226
  apiKey: {
2881
2227
  create: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
2228
+ configId?: string | undefined;
2882
2229
  name?: string | undefined;
2883
2230
  expiresIn?: number | null | undefined;
2884
- userId?: unknown;
2885
2231
  prefix?: string | undefined;
2886
2232
  remaining?: number | null | undefined;
2887
2233
  metadata?: any;
@@ -2891,10 +2237,12 @@ export declare function createPayloadAuthClient(options?: PayloadAuthClientOptio
2891
2237
  rateLimitMax?: number | undefined;
2892
2238
  rateLimitEnabled?: boolean | undefined;
2893
2239
  permissions?: Record<string, string[]> | undefined;
2240
+ userId?: unknown;
2241
+ organizationId?: unknown;
2894
2242
  }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
2243
+ configId?: string | undefined;
2895
2244
  name?: string | undefined;
2896
2245
  expiresIn?: number | null | undefined;
2897
- userId?: unknown;
2898
2246
  prefix?: string | undefined;
2899
2247
  remaining?: number | null | undefined;
2900
2248
  metadata?: any;
@@ -2904,6 +2252,8 @@ export declare function createPayloadAuthClient(options?: PayloadAuthClientOptio
2904
2252
  rateLimitMax?: number | undefined;
2905
2253
  rateLimitEnabled?: boolean | undefined;
2906
2254
  permissions?: Record<string, string[]> | undefined;
2255
+ userId?: unknown;
2256
+ organizationId?: unknown;
2907
2257
  } & {
2908
2258
  fetchOptions?: FetchOptions | undefined;
2909
2259
  }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
@@ -2911,10 +2261,11 @@ export declare function createPayloadAuthClient(options?: PayloadAuthClientOptio
2911
2261
  metadata: any;
2912
2262
  permissions: any;
2913
2263
  id: string;
2264
+ configId: string;
2914
2265
  name: string | null;
2915
2266
  start: string | null;
2916
2267
  prefix: string | null;
2917
- userId: string;
2268
+ referenceId: string;
2918
2269
  refillInterval: number | null;
2919
2270
  refillAmount: number | null;
2920
2271
  lastRefillAt: Date | null;
@@ -2937,9 +2288,11 @@ export declare function createPayloadAuthClient(options?: PayloadAuthClientOptio
2937
2288
  apiKey: {
2938
2289
  get: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
2939
2290
  id: string;
2291
+ configId?: string | undefined;
2940
2292
  }> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
2941
2293
  query: {
2942
2294
  id: string;
2295
+ configId?: string | undefined;
2943
2296
  };
2944
2297
  fetchOptions?: FetchOptions | undefined;
2945
2298
  }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
@@ -2948,10 +2301,11 @@ export declare function createPayloadAuthClient(options?: PayloadAuthClientOptio
2948
2301
  [key: string]: string[];
2949
2302
  } | null;
2950
2303
  id: string;
2304
+ configId: string;
2951
2305
  name: string | null;
2952
2306
  start: string | null;
2953
2307
  prefix: string | null;
2954
- userId: string;
2308
+ referenceId: string;
2955
2309
  refillInterval: number | null;
2956
2310
  refillAmount: number | null;
2957
2311
  lastRefillAt: Date | null;
@@ -2974,6 +2328,7 @@ export declare function createPayloadAuthClient(options?: PayloadAuthClientOptio
2974
2328
  apiKey: {
2975
2329
  update: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
2976
2330
  keyId: string;
2331
+ configId?: string | undefined;
2977
2332
  userId?: unknown;
2978
2333
  name?: string | undefined;
2979
2334
  enabled?: boolean | undefined;
@@ -2988,6 +2343,7 @@ export declare function createPayloadAuthClient(options?: PayloadAuthClientOptio
2988
2343
  permissions?: Record<string, string[]> | null | undefined;
2989
2344
  }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
2990
2345
  keyId: string;
2346
+ configId?: string | undefined;
2991
2347
  userId?: unknown;
2992
2348
  name?: string | undefined;
2993
2349
  enabled?: boolean | undefined;
@@ -3008,10 +2364,11 @@ export declare function createPayloadAuthClient(options?: PayloadAuthClientOptio
3008
2364
  [key: string]: string[];
3009
2365
  } | null;
3010
2366
  id: string;
2367
+ configId: string;
3011
2368
  name: string | null;
3012
2369
  start: string | null;
3013
2370
  prefix: string | null;
3014
- userId: string;
2371
+ referenceId: string;
3015
2372
  refillInterval: number | null;
3016
2373
  refillAmount: number | null;
3017
2374
  lastRefillAt: Date | null;
@@ -3034,8 +2391,10 @@ export declare function createPayloadAuthClient(options?: PayloadAuthClientOptio
3034
2391
  apiKey: {
3035
2392
  delete: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
3036
2393
  keyId: string;
2394
+ configId?: string | undefined;
3037
2395
  }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
3038
2396
  keyId: string;
2397
+ configId?: string | undefined;
3039
2398
  } & {
3040
2399
  fetchOptions?: FetchOptions | undefined;
3041
2400
  }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
@@ -3047,33 +2406,53 @@ export declare function createPayloadAuthClient(options?: PayloadAuthClientOptio
3047
2406
  };
3048
2407
  } & {
3049
2408
  apiKey: {
3050
- list: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
3051
- query?: Record<string, any> | undefined;
2409
+ list: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
2410
+ configId?: string | undefined;
2411
+ organizationId?: string | undefined;
2412
+ limit?: unknown;
2413
+ offset?: unknown;
2414
+ sortBy?: string | undefined;
2415
+ sortDirection?: "asc" | "desc" | undefined;
2416
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
2417
+ query?: {
2418
+ configId?: string | undefined;
2419
+ organizationId?: string | undefined;
2420
+ limit?: unknown;
2421
+ offset?: unknown;
2422
+ sortBy?: string | undefined;
2423
+ sortDirection?: "asc" | "desc" | undefined;
2424
+ } | undefined;
3052
2425
  fetchOptions?: FetchOptions | undefined;
3053
2426
  }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
3054
- metadata: Record<string, any> | null;
3055
- permissions: {
3056
- [key: string]: string[];
3057
- } | null;
3058
- id: string;
3059
- name: string | null;
3060
- start: string | null;
3061
- prefix: string | null;
3062
- userId: string;
3063
- refillInterval: number | null;
3064
- refillAmount: number | null;
3065
- lastRefillAt: Date | null;
3066
- enabled: boolean;
3067
- rateLimitEnabled: boolean;
3068
- rateLimitTimeWindow: number | null;
3069
- rateLimitMax: number | null;
3070
- requestCount: number;
3071
- remaining: number | null;
3072
- lastRequest: Date | null;
3073
- expiresAt: Date | null;
3074
- createdAt: Date;
3075
- updatedAt: Date;
3076
- }[], {
2427
+ apiKeys: {
2428
+ metadata: Record<string, any> | null;
2429
+ permissions: {
2430
+ [key: string]: string[];
2431
+ } | null;
2432
+ id: string;
2433
+ configId: string;
2434
+ name: string | null;
2435
+ start: string | null;
2436
+ prefix: string | null;
2437
+ referenceId: string;
2438
+ refillInterval: number | null;
2439
+ refillAmount: number | null;
2440
+ lastRefillAt: Date | null;
2441
+ enabled: boolean;
2442
+ rateLimitEnabled: boolean;
2443
+ rateLimitTimeWindow: number | null;
2444
+ rateLimitMax: number | null;
2445
+ requestCount: number;
2446
+ remaining: number | null;
2447
+ lastRequest: Date | null;
2448
+ expiresAt: Date | null;
2449
+ createdAt: Date;
2450
+ updatedAt: Date;
2451
+ }[];
2452
+ total: number;
2453
+ limit: number | undefined;
2454
+ offset: number | undefined;
2455
+ }, {
3077
2456
  code?: string | undefined;
3078
2457
  message?: string | undefined;
3079
2458
  }, FetchOptions["throw"] extends true ? true : false>>;
@@ -3185,206 +2564,6 @@ export declare function createPayloadAuthClient(options?: PayloadAuthClientOptio
3185
2564
  message?: string | undefined;
3186
2565
  }, FetchOptions["throw"] extends true ? true : false>>;
3187
2566
  };
3188
- } & {
3189
- signIn: {
3190
- social: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
3191
- provider: (string & {}) | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "vercel";
3192
- callbackURL?: string | undefined;
3193
- newUserCallbackURL?: string | undefined;
3194
- errorCallbackURL?: string | undefined;
3195
- disableRedirect?: boolean | undefined;
3196
- idToken?: {
3197
- token: string;
3198
- nonce?: string | undefined;
3199
- accessToken?: string | undefined;
3200
- refreshToken?: string | undefined;
3201
- expiresAt?: number | undefined;
3202
- } | undefined;
3203
- scopes?: string[] | undefined;
3204
- requestSignUp?: boolean | undefined;
3205
- loginHint?: string | undefined;
3206
- additionalData?: Record<string, any> | undefined;
3207
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
3208
- provider: (string & {}) | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "vercel";
3209
- callbackURL?: string | undefined;
3210
- newUserCallbackURL?: string | undefined;
3211
- errorCallbackURL?: string | undefined;
3212
- disableRedirect?: boolean | undefined;
3213
- idToken?: {
3214
- token: string;
3215
- nonce?: string | undefined;
3216
- accessToken?: string | undefined;
3217
- refreshToken?: string | undefined;
3218
- expiresAt?: number | undefined;
3219
- } | undefined;
3220
- scopes?: string[] | undefined;
3221
- requestSignUp?: boolean | undefined;
3222
- loginHint?: string | undefined;
3223
- additionalData?: Record<string, any> | undefined;
3224
- } & {
3225
- fetchOptions?: FetchOptions | undefined;
3226
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<NonNullable<{
3227
- redirect: boolean;
3228
- url: string;
3229
- } | {
3230
- redirect: boolean;
3231
- token: string;
3232
- url: undefined;
3233
- user: {
3234
- id: string;
3235
- createdAt: Date;
3236
- updatedAt: Date;
3237
- email: string;
3238
- emailVerified: boolean;
3239
- name: string;
3240
- image?: string | null | undefined | undefined;
3241
- };
3242
- }>, {
3243
- code?: string | undefined;
3244
- message?: string | undefined;
3245
- }, FetchOptions["throw"] extends true ? true : false>>;
3246
- };
3247
- } & {
3248
- signUp: {
3249
- email: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
3250
- name: string;
3251
- email: string;
3252
- password: string;
3253
- image?: string | undefined;
3254
- callbackURL?: string | undefined;
3255
- rememberMe?: boolean | undefined;
3256
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
3257
- email: string;
3258
- name: string;
3259
- password: string;
3260
- image?: string | undefined;
3261
- callbackURL?: string | undefined;
3262
- fetchOptions?: FetchOptions | undefined;
3263
- } & {} & {}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<NonNullable<{
3264
- token: null;
3265
- user: {
3266
- id: string;
3267
- createdAt: Date;
3268
- updatedAt: Date;
3269
- email: string;
3270
- emailVerified: boolean;
3271
- name: string;
3272
- image?: string | null | undefined | undefined;
3273
- };
3274
- } | {
3275
- token: string;
3276
- user: {
3277
- id: string;
3278
- createdAt: Date;
3279
- updatedAt: Date;
3280
- email: string;
3281
- emailVerified: boolean;
3282
- name: string;
3283
- image?: string | null | undefined | undefined;
3284
- };
3285
- }>, {
3286
- code?: string | undefined;
3287
- message?: string | undefined;
3288
- }, FetchOptions["throw"] extends true ? true : false>>;
3289
- };
3290
- } & {
3291
- signIn: {
3292
- email: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
3293
- email: string;
3294
- password: string;
3295
- callbackURL?: string | undefined;
3296
- rememberMe?: boolean | undefined;
3297
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
3298
- email: string;
3299
- password: string;
3300
- callbackURL?: string | undefined;
3301
- rememberMe?: boolean | undefined;
3302
- } & {
3303
- fetchOptions?: FetchOptions | undefined;
3304
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
3305
- redirect: boolean;
3306
- token: string;
3307
- url?: string | undefined;
3308
- user: {
3309
- id: string;
3310
- createdAt: Date;
3311
- updatedAt: Date;
3312
- email: string;
3313
- emailVerified: boolean;
3314
- name: string;
3315
- image?: string | null | undefined | undefined;
3316
- };
3317
- }, {
3318
- code?: string | undefined;
3319
- message?: string | undefined;
3320
- }, FetchOptions["throw"] extends true ? true : false>>;
3321
- };
3322
- } & {
3323
- updateUser: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<Partial<{}> & {
3324
- name?: string | undefined;
3325
- image?: string | undefined | null;
3326
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
3327
- image?: (string | null) | undefined;
3328
- name?: string | undefined;
3329
- fetchOptions?: FetchOptions | undefined;
3330
- } & Partial<{} & {}>> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
3331
- status: boolean;
3332
- }, {
3333
- code?: string | undefined;
3334
- message?: string | undefined;
3335
- }, FetchOptions["throw"] extends true ? true : false>>;
3336
- } & {
3337
- listSessions: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
3338
- query?: Record<string, any> | undefined;
3339
- fetchOptions?: FetchOptions | undefined;
3340
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<import("better-auth").Prettify<{
3341
- id: string;
3342
- createdAt: Date;
3343
- updatedAt: Date;
3344
- userId: string;
3345
- expiresAt: Date;
3346
- token: string;
3347
- ipAddress?: string | null | undefined | undefined;
3348
- userAgent?: string | null | undefined | undefined;
3349
- }>[], {
3350
- code?: string | undefined;
3351
- message?: string | undefined;
3352
- }, FetchOptions["throw"] extends true ? true : false>>;
3353
- } & {
3354
- getSession: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
3355
- disableCookieCache?: unknown;
3356
- disableRefresh?: unknown;
3357
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
3358
- query?: {
3359
- disableCookieCache?: unknown;
3360
- disableRefresh?: unknown;
3361
- } | undefined;
3362
- fetchOptions?: FetchOptions | undefined;
3363
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
3364
- user: {
3365
- id: string;
3366
- createdAt: Date;
3367
- updatedAt: Date;
3368
- email: string;
3369
- emailVerified: boolean;
3370
- name: string;
3371
- image?: string | null | undefined;
3372
- twoFactorEnabled: boolean | null | undefined;
3373
- };
3374
- session: {
3375
- id: string;
3376
- createdAt: Date;
3377
- updatedAt: Date;
3378
- userId: string;
3379
- expiresAt: Date;
3380
- token: string;
3381
- ipAddress?: string | null | undefined;
3382
- userAgent?: string | null | undefined;
3383
- };
3384
- } | null, {
3385
- code?: string | undefined;
3386
- message?: string | undefined;
3387
- }, FetchOptions["throw"] extends true ? true : false>>;
3388
2567
  } & {
3389
2568
  signIn: {
3390
2569
  passkey: (opts?: {
@@ -3445,7 +2624,7 @@ export declare function createPayloadAuthClient(options?: PayloadAuthClientOptio
3445
2624
  } & {
3446
2625
  useSession: () => {
3447
2626
  data: {
3448
- user: {
2627
+ user: import("better-auth").StripEmptyObjects<{
3449
2628
  id: string;
3450
2629
  createdAt: Date;
3451
2630
  updatedAt: Date;
@@ -3453,9 +2632,10 @@ export declare function createPayloadAuthClient(options?: PayloadAuthClientOptio
3453
2632
  emailVerified: boolean;
3454
2633
  name: string;
3455
2634
  image?: string | null | undefined;
2635
+ } & {
3456
2636
  twoFactorEnabled: boolean | null | undefined;
3457
- };
3458
- session: {
2637
+ } & {}>;
2638
+ session: import("better-auth").StripEmptyObjects<{
3459
2639
  id: string;
3460
2640
  createdAt: Date;
3461
2641
  updatedAt: Date;
@@ -3464,7 +2644,7 @@ export declare function createPayloadAuthClient(options?: PayloadAuthClientOptio
3464
2644
  token: string;
3465
2645
  ipAddress?: string | null | undefined;
3466
2646
  userAgent?: string | null | undefined;
3467
- };
2647
+ }>;
3468
2648
  } | null;
3469
2649
  isPending: boolean;
3470
2650
  isRefetching: boolean;
@@ -3475,7 +2655,7 @@ export declare function createPayloadAuthClient(options?: PayloadAuthClientOptio
3475
2655
  };
3476
2656
  $Infer: {
3477
2657
  Session: {
3478
- user: {
2658
+ user: import("better-auth").StripEmptyObjects<{
3479
2659
  id: string;
3480
2660
  createdAt: Date;
3481
2661
  updatedAt: Date;
@@ -3483,9 +2663,10 @@ export declare function createPayloadAuthClient(options?: PayloadAuthClientOptio
3483
2663
  emailVerified: boolean;
3484
2664
  name: string;
3485
2665
  image?: string | null | undefined;
2666
+ } & {
3486
2667
  twoFactorEnabled: boolean | null | undefined;
3487
- };
3488
- session: {
2668
+ } & {}>;
2669
+ session: import("better-auth").StripEmptyObjects<{
3489
2670
  id: string;
3490
2671
  createdAt: Date;
3491
2672
  updatedAt: Date;
@@ -3494,7 +2675,7 @@ export declare function createPayloadAuthClient(options?: PayloadAuthClientOptio
3494
2675
  token: string;
3495
2676
  ipAddress?: string | null | undefined;
3496
2677
  userAgent?: string | null | undefined;
3497
- };
2678
+ }>;
3498
2679
  };
3499
2680
  };
3500
2681
  $fetch: import("better-auth/react").BetterFetch<{
@@ -3515,22 +2696,22 @@ export declare function createPayloadAuthClient(options?: PayloadAuthClientOptio
3515
2696
  };
3516
2697
  })[];
3517
2698
  cache?: RequestCache | undefined;
3518
- method: string;
3519
- window?: null | undefined;
2699
+ priority?: RequestPriority | undefined;
2700
+ credentials?: RequestCredentials;
3520
2701
  headers?: (HeadersInit & (HeadersInit | {
3521
2702
  accept: "application/json" | "text/plain" | "application/octet-stream";
3522
2703
  "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
3523
2704
  authorization: "Bearer" | "Basic";
3524
2705
  })) | undefined;
3525
- redirect?: RequestRedirect | undefined;
3526
- credentials?: RequestCredentials;
3527
2706
  integrity?: string | undefined;
3528
2707
  keepalive?: boolean | undefined;
2708
+ method: string;
3529
2709
  mode?: RequestMode | undefined;
3530
- priority?: RequestPriority | undefined;
2710
+ redirect?: RequestRedirect | undefined;
3531
2711
  referrer?: string | undefined;
3532
2712
  referrerPolicy?: ReferrerPolicy | undefined;
3533
2713
  signal?: (AbortSignal | null) | undefined;
2714
+ window?: null | undefined;
3534
2715
  onRetry?: ((response: import("better-auth/react").ResponseContext) => Promise<void> | void) | undefined;
3535
2716
  hookOptions?: {
3536
2717
  cloneResponse?: boolean;
@@ -3569,90 +2750,104 @@ export declare function createPayloadAuthClient(options?: PayloadAuthClientOptio
3569
2750
  atoms: Record<string, import("better-auth/react").WritableAtom<any>>;
3570
2751
  };
3571
2752
  $ERROR_CODES: {
3572
- readonly OTP_NOT_ENABLED: "OTP not enabled";
3573
- readonly OTP_HAS_EXPIRED: "OTP has expired";
3574
- readonly TOTP_NOT_ENABLED: "TOTP not enabled";
3575
- readonly TWO_FACTOR_NOT_ENABLED: "Two factor isn't enabled";
3576
- readonly BACKUP_CODES_NOT_ENABLED: "Backup codes aren't enabled";
3577
- readonly INVALID_BACKUP_CODE: "Invalid backup code";
3578
- readonly INVALID_CODE: "Invalid code";
3579
- readonly TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE: "Too many attempts. Please request a new code.";
3580
- readonly INVALID_TWO_FACTOR_COOKIE: "Invalid two factor cookie";
3581
- readonly INVALID_METADATA_TYPE: "metadata must be an object or undefined";
3582
- readonly REFILL_AMOUNT_AND_INTERVAL_REQUIRED: "refillAmount is required when refillInterval is provided";
3583
- readonly REFILL_INTERVAL_AND_AMOUNT_REQUIRED: "refillInterval is required when refillAmount is provided";
3584
- readonly USER_BANNED: "User is banned";
3585
- readonly UNAUTHORIZED_SESSION: "Unauthorized or invalid session";
3586
- readonly KEY_NOT_FOUND: "API Key not found";
3587
- readonly KEY_DISABLED: "API Key is disabled";
3588
- readonly KEY_EXPIRED: "API Key has expired";
3589
- readonly USAGE_EXCEEDED: "API Key has reached its usage limit";
3590
- readonly KEY_NOT_RECOVERABLE: "API Key is not recoverable";
3591
- readonly EXPIRES_IN_IS_TOO_SMALL: "The expiresIn is smaller than the predefined minimum value.";
3592
- readonly EXPIRES_IN_IS_TOO_LARGE: "The expiresIn is larger than the predefined maximum value.";
3593
- readonly INVALID_REMAINING: "The remaining count is either too large or too small.";
3594
- readonly INVALID_PREFIX_LENGTH: "The prefix length is either too large or too small.";
3595
- readonly INVALID_NAME_LENGTH: "The name length is either too large or too small.";
3596
- readonly METADATA_DISABLED: "Metadata is disabled.";
3597
- readonly RATE_LIMIT_EXCEEDED: "Rate limit exceeded.";
3598
- readonly NO_VALUES_TO_UPDATE: "No values to update.";
3599
- readonly KEY_DISABLED_EXPIRATION: "Custom key expiration values are disabled.";
3600
- readonly INVALID_API_KEY: "Invalid API key.";
3601
- readonly INVALID_USER_ID_FROM_API_KEY: "The user id from the API key is invalid.";
3602
- readonly INVALID_API_KEY_GETTER_RETURN_TYPE: "API Key getter returned an invalid key type. Expected string.";
3603
- readonly SERVER_ONLY_PROPERTY: "The property you're trying to set can only be set from the server auth instance only.";
3604
- readonly FAILED_TO_UPDATE_API_KEY: "Failed to update API key";
3605
- readonly NAME_REQUIRED: "API Key name is required.";
3606
- readonly CHALLENGE_NOT_FOUND: "Challenge not found";
3607
- readonly YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY: "You are not allowed to register this passkey";
3608
- readonly FAILED_TO_VERIFY_REGISTRATION: "Failed to verify registration";
3609
- readonly PASSKEY_NOT_FOUND: "Passkey not found";
3610
- readonly AUTHENTICATION_FAILED: "Authentication failed";
3611
- readonly UNABLE_TO_CREATE_SESSION: "Unable to create session";
3612
- readonly FAILED_TO_UPDATE_PASSKEY: "Failed to update passkey";
3613
- readonly USER_NOT_FOUND: "User not found";
3614
- readonly FAILED_TO_CREATE_USER: "Failed to create user";
3615
- readonly FAILED_TO_CREATE_SESSION: "Failed to create session";
3616
- readonly FAILED_TO_UPDATE_USER: "Failed to update user";
3617
- readonly FAILED_TO_GET_SESSION: "Failed to get session";
3618
- readonly INVALID_PASSWORD: "Invalid password";
3619
- readonly INVALID_EMAIL: "Invalid email";
3620
- readonly INVALID_EMAIL_OR_PASSWORD: "Invalid email or password";
3621
- readonly SOCIAL_ACCOUNT_ALREADY_LINKED: "Social account already linked";
3622
- readonly PROVIDER_NOT_FOUND: "Provider not found";
3623
- readonly INVALID_TOKEN: "Invalid token";
3624
- readonly ID_TOKEN_NOT_SUPPORTED: "id_token not supported";
3625
- readonly FAILED_TO_GET_USER_INFO: "Failed to get user info";
3626
- readonly USER_EMAIL_NOT_FOUND: "User email not found";
3627
- readonly EMAIL_NOT_VERIFIED: "Email not verified";
3628
- readonly PASSWORD_TOO_SHORT: "Password too short";
3629
- readonly PASSWORD_TOO_LONG: "Password too long";
3630
- readonly USER_ALREADY_EXISTS: "User already exists.";
3631
- readonly USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: "User already exists. Use another email.";
3632
- readonly EMAIL_CAN_NOT_BE_UPDATED: "Email can not be updated";
3633
- readonly CREDENTIAL_ACCOUNT_NOT_FOUND: "Credential account not found";
3634
- readonly SESSION_EXPIRED: "Session expired. Re-authenticate to perform this action.";
3635
- readonly FAILED_TO_UNLINK_LAST_ACCOUNT: "You can't unlink your last account";
3636
- readonly ACCOUNT_NOT_FOUND: "Account not found";
3637
- readonly USER_ALREADY_HAS_PASSWORD: "User already has a password. Provide that to delete the account.";
3638
- readonly CROSS_SITE_NAVIGATION_LOGIN_BLOCKED: "Cross-site navigation login blocked. This request appears to be a CSRF attack.";
3639
- readonly VERIFICATION_EMAIL_NOT_ENABLED: "Verification email isn't enabled";
3640
- readonly EMAIL_ALREADY_VERIFIED: "Email is already verified";
3641
- readonly EMAIL_MISMATCH: "Email mismatch";
3642
- readonly SESSION_NOT_FRESH: "Session is not fresh";
3643
- readonly LINKED_ACCOUNT_ALREADY_EXISTS: "Linked account already exists";
3644
- readonly INVALID_ORIGIN: "Invalid origin";
3645
- readonly INVALID_CALLBACK_URL: "Invalid callbackURL";
3646
- readonly INVALID_REDIRECT_URL: "Invalid redirectURL";
3647
- readonly INVALID_ERROR_CALLBACK_URL: "Invalid errorCallbackURL";
3648
- readonly INVALID_NEW_USER_CALLBACK_URL: "Invalid newUserCallbackURL";
3649
- readonly MISSING_OR_NULL_ORIGIN: "Missing or null Origin";
3650
- readonly CALLBACK_URL_REQUIRED: "callbackURL is required";
3651
- readonly FAILED_TO_CREATE_VERIFICATION: "Unable to create verification";
3652
- readonly FIELD_NOT_ALLOWED: "Field not allowed to be set";
3653
- readonly ASYNC_VALIDATION_NOT_SUPPORTED: "Async validation is not supported";
3654
- readonly VALIDATION_ERROR: "Validation Error";
3655
- readonly MISSING_FIELD: "Field is required";
2753
+ OTP_NOT_ENABLED: import("better-auth").RawError<"OTP_NOT_ENABLED">;
2754
+ OTP_HAS_EXPIRED: import("better-auth").RawError<"OTP_HAS_EXPIRED">;
2755
+ TOTP_NOT_ENABLED: import("better-auth").RawError<"TOTP_NOT_ENABLED">;
2756
+ TWO_FACTOR_NOT_ENABLED: import("better-auth").RawError<"TWO_FACTOR_NOT_ENABLED">;
2757
+ BACKUP_CODES_NOT_ENABLED: import("better-auth").RawError<"BACKUP_CODES_NOT_ENABLED">;
2758
+ INVALID_BACKUP_CODE: import("better-auth").RawError<"INVALID_BACKUP_CODE">;
2759
+ INVALID_CODE: import("better-auth").RawError<"INVALID_CODE">;
2760
+ TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE: import("better-auth").RawError<"TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE">;
2761
+ INVALID_TWO_FACTOR_COOKIE: import("better-auth").RawError<"INVALID_TWO_FACTOR_COOKIE">;
2762
+ } & {
2763
+ INVALID_METADATA_TYPE: import("better-auth").RawError<"INVALID_METADATA_TYPE">;
2764
+ REFILL_AMOUNT_AND_INTERVAL_REQUIRED: import("better-auth").RawError<"REFILL_AMOUNT_AND_INTERVAL_REQUIRED">;
2765
+ REFILL_INTERVAL_AND_AMOUNT_REQUIRED: import("better-auth").RawError<"REFILL_INTERVAL_AND_AMOUNT_REQUIRED">;
2766
+ USER_BANNED: import("better-auth").RawError<"USER_BANNED">;
2767
+ UNAUTHORIZED_SESSION: import("better-auth").RawError<"UNAUTHORIZED_SESSION">;
2768
+ KEY_NOT_FOUND: import("better-auth").RawError<"KEY_NOT_FOUND">;
2769
+ KEY_DISABLED: import("better-auth").RawError<"KEY_DISABLED">;
2770
+ KEY_EXPIRED: import("better-auth").RawError<"KEY_EXPIRED">;
2771
+ USAGE_EXCEEDED: import("better-auth").RawError<"USAGE_EXCEEDED">;
2772
+ KEY_NOT_RECOVERABLE: import("better-auth").RawError<"KEY_NOT_RECOVERABLE">;
2773
+ EXPIRES_IN_IS_TOO_SMALL: import("better-auth").RawError<"EXPIRES_IN_IS_TOO_SMALL">;
2774
+ EXPIRES_IN_IS_TOO_LARGE: import("better-auth").RawError<"EXPIRES_IN_IS_TOO_LARGE">;
2775
+ INVALID_REMAINING: import("better-auth").RawError<"INVALID_REMAINING">;
2776
+ INVALID_PREFIX_LENGTH: import("better-auth").RawError<"INVALID_PREFIX_LENGTH">;
2777
+ INVALID_NAME_LENGTH: import("better-auth").RawError<"INVALID_NAME_LENGTH">;
2778
+ METADATA_DISABLED: import("better-auth").RawError<"METADATA_DISABLED">;
2779
+ RATE_LIMIT_EXCEEDED: import("better-auth").RawError<"RATE_LIMIT_EXCEEDED">;
2780
+ NO_VALUES_TO_UPDATE: import("better-auth").RawError<"NO_VALUES_TO_UPDATE">;
2781
+ KEY_DISABLED_EXPIRATION: import("better-auth").RawError<"KEY_DISABLED_EXPIRATION">;
2782
+ INVALID_API_KEY: import("better-auth").RawError<"INVALID_API_KEY">;
2783
+ INVALID_USER_ID_FROM_API_KEY: import("better-auth").RawError<"INVALID_USER_ID_FROM_API_KEY">;
2784
+ INVALID_REFERENCE_ID_FROM_API_KEY: import("better-auth").RawError<"INVALID_REFERENCE_ID_FROM_API_KEY">;
2785
+ INVALID_API_KEY_GETTER_RETURN_TYPE: import("better-auth").RawError<"INVALID_API_KEY_GETTER_RETURN_TYPE">;
2786
+ SERVER_ONLY_PROPERTY: import("better-auth").RawError<"SERVER_ONLY_PROPERTY">;
2787
+ FAILED_TO_UPDATE_API_KEY: import("better-auth").RawError<"FAILED_TO_UPDATE_API_KEY">;
2788
+ NAME_REQUIRED: import("better-auth").RawError<"NAME_REQUIRED">;
2789
+ ORGANIZATION_ID_REQUIRED: import("better-auth").RawError<"ORGANIZATION_ID_REQUIRED">;
2790
+ USER_NOT_MEMBER_OF_ORGANIZATION: import("better-auth").RawError<"USER_NOT_MEMBER_OF_ORGANIZATION">;
2791
+ INSUFFICIENT_API_KEY_PERMISSIONS: import("better-auth").RawError<"INSUFFICIENT_API_KEY_PERMISSIONS">;
2792
+ NO_DEFAULT_API_KEY_CONFIGURATION_FOUND: import("better-auth").RawError<"NO_DEFAULT_API_KEY_CONFIGURATION_FOUND">;
2793
+ ORGANIZATION_PLUGIN_REQUIRED: import("better-auth").RawError<"ORGANIZATION_PLUGIN_REQUIRED">;
2794
+ } & {
2795
+ CHALLENGE_NOT_FOUND: import("better-auth").RawError<"CHALLENGE_NOT_FOUND">;
2796
+ YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY">;
2797
+ FAILED_TO_VERIFY_REGISTRATION: import("better-auth").RawError<"FAILED_TO_VERIFY_REGISTRATION">;
2798
+ PASSKEY_NOT_FOUND: import("better-auth").RawError<"PASSKEY_NOT_FOUND">;
2799
+ AUTHENTICATION_FAILED: import("better-auth").RawError<"AUTHENTICATION_FAILED">;
2800
+ UNABLE_TO_CREATE_SESSION: import("better-auth").RawError<"UNABLE_TO_CREATE_SESSION">;
2801
+ FAILED_TO_UPDATE_PASSKEY: import("better-auth").RawError<"FAILED_TO_UPDATE_PASSKEY">;
2802
+ } & {
2803
+ USER_NOT_FOUND: import("better-auth").RawError<"USER_NOT_FOUND">;
2804
+ FAILED_TO_CREATE_USER: import("better-auth").RawError<"FAILED_TO_CREATE_USER">;
2805
+ FAILED_TO_CREATE_SESSION: import("better-auth").RawError<"FAILED_TO_CREATE_SESSION">;
2806
+ FAILED_TO_UPDATE_USER: import("better-auth").RawError<"FAILED_TO_UPDATE_USER">;
2807
+ FAILED_TO_GET_SESSION: import("better-auth").RawError<"FAILED_TO_GET_SESSION">;
2808
+ INVALID_PASSWORD: import("better-auth").RawError<"INVALID_PASSWORD">;
2809
+ INVALID_EMAIL: import("better-auth").RawError<"INVALID_EMAIL">;
2810
+ INVALID_EMAIL_OR_PASSWORD: import("better-auth").RawError<"INVALID_EMAIL_OR_PASSWORD">;
2811
+ INVALID_USER: import("better-auth").RawError<"INVALID_USER">;
2812
+ SOCIAL_ACCOUNT_ALREADY_LINKED: import("better-auth").RawError<"SOCIAL_ACCOUNT_ALREADY_LINKED">;
2813
+ PROVIDER_NOT_FOUND: import("better-auth").RawError<"PROVIDER_NOT_FOUND">;
2814
+ INVALID_TOKEN: import("better-auth").RawError<"INVALID_TOKEN">;
2815
+ TOKEN_EXPIRED: import("better-auth").RawError<"TOKEN_EXPIRED">;
2816
+ ID_TOKEN_NOT_SUPPORTED: import("better-auth").RawError<"ID_TOKEN_NOT_SUPPORTED">;
2817
+ FAILED_TO_GET_USER_INFO: import("better-auth").RawError<"FAILED_TO_GET_USER_INFO">;
2818
+ USER_EMAIL_NOT_FOUND: import("better-auth").RawError<"USER_EMAIL_NOT_FOUND">;
2819
+ EMAIL_NOT_VERIFIED: import("better-auth").RawError<"EMAIL_NOT_VERIFIED">;
2820
+ PASSWORD_TOO_SHORT: import("better-auth").RawError<"PASSWORD_TOO_SHORT">;
2821
+ PASSWORD_TOO_LONG: import("better-auth").RawError<"PASSWORD_TOO_LONG">;
2822
+ USER_ALREADY_EXISTS: import("better-auth").RawError<"USER_ALREADY_EXISTS">;
2823
+ USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: import("better-auth").RawError<"USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL">;
2824
+ EMAIL_CAN_NOT_BE_UPDATED: import("better-auth").RawError<"EMAIL_CAN_NOT_BE_UPDATED">;
2825
+ CREDENTIAL_ACCOUNT_NOT_FOUND: import("better-auth").RawError<"CREDENTIAL_ACCOUNT_NOT_FOUND">;
2826
+ ACCOUNT_NOT_FOUND: import("better-auth").RawError<"ACCOUNT_NOT_FOUND">;
2827
+ SESSION_EXPIRED: import("better-auth").RawError<"SESSION_EXPIRED">;
2828
+ FAILED_TO_UNLINK_LAST_ACCOUNT: import("better-auth").RawError<"FAILED_TO_UNLINK_LAST_ACCOUNT">;
2829
+ USER_ALREADY_HAS_PASSWORD: import("better-auth").RawError<"USER_ALREADY_HAS_PASSWORD">;
2830
+ CROSS_SITE_NAVIGATION_LOGIN_BLOCKED: import("better-auth").RawError<"CROSS_SITE_NAVIGATION_LOGIN_BLOCKED">;
2831
+ VERIFICATION_EMAIL_NOT_ENABLED: import("better-auth").RawError<"VERIFICATION_EMAIL_NOT_ENABLED">;
2832
+ EMAIL_ALREADY_VERIFIED: import("better-auth").RawError<"EMAIL_ALREADY_VERIFIED">;
2833
+ EMAIL_MISMATCH: import("better-auth").RawError<"EMAIL_MISMATCH">;
2834
+ SESSION_NOT_FRESH: import("better-auth").RawError<"SESSION_NOT_FRESH">;
2835
+ LINKED_ACCOUNT_ALREADY_EXISTS: import("better-auth").RawError<"LINKED_ACCOUNT_ALREADY_EXISTS">;
2836
+ INVALID_ORIGIN: import("better-auth").RawError<"INVALID_ORIGIN">;
2837
+ INVALID_CALLBACK_URL: import("better-auth").RawError<"INVALID_CALLBACK_URL">;
2838
+ INVALID_REDIRECT_URL: import("better-auth").RawError<"INVALID_REDIRECT_URL">;
2839
+ INVALID_ERROR_CALLBACK_URL: import("better-auth").RawError<"INVALID_ERROR_CALLBACK_URL">;
2840
+ INVALID_NEW_USER_CALLBACK_URL: import("better-auth").RawError<"INVALID_NEW_USER_CALLBACK_URL">;
2841
+ MISSING_OR_NULL_ORIGIN: import("better-auth").RawError<"MISSING_OR_NULL_ORIGIN">;
2842
+ CALLBACK_URL_REQUIRED: import("better-auth").RawError<"CALLBACK_URL_REQUIRED">;
2843
+ FAILED_TO_CREATE_VERIFICATION: import("better-auth").RawError<"FAILED_TO_CREATE_VERIFICATION">;
2844
+ FIELD_NOT_ALLOWED: import("better-auth").RawError<"FIELD_NOT_ALLOWED">;
2845
+ ASYNC_VALIDATION_NOT_SUPPORTED: import("better-auth").RawError<"ASYNC_VALIDATION_NOT_SUPPORTED">;
2846
+ VALIDATION_ERROR: import("better-auth").RawError<"VALIDATION_ERROR">;
2847
+ MISSING_FIELD: import("better-auth").RawError<"MISSING_FIELD">;
2848
+ METHOD_NOT_ALLOWED_DEFER_SESSION_REQUIRED: import("better-auth").RawError<"METHOD_NOT_ALLOWED_DEFER_SESSION_REQUIRED">;
2849
+ BODY_MUST_BE_AN_OBJECT: import("better-auth").RawError<"BODY_MUST_BE_AN_OBJECT">;
2850
+ PASSWORD_ALREADY_SET: import("better-auth").RawError<"PASSWORD_ALREADY_SET">;
3656
2851
  };
3657
2852
  };
3658
2853
  export type PayloadAuthClient = ReturnType<typeof createPayloadAuthClient>;