@robelest/convex-auth 0.0.4-preview.32 → 0.0.4-preview.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/component/convex.config.d.ts +2 -2
- package/dist/component/model.d.ts +317 -28
- package/dist/component/schema.d.ts +290 -290
- package/dist/core/index.d.ts +2 -1
- package/dist/model.js +373 -0
- package/dist/server/auth.d.ts +71 -6
- package/dist/server/auth.js +2 -0
- package/dist/server/index.d.ts +5 -3
- package/dist/server/index.js +3 -1
- package/dist/server/mounts.d.ts +79 -79
- package/dist/server/runtime.d.ts +12 -12
- package/dist/server/types.d.ts +1 -1
- package/dist/server/validators.d.ts +722 -0
- package/dist/server/validators.js +59 -0
- package/package.json +1 -1
package/dist/server/runtime.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { AuthProfile, SignInParams } from "./payloads.js";
|
|
|
4
4
|
import { HttpAuthContext, HttpAuthContextConfig, OptionalHttpAuthContext } from "./http.js";
|
|
5
5
|
import { createGroupConnectionDomain } from "./sso/domain.js";
|
|
6
6
|
import { GenericId } from "convex/values";
|
|
7
|
-
import * as
|
|
7
|
+
import * as convex_server110 from "convex/server";
|
|
8
8
|
import { GenericActionCtx, GenericDataModel, HttpRouter } from "convex/server";
|
|
9
9
|
|
|
10
10
|
//#region src/server/runtime.d.ts
|
|
@@ -47,7 +47,7 @@ declare function Auth(config_: ConvexAuthConfig): {
|
|
|
47
47
|
order?: "asc" | "desc";
|
|
48
48
|
}) => Promise<any>;
|
|
49
49
|
viewer: (ctx: ComponentReadCtx & {
|
|
50
|
-
auth:
|
|
50
|
+
auth: convex_server110.Auth;
|
|
51
51
|
}) => Promise<Doc<"User"> | null>;
|
|
52
52
|
update: (ctx: ComponentCtx, userId: string, data: Record<string, unknown>) => Promise<{
|
|
53
53
|
userId: string;
|
|
@@ -476,22 +476,22 @@ declare function Auth(config_: ConvexAuthConfig): {
|
|
|
476
476
|
context: {
|
|
477
477
|
<TResolve extends Record<string, unknown> = Record<string, never>, TCtx extends {
|
|
478
478
|
auth: {
|
|
479
|
-
getUserIdentity: () => Promise<
|
|
479
|
+
getUserIdentity: () => Promise<convex_server110.UserIdentity | null>;
|
|
480
480
|
};
|
|
481
481
|
} & ComponentReadCtx = {
|
|
482
482
|
auth: {
|
|
483
|
-
getUserIdentity: () => Promise<
|
|
483
|
+
getUserIdentity: () => Promise<convex_server110.UserIdentity | null>;
|
|
484
484
|
};
|
|
485
485
|
} & ComponentReadCtx>(ctx: TCtx, request: Request, config: HttpAuthContextConfig<TResolve, TCtx> & {
|
|
486
486
|
optional: true;
|
|
487
487
|
}): Promise<OptionalHttpAuthContext & TResolve>;
|
|
488
488
|
<TResolve extends Record<string, unknown> = Record<string, never>, TCtx extends {
|
|
489
489
|
auth: {
|
|
490
|
-
getUserIdentity: () => Promise<
|
|
490
|
+
getUserIdentity: () => Promise<convex_server110.UserIdentity | null>;
|
|
491
491
|
};
|
|
492
492
|
} & ComponentReadCtx = {
|
|
493
493
|
auth: {
|
|
494
|
-
getUserIdentity: () => Promise<
|
|
494
|
+
getUserIdentity: () => Promise<convex_server110.UserIdentity | null>;
|
|
495
495
|
};
|
|
496
496
|
} & ComponentReadCtx>(ctx: TCtx, request: Request, config?: HttpAuthContextConfig<TResolve, TCtx>): Promise<HttpAuthContext & TResolve>;
|
|
497
497
|
};
|
|
@@ -525,7 +525,7 @@ declare function Auth(config_: ConvexAuthConfig): {
|
|
|
525
525
|
action: string;
|
|
526
526
|
};
|
|
527
527
|
cors?: CorsConfig;
|
|
528
|
-
}) =>
|
|
528
|
+
}) => convex_server110.PublicHttpAction;
|
|
529
529
|
/**
|
|
530
530
|
* Register a Bearer-authenticated route **and** its OPTIONS preflight
|
|
531
531
|
* in a single call.
|
|
@@ -571,7 +571,7 @@ declare function Auth(config_: ConvexAuthConfig): {
|
|
|
571
571
|
*
|
|
572
572
|
* Also used for refreshing the session.
|
|
573
573
|
*/
|
|
574
|
-
signIn:
|
|
574
|
+
signIn: convex_server110.RegisteredAction<"public", {
|
|
575
575
|
provider?: string | undefined;
|
|
576
576
|
verifier?: string | undefined;
|
|
577
577
|
params?: Record<string, string | number | boolean | (string | number | boolean | null)[] | Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | null> | undefined;
|
|
@@ -581,12 +581,12 @@ declare function Auth(config_: ConvexAuthConfig): {
|
|
|
581
581
|
/**
|
|
582
582
|
* Action called by the client to invalidate the current session.
|
|
583
583
|
*/
|
|
584
|
-
signOut:
|
|
584
|
+
signOut: convex_server110.RegisteredAction<"public", {}, Promise<void>>;
|
|
585
585
|
/**
|
|
586
586
|
* Internal mutation used by the library to read and write
|
|
587
587
|
* to the database during signin and signout.
|
|
588
588
|
*/
|
|
589
|
-
store:
|
|
589
|
+
store: convex_server110.RegisteredMutation<"internal", {
|
|
590
590
|
args: {
|
|
591
591
|
sessionId?: string | undefined;
|
|
592
592
|
type: "signIn";
|
|
@@ -629,11 +629,11 @@ declare function Auth(config_: ConvexAuthConfig): {
|
|
|
629
629
|
sessionIndex?: string | undefined;
|
|
630
630
|
} | undefined;
|
|
631
631
|
} | undefined;
|
|
632
|
-
profile: Record<string, string | number | boolean | (string | number | boolean | null)[] | Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | null>;
|
|
633
632
|
type: "userOAuth";
|
|
634
633
|
provider: string;
|
|
635
634
|
providerAccountId: string;
|
|
636
635
|
signature: string;
|
|
636
|
+
profile: Record<string, string | number | boolean | (string | number | boolean | null)[] | Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | null>;
|
|
637
637
|
} | {
|
|
638
638
|
email?: string | undefined;
|
|
639
639
|
phone?: string | undefined;
|
|
@@ -646,9 +646,9 @@ declare function Auth(config_: ConvexAuthConfig): {
|
|
|
646
646
|
} | {
|
|
647
647
|
shouldLinkViaEmail?: boolean | undefined;
|
|
648
648
|
shouldLinkViaPhone?: boolean | undefined;
|
|
649
|
-
profile: Record<string, string | number | boolean | (string | number | boolean | null)[] | Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | null>;
|
|
650
649
|
type: "createAccountFromCredentials";
|
|
651
650
|
provider: string;
|
|
651
|
+
profile: Record<string, string | number | boolean | (string | number | boolean | null)[] | Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | null>;
|
|
652
652
|
account: {
|
|
653
653
|
secret?: string | undefined;
|
|
654
654
|
id: string;
|
package/dist/server/types.d.ts
CHANGED
|
@@ -1286,5 +1286,5 @@ type SessionTokenIdentityClaims = {
|
|
|
1286
1286
|
};
|
|
1287
1287
|
type KeyDoc = Infer<typeof vApiKeyDoc>;
|
|
1288
1288
|
//#endregion
|
|
1289
|
-
export { AfterCtx, AuthAuthorizationConfig, AuthCallbackContext, AuthCallbackProfile, AuthCallbacks, AuthEvent, AuthGrant, AuthProviderConfig, AuthRoleId, BeforeCtx, BeforeEvent, BeforeResult, ConvexAuthConfig, ConvexAuthMaterializedConfig, ConvexCredentialsConfig, CorsConfig, DeviceProviderConfig, Doc, EmailConfig, EmailUserConfig, GenericActionCtxWithAuthConfig, GenericDoc, GroupConnectionPolicy, GroupConnectionPolicyPatch, HasDeviceProvider, HasPasskeyProvider, HasSSO, HasTotpProvider, HttpKeyContext, KeyDoc, KeyScope, OAuthMaterializedConfig, OAuthProfile, OAuthTokens, OIDCClaimMapping, PasskeyProviderConfig, PhoneConfig, PhoneUserConfig, SSOProviderConfig, ScopeChecker, SessionTokenIdentityClaims, TotpProviderConfig, UserOrderBy, UserWhere };
|
|
1289
|
+
export { AfterCtx, AuthAuthorizationConfig, AuthCallbackContext, AuthCallbackProfile, AuthCallbacks, AuthDataModel, AuthEvent, AuthGrant, AuthProviderConfig, AuthRoleId, BeforeCtx, BeforeEvent, BeforeResult, ConvexAuthConfig, ConvexAuthMaterializedConfig, ConvexCredentialsConfig, CorsConfig, DeviceProviderConfig, Doc, EmailConfig, EmailUserConfig, GenericActionCtxWithAuthConfig, GenericDoc, GroupConnectionPolicy, GroupConnectionPolicyPatch, HasDeviceProvider, HasPasskeyProvider, HasSSO, HasTotpProvider, HttpKeyContext, KeyDoc, KeyScope, OAuthMaterializedConfig, OAuthProfile, OAuthTokens, OIDCClaimMapping, PasskeyProviderConfig, PhoneConfig, PhoneUserConfig, SSOProviderConfig, ScopeChecker, SessionTokenIdentityClaims, TotpProviderConfig, UserOrderBy, UserWhere };
|
|
1290
1290
|
//# sourceMappingURL=types.d.ts.map
|