@mlhub/models-ts-sdk 0.1.1 → 0.3.0
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 +4 -1
- package/README.md +2 -2
- package/dist/apis/ArtifactsApi.d.ts +2 -2
- package/dist/apis/ArtifactsApi.js +3 -3
- package/dist/apis/ModelsApi.d.ts +17 -11
- package/dist/apis/ModelsApi.js +27 -20
- package/dist/models/AssociateModelMetadataBody.d.ts +33 -0
- package/dist/models/{AssociateModelMetadata.js → AssociateModelMetadataBody.js} +7 -7
- package/dist/models/Canonical.d.ts +76 -0
- package/dist/models/Canonical.js +58 -0
- package/dist/models/CreateModelMetadataBody.d.ts +245 -0
- package/dist/models/CreateModelMetadataBody.js +114 -0
- package/dist/models/DiscoveryCriteria.d.ts +0 -6
- package/dist/models/DiscoveryCriteria.js +0 -2
- package/dist/models/Locator.d.ts +27 -0
- package/dist/models/Locator.js +40 -0
- package/dist/models/ModelMetadata.d.ts +13 -1
- package/dist/models/ModelMetadata.js +4 -0
- package/dist/models/index.d.ts +4 -1
- package/dist/models/index.js +4 -1
- package/package.json +1 -1
- package/src/apis/ArtifactsApi.ts +7 -7
- package/src/apis/ModelsApi.ts +34 -31
- package/src/models/{AssociateModelMetadata.ts → AssociateModelMetadataBody.ts} +8 -8
- package/src/models/Canonical.ts +131 -0
- package/src/models/CreateModelMetadataBody.ts +360 -0
- package/src/models/DiscoveryCriteria.ts +0 -8
- package/src/models/Locator.ts +56 -0
- package/src/models/ModelMetadata.ts +20 -0
- package/src/models/index.ts +4 -1
- package/dist/models/AssociateModelMetadata.d.ts +0 -33
package/.openapi-generator/FILES
CHANGED
|
@@ -18,9 +18,11 @@ src/models/ArtifactIngestionStatus.ts
|
|
|
18
18
|
src/models/ArtifactPublication.ts
|
|
19
19
|
src/models/ArtifactPublicationStatus.ts
|
|
20
20
|
src/models/ArtifactType.ts
|
|
21
|
-
src/models/
|
|
21
|
+
src/models/AssociateModelMetadataBody.ts
|
|
22
22
|
src/models/AssociateModelMetadataResponse.ts
|
|
23
23
|
src/models/BadRequestResponse.ts
|
|
24
|
+
src/models/Canonical.ts
|
|
25
|
+
src/models/CreateModelMetadataBody.ts
|
|
24
26
|
src/models/CreateModelMetadataResponse.ts
|
|
25
27
|
src/models/DiscoverModelsByPlatformResponse.ts
|
|
26
28
|
src/models/DiscoverModelsResponse.ts
|
|
@@ -42,6 +44,7 @@ src/models/ListModelsByPlatformResponse.ts
|
|
|
42
44
|
src/models/ListModelsResponse.ts
|
|
43
45
|
src/models/ListPlatformsResponse.ts
|
|
44
46
|
src/models/ListTasksResponse.ts
|
|
47
|
+
src/models/Locator.ts
|
|
45
48
|
src/models/ModelArtifact.ts
|
|
46
49
|
src/models/ModelIO.ts
|
|
47
50
|
src/models/ModelMetadata.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @mlhub/models-ts-sdk@0.
|
|
1
|
+
## @mlhub/models-ts-sdk@0.3.0
|
|
2
2
|
|
|
3
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
4
|
|
|
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
|
|
|
36
36
|
_published:_
|
|
37
37
|
|
|
38
38
|
```
|
|
39
|
-
npm install @mlhub/models-ts-sdk@0.
|
|
39
|
+
npm install @mlhub/models-ts-sdk@0.3.0 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import {
|
|
13
|
+
import { AssociateModelMetadataBody, AssociateModelMetadataResponse, GetModelArtifactResponse, ListModelArtifactResponse } from '../models';
|
|
14
14
|
export interface AssociateModelMetadataWithArtifactRequest {
|
|
15
15
|
artifactId: string;
|
|
16
|
-
|
|
16
|
+
associateModelMetadataBody: AssociateModelMetadataBody;
|
|
17
17
|
}
|
|
18
18
|
export interface GetModelArtifactRequest {
|
|
19
19
|
artifactId: string;
|
|
@@ -87,8 +87,8 @@ var ArtifactsApi = /** @class */ (function (_super) {
|
|
|
87
87
|
if (requestParameters.artifactId === null || requestParameters.artifactId === undefined) {
|
|
88
88
|
throw new runtime.RequiredError('artifactId', 'Required parameter requestParameters.artifactId was null or undefined when calling associateModelMetadataWithArtifact.');
|
|
89
89
|
}
|
|
90
|
-
if (requestParameters.
|
|
91
|
-
throw new runtime.RequiredError('
|
|
90
|
+
if (requestParameters.associateModelMetadataBody === null || requestParameters.associateModelMetadataBody === undefined) {
|
|
91
|
+
throw new runtime.RequiredError('associateModelMetadataBody', 'Required parameter requestParameters.associateModelMetadataBody was null or undefined when calling associateModelMetadataWithArtifact.');
|
|
92
92
|
}
|
|
93
93
|
queryParameters = {};
|
|
94
94
|
headerParameters = {};
|
|
@@ -98,7 +98,7 @@ var ArtifactsApi = /** @class */ (function (_super) {
|
|
|
98
98
|
method: 'POST',
|
|
99
99
|
headers: headerParameters,
|
|
100
100
|
query: queryParameters,
|
|
101
|
-
body: (0, models_1.
|
|
101
|
+
body: (0, models_1.AssociateModelMetadataBodyToJSON)(requestParameters.associateModelMetadataBody),
|
|
102
102
|
}, initOverrides)];
|
|
103
103
|
case 1:
|
|
104
104
|
response = _a.sent();
|
package/dist/apis/ModelsApi.d.ts
CHANGED
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import { CreateModelMetadataResponse, DiscoverModelsResponse, DiscoveryCriteria, GetModelResponse, IngestArtifactRequest, IngestModelArtifactResponse, ListModelsResponse
|
|
13
|
+
import { CreateModelMetadataBody, CreateModelMetadataResponse, DiscoverModelsResponse, DiscoveryCriteria, GetModelResponse, IngestArtifactRequest, IngestModelArtifactResponse, ListModelsResponse } from '../models';
|
|
14
14
|
export interface CreateModelMetadataRequest {
|
|
15
|
-
|
|
15
|
+
createModelMetadataBody: CreateModelMetadataBody;
|
|
16
16
|
}
|
|
17
17
|
export interface DiscoverModelsRequest {
|
|
18
18
|
discoveryCriteria: DiscoveryCriteria;
|
|
@@ -20,18 +20,16 @@ export interface DiscoverModelsRequest {
|
|
|
20
20
|
cursor?: string;
|
|
21
21
|
includeCount?: boolean;
|
|
22
22
|
}
|
|
23
|
-
export interface
|
|
24
|
-
author: string;
|
|
23
|
+
export interface GetModelByAuthorAndNameRequest {
|
|
25
24
|
name: string;
|
|
25
|
+
author: string;
|
|
26
|
+
scope?: GetModelByAuthorAndNameScopeEnum;
|
|
26
27
|
}
|
|
27
28
|
export interface IngestCanonicalModelRequest {
|
|
28
29
|
author: string;
|
|
29
30
|
name: string;
|
|
30
31
|
ingestArtifactRequest: IngestArtifactRequest;
|
|
31
32
|
}
|
|
32
|
-
export interface ListModelsRequest {
|
|
33
|
-
modelMetadata: ModelMetadata;
|
|
34
|
-
}
|
|
35
33
|
export interface ListModelsByAuthorRequest {
|
|
36
34
|
author: string;
|
|
37
35
|
}
|
|
@@ -58,11 +56,11 @@ export declare class ModelsApi extends runtime.BaseAPI {
|
|
|
58
56
|
/**
|
|
59
57
|
* Get model by the author and name
|
|
60
58
|
*/
|
|
61
|
-
|
|
59
|
+
getModelByAuthorAndNameRaw(requestParameters: GetModelByAuthorAndNameRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<GetModelResponse>>;
|
|
62
60
|
/**
|
|
63
61
|
* Get model by the author and name
|
|
64
62
|
*/
|
|
65
|
-
|
|
63
|
+
getModelByAuthorAndName(requestParameters: GetModelByAuthorAndNameRequest, initOverrides?: RequestInit): Promise<GetModelResponse>;
|
|
66
64
|
/**
|
|
67
65
|
* Ingest canonical model artifact
|
|
68
66
|
*/
|
|
@@ -74,11 +72,11 @@ export declare class ModelsApi extends runtime.BaseAPI {
|
|
|
74
72
|
/**
|
|
75
73
|
* List all models
|
|
76
74
|
*/
|
|
77
|
-
listModelsRaw(
|
|
75
|
+
listModelsRaw(initOverrides?: RequestInit): Promise<runtime.ApiResponse<ListModelsResponse>>;
|
|
78
76
|
/**
|
|
79
77
|
* List all models
|
|
80
78
|
*/
|
|
81
|
-
listModels(
|
|
79
|
+
listModels(initOverrides?: RequestInit): Promise<ListModelsResponse>;
|
|
82
80
|
/**
|
|
83
81
|
* List models by author
|
|
84
82
|
*/
|
|
@@ -88,3 +86,11 @@ export declare class ModelsApi extends runtime.BaseAPI {
|
|
|
88
86
|
*/
|
|
89
87
|
listModelsByAuthor(requestParameters: ListModelsByAuthorRequest, initOverrides?: RequestInit): Promise<ListModelsResponse>;
|
|
90
88
|
}
|
|
89
|
+
/**
|
|
90
|
+
* @export
|
|
91
|
+
* @enum {string}
|
|
92
|
+
*/
|
|
93
|
+
export declare enum GetModelByAuthorAndNameScopeEnum {
|
|
94
|
+
Tenant = "tenant",
|
|
95
|
+
Global = "global"
|
|
96
|
+
}
|
package/dist/apis/ModelsApi.js
CHANGED
|
@@ -64,7 +64,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
64
64
|
}
|
|
65
65
|
};
|
|
66
66
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
67
|
-
exports.ModelsApi = void 0;
|
|
67
|
+
exports.GetModelByAuthorAndNameScopeEnum = exports.ModelsApi = void 0;
|
|
68
68
|
var runtime = require("../runtime");
|
|
69
69
|
var models_1 = require("../models");
|
|
70
70
|
/**
|
|
@@ -84,8 +84,8 @@ var ModelsApi = /** @class */ (function (_super) {
|
|
|
84
84
|
return __generator(this, function (_a) {
|
|
85
85
|
switch (_a.label) {
|
|
86
86
|
case 0:
|
|
87
|
-
if (requestParameters.
|
|
88
|
-
throw new runtime.RequiredError('
|
|
87
|
+
if (requestParameters.createModelMetadataBody === null || requestParameters.createModelMetadataBody === undefined) {
|
|
88
|
+
throw new runtime.RequiredError('createModelMetadataBody', 'Required parameter requestParameters.createModelMetadataBody was null or undefined when calling createModelMetadata.');
|
|
89
89
|
}
|
|
90
90
|
queryParameters = {};
|
|
91
91
|
headerParameters = {};
|
|
@@ -95,7 +95,7 @@ var ModelsApi = /** @class */ (function (_super) {
|
|
|
95
95
|
method: 'POST',
|
|
96
96
|
headers: headerParameters,
|
|
97
97
|
query: queryParameters,
|
|
98
|
-
body: (0, models_1.
|
|
98
|
+
body: (0, models_1.CreateModelMetadataBodyToJSON)(requestParameters.createModelMetadataBody),
|
|
99
99
|
}, initOverrides)];
|
|
100
100
|
case 1:
|
|
101
101
|
response = _a.sent();
|
|
@@ -179,22 +179,25 @@ var ModelsApi = /** @class */ (function (_super) {
|
|
|
179
179
|
/**
|
|
180
180
|
* Get model by the author and name
|
|
181
181
|
*/
|
|
182
|
-
ModelsApi.prototype.
|
|
182
|
+
ModelsApi.prototype.getModelByAuthorAndNameRaw = function (requestParameters, initOverrides) {
|
|
183
183
|
return __awaiter(this, void 0, void 0, function () {
|
|
184
184
|
var queryParameters, headerParameters, response;
|
|
185
185
|
return __generator(this, function (_a) {
|
|
186
186
|
switch (_a.label) {
|
|
187
187
|
case 0:
|
|
188
|
-
if (requestParameters.author === null || requestParameters.author === undefined) {
|
|
189
|
-
throw new runtime.RequiredError('author', 'Required parameter requestParameters.author was null or undefined when calling getModel.');
|
|
190
|
-
}
|
|
191
188
|
if (requestParameters.name === null || requestParameters.name === undefined) {
|
|
192
|
-
throw new runtime.RequiredError('name', 'Required parameter requestParameters.name was null or undefined when calling
|
|
189
|
+
throw new runtime.RequiredError('name', 'Required parameter requestParameters.name was null or undefined when calling getModelByAuthorAndName.');
|
|
190
|
+
}
|
|
191
|
+
if (requestParameters.author === null || requestParameters.author === undefined) {
|
|
192
|
+
throw new runtime.RequiredError('author', 'Required parameter requestParameters.author was null or undefined when calling getModelByAuthorAndName.');
|
|
193
193
|
}
|
|
194
194
|
queryParameters = {};
|
|
195
|
+
if (requestParameters.scope !== undefined) {
|
|
196
|
+
queryParameters['scope'] = requestParameters.scope;
|
|
197
|
+
}
|
|
195
198
|
headerParameters = {};
|
|
196
199
|
return [4 /*yield*/, this.request({
|
|
197
|
-
path: "/models-api/models/{author}/{name}".replace("{".concat("
|
|
200
|
+
path: "/models-api/models/{author}/{name}".replace("{".concat("name", "}"), encodeURIComponent(String(requestParameters.name))).replace("{".concat("author", "}"), encodeURIComponent(String(requestParameters.author))),
|
|
198
201
|
method: 'GET',
|
|
199
202
|
headers: headerParameters,
|
|
200
203
|
query: queryParameters,
|
|
@@ -209,12 +212,12 @@ var ModelsApi = /** @class */ (function (_super) {
|
|
|
209
212
|
/**
|
|
210
213
|
* Get model by the author and name
|
|
211
214
|
*/
|
|
212
|
-
ModelsApi.prototype.
|
|
215
|
+
ModelsApi.prototype.getModelByAuthorAndName = function (requestParameters, initOverrides) {
|
|
213
216
|
return __awaiter(this, void 0, void 0, function () {
|
|
214
217
|
var response;
|
|
215
218
|
return __generator(this, function (_a) {
|
|
216
219
|
switch (_a.label) {
|
|
217
|
-
case 0: return [4 /*yield*/, this.
|
|
220
|
+
case 0: return [4 /*yield*/, this.getModelByAuthorAndNameRaw(requestParameters, initOverrides)];
|
|
218
221
|
case 1:
|
|
219
222
|
response = _a.sent();
|
|
220
223
|
return [4 /*yield*/, response.value()];
|
|
@@ -278,24 +281,19 @@ var ModelsApi = /** @class */ (function (_super) {
|
|
|
278
281
|
/**
|
|
279
282
|
* List all models
|
|
280
283
|
*/
|
|
281
|
-
ModelsApi.prototype.listModelsRaw = function (
|
|
284
|
+
ModelsApi.prototype.listModelsRaw = function (initOverrides) {
|
|
282
285
|
return __awaiter(this, void 0, void 0, function () {
|
|
283
286
|
var queryParameters, headerParameters, response;
|
|
284
287
|
return __generator(this, function (_a) {
|
|
285
288
|
switch (_a.label) {
|
|
286
289
|
case 0:
|
|
287
|
-
if (requestParameters.modelMetadata === null || requestParameters.modelMetadata === undefined) {
|
|
288
|
-
throw new runtime.RequiredError('modelMetadata', 'Required parameter requestParameters.modelMetadata was null or undefined when calling listModels.');
|
|
289
|
-
}
|
|
290
290
|
queryParameters = {};
|
|
291
291
|
headerParameters = {};
|
|
292
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
293
292
|
return [4 /*yield*/, this.request({
|
|
294
293
|
path: "/models-api/models",
|
|
295
294
|
method: 'GET',
|
|
296
295
|
headers: headerParameters,
|
|
297
296
|
query: queryParameters,
|
|
298
|
-
body: (0, models_1.ModelMetadataToJSON)(requestParameters.modelMetadata),
|
|
299
297
|
}, initOverrides)];
|
|
300
298
|
case 1:
|
|
301
299
|
response = _a.sent();
|
|
@@ -307,12 +305,12 @@ var ModelsApi = /** @class */ (function (_super) {
|
|
|
307
305
|
/**
|
|
308
306
|
* List all models
|
|
309
307
|
*/
|
|
310
|
-
ModelsApi.prototype.listModels = function (
|
|
308
|
+
ModelsApi.prototype.listModels = function (initOverrides) {
|
|
311
309
|
return __awaiter(this, void 0, void 0, function () {
|
|
312
310
|
var response;
|
|
313
311
|
return __generator(this, function (_a) {
|
|
314
312
|
switch (_a.label) {
|
|
315
|
-
case 0: return [4 /*yield*/, this.listModelsRaw(
|
|
313
|
+
case 0: return [4 /*yield*/, this.listModelsRaw(initOverrides)];
|
|
316
314
|
case 1:
|
|
317
315
|
response = _a.sent();
|
|
318
316
|
return [4 /*yield*/, response.value()];
|
|
@@ -368,3 +366,12 @@ var ModelsApi = /** @class */ (function (_super) {
|
|
|
368
366
|
return ModelsApi;
|
|
369
367
|
}(runtime.BaseAPI));
|
|
370
368
|
exports.ModelsApi = ModelsApi;
|
|
369
|
+
/**
|
|
370
|
+
* @export
|
|
371
|
+
* @enum {string}
|
|
372
|
+
*/
|
|
373
|
+
var GetModelByAuthorAndNameScopeEnum;
|
|
374
|
+
(function (GetModelByAuthorAndNameScopeEnum) {
|
|
375
|
+
GetModelByAuthorAndNameScopeEnum["Tenant"] = "tenant";
|
|
376
|
+
GetModelByAuthorAndNameScopeEnum["Global"] = "global";
|
|
377
|
+
})(GetModelByAuthorAndNameScopeEnum || (exports.GetModelByAuthorAndNameScopeEnum = GetModelByAuthorAndNameScopeEnum = {}));
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MLHub Models API
|
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.0
|
|
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 AssociateModelMetadataBody
|
|
16
|
+
*/
|
|
17
|
+
export interface AssociateModelMetadataBody {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof AssociateModelMetadataBody
|
|
22
|
+
*/
|
|
23
|
+
author: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof AssociateModelMetadataBody
|
|
28
|
+
*/
|
|
29
|
+
name: string;
|
|
30
|
+
}
|
|
31
|
+
export declare function AssociateModelMetadataBodyFromJSON(json: any): AssociateModelMetadataBody;
|
|
32
|
+
export declare function AssociateModelMetadataBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): AssociateModelMetadataBody;
|
|
33
|
+
export declare function AssociateModelMetadataBodyToJSON(value?: AssociateModelMetadataBody | null): any;
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.
|
|
17
|
-
exports.
|
|
18
|
-
exports.
|
|
19
|
-
function
|
|
20
|
-
return
|
|
16
|
+
exports.AssociateModelMetadataBodyFromJSON = AssociateModelMetadataBodyFromJSON;
|
|
17
|
+
exports.AssociateModelMetadataBodyFromJSONTyped = AssociateModelMetadataBodyFromJSONTyped;
|
|
18
|
+
exports.AssociateModelMetadataBodyToJSON = AssociateModelMetadataBodyToJSON;
|
|
19
|
+
function AssociateModelMetadataBodyFromJSON(json) {
|
|
20
|
+
return AssociateModelMetadataBodyFromJSONTyped(json, false);
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function AssociateModelMetadataBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
23
23
|
if ((json === undefined) || (json === null)) {
|
|
24
24
|
return json;
|
|
25
25
|
}
|
|
@@ -28,7 +28,7 @@ function AssociateModelMetadataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
28
28
|
'name': json['name'],
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function AssociateModelMetadataBodyToJSON(value) {
|
|
32
32
|
if (value === undefined) {
|
|
33
33
|
return undefined;
|
|
34
34
|
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MLHub Models API
|
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.0
|
|
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 { Locator, Platform } from './';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface Canonical
|
|
17
|
+
*/
|
|
18
|
+
export interface Canonical {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof Canonical
|
|
23
|
+
*/
|
|
24
|
+
author?: string | null;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {number}
|
|
28
|
+
* @memberof Canonical
|
|
29
|
+
*/
|
|
30
|
+
downloads?: number | null;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {boolean}
|
|
34
|
+
* @memberof Canonical
|
|
35
|
+
*/
|
|
36
|
+
gated?: boolean | null;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {number}
|
|
40
|
+
* @memberof Canonical
|
|
41
|
+
*/
|
|
42
|
+
likes?: number | null;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {Locator}
|
|
46
|
+
* @memberof Canonical
|
|
47
|
+
*/
|
|
48
|
+
locator: Locator;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof Canonical
|
|
53
|
+
*/
|
|
54
|
+
model_id: string;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @type {Platform}
|
|
58
|
+
* @memberof Canonical
|
|
59
|
+
*/
|
|
60
|
+
platform: Platform;
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* @type {boolean}
|
|
64
|
+
* @memberof Canonical
|
|
65
|
+
*/
|
|
66
|
+
_private?: boolean | null;
|
|
67
|
+
/**
|
|
68
|
+
*
|
|
69
|
+
* @type {string}
|
|
70
|
+
* @memberof Canonical
|
|
71
|
+
*/
|
|
72
|
+
sha?: string | null;
|
|
73
|
+
}
|
|
74
|
+
export declare function CanonicalFromJSON(json: any): Canonical;
|
|
75
|
+
export declare function CanonicalFromJSONTyped(json: any, ignoreDiscriminator: boolean): Canonical;
|
|
76
|
+
export declare function CanonicalToJSON(value?: Canonical | null): any;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* MLHub Models API
|
|
6
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.1.0
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.CanonicalFromJSON = CanonicalFromJSON;
|
|
17
|
+
exports.CanonicalFromJSONTyped = CanonicalFromJSONTyped;
|
|
18
|
+
exports.CanonicalToJSON = CanonicalToJSON;
|
|
19
|
+
var runtime_1 = require("../runtime");
|
|
20
|
+
var _1 = require("./");
|
|
21
|
+
function CanonicalFromJSON(json) {
|
|
22
|
+
return CanonicalFromJSONTyped(json, false);
|
|
23
|
+
}
|
|
24
|
+
function CanonicalFromJSONTyped(json, ignoreDiscriminator) {
|
|
25
|
+
if ((json === undefined) || (json === null)) {
|
|
26
|
+
return json;
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
'author': !(0, runtime_1.exists)(json, 'author') ? undefined : json['author'],
|
|
30
|
+
'downloads': !(0, runtime_1.exists)(json, 'downloads') ? undefined : json['downloads'],
|
|
31
|
+
'gated': !(0, runtime_1.exists)(json, 'gated') ? undefined : json['gated'],
|
|
32
|
+
'likes': !(0, runtime_1.exists)(json, 'likes') ? undefined : json['likes'],
|
|
33
|
+
'locator': (0, _1.LocatorFromJSON)(json['locator']),
|
|
34
|
+
'model_id': json['model_id'],
|
|
35
|
+
'platform': (0, _1.PlatformFromJSON)(json['platform']),
|
|
36
|
+
'_private': !(0, runtime_1.exists)(json, 'private') ? undefined : json['private'],
|
|
37
|
+
'sha': !(0, runtime_1.exists)(json, 'sha') ? undefined : json['sha'],
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function CanonicalToJSON(value) {
|
|
41
|
+
if (value === undefined) {
|
|
42
|
+
return undefined;
|
|
43
|
+
}
|
|
44
|
+
if (value === null) {
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
'author': value.author,
|
|
49
|
+
'downloads': value.downloads,
|
|
50
|
+
'gated': value.gated,
|
|
51
|
+
'likes': value.likes,
|
|
52
|
+
'locator': (0, _1.LocatorToJSON)(value.locator),
|
|
53
|
+
'model_id': value.model_id,
|
|
54
|
+
'platform': (0, _1.PlatformToJSON)(value.platform),
|
|
55
|
+
'private': value._private,
|
|
56
|
+
'sha': value.sha,
|
|
57
|
+
};
|
|
58
|
+
}
|