@mlhub/deployments-ts-sdk 0.8.0 → 0.9.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 +1 -0
- package/README.md +2 -2
- package/dist/apis/DeploymentsApi.d.ts +3 -1
- package/dist/apis/DeploymentsApi.js +9 -6
- package/dist/models/DeployModelWithStrategyBody.d.ts +19 -0
- package/dist/models/DeployModelWithStrategyBody.js +8 -0
- package/dist/models/ModelDeployment.d.ts +12 -0
- package/dist/models/ModelDeployment.js +4 -0
- package/dist/models/Scope.d.ts +23 -0
- package/dist/models/Scope.js +38 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/package.json +1 -1
- package/src/apis/DeploymentsApi.ts +14 -8
- package/src/models/DeployModelWithStrategyBody.ts +31 -0
- package/src/models/ModelDeployment.ts +16 -0
- package/src/models/Scope.ts +36 -0
- package/src/models/index.ts +1 -0
package/.openapi-generator/FILES
CHANGED
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @mlhub/deployments-ts-sdk@0.
|
|
1
|
+
## @mlhub/deployments-ts-sdk@0.9.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/deployments-ts-sdk@0.
|
|
39
|
+
npm install @mlhub/deployments-ts-sdk@0.9.0 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -14,10 +14,12 @@ import { DeployModelWithStrategyBody, ModelDeploymentResponse, Platform } from '
|
|
|
14
14
|
export interface DeployModelWithStrategyRequest {
|
|
15
15
|
platform: Platform;
|
|
16
16
|
strategyName: string;
|
|
17
|
-
|
|
17
|
+
name: string;
|
|
18
|
+
description: string | null;
|
|
18
19
|
modelName: string;
|
|
19
20
|
modelAuthor: string;
|
|
20
21
|
params: any;
|
|
22
|
+
scope: DeployModelWithStrategyScopeEnum;
|
|
21
23
|
deployModelWithStrategyBody: DeployModelWithStrategyBody;
|
|
22
24
|
}
|
|
23
25
|
export interface StartModelDeploymentRequest {
|
|
@@ -90,8 +90,11 @@ var DeploymentsApi = /** @class */ (function (_super) {
|
|
|
90
90
|
if (requestParameters.strategyName === null || requestParameters.strategyName === undefined) {
|
|
91
91
|
throw new runtime.RequiredError('strategyName', 'Required parameter requestParameters.strategyName was null or undefined when calling deployModelWithStrategy.');
|
|
92
92
|
}
|
|
93
|
-
if (requestParameters.
|
|
94
|
-
throw new runtime.RequiredError('
|
|
93
|
+
if (requestParameters.name === null || requestParameters.name === undefined) {
|
|
94
|
+
throw new runtime.RequiredError('name', 'Required parameter requestParameters.name was null or undefined when calling deployModelWithStrategy.');
|
|
95
|
+
}
|
|
96
|
+
if (requestParameters.description === null || requestParameters.description === undefined) {
|
|
97
|
+
throw new runtime.RequiredError('description', 'Required parameter requestParameters.description was null or undefined when calling deployModelWithStrategy.');
|
|
95
98
|
}
|
|
96
99
|
if (requestParameters.modelName === null || requestParameters.modelName === undefined) {
|
|
97
100
|
throw new runtime.RequiredError('modelName', 'Required parameter requestParameters.modelName was null or undefined when calling deployModelWithStrategy.');
|
|
@@ -102,17 +105,17 @@ var DeploymentsApi = /** @class */ (function (_super) {
|
|
|
102
105
|
if (requestParameters.params === null || requestParameters.params === undefined) {
|
|
103
106
|
throw new runtime.RequiredError('params', 'Required parameter requestParameters.params was null or undefined when calling deployModelWithStrategy.');
|
|
104
107
|
}
|
|
108
|
+
if (requestParameters.scope === null || requestParameters.scope === undefined) {
|
|
109
|
+
throw new runtime.RequiredError('scope', 'Required parameter requestParameters.scope was null or undefined when calling deployModelWithStrategy.');
|
|
110
|
+
}
|
|
105
111
|
if (requestParameters.deployModelWithStrategyBody === null || requestParameters.deployModelWithStrategyBody === undefined) {
|
|
106
112
|
throw new runtime.RequiredError('deployModelWithStrategyBody', 'Required parameter requestParameters.deployModelWithStrategyBody was null or undefined when calling deployModelWithStrategy.');
|
|
107
113
|
}
|
|
108
114
|
queryParameters = {};
|
|
109
|
-
if (requestParameters.scope !== undefined) {
|
|
110
|
-
queryParameters['scope'] = requestParameters.scope;
|
|
111
|
-
}
|
|
112
115
|
headerParameters = {};
|
|
113
116
|
headerParameters['Content-Type'] = 'application/json';
|
|
114
117
|
return [4 /*yield*/, this.request({
|
|
115
|
-
path: "/deployments-api/platforms/{platform}/strategies/{strategy_name}".replace("{".concat("platform", "}"), encodeURIComponent(String(requestParameters.platform))).replace("{".concat("strategy_name", "}"), encodeURIComponent(String(requestParameters.strategyName))).replace("{".concat("model_name", "}"), encodeURIComponent(String(requestParameters.modelName))).replace("{".concat("model_author", "}"), encodeURIComponent(String(requestParameters.modelAuthor))).replace("{".concat("params", "}"), encodeURIComponent(String(requestParameters.params))),
|
|
118
|
+
path: "/deployments-api/platforms/{platform}/strategies/{strategy_name}".replace("{".concat("platform", "}"), encodeURIComponent(String(requestParameters.platform))).replace("{".concat("strategy_name", "}"), encodeURIComponent(String(requestParameters.strategyName))).replace("{".concat("name", "}"), encodeURIComponent(String(requestParameters.name))).replace("{".concat("description", "}"), encodeURIComponent(String(requestParameters.description))).replace("{".concat("model_name", "}"), encodeURIComponent(String(requestParameters.modelName))).replace("{".concat("model_author", "}"), encodeURIComponent(String(requestParameters.modelAuthor))).replace("{".concat("params", "}"), encodeURIComponent(String(requestParameters.params))).replace("{".concat("scope", "}"), encodeURIComponent(String(requestParameters.scope))),
|
|
116
119
|
method: 'POST',
|
|
117
120
|
headers: headerParameters,
|
|
118
121
|
query: queryParameters,
|
|
@@ -9,12 +9,19 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import { Scope } from './';
|
|
12
13
|
/**
|
|
13
14
|
*
|
|
14
15
|
* @export
|
|
15
16
|
* @interface DeployModelWithStrategyBody
|
|
16
17
|
*/
|
|
17
18
|
export interface DeployModelWithStrategyBody {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof DeployModelWithStrategyBody
|
|
23
|
+
*/
|
|
24
|
+
description?: string | null;
|
|
18
25
|
/**
|
|
19
26
|
*
|
|
20
27
|
* @type {string}
|
|
@@ -27,12 +34,24 @@ export interface DeployModelWithStrategyBody {
|
|
|
27
34
|
* @memberof DeployModelWithStrategyBody
|
|
28
35
|
*/
|
|
29
36
|
model_name: string;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof DeployModelWithStrategyBody
|
|
41
|
+
*/
|
|
42
|
+
name: string;
|
|
30
43
|
/**
|
|
31
44
|
*
|
|
32
45
|
* @type {any}
|
|
33
46
|
* @memberof DeployModelWithStrategyBody
|
|
34
47
|
*/
|
|
35
48
|
params: any | null;
|
|
49
|
+
/**
|
|
50
|
+
* Selector for global vs tenant-scoped models
|
|
51
|
+
* @type {Scope}
|
|
52
|
+
* @memberof DeployModelWithStrategyBody
|
|
53
|
+
*/
|
|
54
|
+
scope?: Scope | null;
|
|
36
55
|
}
|
|
37
56
|
export declare function DeployModelWithStrategyBodyFromJSON(json: any): DeployModelWithStrategyBody;
|
|
38
57
|
export declare function DeployModelWithStrategyBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeployModelWithStrategyBody;
|
|
@@ -16,6 +16,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
16
16
|
exports.DeployModelWithStrategyBodyFromJSON = DeployModelWithStrategyBodyFromJSON;
|
|
17
17
|
exports.DeployModelWithStrategyBodyFromJSONTyped = DeployModelWithStrategyBodyFromJSONTyped;
|
|
18
18
|
exports.DeployModelWithStrategyBodyToJSON = DeployModelWithStrategyBodyToJSON;
|
|
19
|
+
var runtime_1 = require("../runtime");
|
|
20
|
+
var _1 = require("./");
|
|
19
21
|
function DeployModelWithStrategyBodyFromJSON(json) {
|
|
20
22
|
return DeployModelWithStrategyBodyFromJSONTyped(json, false);
|
|
21
23
|
}
|
|
@@ -24,9 +26,12 @@ function DeployModelWithStrategyBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
24
26
|
return json;
|
|
25
27
|
}
|
|
26
28
|
return {
|
|
29
|
+
'description': !(0, runtime_1.exists)(json, 'description') ? undefined : json['description'],
|
|
27
30
|
'model_author': json['model_author'],
|
|
28
31
|
'model_name': json['model_name'],
|
|
32
|
+
'name': json['name'],
|
|
29
33
|
'params': json['params'],
|
|
34
|
+
'scope': !(0, runtime_1.exists)(json, 'scope') ? undefined : (0, _1.ScopeFromJSON)(json['scope']),
|
|
30
35
|
};
|
|
31
36
|
}
|
|
32
37
|
function DeployModelWithStrategyBodyToJSON(value) {
|
|
@@ -37,8 +42,11 @@ function DeployModelWithStrategyBodyToJSON(value) {
|
|
|
37
42
|
return null;
|
|
38
43
|
}
|
|
39
44
|
return {
|
|
45
|
+
'description': value.description,
|
|
40
46
|
'model_author': value.model_author,
|
|
41
47
|
'model_name': value.model_name,
|
|
48
|
+
'name': value.name,
|
|
42
49
|
'params': value.params,
|
|
50
|
+
'scope': (0, _1.ScopeToJSON)(value.scope),
|
|
43
51
|
};
|
|
44
52
|
}
|
|
@@ -34,6 +34,12 @@ export interface ModelDeployment {
|
|
|
34
34
|
* @memberof ModelDeployment
|
|
35
35
|
*/
|
|
36
36
|
deployment_strategy?: string | null;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof ModelDeployment
|
|
41
|
+
*/
|
|
42
|
+
description?: string | null;
|
|
37
43
|
/**
|
|
38
44
|
*
|
|
39
45
|
* @type {DesiredState}
|
|
@@ -84,6 +90,12 @@ export interface ModelDeployment {
|
|
|
84
90
|
* @memberof ModelDeployment
|
|
85
91
|
*/
|
|
86
92
|
model: ModelReference;
|
|
93
|
+
/**
|
|
94
|
+
*
|
|
95
|
+
* @type {string}
|
|
96
|
+
* @memberof ModelDeployment
|
|
97
|
+
*/
|
|
98
|
+
name: string;
|
|
87
99
|
/**
|
|
88
100
|
*
|
|
89
101
|
* @type {string}
|
|
@@ -29,6 +29,7 @@ function ModelDeploymentFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
29
29
|
'created_at': json['created_at'],
|
|
30
30
|
'deployment_interface': !(0, runtime_1.exists)(json, 'deployment_interface') ? undefined : (0, _1.ModelDeploymentInterfaceFromJSON)(json['deployment_interface']),
|
|
31
31
|
'deployment_strategy': !(0, runtime_1.exists)(json, 'deployment_strategy') ? undefined : json['deployment_strategy'],
|
|
32
|
+
'description': !(0, runtime_1.exists)(json, 'description') ? undefined : json['description'],
|
|
32
33
|
'desired_state': (0, _1.DesiredStateFromJSON)(json['desired_state']),
|
|
33
34
|
'id': json['id'],
|
|
34
35
|
'last_desired_state_change': json['last_desired_state_change'],
|
|
@@ -37,6 +38,7 @@ function ModelDeploymentFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
37
38
|
'last_state_change': json['last_state_change'],
|
|
38
39
|
'metadata': !(0, runtime_1.exists)(json, 'metadata') ? undefined : json['metadata'],
|
|
39
40
|
'model': (0, _1.ModelReferenceFromJSON)(json['model']),
|
|
41
|
+
'name': json['name'],
|
|
40
42
|
'owner': json['owner'],
|
|
41
43
|
'platform': (0, _1.PlatformFromJSON)(json['platform']),
|
|
42
44
|
'replicas': !(0, runtime_1.exists)(json, 'replicas') ? undefined : (0, _1.ReplicaGroupFromJSON)(json['replicas']),
|
|
@@ -56,6 +58,7 @@ function ModelDeploymentToJSON(value) {
|
|
|
56
58
|
'created_at': value.created_at,
|
|
57
59
|
'deployment_interface': (0, _1.ModelDeploymentInterfaceToJSON)(value.deployment_interface),
|
|
58
60
|
'deployment_strategy': value.deployment_strategy,
|
|
61
|
+
'description': value.description,
|
|
59
62
|
'desired_state': (0, _1.DesiredStateToJSON)(value.desired_state),
|
|
60
63
|
'id': value.id,
|
|
61
64
|
'last_desired_state_change': value.last_desired_state_change,
|
|
@@ -64,6 +67,7 @@ function ModelDeploymentToJSON(value) {
|
|
|
64
67
|
'last_state_change': value.last_state_change,
|
|
65
68
|
'metadata': value.metadata,
|
|
66
69
|
'model': (0, _1.ModelReferenceToJSON)(value.model),
|
|
70
|
+
'name': value.name,
|
|
67
71
|
'owner': value.owner,
|
|
68
72
|
'platform': (0, _1.PlatformToJSON)(value.platform),
|
|
69
73
|
'replicas': (0, _1.ReplicaGroupToJSON)(value.replicas),
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MLHub Deployments 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 Scope {
|
|
18
|
+
Tenant = "tenant",
|
|
19
|
+
Global = "global"
|
|
20
|
+
}
|
|
21
|
+
export declare function ScopeFromJSON(json: any): Scope;
|
|
22
|
+
export declare function ScopeFromJSONTyped(json: any, ignoreDiscriminator: boolean): Scope;
|
|
23
|
+
export declare function ScopeToJSON(value?: Scope | null): any;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* MLHub Deployments 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.Scope = void 0;
|
|
17
|
+
exports.ScopeFromJSON = ScopeFromJSON;
|
|
18
|
+
exports.ScopeFromJSONTyped = ScopeFromJSONTyped;
|
|
19
|
+
exports.ScopeToJSON = ScopeToJSON;
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
* @export
|
|
23
|
+
* @enum {string}
|
|
24
|
+
*/
|
|
25
|
+
var Scope;
|
|
26
|
+
(function (Scope) {
|
|
27
|
+
Scope["Tenant"] = "tenant";
|
|
28
|
+
Scope["Global"] = "global";
|
|
29
|
+
})(Scope || (exports.Scope = Scope = {}));
|
|
30
|
+
function ScopeFromJSON(json) {
|
|
31
|
+
return ScopeFromJSONTyped(json, false);
|
|
32
|
+
}
|
|
33
|
+
function ScopeFromJSONTyped(json, ignoreDiscriminator) {
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
function ScopeToJSON(value) {
|
|
37
|
+
return value;
|
|
38
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export * from './Platform';
|
|
|
16
16
|
export * from './ReplicaGroup';
|
|
17
17
|
export * from './ResourceRequirements';
|
|
18
18
|
export * from './RestApi';
|
|
19
|
+
export * from './Scope';
|
|
19
20
|
export * from './ServerErrorResponse';
|
|
20
21
|
export * from './State';
|
|
21
22
|
export * from './Strategy';
|
package/dist/models/index.js
CHANGED
|
@@ -34,6 +34,7 @@ __exportStar(require("./Platform"), exports);
|
|
|
34
34
|
__exportStar(require("./ReplicaGroup"), exports);
|
|
35
35
|
__exportStar(require("./ResourceRequirements"), exports);
|
|
36
36
|
__exportStar(require("./RestApi"), exports);
|
|
37
|
+
__exportStar(require("./Scope"), exports);
|
|
37
38
|
__exportStar(require("./ServerErrorResponse"), exports);
|
|
38
39
|
__exportStar(require("./State"), exports);
|
|
39
40
|
__exportStar(require("./Strategy"), exports);
|
package/package.json
CHANGED
|
@@ -38,10 +38,12 @@ import {
|
|
|
38
38
|
export interface DeployModelWithStrategyRequest {
|
|
39
39
|
platform: Platform;
|
|
40
40
|
strategyName: string;
|
|
41
|
-
|
|
41
|
+
name: string;
|
|
42
|
+
description: string | null;
|
|
42
43
|
modelName: string;
|
|
43
44
|
modelAuthor: string;
|
|
44
45
|
params: any;
|
|
46
|
+
scope: DeployModelWithStrategyScopeEnum;
|
|
45
47
|
deployModelWithStrategyBody: DeployModelWithStrategyBody;
|
|
46
48
|
}
|
|
47
49
|
|
|
@@ -74,8 +76,12 @@ export class DeploymentsApi extends runtime.BaseAPI {
|
|
|
74
76
|
throw new runtime.RequiredError('strategyName','Required parameter requestParameters.strategyName was null or undefined when calling deployModelWithStrategy.');
|
|
75
77
|
}
|
|
76
78
|
|
|
77
|
-
if (requestParameters.
|
|
78
|
-
throw new runtime.RequiredError('
|
|
79
|
+
if (requestParameters.name === null || requestParameters.name === undefined) {
|
|
80
|
+
throw new runtime.RequiredError('name','Required parameter requestParameters.name was null or undefined when calling deployModelWithStrategy.');
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
if (requestParameters.description === null || requestParameters.description === undefined) {
|
|
84
|
+
throw new runtime.RequiredError('description','Required parameter requestParameters.description was null or undefined when calling deployModelWithStrategy.');
|
|
79
85
|
}
|
|
80
86
|
|
|
81
87
|
if (requestParameters.modelName === null || requestParameters.modelName === undefined) {
|
|
@@ -90,22 +96,22 @@ export class DeploymentsApi extends runtime.BaseAPI {
|
|
|
90
96
|
throw new runtime.RequiredError('params','Required parameter requestParameters.params was null or undefined when calling deployModelWithStrategy.');
|
|
91
97
|
}
|
|
92
98
|
|
|
99
|
+
if (requestParameters.scope === null || requestParameters.scope === undefined) {
|
|
100
|
+
throw new runtime.RequiredError('scope','Required parameter requestParameters.scope was null or undefined when calling deployModelWithStrategy.');
|
|
101
|
+
}
|
|
102
|
+
|
|
93
103
|
if (requestParameters.deployModelWithStrategyBody === null || requestParameters.deployModelWithStrategyBody === undefined) {
|
|
94
104
|
throw new runtime.RequiredError('deployModelWithStrategyBody','Required parameter requestParameters.deployModelWithStrategyBody was null or undefined when calling deployModelWithStrategy.');
|
|
95
105
|
}
|
|
96
106
|
|
|
97
107
|
const queryParameters: any = {};
|
|
98
108
|
|
|
99
|
-
if (requestParameters.scope !== undefined) {
|
|
100
|
-
queryParameters['scope'] = requestParameters.scope;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
109
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
104
110
|
|
|
105
111
|
headerParameters['Content-Type'] = 'application/json';
|
|
106
112
|
|
|
107
113
|
const response = await this.request({
|
|
108
|
-
path: `/deployments-api/platforms/{platform}/strategies/{strategy_name}`.replace(`{${"platform"}}`, encodeURIComponent(String(requestParameters.platform))).replace(`{${"strategy_name"}}`, encodeURIComponent(String(requestParameters.strategyName))).replace(`{${"model_name"}}`, encodeURIComponent(String(requestParameters.modelName))).replace(`{${"model_author"}}`, encodeURIComponent(String(requestParameters.modelAuthor))).replace(`{${"params"}}`, encodeURIComponent(String(requestParameters.params))),
|
|
114
|
+
path: `/deployments-api/platforms/{platform}/strategies/{strategy_name}`.replace(`{${"platform"}}`, encodeURIComponent(String(requestParameters.platform))).replace(`{${"strategy_name"}}`, encodeURIComponent(String(requestParameters.strategyName))).replace(`{${"name"}}`, encodeURIComponent(String(requestParameters.name))).replace(`{${"description"}}`, encodeURIComponent(String(requestParameters.description))).replace(`{${"model_name"}}`, encodeURIComponent(String(requestParameters.modelName))).replace(`{${"model_author"}}`, encodeURIComponent(String(requestParameters.modelAuthor))).replace(`{${"params"}}`, encodeURIComponent(String(requestParameters.params))).replace(`{${"scope"}}`, encodeURIComponent(String(requestParameters.scope))),
|
|
109
115
|
method: 'POST',
|
|
110
116
|
headers: headerParameters,
|
|
111
117
|
query: queryParameters,
|
|
@@ -13,12 +13,25 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { exists, mapValues } from '../runtime';
|
|
16
|
+
import {
|
|
17
|
+
Scope,
|
|
18
|
+
ScopeFromJSON,
|
|
19
|
+
ScopeFromJSONTyped,
|
|
20
|
+
ScopeToJSON,
|
|
21
|
+
} from './';
|
|
22
|
+
|
|
16
23
|
/**
|
|
17
24
|
*
|
|
18
25
|
* @export
|
|
19
26
|
* @interface DeployModelWithStrategyBody
|
|
20
27
|
*/
|
|
21
28
|
export interface DeployModelWithStrategyBody {
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {string}
|
|
32
|
+
* @memberof DeployModelWithStrategyBody
|
|
33
|
+
*/
|
|
34
|
+
description?: string | null;
|
|
22
35
|
/**
|
|
23
36
|
*
|
|
24
37
|
* @type {string}
|
|
@@ -31,12 +44,24 @@ export interface DeployModelWithStrategyBody {
|
|
|
31
44
|
* @memberof DeployModelWithStrategyBody
|
|
32
45
|
*/
|
|
33
46
|
model_name: string;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @type {string}
|
|
50
|
+
* @memberof DeployModelWithStrategyBody
|
|
51
|
+
*/
|
|
52
|
+
name: string;
|
|
34
53
|
/**
|
|
35
54
|
*
|
|
36
55
|
* @type {any}
|
|
37
56
|
* @memberof DeployModelWithStrategyBody
|
|
38
57
|
*/
|
|
39
58
|
params: any | null;
|
|
59
|
+
/**
|
|
60
|
+
* Selector for global vs tenant-scoped models
|
|
61
|
+
* @type {Scope}
|
|
62
|
+
* @memberof DeployModelWithStrategyBody
|
|
63
|
+
*/
|
|
64
|
+
scope?: Scope | null;
|
|
40
65
|
}
|
|
41
66
|
|
|
42
67
|
export function DeployModelWithStrategyBodyFromJSON(json: any): DeployModelWithStrategyBody {
|
|
@@ -49,9 +74,12 @@ export function DeployModelWithStrategyBodyFromJSONTyped(json: any, ignoreDiscri
|
|
|
49
74
|
}
|
|
50
75
|
return {
|
|
51
76
|
|
|
77
|
+
'description': !exists(json, 'description') ? undefined : json['description'],
|
|
52
78
|
'model_author': json['model_author'],
|
|
53
79
|
'model_name': json['model_name'],
|
|
80
|
+
'name': json['name'],
|
|
54
81
|
'params': json['params'],
|
|
82
|
+
'scope': !exists(json, 'scope') ? undefined : ScopeFromJSON(json['scope']),
|
|
55
83
|
};
|
|
56
84
|
}
|
|
57
85
|
|
|
@@ -64,9 +92,12 @@ export function DeployModelWithStrategyBodyToJSON(value?: DeployModelWithStrateg
|
|
|
64
92
|
}
|
|
65
93
|
return {
|
|
66
94
|
|
|
95
|
+
'description': value.description,
|
|
67
96
|
'model_author': value.model_author,
|
|
68
97
|
'model_name': value.model_name,
|
|
98
|
+
'name': value.name,
|
|
69
99
|
'params': value.params,
|
|
100
|
+
'scope': ScopeToJSON(value.scope),
|
|
70
101
|
};
|
|
71
102
|
}
|
|
72
103
|
|
|
@@ -68,6 +68,12 @@ export interface ModelDeployment {
|
|
|
68
68
|
* @memberof ModelDeployment
|
|
69
69
|
*/
|
|
70
70
|
deployment_strategy?: string | null;
|
|
71
|
+
/**
|
|
72
|
+
*
|
|
73
|
+
* @type {string}
|
|
74
|
+
* @memberof ModelDeployment
|
|
75
|
+
*/
|
|
76
|
+
description?: string | null;
|
|
71
77
|
/**
|
|
72
78
|
*
|
|
73
79
|
* @type {DesiredState}
|
|
@@ -116,6 +122,12 @@ export interface ModelDeployment {
|
|
|
116
122
|
* @memberof ModelDeployment
|
|
117
123
|
*/
|
|
118
124
|
model: ModelReference;
|
|
125
|
+
/**
|
|
126
|
+
*
|
|
127
|
+
* @type {string}
|
|
128
|
+
* @memberof ModelDeployment
|
|
129
|
+
*/
|
|
130
|
+
name: string;
|
|
119
131
|
/**
|
|
120
132
|
*
|
|
121
133
|
* @type {string}
|
|
@@ -167,6 +179,7 @@ export function ModelDeploymentFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
167
179
|
'created_at': json['created_at'],
|
|
168
180
|
'deployment_interface': !exists(json, 'deployment_interface') ? undefined : ModelDeploymentInterfaceFromJSON(json['deployment_interface']),
|
|
169
181
|
'deployment_strategy': !exists(json, 'deployment_strategy') ? undefined : json['deployment_strategy'],
|
|
182
|
+
'description': !exists(json, 'description') ? undefined : json['description'],
|
|
170
183
|
'desired_state': DesiredStateFromJSON(json['desired_state']),
|
|
171
184
|
'id': json['id'],
|
|
172
185
|
'last_desired_state_change': json['last_desired_state_change'],
|
|
@@ -175,6 +188,7 @@ export function ModelDeploymentFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
175
188
|
'last_state_change': json['last_state_change'],
|
|
176
189
|
'metadata': !exists(json, 'metadata') ? undefined : json['metadata'],
|
|
177
190
|
'model': ModelReferenceFromJSON(json['model']),
|
|
191
|
+
'name': json['name'],
|
|
178
192
|
'owner': json['owner'],
|
|
179
193
|
'platform': PlatformFromJSON(json['platform']),
|
|
180
194
|
'replicas': !exists(json, 'replicas') ? undefined : ReplicaGroupFromJSON(json['replicas']),
|
|
@@ -196,6 +210,7 @@ export function ModelDeploymentToJSON(value?: ModelDeployment | null): any {
|
|
|
196
210
|
'created_at': value.created_at,
|
|
197
211
|
'deployment_interface': ModelDeploymentInterfaceToJSON(value.deployment_interface),
|
|
198
212
|
'deployment_strategy': value.deployment_strategy,
|
|
213
|
+
'description': value.description,
|
|
199
214
|
'desired_state': DesiredStateToJSON(value.desired_state),
|
|
200
215
|
'id': value.id,
|
|
201
216
|
'last_desired_state_change': value.last_desired_state_change,
|
|
@@ -204,6 +219,7 @@ export function ModelDeploymentToJSON(value?: ModelDeployment | null): any {
|
|
|
204
219
|
'last_state_change': value.last_state_change,
|
|
205
220
|
'metadata': value.metadata,
|
|
206
221
|
'model': ModelReferenceToJSON(value.model),
|
|
222
|
+
'name': value.name,
|
|
207
223
|
'owner': value.owner,
|
|
208
224
|
'platform': PlatformToJSON(value.platform),
|
|
209
225
|
'replicas': ReplicaGroupToJSON(value.replicas),
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* MLHub Deployments API
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
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
|
+
*
|
|
17
|
+
* @export
|
|
18
|
+
* @enum {string}
|
|
19
|
+
*/
|
|
20
|
+
export enum Scope {
|
|
21
|
+
Tenant = 'tenant',
|
|
22
|
+
Global = 'global'
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export function ScopeFromJSON(json: any): Scope {
|
|
26
|
+
return ScopeFromJSONTyped(json, false);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function ScopeFromJSONTyped(json: any, ignoreDiscriminator: boolean): Scope {
|
|
30
|
+
return json as Scope;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function ScopeToJSON(value?: Scope | null): any {
|
|
34
|
+
return value as any;
|
|
35
|
+
}
|
|
36
|
+
|
package/src/models/index.ts
CHANGED
|
@@ -18,6 +18,7 @@ export * from './Platform';
|
|
|
18
18
|
export * from './ReplicaGroup';
|
|
19
19
|
export * from './ResourceRequirements';
|
|
20
20
|
export * from './RestApi';
|
|
21
|
+
export * from './Scope';
|
|
21
22
|
export * from './ServerErrorResponse';
|
|
22
23
|
export * from './State';
|
|
23
24
|
export * from './Strategy';
|