@mlhub/models-ts-sdk 0.0.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.
Files changed (132) hide show
  1. package/.openapi-generator/FILES +48 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +45 -0
  5. package/dist/apis/ArtifactsApi.d.ts +37 -0
  6. package/dist/apis/ArtifactsApi.js +158 -0
  7. package/dist/apis/IngestionsApi.d.ts +37 -0
  8. package/dist/apis/IngestionsApi.js +158 -0
  9. package/dist/apis/MetadataApi.d.ts +30 -0
  10. package/dist/apis/MetadataApi.js +122 -0
  11. package/dist/apis/PlatformsApi.d.ts +74 -0
  12. package/dist/apis/PlatformsApi.js +306 -0
  13. package/dist/apis/PublicationsApi.d.ts +60 -0
  14. package/dist/apis/PublicationsApi.js +251 -0
  15. package/dist/apis/index.d.ts +5 -0
  16. package/dist/apis/index.js +12 -0
  17. package/dist/index.d.ts +3 -0
  18. package/dist/index.js +10 -0
  19. package/dist/models/Accelerator.d.ts +46 -0
  20. package/dist/models/Accelerator.js +48 -0
  21. package/dist/models/Artifact.d.ts +46 -0
  22. package/dist/models/Artifact.js +47 -0
  23. package/dist/models/ArtifactIngestion.d.ts +70 -0
  24. package/dist/models/ArtifactIngestion.js +56 -0
  25. package/dist/models/ArtifactIngestionStatus.d.ts +30 -0
  26. package/dist/models/ArtifactIngestionStatus.js +44 -0
  27. package/dist/models/ArtifactPublication.d.ts +70 -0
  28. package/dist/models/ArtifactPublication.js +56 -0
  29. package/dist/models/ArtifactPublicationStatus.d.ts +31 -0
  30. package/dist/models/ArtifactPublicationStatus.js +45 -0
  31. package/dist/models/ArtifactType.d.ts +23 -0
  32. package/dist/models/ArtifactType.js +37 -0
  33. package/dist/models/BadRequestResponse.d.ts +51 -0
  34. package/dist/models/BadRequestResponse.js +48 -0
  35. package/dist/models/CreateModelMetadataResponse.d.ts +51 -0
  36. package/dist/models/CreateModelMetadataResponse.js +48 -0
  37. package/dist/models/DiscoverModelsByPlatformResponse.d.ts +51 -0
  38. package/dist/models/DiscoverModelsByPlatformResponse.js +48 -0
  39. package/dist/models/DiscoveryCriteria.d.ts +34 -0
  40. package/dist/models/DiscoveryCriteria.js +44 -0
  41. package/dist/models/GetModelArtifactResponse.d.ts +52 -0
  42. package/dist/models/GetModelArtifactResponse.js +49 -0
  43. package/dist/models/GetModelByPlatformResponse.d.ts +51 -0
  44. package/dist/models/GetModelByPlatformResponse.js +48 -0
  45. package/dist/models/GetModelIngestionResponse.d.ts +52 -0
  46. package/dist/models/GetModelIngestionResponse.js +49 -0
  47. package/dist/models/GetModelPublicationResponse.d.ts +52 -0
  48. package/dist/models/GetModelPublicationResponse.js +49 -0
  49. package/dist/models/HardwareRequirements.d.ts +52 -0
  50. package/dist/models/HardwareRequirements.js +50 -0
  51. package/dist/models/IngestArtifactRequest.d.ts +45 -0
  52. package/dist/models/IngestArtifactRequest.js +47 -0
  53. package/dist/models/IngestModelArtifactResponse.d.ts +52 -0
  54. package/dist/models/IngestModelArtifactResponse.js +49 -0
  55. package/dist/models/ListModelArtifactResponse.d.ts +52 -0
  56. package/dist/models/ListModelArtifactResponse.js +49 -0
  57. package/dist/models/ListModelIngestionsResponse.d.ts +52 -0
  58. package/dist/models/ListModelIngestionsResponse.js +49 -0
  59. package/dist/models/ListModelPublicationsForArtifactResponse.d.ts +52 -0
  60. package/dist/models/ListModelPublicationsForArtifactResponse.js +49 -0
  61. package/dist/models/ListModelPublicationsResponse.d.ts +52 -0
  62. package/dist/models/ListModelPublicationsResponse.js +49 -0
  63. package/dist/models/ListModelsByPlatformResponse.d.ts +53 -0
  64. package/dist/models/ListModelsByPlatformResponse.js +48 -0
  65. package/dist/models/ListPlatformsResponse.d.ts +52 -0
  66. package/dist/models/ListPlatformsResponse.js +49 -0
  67. package/dist/models/ModelIO.d.ts +33 -0
  68. package/dist/models/ModelIO.js +43 -0
  69. package/dist/models/ModelMetadata.d.ts +239 -0
  70. package/dist/models/ModelMetadata.js +112 -0
  71. package/dist/models/NotFoundResponse.d.ts +51 -0
  72. package/dist/models/NotFoundResponse.js +48 -0
  73. package/dist/models/Platform.d.ts +30 -0
  74. package/dist/models/Platform.js +44 -0
  75. package/dist/models/PlatformDetails.d.ts +34 -0
  76. package/dist/models/PlatformDetails.js +43 -0
  77. package/dist/models/PublishArtifactRequest.d.ts +33 -0
  78. package/dist/models/PublishArtifactRequest.js +43 -0
  79. package/dist/models/PublishModelArtifactResponse.d.ts +52 -0
  80. package/dist/models/PublishModelArtifactResponse.js +49 -0
  81. package/dist/models/ServerErrorResponse.d.ts +51 -0
  82. package/dist/models/ServerErrorResponse.js +48 -0
  83. package/dist/models/SystemRequirement.d.ts +33 -0
  84. package/dist/models/SystemRequirement.js +42 -0
  85. package/dist/models/index.d.ts +33 -0
  86. package/dist/models/index.js +40 -0
  87. package/dist/runtime.d.ts +140 -0
  88. package/dist/runtime.js +420 -0
  89. package/package.json +15 -0
  90. package/src/apis/ArtifactsApi.ts +100 -0
  91. package/src/apis/IngestionsApi.ts +100 -0
  92. package/src/apis/MetadataApi.ts +82 -0
  93. package/src/apis/PlatformsApi.ts +246 -0
  94. package/src/apis/PublicationsApi.ts +185 -0
  95. package/src/apis/index.ts +7 -0
  96. package/src/index.ts +5 -0
  97. package/src/models/Accelerator.ts +87 -0
  98. package/src/models/Artifact.ts +87 -0
  99. package/src/models/ArtifactIngestion.ts +119 -0
  100. package/src/models/ArtifactIngestionStatus.ts +43 -0
  101. package/src/models/ArtifactPublication.ts +119 -0
  102. package/src/models/ArtifactPublicationStatus.ts +44 -0
  103. package/src/models/ArtifactType.ts +36 -0
  104. package/src/models/BadRequestResponse.ts +88 -0
  105. package/src/models/CreateModelMetadataResponse.ts +88 -0
  106. package/src/models/DiscoverModelsByPlatformResponse.ts +88 -0
  107. package/src/models/DiscoveryCriteria.ts +71 -0
  108. package/src/models/GetModelArtifactResponse.ts +95 -0
  109. package/src/models/GetModelByPlatformResponse.ts +88 -0
  110. package/src/models/GetModelIngestionResponse.ts +95 -0
  111. package/src/models/GetModelPublicationResponse.ts +95 -0
  112. package/src/models/HardwareRequirements.ts +95 -0
  113. package/src/models/IngestArtifactRequest.ts +80 -0
  114. package/src/models/IngestModelArtifactResponse.ts +95 -0
  115. package/src/models/ListModelArtifactResponse.ts +95 -0
  116. package/src/models/ListModelIngestionsResponse.ts +95 -0
  117. package/src/models/ListModelPublicationsForArtifactResponse.ts +95 -0
  118. package/src/models/ListModelPublicationsResponse.ts +95 -0
  119. package/src/models/ListModelsByPlatformResponse.ts +88 -0
  120. package/src/models/ListPlatformsResponse.ts +95 -0
  121. package/src/models/ModelIO.ts +64 -0
  122. package/src/models/ModelMetadata.ts +348 -0
  123. package/src/models/NotFoundResponse.ts +88 -0
  124. package/src/models/Platform.ts +43 -0
  125. package/src/models/PlatformDetails.ts +71 -0
  126. package/src/models/PublishArtifactRequest.ts +64 -0
  127. package/src/models/PublishModelArtifactResponse.ts +95 -0
  128. package/src/models/ServerErrorResponse.ts +88 -0
  129. package/src/models/SystemRequirement.ts +64 -0
  130. package/src/models/index.ts +35 -0
  131. package/src/runtime.ts +320 -0
  132. package/tsconfig.json +20 -0
@@ -0,0 +1,251 @@
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
+ var __extends = (this && this.__extends) || (function () {
16
+ var extendStatics = Object.setPrototypeOf ||
17
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
18
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
19
+ return function (d, b) {
20
+ extendStatics(d, b);
21
+ function __() { this.constructor = d; }
22
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
23
+ };
24
+ })();
25
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
+ return new (P || (P = Promise))(function (resolve, reject) {
27
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
28
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
29
+ function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
30
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
31
+ });
32
+ };
33
+ var __generator = (this && this.__generator) || function (thisArg, body) {
34
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
35
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
36
+ function verb(n) { return function (v) { return step([n, v]); }; }
37
+ function step(op) {
38
+ if (f) throw new TypeError("Generator is already executing.");
39
+ while (_) try {
40
+ 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;
41
+ if (y = 0, t) op = [op[0] & 2, t.value];
42
+ switch (op[0]) {
43
+ case 0: case 1: t = op; break;
44
+ case 4: _.label++; return { value: op[1], done: false };
45
+ case 5: _.label++; y = op[1]; op = [0]; continue;
46
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
47
+ default:
48
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
49
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
50
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
51
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
52
+ if (t[2]) _.ops.pop();
53
+ _.trys.pop(); continue;
54
+ }
55
+ op = body.call(thisArg, _);
56
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
57
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
58
+ }
59
+ };
60
+ Object.defineProperty(exports, "__esModule", { value: true });
61
+ var runtime = require("../runtime");
62
+ var models_1 = require("../models");
63
+ /**
64
+ *
65
+ */
66
+ var PublicationsApi = /** @class */ (function (_super) {
67
+ __extends(PublicationsApi, _super);
68
+ function PublicationsApi() {
69
+ return _super !== null && _super.apply(this, arguments) || this;
70
+ }
71
+ /**
72
+ * Fetch a publication by id
73
+ */
74
+ PublicationsApi.prototype.getModelPublicationRaw = function (requestParameters, initOverrides) {
75
+ return __awaiter(this, void 0, void 0, function () {
76
+ var queryParameters, headerParameters, response;
77
+ return __generator(this, function (_a) {
78
+ switch (_a.label) {
79
+ case 0:
80
+ if (requestParameters.publicationId === null || requestParameters.publicationId === undefined) {
81
+ throw new runtime.RequiredError('publicationId', 'Required parameter requestParameters.publicationId was null or undefined when calling getModelPublication.');
82
+ }
83
+ queryParameters = {};
84
+ headerParameters = {};
85
+ return [4 /*yield*/, this.request({
86
+ path: "/models-api/publications/{publication_id}".replace("{" + "publication_id" + "}", encodeURIComponent(String(requestParameters.publicationId))),
87
+ method: 'GET',
88
+ headers: headerParameters,
89
+ query: queryParameters,
90
+ }, initOverrides)];
91
+ case 1:
92
+ response = _a.sent();
93
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return models_1.GetModelPublicationResponseFromJSON(jsonValue); })];
94
+ }
95
+ });
96
+ });
97
+ };
98
+ /**
99
+ * Fetch a publication by id
100
+ */
101
+ PublicationsApi.prototype.getModelPublication = function (requestParameters, initOverrides) {
102
+ return __awaiter(this, void 0, void 0, function () {
103
+ var response;
104
+ return __generator(this, function (_a) {
105
+ switch (_a.label) {
106
+ case 0: return [4 /*yield*/, this.getModelPublicationRaw(requestParameters, initOverrides)];
107
+ case 1:
108
+ response = _a.sent();
109
+ return [4 /*yield*/, response.value()];
110
+ case 2: return [2 /*return*/, _a.sent()];
111
+ }
112
+ });
113
+ });
114
+ };
115
+ /**
116
+ * List all model publications
117
+ */
118
+ PublicationsApi.prototype.listModelPublicationsRaw = function (initOverrides) {
119
+ return __awaiter(this, void 0, void 0, function () {
120
+ var queryParameters, headerParameters, response;
121
+ return __generator(this, function (_a) {
122
+ switch (_a.label) {
123
+ case 0:
124
+ queryParameters = {};
125
+ headerParameters = {};
126
+ return [4 /*yield*/, this.request({
127
+ path: "/models-api/publications",
128
+ method: 'GET',
129
+ headers: headerParameters,
130
+ query: queryParameters,
131
+ }, initOverrides)];
132
+ case 1:
133
+ response = _a.sent();
134
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return models_1.ListModelPublicationsResponseFromJSON(jsonValue); })];
135
+ }
136
+ });
137
+ });
138
+ };
139
+ /**
140
+ * List all model publications
141
+ */
142
+ PublicationsApi.prototype.listModelPublications = function (initOverrides) {
143
+ return __awaiter(this, void 0, void 0, function () {
144
+ var response;
145
+ return __generator(this, function (_a) {
146
+ switch (_a.label) {
147
+ case 0: return [4 /*yield*/, this.listModelPublicationsRaw(initOverrides)];
148
+ case 1:
149
+ response = _a.sent();
150
+ return [4 /*yield*/, response.value()];
151
+ case 2: return [2 /*return*/, _a.sent()];
152
+ }
153
+ });
154
+ });
155
+ };
156
+ /**
157
+ * List all publications for an artifact
158
+ */
159
+ PublicationsApi.prototype.listPublicationsForArtifactRaw = function (requestParameters, initOverrides) {
160
+ return __awaiter(this, void 0, void 0, function () {
161
+ var queryParameters, headerParameters, response;
162
+ return __generator(this, function (_a) {
163
+ switch (_a.label) {
164
+ case 0:
165
+ if (requestParameters.artifactId === null || requestParameters.artifactId === undefined) {
166
+ throw new runtime.RequiredError('artifactId', 'Required parameter requestParameters.artifactId was null or undefined when calling listPublicationsForArtifact.');
167
+ }
168
+ queryParameters = {};
169
+ headerParameters = {};
170
+ return [4 /*yield*/, this.request({
171
+ path: "/models-api/artifacts/{artifact_id}/publications".replace("{" + "artifact_id" + "}", encodeURIComponent(String(requestParameters.artifactId))),
172
+ method: 'GET',
173
+ headers: headerParameters,
174
+ query: queryParameters,
175
+ }, initOverrides)];
176
+ case 1:
177
+ response = _a.sent();
178
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return models_1.ListModelPublicationsForArtifactResponseFromJSON(jsonValue); })];
179
+ }
180
+ });
181
+ });
182
+ };
183
+ /**
184
+ * List all publications for an artifact
185
+ */
186
+ PublicationsApi.prototype.listPublicationsForArtifact = function (requestParameters, initOverrides) {
187
+ return __awaiter(this, void 0, void 0, function () {
188
+ var response;
189
+ return __generator(this, function (_a) {
190
+ switch (_a.label) {
191
+ case 0: return [4 /*yield*/, this.listPublicationsForArtifactRaw(requestParameters, initOverrides)];
192
+ case 1:
193
+ response = _a.sent();
194
+ return [4 /*yield*/, response.value()];
195
+ case 2: return [2 /*return*/, _a.sent()];
196
+ }
197
+ });
198
+ });
199
+ };
200
+ /**
201
+ * Publish a model artifact to an external platform
202
+ */
203
+ PublicationsApi.prototype.publishModelArtifactRaw = function (requestParameters, initOverrides) {
204
+ return __awaiter(this, void 0, void 0, function () {
205
+ var queryParameters, headerParameters, response;
206
+ return __generator(this, function (_a) {
207
+ switch (_a.label) {
208
+ case 0:
209
+ if (requestParameters.artifactId === null || requestParameters.artifactId === undefined) {
210
+ throw new runtime.RequiredError('artifactId', 'Required parameter requestParameters.artifactId was null or undefined when calling publishModelArtifact.');
211
+ }
212
+ if (requestParameters.publishArtifactRequest === null || requestParameters.publishArtifactRequest === undefined) {
213
+ throw new runtime.RequiredError('publishArtifactRequest', 'Required parameter requestParameters.publishArtifactRequest was null or undefined when calling publishModelArtifact.');
214
+ }
215
+ queryParameters = {};
216
+ headerParameters = {};
217
+ headerParameters['Content-Type'] = 'application/json';
218
+ return [4 /*yield*/, this.request({
219
+ path: "/models-api/artifacts/{artifact_id}/publications".replace("{" + "artifact_id" + "}", encodeURIComponent(String(requestParameters.artifactId))),
220
+ method: 'POST',
221
+ headers: headerParameters,
222
+ query: queryParameters,
223
+ body: models_1.PublishArtifactRequestToJSON(requestParameters.publishArtifactRequest),
224
+ }, initOverrides)];
225
+ case 1:
226
+ response = _a.sent();
227
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return models_1.PublishModelArtifactResponseFromJSON(jsonValue); })];
228
+ }
229
+ });
230
+ });
231
+ };
232
+ /**
233
+ * Publish a model artifact to an external platform
234
+ */
235
+ PublicationsApi.prototype.publishModelArtifact = function (requestParameters, initOverrides) {
236
+ return __awaiter(this, void 0, void 0, function () {
237
+ var response;
238
+ return __generator(this, function (_a) {
239
+ switch (_a.label) {
240
+ case 0: return [4 /*yield*/, this.publishModelArtifactRaw(requestParameters, initOverrides)];
241
+ case 1:
242
+ response = _a.sent();
243
+ return [4 /*yield*/, response.value()];
244
+ case 2: return [2 /*return*/, _a.sent()];
245
+ }
246
+ });
247
+ });
248
+ };
249
+ return PublicationsApi;
250
+ }(runtime.BaseAPI));
251
+ exports.PublicationsApi = PublicationsApi;
@@ -0,0 +1,5 @@
1
+ export * from './ArtifactsApi';
2
+ export * from './IngestionsApi';
3
+ export * from './MetadataApi';
4
+ export * from './PlatformsApi';
5
+ export * from './PublicationsApi';
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ function __export(m) {
3
+ for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
4
+ }
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ /* tslint:disable */
7
+ /* eslint-disable */
8
+ __export(require("./ArtifactsApi"));
9
+ __export(require("./IngestionsApi"));
10
+ __export(require("./MetadataApi"));
11
+ __export(require("./PlatformsApi"));
12
+ __export(require("./PublicationsApi"));
@@ -0,0 +1,3 @@
1
+ export * from './runtime';
2
+ export * from './apis';
3
+ export * from './models';
package/dist/index.js ADDED
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ function __export(m) {
3
+ for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
4
+ }
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ /* tslint:disable */
7
+ /* eslint-disable */
8
+ __export(require("./runtime"));
9
+ __export(require("./apis"));
10
+ __export(require("./models"));
@@ -0,0 +1,46 @@
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 { SystemRequirement } from './';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface Accelerator
17
+ */
18
+ export interface Accelerator {
19
+ /**
20
+ *
21
+ * @type {string}
22
+ * @memberof Accelerator
23
+ */
24
+ accelerator_type: string;
25
+ /**
26
+ *
27
+ * @type {number}
28
+ * @memberof Accelerator
29
+ */
30
+ cores?: number | null;
31
+ /**
32
+ *
33
+ * @type {number}
34
+ * @memberof Accelerator
35
+ */
36
+ memory_gb?: number | null;
37
+ /**
38
+ * Firmware and software
39
+ * @type {Array<SystemRequirement>}
40
+ * @memberof Accelerator
41
+ */
42
+ system_requirements: Array<SystemRequirement>;
43
+ }
44
+ export declare function AcceleratorFromJSON(json: any): Accelerator;
45
+ export declare function AcceleratorFromJSONTyped(json: any, ignoreDiscriminator: boolean): Accelerator;
46
+ export declare function AcceleratorToJSON(value?: Accelerator | null): any;
@@ -0,0 +1,48 @@
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
+ var runtime_1 = require("../runtime");
17
+ var _1 = require("./");
18
+ function AcceleratorFromJSON(json) {
19
+ return AcceleratorFromJSONTyped(json, false);
20
+ }
21
+ exports.AcceleratorFromJSON = AcceleratorFromJSON;
22
+ function AcceleratorFromJSONTyped(json, ignoreDiscriminator) {
23
+ if ((json === undefined) || (json === null)) {
24
+ return json;
25
+ }
26
+ return {
27
+ 'accelerator_type': json['accelerator_type'],
28
+ 'cores': !runtime_1.exists(json, 'cores') ? undefined : json['cores'],
29
+ 'memory_gb': !runtime_1.exists(json, 'memory_gb') ? undefined : json['memory_gb'],
30
+ 'system_requirements': (json['system_requirements'].map(_1.SystemRequirementFromJSON)),
31
+ };
32
+ }
33
+ exports.AcceleratorFromJSONTyped = AcceleratorFromJSONTyped;
34
+ function AcceleratorToJSON(value) {
35
+ if (value === undefined) {
36
+ return undefined;
37
+ }
38
+ if (value === null) {
39
+ return null;
40
+ }
41
+ return {
42
+ 'accelerator_type': value.accelerator_type,
43
+ 'cores': value.cores,
44
+ 'memory_gb': value.memory_gb,
45
+ 'system_requirements': (value.system_requirements.map(_1.SystemRequirementToJSON)),
46
+ };
47
+ }
48
+ exports.AcceleratorToJSON = AcceleratorToJSON;
@@ -0,0 +1,46 @@
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 { ArtifactType } from './';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface Artifact
17
+ */
18
+ export interface Artifact {
19
+ /**
20
+ *
21
+ * @type {ArtifactType}
22
+ * @memberof Artifact
23
+ */
24
+ artifact_type: ArtifactType;
25
+ /**
26
+ *
27
+ * @type {string}
28
+ * @memberof Artifact
29
+ */
30
+ created_at: string;
31
+ /**
32
+ *
33
+ * @type {string}
34
+ * @memberof Artifact
35
+ */
36
+ id: string;
37
+ /**
38
+ *
39
+ * @type {string}
40
+ * @memberof Artifact
41
+ */
42
+ last_modified: string;
43
+ }
44
+ export declare function ArtifactFromJSON(json: any): Artifact;
45
+ export declare function ArtifactFromJSONTyped(json: any, ignoreDiscriminator: boolean): Artifact;
46
+ export declare function ArtifactToJSON(value?: Artifact | null): any;
@@ -0,0 +1,47 @@
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
+ var _1 = require("./");
17
+ function ArtifactFromJSON(json) {
18
+ return ArtifactFromJSONTyped(json, false);
19
+ }
20
+ exports.ArtifactFromJSON = ArtifactFromJSON;
21
+ function ArtifactFromJSONTyped(json, ignoreDiscriminator) {
22
+ if ((json === undefined) || (json === null)) {
23
+ return json;
24
+ }
25
+ return {
26
+ 'artifact_type': _1.ArtifactTypeFromJSON(json['artifact_type']),
27
+ 'created_at': json['created_at'],
28
+ 'id': json['id'],
29
+ 'last_modified': json['last_modified'],
30
+ };
31
+ }
32
+ exports.ArtifactFromJSONTyped = ArtifactFromJSONTyped;
33
+ function ArtifactToJSON(value) {
34
+ if (value === undefined) {
35
+ return undefined;
36
+ }
37
+ if (value === null) {
38
+ return null;
39
+ }
40
+ return {
41
+ 'artifact_type': _1.ArtifactTypeToJSON(value.artifact_type),
42
+ 'created_at': value.created_at,
43
+ 'id': value.id,
44
+ 'last_modified': value.last_modified,
45
+ };
46
+ }
47
+ exports.ArtifactToJSON = ArtifactToJSON;
@@ -0,0 +1,70 @@
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 { ArtifactIngestionStatus } from './';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface ArtifactIngestion
17
+ */
18
+ export interface ArtifactIngestion {
19
+ /**
20
+ *
21
+ * @type {string}
22
+ * @memberof ArtifactIngestion
23
+ */
24
+ artifact_id: string;
25
+ /**
26
+ *
27
+ * @type {string}
28
+ * @memberof ArtifactIngestion
29
+ */
30
+ created_at: string;
31
+ /**
32
+ *
33
+ * @type {string}
34
+ * @memberof ArtifactIngestion
35
+ */
36
+ id: string;
37
+ /**
38
+ *
39
+ * @type {string}
40
+ * @memberof ArtifactIngestion
41
+ */
42
+ last_message?: string | null;
43
+ /**
44
+ *
45
+ * @type {string}
46
+ * @memberof ArtifactIngestion
47
+ */
48
+ last_modified: string;
49
+ /**
50
+ *
51
+ * @type {string}
52
+ * @memberof ArtifactIngestion
53
+ */
54
+ platform: string;
55
+ /**
56
+ *
57
+ * @type {ArtifactIngestionStatus}
58
+ * @memberof ArtifactIngestion
59
+ */
60
+ status: ArtifactIngestionStatus;
61
+ /**
62
+ *
63
+ * @type {string}
64
+ * @memberof ArtifactIngestion
65
+ */
66
+ webhook_url?: string | null;
67
+ }
68
+ export declare function ArtifactIngestionFromJSON(json: any): ArtifactIngestion;
69
+ export declare function ArtifactIngestionFromJSONTyped(json: any, ignoreDiscriminator: boolean): ArtifactIngestion;
70
+ export declare function ArtifactIngestionToJSON(value?: ArtifactIngestion | null): any;
@@ -0,0 +1,56 @@
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
+ var runtime_1 = require("../runtime");
17
+ var _1 = require("./");
18
+ function ArtifactIngestionFromJSON(json) {
19
+ return ArtifactIngestionFromJSONTyped(json, false);
20
+ }
21
+ exports.ArtifactIngestionFromJSON = ArtifactIngestionFromJSON;
22
+ function ArtifactIngestionFromJSONTyped(json, ignoreDiscriminator) {
23
+ if ((json === undefined) || (json === null)) {
24
+ return json;
25
+ }
26
+ return {
27
+ 'artifact_id': json['artifact_id'],
28
+ 'created_at': json['created_at'],
29
+ 'id': json['id'],
30
+ 'last_message': !runtime_1.exists(json, 'last_message') ? undefined : json['last_message'],
31
+ 'last_modified': json['last_modified'],
32
+ 'platform': json['platform'],
33
+ 'status': _1.ArtifactIngestionStatusFromJSON(json['status']),
34
+ 'webhook_url': !runtime_1.exists(json, 'webhook_url') ? undefined : json['webhook_url'],
35
+ };
36
+ }
37
+ exports.ArtifactIngestionFromJSONTyped = ArtifactIngestionFromJSONTyped;
38
+ function ArtifactIngestionToJSON(value) {
39
+ if (value === undefined) {
40
+ return undefined;
41
+ }
42
+ if (value === null) {
43
+ return null;
44
+ }
45
+ return {
46
+ 'artifact_id': value.artifact_id,
47
+ 'created_at': value.created_at,
48
+ 'id': value.id,
49
+ 'last_message': value.last_message,
50
+ 'last_modified': value.last_modified,
51
+ 'platform': value.platform,
52
+ 'status': _1.ArtifactIngestionStatusToJSON(value.status),
53
+ 'webhook_url': value.webhook_url,
54
+ };
55
+ }
56
+ exports.ArtifactIngestionToJSON = ArtifactIngestionToJSON;
@@ -0,0 +1,30 @@
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
+ * @enum {string}
16
+ */
17
+ export declare enum ArtifactIngestionStatus {
18
+ Submitted = "Submitted",
19
+ Resubmitted = "Resubmitted",
20
+ Pending = "Pending",
21
+ Downloading = "Downloading",
22
+ Downloaded = "Downloaded",
23
+ Archiving = "Archiving",
24
+ Archived = "Archived",
25
+ Finished = "Finished",
26
+ Failed = "Failed"
27
+ }
28
+ export declare function ArtifactIngestionStatusFromJSON(json: any): ArtifactIngestionStatus;
29
+ export declare function ArtifactIngestionStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): ArtifactIngestionStatus;
30
+ export declare function ArtifactIngestionStatusToJSON(value?: ArtifactIngestionStatus | null): any;
@@ -0,0 +1,44 @@
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
+ /**
17
+ *
18
+ * @export
19
+ * @enum {string}
20
+ */
21
+ var ArtifactIngestionStatus;
22
+ (function (ArtifactIngestionStatus) {
23
+ ArtifactIngestionStatus["Submitted"] = "Submitted";
24
+ ArtifactIngestionStatus["Resubmitted"] = "Resubmitted";
25
+ ArtifactIngestionStatus["Pending"] = "Pending";
26
+ ArtifactIngestionStatus["Downloading"] = "Downloading";
27
+ ArtifactIngestionStatus["Downloaded"] = "Downloaded";
28
+ ArtifactIngestionStatus["Archiving"] = "Archiving";
29
+ ArtifactIngestionStatus["Archived"] = "Archived";
30
+ ArtifactIngestionStatus["Finished"] = "Finished";
31
+ ArtifactIngestionStatus["Failed"] = "Failed";
32
+ })(ArtifactIngestionStatus = exports.ArtifactIngestionStatus || (exports.ArtifactIngestionStatus = {}));
33
+ function ArtifactIngestionStatusFromJSON(json) {
34
+ return ArtifactIngestionStatusFromJSONTyped(json, false);
35
+ }
36
+ exports.ArtifactIngestionStatusFromJSON = ArtifactIngestionStatusFromJSON;
37
+ function ArtifactIngestionStatusFromJSONTyped(json, ignoreDiscriminator) {
38
+ return json;
39
+ }
40
+ exports.ArtifactIngestionStatusFromJSONTyped = ArtifactIngestionStatusFromJSONTyped;
41
+ function ArtifactIngestionStatusToJSON(value) {
42
+ return value;
43
+ }
44
+ exports.ArtifactIngestionStatusToJSON = ArtifactIngestionStatusToJSON;