@mlhub/deployments-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/README.md +2 -2
- package/dist/apis/DeploymentsApi.d.ts +12 -0
- package/dist/apis/DeploymentsApi.js +26 -2
- package/package.json +1 -1
- package/src/apis/DeploymentsApi.ts +34 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @mlhub/deployments-ts-sdk@0.
|
|
1
|
+
## @mlhub/deployments-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/deployments-ts-sdk@0.
|
|
39
|
+
npm install @mlhub/deployments-ts-sdk@0.3.0 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -14,6 +14,10 @@ import { DeployModelWithStrategyBody, ModelDeploymentResponse, Platform } from '
|
|
|
14
14
|
export interface DeployModelWithStrategyRequest {
|
|
15
15
|
platform: Platform;
|
|
16
16
|
strategyName: string;
|
|
17
|
+
scope: DeployModelWithStrategyScopeEnum;
|
|
18
|
+
modelName: string;
|
|
19
|
+
modelAuthor: string;
|
|
20
|
+
params: any;
|
|
17
21
|
deployModelWithStrategyBody: DeployModelWithStrategyBody;
|
|
18
22
|
}
|
|
19
23
|
export interface StartModelDeploymentRequest {
|
|
@@ -62,3 +66,11 @@ export declare class DeploymentsApi extends runtime.BaseAPI {
|
|
|
62
66
|
*/
|
|
63
67
|
undeployModelDeployment(requestParameters: UndeployModelDeploymentRequest, initOverrides?: RequestInit): Promise<ModelDeploymentResponse>;
|
|
64
68
|
}
|
|
69
|
+
/**
|
|
70
|
+
* @export
|
|
71
|
+
* @enum {string}
|
|
72
|
+
*/
|
|
73
|
+
export declare enum DeployModelWithStrategyScopeEnum {
|
|
74
|
+
Tenant = "tenant",
|
|
75
|
+
Global = "global"
|
|
76
|
+
}
|
|
@@ -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.DeploymentsApi = void 0;
|
|
67
|
+
exports.DeployModelWithStrategyScopeEnum = exports.DeploymentsApi = void 0;
|
|
68
68
|
var runtime = require("../runtime");
|
|
69
69
|
var models_1 = require("../models");
|
|
70
70
|
/**
|
|
@@ -90,14 +90,29 @@ 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.scope === null || requestParameters.scope === undefined) {
|
|
94
|
+
throw new runtime.RequiredError('scope', 'Required parameter requestParameters.scope was null or undefined when calling deployModelWithStrategy.');
|
|
95
|
+
}
|
|
96
|
+
if (requestParameters.modelName === null || requestParameters.modelName === undefined) {
|
|
97
|
+
throw new runtime.RequiredError('modelName', 'Required parameter requestParameters.modelName was null or undefined when calling deployModelWithStrategy.');
|
|
98
|
+
}
|
|
99
|
+
if (requestParameters.modelAuthor === null || requestParameters.modelAuthor === undefined) {
|
|
100
|
+
throw new runtime.RequiredError('modelAuthor', 'Required parameter requestParameters.modelAuthor was null or undefined when calling deployModelWithStrategy.');
|
|
101
|
+
}
|
|
102
|
+
if (requestParameters.params === null || requestParameters.params === undefined) {
|
|
103
|
+
throw new runtime.RequiredError('params', 'Required parameter requestParameters.params was null or undefined when calling deployModelWithStrategy.');
|
|
104
|
+
}
|
|
93
105
|
if (requestParameters.deployModelWithStrategyBody === null || requestParameters.deployModelWithStrategyBody === undefined) {
|
|
94
106
|
throw new runtime.RequiredError('deployModelWithStrategyBody', 'Required parameter requestParameters.deployModelWithStrategyBody was null or undefined when calling deployModelWithStrategy.');
|
|
95
107
|
}
|
|
96
108
|
queryParameters = {};
|
|
109
|
+
if (requestParameters.scope !== undefined) {
|
|
110
|
+
queryParameters['scope'] = requestParameters.scope;
|
|
111
|
+
}
|
|
97
112
|
headerParameters = {};
|
|
98
113
|
headerParameters['Content-Type'] = 'application/json';
|
|
99
114
|
return [4 /*yield*/, this.request({
|
|
100
|
-
path: "/deployments-api/platforms/{platform}/strategies/{strategy_name}".replace("{".concat("platform", "}"), encodeURIComponent(String(requestParameters.platform))).replace("{".concat("strategy_name", "}"), encodeURIComponent(String(requestParameters.strategyName))),
|
|
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))),
|
|
101
116
|
method: 'POST',
|
|
102
117
|
headers: headerParameters,
|
|
103
118
|
query: queryParameters,
|
|
@@ -262,3 +277,12 @@ var DeploymentsApi = /** @class */ (function (_super) {
|
|
|
262
277
|
return DeploymentsApi;
|
|
263
278
|
}(runtime.BaseAPI));
|
|
264
279
|
exports.DeploymentsApi = DeploymentsApi;
|
|
280
|
+
/**
|
|
281
|
+
* @export
|
|
282
|
+
* @enum {string}
|
|
283
|
+
*/
|
|
284
|
+
var DeployModelWithStrategyScopeEnum;
|
|
285
|
+
(function (DeployModelWithStrategyScopeEnum) {
|
|
286
|
+
DeployModelWithStrategyScopeEnum["Tenant"] = "tenant";
|
|
287
|
+
DeployModelWithStrategyScopeEnum["Global"] = "global";
|
|
288
|
+
})(DeployModelWithStrategyScopeEnum || (exports.DeployModelWithStrategyScopeEnum = DeployModelWithStrategyScopeEnum = {}));
|
package/package.json
CHANGED
|
@@ -38,6 +38,10 @@ import {
|
|
|
38
38
|
export interface DeployModelWithStrategyRequest {
|
|
39
39
|
platform: Platform;
|
|
40
40
|
strategyName: string;
|
|
41
|
+
scope: DeployModelWithStrategyScopeEnum;
|
|
42
|
+
modelName: string;
|
|
43
|
+
modelAuthor: string;
|
|
44
|
+
params: any;
|
|
41
45
|
deployModelWithStrategyBody: DeployModelWithStrategyBody;
|
|
42
46
|
}
|
|
43
47
|
|
|
@@ -70,18 +74,38 @@ export class DeploymentsApi extends runtime.BaseAPI {
|
|
|
70
74
|
throw new runtime.RequiredError('strategyName','Required parameter requestParameters.strategyName was null or undefined when calling deployModelWithStrategy.');
|
|
71
75
|
}
|
|
72
76
|
|
|
77
|
+
if (requestParameters.scope === null || requestParameters.scope === undefined) {
|
|
78
|
+
throw new runtime.RequiredError('scope','Required parameter requestParameters.scope was null or undefined when calling deployModelWithStrategy.');
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if (requestParameters.modelName === null || requestParameters.modelName === undefined) {
|
|
82
|
+
throw new runtime.RequiredError('modelName','Required parameter requestParameters.modelName was null or undefined when calling deployModelWithStrategy.');
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
if (requestParameters.modelAuthor === null || requestParameters.modelAuthor === undefined) {
|
|
86
|
+
throw new runtime.RequiredError('modelAuthor','Required parameter requestParameters.modelAuthor was null or undefined when calling deployModelWithStrategy.');
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
if (requestParameters.params === null || requestParameters.params === undefined) {
|
|
90
|
+
throw new runtime.RequiredError('params','Required parameter requestParameters.params was null or undefined when calling deployModelWithStrategy.');
|
|
91
|
+
}
|
|
92
|
+
|
|
73
93
|
if (requestParameters.deployModelWithStrategyBody === null || requestParameters.deployModelWithStrategyBody === undefined) {
|
|
74
94
|
throw new runtime.RequiredError('deployModelWithStrategyBody','Required parameter requestParameters.deployModelWithStrategyBody was null or undefined when calling deployModelWithStrategy.');
|
|
75
95
|
}
|
|
76
96
|
|
|
77
97
|
const queryParameters: any = {};
|
|
78
98
|
|
|
99
|
+
if (requestParameters.scope !== undefined) {
|
|
100
|
+
queryParameters['scope'] = requestParameters.scope;
|
|
101
|
+
}
|
|
102
|
+
|
|
79
103
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
80
104
|
|
|
81
105
|
headerParameters['Content-Type'] = 'application/json';
|
|
82
106
|
|
|
83
107
|
const response = await this.request({
|
|
84
|
-
path: `/deployments-api/platforms/{platform}/strategies/{strategy_name}`.replace(`{${"platform"}}`, encodeURIComponent(String(requestParameters.platform))).replace(`{${"strategy_name"}}`, encodeURIComponent(String(requestParameters.strategyName))),
|
|
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))),
|
|
85
109
|
method: 'POST',
|
|
86
110
|
headers: headerParameters,
|
|
87
111
|
query: queryParameters,
|
|
@@ -190,3 +214,12 @@ export class DeploymentsApi extends runtime.BaseAPI {
|
|
|
190
214
|
}
|
|
191
215
|
|
|
192
216
|
}
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* @export
|
|
220
|
+
* @enum {string}
|
|
221
|
+
*/
|
|
222
|
+
export enum DeployModelWithStrategyScopeEnum {
|
|
223
|
+
Tenant = 'tenant',
|
|
224
|
+
Global = 'global'
|
|
225
|
+
}
|