@supermodeltools/sdk 0.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +32 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator/openapi.yaml-generate-typescript-client.sha256 +1 -0
- package/.openapi-generator-ignore +23 -0
- package/README.md +46 -0
- package/dist/apis/DefaultApi.d.ts +88 -0
- package/dist/apis/DefaultApi.js +323 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +19 -0
- package/dist/esm/apis/DefaultApi.d.ts +88 -0
- package/dist/esm/apis/DefaultApi.js +319 -0
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +3 -0
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.js +5 -0
- package/dist/esm/models/ClassificationStats.d.ts +61 -0
- package/dist/esm/models/ClassificationStats.js +60 -0
- package/dist/esm/models/CodeGraphEnvelope.d.ts +51 -0
- package/dist/esm/models/CodeGraphEnvelope.js +48 -0
- package/dist/esm/models/CodeGraphEnvelopeGraph.d.ts +39 -0
- package/dist/esm/models/CodeGraphEnvelopeGraph.js +46 -0
- package/dist/esm/models/CodeGraphNode.d.ts +45 -0
- package/dist/esm/models/CodeGraphNode.js +44 -0
- package/dist/esm/models/CodeGraphRelationship.d.ts +57 -0
- package/dist/esm/models/CodeGraphRelationship.js +54 -0
- package/dist/esm/models/CodeGraphStats.d.ts +55 -0
- package/dist/esm/models/CodeGraphStats.js +46 -0
- package/dist/esm/models/DomainClassAssignment.d.ts +37 -0
- package/dist/esm/models/DomainClassAssignment.js +44 -0
- package/dist/esm/models/DomainClassificationResponse.d.ts +87 -0
- package/dist/esm/models/DomainClassificationResponse.js +78 -0
- package/dist/esm/models/DomainFileAssignment.d.ts +37 -0
- package/dist/esm/models/DomainFileAssignment.js +44 -0
- package/dist/esm/models/DomainFunctionAssignment.d.ts +43 -0
- package/dist/esm/models/DomainFunctionAssignment.js +46 -0
- package/dist/esm/models/DomainRelationship.d.ts +55 -0
- package/dist/esm/models/DomainRelationship.js +54 -0
- package/dist/esm/models/DomainSummary.d.ts +56 -0
- package/dist/esm/models/DomainSummary.js +57 -0
- package/dist/esm/models/ErrorDetailsInner.d.ts +43 -0
- package/dist/esm/models/ErrorDetailsInner.js +46 -0
- package/dist/esm/models/FunctionDescription.d.ts +43 -0
- package/dist/esm/models/FunctionDescription.js +46 -0
- package/dist/esm/models/ModelError.d.ts +62 -0
- package/dist/esm/models/ModelError.js +57 -0
- package/dist/esm/models/SubdomainSummary.d.ts +37 -0
- package/dist/esm/models/SubdomainSummary.js +44 -0
- package/dist/esm/models/SupermodelArtifact.d.ts +51 -0
- package/dist/esm/models/SupermodelArtifact.js +50 -0
- package/dist/esm/models/SupermodelIR.d.ts +71 -0
- package/dist/esm/models/SupermodelIR.js +62 -0
- package/dist/esm/models/SupermodelIRGraph.d.ts +39 -0
- package/dist/esm/models/SupermodelIRGraph.js +46 -0
- package/dist/esm/models/UnassignedFunction.d.ts +37 -0
- package/dist/esm/models/UnassignedFunction.js +44 -0
- package/dist/esm/models/index.d.ts +20 -0
- package/dist/esm/models/index.js +22 -0
- package/dist/esm/runtime.d.ts +181 -0
- package/dist/esm/runtime.js +326 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +21 -0
- package/dist/models/ClassificationStats.d.ts +61 -0
- package/dist/models/ClassificationStats.js +66 -0
- package/dist/models/CodeGraphEnvelope.d.ts +51 -0
- package/dist/models/CodeGraphEnvelope.js +54 -0
- package/dist/models/CodeGraphEnvelopeGraph.d.ts +39 -0
- package/dist/models/CodeGraphEnvelopeGraph.js +52 -0
- package/dist/models/CodeGraphNode.d.ts +45 -0
- package/dist/models/CodeGraphNode.js +50 -0
- package/dist/models/CodeGraphRelationship.d.ts +57 -0
- package/dist/models/CodeGraphRelationship.js +60 -0
- package/dist/models/CodeGraphStats.d.ts +55 -0
- package/dist/models/CodeGraphStats.js +52 -0
- package/dist/models/DomainClassAssignment.d.ts +37 -0
- package/dist/models/DomainClassAssignment.js +50 -0
- package/dist/models/DomainClassificationResponse.d.ts +87 -0
- package/dist/models/DomainClassificationResponse.js +84 -0
- package/dist/models/DomainFileAssignment.d.ts +37 -0
- package/dist/models/DomainFileAssignment.js +50 -0
- package/dist/models/DomainFunctionAssignment.d.ts +43 -0
- package/dist/models/DomainFunctionAssignment.js +52 -0
- package/dist/models/DomainRelationship.d.ts +55 -0
- package/dist/models/DomainRelationship.js +60 -0
- package/dist/models/DomainSummary.d.ts +56 -0
- package/dist/models/DomainSummary.js +63 -0
- package/dist/models/ErrorDetailsInner.d.ts +43 -0
- package/dist/models/ErrorDetailsInner.js +52 -0
- package/dist/models/FunctionDescription.d.ts +43 -0
- package/dist/models/FunctionDescription.js +52 -0
- package/dist/models/ModelError.d.ts +62 -0
- package/dist/models/ModelError.js +63 -0
- package/dist/models/SubdomainSummary.d.ts +37 -0
- package/dist/models/SubdomainSummary.js +50 -0
- package/dist/models/SupermodelArtifact.d.ts +51 -0
- package/dist/models/SupermodelArtifact.js +56 -0
- package/dist/models/SupermodelIR.d.ts +71 -0
- package/dist/models/SupermodelIR.js +68 -0
- package/dist/models/SupermodelIRGraph.d.ts +39 -0
- package/dist/models/SupermodelIRGraph.js +52 -0
- package/dist/models/UnassignedFunction.d.ts +37 -0
- package/dist/models/UnassignedFunction.js +50 -0
- package/dist/models/index.d.ts +20 -0
- package/dist/models/index.js +38 -0
- package/dist/runtime.d.ts +181 -0
- package/dist/runtime.js +341 -0
- package/package.json +21 -0
- package/src/apis/DefaultApi.ts +416 -0
- package/src/apis/index.ts +3 -0
- package/src/index.ts +5 -0
- package/src/models/ClassificationStats.ts +106 -0
- package/src/models/CodeGraphEnvelope.ts +98 -0
- package/src/models/CodeGraphEnvelopeGraph.ts +83 -0
- package/src/models/CodeGraphNode.ts +77 -0
- package/src/models/CodeGraphRelationship.ts +96 -0
- package/src/models/CodeGraphStats.ts +92 -0
- package/src/models/DomainClassAssignment.ts +70 -0
- package/src/models/DomainClassificationResponse.ts +181 -0
- package/src/models/DomainFileAssignment.ts +70 -0
- package/src/models/DomainFunctionAssignment.ts +78 -0
- package/src/models/DomainRelationship.ts +96 -0
- package/src/models/DomainSummary.ts +104 -0
- package/src/models/ErrorDetailsInner.ts +78 -0
- package/src/models/FunctionDescription.ts +78 -0
- package/src/models/ModelError.ts +111 -0
- package/src/models/SubdomainSummary.ts +70 -0
- package/src/models/SupermodelArtifact.ts +87 -0
- package/src/models/SupermodelIR.ts +126 -0
- package/src/models/SupermodelIRGraph.ts +83 -0
- package/src/models/UnassignedFunction.ts +70 -0
- package/src/models/index.ts +22 -0
- package/src/runtime.ts +426 -0
- package/tsconfig.esm.json +7 -0
- package/tsconfig.json +16 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
.gitignore
|
|
2
|
+
.npmignore
|
|
3
|
+
.openapi-generator-ignore
|
|
4
|
+
README.md
|
|
5
|
+
package.json
|
|
6
|
+
src/apis/DefaultApi.ts
|
|
7
|
+
src/apis/index.ts
|
|
8
|
+
src/index.ts
|
|
9
|
+
src/models/ClassificationStats.ts
|
|
10
|
+
src/models/CodeGraphEnvelope.ts
|
|
11
|
+
src/models/CodeGraphEnvelopeGraph.ts
|
|
12
|
+
src/models/CodeGraphNode.ts
|
|
13
|
+
src/models/CodeGraphRelationship.ts
|
|
14
|
+
src/models/CodeGraphStats.ts
|
|
15
|
+
src/models/DomainClassAssignment.ts
|
|
16
|
+
src/models/DomainClassificationResponse.ts
|
|
17
|
+
src/models/DomainFileAssignment.ts
|
|
18
|
+
src/models/DomainFunctionAssignment.ts
|
|
19
|
+
src/models/DomainRelationship.ts
|
|
20
|
+
src/models/DomainSummary.ts
|
|
21
|
+
src/models/ErrorDetailsInner.ts
|
|
22
|
+
src/models/FunctionDescription.ts
|
|
23
|
+
src/models/ModelError.ts
|
|
24
|
+
src/models/SubdomainSummary.ts
|
|
25
|
+
src/models/SupermodelArtifact.ts
|
|
26
|
+
src/models/SupermodelIR.ts
|
|
27
|
+
src/models/SupermodelIRGraph.ts
|
|
28
|
+
src/models/UnassignedFunction.ts
|
|
29
|
+
src/models/index.ts
|
|
30
|
+
src/runtime.ts
|
|
31
|
+
tsconfig.esm.json
|
|
32
|
+
tsconfig.json
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
7.7.0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2830aad704d6aa36953364229b8b58826b583ff05d7be3bba5cbd82b4a25be7a
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# OpenAPI Generator Ignore
|
|
2
|
+
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
|
3
|
+
|
|
4
|
+
# Use this file to prevent files from being overwritten by the generator.
|
|
5
|
+
# The patterns follow closely to .gitignore or .dockerignore.
|
|
6
|
+
|
|
7
|
+
# As an example, the C# client generator defines ApiClient.cs.
|
|
8
|
+
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
|
9
|
+
#ApiClient.cs
|
|
10
|
+
|
|
11
|
+
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
|
12
|
+
#foo/*/qux
|
|
13
|
+
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
|
14
|
+
|
|
15
|
+
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
|
16
|
+
#foo/**/qux
|
|
17
|
+
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
|
18
|
+
|
|
19
|
+
# You can also negate patterns with an exclamation (!).
|
|
20
|
+
# For example, you can ignore all files in a docs folder with the file extension .md:
|
|
21
|
+
#docs/*.md
|
|
22
|
+
# Then explicitly reverse the ignore rule for a single file:
|
|
23
|
+
#!docs/README.md
|
package/README.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
## @supermodeltools/sdk@0.3.7
|
|
2
|
+
|
|
3
|
+
This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
|
|
4
|
+
|
|
5
|
+
Environment
|
|
6
|
+
* Node.js
|
|
7
|
+
* Webpack
|
|
8
|
+
* Browserify
|
|
9
|
+
|
|
10
|
+
Language level
|
|
11
|
+
* ES5 - you must have a Promises/A+ library installed
|
|
12
|
+
* ES6
|
|
13
|
+
|
|
14
|
+
Module system
|
|
15
|
+
* CommonJS
|
|
16
|
+
* ES6 module system
|
|
17
|
+
|
|
18
|
+
It can be used in both TypeScript and JavaScript. In TypeScript, the definition will be automatically resolved via `package.json`. ([Reference](https://www.typescriptlang.org/docs/handbook/declaration-files/consumption.html))
|
|
19
|
+
|
|
20
|
+
### Building
|
|
21
|
+
|
|
22
|
+
To build and compile the typescript sources to javascript use:
|
|
23
|
+
```
|
|
24
|
+
npm install
|
|
25
|
+
npm run build
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### Publishing
|
|
29
|
+
|
|
30
|
+
First build the package then run `npm publish`
|
|
31
|
+
|
|
32
|
+
### Consuming
|
|
33
|
+
|
|
34
|
+
navigate to the folder of your consuming project and run one of the following commands.
|
|
35
|
+
|
|
36
|
+
_published:_
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
npm install @supermodeltools/sdk@0.3.7 --save
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
_unPublished (not recommended):_
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
npm install PATH_TO_GENERATED_PACKAGE --save
|
|
46
|
+
```
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Supermodel
|
|
3
|
+
* Code Graphing & Analysis API
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.3.7
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import * as runtime from '../runtime';
|
|
13
|
+
import type { CodeGraphEnvelope, DomainClassificationResponse, SupermodelIR } from '../models/index';
|
|
14
|
+
export interface GenerateCallGraphRequest {
|
|
15
|
+
idempotencyKey: string;
|
|
16
|
+
file: Blob;
|
|
17
|
+
}
|
|
18
|
+
export interface GenerateDependencyGraphRequest {
|
|
19
|
+
idempotencyKey: string;
|
|
20
|
+
file: Blob;
|
|
21
|
+
}
|
|
22
|
+
export interface GenerateDomainGraphRequest {
|
|
23
|
+
idempotencyKey: string;
|
|
24
|
+
file: Blob;
|
|
25
|
+
}
|
|
26
|
+
export interface GenerateParseGraphRequest {
|
|
27
|
+
idempotencyKey: string;
|
|
28
|
+
file: Blob;
|
|
29
|
+
}
|
|
30
|
+
export interface GenerateSupermodelGraphRequest {
|
|
31
|
+
idempotencyKey: string;
|
|
32
|
+
file: Blob;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
*/
|
|
37
|
+
export declare class DefaultApi extends runtime.BaseAPI {
|
|
38
|
+
/**
|
|
39
|
+
* Upload a zipped repository snapshot to generate the function-level call graph.
|
|
40
|
+
* Call graph
|
|
41
|
+
*/
|
|
42
|
+
generateCallGraphRaw(requestParameters: GenerateCallGraphRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CodeGraphEnvelope>>;
|
|
43
|
+
/**
|
|
44
|
+
* Upload a zipped repository snapshot to generate the function-level call graph.
|
|
45
|
+
* Call graph
|
|
46
|
+
*/
|
|
47
|
+
generateCallGraph(requestParameters: GenerateCallGraphRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CodeGraphEnvelope>;
|
|
48
|
+
/**
|
|
49
|
+
* Upload a zipped repository snapshot to generate the dependency graph.
|
|
50
|
+
* Dependency graph
|
|
51
|
+
*/
|
|
52
|
+
generateDependencyGraphRaw(requestParameters: GenerateDependencyGraphRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CodeGraphEnvelope>>;
|
|
53
|
+
/**
|
|
54
|
+
* Upload a zipped repository snapshot to generate the dependency graph.
|
|
55
|
+
* Dependency graph
|
|
56
|
+
*/
|
|
57
|
+
generateDependencyGraph(requestParameters: GenerateDependencyGraphRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CodeGraphEnvelope>;
|
|
58
|
+
/**
|
|
59
|
+
* Upload a zipped repository snapshot to generate the domain model graph.
|
|
60
|
+
* Domain graph
|
|
61
|
+
*/
|
|
62
|
+
generateDomainGraphRaw(requestParameters: GenerateDomainGraphRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DomainClassificationResponse>>;
|
|
63
|
+
/**
|
|
64
|
+
* Upload a zipped repository snapshot to generate the domain model graph.
|
|
65
|
+
* Domain graph
|
|
66
|
+
*/
|
|
67
|
+
generateDomainGraph(requestParameters: GenerateDomainGraphRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DomainClassificationResponse>;
|
|
68
|
+
/**
|
|
69
|
+
* Upload a zipped repository snapshot to generate parse tree relationships.
|
|
70
|
+
* Parse graph
|
|
71
|
+
*/
|
|
72
|
+
generateParseGraphRaw(requestParameters: GenerateParseGraphRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CodeGraphEnvelope>>;
|
|
73
|
+
/**
|
|
74
|
+
* Upload a zipped repository snapshot to generate parse tree relationships.
|
|
75
|
+
* Parse graph
|
|
76
|
+
*/
|
|
77
|
+
generateParseGraph(requestParameters: GenerateParseGraphRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CodeGraphEnvelope>;
|
|
78
|
+
/**
|
|
79
|
+
* Upload a zipped repository snapshot to generate the Supermodel Intermediate Representation (SIR) artifact bundle.
|
|
80
|
+
* Supermodel graph
|
|
81
|
+
*/
|
|
82
|
+
generateSupermodelGraphRaw(requestParameters: GenerateSupermodelGraphRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SupermodelIR>>;
|
|
83
|
+
/**
|
|
84
|
+
* Upload a zipped repository snapshot to generate the Supermodel Intermediate Representation (SIR) artifact bundle.
|
|
85
|
+
* Supermodel graph
|
|
86
|
+
*/
|
|
87
|
+
generateSupermodelGraph(requestParameters: GenerateSupermodelGraphRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SupermodelIR>;
|
|
88
|
+
}
|
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Supermodel
|
|
6
|
+
* Code Graphing & Analysis API
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.3.7
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
16
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
17
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
19
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
20
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
21
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.DefaultApi = void 0;
|
|
26
|
+
const runtime = require("../runtime");
|
|
27
|
+
const index_1 = require("../models/index");
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
class DefaultApi extends runtime.BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* Upload a zipped repository snapshot to generate the function-level call graph.
|
|
34
|
+
* Call graph
|
|
35
|
+
*/
|
|
36
|
+
generateCallGraphRaw(requestParameters, initOverrides) {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
if (requestParameters['idempotencyKey'] == null) {
|
|
39
|
+
throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling generateCallGraph().');
|
|
40
|
+
}
|
|
41
|
+
if (requestParameters['file'] == null) {
|
|
42
|
+
throw new runtime.RequiredError('file', 'Required parameter "file" was null or undefined when calling generateCallGraph().');
|
|
43
|
+
}
|
|
44
|
+
const queryParameters = {};
|
|
45
|
+
const headerParameters = {};
|
|
46
|
+
if (requestParameters['idempotencyKey'] != null) {
|
|
47
|
+
headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
|
|
48
|
+
}
|
|
49
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
50
|
+
headerParameters["X-Api-Key"] = yield this.configuration.apiKey("X-Api-Key"); // ApiKeyAuth authentication
|
|
51
|
+
}
|
|
52
|
+
const consumes = [
|
|
53
|
+
{ contentType: 'multipart/form-data' },
|
|
54
|
+
];
|
|
55
|
+
// @ts-ignore: canConsumeForm may be unused
|
|
56
|
+
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
57
|
+
let formParams;
|
|
58
|
+
let useForm = false;
|
|
59
|
+
// use FormData to transmit files using content-type "multipart/form-data"
|
|
60
|
+
useForm = canConsumeForm;
|
|
61
|
+
if (useForm) {
|
|
62
|
+
formParams = new FormData();
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
formParams = new URLSearchParams();
|
|
66
|
+
}
|
|
67
|
+
if (requestParameters['file'] != null) {
|
|
68
|
+
formParams.append('file', requestParameters['file']);
|
|
69
|
+
}
|
|
70
|
+
const response = yield this.request({
|
|
71
|
+
path: `/v1/graphs/call`,
|
|
72
|
+
method: 'POST',
|
|
73
|
+
headers: headerParameters,
|
|
74
|
+
query: queryParameters,
|
|
75
|
+
body: formParams,
|
|
76
|
+
}, initOverrides);
|
|
77
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CodeGraphEnvelopeFromJSON)(jsonValue));
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Upload a zipped repository snapshot to generate the function-level call graph.
|
|
82
|
+
* Call graph
|
|
83
|
+
*/
|
|
84
|
+
generateCallGraph(requestParameters, initOverrides) {
|
|
85
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
86
|
+
const response = yield this.generateCallGraphRaw(requestParameters, initOverrides);
|
|
87
|
+
return yield response.value();
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Upload a zipped repository snapshot to generate the dependency graph.
|
|
92
|
+
* Dependency graph
|
|
93
|
+
*/
|
|
94
|
+
generateDependencyGraphRaw(requestParameters, initOverrides) {
|
|
95
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
96
|
+
if (requestParameters['idempotencyKey'] == null) {
|
|
97
|
+
throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling generateDependencyGraph().');
|
|
98
|
+
}
|
|
99
|
+
if (requestParameters['file'] == null) {
|
|
100
|
+
throw new runtime.RequiredError('file', 'Required parameter "file" was null or undefined when calling generateDependencyGraph().');
|
|
101
|
+
}
|
|
102
|
+
const queryParameters = {};
|
|
103
|
+
const headerParameters = {};
|
|
104
|
+
if (requestParameters['idempotencyKey'] != null) {
|
|
105
|
+
headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
|
|
106
|
+
}
|
|
107
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
108
|
+
headerParameters["X-Api-Key"] = yield this.configuration.apiKey("X-Api-Key"); // ApiKeyAuth authentication
|
|
109
|
+
}
|
|
110
|
+
const consumes = [
|
|
111
|
+
{ contentType: 'multipart/form-data' },
|
|
112
|
+
];
|
|
113
|
+
// @ts-ignore: canConsumeForm may be unused
|
|
114
|
+
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
115
|
+
let formParams;
|
|
116
|
+
let useForm = false;
|
|
117
|
+
// use FormData to transmit files using content-type "multipart/form-data"
|
|
118
|
+
useForm = canConsumeForm;
|
|
119
|
+
if (useForm) {
|
|
120
|
+
formParams = new FormData();
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
formParams = new URLSearchParams();
|
|
124
|
+
}
|
|
125
|
+
if (requestParameters['file'] != null) {
|
|
126
|
+
formParams.append('file', requestParameters['file']);
|
|
127
|
+
}
|
|
128
|
+
const response = yield this.request({
|
|
129
|
+
path: `/v1/graphs/dependency`,
|
|
130
|
+
method: 'POST',
|
|
131
|
+
headers: headerParameters,
|
|
132
|
+
query: queryParameters,
|
|
133
|
+
body: formParams,
|
|
134
|
+
}, initOverrides);
|
|
135
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CodeGraphEnvelopeFromJSON)(jsonValue));
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Upload a zipped repository snapshot to generate the dependency graph.
|
|
140
|
+
* Dependency graph
|
|
141
|
+
*/
|
|
142
|
+
generateDependencyGraph(requestParameters, initOverrides) {
|
|
143
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
144
|
+
const response = yield this.generateDependencyGraphRaw(requestParameters, initOverrides);
|
|
145
|
+
return yield response.value();
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Upload a zipped repository snapshot to generate the domain model graph.
|
|
150
|
+
* Domain graph
|
|
151
|
+
*/
|
|
152
|
+
generateDomainGraphRaw(requestParameters, initOverrides) {
|
|
153
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
154
|
+
if (requestParameters['idempotencyKey'] == null) {
|
|
155
|
+
throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling generateDomainGraph().');
|
|
156
|
+
}
|
|
157
|
+
if (requestParameters['file'] == null) {
|
|
158
|
+
throw new runtime.RequiredError('file', 'Required parameter "file" was null or undefined when calling generateDomainGraph().');
|
|
159
|
+
}
|
|
160
|
+
const queryParameters = {};
|
|
161
|
+
const headerParameters = {};
|
|
162
|
+
if (requestParameters['idempotencyKey'] != null) {
|
|
163
|
+
headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
|
|
164
|
+
}
|
|
165
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
166
|
+
headerParameters["X-Api-Key"] = yield this.configuration.apiKey("X-Api-Key"); // ApiKeyAuth authentication
|
|
167
|
+
}
|
|
168
|
+
const consumes = [
|
|
169
|
+
{ contentType: 'multipart/form-data' },
|
|
170
|
+
];
|
|
171
|
+
// @ts-ignore: canConsumeForm may be unused
|
|
172
|
+
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
173
|
+
let formParams;
|
|
174
|
+
let useForm = false;
|
|
175
|
+
// use FormData to transmit files using content-type "multipart/form-data"
|
|
176
|
+
useForm = canConsumeForm;
|
|
177
|
+
if (useForm) {
|
|
178
|
+
formParams = new FormData();
|
|
179
|
+
}
|
|
180
|
+
else {
|
|
181
|
+
formParams = new URLSearchParams();
|
|
182
|
+
}
|
|
183
|
+
if (requestParameters['file'] != null) {
|
|
184
|
+
formParams.append('file', requestParameters['file']);
|
|
185
|
+
}
|
|
186
|
+
const response = yield this.request({
|
|
187
|
+
path: `/v1/graphs/domain`,
|
|
188
|
+
method: 'POST',
|
|
189
|
+
headers: headerParameters,
|
|
190
|
+
query: queryParameters,
|
|
191
|
+
body: formParams,
|
|
192
|
+
}, initOverrides);
|
|
193
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.DomainClassificationResponseFromJSON)(jsonValue));
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Upload a zipped repository snapshot to generate the domain model graph.
|
|
198
|
+
* Domain graph
|
|
199
|
+
*/
|
|
200
|
+
generateDomainGraph(requestParameters, initOverrides) {
|
|
201
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
202
|
+
const response = yield this.generateDomainGraphRaw(requestParameters, initOverrides);
|
|
203
|
+
return yield response.value();
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Upload a zipped repository snapshot to generate parse tree relationships.
|
|
208
|
+
* Parse graph
|
|
209
|
+
*/
|
|
210
|
+
generateParseGraphRaw(requestParameters, initOverrides) {
|
|
211
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
212
|
+
if (requestParameters['idempotencyKey'] == null) {
|
|
213
|
+
throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling generateParseGraph().');
|
|
214
|
+
}
|
|
215
|
+
if (requestParameters['file'] == null) {
|
|
216
|
+
throw new runtime.RequiredError('file', 'Required parameter "file" was null or undefined when calling generateParseGraph().');
|
|
217
|
+
}
|
|
218
|
+
const queryParameters = {};
|
|
219
|
+
const headerParameters = {};
|
|
220
|
+
if (requestParameters['idempotencyKey'] != null) {
|
|
221
|
+
headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
|
|
222
|
+
}
|
|
223
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
224
|
+
headerParameters["X-Api-Key"] = yield this.configuration.apiKey("X-Api-Key"); // ApiKeyAuth authentication
|
|
225
|
+
}
|
|
226
|
+
const consumes = [
|
|
227
|
+
{ contentType: 'multipart/form-data' },
|
|
228
|
+
];
|
|
229
|
+
// @ts-ignore: canConsumeForm may be unused
|
|
230
|
+
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
231
|
+
let formParams;
|
|
232
|
+
let useForm = false;
|
|
233
|
+
// use FormData to transmit files using content-type "multipart/form-data"
|
|
234
|
+
useForm = canConsumeForm;
|
|
235
|
+
if (useForm) {
|
|
236
|
+
formParams = new FormData();
|
|
237
|
+
}
|
|
238
|
+
else {
|
|
239
|
+
formParams = new URLSearchParams();
|
|
240
|
+
}
|
|
241
|
+
if (requestParameters['file'] != null) {
|
|
242
|
+
formParams.append('file', requestParameters['file']);
|
|
243
|
+
}
|
|
244
|
+
const response = yield this.request({
|
|
245
|
+
path: `/v1/graphs/parse`,
|
|
246
|
+
method: 'POST',
|
|
247
|
+
headers: headerParameters,
|
|
248
|
+
query: queryParameters,
|
|
249
|
+
body: formParams,
|
|
250
|
+
}, initOverrides);
|
|
251
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CodeGraphEnvelopeFromJSON)(jsonValue));
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Upload a zipped repository snapshot to generate parse tree relationships.
|
|
256
|
+
* Parse graph
|
|
257
|
+
*/
|
|
258
|
+
generateParseGraph(requestParameters, initOverrides) {
|
|
259
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
260
|
+
const response = yield this.generateParseGraphRaw(requestParameters, initOverrides);
|
|
261
|
+
return yield response.value();
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Upload a zipped repository snapshot to generate the Supermodel Intermediate Representation (SIR) artifact bundle.
|
|
266
|
+
* Supermodel graph
|
|
267
|
+
*/
|
|
268
|
+
generateSupermodelGraphRaw(requestParameters, initOverrides) {
|
|
269
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
270
|
+
if (requestParameters['idempotencyKey'] == null) {
|
|
271
|
+
throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling generateSupermodelGraph().');
|
|
272
|
+
}
|
|
273
|
+
if (requestParameters['file'] == null) {
|
|
274
|
+
throw new runtime.RequiredError('file', 'Required parameter "file" was null or undefined when calling generateSupermodelGraph().');
|
|
275
|
+
}
|
|
276
|
+
const queryParameters = {};
|
|
277
|
+
const headerParameters = {};
|
|
278
|
+
if (requestParameters['idempotencyKey'] != null) {
|
|
279
|
+
headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
|
|
280
|
+
}
|
|
281
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
282
|
+
headerParameters["X-Api-Key"] = yield this.configuration.apiKey("X-Api-Key"); // ApiKeyAuth authentication
|
|
283
|
+
}
|
|
284
|
+
const consumes = [
|
|
285
|
+
{ contentType: 'multipart/form-data' },
|
|
286
|
+
];
|
|
287
|
+
// @ts-ignore: canConsumeForm may be unused
|
|
288
|
+
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
289
|
+
let formParams;
|
|
290
|
+
let useForm = false;
|
|
291
|
+
// use FormData to transmit files using content-type "multipart/form-data"
|
|
292
|
+
useForm = canConsumeForm;
|
|
293
|
+
if (useForm) {
|
|
294
|
+
formParams = new FormData();
|
|
295
|
+
}
|
|
296
|
+
else {
|
|
297
|
+
formParams = new URLSearchParams();
|
|
298
|
+
}
|
|
299
|
+
if (requestParameters['file'] != null) {
|
|
300
|
+
formParams.append('file', requestParameters['file']);
|
|
301
|
+
}
|
|
302
|
+
const response = yield this.request({
|
|
303
|
+
path: `/v1/graphs/supermodel`,
|
|
304
|
+
method: 'POST',
|
|
305
|
+
headers: headerParameters,
|
|
306
|
+
query: queryParameters,
|
|
307
|
+
body: formParams,
|
|
308
|
+
}, initOverrides);
|
|
309
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.SupermodelIRFromJSON)(jsonValue));
|
|
310
|
+
});
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* Upload a zipped repository snapshot to generate the Supermodel Intermediate Representation (SIR) artifact bundle.
|
|
314
|
+
* Supermodel graph
|
|
315
|
+
*/
|
|
316
|
+
generateSupermodelGraph(requestParameters, initOverrides) {
|
|
317
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
318
|
+
const response = yield this.generateSupermodelGraphRaw(requestParameters, initOverrides);
|
|
319
|
+
return yield response.value();
|
|
320
|
+
});
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
exports.DefaultApi = DefaultApi;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './DefaultApi';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
/* tslint:disable */
|
|
18
|
+
/* eslint-disable */
|
|
19
|
+
__exportStar(require("./DefaultApi"), exports);
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Supermodel
|
|
3
|
+
* Code Graphing & Analysis API
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.3.7
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import * as runtime from '../runtime';
|
|
13
|
+
import type { CodeGraphEnvelope, DomainClassificationResponse, SupermodelIR } from '../models/index';
|
|
14
|
+
export interface GenerateCallGraphRequest {
|
|
15
|
+
idempotencyKey: string;
|
|
16
|
+
file: Blob;
|
|
17
|
+
}
|
|
18
|
+
export interface GenerateDependencyGraphRequest {
|
|
19
|
+
idempotencyKey: string;
|
|
20
|
+
file: Blob;
|
|
21
|
+
}
|
|
22
|
+
export interface GenerateDomainGraphRequest {
|
|
23
|
+
idempotencyKey: string;
|
|
24
|
+
file: Blob;
|
|
25
|
+
}
|
|
26
|
+
export interface GenerateParseGraphRequest {
|
|
27
|
+
idempotencyKey: string;
|
|
28
|
+
file: Blob;
|
|
29
|
+
}
|
|
30
|
+
export interface GenerateSupermodelGraphRequest {
|
|
31
|
+
idempotencyKey: string;
|
|
32
|
+
file: Blob;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
*/
|
|
37
|
+
export declare class DefaultApi extends runtime.BaseAPI {
|
|
38
|
+
/**
|
|
39
|
+
* Upload a zipped repository snapshot to generate the function-level call graph.
|
|
40
|
+
* Call graph
|
|
41
|
+
*/
|
|
42
|
+
generateCallGraphRaw(requestParameters: GenerateCallGraphRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CodeGraphEnvelope>>;
|
|
43
|
+
/**
|
|
44
|
+
* Upload a zipped repository snapshot to generate the function-level call graph.
|
|
45
|
+
* Call graph
|
|
46
|
+
*/
|
|
47
|
+
generateCallGraph(requestParameters: GenerateCallGraphRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CodeGraphEnvelope>;
|
|
48
|
+
/**
|
|
49
|
+
* Upload a zipped repository snapshot to generate the dependency graph.
|
|
50
|
+
* Dependency graph
|
|
51
|
+
*/
|
|
52
|
+
generateDependencyGraphRaw(requestParameters: GenerateDependencyGraphRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CodeGraphEnvelope>>;
|
|
53
|
+
/**
|
|
54
|
+
* Upload a zipped repository snapshot to generate the dependency graph.
|
|
55
|
+
* Dependency graph
|
|
56
|
+
*/
|
|
57
|
+
generateDependencyGraph(requestParameters: GenerateDependencyGraphRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CodeGraphEnvelope>;
|
|
58
|
+
/**
|
|
59
|
+
* Upload a zipped repository snapshot to generate the domain model graph.
|
|
60
|
+
* Domain graph
|
|
61
|
+
*/
|
|
62
|
+
generateDomainGraphRaw(requestParameters: GenerateDomainGraphRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DomainClassificationResponse>>;
|
|
63
|
+
/**
|
|
64
|
+
* Upload a zipped repository snapshot to generate the domain model graph.
|
|
65
|
+
* Domain graph
|
|
66
|
+
*/
|
|
67
|
+
generateDomainGraph(requestParameters: GenerateDomainGraphRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DomainClassificationResponse>;
|
|
68
|
+
/**
|
|
69
|
+
* Upload a zipped repository snapshot to generate parse tree relationships.
|
|
70
|
+
* Parse graph
|
|
71
|
+
*/
|
|
72
|
+
generateParseGraphRaw(requestParameters: GenerateParseGraphRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CodeGraphEnvelope>>;
|
|
73
|
+
/**
|
|
74
|
+
* Upload a zipped repository snapshot to generate parse tree relationships.
|
|
75
|
+
* Parse graph
|
|
76
|
+
*/
|
|
77
|
+
generateParseGraph(requestParameters: GenerateParseGraphRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CodeGraphEnvelope>;
|
|
78
|
+
/**
|
|
79
|
+
* Upload a zipped repository snapshot to generate the Supermodel Intermediate Representation (SIR) artifact bundle.
|
|
80
|
+
* Supermodel graph
|
|
81
|
+
*/
|
|
82
|
+
generateSupermodelGraphRaw(requestParameters: GenerateSupermodelGraphRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SupermodelIR>>;
|
|
83
|
+
/**
|
|
84
|
+
* Upload a zipped repository snapshot to generate the Supermodel Intermediate Representation (SIR) artifact bundle.
|
|
85
|
+
* Supermodel graph
|
|
86
|
+
*/
|
|
87
|
+
generateSupermodelGraph(requestParameters: GenerateSupermodelGraphRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SupermodelIR>;
|
|
88
|
+
}
|