# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from __future__ import annotations

from typing_extensions import Literal, Required, Annotated, TypedDict

from ..._utils import PropertyInfo

__all__ = ["ScanCreateParams", "CredentialSets"]


class ScanCreateParams(TypedDict, total=False):
    account_id: Required[str]
    """Identifier."""

    credential_sets: Required[CredentialSets]
    """Credential set references for a BOLA scan.

    The scanner uses the `owner` credentials for legitimate requests and the
    `attacker` credentials to attempt unauthorized access.
    """

    openapi: Required[Annotated[str, PropertyInfo(alias="open_api")]]
    """OpenAPI schema definition for the API under test.

    The scanner uses this to discover endpoints and construct requests.
    """

    scan_type: Required[Literal["bola"]]

    target_environment_id: Required[str]
    """The target environment to scan."""


class CredentialSets(TypedDict, total=False):
    """Credential set references for a BOLA scan.

    The scanner uses the
    `owner` credentials for legitimate requests and the `attacker`
    credentials to attempt unauthorized access.
    """

    attacker: Required[str]
    """Credential set ID for the attacker."""

    owner: Required[str]
    """Credential set ID for the resource owner."""
