tpepmodels

package
v0.17.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 19, 2024 License: Apache-2.0 Imports: 5 Imported by: 23

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIInterface

type APIInterface struct {
	AuthorisationUrlGET      *func(provider *tpmodels.TypeProvider, redirectURIOnProviderDashboard string, tenantId string, options tpmodels.APIOptions, userContext supertokens.UserContext) (tpmodels.AuthorisationUrlGETResponse, error)
	AppleRedirectHandlerPOST *func(formPostInfoFromProvider map[string]interface{}, options tpmodels.APIOptions, userContext supertokens.UserContext) error
	ThirdPartySignInUpPOST   *func(provider *tpmodels.TypeProvider, input tpmodels.TypeSignInUpInput, tenantId string, options tpmodels.APIOptions, userContext supertokens.UserContext) (ThirdPartySignInUpPOSTResponse, error)

	EmailPasswordEmailExistsGET    *func(email string, tenantId string, options epmodels.APIOptions, userContext supertokens.UserContext) (epmodels.EmailExistsGETResponse, error)
	GeneratePasswordResetTokenPOST *func(formFields []epmodels.TypeFormField, tenantId string, options epmodels.APIOptions, userContext supertokens.UserContext) (epmodels.GeneratePasswordResetTokenPOSTResponse, error)
	PasswordResetPOST              *func(formFields []epmodels.TypeFormField, token string, tenantId string, options epmodels.APIOptions, userContext supertokens.UserContext) (epmodels.ResetPasswordPOSTResponse, error)
	EmailPasswordSignInPOST        *func(formFields []epmodels.TypeFormField, tenantId string, options epmodels.APIOptions, userContext supertokens.UserContext) (SignInPOSTResponse, error)
	EmailPasswordSignUpPOST        *func(formFields []epmodels.TypeFormField, tenantId string, options epmodels.APIOptions, userContext supertokens.UserContext) (SignUpPOSTResponse, error)
}

type EmailStruct

type EmailStruct struct {
	ID         string `json:"id"`
	IsVerified bool   `json:"isVerified"`
}

type EmailpasswordInput

type EmailpasswordInput struct {
	IsSignIn   bool
	FormFields []epmodels.TypeFormField
	Options    epmodels.APIOptions
}

type EmailpasswordOutput

type EmailpasswordOutput struct {
	OK *struct {
		User           User
		CreatedNewUser bool
	}
	EmailAlreadyExistsError *struct{}
	WrongCredentialsError   *struct{}
}

type ManuallyCreateOrUpdateUserResponse added in v0.13.0

type ManuallyCreateOrUpdateUserResponse struct {
	OK *struct {
		CreatedNewUser bool
		User           User
	}
}

type OverrideStruct

type OverrideStruct struct {
	Functions func(originalImplementation RecipeInterface) RecipeInterface
	APIs      func(originalImplementation APIInterface) APIInterface
}

type RecipeInterface

type RecipeInterface struct {
	GetUserByID             *func(userID string, userContext supertokens.UserContext) (*User, error)
	GetUsersByEmail         *func(email string, tenantId string, userContext supertokens.UserContext) ([]User, error)
	GetUserByThirdPartyInfo *func(thirdPartyID string, thirdPartyUserID string, tenantId string, userContext supertokens.UserContext) (*User, error)

	ThirdPartySignInUp                   *func(thirdPartyID string, thirdPartyUserID string, email string, oAuthTokens tpmodels.TypeOAuthTokens, rawUserInfoFromProvider tpmodels.TypeRawUserInfoFromProvider, tenantId string, userContext supertokens.UserContext) (SignInUpResponse, error)
	ThirdPartyManuallyCreateOrUpdateUser *func(thirdPartyID string, thirdPartyUserID string, email string, tenantId string, userContext supertokens.UserContext) (ManuallyCreateOrUpdateUserResponse, error)
	ThirdPartyGetProvider                *func(thirdPartyID string, clientType *string, tenantId string, userContext supertokens.UserContext) (*tpmodels.TypeProvider, error)

	EmailPasswordSignUp      *func(email string, password string, tenantId string, userContext supertokens.UserContext) (SignUpResponse, error)
	EmailPasswordSignIn      *func(email string, password string, tenantId string, userContext supertokens.UserContext) (SignInResponse, error)
	CreateResetPasswordToken *func(userID string, tenantId string, userContext supertokens.UserContext) (epmodels.CreateResetPasswordTokenResponse, error)
	ResetPasswordUsingToken  *func(token string, newPassword string, tenantId string, userContext supertokens.UserContext) (epmodels.ResetPasswordUsingTokenResponse, error)
	UpdateEmailOrPassword    *func(userId string, email *string, password *string, applyPasswordPolicy *bool, tenantIdForPasswordPolicy string, userContext supertokens.UserContext) (epmodels.UpdateEmailOrPasswordResponse, error)
}

type SignInPOSTResponse added in v0.5.0

type SignInPOSTResponse struct {
	OK *struct {
		User    User
		Session sessmodels.SessionContainer
	}
	WrongCredentialsError *struct{}
	GeneralError          *supertokens.GeneralErrorResponse
}

type SignInResponse

type SignInResponse struct {
	OK *struct {
		User User
	}
	WrongCredentialsError *struct{}
}

type SignInUpResponse

type SignInUpResponse struct {
	OK *struct {
		CreatedNewUser          bool
		User                    User
		OAuthTokens             map[string]interface{}
		RawUserInfoFromProvider tpmodels.TypeRawUserInfoFromProvider
	}
}

type SignUpPOSTResponse added in v0.5.0

type SignUpPOSTResponse struct {
	OK *struct {
		User    User
		Session sessmodels.SessionContainer
	}
	EmailAlreadyExistsError *struct{}
	GeneralError            *supertokens.GeneralErrorResponse
}

type SignUpResponse

type SignUpResponse struct {
	OK *struct {
		User User
	}
	EmailAlreadyExistsError *struct{}
}

type ThirdPartySignInUpPOSTResponse added in v0.13.0

type ThirdPartySignInUpPOSTResponse struct {
	OK *struct {
		CreatedNewUser          bool
		User                    User
		Session                 sessmodels.SessionContainer
		OAuthTokens             tpmodels.TypeOAuthTokens
		RawUserInfoFromProvider tpmodels.TypeRawUserInfoFromProvider
	}
	NoEmailGivenByProviderError *struct{}
	GeneralError                *supertokens.GeneralErrorResponse
}

type TypeContext

type TypeContext struct {
	FormFields                 []epmodels.TypeFormField
	ThirdPartyAuthCodeResponse interface{}
}

type TypeInput

type TypeInput struct {
	SignUpFeature *epmodels.TypeInputSignUp
	Providers     []tpmodels.ProviderInput
	Override      *OverrideStruct
	EmailDelivery *emaildelivery.TypeInput
}

type TypeNormalisedInput

type TypeNormalisedInput struct {
	SignUpFeature          *epmodels.TypeInputSignUp
	Providers              []tpmodels.ProviderInput
	Override               OverrideStruct
	GetEmailDeliveryConfig func(recipeImpl RecipeInterface, epRecipeImpl epmodels.RecipeInterface) emaildelivery.TypeInputWithService
}

type User

type User struct {
	ID         string `json:"id"`
	TimeJoined uint64 `json:"timeJoined"`
	Email      string `json:"email"`
	ThirdParty *struct {
		ID     string `json:"id"`
		UserID string `json:"userId"`
	} `json:"thirdParty"`
	TenantIds []string `json:"tenantIds"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL