/* tslint:disable */
/* eslint-disable */
/**
 * RMI Backend
 * Rug Munch Intelligence — institutional-grade crypto intelligence API. 13+ chains, 96 data providers, 8 MCP tools, x402 paid tier, sovereign-first FOSS.
 *
 * The version of the OpenAPI document: 2026.06.21
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

import * as runtime from '../runtime';
import {
    type AppDomainScannerModelsScanRequest,
    AppDomainScannerModelsScanRequestFromJSON,
    AppDomainScannerModelsScanRequestToJSON,
} from '../models/AppDomainScannerModelsScanRequest';
import {
    type HTTPValidationError,
    HTTPValidationErrorFromJSON,
    HTTPValidationErrorToJSON,
} from '../models/HTTPValidationError';
import {
    type ScanResponse,
    ScanResponseFromJSON,
    ScanResponseToJSON,
} from '../models/ScanResponse';

export interface ScanApiV1ScannerScanPostRequest {
    appDomainScannerModelsScanRequest: AppDomainScannerModelsScanRequest;
}

/**
 * 
 */
export class ScannerApi extends runtime.BaseAPI {

    /**
     * Creates request options for scanApiV1ScannerScanPost without sending the request
     */
    async scanApiV1ScannerScanPostRequestOpts(requestParameters: ScanApiV1ScannerScanPostRequest): Promise<runtime.RequestOpts> {
        if (requestParameters['appDomainScannerModelsScanRequest'] == null) {
            throw new runtime.RequiredError(
                'appDomainScannerModelsScanRequest',
                'Required parameter "appDomainScannerModelsScanRequest" was null or undefined when calling scanApiV1ScannerScanPost().'
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        headerParameters['Content-Type'] = 'application/json';


        let urlPath = `/api/v1/scanner/scan`;

        return {
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: AppDomainScannerModelsScanRequestToJSON(requestParameters['appDomainScannerModelsScanRequest']),
        };
    }

    /**
     * Full token scan. Multi-module. Returns Pydantic response.  The legacy /api/v1/scanner/scan (and /api/v1/token/scan) are still served — they take priority on the same path during strangelfig.
     * Scan
     */
    async scanApiV1ScannerScanPostRaw(requestParameters: ScanApiV1ScannerScanPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ScanResponse>> {
        const requestOptions = await this.scanApiV1ScannerScanPostRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => ScanResponseFromJSON(jsonValue));
    }

    /**
     * Full token scan. Multi-module. Returns Pydantic response.  The legacy /api/v1/scanner/scan (and /api/v1/token/scan) are still served — they take priority on the same path during strangelfig.
     * Scan
     */
    async scanApiV1ScannerScanPost(requestParameters: ScanApiV1ScannerScanPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScanResponse> {
        const response = await this.scanApiV1ScannerScanPostRaw(requestParameters, initOverrides);
        return await response.value();
    }

}
