@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,319 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Supermodel
|
|
5
|
+
* Code Graphing & Analysis API
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.3.7
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
import * as runtime from '../runtime';
|
|
24
|
+
import { CodeGraphEnvelopeFromJSON, DomainClassificationResponseFromJSON, SupermodelIRFromJSON, } from '../models/index';
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
export class DefaultApi extends runtime.BaseAPI {
|
|
29
|
+
/**
|
|
30
|
+
* Upload a zipped repository snapshot to generate the function-level call graph.
|
|
31
|
+
* Call graph
|
|
32
|
+
*/
|
|
33
|
+
generateCallGraphRaw(requestParameters, initOverrides) {
|
|
34
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
+
if (requestParameters['idempotencyKey'] == null) {
|
|
36
|
+
throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling generateCallGraph().');
|
|
37
|
+
}
|
|
38
|
+
if (requestParameters['file'] == null) {
|
|
39
|
+
throw new runtime.RequiredError('file', 'Required parameter "file" was null or undefined when calling generateCallGraph().');
|
|
40
|
+
}
|
|
41
|
+
const queryParameters = {};
|
|
42
|
+
const headerParameters = {};
|
|
43
|
+
if (requestParameters['idempotencyKey'] != null) {
|
|
44
|
+
headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
|
|
45
|
+
}
|
|
46
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
47
|
+
headerParameters["X-Api-Key"] = yield this.configuration.apiKey("X-Api-Key"); // ApiKeyAuth authentication
|
|
48
|
+
}
|
|
49
|
+
const consumes = [
|
|
50
|
+
{ contentType: 'multipart/form-data' },
|
|
51
|
+
];
|
|
52
|
+
// @ts-ignore: canConsumeForm may be unused
|
|
53
|
+
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
54
|
+
let formParams;
|
|
55
|
+
let useForm = false;
|
|
56
|
+
// use FormData to transmit files using content-type "multipart/form-data"
|
|
57
|
+
useForm = canConsumeForm;
|
|
58
|
+
if (useForm) {
|
|
59
|
+
formParams = new FormData();
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
formParams = new URLSearchParams();
|
|
63
|
+
}
|
|
64
|
+
if (requestParameters['file'] != null) {
|
|
65
|
+
formParams.append('file', requestParameters['file']);
|
|
66
|
+
}
|
|
67
|
+
const response = yield this.request({
|
|
68
|
+
path: `/v1/graphs/call`,
|
|
69
|
+
method: 'POST',
|
|
70
|
+
headers: headerParameters,
|
|
71
|
+
query: queryParameters,
|
|
72
|
+
body: formParams,
|
|
73
|
+
}, initOverrides);
|
|
74
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => CodeGraphEnvelopeFromJSON(jsonValue));
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Upload a zipped repository snapshot to generate the function-level call graph.
|
|
79
|
+
* Call graph
|
|
80
|
+
*/
|
|
81
|
+
generateCallGraph(requestParameters, initOverrides) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
83
|
+
const response = yield this.generateCallGraphRaw(requestParameters, initOverrides);
|
|
84
|
+
return yield response.value();
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Upload a zipped repository snapshot to generate the dependency graph.
|
|
89
|
+
* Dependency graph
|
|
90
|
+
*/
|
|
91
|
+
generateDependencyGraphRaw(requestParameters, initOverrides) {
|
|
92
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
93
|
+
if (requestParameters['idempotencyKey'] == null) {
|
|
94
|
+
throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling generateDependencyGraph().');
|
|
95
|
+
}
|
|
96
|
+
if (requestParameters['file'] == null) {
|
|
97
|
+
throw new runtime.RequiredError('file', 'Required parameter "file" was null or undefined when calling generateDependencyGraph().');
|
|
98
|
+
}
|
|
99
|
+
const queryParameters = {};
|
|
100
|
+
const headerParameters = {};
|
|
101
|
+
if (requestParameters['idempotencyKey'] != null) {
|
|
102
|
+
headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
|
|
103
|
+
}
|
|
104
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
105
|
+
headerParameters["X-Api-Key"] = yield this.configuration.apiKey("X-Api-Key"); // ApiKeyAuth authentication
|
|
106
|
+
}
|
|
107
|
+
const consumes = [
|
|
108
|
+
{ contentType: 'multipart/form-data' },
|
|
109
|
+
];
|
|
110
|
+
// @ts-ignore: canConsumeForm may be unused
|
|
111
|
+
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
112
|
+
let formParams;
|
|
113
|
+
let useForm = false;
|
|
114
|
+
// use FormData to transmit files using content-type "multipart/form-data"
|
|
115
|
+
useForm = canConsumeForm;
|
|
116
|
+
if (useForm) {
|
|
117
|
+
formParams = new FormData();
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
formParams = new URLSearchParams();
|
|
121
|
+
}
|
|
122
|
+
if (requestParameters['file'] != null) {
|
|
123
|
+
formParams.append('file', requestParameters['file']);
|
|
124
|
+
}
|
|
125
|
+
const response = yield this.request({
|
|
126
|
+
path: `/v1/graphs/dependency`,
|
|
127
|
+
method: 'POST',
|
|
128
|
+
headers: headerParameters,
|
|
129
|
+
query: queryParameters,
|
|
130
|
+
body: formParams,
|
|
131
|
+
}, initOverrides);
|
|
132
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => CodeGraphEnvelopeFromJSON(jsonValue));
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Upload a zipped repository snapshot to generate the dependency graph.
|
|
137
|
+
* Dependency graph
|
|
138
|
+
*/
|
|
139
|
+
generateDependencyGraph(requestParameters, initOverrides) {
|
|
140
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
141
|
+
const response = yield this.generateDependencyGraphRaw(requestParameters, initOverrides);
|
|
142
|
+
return yield response.value();
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Upload a zipped repository snapshot to generate the domain model graph.
|
|
147
|
+
* Domain graph
|
|
148
|
+
*/
|
|
149
|
+
generateDomainGraphRaw(requestParameters, initOverrides) {
|
|
150
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
151
|
+
if (requestParameters['idempotencyKey'] == null) {
|
|
152
|
+
throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling generateDomainGraph().');
|
|
153
|
+
}
|
|
154
|
+
if (requestParameters['file'] == null) {
|
|
155
|
+
throw new runtime.RequiredError('file', 'Required parameter "file" was null or undefined when calling generateDomainGraph().');
|
|
156
|
+
}
|
|
157
|
+
const queryParameters = {};
|
|
158
|
+
const headerParameters = {};
|
|
159
|
+
if (requestParameters['idempotencyKey'] != null) {
|
|
160
|
+
headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
|
|
161
|
+
}
|
|
162
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
163
|
+
headerParameters["X-Api-Key"] = yield this.configuration.apiKey("X-Api-Key"); // ApiKeyAuth authentication
|
|
164
|
+
}
|
|
165
|
+
const consumes = [
|
|
166
|
+
{ contentType: 'multipart/form-data' },
|
|
167
|
+
];
|
|
168
|
+
// @ts-ignore: canConsumeForm may be unused
|
|
169
|
+
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
170
|
+
let formParams;
|
|
171
|
+
let useForm = false;
|
|
172
|
+
// use FormData to transmit files using content-type "multipart/form-data"
|
|
173
|
+
useForm = canConsumeForm;
|
|
174
|
+
if (useForm) {
|
|
175
|
+
formParams = new FormData();
|
|
176
|
+
}
|
|
177
|
+
else {
|
|
178
|
+
formParams = new URLSearchParams();
|
|
179
|
+
}
|
|
180
|
+
if (requestParameters['file'] != null) {
|
|
181
|
+
formParams.append('file', requestParameters['file']);
|
|
182
|
+
}
|
|
183
|
+
const response = yield this.request({
|
|
184
|
+
path: `/v1/graphs/domain`,
|
|
185
|
+
method: 'POST',
|
|
186
|
+
headers: headerParameters,
|
|
187
|
+
query: queryParameters,
|
|
188
|
+
body: formParams,
|
|
189
|
+
}, initOverrides);
|
|
190
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => DomainClassificationResponseFromJSON(jsonValue));
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Upload a zipped repository snapshot to generate the domain model graph.
|
|
195
|
+
* Domain graph
|
|
196
|
+
*/
|
|
197
|
+
generateDomainGraph(requestParameters, initOverrides) {
|
|
198
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
199
|
+
const response = yield this.generateDomainGraphRaw(requestParameters, initOverrides);
|
|
200
|
+
return yield response.value();
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Upload a zipped repository snapshot to generate parse tree relationships.
|
|
205
|
+
* Parse graph
|
|
206
|
+
*/
|
|
207
|
+
generateParseGraphRaw(requestParameters, initOverrides) {
|
|
208
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
209
|
+
if (requestParameters['idempotencyKey'] == null) {
|
|
210
|
+
throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling generateParseGraph().');
|
|
211
|
+
}
|
|
212
|
+
if (requestParameters['file'] == null) {
|
|
213
|
+
throw new runtime.RequiredError('file', 'Required parameter "file" was null or undefined when calling generateParseGraph().');
|
|
214
|
+
}
|
|
215
|
+
const queryParameters = {};
|
|
216
|
+
const headerParameters = {};
|
|
217
|
+
if (requestParameters['idempotencyKey'] != null) {
|
|
218
|
+
headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
|
|
219
|
+
}
|
|
220
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
221
|
+
headerParameters["X-Api-Key"] = yield this.configuration.apiKey("X-Api-Key"); // ApiKeyAuth authentication
|
|
222
|
+
}
|
|
223
|
+
const consumes = [
|
|
224
|
+
{ contentType: 'multipart/form-data' },
|
|
225
|
+
];
|
|
226
|
+
// @ts-ignore: canConsumeForm may be unused
|
|
227
|
+
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
228
|
+
let formParams;
|
|
229
|
+
let useForm = false;
|
|
230
|
+
// use FormData to transmit files using content-type "multipart/form-data"
|
|
231
|
+
useForm = canConsumeForm;
|
|
232
|
+
if (useForm) {
|
|
233
|
+
formParams = new FormData();
|
|
234
|
+
}
|
|
235
|
+
else {
|
|
236
|
+
formParams = new URLSearchParams();
|
|
237
|
+
}
|
|
238
|
+
if (requestParameters['file'] != null) {
|
|
239
|
+
formParams.append('file', requestParameters['file']);
|
|
240
|
+
}
|
|
241
|
+
const response = yield this.request({
|
|
242
|
+
path: `/v1/graphs/parse`,
|
|
243
|
+
method: 'POST',
|
|
244
|
+
headers: headerParameters,
|
|
245
|
+
query: queryParameters,
|
|
246
|
+
body: formParams,
|
|
247
|
+
}, initOverrides);
|
|
248
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => CodeGraphEnvelopeFromJSON(jsonValue));
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* Upload a zipped repository snapshot to generate parse tree relationships.
|
|
253
|
+
* Parse graph
|
|
254
|
+
*/
|
|
255
|
+
generateParseGraph(requestParameters, initOverrides) {
|
|
256
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
257
|
+
const response = yield this.generateParseGraphRaw(requestParameters, initOverrides);
|
|
258
|
+
return yield response.value();
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Upload a zipped repository snapshot to generate the Supermodel Intermediate Representation (SIR) artifact bundle.
|
|
263
|
+
* Supermodel graph
|
|
264
|
+
*/
|
|
265
|
+
generateSupermodelGraphRaw(requestParameters, initOverrides) {
|
|
266
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
267
|
+
if (requestParameters['idempotencyKey'] == null) {
|
|
268
|
+
throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling generateSupermodelGraph().');
|
|
269
|
+
}
|
|
270
|
+
if (requestParameters['file'] == null) {
|
|
271
|
+
throw new runtime.RequiredError('file', 'Required parameter "file" was null or undefined when calling generateSupermodelGraph().');
|
|
272
|
+
}
|
|
273
|
+
const queryParameters = {};
|
|
274
|
+
const headerParameters = {};
|
|
275
|
+
if (requestParameters['idempotencyKey'] != null) {
|
|
276
|
+
headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
|
|
277
|
+
}
|
|
278
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
279
|
+
headerParameters["X-Api-Key"] = yield this.configuration.apiKey("X-Api-Key"); // ApiKeyAuth authentication
|
|
280
|
+
}
|
|
281
|
+
const consumes = [
|
|
282
|
+
{ contentType: 'multipart/form-data' },
|
|
283
|
+
];
|
|
284
|
+
// @ts-ignore: canConsumeForm may be unused
|
|
285
|
+
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
286
|
+
let formParams;
|
|
287
|
+
let useForm = false;
|
|
288
|
+
// use FormData to transmit files using content-type "multipart/form-data"
|
|
289
|
+
useForm = canConsumeForm;
|
|
290
|
+
if (useForm) {
|
|
291
|
+
formParams = new FormData();
|
|
292
|
+
}
|
|
293
|
+
else {
|
|
294
|
+
formParams = new URLSearchParams();
|
|
295
|
+
}
|
|
296
|
+
if (requestParameters['file'] != null) {
|
|
297
|
+
formParams.append('file', requestParameters['file']);
|
|
298
|
+
}
|
|
299
|
+
const response = yield this.request({
|
|
300
|
+
path: `/v1/graphs/supermodel`,
|
|
301
|
+
method: 'POST',
|
|
302
|
+
headers: headerParameters,
|
|
303
|
+
query: queryParameters,
|
|
304
|
+
body: formParams,
|
|
305
|
+
}, initOverrides);
|
|
306
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SupermodelIRFromJSON(jsonValue));
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* Upload a zipped repository snapshot to generate the Supermodel Intermediate Representation (SIR) artifact bundle.
|
|
311
|
+
* Supermodel graph
|
|
312
|
+
*/
|
|
313
|
+
generateSupermodelGraph(requestParameters, initOverrides) {
|
|
314
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
315
|
+
const response = yield this.generateSupermodelGraphRaw(requestParameters, initOverrides);
|
|
316
|
+
return yield response.value();
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './DefaultApi';
|
|
@@ -0,0 +1,61 @@
|
|
|
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
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface ClassificationStats
|
|
16
|
+
*/
|
|
17
|
+
export interface ClassificationStats {
|
|
18
|
+
/**
|
|
19
|
+
* Number of domains discovered
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof ClassificationStats
|
|
22
|
+
*/
|
|
23
|
+
domainCount: number;
|
|
24
|
+
/**
|
|
25
|
+
* Number of relationships
|
|
26
|
+
* @type {number}
|
|
27
|
+
* @memberof ClassificationStats
|
|
28
|
+
*/
|
|
29
|
+
relationshipCount: number;
|
|
30
|
+
/**
|
|
31
|
+
* Count of file assignments
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof ClassificationStats
|
|
34
|
+
*/
|
|
35
|
+
fileAssignments: number;
|
|
36
|
+
/**
|
|
37
|
+
* Count of function assignments
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof ClassificationStats
|
|
40
|
+
*/
|
|
41
|
+
functionAssignments: number;
|
|
42
|
+
/**
|
|
43
|
+
* Count of unassigned functions
|
|
44
|
+
* @type {number}
|
|
45
|
+
* @memberof ClassificationStats
|
|
46
|
+
*/
|
|
47
|
+
unassignedFunctions: number;
|
|
48
|
+
/**
|
|
49
|
+
* Count of class assignments
|
|
50
|
+
* @type {number}
|
|
51
|
+
* @memberof ClassificationStats
|
|
52
|
+
*/
|
|
53
|
+
classAssignments: number;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Check if a given object implements the ClassificationStats interface.
|
|
57
|
+
*/
|
|
58
|
+
export declare function instanceOfClassificationStats(value: object): value is ClassificationStats;
|
|
59
|
+
export declare function ClassificationStatsFromJSON(json: any): ClassificationStats;
|
|
60
|
+
export declare function ClassificationStatsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClassificationStats;
|
|
61
|
+
export declare function ClassificationStatsToJSON(value?: ClassificationStats | null): any;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Supermodel
|
|
5
|
+
* Code Graphing & Analysis API
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.3.7
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Check if a given object implements the ClassificationStats interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfClassificationStats(value) {
|
|
18
|
+
if (!('domainCount' in value) || value['domainCount'] === undefined)
|
|
19
|
+
return false;
|
|
20
|
+
if (!('relationshipCount' in value) || value['relationshipCount'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
if (!('fileAssignments' in value) || value['fileAssignments'] === undefined)
|
|
23
|
+
return false;
|
|
24
|
+
if (!('functionAssignments' in value) || value['functionAssignments'] === undefined)
|
|
25
|
+
return false;
|
|
26
|
+
if (!('unassignedFunctions' in value) || value['unassignedFunctions'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
if (!('classAssignments' in value) || value['classAssignments'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
export function ClassificationStatsFromJSON(json) {
|
|
33
|
+
return ClassificationStatsFromJSONTyped(json, false);
|
|
34
|
+
}
|
|
35
|
+
export function ClassificationStatsFromJSONTyped(json, ignoreDiscriminator) {
|
|
36
|
+
if (json == null) {
|
|
37
|
+
return json;
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
'domainCount': json['domainCount'],
|
|
41
|
+
'relationshipCount': json['relationshipCount'],
|
|
42
|
+
'fileAssignments': json['fileAssignments'],
|
|
43
|
+
'functionAssignments': json['functionAssignments'],
|
|
44
|
+
'unassignedFunctions': json['unassignedFunctions'],
|
|
45
|
+
'classAssignments': json['classAssignments'],
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
export function ClassificationStatsToJSON(value) {
|
|
49
|
+
if (value == null) {
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
'domainCount': value['domainCount'],
|
|
54
|
+
'relationshipCount': value['relationshipCount'],
|
|
55
|
+
'fileAssignments': value['fileAssignments'],
|
|
56
|
+
'functionAssignments': value['functionAssignments'],
|
|
57
|
+
'unassignedFunctions': value['unassignedFunctions'],
|
|
58
|
+
'classAssignments': value['classAssignments'],
|
|
59
|
+
};
|
|
60
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
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 type { CodeGraphStats } from './CodeGraphStats';
|
|
13
|
+
import type { CodeGraphEnvelopeGraph } from './CodeGraphEnvelopeGraph';
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @export
|
|
17
|
+
* @interface CodeGraphEnvelope
|
|
18
|
+
*/
|
|
19
|
+
export interface CodeGraphEnvelope {
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
* @type {Date}
|
|
23
|
+
* @memberof CodeGraphEnvelope
|
|
24
|
+
*/
|
|
25
|
+
generatedAt?: Date;
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @type {string}
|
|
29
|
+
* @memberof CodeGraphEnvelope
|
|
30
|
+
*/
|
|
31
|
+
message?: string;
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @type {CodeGraphStats}
|
|
35
|
+
* @memberof CodeGraphEnvelope
|
|
36
|
+
*/
|
|
37
|
+
stats?: CodeGraphStats;
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @type {CodeGraphEnvelopeGraph}
|
|
41
|
+
* @memberof CodeGraphEnvelope
|
|
42
|
+
*/
|
|
43
|
+
graph: CodeGraphEnvelopeGraph;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Check if a given object implements the CodeGraphEnvelope interface.
|
|
47
|
+
*/
|
|
48
|
+
export declare function instanceOfCodeGraphEnvelope(value: object): value is CodeGraphEnvelope;
|
|
49
|
+
export declare function CodeGraphEnvelopeFromJSON(json: any): CodeGraphEnvelope;
|
|
50
|
+
export declare function CodeGraphEnvelopeFromJSONTyped(json: any, ignoreDiscriminator: boolean): CodeGraphEnvelope;
|
|
51
|
+
export declare function CodeGraphEnvelopeToJSON(value?: CodeGraphEnvelope | null): any;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Supermodel
|
|
5
|
+
* Code Graphing & Analysis API
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.3.7
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
import { CodeGraphStatsFromJSON, CodeGraphStatsToJSON, } from './CodeGraphStats';
|
|
15
|
+
import { CodeGraphEnvelopeGraphFromJSON, CodeGraphEnvelopeGraphToJSON, } from './CodeGraphEnvelopeGraph';
|
|
16
|
+
/**
|
|
17
|
+
* Check if a given object implements the CodeGraphEnvelope interface.
|
|
18
|
+
*/
|
|
19
|
+
export function instanceOfCodeGraphEnvelope(value) {
|
|
20
|
+
if (!('graph' in value) || value['graph'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
export function CodeGraphEnvelopeFromJSON(json) {
|
|
25
|
+
return CodeGraphEnvelopeFromJSONTyped(json, false);
|
|
26
|
+
}
|
|
27
|
+
export function CodeGraphEnvelopeFromJSONTyped(json, ignoreDiscriminator) {
|
|
28
|
+
if (json == null) {
|
|
29
|
+
return json;
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
'generatedAt': json['generatedAt'] == null ? undefined : (new Date(json['generatedAt'])),
|
|
33
|
+
'message': json['message'] == null ? undefined : json['message'],
|
|
34
|
+
'stats': json['stats'] == null ? undefined : CodeGraphStatsFromJSON(json['stats']),
|
|
35
|
+
'graph': CodeGraphEnvelopeGraphFromJSON(json['graph']),
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export function CodeGraphEnvelopeToJSON(value) {
|
|
39
|
+
if (value == null) {
|
|
40
|
+
return value;
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
'generatedAt': value['generatedAt'] == null ? undefined : ((value['generatedAt']).toISOString()),
|
|
44
|
+
'message': value['message'],
|
|
45
|
+
'stats': CodeGraphStatsToJSON(value['stats']),
|
|
46
|
+
'graph': CodeGraphEnvelopeGraphToJSON(value['graph']),
|
|
47
|
+
};
|
|
48
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
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 type { CodeGraphNode } from './CodeGraphNode';
|
|
13
|
+
import type { CodeGraphRelationship } from './CodeGraphRelationship';
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @export
|
|
17
|
+
* @interface CodeGraphEnvelopeGraph
|
|
18
|
+
*/
|
|
19
|
+
export interface CodeGraphEnvelopeGraph {
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
* @type {Array<CodeGraphNode>}
|
|
23
|
+
* @memberof CodeGraphEnvelopeGraph
|
|
24
|
+
*/
|
|
25
|
+
nodes: Array<CodeGraphNode>;
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @type {Array<CodeGraphRelationship>}
|
|
29
|
+
* @memberof CodeGraphEnvelopeGraph
|
|
30
|
+
*/
|
|
31
|
+
relationships: Array<CodeGraphRelationship>;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Check if a given object implements the CodeGraphEnvelopeGraph interface.
|
|
35
|
+
*/
|
|
36
|
+
export declare function instanceOfCodeGraphEnvelopeGraph(value: object): value is CodeGraphEnvelopeGraph;
|
|
37
|
+
export declare function CodeGraphEnvelopeGraphFromJSON(json: any): CodeGraphEnvelopeGraph;
|
|
38
|
+
export declare function CodeGraphEnvelopeGraphFromJSONTyped(json: any, ignoreDiscriminator: boolean): CodeGraphEnvelopeGraph;
|
|
39
|
+
export declare function CodeGraphEnvelopeGraphToJSON(value?: CodeGraphEnvelopeGraph | null): any;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Supermodel
|
|
5
|
+
* Code Graphing & Analysis API
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.3.7
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
import { CodeGraphNodeFromJSON, CodeGraphNodeToJSON, } from './CodeGraphNode';
|
|
15
|
+
import { CodeGraphRelationshipFromJSON, CodeGraphRelationshipToJSON, } from './CodeGraphRelationship';
|
|
16
|
+
/**
|
|
17
|
+
* Check if a given object implements the CodeGraphEnvelopeGraph interface.
|
|
18
|
+
*/
|
|
19
|
+
export function instanceOfCodeGraphEnvelopeGraph(value) {
|
|
20
|
+
if (!('nodes' in value) || value['nodes'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
if (!('relationships' in value) || value['relationships'] === undefined)
|
|
23
|
+
return false;
|
|
24
|
+
return true;
|
|
25
|
+
}
|
|
26
|
+
export function CodeGraphEnvelopeGraphFromJSON(json) {
|
|
27
|
+
return CodeGraphEnvelopeGraphFromJSONTyped(json, false);
|
|
28
|
+
}
|
|
29
|
+
export function CodeGraphEnvelopeGraphFromJSONTyped(json, ignoreDiscriminator) {
|
|
30
|
+
if (json == null) {
|
|
31
|
+
return json;
|
|
32
|
+
}
|
|
33
|
+
return {
|
|
34
|
+
'nodes': (json['nodes'].map(CodeGraphNodeFromJSON)),
|
|
35
|
+
'relationships': (json['relationships'].map(CodeGraphRelationshipFromJSON)),
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export function CodeGraphEnvelopeGraphToJSON(value) {
|
|
39
|
+
if (value == null) {
|
|
40
|
+
return value;
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
'nodes': (value['nodes'].map(CodeGraphNodeToJSON)),
|
|
44
|
+
'relationships': (value['relationships'].map(CodeGraphRelationshipToJSON)),
|
|
45
|
+
};
|
|
46
|
+
}
|