Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add user object to update and authenticate responses #72

Merged
merged 2 commits into from
May 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion stytch/config/config.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package config

const APIVersion = "5.4.2"
const APIVersion = "5.5.0"

type BaseURI string

Expand Down
1 change: 1 addition & 0 deletions stytch/cryptowallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@ type CryptoWalletAuthenticateResponse struct {
SessionToken string `json:"session_token,omitempty"`
SessionJWT string `json:"session_jwt,omitempty"`
Session Session `json:"session,omitempty"`
User User `jspon:"user,omitempty"`
}
1 change: 1 addition & 0 deletions stytch/magiclink.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ type MagicLinksAuthenticateResponse struct {
SessionToken string `json:"session_token,omitempty"`
SessionJWT string `json:"session_jwt,omitempty"`
Session Session `json:"session,omitempty"`
User User `jspon:"user,omitempty"`
}

// MAGIC LINK - EMAIL
Expand Down
1 change: 1 addition & 0 deletions stytch/otp.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ type OTPsAuthenticateResponse struct {
SessionToken string `json:"session_token,omitempty"`
Session Session `json:"session,omitempty"`
SessionJWT string `json:"session_jwt,omitempty"`
User User `jspon:"user,omitempty"`
}

// OTP - SMS
Expand Down
1 change: 1 addition & 0 deletions stytch/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ type SessionsAuthenticateResponse struct {
Session Session `json:"session,omitempty"`
SessionToken string `json:"session_token,omitempty"`
SessionJWT string `json:"session_jwt,omitempty"`
User User `jspon:"user,omitempty"`
}

type SessionsRevokeParams struct {
Expand Down
2 changes: 2 additions & 0 deletions stytch/totp.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ type TOTPsAuthenticateResponse struct {
SessionToken string `json:"session_token,omitempty"`
SessionJWT string `json:"session_jwt,omitempty"`
Session Session `json:"session,omitempty"`
User User `jspon:"user,omitempty"`
}

type TOTPsRecoveryCodesParams struct {
Expand Down Expand Up @@ -65,4 +66,5 @@ type TOTPsRecoverResponse struct {
SessionToken string `json:"session_token,omitempty"`
SessionJWT string `json:"session_jwt,omitempty"`
Session Session `json:"session,omitempty"`
User User `jspon:"user,omitempty"`
}
7 changes: 7 additions & 0 deletions stytch/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ type UsersCreateResponse struct {
EmailID string `json:"email_id,omitempty"`
PhoneID string `json:"phone_id,omitempty"`
Status string `json:"status,omitempty"`
User User `jspon:"user,omitempty"`
}

type UsersGetResponse struct {
Expand Down Expand Up @@ -110,6 +111,7 @@ type UsersUpdateResponse struct {
Emails []Email `json:"emails,omitempty"`
PhoneNumbers []PhoneNumber `json:"phone_numbers,omitempty"`
CryptoWallets []CryptoWallet `json:"crypto_wallets,omitempty"`
User User `jspon:"user,omitempty"`
}

type UsersDeleteResponse struct {
Expand All @@ -122,30 +124,35 @@ type UsersDeleteEmailResponse struct {
RequestID string `json:"request_id,omitempty"`
StatusCode int `json:"status_code,omitempty"`
UserID string `json:"user_id,omitempty"`
User User `jspon:"user,omitempty"`
}

type UsersDeletePhoneNumberResponse struct {
RequestID string `json:"request_id,omitempty"`
StatusCode int `json:"status_code,omitempty"`
UserID string `json:"user_id,omitempty"`
User User `jspon:"user,omitempty"`
}

type UsersDeleteWebAuthnRegistrationResponse struct {
RequestID string `json:"request_id,omitempty"`
StatusCode int `json:"status_code,omitempty"`
UserID string `json:"user_id,omitempty"`
User User `jspon:"user,omitempty"`
}

type UsersDeleteTOTPResponse struct {
RequestID string `json:"request_id,omitempty"`
StatusCode int `json:"status_code,omitempty"`
UserID string `json:"user_id,omitempty"`
User User `jspon:"user,omitempty"`
}

type UsersDeleteCryptoWalletResponse struct {
RequestID string `json:"request_id,omitempty"`
StatusCode int `json:"status_code,omitempty"`
UserID string `json:"user_id,omitempty"`
User User `jspon:"user,omitempty"`
}

/* User Search */
Expand Down
1 change: 1 addition & 0 deletions stytch/webauthn.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,5 @@ type WebAuthnAuthenticateResponse struct {
SessionToken string `json:"session_token,omitempty"`
SessionJWT string `json:"session_jwt,omitempty"`
Session Session `json:"session,omitempty"`
User User `jspon:"user,omitempty"`
}