@mlhub/models-ts-sdk 0.0.8 → 0.1.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/README.md +2 -2
- package/dist/apis/ArtifactsApi.js +20 -13
- package/dist/apis/IngestionsApi.js +17 -10
- package/dist/apis/ModelsApi.d.ts +14 -1
- package/dist/apis/ModelsApi.js +76 -17
- package/dist/apis/PlatformsApi.js +25 -18
- package/dist/apis/PublicationsApi.js +22 -15
- package/dist/apis/TasksApi.js +15 -8
- package/dist/apis/index.js +20 -9
- package/dist/index.js +17 -6
- package/dist/models/Accelerator.js +5 -5
- package/dist/models/Artifact.js +5 -5
- package/dist/models/ArtifactIngestion.js +7 -7
- package/dist/models/ArtifactIngestionStatus.js +5 -4
- package/dist/models/ArtifactPublication.js +6 -6
- package/dist/models/ArtifactPublicationStatus.js +5 -4
- package/dist/models/ArtifactType.js +5 -4
- package/dist/models/AssociateModelMetadata.js +3 -3
- package/dist/models/AssociateModelMetadataResponse.js +3 -3
- package/dist/models/BadRequestResponse.js +3 -3
- package/dist/models/CreateModelMetadataResponse.js +3 -3
- package/dist/models/DiscoverModelsByPlatformResponse.js +3 -3
- package/dist/models/DiscoverModelsResponse.js +3 -3
- package/dist/models/DiscoveryCriteria.js +5 -5
- package/dist/models/DiscoveryCriterion.d.ts +2 -2
- package/dist/models/DiscoveryCriterion.js +42 -42
- package/dist/models/GetModelArtifactResponse.js +5 -5
- package/dist/models/GetModelByPlatformResponse.js +3 -3
- package/dist/models/GetModelIngestionResponse.js +5 -5
- package/dist/models/GetModelPublicationResponse.js +5 -5
- package/dist/models/GetModelResponse.js +3 -3
- package/dist/models/HardwareRequirements.js +8 -8
- package/dist/models/IngestArtifactRequest.js +6 -6
- package/dist/models/IngestModelArtifactResponse.js +5 -5
- package/dist/models/ListModelArtifactResponse.js +3 -3
- package/dist/models/ListModelIngestionsResponse.js +3 -3
- package/dist/models/ListModelPublicationsForArtifactResponse.js +3 -3
- package/dist/models/ListModelPublicationsResponse.js +3 -3
- package/dist/models/ListModelsByPlatformResponse.js +3 -3
- package/dist/models/ListModelsResponse.js +3 -3
- package/dist/models/ListPlatformsResponse.js +3 -3
- package/dist/models/ListTasksResponse.js +3 -3
- package/dist/models/ModelArtifact.d.ts +1 -1
- package/dist/models/ModelArtifact.js +7 -7
- package/dist/models/ModelIO.js +5 -5
- package/dist/models/ModelMetadata.d.ts +2 -2
- package/dist/models/ModelMetadata.js +41 -41
- package/dist/models/NotFoundResponse.js +3 -3
- package/dist/models/Platform.d.ts +3 -2
- package/dist/models/Platform.js +8 -6
- package/dist/models/PlatformDetails.js +5 -5
- package/dist/models/PublishArtifactRequest.js +4 -4
- package/dist/models/PublishModelArtifactResponse.js +5 -5
- package/dist/models/ServerErrorResponse.js +3 -3
- package/dist/models/SystemRequirement.js +3 -3
- package/dist/models/Task.js +5 -4
- package/dist/models/index.js +56 -45
- package/dist/runtime.d.ts +18 -18
- package/dist/runtime.js +45 -35
- package/package.json +3 -3
- package/src/apis/ModelsApi.ts +53 -0
- package/src/apis/PlatformsApi.ts +1 -1
- package/src/models/DiscoveryCriterion.ts +2 -2
- package/src/models/ModelArtifact.ts +1 -1
- package/src/models/ModelMetadata.ts +2 -2
- package/src/models/Platform.ts +3 -2
- package/src/runtime.ts +1 -1
package/dist/models/index.js
CHANGED
|
@@ -1,49 +1,60 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
function
|
|
3
|
-
|
|
4
|
-
|
|
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
|
+
};
|
|
5
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
17
|
/* tslint:disable */
|
|
7
18
|
/* eslint-disable */
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
19
|
+
__exportStar(require("./Accelerator"), exports);
|
|
20
|
+
__exportStar(require("./Artifact"), exports);
|
|
21
|
+
__exportStar(require("./ArtifactIngestion"), exports);
|
|
22
|
+
__exportStar(require("./ArtifactIngestionStatus"), exports);
|
|
23
|
+
__exportStar(require("./ArtifactPublication"), exports);
|
|
24
|
+
__exportStar(require("./ArtifactPublicationStatus"), exports);
|
|
25
|
+
__exportStar(require("./ArtifactType"), exports);
|
|
26
|
+
__exportStar(require("./AssociateModelMetadata"), exports);
|
|
27
|
+
__exportStar(require("./AssociateModelMetadataResponse"), exports);
|
|
28
|
+
__exportStar(require("./BadRequestResponse"), exports);
|
|
29
|
+
__exportStar(require("./CreateModelMetadataResponse"), exports);
|
|
30
|
+
__exportStar(require("./DiscoverModelsByPlatformResponse"), exports);
|
|
31
|
+
__exportStar(require("./DiscoverModelsResponse"), exports);
|
|
32
|
+
__exportStar(require("./DiscoveryCriteria"), exports);
|
|
33
|
+
__exportStar(require("./DiscoveryCriterion"), exports);
|
|
34
|
+
__exportStar(require("./GetModelArtifactResponse"), exports);
|
|
35
|
+
__exportStar(require("./GetModelByPlatformResponse"), exports);
|
|
36
|
+
__exportStar(require("./GetModelIngestionResponse"), exports);
|
|
37
|
+
__exportStar(require("./GetModelPublicationResponse"), exports);
|
|
38
|
+
__exportStar(require("./GetModelResponse"), exports);
|
|
39
|
+
__exportStar(require("./HardwareRequirements"), exports);
|
|
40
|
+
__exportStar(require("./IngestArtifactRequest"), exports);
|
|
41
|
+
__exportStar(require("./IngestModelArtifactResponse"), exports);
|
|
42
|
+
__exportStar(require("./ListModelArtifactResponse"), exports);
|
|
43
|
+
__exportStar(require("./ListModelIngestionsResponse"), exports);
|
|
44
|
+
__exportStar(require("./ListModelPublicationsForArtifactResponse"), exports);
|
|
45
|
+
__exportStar(require("./ListModelPublicationsResponse"), exports);
|
|
46
|
+
__exportStar(require("./ListModelsByPlatformResponse"), exports);
|
|
47
|
+
__exportStar(require("./ListModelsResponse"), exports);
|
|
48
|
+
__exportStar(require("./ListPlatformsResponse"), exports);
|
|
49
|
+
__exportStar(require("./ListTasksResponse"), exports);
|
|
50
|
+
__exportStar(require("./ModelArtifact"), exports);
|
|
51
|
+
__exportStar(require("./ModelIO"), exports);
|
|
52
|
+
__exportStar(require("./ModelMetadata"), exports);
|
|
53
|
+
__exportStar(require("./NotFoundResponse"), exports);
|
|
54
|
+
__exportStar(require("./Platform"), exports);
|
|
55
|
+
__exportStar(require("./PlatformDetails"), exports);
|
|
56
|
+
__exportStar(require("./PublishArtifactRequest"), exports);
|
|
57
|
+
__exportStar(require("./PublishModelArtifactResponse"), exports);
|
|
58
|
+
__exportStar(require("./ServerErrorResponse"), exports);
|
|
59
|
+
__exportStar(require("./SystemRequirement"), exports);
|
|
60
|
+
__exportStar(require("./Task"), exports);
|
package/dist/runtime.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ export declare const COLLECTION_FORMATS: {
|
|
|
40
40
|
tsv: string;
|
|
41
41
|
pipes: string;
|
|
42
42
|
};
|
|
43
|
-
export
|
|
43
|
+
export type FetchAPI = WindowOrWorkerGlobalScope['fetch'];
|
|
44
44
|
export interface ConfigurationParameters {
|
|
45
45
|
basePath?: string;
|
|
46
46
|
fetchApi?: FetchAPI;
|
|
@@ -56,27 +56,27 @@ export interface ConfigurationParameters {
|
|
|
56
56
|
export declare class Configuration {
|
|
57
57
|
private configuration;
|
|
58
58
|
constructor(configuration?: ConfigurationParameters);
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
-
export
|
|
71
|
-
export
|
|
72
|
-
export
|
|
59
|
+
get basePath(): string;
|
|
60
|
+
get fetchApi(): FetchAPI | undefined;
|
|
61
|
+
get middleware(): Middleware[];
|
|
62
|
+
get queryParamsStringify(): (params: HTTPQuery) => string;
|
|
63
|
+
get username(): string | undefined;
|
|
64
|
+
get password(): string | undefined;
|
|
65
|
+
get apiKey(): ((name: string) => string) | undefined;
|
|
66
|
+
get accessToken(): ((name?: string, scopes?: string[]) => string | Promise<string>) | undefined;
|
|
67
|
+
get headers(): HTTPHeaders | undefined;
|
|
68
|
+
get credentials(): RequestCredentials | undefined;
|
|
69
|
+
}
|
|
70
|
+
export type Json = any;
|
|
71
|
+
export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD';
|
|
72
|
+
export type HTTPHeaders = {
|
|
73
73
|
[key: string]: string;
|
|
74
74
|
};
|
|
75
|
-
export
|
|
75
|
+
export type HTTPQuery = {
|
|
76
76
|
[key: string]: string | number | null | boolean | Array<string | number | null | boolean> | HTTPQuery;
|
|
77
77
|
};
|
|
78
|
-
export
|
|
79
|
-
export
|
|
78
|
+
export type HTTPBody = Json | FormData | URLSearchParams;
|
|
79
|
+
export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original';
|
|
80
80
|
export interface FetchParams {
|
|
81
81
|
url: string;
|
|
82
82
|
init: RequestInit;
|
package/dist/runtime.js
CHANGED
|
@@ -13,38 +13,47 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
var __extends = (this && this.__extends) || (function () {
|
|
16
|
-
var extendStatics =
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
var extendStatics = function (d, b) {
|
|
17
|
+
extendStatics = Object.setPrototypeOf ||
|
|
18
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
19
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
20
|
+
return extendStatics(d, b);
|
|
21
|
+
};
|
|
19
22
|
return function (d, b) {
|
|
23
|
+
if (typeof b !== "function" && b !== null)
|
|
24
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
20
25
|
extendStatics(d, b);
|
|
21
26
|
function __() { this.constructor = d; }
|
|
22
27
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
23
28
|
};
|
|
24
29
|
})();
|
|
25
|
-
var __assign = (this && this.__assign) ||
|
|
26
|
-
|
|
27
|
-
s = arguments
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
var __assign = (this && this.__assign) || function () {
|
|
31
|
+
__assign = Object.assign || function(t) {
|
|
32
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
33
|
+
s = arguments[i];
|
|
34
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
35
|
+
t[p] = s[p];
|
|
36
|
+
}
|
|
37
|
+
return t;
|
|
38
|
+
};
|
|
39
|
+
return __assign.apply(this, arguments);
|
|
32
40
|
};
|
|
33
41
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
42
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
34
43
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
35
44
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
36
45
|
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
37
|
-
function step(result) { result.done ? resolve(result.value) :
|
|
46
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
38
47
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
39
48
|
});
|
|
40
49
|
};
|
|
41
50
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
42
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
43
|
-
return g =
|
|
51
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
52
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
44
53
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
45
54
|
function step(op) {
|
|
46
55
|
if (f) throw new TypeError("Generator is already executing.");
|
|
47
|
-
while (_) try {
|
|
56
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
48
57
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
49
58
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
50
59
|
switch (op[0]) {
|
|
@@ -66,6 +75,11 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
66
75
|
}
|
|
67
76
|
};
|
|
68
77
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
78
|
+
exports.TextApiResponse = exports.BlobApiResponse = exports.VoidApiResponse = exports.JSONApiResponse = exports.Configuration = exports.COLLECTION_FORMATS = exports.RequiredError = exports.BaseAPI = exports.BASE_PATH = void 0;
|
|
79
|
+
exports.exists = exists;
|
|
80
|
+
exports.querystring = querystring;
|
|
81
|
+
exports.mapValues = mapValues;
|
|
82
|
+
exports.canConsumeForm = canConsumeForm;
|
|
69
83
|
exports.BASE_PATH = "http://localhost".replace(/\/+$/, "");
|
|
70
84
|
var isBlob = function (value) { return typeof Blob !== 'undefined' && value instanceof Blob; };
|
|
71
85
|
/**
|
|
@@ -123,11 +137,11 @@ var BaseAPI = /** @class */ (function () {
|
|
|
123
137
|
this.middleware = configuration.middleware;
|
|
124
138
|
}
|
|
125
139
|
BaseAPI.prototype.withMiddleware = function () {
|
|
140
|
+
var _a;
|
|
126
141
|
var middlewares = [];
|
|
127
142
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
128
143
|
middlewares[_i] = arguments[_i];
|
|
129
144
|
}
|
|
130
|
-
var _a;
|
|
131
145
|
var next = this.clone();
|
|
132
146
|
next.middleware = (_a = next.middleware).concat.apply(_a, middlewares);
|
|
133
147
|
return next;
|
|
@@ -221,42 +235,42 @@ var Configuration = /** @class */ (function () {
|
|
|
221
235
|
get: function () {
|
|
222
236
|
return this.configuration.basePath != null ? this.configuration.basePath : exports.BASE_PATH;
|
|
223
237
|
},
|
|
224
|
-
enumerable:
|
|
238
|
+
enumerable: false,
|
|
225
239
|
configurable: true
|
|
226
240
|
});
|
|
227
241
|
Object.defineProperty(Configuration.prototype, "fetchApi", {
|
|
228
242
|
get: function () {
|
|
229
243
|
return this.configuration.fetchApi;
|
|
230
244
|
},
|
|
231
|
-
enumerable:
|
|
245
|
+
enumerable: false,
|
|
232
246
|
configurable: true
|
|
233
247
|
});
|
|
234
248
|
Object.defineProperty(Configuration.prototype, "middleware", {
|
|
235
249
|
get: function () {
|
|
236
250
|
return this.configuration.middleware || [];
|
|
237
251
|
},
|
|
238
|
-
enumerable:
|
|
252
|
+
enumerable: false,
|
|
239
253
|
configurable: true
|
|
240
254
|
});
|
|
241
255
|
Object.defineProperty(Configuration.prototype, "queryParamsStringify", {
|
|
242
256
|
get: function () {
|
|
243
257
|
return this.configuration.queryParamsStringify || querystring;
|
|
244
258
|
},
|
|
245
|
-
enumerable:
|
|
259
|
+
enumerable: false,
|
|
246
260
|
configurable: true
|
|
247
261
|
});
|
|
248
262
|
Object.defineProperty(Configuration.prototype, "username", {
|
|
249
263
|
get: function () {
|
|
250
264
|
return this.configuration.username;
|
|
251
265
|
},
|
|
252
|
-
enumerable:
|
|
266
|
+
enumerable: false,
|
|
253
267
|
configurable: true
|
|
254
268
|
});
|
|
255
269
|
Object.defineProperty(Configuration.prototype, "password", {
|
|
256
270
|
get: function () {
|
|
257
271
|
return this.configuration.password;
|
|
258
272
|
},
|
|
259
|
-
enumerable:
|
|
273
|
+
enumerable: false,
|
|
260
274
|
configurable: true
|
|
261
275
|
});
|
|
262
276
|
Object.defineProperty(Configuration.prototype, "apiKey", {
|
|
@@ -267,7 +281,7 @@ var Configuration = /** @class */ (function () {
|
|
|
267
281
|
}
|
|
268
282
|
return undefined;
|
|
269
283
|
},
|
|
270
|
-
enumerable:
|
|
284
|
+
enumerable: false,
|
|
271
285
|
configurable: true
|
|
272
286
|
});
|
|
273
287
|
Object.defineProperty(Configuration.prototype, "accessToken", {
|
|
@@ -281,21 +295,21 @@ var Configuration = /** @class */ (function () {
|
|
|
281
295
|
}
|
|
282
296
|
return undefined;
|
|
283
297
|
},
|
|
284
|
-
enumerable:
|
|
298
|
+
enumerable: false,
|
|
285
299
|
configurable: true
|
|
286
300
|
});
|
|
287
301
|
Object.defineProperty(Configuration.prototype, "headers", {
|
|
288
302
|
get: function () {
|
|
289
303
|
return this.configuration.headers;
|
|
290
304
|
},
|
|
291
|
-
enumerable:
|
|
305
|
+
enumerable: false,
|
|
292
306
|
configurable: true
|
|
293
307
|
});
|
|
294
308
|
Object.defineProperty(Configuration.prototype, "credentials", {
|
|
295
309
|
get: function () {
|
|
296
310
|
return this.configuration.credentials;
|
|
297
311
|
},
|
|
298
|
-
enumerable:
|
|
312
|
+
enumerable: false,
|
|
299
313
|
configurable: true
|
|
300
314
|
});
|
|
301
315
|
return Configuration;
|
|
@@ -305,37 +319,34 @@ function exists(json, key) {
|
|
|
305
319
|
var value = json[key];
|
|
306
320
|
return value !== null && value !== undefined;
|
|
307
321
|
}
|
|
308
|
-
exports.exists = exists;
|
|
309
322
|
function querystring(params, prefix) {
|
|
310
323
|
if (prefix === void 0) { prefix = ''; }
|
|
311
324
|
return Object.keys(params)
|
|
312
325
|
.map(function (key) {
|
|
313
|
-
var fullKey = prefix + (prefix.length ? "["
|
|
326
|
+
var fullKey = prefix + (prefix.length ? "[".concat(key, "]") : key);
|
|
314
327
|
var value = params[key];
|
|
315
328
|
if (value instanceof Array) {
|
|
316
329
|
var multiValue = value.map(function (singleValue) { return encodeURIComponent(String(singleValue)); })
|
|
317
|
-
.join("&"
|
|
318
|
-
return encodeURIComponent(fullKey)
|
|
330
|
+
.join("&".concat(encodeURIComponent(fullKey), "="));
|
|
331
|
+
return "".concat(encodeURIComponent(fullKey), "=").concat(multiValue);
|
|
319
332
|
}
|
|
320
333
|
if (value instanceof Date) {
|
|
321
|
-
return encodeURIComponent(fullKey)
|
|
334
|
+
return "".concat(encodeURIComponent(fullKey), "=").concat(encodeURIComponent(value.toISOString()));
|
|
322
335
|
}
|
|
323
336
|
if (value instanceof Object) {
|
|
324
337
|
return querystring(value, fullKey);
|
|
325
338
|
}
|
|
326
|
-
return encodeURIComponent(fullKey)
|
|
339
|
+
return "".concat(encodeURIComponent(fullKey), "=").concat(encodeURIComponent(String(value)));
|
|
327
340
|
})
|
|
328
341
|
.filter(function (part) { return part.length > 0; })
|
|
329
342
|
.join('&');
|
|
330
343
|
}
|
|
331
|
-
exports.querystring = querystring;
|
|
332
344
|
function mapValues(data, fn) {
|
|
333
345
|
return Object.keys(data).reduce(function (acc, key) {
|
|
334
346
|
var _a;
|
|
335
|
-
return (__assign({}, acc, (_a = {}, _a[key] = fn(data[key]), _a)));
|
|
347
|
+
return (__assign(__assign({}, acc), (_a = {}, _a[key] = fn(data[key]), _a)));
|
|
336
348
|
}, {});
|
|
337
349
|
}
|
|
338
|
-
exports.mapValues = mapValues;
|
|
339
350
|
function canConsumeForm(consumes) {
|
|
340
351
|
for (var _i = 0, consumes_1 = consumes; _i < consumes_1.length; _i++) {
|
|
341
352
|
var consume = consumes_1[_i];
|
|
@@ -345,7 +356,6 @@ function canConsumeForm(consumes) {
|
|
|
345
356
|
}
|
|
346
357
|
return false;
|
|
347
358
|
}
|
|
348
|
-
exports.canConsumeForm = canConsumeForm;
|
|
349
359
|
var JSONApiResponse = /** @class */ (function () {
|
|
350
360
|
function JSONApiResponse(raw, transformer) {
|
|
351
361
|
if (transformer === void 0) { transformer = function (jsonValue) { return jsonValue; }; }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mlhub/models-ts-sdk",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"description": "OpenAPI client for @mlhub/models-ts-sdk",
|
|
5
5
|
"author": "OpenAPI-Generator",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -10,6 +10,6 @@
|
|
|
10
10
|
"prepare": "npm run build"
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
|
-
"typescript": "^
|
|
13
|
+
"typescript": "^5.9.3"
|
|
14
14
|
}
|
|
15
|
-
}
|
|
15
|
+
}
|
package/src/apis/ModelsApi.ts
CHANGED
|
@@ -30,6 +30,12 @@ import {
|
|
|
30
30
|
GetModelResponse,
|
|
31
31
|
GetModelResponseFromJSON,
|
|
32
32
|
GetModelResponseToJSON,
|
|
33
|
+
IngestArtifactRequest,
|
|
34
|
+
IngestArtifactRequestFromJSON,
|
|
35
|
+
IngestArtifactRequestToJSON,
|
|
36
|
+
IngestModelArtifactResponse,
|
|
37
|
+
IngestModelArtifactResponseFromJSON,
|
|
38
|
+
IngestModelArtifactResponseToJSON,
|
|
33
39
|
ListModelsResponse,
|
|
34
40
|
ListModelsResponseFromJSON,
|
|
35
41
|
ListModelsResponseToJSON,
|
|
@@ -60,6 +66,12 @@ export interface GetModelRequest {
|
|
|
60
66
|
name: string;
|
|
61
67
|
}
|
|
62
68
|
|
|
69
|
+
export interface IngestCanonicalModelRequest {
|
|
70
|
+
author: string;
|
|
71
|
+
name: string;
|
|
72
|
+
ingestArtifactRequest: IngestArtifactRequest;
|
|
73
|
+
}
|
|
74
|
+
|
|
63
75
|
export interface ListModelsRequest {
|
|
64
76
|
modelMetadata: ModelMetadata;
|
|
65
77
|
}
|
|
@@ -185,6 +197,47 @@ export class ModelsApi extends runtime.BaseAPI {
|
|
|
185
197
|
return await response.value();
|
|
186
198
|
}
|
|
187
199
|
|
|
200
|
+
/**
|
|
201
|
+
* Ingest canonical model artifact
|
|
202
|
+
*/
|
|
203
|
+
async ingestCanonicalModelRaw(requestParameters: IngestCanonicalModelRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<IngestModelArtifactResponse>> {
|
|
204
|
+
if (requestParameters.author === null || requestParameters.author === undefined) {
|
|
205
|
+
throw new runtime.RequiredError('author','Required parameter requestParameters.author was null or undefined when calling ingestCanonicalModel.');
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
if (requestParameters.name === null || requestParameters.name === undefined) {
|
|
209
|
+
throw new runtime.RequiredError('name','Required parameter requestParameters.name was null or undefined when calling ingestCanonicalModel.');
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
if (requestParameters.ingestArtifactRequest === null || requestParameters.ingestArtifactRequest === undefined) {
|
|
213
|
+
throw new runtime.RequiredError('ingestArtifactRequest','Required parameter requestParameters.ingestArtifactRequest was null or undefined when calling ingestCanonicalModel.');
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
const queryParameters: any = {};
|
|
217
|
+
|
|
218
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
219
|
+
|
|
220
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
221
|
+
|
|
222
|
+
const response = await this.request({
|
|
223
|
+
path: `/models-api/models/{author}/{name}`.replace(`{${"author"}}`, encodeURIComponent(String(requestParameters.author))).replace(`{${"name"}}`, encodeURIComponent(String(requestParameters.name))),
|
|
224
|
+
method: 'POST',
|
|
225
|
+
headers: headerParameters,
|
|
226
|
+
query: queryParameters,
|
|
227
|
+
body: IngestArtifactRequestToJSON(requestParameters.ingestArtifactRequest),
|
|
228
|
+
}, initOverrides);
|
|
229
|
+
|
|
230
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => IngestModelArtifactResponseFromJSON(jsonValue));
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* Ingest canonical model artifact
|
|
235
|
+
*/
|
|
236
|
+
async ingestCanonicalModel(requestParameters: IngestCanonicalModelRequest, initOverrides?: RequestInit): Promise<IngestModelArtifactResponse> {
|
|
237
|
+
const response = await this.ingestCanonicalModelRaw(requestParameters, initOverrides);
|
|
238
|
+
return await response.value();
|
|
239
|
+
}
|
|
240
|
+
|
|
188
241
|
/**
|
|
189
242
|
* List all models
|
|
190
243
|
*/
|
package/src/apis/PlatformsApi.ts
CHANGED
|
@@ -131,7 +131,7 @@ export class PlatformsApi extends runtime.BaseAPI {
|
|
|
131
131
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
132
132
|
|
|
133
133
|
const response = await this.request({
|
|
134
|
-
path: `/models-api/platforms/{platform}/models/{model_id}`.replace(`{${"platform"}}`, encodeURIComponent(String(requestParameters.platform))).replace(`{${"model_id"}}`, String(requestParameters.modelId)),
|
|
134
|
+
path: `/models-api/platforms/{platform}/models/{model_id}`.replace(`{${"platform"}}`, encodeURIComponent(String(requestParameters.platform))).replace(`{${"model_id"}}`, encodeURIComponent(String(requestParameters.modelId))),
|
|
135
135
|
method: 'GET',
|
|
136
136
|
headers: headerParameters,
|
|
137
137
|
query: queryParameters,
|
|
@@ -81,7 +81,7 @@ export interface DiscoveryCriterion {
|
|
|
81
81
|
* @type {HardwareRequirements}
|
|
82
82
|
* @memberof DiscoveryCriterion
|
|
83
83
|
*/
|
|
84
|
-
inference_hardware?: HardwareRequirements
|
|
84
|
+
inference_hardware?: HardwareRequirements;
|
|
85
85
|
/**
|
|
86
86
|
*
|
|
87
87
|
* @type {number}
|
|
@@ -232,7 +232,7 @@ export interface DiscoveryCriterion {
|
|
|
232
232
|
* @type {HardwareRequirements}
|
|
233
233
|
* @memberof DiscoveryCriterion
|
|
234
234
|
*/
|
|
235
|
-
training_hardware?: HardwareRequirements
|
|
235
|
+
training_hardware?: HardwareRequirements;
|
|
236
236
|
/**
|
|
237
237
|
* Training performance fields
|
|
238
238
|
* @type {number}
|
|
@@ -81,7 +81,7 @@ export interface ModelMetadata {
|
|
|
81
81
|
* @type {HardwareRequirements}
|
|
82
82
|
* @memberof ModelMetadata
|
|
83
83
|
*/
|
|
84
|
-
inference_hardware?: HardwareRequirements
|
|
84
|
+
inference_hardware?: HardwareRequirements;
|
|
85
85
|
/**
|
|
86
86
|
*
|
|
87
87
|
* @type {number}
|
|
@@ -232,7 +232,7 @@ export interface ModelMetadata {
|
|
|
232
232
|
* @type {HardwareRequirements}
|
|
233
233
|
* @memberof ModelMetadata
|
|
234
234
|
*/
|
|
235
|
-
training_hardware?: HardwareRequirements
|
|
235
|
+
training_hardware?: HardwareRequirements;
|
|
236
236
|
/**
|
|
237
237
|
* Training performance fields
|
|
238
238
|
* @type {number}
|
package/src/models/Platform.ts
CHANGED
|
@@ -21,11 +21,12 @@
|
|
|
21
21
|
* @enum {string}
|
|
22
22
|
*/
|
|
23
23
|
export enum Platform {
|
|
24
|
-
|
|
24
|
+
HuggingFace = 'hugging-face',
|
|
25
25
|
Github = 'github',
|
|
26
26
|
Git = 'git',
|
|
27
27
|
Patra = 'patra',
|
|
28
|
-
|
|
28
|
+
TapisPods = 'tapis-pods',
|
|
29
|
+
TapisJobs = 'tapis-jobs',
|
|
29
30
|
S3 = 's3'
|
|
30
31
|
}
|
|
31
32
|
|
package/src/runtime.ts
CHANGED
|
@@ -126,7 +126,7 @@ export const COLLECTION_FORMATS = {
|
|
|
126
126
|
pipes: "|",
|
|
127
127
|
};
|
|
128
128
|
|
|
129
|
-
export type FetchAPI =
|
|
129
|
+
export type FetchAPI = WindowOrWorkerGlobalScope['fetch'];
|
|
130
130
|
|
|
131
131
|
export interface ConfigurationParameters {
|
|
132
132
|
basePath?: string; // override base path
|