@supermodeltools/sdk 0.3.8 → 0.4.1
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/README.md +41 -31
- package/dist/apis/DefaultApi.d.ts +1 -1
- package/dist/apis/DefaultApi.js +1 -1
- package/dist/esm/apis/DefaultApi.d.ts +1 -1
- package/dist/esm/apis/DefaultApi.js +1 -1
- package/dist/esm/models/ClassificationStats.d.ts +1 -1
- package/dist/esm/models/ClassificationStats.js +1 -1
- package/dist/esm/models/CodeGraphEnvelope.d.ts +1 -1
- package/dist/esm/models/CodeGraphEnvelope.js +1 -1
- package/dist/esm/models/CodeGraphEnvelopeGraph.d.ts +1 -1
- package/dist/esm/models/CodeGraphEnvelopeGraph.js +1 -1
- package/dist/esm/models/CodeGraphNode.d.ts +1 -1
- package/dist/esm/models/CodeGraphNode.js +1 -1
- package/dist/esm/models/CodeGraphRelationship.d.ts +1 -1
- package/dist/esm/models/CodeGraphRelationship.js +1 -1
- package/dist/esm/models/CodeGraphStats.d.ts +1 -1
- package/dist/esm/models/CodeGraphStats.js +1 -1
- package/dist/esm/models/DomainClassAssignment.d.ts +1 -1
- package/dist/esm/models/DomainClassAssignment.js +1 -1
- package/dist/esm/models/DomainClassificationResponse.d.ts +1 -1
- package/dist/esm/models/DomainClassificationResponse.js +1 -1
- package/dist/esm/models/DomainFileAssignment.d.ts +1 -1
- package/dist/esm/models/DomainFileAssignment.js +1 -1
- package/dist/esm/models/DomainFunctionAssignment.d.ts +1 -1
- package/dist/esm/models/DomainFunctionAssignment.js +1 -1
- package/dist/esm/models/DomainRelationship.d.ts +1 -1
- package/dist/esm/models/DomainRelationship.js +1 -1
- package/dist/esm/models/DomainSummary.d.ts +1 -1
- package/dist/esm/models/DomainSummary.js +1 -1
- package/dist/esm/models/ErrorDetailsInner.d.ts +1 -1
- package/dist/esm/models/ErrorDetailsInner.js +1 -1
- package/dist/esm/models/FunctionDescription.d.ts +1 -1
- package/dist/esm/models/FunctionDescription.js +1 -1
- package/dist/esm/models/ModelError.d.ts +1 -1
- package/dist/esm/models/ModelError.js +1 -1
- package/dist/esm/models/SubdomainSummary.d.ts +1 -1
- package/dist/esm/models/SubdomainSummary.js +1 -1
- package/dist/esm/models/SupermodelArtifact.d.ts +1 -1
- package/dist/esm/models/SupermodelArtifact.js +1 -1
- package/dist/esm/models/SupermodelIR.d.ts +1 -1
- package/dist/esm/models/SupermodelIR.js +1 -1
- package/dist/esm/models/SupermodelIRGraph.d.ts +1 -1
- package/dist/esm/models/SupermodelIRGraph.js +1 -1
- package/dist/esm/models/UnassignedFunction.d.ts +1 -1
- package/dist/esm/models/UnassignedFunction.js +1 -1
- package/dist/esm/runtime.d.ts +1 -1
- package/dist/esm/runtime.js +1 -1
- package/dist/models/ClassificationStats.d.ts +1 -1
- package/dist/models/ClassificationStats.js +1 -1
- package/dist/models/CodeGraphEnvelope.d.ts +1 -1
- package/dist/models/CodeGraphEnvelope.js +1 -1
- package/dist/models/CodeGraphEnvelopeGraph.d.ts +1 -1
- package/dist/models/CodeGraphEnvelopeGraph.js +1 -1
- package/dist/models/CodeGraphNode.d.ts +1 -1
- package/dist/models/CodeGraphNode.js +1 -1
- package/dist/models/CodeGraphRelationship.d.ts +1 -1
- package/dist/models/CodeGraphRelationship.js +1 -1
- package/dist/models/CodeGraphStats.d.ts +1 -1
- package/dist/models/CodeGraphStats.js +1 -1
- package/dist/models/DomainClassAssignment.d.ts +1 -1
- package/dist/models/DomainClassAssignment.js +1 -1
- package/dist/models/DomainClassificationResponse.d.ts +1 -1
- package/dist/models/DomainClassificationResponse.js +1 -1
- package/dist/models/DomainFileAssignment.d.ts +1 -1
- package/dist/models/DomainFileAssignment.js +1 -1
- package/dist/models/DomainFunctionAssignment.d.ts +1 -1
- package/dist/models/DomainFunctionAssignment.js +1 -1
- package/dist/models/DomainRelationship.d.ts +1 -1
- package/dist/models/DomainRelationship.js +1 -1
- package/dist/models/DomainSummary.d.ts +1 -1
- package/dist/models/DomainSummary.js +1 -1
- package/dist/models/ErrorDetailsInner.d.ts +1 -1
- package/dist/models/ErrorDetailsInner.js +1 -1
- package/dist/models/FunctionDescription.d.ts +1 -1
- package/dist/models/FunctionDescription.js +1 -1
- package/dist/models/ModelError.d.ts +1 -1
- package/dist/models/ModelError.js +1 -1
- package/dist/models/SubdomainSummary.d.ts +1 -1
- package/dist/models/SubdomainSummary.js +1 -1
- package/dist/models/SupermodelArtifact.d.ts +1 -1
- package/dist/models/SupermodelArtifact.js +1 -1
- package/dist/models/SupermodelIR.d.ts +1 -1
- package/dist/models/SupermodelIR.js +1 -1
- package/dist/models/SupermodelIRGraph.d.ts +1 -1
- package/dist/models/SupermodelIRGraph.js +1 -1
- package/dist/models/UnassignedFunction.d.ts +1 -1
- package/dist/models/UnassignedFunction.js +1 -1
- package/dist/runtime.d.ts +1 -1
- package/dist/runtime.js +1 -1
- package/package.json +22 -5
- package/.openapi-generator/FILES +0 -32
- package/.openapi-generator/VERSION +0 -1
- package/.openapi-generator/openapi.yaml-generate-typescript-client.sha256 +0 -1
- package/.openapi-generator-ignore +0 -23
- package/src/apis/DefaultApi.ts +0 -416
- package/src/apis/index.ts +0 -3
- package/src/index.ts +0 -5
- package/src/models/ClassificationStats.ts +0 -106
- package/src/models/CodeGraphEnvelope.ts +0 -98
- package/src/models/CodeGraphEnvelopeGraph.ts +0 -83
- package/src/models/CodeGraphNode.ts +0 -77
- package/src/models/CodeGraphRelationship.ts +0 -96
- package/src/models/CodeGraphStats.ts +0 -92
- package/src/models/DomainClassAssignment.ts +0 -70
- package/src/models/DomainClassificationResponse.ts +0 -181
- package/src/models/DomainFileAssignment.ts +0 -70
- package/src/models/DomainFunctionAssignment.ts +0 -78
- package/src/models/DomainRelationship.ts +0 -96
- package/src/models/DomainSummary.ts +0 -104
- package/src/models/ErrorDetailsInner.ts +0 -78
- package/src/models/FunctionDescription.ts +0 -78
- package/src/models/ModelError.ts +0 -111
- package/src/models/SubdomainSummary.ts +0 -70
- package/src/models/SupermodelArtifact.ts +0 -87
- package/src/models/SupermodelIR.ts +0 -126
- package/src/models/SupermodelIRGraph.ts +0 -83
- package/src/models/UnassignedFunction.ts +0 -70
- package/src/models/index.ts +0 -22
- package/src/runtime.ts +0 -426
- package/tsconfig.esm.json +0 -7
- package/tsconfig.json +0 -16
package/src/apis/DefaultApi.ts
DELETED
|
@@ -1,416 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* Supermodel
|
|
5
|
-
* Code Graphing & Analysis API
|
|
6
|
-
*
|
|
7
|
-
* The version of the OpenAPI document: 0.3.8
|
|
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
|
-
|
|
16
|
-
import * as runtime from '../runtime';
|
|
17
|
-
import type {
|
|
18
|
-
CodeGraphEnvelope,
|
|
19
|
-
DomainClassificationResponse,
|
|
20
|
-
SupermodelIR,
|
|
21
|
-
} from '../models/index';
|
|
22
|
-
import {
|
|
23
|
-
CodeGraphEnvelopeFromJSON,
|
|
24
|
-
CodeGraphEnvelopeToJSON,
|
|
25
|
-
DomainClassificationResponseFromJSON,
|
|
26
|
-
DomainClassificationResponseToJSON,
|
|
27
|
-
SupermodelIRFromJSON,
|
|
28
|
-
SupermodelIRToJSON,
|
|
29
|
-
} from '../models/index';
|
|
30
|
-
|
|
31
|
-
export interface GenerateCallGraphRequest {
|
|
32
|
-
idempotencyKey: string;
|
|
33
|
-
file: Blob;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export interface GenerateDependencyGraphRequest {
|
|
37
|
-
idempotencyKey: string;
|
|
38
|
-
file: Blob;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export interface GenerateDomainGraphRequest {
|
|
42
|
-
idempotencyKey: string;
|
|
43
|
-
file: Blob;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export interface GenerateParseGraphRequest {
|
|
47
|
-
idempotencyKey: string;
|
|
48
|
-
file: Blob;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export interface GenerateSupermodelGraphRequest {
|
|
52
|
-
idempotencyKey: string;
|
|
53
|
-
file: Blob;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
*
|
|
58
|
-
*/
|
|
59
|
-
export class DefaultApi extends runtime.BaseAPI {
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Upload a zipped repository snapshot to generate the function-level call graph.
|
|
63
|
-
* Call graph
|
|
64
|
-
*/
|
|
65
|
-
async generateCallGraphRaw(requestParameters: GenerateCallGraphRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CodeGraphEnvelope>> {
|
|
66
|
-
if (requestParameters['idempotencyKey'] == null) {
|
|
67
|
-
throw new runtime.RequiredError(
|
|
68
|
-
'idempotencyKey',
|
|
69
|
-
'Required parameter "idempotencyKey" was null or undefined when calling generateCallGraph().'
|
|
70
|
-
);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
if (requestParameters['file'] == null) {
|
|
74
|
-
throw new runtime.RequiredError(
|
|
75
|
-
'file',
|
|
76
|
-
'Required parameter "file" was null or undefined when calling generateCallGraph().'
|
|
77
|
-
);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
const queryParameters: any = {};
|
|
81
|
-
|
|
82
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
83
|
-
|
|
84
|
-
if (requestParameters['idempotencyKey'] != null) {
|
|
85
|
-
headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
89
|
-
headerParameters["X-Api-Key"] = await this.configuration.apiKey("X-Api-Key"); // ApiKeyAuth authentication
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
const consumes: runtime.Consume[] = [
|
|
93
|
-
{ contentType: 'multipart/form-data' },
|
|
94
|
-
];
|
|
95
|
-
// @ts-ignore: canConsumeForm may be unused
|
|
96
|
-
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
97
|
-
|
|
98
|
-
let formParams: { append(param: string, value: any): any };
|
|
99
|
-
let useForm = false;
|
|
100
|
-
// use FormData to transmit files using content-type "multipart/form-data"
|
|
101
|
-
useForm = canConsumeForm;
|
|
102
|
-
if (useForm) {
|
|
103
|
-
formParams = new FormData();
|
|
104
|
-
} else {
|
|
105
|
-
formParams = new URLSearchParams();
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
if (requestParameters['file'] != null) {
|
|
109
|
-
formParams.append('file', requestParameters['file'] as any);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
const response = await this.request({
|
|
113
|
-
path: `/v1/graphs/call`,
|
|
114
|
-
method: 'POST',
|
|
115
|
-
headers: headerParameters,
|
|
116
|
-
query: queryParameters,
|
|
117
|
-
body: formParams,
|
|
118
|
-
}, initOverrides);
|
|
119
|
-
|
|
120
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => CodeGraphEnvelopeFromJSON(jsonValue));
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* Upload a zipped repository snapshot to generate the function-level call graph.
|
|
125
|
-
* Call graph
|
|
126
|
-
*/
|
|
127
|
-
async generateCallGraph(requestParameters: GenerateCallGraphRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CodeGraphEnvelope> {
|
|
128
|
-
const response = await this.generateCallGraphRaw(requestParameters, initOverrides);
|
|
129
|
-
return await response.value();
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* Upload a zipped repository snapshot to generate the dependency graph.
|
|
134
|
-
* Dependency graph
|
|
135
|
-
*/
|
|
136
|
-
async generateDependencyGraphRaw(requestParameters: GenerateDependencyGraphRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CodeGraphEnvelope>> {
|
|
137
|
-
if (requestParameters['idempotencyKey'] == null) {
|
|
138
|
-
throw new runtime.RequiredError(
|
|
139
|
-
'idempotencyKey',
|
|
140
|
-
'Required parameter "idempotencyKey" was null or undefined when calling generateDependencyGraph().'
|
|
141
|
-
);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
if (requestParameters['file'] == null) {
|
|
145
|
-
throw new runtime.RequiredError(
|
|
146
|
-
'file',
|
|
147
|
-
'Required parameter "file" was null or undefined when calling generateDependencyGraph().'
|
|
148
|
-
);
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
const queryParameters: any = {};
|
|
152
|
-
|
|
153
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
154
|
-
|
|
155
|
-
if (requestParameters['idempotencyKey'] != null) {
|
|
156
|
-
headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
160
|
-
headerParameters["X-Api-Key"] = await this.configuration.apiKey("X-Api-Key"); // ApiKeyAuth authentication
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
const consumes: runtime.Consume[] = [
|
|
164
|
-
{ contentType: 'multipart/form-data' },
|
|
165
|
-
];
|
|
166
|
-
// @ts-ignore: canConsumeForm may be unused
|
|
167
|
-
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
168
|
-
|
|
169
|
-
let formParams: { append(param: string, value: any): any };
|
|
170
|
-
let useForm = false;
|
|
171
|
-
// use FormData to transmit files using content-type "multipart/form-data"
|
|
172
|
-
useForm = canConsumeForm;
|
|
173
|
-
if (useForm) {
|
|
174
|
-
formParams = new FormData();
|
|
175
|
-
} else {
|
|
176
|
-
formParams = new URLSearchParams();
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
if (requestParameters['file'] != null) {
|
|
180
|
-
formParams.append('file', requestParameters['file'] as any);
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
const response = await this.request({
|
|
184
|
-
path: `/v1/graphs/dependency`,
|
|
185
|
-
method: 'POST',
|
|
186
|
-
headers: headerParameters,
|
|
187
|
-
query: queryParameters,
|
|
188
|
-
body: formParams,
|
|
189
|
-
}, initOverrides);
|
|
190
|
-
|
|
191
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => CodeGraphEnvelopeFromJSON(jsonValue));
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
/**
|
|
195
|
-
* Upload a zipped repository snapshot to generate the dependency graph.
|
|
196
|
-
* Dependency graph
|
|
197
|
-
*/
|
|
198
|
-
async generateDependencyGraph(requestParameters: GenerateDependencyGraphRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CodeGraphEnvelope> {
|
|
199
|
-
const response = await this.generateDependencyGraphRaw(requestParameters, initOverrides);
|
|
200
|
-
return await response.value();
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
/**
|
|
204
|
-
* Upload a zipped repository snapshot to generate the domain model graph.
|
|
205
|
-
* Domain graph
|
|
206
|
-
*/
|
|
207
|
-
async generateDomainGraphRaw(requestParameters: GenerateDomainGraphRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DomainClassificationResponse>> {
|
|
208
|
-
if (requestParameters['idempotencyKey'] == null) {
|
|
209
|
-
throw new runtime.RequiredError(
|
|
210
|
-
'idempotencyKey',
|
|
211
|
-
'Required parameter "idempotencyKey" was null or undefined when calling generateDomainGraph().'
|
|
212
|
-
);
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
if (requestParameters['file'] == null) {
|
|
216
|
-
throw new runtime.RequiredError(
|
|
217
|
-
'file',
|
|
218
|
-
'Required parameter "file" was null or undefined when calling generateDomainGraph().'
|
|
219
|
-
);
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
const queryParameters: any = {};
|
|
223
|
-
|
|
224
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
225
|
-
|
|
226
|
-
if (requestParameters['idempotencyKey'] != null) {
|
|
227
|
-
headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
231
|
-
headerParameters["X-Api-Key"] = await this.configuration.apiKey("X-Api-Key"); // ApiKeyAuth authentication
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
const consumes: runtime.Consume[] = [
|
|
235
|
-
{ contentType: 'multipart/form-data' },
|
|
236
|
-
];
|
|
237
|
-
// @ts-ignore: canConsumeForm may be unused
|
|
238
|
-
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
239
|
-
|
|
240
|
-
let formParams: { append(param: string, value: any): any };
|
|
241
|
-
let useForm = false;
|
|
242
|
-
// use FormData to transmit files using content-type "multipart/form-data"
|
|
243
|
-
useForm = canConsumeForm;
|
|
244
|
-
if (useForm) {
|
|
245
|
-
formParams = new FormData();
|
|
246
|
-
} else {
|
|
247
|
-
formParams = new URLSearchParams();
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
if (requestParameters['file'] != null) {
|
|
251
|
-
formParams.append('file', requestParameters['file'] as any);
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
const response = await this.request({
|
|
255
|
-
path: `/v1/graphs/domain`,
|
|
256
|
-
method: 'POST',
|
|
257
|
-
headers: headerParameters,
|
|
258
|
-
query: queryParameters,
|
|
259
|
-
body: formParams,
|
|
260
|
-
}, initOverrides);
|
|
261
|
-
|
|
262
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => DomainClassificationResponseFromJSON(jsonValue));
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
/**
|
|
266
|
-
* Upload a zipped repository snapshot to generate the domain model graph.
|
|
267
|
-
* Domain graph
|
|
268
|
-
*/
|
|
269
|
-
async generateDomainGraph(requestParameters: GenerateDomainGraphRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DomainClassificationResponse> {
|
|
270
|
-
const response = await this.generateDomainGraphRaw(requestParameters, initOverrides);
|
|
271
|
-
return await response.value();
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
/**
|
|
275
|
-
* Upload a zipped repository snapshot to generate parse tree relationships.
|
|
276
|
-
* Parse graph
|
|
277
|
-
*/
|
|
278
|
-
async generateParseGraphRaw(requestParameters: GenerateParseGraphRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CodeGraphEnvelope>> {
|
|
279
|
-
if (requestParameters['idempotencyKey'] == null) {
|
|
280
|
-
throw new runtime.RequiredError(
|
|
281
|
-
'idempotencyKey',
|
|
282
|
-
'Required parameter "idempotencyKey" was null or undefined when calling generateParseGraph().'
|
|
283
|
-
);
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
if (requestParameters['file'] == null) {
|
|
287
|
-
throw new runtime.RequiredError(
|
|
288
|
-
'file',
|
|
289
|
-
'Required parameter "file" was null or undefined when calling generateParseGraph().'
|
|
290
|
-
);
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
const queryParameters: any = {};
|
|
294
|
-
|
|
295
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
296
|
-
|
|
297
|
-
if (requestParameters['idempotencyKey'] != null) {
|
|
298
|
-
headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
302
|
-
headerParameters["X-Api-Key"] = await this.configuration.apiKey("X-Api-Key"); // ApiKeyAuth authentication
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
const consumes: runtime.Consume[] = [
|
|
306
|
-
{ contentType: 'multipart/form-data' },
|
|
307
|
-
];
|
|
308
|
-
// @ts-ignore: canConsumeForm may be unused
|
|
309
|
-
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
310
|
-
|
|
311
|
-
let formParams: { append(param: string, value: any): any };
|
|
312
|
-
let useForm = false;
|
|
313
|
-
// use FormData to transmit files using content-type "multipart/form-data"
|
|
314
|
-
useForm = canConsumeForm;
|
|
315
|
-
if (useForm) {
|
|
316
|
-
formParams = new FormData();
|
|
317
|
-
} else {
|
|
318
|
-
formParams = new URLSearchParams();
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
if (requestParameters['file'] != null) {
|
|
322
|
-
formParams.append('file', requestParameters['file'] as any);
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
const response = await this.request({
|
|
326
|
-
path: `/v1/graphs/parse`,
|
|
327
|
-
method: 'POST',
|
|
328
|
-
headers: headerParameters,
|
|
329
|
-
query: queryParameters,
|
|
330
|
-
body: formParams,
|
|
331
|
-
}, initOverrides);
|
|
332
|
-
|
|
333
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => CodeGraphEnvelopeFromJSON(jsonValue));
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
/**
|
|
337
|
-
* Upload a zipped repository snapshot to generate parse tree relationships.
|
|
338
|
-
* Parse graph
|
|
339
|
-
*/
|
|
340
|
-
async generateParseGraph(requestParameters: GenerateParseGraphRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CodeGraphEnvelope> {
|
|
341
|
-
const response = await this.generateParseGraphRaw(requestParameters, initOverrides);
|
|
342
|
-
return await response.value();
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
/**
|
|
346
|
-
* Upload a zipped repository snapshot to generate the Supermodel Intermediate Representation (SIR) artifact bundle.
|
|
347
|
-
* Supermodel graph
|
|
348
|
-
*/
|
|
349
|
-
async generateSupermodelGraphRaw(requestParameters: GenerateSupermodelGraphRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SupermodelIR>> {
|
|
350
|
-
if (requestParameters['idempotencyKey'] == null) {
|
|
351
|
-
throw new runtime.RequiredError(
|
|
352
|
-
'idempotencyKey',
|
|
353
|
-
'Required parameter "idempotencyKey" was null or undefined when calling generateSupermodelGraph().'
|
|
354
|
-
);
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
if (requestParameters['file'] == null) {
|
|
358
|
-
throw new runtime.RequiredError(
|
|
359
|
-
'file',
|
|
360
|
-
'Required parameter "file" was null or undefined when calling generateSupermodelGraph().'
|
|
361
|
-
);
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
const queryParameters: any = {};
|
|
365
|
-
|
|
366
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
367
|
-
|
|
368
|
-
if (requestParameters['idempotencyKey'] != null) {
|
|
369
|
-
headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
373
|
-
headerParameters["X-Api-Key"] = await this.configuration.apiKey("X-Api-Key"); // ApiKeyAuth authentication
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
const consumes: runtime.Consume[] = [
|
|
377
|
-
{ contentType: 'multipart/form-data' },
|
|
378
|
-
];
|
|
379
|
-
// @ts-ignore: canConsumeForm may be unused
|
|
380
|
-
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
381
|
-
|
|
382
|
-
let formParams: { append(param: string, value: any): any };
|
|
383
|
-
let useForm = false;
|
|
384
|
-
// use FormData to transmit files using content-type "multipart/form-data"
|
|
385
|
-
useForm = canConsumeForm;
|
|
386
|
-
if (useForm) {
|
|
387
|
-
formParams = new FormData();
|
|
388
|
-
} else {
|
|
389
|
-
formParams = new URLSearchParams();
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
if (requestParameters['file'] != null) {
|
|
393
|
-
formParams.append('file', requestParameters['file'] as any);
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
const response = await this.request({
|
|
397
|
-
path: `/v1/graphs/supermodel`,
|
|
398
|
-
method: 'POST',
|
|
399
|
-
headers: headerParameters,
|
|
400
|
-
query: queryParameters,
|
|
401
|
-
body: formParams,
|
|
402
|
-
}, initOverrides);
|
|
403
|
-
|
|
404
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => SupermodelIRFromJSON(jsonValue));
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
/**
|
|
408
|
-
* Upload a zipped repository snapshot to generate the Supermodel Intermediate Representation (SIR) artifact bundle.
|
|
409
|
-
* Supermodel graph
|
|
410
|
-
*/
|
|
411
|
-
async generateSupermodelGraph(requestParameters: GenerateSupermodelGraphRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SupermodelIR> {
|
|
412
|
-
const response = await this.generateSupermodelGraphRaw(requestParameters, initOverrides);
|
|
413
|
-
return await response.value();
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
}
|
package/src/apis/index.ts
DELETED
package/src/index.ts
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* Supermodel
|
|
5
|
-
* Code Graphing & Analysis API
|
|
6
|
-
*
|
|
7
|
-
* The version of the OpenAPI document: 0.3.8
|
|
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
|
-
import { mapValues } from '../runtime';
|
|
16
|
-
/**
|
|
17
|
-
*
|
|
18
|
-
* @export
|
|
19
|
-
* @interface ClassificationStats
|
|
20
|
-
*/
|
|
21
|
-
export interface ClassificationStats {
|
|
22
|
-
/**
|
|
23
|
-
* Number of domains discovered
|
|
24
|
-
* @type {number}
|
|
25
|
-
* @memberof ClassificationStats
|
|
26
|
-
*/
|
|
27
|
-
domainCount: number;
|
|
28
|
-
/**
|
|
29
|
-
* Number of relationships
|
|
30
|
-
* @type {number}
|
|
31
|
-
* @memberof ClassificationStats
|
|
32
|
-
*/
|
|
33
|
-
relationshipCount: number;
|
|
34
|
-
/**
|
|
35
|
-
* Count of file assignments
|
|
36
|
-
* @type {number}
|
|
37
|
-
* @memberof ClassificationStats
|
|
38
|
-
*/
|
|
39
|
-
fileAssignments: number;
|
|
40
|
-
/**
|
|
41
|
-
* Count of function assignments
|
|
42
|
-
* @type {number}
|
|
43
|
-
* @memberof ClassificationStats
|
|
44
|
-
*/
|
|
45
|
-
functionAssignments: number;
|
|
46
|
-
/**
|
|
47
|
-
* Count of unassigned functions
|
|
48
|
-
* @type {number}
|
|
49
|
-
* @memberof ClassificationStats
|
|
50
|
-
*/
|
|
51
|
-
unassignedFunctions: number;
|
|
52
|
-
/**
|
|
53
|
-
* Count of class assignments
|
|
54
|
-
* @type {number}
|
|
55
|
-
* @memberof ClassificationStats
|
|
56
|
-
*/
|
|
57
|
-
classAssignments: number;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Check if a given object implements the ClassificationStats interface.
|
|
62
|
-
*/
|
|
63
|
-
export function instanceOfClassificationStats(value: object): value is ClassificationStats {
|
|
64
|
-
if (!('domainCount' in value) || value['domainCount'] === undefined) return false;
|
|
65
|
-
if (!('relationshipCount' in value) || value['relationshipCount'] === undefined) return false;
|
|
66
|
-
if (!('fileAssignments' in value) || value['fileAssignments'] === undefined) return false;
|
|
67
|
-
if (!('functionAssignments' in value) || value['functionAssignments'] === undefined) return false;
|
|
68
|
-
if (!('unassignedFunctions' in value) || value['unassignedFunctions'] === undefined) return false;
|
|
69
|
-
if (!('classAssignments' in value) || value['classAssignments'] === undefined) return false;
|
|
70
|
-
return true;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export function ClassificationStatsFromJSON(json: any): ClassificationStats {
|
|
74
|
-
return ClassificationStatsFromJSONTyped(json, false);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export function ClassificationStatsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClassificationStats {
|
|
78
|
-
if (json == null) {
|
|
79
|
-
return json;
|
|
80
|
-
}
|
|
81
|
-
return {
|
|
82
|
-
|
|
83
|
-
'domainCount': json['domainCount'],
|
|
84
|
-
'relationshipCount': json['relationshipCount'],
|
|
85
|
-
'fileAssignments': json['fileAssignments'],
|
|
86
|
-
'functionAssignments': json['functionAssignments'],
|
|
87
|
-
'unassignedFunctions': json['unassignedFunctions'],
|
|
88
|
-
'classAssignments': json['classAssignments'],
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
export function ClassificationStatsToJSON(value?: ClassificationStats | null): any {
|
|
93
|
-
if (value == null) {
|
|
94
|
-
return value;
|
|
95
|
-
}
|
|
96
|
-
return {
|
|
97
|
-
|
|
98
|
-
'domainCount': value['domainCount'],
|
|
99
|
-
'relationshipCount': value['relationshipCount'],
|
|
100
|
-
'fileAssignments': value['fileAssignments'],
|
|
101
|
-
'functionAssignments': value['functionAssignments'],
|
|
102
|
-
'unassignedFunctions': value['unassignedFunctions'],
|
|
103
|
-
'classAssignments': value['classAssignments'],
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* Supermodel
|
|
5
|
-
* Code Graphing & Analysis API
|
|
6
|
-
*
|
|
7
|
-
* The version of the OpenAPI document: 0.3.8
|
|
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
|
-
import { mapValues } from '../runtime';
|
|
16
|
-
import type { CodeGraphStats } from './CodeGraphStats';
|
|
17
|
-
import {
|
|
18
|
-
CodeGraphStatsFromJSON,
|
|
19
|
-
CodeGraphStatsFromJSONTyped,
|
|
20
|
-
CodeGraphStatsToJSON,
|
|
21
|
-
} from './CodeGraphStats';
|
|
22
|
-
import type { CodeGraphEnvelopeGraph } from './CodeGraphEnvelopeGraph';
|
|
23
|
-
import {
|
|
24
|
-
CodeGraphEnvelopeGraphFromJSON,
|
|
25
|
-
CodeGraphEnvelopeGraphFromJSONTyped,
|
|
26
|
-
CodeGraphEnvelopeGraphToJSON,
|
|
27
|
-
} from './CodeGraphEnvelopeGraph';
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
*
|
|
31
|
-
* @export
|
|
32
|
-
* @interface CodeGraphEnvelope
|
|
33
|
-
*/
|
|
34
|
-
export interface CodeGraphEnvelope {
|
|
35
|
-
/**
|
|
36
|
-
*
|
|
37
|
-
* @type {Date}
|
|
38
|
-
* @memberof CodeGraphEnvelope
|
|
39
|
-
*/
|
|
40
|
-
generatedAt?: Date;
|
|
41
|
-
/**
|
|
42
|
-
*
|
|
43
|
-
* @type {string}
|
|
44
|
-
* @memberof CodeGraphEnvelope
|
|
45
|
-
*/
|
|
46
|
-
message?: string;
|
|
47
|
-
/**
|
|
48
|
-
*
|
|
49
|
-
* @type {CodeGraphStats}
|
|
50
|
-
* @memberof CodeGraphEnvelope
|
|
51
|
-
*/
|
|
52
|
-
stats?: CodeGraphStats;
|
|
53
|
-
/**
|
|
54
|
-
*
|
|
55
|
-
* @type {CodeGraphEnvelopeGraph}
|
|
56
|
-
* @memberof CodeGraphEnvelope
|
|
57
|
-
*/
|
|
58
|
-
graph: CodeGraphEnvelopeGraph;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Check if a given object implements the CodeGraphEnvelope interface.
|
|
63
|
-
*/
|
|
64
|
-
export function instanceOfCodeGraphEnvelope(value: object): value is CodeGraphEnvelope {
|
|
65
|
-
if (!('graph' in value) || value['graph'] === undefined) return false;
|
|
66
|
-
return true;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
export function CodeGraphEnvelopeFromJSON(json: any): CodeGraphEnvelope {
|
|
70
|
-
return CodeGraphEnvelopeFromJSONTyped(json, false);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export function CodeGraphEnvelopeFromJSONTyped(json: any, ignoreDiscriminator: boolean): CodeGraphEnvelope {
|
|
74
|
-
if (json == null) {
|
|
75
|
-
return json;
|
|
76
|
-
}
|
|
77
|
-
return {
|
|
78
|
-
|
|
79
|
-
'generatedAt': json['generatedAt'] == null ? undefined : (new Date(json['generatedAt'])),
|
|
80
|
-
'message': json['message'] == null ? undefined : json['message'],
|
|
81
|
-
'stats': json['stats'] == null ? undefined : CodeGraphStatsFromJSON(json['stats']),
|
|
82
|
-
'graph': CodeGraphEnvelopeGraphFromJSON(json['graph']),
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
export function CodeGraphEnvelopeToJSON(value?: CodeGraphEnvelope | null): any {
|
|
87
|
-
if (value == null) {
|
|
88
|
-
return value;
|
|
89
|
-
}
|
|
90
|
-
return {
|
|
91
|
-
|
|
92
|
-
'generatedAt': value['generatedAt'] == null ? undefined : ((value['generatedAt']).toISOString()),
|
|
93
|
-
'message': value['message'],
|
|
94
|
-
'stats': CodeGraphStatsToJSON(value['stats']),
|
|
95
|
-
'graph': CodeGraphEnvelopeGraphToJSON(value['graph']),
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
|