Skip to content

The platform for continuously improving AI agents.

2.9 KB
Raw Blame
/* tslint:disable */
/* eslint-disable */
/**
 * Overbae API
 * Backend API for the Overclaw / Overmind platform.
 *
 * The version of the OpenAPI document: 2.0.0
 *
 *
 * 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 {
  ProjectSetup,
} from '../models/index';
import {
    ProjectSetupFromJSON,
    ProjectSetupToJSON,
} from '../models/index';

export interface ProjectSetupRetrieveRequest {
    project: string;
}

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

    /**
     * Get the project\'s setup stage for Home
     */
    async projectSetupRetrieveRaw(requestParameters: ProjectSetupRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ProjectSetup>> {
        if (requestParameters['project'] == null) {
            throw new runtime.RequiredError(
                'project',
                'Required parameter "project" was null or undefined when calling projectSetupRetrieve().'
            );
        }

        const queryParameters: any = {};

        if (requestParameters['project'] != null) {
            queryParameters['project'] = requestParameters['project'];
        }

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("ClerkBearerAuth", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        if (this.configuration && this.configuration.apiKey) {
            headerParameters["X-Api-Key"] = await this.configuration.apiKey("X-Api-Key"); // ApiKeyAuth authentication
        }

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("BearerAuth", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/api/project-setup/`;

        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);

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

    /**
     * Get the project\'s setup stage for Home
     */
    async projectSetupRetrieve(requestParameters: ProjectSetupRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProjectSetup> {
        const response = await this.projectSetupRetrieveRaw(requestParameters, initOverrides);
        return await response.value();
    }

}