@logto/schemas 1.39.0 → 1.40.0

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.
Files changed (70) hide show
  1. package/alterations/1.40.0-1776516232-add-account-center-profile-fields.ts +20 -0
  2. package/alterations/1.40.0-1778318116-add-custom-ui-csp-to-sie.ts +20 -0
  3. package/alterations/1.40.0-1778500000-add-organization-user-relations-user-id-index.ts +41 -0
  4. package/alterations/1.40.0-1778500001-add-organization-role-user-relations-org-user-index.ts +43 -0
  5. package/alterations/1.40.0-1779421396-add-application-access-control-schema.ts +90 -0
  6. package/alterations-js/1.40.0-1776516232-add-account-center-profile-fields.js +16 -0
  7. package/alterations-js/1.40.0-1778318116-add-custom-ui-csp-to-sie.js +16 -0
  8. package/alterations-js/1.40.0-1778500000-add-organization-user-relations-user-id-index.js +37 -0
  9. package/alterations-js/1.40.0-1778500001-add-organization-role-user-relations-org-user-index.js +39 -0
  10. package/alterations-js/1.40.0-1779421396-add-application-access-control-schema.js +82 -0
  11. package/lib/consts/application.d.ts +1 -0
  12. package/lib/consts/application.js +1 -0
  13. package/lib/consts/index.d.ts +1 -0
  14. package/lib/consts/index.js +1 -0
  15. package/lib/db-entries/account-center.d.ts +6 -2
  16. package/lib/db-entries/account-center.js +5 -1
  17. package/lib/db-entries/application-access-control-org-role-relation.d.ts +22 -0
  18. package/lib/db-entries/application-access-control-org-role-relation.js +33 -0
  19. package/lib/db-entries/application-access-control-organization-relation.d.ts +20 -0
  20. package/lib/db-entries/application-access-control-organization-relation.js +29 -0
  21. package/lib/db-entries/application-access-control-user-relation.d.ts +20 -0
  22. package/lib/db-entries/application-access-control-user-relation.js +29 -0
  23. package/lib/db-entries/application-access-control-user-role-relation.d.ts +20 -0
  24. package/lib/db-entries/application-access-control-user-role-relation.js +29 -0
  25. package/lib/db-entries/application.d.ts +3 -1
  26. package/lib/db-entries/application.js +4 -0
  27. package/lib/db-entries/index.d.ts +4 -0
  28. package/lib/db-entries/index.js +4 -0
  29. package/lib/db-entries/sign-in-experience.d.ts +4 -2
  30. package/lib/db-entries/sign-in-experience.js +5 -1
  31. package/lib/foundations/jsonb-types/account-centers.d.ts +26 -0
  32. package/lib/foundations/jsonb-types/account-centers.js +4 -0
  33. package/lib/foundations/jsonb-types/applications.d.ts +3 -0
  34. package/lib/foundations/jsonb-types/applications.js +4 -0
  35. package/lib/foundations/jsonb-types/applications.test.d.ts +1 -0
  36. package/lib/foundations/jsonb-types/applications.test.js +23 -0
  37. package/lib/foundations/jsonb-types/sign-in-experience.d.ts +1 -1
  38. package/lib/foundations/jsonb-types/sign-in-experience.js +1 -0
  39. package/lib/foundations/jsonb-types/sign-in-experience.test.d.ts +1 -0
  40. package/lib/foundations/jsonb-types/sign-in-experience.test.js +18 -0
  41. package/lib/seeds/application.js +2 -0
  42. package/lib/seeds/sign-in-experience.d.ts +13 -1
  43. package/lib/seeds/sign-in-experience.js +10 -1
  44. package/lib/seeds/sign-in-experience.test.d.ts +1 -0
  45. package/lib/seeds/sign-in-experience.test.js +27 -0
  46. package/lib/types/application.d.ts +99 -0
  47. package/lib/types/application.js +55 -0
  48. package/lib/types/application.test.d.ts +1 -0
  49. package/lib/types/application.test.js +120 -0
  50. package/lib/types/consent.d.ts +6 -0
  51. package/lib/types/logto-config/index.d.ts +38 -0
  52. package/lib/types/logto-config/jwt-customizer.d.ts +65 -0
  53. package/lib/types/saml-application.d.ts +3 -0
  54. package/lib/types/sign-in-experience.d.ts +14 -0
  55. package/lib/types/sign-in-experience.js +1 -0
  56. package/lib/types/system.d.ts +46 -7
  57. package/lib/types/system.js +9 -0
  58. package/lib/types/user-assets.d.ts +1 -1
  59. package/lib/types/user-sessions.d.ts +2516 -0
  60. package/lib/types/user-sessions.js +21 -0
  61. package/package.json +4 -4
  62. package/tables/account_centers.sql +2 -0
  63. package/tables/application_access_control_org_role_relations.sql +16 -0
  64. package/tables/application_access_control_organization_relations.sql +12 -0
  65. package/tables/application_access_control_user_relations.sql +12 -0
  66. package/tables/application_access_control_user_role_relations.sql +14 -0
  67. package/tables/applications.sql +1 -0
  68. package/tables/organization_role_user_relations.sql +3 -0
  69. package/tables/organization_user_relations.sql +3 -0
  70. package/tables/sign_in_experiences.sql +1 -0
@@ -3627,6 +3627,2522 @@ export declare const getUserSessionResponseGuard: z.ZodObject<{
3627
3627
  }>;
3628
3628
  /** Response type for `GET /users/:userId/sessions/:sessionId`. */
3629
3629
  export type GetUserSessionResponse = z.infer<typeof getUserSessionResponseGuard>;
3630
+ /**
3631
+ * Account-API-specific extension of `userExtendedSessionGuard`.
3632
+ *
3633
+ * Adds `isCurrent` so a caller that has its own OIDC session uid (i.e. the Account API)
3634
+ * can mark which entry in the list is the session backing the request. Kept separate
3635
+ * from `userExtendedSessionGuard` because the management/admin endpoints have no
3636
+ * "current session" concept and shouldn't surface this field in their contracts.
3637
+ */
3638
+ export declare const accountUserExtendedSessionGuard: z.ZodObject<{
3639
+ payload: z.ZodObject<{
3640
+ exp: z.ZodNumber;
3641
+ iat: z.ZodNumber;
3642
+ jti: z.ZodString;
3643
+ uid: z.ZodString;
3644
+ kind: z.ZodLiteral<"Session">;
3645
+ loginTs: z.ZodNumber;
3646
+ accountId: z.ZodString;
3647
+ authorizations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
3648
+ sid: z.ZodOptional<z.ZodString>;
3649
+ grantId: z.ZodOptional<z.ZodString>;
3650
+ persistsLogout: z.ZodOptional<z.ZodBoolean>;
3651
+ }, "strip", z.ZodUnknown, z.objectOutputType<{
3652
+ sid: z.ZodOptional<z.ZodString>;
3653
+ grantId: z.ZodOptional<z.ZodString>;
3654
+ persistsLogout: z.ZodOptional<z.ZodBoolean>;
3655
+ }, z.ZodUnknown, "strip">, z.objectInputType<{
3656
+ sid: z.ZodOptional<z.ZodString>;
3657
+ grantId: z.ZodOptional<z.ZodString>;
3658
+ persistsLogout: z.ZodOptional<z.ZodBoolean>;
3659
+ }, z.ZodUnknown, "strip">>>>;
3660
+ }, "strip", z.ZodUnknown, z.objectOutputType<{
3661
+ exp: z.ZodNumber;
3662
+ iat: z.ZodNumber;
3663
+ jti: z.ZodString;
3664
+ uid: z.ZodString;
3665
+ kind: z.ZodLiteral<"Session">;
3666
+ loginTs: z.ZodNumber;
3667
+ accountId: z.ZodString;
3668
+ authorizations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
3669
+ sid: z.ZodOptional<z.ZodString>;
3670
+ grantId: z.ZodOptional<z.ZodString>;
3671
+ persistsLogout: z.ZodOptional<z.ZodBoolean>;
3672
+ }, "strip", z.ZodUnknown, z.objectOutputType<{
3673
+ sid: z.ZodOptional<z.ZodString>;
3674
+ grantId: z.ZodOptional<z.ZodString>;
3675
+ persistsLogout: z.ZodOptional<z.ZodBoolean>;
3676
+ }, z.ZodUnknown, "strip">, z.objectInputType<{
3677
+ sid: z.ZodOptional<z.ZodString>;
3678
+ grantId: z.ZodOptional<z.ZodString>;
3679
+ persistsLogout: z.ZodOptional<z.ZodBoolean>;
3680
+ }, z.ZodUnknown, "strip">>>>;
3681
+ }, z.ZodUnknown, "strip">, z.objectInputType<{
3682
+ exp: z.ZodNumber;
3683
+ iat: z.ZodNumber;
3684
+ jti: z.ZodString;
3685
+ uid: z.ZodString;
3686
+ kind: z.ZodLiteral<"Session">;
3687
+ loginTs: z.ZodNumber;
3688
+ accountId: z.ZodString;
3689
+ authorizations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
3690
+ sid: z.ZodOptional<z.ZodString>;
3691
+ grantId: z.ZodOptional<z.ZodString>;
3692
+ persistsLogout: z.ZodOptional<z.ZodBoolean>;
3693
+ }, "strip", z.ZodUnknown, z.objectOutputType<{
3694
+ sid: z.ZodOptional<z.ZodString>;
3695
+ grantId: z.ZodOptional<z.ZodString>;
3696
+ persistsLogout: z.ZodOptional<z.ZodBoolean>;
3697
+ }, z.ZodUnknown, "strip">, z.objectInputType<{
3698
+ sid: z.ZodOptional<z.ZodString>;
3699
+ grantId: z.ZodOptional<z.ZodString>;
3700
+ persistsLogout: z.ZodOptional<z.ZodBoolean>;
3701
+ }, z.ZodUnknown, "strip">>>>;
3702
+ }, z.ZodUnknown, "strip">>;
3703
+ lastSubmission: z.ZodNullable<z.ZodObject<{
3704
+ interactionEvent: z.ZodNativeEnum<typeof import("./interactions.js").InteractionEvent>;
3705
+ userId: z.ZodString;
3706
+ verificationRecords: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3707
+ id: z.ZodString;
3708
+ type: z.ZodLiteral<import("./index.js").VerificationType.Password>;
3709
+ identifier: z.ZodObject<{
3710
+ type: z.ZodUnion<[z.ZodNativeEnum<typeof import("../foundations/index.js").SignInIdentifier>, z.ZodNativeEnum<typeof import("../foundations/index.js").AdditionalIdentifier>]>;
3711
+ value: z.ZodString;
3712
+ }, "strip", z.ZodTypeAny, {
3713
+ value: string;
3714
+ type: import("../foundations/index.js").SignInIdentifier | import("../foundations/index.js").AdditionalIdentifier;
3715
+ }, {
3716
+ value: string;
3717
+ type: import("../foundations/index.js").SignInIdentifier | import("../foundations/index.js").AdditionalIdentifier;
3718
+ }>;
3719
+ verified: z.ZodBoolean;
3720
+ }, "strip", z.ZodTypeAny, {
3721
+ type: import("./index.js").VerificationType.Password;
3722
+ id: string;
3723
+ identifier: {
3724
+ value: string;
3725
+ type: import("../foundations/index.js").SignInIdentifier | import("../foundations/index.js").AdditionalIdentifier;
3726
+ };
3727
+ verified: boolean;
3728
+ }, {
3729
+ type: import("./index.js").VerificationType.Password;
3730
+ id: string;
3731
+ identifier: {
3732
+ value: string;
3733
+ type: import("../foundations/index.js").SignInIdentifier | import("../foundations/index.js").AdditionalIdentifier;
3734
+ };
3735
+ verified: boolean;
3736
+ }>, z.ZodObject<{
3737
+ id: z.ZodString;
3738
+ templateType: z.ZodNativeEnum<typeof import("../foundations/index.js").TemplateType>;
3739
+ verified: z.ZodBoolean;
3740
+ } & {
3741
+ type: z.ZodLiteral<import("./index.js").VerificationType.EmailVerificationCode>;
3742
+ identifier: z.ZodObject<{
3743
+ type: z.ZodLiteral<import("../foundations/index.js").SignInIdentifier.Email>;
3744
+ value: z.ZodString;
3745
+ }, "strip", z.ZodTypeAny, {
3746
+ value: string;
3747
+ type: import("../foundations/index.js").SignInIdentifier.Email;
3748
+ }, {
3749
+ value: string;
3750
+ type: import("../foundations/index.js").SignInIdentifier.Email;
3751
+ }>;
3752
+ }, "strip", z.ZodTypeAny, {
3753
+ type: import("./index.js").VerificationType.EmailVerificationCode;
3754
+ id: string;
3755
+ identifier: {
3756
+ value: string;
3757
+ type: import("../foundations/index.js").SignInIdentifier.Email;
3758
+ };
3759
+ templateType: import("../foundations/index.js").TemplateType;
3760
+ verified: boolean;
3761
+ }, {
3762
+ type: import("./index.js").VerificationType.EmailVerificationCode;
3763
+ id: string;
3764
+ identifier: {
3765
+ value: string;
3766
+ type: import("../foundations/index.js").SignInIdentifier.Email;
3767
+ };
3768
+ templateType: import("../foundations/index.js").TemplateType;
3769
+ verified: boolean;
3770
+ }>, z.ZodObject<{
3771
+ id: z.ZodString;
3772
+ templateType: z.ZodNativeEnum<typeof import("../foundations/index.js").TemplateType>;
3773
+ verified: z.ZodBoolean;
3774
+ } & {
3775
+ type: z.ZodLiteral<import("./index.js").VerificationType.PhoneVerificationCode>;
3776
+ identifier: z.ZodObject<{
3777
+ type: z.ZodLiteral<import("../foundations/index.js").SignInIdentifier.Phone>;
3778
+ value: z.ZodString;
3779
+ }, "strip", z.ZodTypeAny, {
3780
+ value: string;
3781
+ type: import("../foundations/index.js").SignInIdentifier.Phone;
3782
+ }, {
3783
+ value: string;
3784
+ type: import("../foundations/index.js").SignInIdentifier.Phone;
3785
+ }>;
3786
+ }, "strip", z.ZodTypeAny, {
3787
+ type: import("./index.js").VerificationType.PhoneVerificationCode;
3788
+ id: string;
3789
+ identifier: {
3790
+ value: string;
3791
+ type: import("../foundations/index.js").SignInIdentifier.Phone;
3792
+ };
3793
+ templateType: import("../foundations/index.js").TemplateType;
3794
+ verified: boolean;
3795
+ }, {
3796
+ type: import("./index.js").VerificationType.PhoneVerificationCode;
3797
+ id: string;
3798
+ identifier: {
3799
+ value: string;
3800
+ type: import("../foundations/index.js").SignInIdentifier.Phone;
3801
+ };
3802
+ templateType: import("../foundations/index.js").TemplateType;
3803
+ verified: boolean;
3804
+ }>, z.ZodObject<{
3805
+ id: z.ZodString;
3806
+ templateType: z.ZodNativeEnum<typeof import("../foundations/index.js").TemplateType>;
3807
+ verified: z.ZodBoolean;
3808
+ } & {
3809
+ type: z.ZodLiteral<import("./index.js").VerificationType.MfaEmailVerificationCode>;
3810
+ identifier: z.ZodObject<{
3811
+ type: z.ZodLiteral<import("../foundations/index.js").SignInIdentifier.Email>;
3812
+ value: z.ZodString;
3813
+ }, "strip", z.ZodTypeAny, {
3814
+ value: string;
3815
+ type: import("../foundations/index.js").SignInIdentifier.Email;
3816
+ }, {
3817
+ value: string;
3818
+ type: import("../foundations/index.js").SignInIdentifier.Email;
3819
+ }>;
3820
+ }, "strip", z.ZodTypeAny, {
3821
+ type: import("./index.js").VerificationType.MfaEmailVerificationCode;
3822
+ id: string;
3823
+ identifier: {
3824
+ value: string;
3825
+ type: import("../foundations/index.js").SignInIdentifier.Email;
3826
+ };
3827
+ templateType: import("../foundations/index.js").TemplateType;
3828
+ verified: boolean;
3829
+ }, {
3830
+ type: import("./index.js").VerificationType.MfaEmailVerificationCode;
3831
+ id: string;
3832
+ identifier: {
3833
+ value: string;
3834
+ type: import("../foundations/index.js").SignInIdentifier.Email;
3835
+ };
3836
+ templateType: import("../foundations/index.js").TemplateType;
3837
+ verified: boolean;
3838
+ }>, z.ZodObject<{
3839
+ id: z.ZodString;
3840
+ templateType: z.ZodNativeEnum<typeof import("../foundations/index.js").TemplateType>;
3841
+ verified: z.ZodBoolean;
3842
+ } & {
3843
+ type: z.ZodLiteral<import("./index.js").VerificationType.MfaPhoneVerificationCode>;
3844
+ identifier: z.ZodObject<{
3845
+ type: z.ZodLiteral<import("../foundations/index.js").SignInIdentifier.Phone>;
3846
+ value: z.ZodString;
3847
+ }, "strip", z.ZodTypeAny, {
3848
+ value: string;
3849
+ type: import("../foundations/index.js").SignInIdentifier.Phone;
3850
+ }, {
3851
+ value: string;
3852
+ type: import("../foundations/index.js").SignInIdentifier.Phone;
3853
+ }>;
3854
+ }, "strip", z.ZodTypeAny, {
3855
+ type: import("./index.js").VerificationType.MfaPhoneVerificationCode;
3856
+ id: string;
3857
+ identifier: {
3858
+ value: string;
3859
+ type: import("../foundations/index.js").SignInIdentifier.Phone;
3860
+ };
3861
+ templateType: import("../foundations/index.js").TemplateType;
3862
+ verified: boolean;
3863
+ }, {
3864
+ type: import("./index.js").VerificationType.MfaPhoneVerificationCode;
3865
+ id: string;
3866
+ identifier: {
3867
+ value: string;
3868
+ type: import("../foundations/index.js").SignInIdentifier.Phone;
3869
+ };
3870
+ templateType: import("../foundations/index.js").TemplateType;
3871
+ verified: boolean;
3872
+ }>, z.ZodObject<Omit<{
3873
+ id: z.ZodString;
3874
+ connectorId: z.ZodString;
3875
+ type: z.ZodLiteral<import("./index.js").VerificationType.Social>;
3876
+ socialUserInfo: z.ZodOptional<z.ZodObject<{
3877
+ id: z.ZodString;
3878
+ email: z.ZodOptional<z.ZodString>;
3879
+ phone: z.ZodOptional<z.ZodString>;
3880
+ name: z.ZodOptional<z.ZodString>;
3881
+ avatar: z.ZodOptional<z.ZodString>;
3882
+ rawData: z.ZodOptional<z.ZodType<import("@withtyped/server/lib/types.js").Json, z.ZodTypeDef, import("@withtyped/server/lib/types.js").Json>>;
3883
+ }, "strip", z.ZodTypeAny, {
3884
+ id: string;
3885
+ name?: string | undefined;
3886
+ email?: string | undefined;
3887
+ phone?: string | undefined;
3888
+ avatar?: string | undefined;
3889
+ rawData?: import("@withtyped/server/lib/types.js").Json | undefined;
3890
+ }, {
3891
+ id: string;
3892
+ name?: string | undefined;
3893
+ email?: string | undefined;
3894
+ phone?: string | undefined;
3895
+ avatar?: string | undefined;
3896
+ rawData?: import("@withtyped/server/lib/types.js").Json | undefined;
3897
+ }>>;
3898
+ encryptedTokenSet: z.ZodOptional<z.ZodObject<{
3899
+ encryptedTokenSetBase64: z.ZodString;
3900
+ metadata: z.ZodObject<{
3901
+ scope: z.ZodOptional<z.ZodString>;
3902
+ expiresAt: z.ZodOptional<z.ZodNumber>;
3903
+ tokenType: z.ZodOptional<z.ZodString>;
3904
+ hasRefreshToken: z.ZodBoolean;
3905
+ }, "strip", z.ZodTypeAny, {
3906
+ hasRefreshToken: boolean;
3907
+ scope?: string | undefined;
3908
+ expiresAt?: number | undefined;
3909
+ tokenType?: string | undefined;
3910
+ }, {
3911
+ hasRefreshToken: boolean;
3912
+ scope?: string | undefined;
3913
+ expiresAt?: number | undefined;
3914
+ tokenType?: string | undefined;
3915
+ }>;
3916
+ }, "strip", z.ZodTypeAny, {
3917
+ metadata: {
3918
+ hasRefreshToken: boolean;
3919
+ scope?: string | undefined;
3920
+ expiresAt?: number | undefined;
3921
+ tokenType?: string | undefined;
3922
+ };
3923
+ encryptedTokenSetBase64: string;
3924
+ }, {
3925
+ metadata: {
3926
+ hasRefreshToken: boolean;
3927
+ scope?: string | undefined;
3928
+ expiresAt?: number | undefined;
3929
+ tokenType?: string | undefined;
3930
+ };
3931
+ encryptedTokenSetBase64: string;
3932
+ }>>;
3933
+ connectorSession: z.ZodOptional<z.ZodObject<{
3934
+ nonce: z.ZodOptional<z.ZodString>;
3935
+ redirectUri: z.ZodOptional<z.ZodString>;
3936
+ connectorId: z.ZodOptional<z.ZodString>;
3937
+ connectorFactoryId: z.ZodOptional<z.ZodString>;
3938
+ jti: z.ZodOptional<z.ZodString>;
3939
+ state: z.ZodOptional<z.ZodString>;
3940
+ }, "strip", z.ZodUnknown, z.objectOutputType<{
3941
+ nonce: z.ZodOptional<z.ZodString>;
3942
+ redirectUri: z.ZodOptional<z.ZodString>;
3943
+ connectorId: z.ZodOptional<z.ZodString>;
3944
+ connectorFactoryId: z.ZodOptional<z.ZodString>;
3945
+ jti: z.ZodOptional<z.ZodString>;
3946
+ state: z.ZodOptional<z.ZodString>;
3947
+ }, z.ZodUnknown, "strip">, z.objectInputType<{
3948
+ nonce: z.ZodOptional<z.ZodString>;
3949
+ redirectUri: z.ZodOptional<z.ZodString>;
3950
+ connectorId: z.ZodOptional<z.ZodString>;
3951
+ connectorFactoryId: z.ZodOptional<z.ZodString>;
3952
+ jti: z.ZodOptional<z.ZodString>;
3953
+ state: z.ZodOptional<z.ZodString>;
3954
+ }, z.ZodUnknown, "strip">>>;
3955
+ }, "encryptedTokenSet" | "connectorSession">, "strip", z.ZodTypeAny, {
3956
+ type: import("./index.js").VerificationType.Social;
3957
+ id: string;
3958
+ connectorId: string;
3959
+ socialUserInfo?: {
3960
+ id: string;
3961
+ name?: string | undefined;
3962
+ email?: string | undefined;
3963
+ phone?: string | undefined;
3964
+ avatar?: string | undefined;
3965
+ rawData?: import("@withtyped/server/lib/types.js").Json | undefined;
3966
+ } | undefined;
3967
+ }, {
3968
+ type: import("./index.js").VerificationType.Social;
3969
+ id: string;
3970
+ connectorId: string;
3971
+ socialUserInfo?: {
3972
+ id: string;
3973
+ name?: string | undefined;
3974
+ email?: string | undefined;
3975
+ phone?: string | undefined;
3976
+ avatar?: string | undefined;
3977
+ rawData?: import("@withtyped/server/lib/types.js").Json | undefined;
3978
+ } | undefined;
3979
+ }>, z.ZodObject<{
3980
+ type: z.ZodLiteral<import("./index.js").VerificationType.EnterpriseSso>;
3981
+ id: z.ZodString;
3982
+ issuer: z.ZodOptional<z.ZodString>;
3983
+ connectorId: z.ZodString;
3984
+ } & {
3985
+ enterpriseSsoUserInfo: z.ZodOptional<z.ZodObject<{
3986
+ id: z.ZodString;
3987
+ email: z.ZodOptional<z.ZodString>;
3988
+ phone: z.ZodOptional<z.ZodString>;
3989
+ name: z.ZodOptional<z.ZodString>;
3990
+ avatar: z.ZodOptional<z.ZodString>;
3991
+ rawData: z.ZodOptional<z.ZodType<import("@withtyped/server/lib/types.js").Json, z.ZodTypeDef, import("@withtyped/server/lib/types.js").Json>>;
3992
+ }, "strip", z.ZodType<import("@withtyped/server/lib/types.js").Json, z.ZodTypeDef, import("@withtyped/server/lib/types.js").Json>, {
3993
+ id: string;
3994
+ name?: string | undefined;
3995
+ email?: string | undefined;
3996
+ phone?: string | undefined;
3997
+ avatar?: string | undefined;
3998
+ rawData?: import("@withtyped/server/lib/types.js").Json | undefined;
3999
+ }, {
4000
+ id: string;
4001
+ name?: string | undefined;
4002
+ email?: string | undefined;
4003
+ phone?: string | undefined;
4004
+ avatar?: string | undefined;
4005
+ rawData?: import("@withtyped/server/lib/types.js").Json | undefined;
4006
+ }>>;
4007
+ }, "strip", z.ZodTypeAny, {
4008
+ type: import("./index.js").VerificationType.EnterpriseSso;
4009
+ id: string;
4010
+ connectorId: string;
4011
+ issuer?: string | undefined;
4012
+ enterpriseSsoUserInfo?: {
4013
+ id: string;
4014
+ name?: string | undefined;
4015
+ email?: string | undefined;
4016
+ phone?: string | undefined;
4017
+ avatar?: string | undefined;
4018
+ rawData?: import("@withtyped/server/lib/types.js").Json | undefined;
4019
+ } | undefined;
4020
+ }, {
4021
+ type: import("./index.js").VerificationType.EnterpriseSso;
4022
+ id: string;
4023
+ connectorId: string;
4024
+ issuer?: string | undefined;
4025
+ enterpriseSsoUserInfo?: {
4026
+ id: string;
4027
+ name?: string | undefined;
4028
+ email?: string | undefined;
4029
+ phone?: string | undefined;
4030
+ avatar?: string | undefined;
4031
+ rawData?: import("@withtyped/server/lib/types.js").Json | undefined;
4032
+ } | undefined;
4033
+ }>, z.ZodObject<Omit<{
4034
+ id: z.ZodString;
4035
+ type: z.ZodLiteral<import("./index.js").VerificationType.TOTP>;
4036
+ userId: z.ZodString;
4037
+ secret: z.ZodOptional<z.ZodString>;
4038
+ verified: z.ZodBoolean;
4039
+ }, "secret">, "strip", z.ZodTypeAny, {
4040
+ type: import("./index.js").VerificationType.TOTP;
4041
+ id: string;
4042
+ userId: string;
4043
+ verified: boolean;
4044
+ }, {
4045
+ type: import("./index.js").VerificationType.TOTP;
4046
+ id: string;
4047
+ userId: string;
4048
+ verified: boolean;
4049
+ }>, z.ZodObject<Omit<{
4050
+ id: z.ZodString;
4051
+ type: z.ZodLiteral<import("./index.js").VerificationType.BackupCode>;
4052
+ userId: z.ZodString;
4053
+ code: z.ZodOptional<z.ZodString>;
4054
+ backupCodes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4055
+ }, "backupCodes">, "strip", z.ZodTypeAny, {
4056
+ type: import("./index.js").VerificationType.BackupCode;
4057
+ id: string;
4058
+ userId: string;
4059
+ code?: string | undefined;
4060
+ }, {
4061
+ type: import("./index.js").VerificationType.BackupCode;
4062
+ id: string;
4063
+ userId: string;
4064
+ code?: string | undefined;
4065
+ }>, z.ZodObject<Omit<{
4066
+ id: z.ZodString;
4067
+ verified: z.ZodBoolean;
4068
+ registrationChallenge: z.ZodOptional<z.ZodString>;
4069
+ registrationRpId: z.ZodOptional<z.ZodString>;
4070
+ authenticationChallenge: z.ZodOptional<z.ZodString>;
4071
+ registrationInfo: z.ZodOptional<z.ZodObject<{
4072
+ type: z.ZodLiteral<import("../foundations/index.js").MfaFactor.WebAuthn>;
4073
+ rpId: z.ZodString;
4074
+ credentialId: z.ZodString;
4075
+ publicKey: z.ZodString;
4076
+ transports: z.ZodArray<z.ZodEnum<["usb", "nfc", "ble", "internal", "cable", "hybrid", "smart-card"]>, "many">;
4077
+ counter: z.ZodNumber;
4078
+ agent: z.ZodString;
4079
+ name: z.ZodOptional<z.ZodString>;
4080
+ }, "strip", z.ZodTypeAny, {
4081
+ type: import("../foundations/index.js").MfaFactor.WebAuthn;
4082
+ rpId: string;
4083
+ credentialId: string;
4084
+ publicKey: string;
4085
+ transports: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[];
4086
+ counter: number;
4087
+ agent: string;
4088
+ name?: string | undefined;
4089
+ }, {
4090
+ type: import("../foundations/index.js").MfaFactor.WebAuthn;
4091
+ rpId: string;
4092
+ credentialId: string;
4093
+ publicKey: string;
4094
+ transports: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[];
4095
+ counter: number;
4096
+ agent: string;
4097
+ name?: string | undefined;
4098
+ }>>;
4099
+ } & {
4100
+ type: z.ZodLiteral<import("./index.js").VerificationType.WebAuthn>;
4101
+ userId: z.ZodString;
4102
+ }, "registrationChallenge" | "authenticationChallenge" | "registrationInfo">, "strip", z.ZodTypeAny, {
4103
+ type: import("./index.js").VerificationType.WebAuthn;
4104
+ id: string;
4105
+ userId: string;
4106
+ verified: boolean;
4107
+ registrationRpId?: string | undefined;
4108
+ }, {
4109
+ type: import("./index.js").VerificationType.WebAuthn;
4110
+ id: string;
4111
+ userId: string;
4112
+ verified: boolean;
4113
+ registrationRpId?: string | undefined;
4114
+ }>, z.ZodObject<Omit<{
4115
+ id: z.ZodString;
4116
+ verified: z.ZodBoolean;
4117
+ registrationChallenge: z.ZodOptional<z.ZodString>;
4118
+ registrationRpId: z.ZodOptional<z.ZodString>;
4119
+ authenticationChallenge: z.ZodOptional<z.ZodString>;
4120
+ registrationInfo: z.ZodOptional<z.ZodObject<{
4121
+ type: z.ZodLiteral<import("../foundations/index.js").MfaFactor.WebAuthn>;
4122
+ rpId: z.ZodString;
4123
+ credentialId: z.ZodString;
4124
+ publicKey: z.ZodString;
4125
+ transports: z.ZodArray<z.ZodEnum<["usb", "nfc", "ble", "internal", "cable", "hybrid", "smart-card"]>, "many">;
4126
+ counter: z.ZodNumber;
4127
+ agent: z.ZodString;
4128
+ name: z.ZodOptional<z.ZodString>;
4129
+ }, "strip", z.ZodTypeAny, {
4130
+ type: import("../foundations/index.js").MfaFactor.WebAuthn;
4131
+ rpId: string;
4132
+ credentialId: string;
4133
+ publicKey: string;
4134
+ transports: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[];
4135
+ counter: number;
4136
+ agent: string;
4137
+ name?: string | undefined;
4138
+ }, {
4139
+ type: import("../foundations/index.js").MfaFactor.WebAuthn;
4140
+ rpId: string;
4141
+ credentialId: string;
4142
+ publicKey: string;
4143
+ transports: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[];
4144
+ counter: number;
4145
+ agent: string;
4146
+ name?: string | undefined;
4147
+ }>>;
4148
+ } & {
4149
+ type: z.ZodLiteral<import("./index.js").VerificationType.SignInPasskey>;
4150
+ userId: z.ZodOptional<z.ZodString>;
4151
+ authenticationRpId: z.ZodOptional<z.ZodString>;
4152
+ }, "registrationChallenge" | "authenticationChallenge" | "registrationInfo" | "authenticationRpId">, "strip", z.ZodTypeAny, {
4153
+ type: import("./index.js").VerificationType.SignInPasskey;
4154
+ id: string;
4155
+ verified: boolean;
4156
+ userId?: string | undefined;
4157
+ registrationRpId?: string | undefined;
4158
+ }, {
4159
+ type: import("./index.js").VerificationType.SignInPasskey;
4160
+ id: string;
4161
+ verified: boolean;
4162
+ userId?: string | undefined;
4163
+ registrationRpId?: string | undefined;
4164
+ }>, z.ZodObject<{
4165
+ id: z.ZodString;
4166
+ type: z.ZodLiteral<import("./index.js").VerificationType.OneTimeToken>;
4167
+ verified: z.ZodBoolean;
4168
+ identifier: z.ZodObject<{
4169
+ type: z.ZodLiteral<import("../foundations/index.js").SignInIdentifier.Email>;
4170
+ value: z.ZodString;
4171
+ }, "strip", z.ZodTypeAny, {
4172
+ value: string;
4173
+ type: import("../foundations/index.js").SignInIdentifier.Email;
4174
+ }, {
4175
+ value: string;
4176
+ type: import("../foundations/index.js").SignInIdentifier.Email;
4177
+ }>;
4178
+ oneTimeTokenContext: z.ZodOptional<z.ZodObject<{
4179
+ jitOrganizationIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4180
+ }, "strip", z.ZodTypeAny, {
4181
+ jitOrganizationIds?: string[] | undefined;
4182
+ }, {
4183
+ jitOrganizationIds?: string[] | undefined;
4184
+ }>>;
4185
+ }, "strip", z.ZodTypeAny, {
4186
+ type: import("./index.js").VerificationType.OneTimeToken;
4187
+ id: string;
4188
+ identifier: {
4189
+ value: string;
4190
+ type: import("../foundations/index.js").SignInIdentifier.Email;
4191
+ };
4192
+ verified: boolean;
4193
+ oneTimeTokenContext?: {
4194
+ jitOrganizationIds?: string[] | undefined;
4195
+ } | undefined;
4196
+ }, {
4197
+ type: import("./index.js").VerificationType.OneTimeToken;
4198
+ id: string;
4199
+ identifier: {
4200
+ value: string;
4201
+ type: import("../foundations/index.js").SignInIdentifier.Email;
4202
+ };
4203
+ verified: boolean;
4204
+ oneTimeTokenContext?: {
4205
+ jitOrganizationIds?: string[] | undefined;
4206
+ } | undefined;
4207
+ }>, z.ZodObject<Omit<{
4208
+ id: z.ZodString;
4209
+ type: z.ZodLiteral<import("./index.js").VerificationType.NewPasswordIdentity>;
4210
+ identifier: z.ZodObject<{
4211
+ type: z.ZodNativeEnum<typeof import("../foundations/index.js").SignInIdentifier>;
4212
+ value: z.ZodString;
4213
+ }, "strip", z.ZodTypeAny, {
4214
+ value: string;
4215
+ type: import("../foundations/index.js").SignInIdentifier;
4216
+ }, {
4217
+ value: string;
4218
+ type: import("../foundations/index.js").SignInIdentifier;
4219
+ }>;
4220
+ passwordEncrypted: z.ZodOptional<z.ZodString>;
4221
+ passwordEncryptionMethod: z.ZodOptional<z.ZodLiteral<import("../index.js").UsersPasswordEncryptionMethod.Argon2i>>;
4222
+ }, "passwordEncrypted" | "passwordEncryptionMethod">, "strip", z.ZodTypeAny, {
4223
+ type: import("./index.js").VerificationType.NewPasswordIdentity;
4224
+ id: string;
4225
+ identifier: {
4226
+ value: string;
4227
+ type: import("../foundations/index.js").SignInIdentifier;
4228
+ };
4229
+ }, {
4230
+ type: import("./index.js").VerificationType.NewPasswordIdentity;
4231
+ id: string;
4232
+ identifier: {
4233
+ value: string;
4234
+ type: import("../foundations/index.js").SignInIdentifier;
4235
+ };
4236
+ }>]>, "many">;
4237
+ signInContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
4238
+ }, "strip", z.ZodTypeAny, {
4239
+ userId: string;
4240
+ interactionEvent: import("./interactions.js").InteractionEvent;
4241
+ verificationRecords: ({
4242
+ type: import("./index.js").VerificationType.BackupCode;
4243
+ id: string;
4244
+ userId: string;
4245
+ code?: string | undefined;
4246
+ } | {
4247
+ type: import("./index.js").VerificationType.EmailVerificationCode;
4248
+ id: string;
4249
+ identifier: {
4250
+ value: string;
4251
+ type: import("../foundations/index.js").SignInIdentifier.Email;
4252
+ };
4253
+ templateType: import("../foundations/index.js").TemplateType;
4254
+ verified: boolean;
4255
+ } | {
4256
+ type: import("./index.js").VerificationType.PhoneVerificationCode;
4257
+ id: string;
4258
+ identifier: {
4259
+ value: string;
4260
+ type: import("../foundations/index.js").SignInIdentifier.Phone;
4261
+ };
4262
+ templateType: import("../foundations/index.js").TemplateType;
4263
+ verified: boolean;
4264
+ } | {
4265
+ type: import("./index.js").VerificationType.MfaEmailVerificationCode;
4266
+ id: string;
4267
+ identifier: {
4268
+ value: string;
4269
+ type: import("../foundations/index.js").SignInIdentifier.Email;
4270
+ };
4271
+ templateType: import("../foundations/index.js").TemplateType;
4272
+ verified: boolean;
4273
+ } | {
4274
+ type: import("./index.js").VerificationType.MfaPhoneVerificationCode;
4275
+ id: string;
4276
+ identifier: {
4277
+ value: string;
4278
+ type: import("../foundations/index.js").SignInIdentifier.Phone;
4279
+ };
4280
+ templateType: import("../foundations/index.js").TemplateType;
4281
+ verified: boolean;
4282
+ } | {
4283
+ type: import("./index.js").VerificationType.NewPasswordIdentity;
4284
+ id: string;
4285
+ identifier: {
4286
+ value: string;
4287
+ type: import("../foundations/index.js").SignInIdentifier;
4288
+ };
4289
+ } | {
4290
+ type: import("./index.js").VerificationType.OneTimeToken;
4291
+ id: string;
4292
+ identifier: {
4293
+ value: string;
4294
+ type: import("../foundations/index.js").SignInIdentifier.Email;
4295
+ };
4296
+ verified: boolean;
4297
+ oneTimeTokenContext?: {
4298
+ jitOrganizationIds?: string[] | undefined;
4299
+ } | undefined;
4300
+ } | {
4301
+ type: import("./index.js").VerificationType.Password;
4302
+ id: string;
4303
+ identifier: {
4304
+ value: string;
4305
+ type: import("../foundations/index.js").SignInIdentifier | import("../foundations/index.js").AdditionalIdentifier;
4306
+ };
4307
+ verified: boolean;
4308
+ } | {
4309
+ type: import("./index.js").VerificationType.Social;
4310
+ id: string;
4311
+ connectorId: string;
4312
+ socialUserInfo?: {
4313
+ id: string;
4314
+ name?: string | undefined;
4315
+ email?: string | undefined;
4316
+ phone?: string | undefined;
4317
+ avatar?: string | undefined;
4318
+ rawData?: import("@withtyped/server/lib/types.js").Json | undefined;
4319
+ } | undefined;
4320
+ } | {
4321
+ type: import("./index.js").VerificationType.TOTP;
4322
+ id: string;
4323
+ userId: string;
4324
+ verified: boolean;
4325
+ } | {
4326
+ type: import("./index.js").VerificationType.EnterpriseSso;
4327
+ id: string;
4328
+ connectorId: string;
4329
+ issuer?: string | undefined;
4330
+ enterpriseSsoUserInfo?: {
4331
+ id: string;
4332
+ name?: string | undefined;
4333
+ email?: string | undefined;
4334
+ phone?: string | undefined;
4335
+ avatar?: string | undefined;
4336
+ rawData?: import("@withtyped/server/lib/types.js").Json | undefined;
4337
+ } | undefined;
4338
+ } | {
4339
+ type: import("./index.js").VerificationType.WebAuthn;
4340
+ id: string;
4341
+ userId: string;
4342
+ verified: boolean;
4343
+ registrationRpId?: string | undefined;
4344
+ } | {
4345
+ type: import("./index.js").VerificationType.SignInPasskey;
4346
+ id: string;
4347
+ verified: boolean;
4348
+ userId?: string | undefined;
4349
+ registrationRpId?: string | undefined;
4350
+ })[];
4351
+ signInContext?: Record<string, string> | undefined;
4352
+ }, {
4353
+ userId: string;
4354
+ interactionEvent: import("./interactions.js").InteractionEvent;
4355
+ verificationRecords: ({
4356
+ type: import("./index.js").VerificationType.BackupCode;
4357
+ id: string;
4358
+ userId: string;
4359
+ code?: string | undefined;
4360
+ } | {
4361
+ type: import("./index.js").VerificationType.EmailVerificationCode;
4362
+ id: string;
4363
+ identifier: {
4364
+ value: string;
4365
+ type: import("../foundations/index.js").SignInIdentifier.Email;
4366
+ };
4367
+ templateType: import("../foundations/index.js").TemplateType;
4368
+ verified: boolean;
4369
+ } | {
4370
+ type: import("./index.js").VerificationType.PhoneVerificationCode;
4371
+ id: string;
4372
+ identifier: {
4373
+ value: string;
4374
+ type: import("../foundations/index.js").SignInIdentifier.Phone;
4375
+ };
4376
+ templateType: import("../foundations/index.js").TemplateType;
4377
+ verified: boolean;
4378
+ } | {
4379
+ type: import("./index.js").VerificationType.MfaEmailVerificationCode;
4380
+ id: string;
4381
+ identifier: {
4382
+ value: string;
4383
+ type: import("../foundations/index.js").SignInIdentifier.Email;
4384
+ };
4385
+ templateType: import("../foundations/index.js").TemplateType;
4386
+ verified: boolean;
4387
+ } | {
4388
+ type: import("./index.js").VerificationType.MfaPhoneVerificationCode;
4389
+ id: string;
4390
+ identifier: {
4391
+ value: string;
4392
+ type: import("../foundations/index.js").SignInIdentifier.Phone;
4393
+ };
4394
+ templateType: import("../foundations/index.js").TemplateType;
4395
+ verified: boolean;
4396
+ } | {
4397
+ type: import("./index.js").VerificationType.NewPasswordIdentity;
4398
+ id: string;
4399
+ identifier: {
4400
+ value: string;
4401
+ type: import("../foundations/index.js").SignInIdentifier;
4402
+ };
4403
+ } | {
4404
+ type: import("./index.js").VerificationType.OneTimeToken;
4405
+ id: string;
4406
+ identifier: {
4407
+ value: string;
4408
+ type: import("../foundations/index.js").SignInIdentifier.Email;
4409
+ };
4410
+ verified: boolean;
4411
+ oneTimeTokenContext?: {
4412
+ jitOrganizationIds?: string[] | undefined;
4413
+ } | undefined;
4414
+ } | {
4415
+ type: import("./index.js").VerificationType.Password;
4416
+ id: string;
4417
+ identifier: {
4418
+ value: string;
4419
+ type: import("../foundations/index.js").SignInIdentifier | import("../foundations/index.js").AdditionalIdentifier;
4420
+ };
4421
+ verified: boolean;
4422
+ } | {
4423
+ type: import("./index.js").VerificationType.Social;
4424
+ id: string;
4425
+ connectorId: string;
4426
+ socialUserInfo?: {
4427
+ id: string;
4428
+ name?: string | undefined;
4429
+ email?: string | undefined;
4430
+ phone?: string | undefined;
4431
+ avatar?: string | undefined;
4432
+ rawData?: import("@withtyped/server/lib/types.js").Json | undefined;
4433
+ } | undefined;
4434
+ } | {
4435
+ type: import("./index.js").VerificationType.TOTP;
4436
+ id: string;
4437
+ userId: string;
4438
+ verified: boolean;
4439
+ } | {
4440
+ type: import("./index.js").VerificationType.EnterpriseSso;
4441
+ id: string;
4442
+ connectorId: string;
4443
+ issuer?: string | undefined;
4444
+ enterpriseSsoUserInfo?: {
4445
+ id: string;
4446
+ name?: string | undefined;
4447
+ email?: string | undefined;
4448
+ phone?: string | undefined;
4449
+ avatar?: string | undefined;
4450
+ rawData?: import("@withtyped/server/lib/types.js").Json | undefined;
4451
+ } | undefined;
4452
+ } | {
4453
+ type: import("./index.js").VerificationType.WebAuthn;
4454
+ id: string;
4455
+ userId: string;
4456
+ verified: boolean;
4457
+ registrationRpId?: string | undefined;
4458
+ } | {
4459
+ type: import("./index.js").VerificationType.SignInPasskey;
4460
+ id: string;
4461
+ verified: boolean;
4462
+ userId?: string | undefined;
4463
+ registrationRpId?: string | undefined;
4464
+ })[];
4465
+ signInContext?: Record<string, string> | undefined;
4466
+ }>>;
4467
+ clientId: z.ZodNullable<z.ZodString>;
4468
+ accountId: z.ZodNullable<z.ZodString>;
4469
+ expiresAt: z.ZodNumber;
4470
+ } & {
4471
+ /**
4472
+ * `true` for the entry whose `payload.uid` matches the calling session, `false` for
4473
+ * the others. At most one entry is `true` per response. Zero entries are tagged when
4474
+ * the calling access token has no matching session uid — for example, the caller has
4475
+ * revoked its own session but the token has not yet expired, or the token was issued
4476
+ * from a non-session-backed grant.
4477
+ */
4478
+ isCurrent: z.ZodBoolean;
4479
+ }, "strip", z.ZodTypeAny, {
4480
+ accountId: string | null;
4481
+ expiresAt: number;
4482
+ payload: {
4483
+ uid: string;
4484
+ exp: number;
4485
+ iat: number;
4486
+ jti: string;
4487
+ kind: "Session";
4488
+ loginTs: number;
4489
+ accountId: string;
4490
+ authorizations?: Record<string, z.objectOutputType<{
4491
+ sid: z.ZodOptional<z.ZodString>;
4492
+ grantId: z.ZodOptional<z.ZodString>;
4493
+ persistsLogout: z.ZodOptional<z.ZodBoolean>;
4494
+ }, z.ZodUnknown, "strip">> | undefined;
4495
+ } & {
4496
+ [k: string]: unknown;
4497
+ };
4498
+ lastSubmission: {
4499
+ userId: string;
4500
+ interactionEvent: import("./interactions.js").InteractionEvent;
4501
+ verificationRecords: ({
4502
+ type: import("./index.js").VerificationType.BackupCode;
4503
+ id: string;
4504
+ userId: string;
4505
+ code?: string | undefined;
4506
+ } | {
4507
+ type: import("./index.js").VerificationType.EmailVerificationCode;
4508
+ id: string;
4509
+ identifier: {
4510
+ value: string;
4511
+ type: import("../foundations/index.js").SignInIdentifier.Email;
4512
+ };
4513
+ templateType: import("../foundations/index.js").TemplateType;
4514
+ verified: boolean;
4515
+ } | {
4516
+ type: import("./index.js").VerificationType.PhoneVerificationCode;
4517
+ id: string;
4518
+ identifier: {
4519
+ value: string;
4520
+ type: import("../foundations/index.js").SignInIdentifier.Phone;
4521
+ };
4522
+ templateType: import("../foundations/index.js").TemplateType;
4523
+ verified: boolean;
4524
+ } | {
4525
+ type: import("./index.js").VerificationType.MfaEmailVerificationCode;
4526
+ id: string;
4527
+ identifier: {
4528
+ value: string;
4529
+ type: import("../foundations/index.js").SignInIdentifier.Email;
4530
+ };
4531
+ templateType: import("../foundations/index.js").TemplateType;
4532
+ verified: boolean;
4533
+ } | {
4534
+ type: import("./index.js").VerificationType.MfaPhoneVerificationCode;
4535
+ id: string;
4536
+ identifier: {
4537
+ value: string;
4538
+ type: import("../foundations/index.js").SignInIdentifier.Phone;
4539
+ };
4540
+ templateType: import("../foundations/index.js").TemplateType;
4541
+ verified: boolean;
4542
+ } | {
4543
+ type: import("./index.js").VerificationType.NewPasswordIdentity;
4544
+ id: string;
4545
+ identifier: {
4546
+ value: string;
4547
+ type: import("../foundations/index.js").SignInIdentifier;
4548
+ };
4549
+ } | {
4550
+ type: import("./index.js").VerificationType.OneTimeToken;
4551
+ id: string;
4552
+ identifier: {
4553
+ value: string;
4554
+ type: import("../foundations/index.js").SignInIdentifier.Email;
4555
+ };
4556
+ verified: boolean;
4557
+ oneTimeTokenContext?: {
4558
+ jitOrganizationIds?: string[] | undefined;
4559
+ } | undefined;
4560
+ } | {
4561
+ type: import("./index.js").VerificationType.Password;
4562
+ id: string;
4563
+ identifier: {
4564
+ value: string;
4565
+ type: import("../foundations/index.js").SignInIdentifier | import("../foundations/index.js").AdditionalIdentifier;
4566
+ };
4567
+ verified: boolean;
4568
+ } | {
4569
+ type: import("./index.js").VerificationType.Social;
4570
+ id: string;
4571
+ connectorId: string;
4572
+ socialUserInfo?: {
4573
+ id: string;
4574
+ name?: string | undefined;
4575
+ email?: string | undefined;
4576
+ phone?: string | undefined;
4577
+ avatar?: string | undefined;
4578
+ rawData?: import("@withtyped/server/lib/types.js").Json | undefined;
4579
+ } | undefined;
4580
+ } | {
4581
+ type: import("./index.js").VerificationType.TOTP;
4582
+ id: string;
4583
+ userId: string;
4584
+ verified: boolean;
4585
+ } | {
4586
+ type: import("./index.js").VerificationType.EnterpriseSso;
4587
+ id: string;
4588
+ connectorId: string;
4589
+ issuer?: string | undefined;
4590
+ enterpriseSsoUserInfo?: {
4591
+ id: string;
4592
+ name?: string | undefined;
4593
+ email?: string | undefined;
4594
+ phone?: string | undefined;
4595
+ avatar?: string | undefined;
4596
+ rawData?: import("@withtyped/server/lib/types.js").Json | undefined;
4597
+ } | undefined;
4598
+ } | {
4599
+ type: import("./index.js").VerificationType.WebAuthn;
4600
+ id: string;
4601
+ userId: string;
4602
+ verified: boolean;
4603
+ registrationRpId?: string | undefined;
4604
+ } | {
4605
+ type: import("./index.js").VerificationType.SignInPasskey;
4606
+ id: string;
4607
+ verified: boolean;
4608
+ userId?: string | undefined;
4609
+ registrationRpId?: string | undefined;
4610
+ })[];
4611
+ signInContext?: Record<string, string> | undefined;
4612
+ } | null;
4613
+ clientId: string | null;
4614
+ isCurrent: boolean;
4615
+ }, {
4616
+ accountId: string | null;
4617
+ expiresAt: number;
4618
+ payload: {
4619
+ uid: string;
4620
+ exp: number;
4621
+ iat: number;
4622
+ jti: string;
4623
+ kind: "Session";
4624
+ loginTs: number;
4625
+ accountId: string;
4626
+ authorizations?: Record<string, z.objectInputType<{
4627
+ sid: z.ZodOptional<z.ZodString>;
4628
+ grantId: z.ZodOptional<z.ZodString>;
4629
+ persistsLogout: z.ZodOptional<z.ZodBoolean>;
4630
+ }, z.ZodUnknown, "strip">> | undefined;
4631
+ } & {
4632
+ [k: string]: unknown;
4633
+ };
4634
+ lastSubmission: {
4635
+ userId: string;
4636
+ interactionEvent: import("./interactions.js").InteractionEvent;
4637
+ verificationRecords: ({
4638
+ type: import("./index.js").VerificationType.BackupCode;
4639
+ id: string;
4640
+ userId: string;
4641
+ code?: string | undefined;
4642
+ } | {
4643
+ type: import("./index.js").VerificationType.EmailVerificationCode;
4644
+ id: string;
4645
+ identifier: {
4646
+ value: string;
4647
+ type: import("../foundations/index.js").SignInIdentifier.Email;
4648
+ };
4649
+ templateType: import("../foundations/index.js").TemplateType;
4650
+ verified: boolean;
4651
+ } | {
4652
+ type: import("./index.js").VerificationType.PhoneVerificationCode;
4653
+ id: string;
4654
+ identifier: {
4655
+ value: string;
4656
+ type: import("../foundations/index.js").SignInIdentifier.Phone;
4657
+ };
4658
+ templateType: import("../foundations/index.js").TemplateType;
4659
+ verified: boolean;
4660
+ } | {
4661
+ type: import("./index.js").VerificationType.MfaEmailVerificationCode;
4662
+ id: string;
4663
+ identifier: {
4664
+ value: string;
4665
+ type: import("../foundations/index.js").SignInIdentifier.Email;
4666
+ };
4667
+ templateType: import("../foundations/index.js").TemplateType;
4668
+ verified: boolean;
4669
+ } | {
4670
+ type: import("./index.js").VerificationType.MfaPhoneVerificationCode;
4671
+ id: string;
4672
+ identifier: {
4673
+ value: string;
4674
+ type: import("../foundations/index.js").SignInIdentifier.Phone;
4675
+ };
4676
+ templateType: import("../foundations/index.js").TemplateType;
4677
+ verified: boolean;
4678
+ } | {
4679
+ type: import("./index.js").VerificationType.NewPasswordIdentity;
4680
+ id: string;
4681
+ identifier: {
4682
+ value: string;
4683
+ type: import("../foundations/index.js").SignInIdentifier;
4684
+ };
4685
+ } | {
4686
+ type: import("./index.js").VerificationType.OneTimeToken;
4687
+ id: string;
4688
+ identifier: {
4689
+ value: string;
4690
+ type: import("../foundations/index.js").SignInIdentifier.Email;
4691
+ };
4692
+ verified: boolean;
4693
+ oneTimeTokenContext?: {
4694
+ jitOrganizationIds?: string[] | undefined;
4695
+ } | undefined;
4696
+ } | {
4697
+ type: import("./index.js").VerificationType.Password;
4698
+ id: string;
4699
+ identifier: {
4700
+ value: string;
4701
+ type: import("../foundations/index.js").SignInIdentifier | import("../foundations/index.js").AdditionalIdentifier;
4702
+ };
4703
+ verified: boolean;
4704
+ } | {
4705
+ type: import("./index.js").VerificationType.Social;
4706
+ id: string;
4707
+ connectorId: string;
4708
+ socialUserInfo?: {
4709
+ id: string;
4710
+ name?: string | undefined;
4711
+ email?: string | undefined;
4712
+ phone?: string | undefined;
4713
+ avatar?: string | undefined;
4714
+ rawData?: import("@withtyped/server/lib/types.js").Json | undefined;
4715
+ } | undefined;
4716
+ } | {
4717
+ type: import("./index.js").VerificationType.TOTP;
4718
+ id: string;
4719
+ userId: string;
4720
+ verified: boolean;
4721
+ } | {
4722
+ type: import("./index.js").VerificationType.EnterpriseSso;
4723
+ id: string;
4724
+ connectorId: string;
4725
+ issuer?: string | undefined;
4726
+ enterpriseSsoUserInfo?: {
4727
+ id: string;
4728
+ name?: string | undefined;
4729
+ email?: string | undefined;
4730
+ phone?: string | undefined;
4731
+ avatar?: string | undefined;
4732
+ rawData?: import("@withtyped/server/lib/types.js").Json | undefined;
4733
+ } | undefined;
4734
+ } | {
4735
+ type: import("./index.js").VerificationType.WebAuthn;
4736
+ id: string;
4737
+ userId: string;
4738
+ verified: boolean;
4739
+ registrationRpId?: string | undefined;
4740
+ } | {
4741
+ type: import("./index.js").VerificationType.SignInPasskey;
4742
+ id: string;
4743
+ verified: boolean;
4744
+ userId?: string | undefined;
4745
+ registrationRpId?: string | undefined;
4746
+ })[];
4747
+ signInContext?: Record<string, string> | undefined;
4748
+ } | null;
4749
+ clientId: string | null;
4750
+ isCurrent: boolean;
4751
+ }>;
4752
+ export declare const getAccountUserSessionsResponseGuard: z.ZodObject<{
4753
+ sessions: z.ZodArray<z.ZodObject<{
4754
+ payload: z.ZodObject<{
4755
+ exp: z.ZodNumber;
4756
+ iat: z.ZodNumber;
4757
+ jti: z.ZodString;
4758
+ uid: z.ZodString;
4759
+ kind: z.ZodLiteral<"Session">;
4760
+ loginTs: z.ZodNumber;
4761
+ accountId: z.ZodString;
4762
+ authorizations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
4763
+ sid: z.ZodOptional<z.ZodString>;
4764
+ grantId: z.ZodOptional<z.ZodString>;
4765
+ persistsLogout: z.ZodOptional<z.ZodBoolean>;
4766
+ }, "strip", z.ZodUnknown, z.objectOutputType<{
4767
+ sid: z.ZodOptional<z.ZodString>;
4768
+ grantId: z.ZodOptional<z.ZodString>;
4769
+ persistsLogout: z.ZodOptional<z.ZodBoolean>;
4770
+ }, z.ZodUnknown, "strip">, z.objectInputType<{
4771
+ sid: z.ZodOptional<z.ZodString>;
4772
+ grantId: z.ZodOptional<z.ZodString>;
4773
+ persistsLogout: z.ZodOptional<z.ZodBoolean>;
4774
+ }, z.ZodUnknown, "strip">>>>;
4775
+ }, "strip", z.ZodUnknown, z.objectOutputType<{
4776
+ exp: z.ZodNumber;
4777
+ iat: z.ZodNumber;
4778
+ jti: z.ZodString;
4779
+ uid: z.ZodString;
4780
+ kind: z.ZodLiteral<"Session">;
4781
+ loginTs: z.ZodNumber;
4782
+ accountId: z.ZodString;
4783
+ authorizations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
4784
+ sid: z.ZodOptional<z.ZodString>;
4785
+ grantId: z.ZodOptional<z.ZodString>;
4786
+ persistsLogout: z.ZodOptional<z.ZodBoolean>;
4787
+ }, "strip", z.ZodUnknown, z.objectOutputType<{
4788
+ sid: z.ZodOptional<z.ZodString>;
4789
+ grantId: z.ZodOptional<z.ZodString>;
4790
+ persistsLogout: z.ZodOptional<z.ZodBoolean>;
4791
+ }, z.ZodUnknown, "strip">, z.objectInputType<{
4792
+ sid: z.ZodOptional<z.ZodString>;
4793
+ grantId: z.ZodOptional<z.ZodString>;
4794
+ persistsLogout: z.ZodOptional<z.ZodBoolean>;
4795
+ }, z.ZodUnknown, "strip">>>>;
4796
+ }, z.ZodUnknown, "strip">, z.objectInputType<{
4797
+ exp: z.ZodNumber;
4798
+ iat: z.ZodNumber;
4799
+ jti: z.ZodString;
4800
+ uid: z.ZodString;
4801
+ kind: z.ZodLiteral<"Session">;
4802
+ loginTs: z.ZodNumber;
4803
+ accountId: z.ZodString;
4804
+ authorizations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
4805
+ sid: z.ZodOptional<z.ZodString>;
4806
+ grantId: z.ZodOptional<z.ZodString>;
4807
+ persistsLogout: z.ZodOptional<z.ZodBoolean>;
4808
+ }, "strip", z.ZodUnknown, z.objectOutputType<{
4809
+ sid: z.ZodOptional<z.ZodString>;
4810
+ grantId: z.ZodOptional<z.ZodString>;
4811
+ persistsLogout: z.ZodOptional<z.ZodBoolean>;
4812
+ }, z.ZodUnknown, "strip">, z.objectInputType<{
4813
+ sid: z.ZodOptional<z.ZodString>;
4814
+ grantId: z.ZodOptional<z.ZodString>;
4815
+ persistsLogout: z.ZodOptional<z.ZodBoolean>;
4816
+ }, z.ZodUnknown, "strip">>>>;
4817
+ }, z.ZodUnknown, "strip">>;
4818
+ lastSubmission: z.ZodNullable<z.ZodObject<{
4819
+ interactionEvent: z.ZodNativeEnum<typeof import("./interactions.js").InteractionEvent>;
4820
+ userId: z.ZodString;
4821
+ verificationRecords: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4822
+ id: z.ZodString;
4823
+ type: z.ZodLiteral<import("./index.js").VerificationType.Password>;
4824
+ identifier: z.ZodObject<{
4825
+ type: z.ZodUnion<[z.ZodNativeEnum<typeof import("../foundations/index.js").SignInIdentifier>, z.ZodNativeEnum<typeof import("../foundations/index.js").AdditionalIdentifier>]>;
4826
+ value: z.ZodString;
4827
+ }, "strip", z.ZodTypeAny, {
4828
+ value: string;
4829
+ type: import("../foundations/index.js").SignInIdentifier | import("../foundations/index.js").AdditionalIdentifier;
4830
+ }, {
4831
+ value: string;
4832
+ type: import("../foundations/index.js").SignInIdentifier | import("../foundations/index.js").AdditionalIdentifier;
4833
+ }>;
4834
+ verified: z.ZodBoolean;
4835
+ }, "strip", z.ZodTypeAny, {
4836
+ type: import("./index.js").VerificationType.Password;
4837
+ id: string;
4838
+ identifier: {
4839
+ value: string;
4840
+ type: import("../foundations/index.js").SignInIdentifier | import("../foundations/index.js").AdditionalIdentifier;
4841
+ };
4842
+ verified: boolean;
4843
+ }, {
4844
+ type: import("./index.js").VerificationType.Password;
4845
+ id: string;
4846
+ identifier: {
4847
+ value: string;
4848
+ type: import("../foundations/index.js").SignInIdentifier | import("../foundations/index.js").AdditionalIdentifier;
4849
+ };
4850
+ verified: boolean;
4851
+ }>, z.ZodObject<{
4852
+ id: z.ZodString;
4853
+ templateType: z.ZodNativeEnum<typeof import("../foundations/index.js").TemplateType>;
4854
+ verified: z.ZodBoolean;
4855
+ } & {
4856
+ type: z.ZodLiteral<import("./index.js").VerificationType.EmailVerificationCode>;
4857
+ identifier: z.ZodObject<{
4858
+ type: z.ZodLiteral<import("../foundations/index.js").SignInIdentifier.Email>;
4859
+ value: z.ZodString;
4860
+ }, "strip", z.ZodTypeAny, {
4861
+ value: string;
4862
+ type: import("../foundations/index.js").SignInIdentifier.Email;
4863
+ }, {
4864
+ value: string;
4865
+ type: import("../foundations/index.js").SignInIdentifier.Email;
4866
+ }>;
4867
+ }, "strip", z.ZodTypeAny, {
4868
+ type: import("./index.js").VerificationType.EmailVerificationCode;
4869
+ id: string;
4870
+ identifier: {
4871
+ value: string;
4872
+ type: import("../foundations/index.js").SignInIdentifier.Email;
4873
+ };
4874
+ templateType: import("../foundations/index.js").TemplateType;
4875
+ verified: boolean;
4876
+ }, {
4877
+ type: import("./index.js").VerificationType.EmailVerificationCode;
4878
+ id: string;
4879
+ identifier: {
4880
+ value: string;
4881
+ type: import("../foundations/index.js").SignInIdentifier.Email;
4882
+ };
4883
+ templateType: import("../foundations/index.js").TemplateType;
4884
+ verified: boolean;
4885
+ }>, z.ZodObject<{
4886
+ id: z.ZodString;
4887
+ templateType: z.ZodNativeEnum<typeof import("../foundations/index.js").TemplateType>;
4888
+ verified: z.ZodBoolean;
4889
+ } & {
4890
+ type: z.ZodLiteral<import("./index.js").VerificationType.PhoneVerificationCode>;
4891
+ identifier: z.ZodObject<{
4892
+ type: z.ZodLiteral<import("../foundations/index.js").SignInIdentifier.Phone>;
4893
+ value: z.ZodString;
4894
+ }, "strip", z.ZodTypeAny, {
4895
+ value: string;
4896
+ type: import("../foundations/index.js").SignInIdentifier.Phone;
4897
+ }, {
4898
+ value: string;
4899
+ type: import("../foundations/index.js").SignInIdentifier.Phone;
4900
+ }>;
4901
+ }, "strip", z.ZodTypeAny, {
4902
+ type: import("./index.js").VerificationType.PhoneVerificationCode;
4903
+ id: string;
4904
+ identifier: {
4905
+ value: string;
4906
+ type: import("../foundations/index.js").SignInIdentifier.Phone;
4907
+ };
4908
+ templateType: import("../foundations/index.js").TemplateType;
4909
+ verified: boolean;
4910
+ }, {
4911
+ type: import("./index.js").VerificationType.PhoneVerificationCode;
4912
+ id: string;
4913
+ identifier: {
4914
+ value: string;
4915
+ type: import("../foundations/index.js").SignInIdentifier.Phone;
4916
+ };
4917
+ templateType: import("../foundations/index.js").TemplateType;
4918
+ verified: boolean;
4919
+ }>, z.ZodObject<{
4920
+ id: z.ZodString;
4921
+ templateType: z.ZodNativeEnum<typeof import("../foundations/index.js").TemplateType>;
4922
+ verified: z.ZodBoolean;
4923
+ } & {
4924
+ type: z.ZodLiteral<import("./index.js").VerificationType.MfaEmailVerificationCode>;
4925
+ identifier: z.ZodObject<{
4926
+ type: z.ZodLiteral<import("../foundations/index.js").SignInIdentifier.Email>;
4927
+ value: z.ZodString;
4928
+ }, "strip", z.ZodTypeAny, {
4929
+ value: string;
4930
+ type: import("../foundations/index.js").SignInIdentifier.Email;
4931
+ }, {
4932
+ value: string;
4933
+ type: import("../foundations/index.js").SignInIdentifier.Email;
4934
+ }>;
4935
+ }, "strip", z.ZodTypeAny, {
4936
+ type: import("./index.js").VerificationType.MfaEmailVerificationCode;
4937
+ id: string;
4938
+ identifier: {
4939
+ value: string;
4940
+ type: import("../foundations/index.js").SignInIdentifier.Email;
4941
+ };
4942
+ templateType: import("../foundations/index.js").TemplateType;
4943
+ verified: boolean;
4944
+ }, {
4945
+ type: import("./index.js").VerificationType.MfaEmailVerificationCode;
4946
+ id: string;
4947
+ identifier: {
4948
+ value: string;
4949
+ type: import("../foundations/index.js").SignInIdentifier.Email;
4950
+ };
4951
+ templateType: import("../foundations/index.js").TemplateType;
4952
+ verified: boolean;
4953
+ }>, z.ZodObject<{
4954
+ id: z.ZodString;
4955
+ templateType: z.ZodNativeEnum<typeof import("../foundations/index.js").TemplateType>;
4956
+ verified: z.ZodBoolean;
4957
+ } & {
4958
+ type: z.ZodLiteral<import("./index.js").VerificationType.MfaPhoneVerificationCode>;
4959
+ identifier: z.ZodObject<{
4960
+ type: z.ZodLiteral<import("../foundations/index.js").SignInIdentifier.Phone>;
4961
+ value: z.ZodString;
4962
+ }, "strip", z.ZodTypeAny, {
4963
+ value: string;
4964
+ type: import("../foundations/index.js").SignInIdentifier.Phone;
4965
+ }, {
4966
+ value: string;
4967
+ type: import("../foundations/index.js").SignInIdentifier.Phone;
4968
+ }>;
4969
+ }, "strip", z.ZodTypeAny, {
4970
+ type: import("./index.js").VerificationType.MfaPhoneVerificationCode;
4971
+ id: string;
4972
+ identifier: {
4973
+ value: string;
4974
+ type: import("../foundations/index.js").SignInIdentifier.Phone;
4975
+ };
4976
+ templateType: import("../foundations/index.js").TemplateType;
4977
+ verified: boolean;
4978
+ }, {
4979
+ type: import("./index.js").VerificationType.MfaPhoneVerificationCode;
4980
+ id: string;
4981
+ identifier: {
4982
+ value: string;
4983
+ type: import("../foundations/index.js").SignInIdentifier.Phone;
4984
+ };
4985
+ templateType: import("../foundations/index.js").TemplateType;
4986
+ verified: boolean;
4987
+ }>, z.ZodObject<Omit<{
4988
+ id: z.ZodString;
4989
+ connectorId: z.ZodString;
4990
+ type: z.ZodLiteral<import("./index.js").VerificationType.Social>;
4991
+ socialUserInfo: z.ZodOptional<z.ZodObject<{
4992
+ id: z.ZodString;
4993
+ email: z.ZodOptional<z.ZodString>;
4994
+ phone: z.ZodOptional<z.ZodString>;
4995
+ name: z.ZodOptional<z.ZodString>;
4996
+ avatar: z.ZodOptional<z.ZodString>;
4997
+ rawData: z.ZodOptional<z.ZodType<import("@withtyped/server/lib/types.js").Json, z.ZodTypeDef, import("@withtyped/server/lib/types.js").Json>>;
4998
+ }, "strip", z.ZodTypeAny, {
4999
+ id: string;
5000
+ name?: string | undefined;
5001
+ email?: string | undefined;
5002
+ phone?: string | undefined;
5003
+ avatar?: string | undefined;
5004
+ rawData?: import("@withtyped/server/lib/types.js").Json | undefined;
5005
+ }, {
5006
+ id: string;
5007
+ name?: string | undefined;
5008
+ email?: string | undefined;
5009
+ phone?: string | undefined;
5010
+ avatar?: string | undefined;
5011
+ rawData?: import("@withtyped/server/lib/types.js").Json | undefined;
5012
+ }>>;
5013
+ encryptedTokenSet: z.ZodOptional<z.ZodObject<{
5014
+ encryptedTokenSetBase64: z.ZodString;
5015
+ metadata: z.ZodObject<{
5016
+ scope: z.ZodOptional<z.ZodString>;
5017
+ expiresAt: z.ZodOptional<z.ZodNumber>;
5018
+ tokenType: z.ZodOptional<z.ZodString>;
5019
+ hasRefreshToken: z.ZodBoolean;
5020
+ }, "strip", z.ZodTypeAny, {
5021
+ hasRefreshToken: boolean;
5022
+ scope?: string | undefined;
5023
+ expiresAt?: number | undefined;
5024
+ tokenType?: string | undefined;
5025
+ }, {
5026
+ hasRefreshToken: boolean;
5027
+ scope?: string | undefined;
5028
+ expiresAt?: number | undefined;
5029
+ tokenType?: string | undefined;
5030
+ }>;
5031
+ }, "strip", z.ZodTypeAny, {
5032
+ metadata: {
5033
+ hasRefreshToken: boolean;
5034
+ scope?: string | undefined;
5035
+ expiresAt?: number | undefined;
5036
+ tokenType?: string | undefined;
5037
+ };
5038
+ encryptedTokenSetBase64: string;
5039
+ }, {
5040
+ metadata: {
5041
+ hasRefreshToken: boolean;
5042
+ scope?: string | undefined;
5043
+ expiresAt?: number | undefined;
5044
+ tokenType?: string | undefined;
5045
+ };
5046
+ encryptedTokenSetBase64: string;
5047
+ }>>;
5048
+ connectorSession: z.ZodOptional<z.ZodObject<{
5049
+ nonce: z.ZodOptional<z.ZodString>;
5050
+ redirectUri: z.ZodOptional<z.ZodString>;
5051
+ connectorId: z.ZodOptional<z.ZodString>;
5052
+ connectorFactoryId: z.ZodOptional<z.ZodString>;
5053
+ jti: z.ZodOptional<z.ZodString>;
5054
+ state: z.ZodOptional<z.ZodString>;
5055
+ }, "strip", z.ZodUnknown, z.objectOutputType<{
5056
+ nonce: z.ZodOptional<z.ZodString>;
5057
+ redirectUri: z.ZodOptional<z.ZodString>;
5058
+ connectorId: z.ZodOptional<z.ZodString>;
5059
+ connectorFactoryId: z.ZodOptional<z.ZodString>;
5060
+ jti: z.ZodOptional<z.ZodString>;
5061
+ state: z.ZodOptional<z.ZodString>;
5062
+ }, z.ZodUnknown, "strip">, z.objectInputType<{
5063
+ nonce: z.ZodOptional<z.ZodString>;
5064
+ redirectUri: z.ZodOptional<z.ZodString>;
5065
+ connectorId: z.ZodOptional<z.ZodString>;
5066
+ connectorFactoryId: z.ZodOptional<z.ZodString>;
5067
+ jti: z.ZodOptional<z.ZodString>;
5068
+ state: z.ZodOptional<z.ZodString>;
5069
+ }, z.ZodUnknown, "strip">>>;
5070
+ }, "encryptedTokenSet" | "connectorSession">, "strip", z.ZodTypeAny, {
5071
+ type: import("./index.js").VerificationType.Social;
5072
+ id: string;
5073
+ connectorId: string;
5074
+ socialUserInfo?: {
5075
+ id: string;
5076
+ name?: string | undefined;
5077
+ email?: string | undefined;
5078
+ phone?: string | undefined;
5079
+ avatar?: string | undefined;
5080
+ rawData?: import("@withtyped/server/lib/types.js").Json | undefined;
5081
+ } | undefined;
5082
+ }, {
5083
+ type: import("./index.js").VerificationType.Social;
5084
+ id: string;
5085
+ connectorId: string;
5086
+ socialUserInfo?: {
5087
+ id: string;
5088
+ name?: string | undefined;
5089
+ email?: string | undefined;
5090
+ phone?: string | undefined;
5091
+ avatar?: string | undefined;
5092
+ rawData?: import("@withtyped/server/lib/types.js").Json | undefined;
5093
+ } | undefined;
5094
+ }>, z.ZodObject<{
5095
+ type: z.ZodLiteral<import("./index.js").VerificationType.EnterpriseSso>;
5096
+ id: z.ZodString;
5097
+ issuer: z.ZodOptional<z.ZodString>;
5098
+ connectorId: z.ZodString;
5099
+ } & {
5100
+ enterpriseSsoUserInfo: z.ZodOptional<z.ZodObject<{
5101
+ id: z.ZodString;
5102
+ email: z.ZodOptional<z.ZodString>;
5103
+ phone: z.ZodOptional<z.ZodString>;
5104
+ name: z.ZodOptional<z.ZodString>;
5105
+ avatar: z.ZodOptional<z.ZodString>;
5106
+ rawData: z.ZodOptional<z.ZodType<import("@withtyped/server/lib/types.js").Json, z.ZodTypeDef, import("@withtyped/server/lib/types.js").Json>>;
5107
+ }, "strip", z.ZodType<import("@withtyped/server/lib/types.js").Json, z.ZodTypeDef, import("@withtyped/server/lib/types.js").Json>, {
5108
+ id: string;
5109
+ name?: string | undefined;
5110
+ email?: string | undefined;
5111
+ phone?: string | undefined;
5112
+ avatar?: string | undefined;
5113
+ rawData?: import("@withtyped/server/lib/types.js").Json | undefined;
5114
+ }, {
5115
+ id: string;
5116
+ name?: string | undefined;
5117
+ email?: string | undefined;
5118
+ phone?: string | undefined;
5119
+ avatar?: string | undefined;
5120
+ rawData?: import("@withtyped/server/lib/types.js").Json | undefined;
5121
+ }>>;
5122
+ }, "strip", z.ZodTypeAny, {
5123
+ type: import("./index.js").VerificationType.EnterpriseSso;
5124
+ id: string;
5125
+ connectorId: string;
5126
+ issuer?: string | undefined;
5127
+ enterpriseSsoUserInfo?: {
5128
+ id: string;
5129
+ name?: string | undefined;
5130
+ email?: string | undefined;
5131
+ phone?: string | undefined;
5132
+ avatar?: string | undefined;
5133
+ rawData?: import("@withtyped/server/lib/types.js").Json | undefined;
5134
+ } | undefined;
5135
+ }, {
5136
+ type: import("./index.js").VerificationType.EnterpriseSso;
5137
+ id: string;
5138
+ connectorId: string;
5139
+ issuer?: string | undefined;
5140
+ enterpriseSsoUserInfo?: {
5141
+ id: string;
5142
+ name?: string | undefined;
5143
+ email?: string | undefined;
5144
+ phone?: string | undefined;
5145
+ avatar?: string | undefined;
5146
+ rawData?: import("@withtyped/server/lib/types.js").Json | undefined;
5147
+ } | undefined;
5148
+ }>, z.ZodObject<Omit<{
5149
+ id: z.ZodString;
5150
+ type: z.ZodLiteral<import("./index.js").VerificationType.TOTP>;
5151
+ userId: z.ZodString;
5152
+ secret: z.ZodOptional<z.ZodString>;
5153
+ verified: z.ZodBoolean;
5154
+ }, "secret">, "strip", z.ZodTypeAny, {
5155
+ type: import("./index.js").VerificationType.TOTP;
5156
+ id: string;
5157
+ userId: string;
5158
+ verified: boolean;
5159
+ }, {
5160
+ type: import("./index.js").VerificationType.TOTP;
5161
+ id: string;
5162
+ userId: string;
5163
+ verified: boolean;
5164
+ }>, z.ZodObject<Omit<{
5165
+ id: z.ZodString;
5166
+ type: z.ZodLiteral<import("./index.js").VerificationType.BackupCode>;
5167
+ userId: z.ZodString;
5168
+ code: z.ZodOptional<z.ZodString>;
5169
+ backupCodes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
5170
+ }, "backupCodes">, "strip", z.ZodTypeAny, {
5171
+ type: import("./index.js").VerificationType.BackupCode;
5172
+ id: string;
5173
+ userId: string;
5174
+ code?: string | undefined;
5175
+ }, {
5176
+ type: import("./index.js").VerificationType.BackupCode;
5177
+ id: string;
5178
+ userId: string;
5179
+ code?: string | undefined;
5180
+ }>, z.ZodObject<Omit<{
5181
+ id: z.ZodString;
5182
+ verified: z.ZodBoolean;
5183
+ registrationChallenge: z.ZodOptional<z.ZodString>;
5184
+ registrationRpId: z.ZodOptional<z.ZodString>;
5185
+ authenticationChallenge: z.ZodOptional<z.ZodString>;
5186
+ registrationInfo: z.ZodOptional<z.ZodObject<{
5187
+ type: z.ZodLiteral<import("../foundations/index.js").MfaFactor.WebAuthn>;
5188
+ rpId: z.ZodString;
5189
+ credentialId: z.ZodString;
5190
+ publicKey: z.ZodString;
5191
+ transports: z.ZodArray<z.ZodEnum<["usb", "nfc", "ble", "internal", "cable", "hybrid", "smart-card"]>, "many">;
5192
+ counter: z.ZodNumber;
5193
+ agent: z.ZodString;
5194
+ name: z.ZodOptional<z.ZodString>;
5195
+ }, "strip", z.ZodTypeAny, {
5196
+ type: import("../foundations/index.js").MfaFactor.WebAuthn;
5197
+ rpId: string;
5198
+ credentialId: string;
5199
+ publicKey: string;
5200
+ transports: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[];
5201
+ counter: number;
5202
+ agent: string;
5203
+ name?: string | undefined;
5204
+ }, {
5205
+ type: import("../foundations/index.js").MfaFactor.WebAuthn;
5206
+ rpId: string;
5207
+ credentialId: string;
5208
+ publicKey: string;
5209
+ transports: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[];
5210
+ counter: number;
5211
+ agent: string;
5212
+ name?: string | undefined;
5213
+ }>>;
5214
+ } & {
5215
+ type: z.ZodLiteral<import("./index.js").VerificationType.WebAuthn>;
5216
+ userId: z.ZodString;
5217
+ }, "registrationChallenge" | "authenticationChallenge" | "registrationInfo">, "strip", z.ZodTypeAny, {
5218
+ type: import("./index.js").VerificationType.WebAuthn;
5219
+ id: string;
5220
+ userId: string;
5221
+ verified: boolean;
5222
+ registrationRpId?: string | undefined;
5223
+ }, {
5224
+ type: import("./index.js").VerificationType.WebAuthn;
5225
+ id: string;
5226
+ userId: string;
5227
+ verified: boolean;
5228
+ registrationRpId?: string | undefined;
5229
+ }>, z.ZodObject<Omit<{
5230
+ id: z.ZodString;
5231
+ verified: z.ZodBoolean;
5232
+ registrationChallenge: z.ZodOptional<z.ZodString>;
5233
+ registrationRpId: z.ZodOptional<z.ZodString>;
5234
+ authenticationChallenge: z.ZodOptional<z.ZodString>;
5235
+ registrationInfo: z.ZodOptional<z.ZodObject<{
5236
+ type: z.ZodLiteral<import("../foundations/index.js").MfaFactor.WebAuthn>;
5237
+ rpId: z.ZodString;
5238
+ credentialId: z.ZodString;
5239
+ publicKey: z.ZodString;
5240
+ transports: z.ZodArray<z.ZodEnum<["usb", "nfc", "ble", "internal", "cable", "hybrid", "smart-card"]>, "many">;
5241
+ counter: z.ZodNumber;
5242
+ agent: z.ZodString;
5243
+ name: z.ZodOptional<z.ZodString>;
5244
+ }, "strip", z.ZodTypeAny, {
5245
+ type: import("../foundations/index.js").MfaFactor.WebAuthn;
5246
+ rpId: string;
5247
+ credentialId: string;
5248
+ publicKey: string;
5249
+ transports: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[];
5250
+ counter: number;
5251
+ agent: string;
5252
+ name?: string | undefined;
5253
+ }, {
5254
+ type: import("../foundations/index.js").MfaFactor.WebAuthn;
5255
+ rpId: string;
5256
+ credentialId: string;
5257
+ publicKey: string;
5258
+ transports: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[];
5259
+ counter: number;
5260
+ agent: string;
5261
+ name?: string | undefined;
5262
+ }>>;
5263
+ } & {
5264
+ type: z.ZodLiteral<import("./index.js").VerificationType.SignInPasskey>;
5265
+ userId: z.ZodOptional<z.ZodString>;
5266
+ authenticationRpId: z.ZodOptional<z.ZodString>;
5267
+ }, "registrationChallenge" | "authenticationChallenge" | "registrationInfo" | "authenticationRpId">, "strip", z.ZodTypeAny, {
5268
+ type: import("./index.js").VerificationType.SignInPasskey;
5269
+ id: string;
5270
+ verified: boolean;
5271
+ userId?: string | undefined;
5272
+ registrationRpId?: string | undefined;
5273
+ }, {
5274
+ type: import("./index.js").VerificationType.SignInPasskey;
5275
+ id: string;
5276
+ verified: boolean;
5277
+ userId?: string | undefined;
5278
+ registrationRpId?: string | undefined;
5279
+ }>, z.ZodObject<{
5280
+ id: z.ZodString;
5281
+ type: z.ZodLiteral<import("./index.js").VerificationType.OneTimeToken>;
5282
+ verified: z.ZodBoolean;
5283
+ identifier: z.ZodObject<{
5284
+ type: z.ZodLiteral<import("../foundations/index.js").SignInIdentifier.Email>;
5285
+ value: z.ZodString;
5286
+ }, "strip", z.ZodTypeAny, {
5287
+ value: string;
5288
+ type: import("../foundations/index.js").SignInIdentifier.Email;
5289
+ }, {
5290
+ value: string;
5291
+ type: import("../foundations/index.js").SignInIdentifier.Email;
5292
+ }>;
5293
+ oneTimeTokenContext: z.ZodOptional<z.ZodObject<{
5294
+ jitOrganizationIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
5295
+ }, "strip", z.ZodTypeAny, {
5296
+ jitOrganizationIds?: string[] | undefined;
5297
+ }, {
5298
+ jitOrganizationIds?: string[] | undefined;
5299
+ }>>;
5300
+ }, "strip", z.ZodTypeAny, {
5301
+ type: import("./index.js").VerificationType.OneTimeToken;
5302
+ id: string;
5303
+ identifier: {
5304
+ value: string;
5305
+ type: import("../foundations/index.js").SignInIdentifier.Email;
5306
+ };
5307
+ verified: boolean;
5308
+ oneTimeTokenContext?: {
5309
+ jitOrganizationIds?: string[] | undefined;
5310
+ } | undefined;
5311
+ }, {
5312
+ type: import("./index.js").VerificationType.OneTimeToken;
5313
+ id: string;
5314
+ identifier: {
5315
+ value: string;
5316
+ type: import("../foundations/index.js").SignInIdentifier.Email;
5317
+ };
5318
+ verified: boolean;
5319
+ oneTimeTokenContext?: {
5320
+ jitOrganizationIds?: string[] | undefined;
5321
+ } | undefined;
5322
+ }>, z.ZodObject<Omit<{
5323
+ id: z.ZodString;
5324
+ type: z.ZodLiteral<import("./index.js").VerificationType.NewPasswordIdentity>;
5325
+ identifier: z.ZodObject<{
5326
+ type: z.ZodNativeEnum<typeof import("../foundations/index.js").SignInIdentifier>;
5327
+ value: z.ZodString;
5328
+ }, "strip", z.ZodTypeAny, {
5329
+ value: string;
5330
+ type: import("../foundations/index.js").SignInIdentifier;
5331
+ }, {
5332
+ value: string;
5333
+ type: import("../foundations/index.js").SignInIdentifier;
5334
+ }>;
5335
+ passwordEncrypted: z.ZodOptional<z.ZodString>;
5336
+ passwordEncryptionMethod: z.ZodOptional<z.ZodLiteral<import("../index.js").UsersPasswordEncryptionMethod.Argon2i>>;
5337
+ }, "passwordEncrypted" | "passwordEncryptionMethod">, "strip", z.ZodTypeAny, {
5338
+ type: import("./index.js").VerificationType.NewPasswordIdentity;
5339
+ id: string;
5340
+ identifier: {
5341
+ value: string;
5342
+ type: import("../foundations/index.js").SignInIdentifier;
5343
+ };
5344
+ }, {
5345
+ type: import("./index.js").VerificationType.NewPasswordIdentity;
5346
+ id: string;
5347
+ identifier: {
5348
+ value: string;
5349
+ type: import("../foundations/index.js").SignInIdentifier;
5350
+ };
5351
+ }>]>, "many">;
5352
+ signInContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
5353
+ }, "strip", z.ZodTypeAny, {
5354
+ userId: string;
5355
+ interactionEvent: import("./interactions.js").InteractionEvent;
5356
+ verificationRecords: ({
5357
+ type: import("./index.js").VerificationType.BackupCode;
5358
+ id: string;
5359
+ userId: string;
5360
+ code?: string | undefined;
5361
+ } | {
5362
+ type: import("./index.js").VerificationType.EmailVerificationCode;
5363
+ id: string;
5364
+ identifier: {
5365
+ value: string;
5366
+ type: import("../foundations/index.js").SignInIdentifier.Email;
5367
+ };
5368
+ templateType: import("../foundations/index.js").TemplateType;
5369
+ verified: boolean;
5370
+ } | {
5371
+ type: import("./index.js").VerificationType.PhoneVerificationCode;
5372
+ id: string;
5373
+ identifier: {
5374
+ value: string;
5375
+ type: import("../foundations/index.js").SignInIdentifier.Phone;
5376
+ };
5377
+ templateType: import("../foundations/index.js").TemplateType;
5378
+ verified: boolean;
5379
+ } | {
5380
+ type: import("./index.js").VerificationType.MfaEmailVerificationCode;
5381
+ id: string;
5382
+ identifier: {
5383
+ value: string;
5384
+ type: import("../foundations/index.js").SignInIdentifier.Email;
5385
+ };
5386
+ templateType: import("../foundations/index.js").TemplateType;
5387
+ verified: boolean;
5388
+ } | {
5389
+ type: import("./index.js").VerificationType.MfaPhoneVerificationCode;
5390
+ id: string;
5391
+ identifier: {
5392
+ value: string;
5393
+ type: import("../foundations/index.js").SignInIdentifier.Phone;
5394
+ };
5395
+ templateType: import("../foundations/index.js").TemplateType;
5396
+ verified: boolean;
5397
+ } | {
5398
+ type: import("./index.js").VerificationType.NewPasswordIdentity;
5399
+ id: string;
5400
+ identifier: {
5401
+ value: string;
5402
+ type: import("../foundations/index.js").SignInIdentifier;
5403
+ };
5404
+ } | {
5405
+ type: import("./index.js").VerificationType.OneTimeToken;
5406
+ id: string;
5407
+ identifier: {
5408
+ value: string;
5409
+ type: import("../foundations/index.js").SignInIdentifier.Email;
5410
+ };
5411
+ verified: boolean;
5412
+ oneTimeTokenContext?: {
5413
+ jitOrganizationIds?: string[] | undefined;
5414
+ } | undefined;
5415
+ } | {
5416
+ type: import("./index.js").VerificationType.Password;
5417
+ id: string;
5418
+ identifier: {
5419
+ value: string;
5420
+ type: import("../foundations/index.js").SignInIdentifier | import("../foundations/index.js").AdditionalIdentifier;
5421
+ };
5422
+ verified: boolean;
5423
+ } | {
5424
+ type: import("./index.js").VerificationType.Social;
5425
+ id: string;
5426
+ connectorId: string;
5427
+ socialUserInfo?: {
5428
+ id: string;
5429
+ name?: string | undefined;
5430
+ email?: string | undefined;
5431
+ phone?: string | undefined;
5432
+ avatar?: string | undefined;
5433
+ rawData?: import("@withtyped/server/lib/types.js").Json | undefined;
5434
+ } | undefined;
5435
+ } | {
5436
+ type: import("./index.js").VerificationType.TOTP;
5437
+ id: string;
5438
+ userId: string;
5439
+ verified: boolean;
5440
+ } | {
5441
+ type: import("./index.js").VerificationType.EnterpriseSso;
5442
+ id: string;
5443
+ connectorId: string;
5444
+ issuer?: string | undefined;
5445
+ enterpriseSsoUserInfo?: {
5446
+ id: string;
5447
+ name?: string | undefined;
5448
+ email?: string | undefined;
5449
+ phone?: string | undefined;
5450
+ avatar?: string | undefined;
5451
+ rawData?: import("@withtyped/server/lib/types.js").Json | undefined;
5452
+ } | undefined;
5453
+ } | {
5454
+ type: import("./index.js").VerificationType.WebAuthn;
5455
+ id: string;
5456
+ userId: string;
5457
+ verified: boolean;
5458
+ registrationRpId?: string | undefined;
5459
+ } | {
5460
+ type: import("./index.js").VerificationType.SignInPasskey;
5461
+ id: string;
5462
+ verified: boolean;
5463
+ userId?: string | undefined;
5464
+ registrationRpId?: string | undefined;
5465
+ })[];
5466
+ signInContext?: Record<string, string> | undefined;
5467
+ }, {
5468
+ userId: string;
5469
+ interactionEvent: import("./interactions.js").InteractionEvent;
5470
+ verificationRecords: ({
5471
+ type: import("./index.js").VerificationType.BackupCode;
5472
+ id: string;
5473
+ userId: string;
5474
+ code?: string | undefined;
5475
+ } | {
5476
+ type: import("./index.js").VerificationType.EmailVerificationCode;
5477
+ id: string;
5478
+ identifier: {
5479
+ value: string;
5480
+ type: import("../foundations/index.js").SignInIdentifier.Email;
5481
+ };
5482
+ templateType: import("../foundations/index.js").TemplateType;
5483
+ verified: boolean;
5484
+ } | {
5485
+ type: import("./index.js").VerificationType.PhoneVerificationCode;
5486
+ id: string;
5487
+ identifier: {
5488
+ value: string;
5489
+ type: import("../foundations/index.js").SignInIdentifier.Phone;
5490
+ };
5491
+ templateType: import("../foundations/index.js").TemplateType;
5492
+ verified: boolean;
5493
+ } | {
5494
+ type: import("./index.js").VerificationType.MfaEmailVerificationCode;
5495
+ id: string;
5496
+ identifier: {
5497
+ value: string;
5498
+ type: import("../foundations/index.js").SignInIdentifier.Email;
5499
+ };
5500
+ templateType: import("../foundations/index.js").TemplateType;
5501
+ verified: boolean;
5502
+ } | {
5503
+ type: import("./index.js").VerificationType.MfaPhoneVerificationCode;
5504
+ id: string;
5505
+ identifier: {
5506
+ value: string;
5507
+ type: import("../foundations/index.js").SignInIdentifier.Phone;
5508
+ };
5509
+ templateType: import("../foundations/index.js").TemplateType;
5510
+ verified: boolean;
5511
+ } | {
5512
+ type: import("./index.js").VerificationType.NewPasswordIdentity;
5513
+ id: string;
5514
+ identifier: {
5515
+ value: string;
5516
+ type: import("../foundations/index.js").SignInIdentifier;
5517
+ };
5518
+ } | {
5519
+ type: import("./index.js").VerificationType.OneTimeToken;
5520
+ id: string;
5521
+ identifier: {
5522
+ value: string;
5523
+ type: import("../foundations/index.js").SignInIdentifier.Email;
5524
+ };
5525
+ verified: boolean;
5526
+ oneTimeTokenContext?: {
5527
+ jitOrganizationIds?: string[] | undefined;
5528
+ } | undefined;
5529
+ } | {
5530
+ type: import("./index.js").VerificationType.Password;
5531
+ id: string;
5532
+ identifier: {
5533
+ value: string;
5534
+ type: import("../foundations/index.js").SignInIdentifier | import("../foundations/index.js").AdditionalIdentifier;
5535
+ };
5536
+ verified: boolean;
5537
+ } | {
5538
+ type: import("./index.js").VerificationType.Social;
5539
+ id: string;
5540
+ connectorId: string;
5541
+ socialUserInfo?: {
5542
+ id: string;
5543
+ name?: string | undefined;
5544
+ email?: string | undefined;
5545
+ phone?: string | undefined;
5546
+ avatar?: string | undefined;
5547
+ rawData?: import("@withtyped/server/lib/types.js").Json | undefined;
5548
+ } | undefined;
5549
+ } | {
5550
+ type: import("./index.js").VerificationType.TOTP;
5551
+ id: string;
5552
+ userId: string;
5553
+ verified: boolean;
5554
+ } | {
5555
+ type: import("./index.js").VerificationType.EnterpriseSso;
5556
+ id: string;
5557
+ connectorId: string;
5558
+ issuer?: string | undefined;
5559
+ enterpriseSsoUserInfo?: {
5560
+ id: string;
5561
+ name?: string | undefined;
5562
+ email?: string | undefined;
5563
+ phone?: string | undefined;
5564
+ avatar?: string | undefined;
5565
+ rawData?: import("@withtyped/server/lib/types.js").Json | undefined;
5566
+ } | undefined;
5567
+ } | {
5568
+ type: import("./index.js").VerificationType.WebAuthn;
5569
+ id: string;
5570
+ userId: string;
5571
+ verified: boolean;
5572
+ registrationRpId?: string | undefined;
5573
+ } | {
5574
+ type: import("./index.js").VerificationType.SignInPasskey;
5575
+ id: string;
5576
+ verified: boolean;
5577
+ userId?: string | undefined;
5578
+ registrationRpId?: string | undefined;
5579
+ })[];
5580
+ signInContext?: Record<string, string> | undefined;
5581
+ }>>;
5582
+ clientId: z.ZodNullable<z.ZodString>;
5583
+ accountId: z.ZodNullable<z.ZodString>;
5584
+ expiresAt: z.ZodNumber;
5585
+ } & {
5586
+ /**
5587
+ * `true` for the entry whose `payload.uid` matches the calling session, `false` for
5588
+ * the others. At most one entry is `true` per response. Zero entries are tagged when
5589
+ * the calling access token has no matching session uid — for example, the caller has
5590
+ * revoked its own session but the token has not yet expired, or the token was issued
5591
+ * from a non-session-backed grant.
5592
+ */
5593
+ isCurrent: z.ZodBoolean;
5594
+ }, "strip", z.ZodTypeAny, {
5595
+ accountId: string | null;
5596
+ expiresAt: number;
5597
+ payload: {
5598
+ uid: string;
5599
+ exp: number;
5600
+ iat: number;
5601
+ jti: string;
5602
+ kind: "Session";
5603
+ loginTs: number;
5604
+ accountId: string;
5605
+ authorizations?: Record<string, z.objectOutputType<{
5606
+ sid: z.ZodOptional<z.ZodString>;
5607
+ grantId: z.ZodOptional<z.ZodString>;
5608
+ persistsLogout: z.ZodOptional<z.ZodBoolean>;
5609
+ }, z.ZodUnknown, "strip">> | undefined;
5610
+ } & {
5611
+ [k: string]: unknown;
5612
+ };
5613
+ lastSubmission: {
5614
+ userId: string;
5615
+ interactionEvent: import("./interactions.js").InteractionEvent;
5616
+ verificationRecords: ({
5617
+ type: import("./index.js").VerificationType.BackupCode;
5618
+ id: string;
5619
+ userId: string;
5620
+ code?: string | undefined;
5621
+ } | {
5622
+ type: import("./index.js").VerificationType.EmailVerificationCode;
5623
+ id: string;
5624
+ identifier: {
5625
+ value: string;
5626
+ type: import("../foundations/index.js").SignInIdentifier.Email;
5627
+ };
5628
+ templateType: import("../foundations/index.js").TemplateType;
5629
+ verified: boolean;
5630
+ } | {
5631
+ type: import("./index.js").VerificationType.PhoneVerificationCode;
5632
+ id: string;
5633
+ identifier: {
5634
+ value: string;
5635
+ type: import("../foundations/index.js").SignInIdentifier.Phone;
5636
+ };
5637
+ templateType: import("../foundations/index.js").TemplateType;
5638
+ verified: boolean;
5639
+ } | {
5640
+ type: import("./index.js").VerificationType.MfaEmailVerificationCode;
5641
+ id: string;
5642
+ identifier: {
5643
+ value: string;
5644
+ type: import("../foundations/index.js").SignInIdentifier.Email;
5645
+ };
5646
+ templateType: import("../foundations/index.js").TemplateType;
5647
+ verified: boolean;
5648
+ } | {
5649
+ type: import("./index.js").VerificationType.MfaPhoneVerificationCode;
5650
+ id: string;
5651
+ identifier: {
5652
+ value: string;
5653
+ type: import("../foundations/index.js").SignInIdentifier.Phone;
5654
+ };
5655
+ templateType: import("../foundations/index.js").TemplateType;
5656
+ verified: boolean;
5657
+ } | {
5658
+ type: import("./index.js").VerificationType.NewPasswordIdentity;
5659
+ id: string;
5660
+ identifier: {
5661
+ value: string;
5662
+ type: import("../foundations/index.js").SignInIdentifier;
5663
+ };
5664
+ } | {
5665
+ type: import("./index.js").VerificationType.OneTimeToken;
5666
+ id: string;
5667
+ identifier: {
5668
+ value: string;
5669
+ type: import("../foundations/index.js").SignInIdentifier.Email;
5670
+ };
5671
+ verified: boolean;
5672
+ oneTimeTokenContext?: {
5673
+ jitOrganizationIds?: string[] | undefined;
5674
+ } | undefined;
5675
+ } | {
5676
+ type: import("./index.js").VerificationType.Password;
5677
+ id: string;
5678
+ identifier: {
5679
+ value: string;
5680
+ type: import("../foundations/index.js").SignInIdentifier | import("../foundations/index.js").AdditionalIdentifier;
5681
+ };
5682
+ verified: boolean;
5683
+ } | {
5684
+ type: import("./index.js").VerificationType.Social;
5685
+ id: string;
5686
+ connectorId: string;
5687
+ socialUserInfo?: {
5688
+ id: string;
5689
+ name?: string | undefined;
5690
+ email?: string | undefined;
5691
+ phone?: string | undefined;
5692
+ avatar?: string | undefined;
5693
+ rawData?: import("@withtyped/server/lib/types.js").Json | undefined;
5694
+ } | undefined;
5695
+ } | {
5696
+ type: import("./index.js").VerificationType.TOTP;
5697
+ id: string;
5698
+ userId: string;
5699
+ verified: boolean;
5700
+ } | {
5701
+ type: import("./index.js").VerificationType.EnterpriseSso;
5702
+ id: string;
5703
+ connectorId: string;
5704
+ issuer?: string | undefined;
5705
+ enterpriseSsoUserInfo?: {
5706
+ id: string;
5707
+ name?: string | undefined;
5708
+ email?: string | undefined;
5709
+ phone?: string | undefined;
5710
+ avatar?: string | undefined;
5711
+ rawData?: import("@withtyped/server/lib/types.js").Json | undefined;
5712
+ } | undefined;
5713
+ } | {
5714
+ type: import("./index.js").VerificationType.WebAuthn;
5715
+ id: string;
5716
+ userId: string;
5717
+ verified: boolean;
5718
+ registrationRpId?: string | undefined;
5719
+ } | {
5720
+ type: import("./index.js").VerificationType.SignInPasskey;
5721
+ id: string;
5722
+ verified: boolean;
5723
+ userId?: string | undefined;
5724
+ registrationRpId?: string | undefined;
5725
+ })[];
5726
+ signInContext?: Record<string, string> | undefined;
5727
+ } | null;
5728
+ clientId: string | null;
5729
+ isCurrent: boolean;
5730
+ }, {
5731
+ accountId: string | null;
5732
+ expiresAt: number;
5733
+ payload: {
5734
+ uid: string;
5735
+ exp: number;
5736
+ iat: number;
5737
+ jti: string;
5738
+ kind: "Session";
5739
+ loginTs: number;
5740
+ accountId: string;
5741
+ authorizations?: Record<string, z.objectInputType<{
5742
+ sid: z.ZodOptional<z.ZodString>;
5743
+ grantId: z.ZodOptional<z.ZodString>;
5744
+ persistsLogout: z.ZodOptional<z.ZodBoolean>;
5745
+ }, z.ZodUnknown, "strip">> | undefined;
5746
+ } & {
5747
+ [k: string]: unknown;
5748
+ };
5749
+ lastSubmission: {
5750
+ userId: string;
5751
+ interactionEvent: import("./interactions.js").InteractionEvent;
5752
+ verificationRecords: ({
5753
+ type: import("./index.js").VerificationType.BackupCode;
5754
+ id: string;
5755
+ userId: string;
5756
+ code?: string | undefined;
5757
+ } | {
5758
+ type: import("./index.js").VerificationType.EmailVerificationCode;
5759
+ id: string;
5760
+ identifier: {
5761
+ value: string;
5762
+ type: import("../foundations/index.js").SignInIdentifier.Email;
5763
+ };
5764
+ templateType: import("../foundations/index.js").TemplateType;
5765
+ verified: boolean;
5766
+ } | {
5767
+ type: import("./index.js").VerificationType.PhoneVerificationCode;
5768
+ id: string;
5769
+ identifier: {
5770
+ value: string;
5771
+ type: import("../foundations/index.js").SignInIdentifier.Phone;
5772
+ };
5773
+ templateType: import("../foundations/index.js").TemplateType;
5774
+ verified: boolean;
5775
+ } | {
5776
+ type: import("./index.js").VerificationType.MfaEmailVerificationCode;
5777
+ id: string;
5778
+ identifier: {
5779
+ value: string;
5780
+ type: import("../foundations/index.js").SignInIdentifier.Email;
5781
+ };
5782
+ templateType: import("../foundations/index.js").TemplateType;
5783
+ verified: boolean;
5784
+ } | {
5785
+ type: import("./index.js").VerificationType.MfaPhoneVerificationCode;
5786
+ id: string;
5787
+ identifier: {
5788
+ value: string;
5789
+ type: import("../foundations/index.js").SignInIdentifier.Phone;
5790
+ };
5791
+ templateType: import("../foundations/index.js").TemplateType;
5792
+ verified: boolean;
5793
+ } | {
5794
+ type: import("./index.js").VerificationType.NewPasswordIdentity;
5795
+ id: string;
5796
+ identifier: {
5797
+ value: string;
5798
+ type: import("../foundations/index.js").SignInIdentifier;
5799
+ };
5800
+ } | {
5801
+ type: import("./index.js").VerificationType.OneTimeToken;
5802
+ id: string;
5803
+ identifier: {
5804
+ value: string;
5805
+ type: import("../foundations/index.js").SignInIdentifier.Email;
5806
+ };
5807
+ verified: boolean;
5808
+ oneTimeTokenContext?: {
5809
+ jitOrganizationIds?: string[] | undefined;
5810
+ } | undefined;
5811
+ } | {
5812
+ type: import("./index.js").VerificationType.Password;
5813
+ id: string;
5814
+ identifier: {
5815
+ value: string;
5816
+ type: import("../foundations/index.js").SignInIdentifier | import("../foundations/index.js").AdditionalIdentifier;
5817
+ };
5818
+ verified: boolean;
5819
+ } | {
5820
+ type: import("./index.js").VerificationType.Social;
5821
+ id: string;
5822
+ connectorId: string;
5823
+ socialUserInfo?: {
5824
+ id: string;
5825
+ name?: string | undefined;
5826
+ email?: string | undefined;
5827
+ phone?: string | undefined;
5828
+ avatar?: string | undefined;
5829
+ rawData?: import("@withtyped/server/lib/types.js").Json | undefined;
5830
+ } | undefined;
5831
+ } | {
5832
+ type: import("./index.js").VerificationType.TOTP;
5833
+ id: string;
5834
+ userId: string;
5835
+ verified: boolean;
5836
+ } | {
5837
+ type: import("./index.js").VerificationType.EnterpriseSso;
5838
+ id: string;
5839
+ connectorId: string;
5840
+ issuer?: string | undefined;
5841
+ enterpriseSsoUserInfo?: {
5842
+ id: string;
5843
+ name?: string | undefined;
5844
+ email?: string | undefined;
5845
+ phone?: string | undefined;
5846
+ avatar?: string | undefined;
5847
+ rawData?: import("@withtyped/server/lib/types.js").Json | undefined;
5848
+ } | undefined;
5849
+ } | {
5850
+ type: import("./index.js").VerificationType.WebAuthn;
5851
+ id: string;
5852
+ userId: string;
5853
+ verified: boolean;
5854
+ registrationRpId?: string | undefined;
5855
+ } | {
5856
+ type: import("./index.js").VerificationType.SignInPasskey;
5857
+ id: string;
5858
+ verified: boolean;
5859
+ userId?: string | undefined;
5860
+ registrationRpId?: string | undefined;
5861
+ })[];
5862
+ signInContext?: Record<string, string> | undefined;
5863
+ } | null;
5864
+ clientId: string | null;
5865
+ isCurrent: boolean;
5866
+ }>, "many">;
5867
+ }, "strip", z.ZodTypeAny, {
5868
+ sessions: {
5869
+ accountId: string | null;
5870
+ expiresAt: number;
5871
+ payload: {
5872
+ uid: string;
5873
+ exp: number;
5874
+ iat: number;
5875
+ jti: string;
5876
+ kind: "Session";
5877
+ loginTs: number;
5878
+ accountId: string;
5879
+ authorizations?: Record<string, z.objectOutputType<{
5880
+ sid: z.ZodOptional<z.ZodString>;
5881
+ grantId: z.ZodOptional<z.ZodString>;
5882
+ persistsLogout: z.ZodOptional<z.ZodBoolean>;
5883
+ }, z.ZodUnknown, "strip">> | undefined;
5884
+ } & {
5885
+ [k: string]: unknown;
5886
+ };
5887
+ lastSubmission: {
5888
+ userId: string;
5889
+ interactionEvent: import("./interactions.js").InteractionEvent;
5890
+ verificationRecords: ({
5891
+ type: import("./index.js").VerificationType.BackupCode;
5892
+ id: string;
5893
+ userId: string;
5894
+ code?: string | undefined;
5895
+ } | {
5896
+ type: import("./index.js").VerificationType.EmailVerificationCode;
5897
+ id: string;
5898
+ identifier: {
5899
+ value: string;
5900
+ type: import("../foundations/index.js").SignInIdentifier.Email;
5901
+ };
5902
+ templateType: import("../foundations/index.js").TemplateType;
5903
+ verified: boolean;
5904
+ } | {
5905
+ type: import("./index.js").VerificationType.PhoneVerificationCode;
5906
+ id: string;
5907
+ identifier: {
5908
+ value: string;
5909
+ type: import("../foundations/index.js").SignInIdentifier.Phone;
5910
+ };
5911
+ templateType: import("../foundations/index.js").TemplateType;
5912
+ verified: boolean;
5913
+ } | {
5914
+ type: import("./index.js").VerificationType.MfaEmailVerificationCode;
5915
+ id: string;
5916
+ identifier: {
5917
+ value: string;
5918
+ type: import("../foundations/index.js").SignInIdentifier.Email;
5919
+ };
5920
+ templateType: import("../foundations/index.js").TemplateType;
5921
+ verified: boolean;
5922
+ } | {
5923
+ type: import("./index.js").VerificationType.MfaPhoneVerificationCode;
5924
+ id: string;
5925
+ identifier: {
5926
+ value: string;
5927
+ type: import("../foundations/index.js").SignInIdentifier.Phone;
5928
+ };
5929
+ templateType: import("../foundations/index.js").TemplateType;
5930
+ verified: boolean;
5931
+ } | {
5932
+ type: import("./index.js").VerificationType.NewPasswordIdentity;
5933
+ id: string;
5934
+ identifier: {
5935
+ value: string;
5936
+ type: import("../foundations/index.js").SignInIdentifier;
5937
+ };
5938
+ } | {
5939
+ type: import("./index.js").VerificationType.OneTimeToken;
5940
+ id: string;
5941
+ identifier: {
5942
+ value: string;
5943
+ type: import("../foundations/index.js").SignInIdentifier.Email;
5944
+ };
5945
+ verified: boolean;
5946
+ oneTimeTokenContext?: {
5947
+ jitOrganizationIds?: string[] | undefined;
5948
+ } | undefined;
5949
+ } | {
5950
+ type: import("./index.js").VerificationType.Password;
5951
+ id: string;
5952
+ identifier: {
5953
+ value: string;
5954
+ type: import("../foundations/index.js").SignInIdentifier | import("../foundations/index.js").AdditionalIdentifier;
5955
+ };
5956
+ verified: boolean;
5957
+ } | {
5958
+ type: import("./index.js").VerificationType.Social;
5959
+ id: string;
5960
+ connectorId: string;
5961
+ socialUserInfo?: {
5962
+ id: string;
5963
+ name?: string | undefined;
5964
+ email?: string | undefined;
5965
+ phone?: string | undefined;
5966
+ avatar?: string | undefined;
5967
+ rawData?: import("@withtyped/server/lib/types.js").Json | undefined;
5968
+ } | undefined;
5969
+ } | {
5970
+ type: import("./index.js").VerificationType.TOTP;
5971
+ id: string;
5972
+ userId: string;
5973
+ verified: boolean;
5974
+ } | {
5975
+ type: import("./index.js").VerificationType.EnterpriseSso;
5976
+ id: string;
5977
+ connectorId: string;
5978
+ issuer?: string | undefined;
5979
+ enterpriseSsoUserInfo?: {
5980
+ id: string;
5981
+ name?: string | undefined;
5982
+ email?: string | undefined;
5983
+ phone?: string | undefined;
5984
+ avatar?: string | undefined;
5985
+ rawData?: import("@withtyped/server/lib/types.js").Json | undefined;
5986
+ } | undefined;
5987
+ } | {
5988
+ type: import("./index.js").VerificationType.WebAuthn;
5989
+ id: string;
5990
+ userId: string;
5991
+ verified: boolean;
5992
+ registrationRpId?: string | undefined;
5993
+ } | {
5994
+ type: import("./index.js").VerificationType.SignInPasskey;
5995
+ id: string;
5996
+ verified: boolean;
5997
+ userId?: string | undefined;
5998
+ registrationRpId?: string | undefined;
5999
+ })[];
6000
+ signInContext?: Record<string, string> | undefined;
6001
+ } | null;
6002
+ clientId: string | null;
6003
+ isCurrent: boolean;
6004
+ }[];
6005
+ }, {
6006
+ sessions: {
6007
+ accountId: string | null;
6008
+ expiresAt: number;
6009
+ payload: {
6010
+ uid: string;
6011
+ exp: number;
6012
+ iat: number;
6013
+ jti: string;
6014
+ kind: "Session";
6015
+ loginTs: number;
6016
+ accountId: string;
6017
+ authorizations?: Record<string, z.objectInputType<{
6018
+ sid: z.ZodOptional<z.ZodString>;
6019
+ grantId: z.ZodOptional<z.ZodString>;
6020
+ persistsLogout: z.ZodOptional<z.ZodBoolean>;
6021
+ }, z.ZodUnknown, "strip">> | undefined;
6022
+ } & {
6023
+ [k: string]: unknown;
6024
+ };
6025
+ lastSubmission: {
6026
+ userId: string;
6027
+ interactionEvent: import("./interactions.js").InteractionEvent;
6028
+ verificationRecords: ({
6029
+ type: import("./index.js").VerificationType.BackupCode;
6030
+ id: string;
6031
+ userId: string;
6032
+ code?: string | undefined;
6033
+ } | {
6034
+ type: import("./index.js").VerificationType.EmailVerificationCode;
6035
+ id: string;
6036
+ identifier: {
6037
+ value: string;
6038
+ type: import("../foundations/index.js").SignInIdentifier.Email;
6039
+ };
6040
+ templateType: import("../foundations/index.js").TemplateType;
6041
+ verified: boolean;
6042
+ } | {
6043
+ type: import("./index.js").VerificationType.PhoneVerificationCode;
6044
+ id: string;
6045
+ identifier: {
6046
+ value: string;
6047
+ type: import("../foundations/index.js").SignInIdentifier.Phone;
6048
+ };
6049
+ templateType: import("../foundations/index.js").TemplateType;
6050
+ verified: boolean;
6051
+ } | {
6052
+ type: import("./index.js").VerificationType.MfaEmailVerificationCode;
6053
+ id: string;
6054
+ identifier: {
6055
+ value: string;
6056
+ type: import("../foundations/index.js").SignInIdentifier.Email;
6057
+ };
6058
+ templateType: import("../foundations/index.js").TemplateType;
6059
+ verified: boolean;
6060
+ } | {
6061
+ type: import("./index.js").VerificationType.MfaPhoneVerificationCode;
6062
+ id: string;
6063
+ identifier: {
6064
+ value: string;
6065
+ type: import("../foundations/index.js").SignInIdentifier.Phone;
6066
+ };
6067
+ templateType: import("../foundations/index.js").TemplateType;
6068
+ verified: boolean;
6069
+ } | {
6070
+ type: import("./index.js").VerificationType.NewPasswordIdentity;
6071
+ id: string;
6072
+ identifier: {
6073
+ value: string;
6074
+ type: import("../foundations/index.js").SignInIdentifier;
6075
+ };
6076
+ } | {
6077
+ type: import("./index.js").VerificationType.OneTimeToken;
6078
+ id: string;
6079
+ identifier: {
6080
+ value: string;
6081
+ type: import("../foundations/index.js").SignInIdentifier.Email;
6082
+ };
6083
+ verified: boolean;
6084
+ oneTimeTokenContext?: {
6085
+ jitOrganizationIds?: string[] | undefined;
6086
+ } | undefined;
6087
+ } | {
6088
+ type: import("./index.js").VerificationType.Password;
6089
+ id: string;
6090
+ identifier: {
6091
+ value: string;
6092
+ type: import("../foundations/index.js").SignInIdentifier | import("../foundations/index.js").AdditionalIdentifier;
6093
+ };
6094
+ verified: boolean;
6095
+ } | {
6096
+ type: import("./index.js").VerificationType.Social;
6097
+ id: string;
6098
+ connectorId: string;
6099
+ socialUserInfo?: {
6100
+ id: string;
6101
+ name?: string | undefined;
6102
+ email?: string | undefined;
6103
+ phone?: string | undefined;
6104
+ avatar?: string | undefined;
6105
+ rawData?: import("@withtyped/server/lib/types.js").Json | undefined;
6106
+ } | undefined;
6107
+ } | {
6108
+ type: import("./index.js").VerificationType.TOTP;
6109
+ id: string;
6110
+ userId: string;
6111
+ verified: boolean;
6112
+ } | {
6113
+ type: import("./index.js").VerificationType.EnterpriseSso;
6114
+ id: string;
6115
+ connectorId: string;
6116
+ issuer?: string | undefined;
6117
+ enterpriseSsoUserInfo?: {
6118
+ id: string;
6119
+ name?: string | undefined;
6120
+ email?: string | undefined;
6121
+ phone?: string | undefined;
6122
+ avatar?: string | undefined;
6123
+ rawData?: import("@withtyped/server/lib/types.js").Json | undefined;
6124
+ } | undefined;
6125
+ } | {
6126
+ type: import("./index.js").VerificationType.WebAuthn;
6127
+ id: string;
6128
+ userId: string;
6129
+ verified: boolean;
6130
+ registrationRpId?: string | undefined;
6131
+ } | {
6132
+ type: import("./index.js").VerificationType.SignInPasskey;
6133
+ id: string;
6134
+ verified: boolean;
6135
+ userId?: string | undefined;
6136
+ registrationRpId?: string | undefined;
6137
+ })[];
6138
+ signInContext?: Record<string, string> | undefined;
6139
+ } | null;
6140
+ clientId: string | null;
6141
+ isCurrent: boolean;
6142
+ }[];
6143
+ }>;
6144
+ /** Response type for `GET /api/my-account/sessions`. */
6145
+ export type GetAccountUserSessionsResponse = z.infer<typeof getAccountUserSessionsResponseGuard>;
3630
6146
  export declare const userApplicationGrantPayloadGuard: z.ZodObject<{
3631
6147
  /** Expiration time of the grant in seconds since the epoch */
3632
6148
  exp: z.ZodNumber;