Files
hanko/backend/dto/user.go
bjoern-m ca62cf421f feat: introduce hanko profile element and related api changes (#495)
* feat: introduce hanko profile element and related api changes
2023-01-25 10:55:23 +01:00

29 lines
914 B
Go

package dto
import (
"github.com/gofrs/uuid"
"github.com/teamhanko/hanko/backend/persistence/models"
"time"
)
type CreateUserResponse struct {
ID uuid.UUID `json:"id"` // deprecated
UserID uuid.UUID `json:"user_id"`
EmailID uuid.UUID `json:"email_id"`
}
type GetUserResponse struct {
ID uuid.UUID `json:"id"`
Email *string `json:"email,omitempty"`
WebauthnCredentials []models.WebauthnCredential `json:"webauthn_credentials"` // deprecated
UpdatedAt time.Time `json:"updated_at"`
CreatedAt time.Time `json:"created_at"`
}
type UserInfoResponse struct {
ID uuid.UUID `json:"id"`
EmailID uuid.UUID `json:"email_id"`
Verified bool `json:"verified"`
HasWebauthnCredential bool `json:"has_webauthn_credential"`
}