DefaultApi Class — typescript-sdk Architecture
Architecture documentation for the DefaultApi class in DefaultApi.ts from the typescript-sdk codebase.
Entity Profile
Relationship Graph
Source Code
src/apis/DefaultApi.ts lines 95–754
export class DefaultApi extends runtime.BaseAPI {
/**
* Upload a zipped repository snapshot to generate the function-level call graph.
* Call graph
*/
async generateCallGraphRaw(requestParameters: GenerateCallGraphRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CodeGraphEnvelopeAsync>> {
if (requestParameters['idempotencyKey'] == null) {
throw new runtime.RequiredError(
'idempotencyKey',
'Required parameter "idempotencyKey" was null or undefined when calling generateCallGraph().'
);
}
if (requestParameters['file'] == null) {
throw new runtime.RequiredError(
'file',
'Required parameter "file" was null or undefined when calling generateCallGraph().'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (requestParameters['idempotencyKey'] != null) {
headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-Api-Key"] = await this.configuration.apiKey("X-Api-Key"); // ApiKeyAuth authentication
}
const consumes: runtime.Consume[] = [
{ contentType: 'multipart/form-data' },
];
// @ts-ignore: canConsumeForm may be unused
const canConsumeForm = runtime.canConsumeForm(consumes);
let formParams: { append(param: string, value: any): any };
let useForm = false;
// use FormData to transmit files using content-type "multipart/form-data"
useForm = canConsumeForm;
if (useForm) {
formParams = new FormData();
} else {
formParams = new URLSearchParams();
}
if (requestParameters['file'] != null) {
formParams.append('file', requestParameters['file'] as any);
}
const response = await this.request({
path: `/v1/graphs/call`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: formParams,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => CodeGraphEnvelopeAsyncFromJSON(jsonValue));
}
/**
* Upload a zipped repository snapshot to generate the function-level call graph.
* Call graph
*/
async generateCallGraph(requestParameters: GenerateCallGraphRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CodeGraphEnvelopeAsync> {
const response = await this.generateCallGraphRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Upload a zipped repository snapshot to detect circular dependencies (dependency cycles) at the file level using Tarjan\'s strongly connected components algorithm.
* Circular dependency detection
*/
async generateCircularDependencyAnalysisRaw(requestParameters: GenerateCircularDependencyAnalysisRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CircularDependencyResponseAsync>> {
if (requestParameters['idempotencyKey'] == null) {
throw new runtime.RequiredError(
'idempotencyKey',
'Required parameter "idempotencyKey" was null or undefined when calling generateCircularDependencyAnalysis().'
);
}
if (requestParameters['file'] == null) {
throw new runtime.RequiredError(
'file',
'Required parameter "file" was null or undefined when calling generateCircularDependencyAnalysis().'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (requestParameters['idempotencyKey'] != null) {
headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-Api-Key"] = await this.configuration.apiKey("X-Api-Key"); // ApiKeyAuth authentication
}
const consumes: runtime.Consume[] = [
{ contentType: 'multipart/form-data' },
];
// @ts-ignore: canConsumeForm may be unused
const canConsumeForm = runtime.canConsumeForm(consumes);
let formParams: { append(param: string, value: any): any };
let useForm = false;
// use FormData to transmit files using content-type "multipart/form-data"
useForm = canConsumeForm;
if (useForm) {
formParams = new FormData();
} else {
formParams = new URLSearchParams();
}
if (requestParameters['file'] != null) {
formParams.append('file', requestParameters['file'] as any);
}
const response = await this.request({
path: `/v1/analysis/circular-dependencies`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: formParams,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => CircularDependencyResponseAsyncFromJSON(jsonValue));
}
/**
* Upload a zipped repository snapshot to detect circular dependencies (dependency cycles) at the file level using Tarjan\'s strongly connected components algorithm.
* Circular dependency detection
*/
async generateCircularDependencyAnalysis(requestParameters: GenerateCircularDependencyAnalysisRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CircularDependencyResponseAsync> {
const response = await this.generateCircularDependencyAnalysisRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Upload a zipped repository snapshot to identify dead (unreachable) code candidates by combining parse graph declarations with call graph relationships.
* Dead code analysis
*/
async generateDeadCodeAnalysisRaw(requestParameters: GenerateDeadCodeAnalysisRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DeadCodeAnalysisResponseAsync>> {
if (requestParameters['idempotencyKey'] == null) {
throw new runtime.RequiredError(
'idempotencyKey',
'Required parameter "idempotencyKey" was null or undefined when calling generateDeadCodeAnalysis().'
);
}
if (requestParameters['file'] == null) {
throw new runtime.RequiredError(
'file',
'Required parameter "file" was null or undefined when calling generateDeadCodeAnalysis().'
);
}
const queryParameters: any = {};
if (requestParameters['minConfidence'] != null) {
queryParameters['min_confidence'] = requestParameters['minConfidence'];
}
if (requestParameters['limit'] != null) {
queryParameters['limit'] = requestParameters['limit'];
}
const headerParameters: runtime.HTTPHeaders = {};
if (requestParameters['idempotencyKey'] != null) {
headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-Api-Key"] = await this.configuration.apiKey("X-Api-Key"); // ApiKeyAuth authentication
}
const consumes: runtime.Consume[] = [
{ contentType: 'multipart/form-data' },
];
// @ts-ignore: canConsumeForm may be unused
const canConsumeForm = runtime.canConsumeForm(consumes);
let formParams: { append(param: string, value: any): any };
let useForm = false;
// use FormData to transmit files using content-type "multipart/form-data"
useForm = canConsumeForm;
if (useForm) {
formParams = new FormData();
} else {
formParams = new URLSearchParams();
}
if (requestParameters['file'] != null) {
formParams.append('file', requestParameters['file'] as any);
}
const response = await this.request({
path: `/v1/analysis/dead-code`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: formParams,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => DeadCodeAnalysisResponseAsyncFromJSON(jsonValue));
}
/**
* Upload a zipped repository snapshot to identify dead (unreachable) code candidates by combining parse graph declarations with call graph relationships.
* Dead code analysis
*/
async generateDeadCodeAnalysis(requestParameters: GenerateDeadCodeAnalysisRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DeadCodeAnalysisResponseAsync> {
const response = await this.generateDeadCodeAnalysisRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Upload a zipped repository snapshot to generate the dependency graph.
* Dependency graph
*/
async generateDependencyGraphRaw(requestParameters: GenerateDependencyGraphRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CodeGraphEnvelopeAsync>> {
if (requestParameters['idempotencyKey'] == null) {
throw new runtime.RequiredError(
'idempotencyKey',
'Required parameter "idempotencyKey" was null or undefined when calling generateDependencyGraph().'
);
}
if (requestParameters['file'] == null) {
throw new runtime.RequiredError(
'file',
'Required parameter "file" was null or undefined when calling generateDependencyGraph().'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (requestParameters['idempotencyKey'] != null) {
headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-Api-Key"] = await this.configuration.apiKey("X-Api-Key"); // ApiKeyAuth authentication
}
const consumes: runtime.Consume[] = [
{ contentType: 'multipart/form-data' },
];
// @ts-ignore: canConsumeForm may be unused
const canConsumeForm = runtime.canConsumeForm(consumes);
let formParams: { append(param: string, value: any): any };
let useForm = false;
// use FormData to transmit files using content-type "multipart/form-data"
useForm = canConsumeForm;
if (useForm) {
formParams = new FormData();
} else {
formParams = new URLSearchParams();
}
if (requestParameters['file'] != null) {
formParams.append('file', requestParameters['file'] as any);
}
const response = await this.request({
path: `/v1/graphs/dependency`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: formParams,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => CodeGraphEnvelopeAsyncFromJSON(jsonValue));
}
/**
* Upload a zipped repository snapshot to generate the dependency graph.
* Dependency graph
*/
async generateDependencyGraph(requestParameters: GenerateDependencyGraphRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CodeGraphEnvelopeAsync> {
const response = await this.generateDependencyGraphRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Upload a zipped repository snapshot to generate the domain model graph.
* Domain graph
*/
async generateDomainGraphRaw(requestParameters: GenerateDomainGraphRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DomainClassificationResponseAsync>> {
if (requestParameters['idempotencyKey'] == null) {
throw new runtime.RequiredError(
'idempotencyKey',
'Required parameter "idempotencyKey" was null or undefined when calling generateDomainGraph().'
);
}
if (requestParameters['file'] == null) {
throw new runtime.RequiredError(
'file',
'Required parameter "file" was null or undefined when calling generateDomainGraph().'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (requestParameters['idempotencyKey'] != null) {
headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-Api-Key"] = await this.configuration.apiKey("X-Api-Key"); // ApiKeyAuth authentication
}
const consumes: runtime.Consume[] = [
{ contentType: 'multipart/form-data' },
];
// @ts-ignore: canConsumeForm may be unused
const canConsumeForm = runtime.canConsumeForm(consumes);
let formParams: { append(param: string, value: any): any };
let useForm = false;
// use FormData to transmit files using content-type "multipart/form-data"
useForm = canConsumeForm;
if (useForm) {
formParams = new FormData();
} else {
formParams = new URLSearchParams();
}
if (requestParameters['file'] != null) {
formParams.append('file', requestParameters['file'] as any);
}
const response = await this.request({
path: `/v1/graphs/domain`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: formParams,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => DomainClassificationResponseAsyncFromJSON(jsonValue));
}
/**
* Upload a zipped repository snapshot to generate the domain model graph.
* Domain graph
*/
async generateDomainGraph(requestParameters: GenerateDomainGraphRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DomainClassificationResponseAsync> {
const response = await this.generateDomainGraphRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Compute blast radius — what breaks if a given file or function changes. Uses reverse-reachability BFS on call graph and dependency graph, enriched with LLM-powered domain classification to detect cross-domain impact. **Three usage modes:** 1. **With diff** — upload a unified diff (`git diff` output) alongside the repo zip. Changed files are automatically extracted as targets. Best for CI/CD pipelines. 2. **With targets** — specify files or file:function pairs via query parameter. Best for ad-hoc analysis of specific functions. 3. **Neither** — analyzes the entire codebase and returns a global coupling/risk map with the most critical files ranked by dependent count. **CI Integration (GitHub Actions):** ```yaml - name: Impact Analysis run: | git diff origin/main...HEAD > changes.diff git archive --format=zip HEAD -o repo.zip curl -s -X POST \"$SUPERMODEL_API_URL/v1/analysis/impact\" \\ -H \"Idempotency-Key: ${{ github.run_id }}-impact\" \\ -H \"X-Api-Key: ${{ secrets.SUPERMODEL_API_KEY }}\" \\ -F \"file=@repo.zip;type=application/zip\" \\ -F \"diff=@changes.diff;type=text/plain\" \\ -o impact.json ``` **CI Integration (GitLab CI):** ```yaml impact_analysis: script: - git diff origin/main...HEAD > changes.diff - git archive --format=zip HEAD -o repo.zip - >- curl -s -X POST \"$SUPERMODEL_API_URL/v1/analysis/impact\" -H \"Idempotency-Key: $CI_PIPELINE_IID-impact\" -H \"X-Api-Key: $SUPERMODEL_API_KEY\" -F \"file=@repo.zip;type=application/zip\" -F \"diff=@changes.diff;type=text/plain\" -o impact.json ``` **Standalone usage (no CI):** ```bash # Analyze specific targets curl -X POST \'.../v1/analysis/impact?targets=src/services/billing.ts:calculateTotal\' \\ -H \'Idempotency-Key: my-key\' -H \'X-Api-Key: ...\' \\ -F \'file=@repo.zip;type=application/zip\' # Analyze from a diff git diff main > changes.diff && git archive --format=zip HEAD -o repo.zip curl -X POST \'.../v1/analysis/impact\' \\ -H \'Idempotency-Key: my-key\' -H \'X-Api-Key: ...\' \\ -F \'file=@repo.zip;type=application/zip\' \\ -F \'diff=@changes.diff;type=text/plain\' # Global coupling map (no targets, no diff) curl -X POST \'.../v1/analysis/impact\' \\ -H \'Idempotency-Key: my-key\' -H \'X-Api-Key: ...\' \\ -F \'file=@repo.zip;type=application/zip\' ```
* Impact analysis
*/
async generateImpactAnalysisRaw(requestParameters: GenerateImpactAnalysisRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ImpactAnalysisResponseAsync>> {
if (requestParameters['idempotencyKey'] == null) {
throw new runtime.RequiredError(
'idempotencyKey',
'Required parameter "idempotencyKey" was null or undefined when calling generateImpactAnalysis().'
);
}
if (requestParameters['file'] == null) {
throw new runtime.RequiredError(
'file',
'Required parameter "file" was null or undefined when calling generateImpactAnalysis().'
);
}
const queryParameters: any = {};
if (requestParameters['targets'] != null) {
queryParameters['targets'] = requestParameters['targets'];
}
const headerParameters: runtime.HTTPHeaders = {};
if (requestParameters['idempotencyKey'] != null) {
headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-Api-Key"] = await this.configuration.apiKey("X-Api-Key"); // ApiKeyAuth authentication
}
const consumes: runtime.Consume[] = [
{ contentType: 'multipart/form-data' },
];
// @ts-ignore: canConsumeForm may be unused
const canConsumeForm = runtime.canConsumeForm(consumes);
let formParams: { append(param: string, value: any): any };
let useForm = false;
// use FormData to transmit files using content-type "multipart/form-data"
useForm = canConsumeForm;
// use FormData to transmit files using content-type "multipart/form-data"
useForm = canConsumeForm;
if (useForm) {
formParams = new FormData();
} else {
formParams = new URLSearchParams();
}
if (requestParameters['file'] != null) {
formParams.append('file', requestParameters['file'] as any);
}
if (requestParameters['diff'] != null) {
formParams.append('diff', requestParameters['diff'] as any);
}
const response = await this.request({
path: `/v1/analysis/impact`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: formParams,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => ImpactAnalysisResponseAsyncFromJSON(jsonValue));
}
/**
* Compute blast radius — what breaks if a given file or function changes. Uses reverse-reachability BFS on call graph and dependency graph, enriched with LLM-powered domain classification to detect cross-domain impact. **Three usage modes:** 1. **With diff** — upload a unified diff (`git diff` output) alongside the repo zip. Changed files are automatically extracted as targets. Best for CI/CD pipelines. 2. **With targets** — specify files or file:function pairs via query parameter. Best for ad-hoc analysis of specific functions. 3. **Neither** — analyzes the entire codebase and returns a global coupling/risk map with the most critical files ranked by dependent count. **CI Integration (GitHub Actions):** ```yaml - name: Impact Analysis run: | git diff origin/main...HEAD > changes.diff git archive --format=zip HEAD -o repo.zip curl -s -X POST \"$SUPERMODEL_API_URL/v1/analysis/impact\" \\ -H \"Idempotency-Key: ${{ github.run_id }}-impact\" \\ -H \"X-Api-Key: ${{ secrets.SUPERMODEL_API_KEY }}\" \\ -F \"file=@repo.zip;type=application/zip\" \\ -F \"diff=@changes.diff;type=text/plain\" \\ -o impact.json ``` **CI Integration (GitLab CI):** ```yaml impact_analysis: script: - git diff origin/main...HEAD > changes.diff - git archive --format=zip HEAD -o repo.zip - >- curl -s -X POST \"$SUPERMODEL_API_URL/v1/analysis/impact\" -H \"Idempotency-Key: $CI_PIPELINE_IID-impact\" -H \"X-Api-Key: $SUPERMODEL_API_KEY\" -F \"file=@repo.zip;type=application/zip\" -F \"diff=@changes.diff;type=text/plain\" -o impact.json ``` **Standalone usage (no CI):** ```bash # Analyze specific targets curl -X POST \'.../v1/analysis/impact?targets=src/services/billing.ts:calculateTotal\' \\ -H \'Idempotency-Key: my-key\' -H \'X-Api-Key: ...\' \\ -F \'file=@repo.zip;type=application/zip\' # Analyze from a diff git diff main > changes.diff && git archive --format=zip HEAD -o repo.zip curl -X POST \'.../v1/analysis/impact\' \\ -H \'Idempotency-Key: my-key\' -H \'X-Api-Key: ...\' \\ -F \'file=@repo.zip;type=application/zip\' \\ -F \'diff=@changes.diff;type=text/plain\' # Global coupling map (no targets, no diff) curl -X POST \'.../v1/analysis/impact\' \\ -H \'Idempotency-Key: my-key\' -H \'X-Api-Key: ...\' \\ -F \'file=@repo.zip;type=application/zip\' ```
* Impact analysis
*/
async generateImpactAnalysis(requestParameters: GenerateImpactAnalysisRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ImpactAnalysisResponseAsync> {
const response = await this.generateImpactAnalysisRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Upload a zipped repository snapshot to generate parse tree relationships.
* Parse graph
*/
async generateParseGraphRaw(requestParameters: GenerateParseGraphRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CodeGraphEnvelopeAsync>> {
if (requestParameters['idempotencyKey'] == null) {
throw new runtime.RequiredError(
'idempotencyKey',
'Required parameter "idempotencyKey" was null or undefined when calling generateParseGraph().'
);
}
if (requestParameters['file'] == null) {
throw new runtime.RequiredError(
'file',
'Required parameter "file" was null or undefined when calling generateParseGraph().'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (requestParameters['idempotencyKey'] != null) {
headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-Api-Key"] = await this.configuration.apiKey("X-Api-Key"); // ApiKeyAuth authentication
}
const consumes: runtime.Consume[] = [
{ contentType: 'multipart/form-data' },
];
// @ts-ignore: canConsumeForm may be unused
const canConsumeForm = runtime.canConsumeForm(consumes);
let formParams: { append(param: string, value: any): any };
let useForm = false;
// use FormData to transmit files using content-type "multipart/form-data"
useForm = canConsumeForm;
if (useForm) {
formParams = new FormData();
} else {
formParams = new URLSearchParams();
}
if (requestParameters['file'] != null) {
formParams.append('file', requestParameters['file'] as any);
}
const response = await this.request({
path: `/v1/graphs/parse`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: formParams,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => CodeGraphEnvelopeAsyncFromJSON(jsonValue));
}
/**
* Upload a zipped repository snapshot to generate parse tree relationships.
* Parse graph
*/
async generateParseGraph(requestParameters: GenerateParseGraphRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CodeGraphEnvelopeAsync> {
const response = await this.generateParseGraphRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Upload a zipped repository snapshot to generate the Supermodel Intermediate Representation (SIR) artifact bundle.
* Supermodel graph
*/
async generateSupermodelGraphRaw(requestParameters: GenerateSupermodelGraphRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SupermodelIRAsync>> {
if (requestParameters['idempotencyKey'] == null) {
throw new runtime.RequiredError(
'idempotencyKey',
'Required parameter "idempotencyKey" was null or undefined when calling generateSupermodelGraph().'
);
}
if (requestParameters['file'] == null) {
throw new runtime.RequiredError(
'file',
'Required parameter "file" was null or undefined when calling generateSupermodelGraph().'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (requestParameters['idempotencyKey'] != null) {
headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-Api-Key"] = await this.configuration.apiKey("X-Api-Key"); // ApiKeyAuth authentication
}
const consumes: runtime.Consume[] = [
{ contentType: 'multipart/form-data' },
];
// @ts-ignore: canConsumeForm may be unused
const canConsumeForm = runtime.canConsumeForm(consumes);
let formParams: { append(param: string, value: any): any };
let useForm = false;
// use FormData to transmit files using content-type "multipart/form-data"
useForm = canConsumeForm;
if (useForm) {
formParams = new FormData();
} else {
formParams = new URLSearchParams();
}
if (requestParameters['file'] != null) {
formParams.append('file', requestParameters['file'] as any);
}
const response = await this.request({
path: `/v1/graphs/supermodel`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: formParams,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => SupermodelIRAsyncFromJSON(jsonValue));
}
/**
* Upload a zipped repository snapshot to generate the Supermodel Intermediate Representation (SIR) artifact bundle.
* Supermodel graph
*/
async generateSupermodelGraph(requestParameters: GenerateSupermodelGraphRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SupermodelIRAsync> {
const response = await this.generateSupermodelGraphRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Upload a zipped repository snapshot to identify functions with zero test coverage by tracing call graph reachability from test files to production code. This is static analysis — no test execution or instrumentation required.
* Test coverage map
*/
async generateTestCoverageMapRaw(requestParameters: GenerateTestCoverageMapRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TestCoverageMapResponseAsync>> {
if (requestParameters['idempotencyKey'] == null) {
throw new runtime.RequiredError(
'idempotencyKey',
'Required parameter "idempotencyKey" was null or undefined when calling generateTestCoverageMap().'
);
}
if (requestParameters['file'] == null) {
throw new runtime.RequiredError(
'file',
'Required parameter "file" was null or undefined when calling generateTestCoverageMap().'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (requestParameters['idempotencyKey'] != null) {
headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-Api-Key"] = await this.configuration.apiKey("X-Api-Key"); // ApiKeyAuth authentication
}
const consumes: runtime.Consume[] = [
{ contentType: 'multipart/form-data' },
];
// @ts-ignore: canConsumeForm may be unused
const canConsumeForm = runtime.canConsumeForm(consumes);
let formParams: { append(param: string, value: any): any };
let useForm = false;
// use FormData to transmit files using content-type "multipart/form-data"
useForm = canConsumeForm;
if (useForm) {
formParams = new FormData();
} else {
formParams = new URLSearchParams();
}
if (requestParameters['file'] != null) {
formParams.append('file', requestParameters['file'] as any);
}
const response = await this.request({
path: `/v1/analysis/test-coverage-map`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: formParams,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => TestCoverageMapResponseAsyncFromJSON(jsonValue));
}
/**
* Upload a zipped repository snapshot to identify functions with zero test coverage by tracing call graph reachability from test files to production code. This is static analysis — no test execution or instrumentation required.
* Test coverage map
*/
async generateTestCoverageMap(requestParameters: GenerateTestCoverageMapRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TestCoverageMapResponseAsync> {
const response = await this.generateTestCoverageMapRaw(requestParameters, initOverrides);
return await response.value();
}
}
Domain
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free