{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "$ref": "#/definitions/ResendMFADeviceResponse",
    "definitions": {
        "ResendMFADeviceResponse": {
            "type": "object",
            "properties": {
                "data": {
                    "type": "object",
                    "properties": {
                        "trustedDeviceCount": {
                            "type": "number",
                            "description": "Number of available trusted devices",
                            "minimum": 1
                        },
                        "securityCode": {
                            "type": "object",
                            "properties": {
                                "length": {
                                    "type": "number",
                                    "const": 6
                                },
                                "tooManyCodesSent": {
                                    "type": "boolean",
                                    "const": false
                                },
                                "tooManyCodesValidated": {
                                    "type": "boolean",
                                    "const": false
                                },
                                "securityCodeLocked": {
                                    "type": "boolean",
                                    "const": false
                                },
                                "securityCodeCooldown": {
                                    "type": "boolean",
                                    "const": false
                                }
                            },
                            "required": [
                                "length",
                                "tooManyCodesSent",
                                "tooManyCodesValidated",
                                "securityCodeLocked",
                                "securityCodeCooldown"
                            ],
                            "description": "Properties of the requested security code"
                        },
                        "phoneNumberVerification": {
                            "type": "object",
                            "properties": {
                                "trustedPhoneNumber": {
                                    "$ref": "#/definitions/TrustedPhoneNumber",
                                    "description": "The phone number used for verification"
                                },
                                "trustedPhoneNumbers": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/definitions/TrustedPhoneNumber"
                                    }
                                },
                                "securityCode": {
                                    "type": "object",
                                    "properties": {
                                        "length": {
                                            "type": "number",
                                            "const": 6
                                        },
                                        "tooManyCodesSent": {
                                            "type": "boolean",
                                            "const": false
                                        },
                                        "tooManyCodesValidated": {
                                            "type": "boolean",
                                            "const": false
                                        },
                                        "securityCodeLocked": {
                                            "type": "boolean",
                                            "const": false
                                        },
                                        "securityCodeCooldown": {
                                            "type": "boolean",
                                            "const": false
                                        }
                                    },
                                    "required": [
                                        "length",
                                        "tooManyCodesSent",
                                        "tooManyCodesValidated",
                                        "securityCodeLocked",
                                        "securityCodeCooldown"
                                    ],
                                    "description": "Format of the expected security code used in MFA resend responses"
                                },
                                "authenticationType": {
                                    "type": "string",
                                    "const": "hsa2"
                                },
                                "hsa2Account": {
                                    "type": "boolean",
                                    "const": true
                                },
                                "restrictedAccount": {
                                    "type": "boolean",
                                    "const": false
                                }
                            },
                            "required": [
                                "trustedPhoneNumber",
                                "trustedPhoneNumbers",
                                "securityCode",
                                "authenticationType",
                                "hsa2Account",
                                "restrictedAccount"
                            ],
                            "description": "Object holding information about alternative phone number verification"
                        }
                    },
                    "required": [
                        "trustedDeviceCount",
                        "securityCode",
                        "phoneNumberVerification"
                    ]
                }
            },
            "required": [
                "data"
            ],
            "description": "The expected response format for the MFA resend request on a trusted device"
        },
        "TrustedPhoneNumber": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "number",
                    "minimum": 0
                },
                "numberWithDialCode": {
                    "type": "string",
                    "minLength": 1
                },
                "pushMode": {
                    "type": "string",
                    "pattern": "^sms|voice$"
                },
                "obfuscatedNumber": {
                    "type": "string",
                    "minLength": 1
                },
                "lastTwoDigits": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2
                }
            },
            "required": [
                "id",
                "numberWithDialCode",
                "pushMode",
                "obfuscatedNumber",
                "lastTwoDigits"
            ],
            "description": "Object representing a trusted phone number used in MFA resend responses"
        }
    }
}
