|
| 1 | +package email |
| 2 | + |
| 3 | +// !!! |
| 4 | +// WARNING: This file is autogenerated |
| 5 | +// Only modify code within MANUAL() sections |
| 6 | +// or your changes may be overwritten later! |
| 7 | +// !!! |
| 8 | + |
| 9 | +import ( |
| 10 | + "github.com/stytchauth/stytch-go/v17/stytch/consumer/fraud" |
| 11 | +) |
| 12 | + |
| 13 | +// RiskParams: Request type for `Email.Risk`. |
| 14 | +type RiskParams struct { |
| 15 | + // EmailAddress: The email address to check. |
| 16 | + EmailAddress string `json:"email_address,omitempty"` |
| 17 | +} |
| 18 | + |
| 19 | +// RiskResponse: Response type for `Email.Risk`. |
| 20 | +type RiskResponse struct { |
| 21 | + // RequestID: Globally unique UUID that is returned with every API call. This value is important to log for |
| 22 | + // debugging purposes; we may ask for this value to help identify a specific API call when helping you |
| 23 | + // debug an issue. |
| 24 | + RequestID string `json:"request_id,omitempty"` |
| 25 | + // AddressInformation: Information about the email address. |
| 26 | + AddressInformation fraud.AddressInformation `json:"address_information,omitempty"` |
| 27 | + // DomainInformation: Information about the email domain. |
| 28 | + DomainInformation fraud.DomainInformation `json:"domain_information,omitempty"` |
| 29 | + // Action: The suggested action based on the attributes of the email address. The available actions are: |
| 30 | + // * `ALLOW` - This email is most likely safe to send to and not fraudulent. |
| 31 | + // * `BLOCK` - This email is invalid or exhibits signs of fraud. We recommend blocking the end user. |
| 32 | + // * `CHALLENGE` - This email has some potentially fraudulent attributes. We recommend increased friction |
| 33 | + // such as 2FA or other forms of extended user verification before allowing the privileged action to |
| 34 | + // proceed. |
| 35 | + // |
| 36 | + Action RiskResponseAction `json:"action,omitempty"` |
| 37 | + // RiskScore: A score from 0 to 100 indicating how risky the email is. 100 is the most risky. |
| 38 | + RiskScore int32 `json:"risk_score,omitempty"` |
| 39 | + // StatusCode: The HTTP status code of the response. Stytch follows standard HTTP response status code |
| 40 | + // patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX |
| 41 | + // are server errors. |
| 42 | + StatusCode int32 `json:"status_code,omitempty"` |
| 43 | +} |
| 44 | + |
| 45 | +type RiskResponseAction string |
| 46 | + |
| 47 | +const ( |
| 48 | + RiskResponseActionALLOW RiskResponseAction = "ALLOW" |
| 49 | + RiskResponseActionCHALLENGE RiskResponseAction = "CHALLENGE" |
| 50 | + RiskResponseActionBLOCK RiskResponseAction = "BLOCK" |
| 51 | +) |
0 commit comments