@mlhub/deployments-ts-sdk 0.12.0 → 0.13.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.
@@ -32,6 +32,7 @@ src/models/Scope.ts
32
32
  src/models/ServerErrorResponse.ts
33
33
  src/models/State.ts
34
34
  src/models/Strategy.ts
35
+ src/models/StrategyConfig.ts
35
36
  src/models/Visibility.ts
36
37
  src/models/index.ts
37
38
  src/runtime.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## @mlhub/deployments-ts-sdk@0.12.0
1
+ ## @mlhub/deployments-ts-sdk@0.13.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.12.0 --save
39
+ npm install @mlhub/deployments-ts-sdk@0.13.0 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
@@ -9,13 +9,19 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import { Scope } from './';
12
+ import { DeploymentModality, Scope } from './';
13
13
  /**
14
14
  *
15
15
  * @export
16
16
  * @interface DeployModelWithStrategyBody
17
17
  */
18
18
  export interface DeployModelWithStrategyBody {
19
+ /**
20
+ *
21
+ * @type {DeploymentModality}
22
+ * @memberof DeployModelWithStrategyBody
23
+ */
24
+ deployment_modality: DeploymentModality;
19
25
  /**
20
26
  *
21
27
  * @type {string}
@@ -26,6 +26,7 @@ function DeployModelWithStrategyBodyFromJSONTyped(json, ignoreDiscriminator) {
26
26
  return json;
27
27
  }
28
28
  return {
29
+ 'deployment_modality': (0, _1.DeploymentModalityFromJSON)(json['deployment_modality']),
29
30
  'description': !(0, runtime_1.exists)(json, 'description') ? undefined : json['description'],
30
31
  'model_author': json['model_author'],
31
32
  'model_name': json['model_name'],
@@ -42,6 +43,7 @@ function DeployModelWithStrategyBodyToJSON(value) {
42
43
  return null;
43
44
  }
44
45
  return {
46
+ 'deployment_modality': (0, _1.DeploymentModalityToJSON)(value.deployment_modality),
45
47
  'description': value.description,
46
48
  'model_author': value.model_author,
47
49
  'model_name': value.model_name,
@@ -9,7 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import { DeploymentModality, Parameter, Platform } from './';
12
+ import { Parameter, Platform, StrategyConfig } from './';
13
13
  /**
14
14
  *
15
15
  * @export
@@ -18,16 +18,22 @@ import { DeploymentModality, Parameter, Platform } from './';
18
18
  export interface Strategy {
19
19
  /**
20
20
  *
21
- * @type {DeploymentModality}
21
+ * @type {StrategyConfig}
22
22
  * @memberof Strategy
23
23
  */
24
- deployment_modality: DeploymentModality;
24
+ config: StrategyConfig;
25
25
  /**
26
26
  *
27
27
  * @type {string}
28
28
  * @memberof Strategy
29
29
  */
30
30
  description?: string | null;
31
+ /**
32
+ *
33
+ * @type {boolean}
34
+ * @memberof Strategy
35
+ */
36
+ enabled: boolean;
31
37
  /**
32
38
  *
33
39
  * @type {string}
@@ -26,8 +26,9 @@ function StrategyFromJSONTyped(json, ignoreDiscriminator) {
26
26
  return json;
27
27
  }
28
28
  return {
29
- 'deployment_modality': (0, _1.DeploymentModalityFromJSON)(json['deployment_modality']),
29
+ 'config': (0, _1.StrategyConfigFromJSON)(json['config']),
30
30
  'description': !(0, runtime_1.exists)(json, 'description') ? undefined : json['description'],
31
+ 'enabled': json['enabled'],
31
32
  'name': json['name'],
32
33
  'parameters': (json['parameters'].map(_1.ParameterFromJSON)),
33
34
  'platform': (0, _1.PlatformFromJSON)(json['platform']),
@@ -41,8 +42,9 @@ function StrategyToJSON(value) {
41
42
  return null;
42
43
  }
43
44
  return {
44
- 'deployment_modality': (0, _1.DeploymentModalityToJSON)(value.deployment_modality),
45
+ 'config': (0, _1.StrategyConfigToJSON)(value.config),
45
46
  'description': value.description,
47
+ 'enabled': value.enabled,
46
48
  'name': value.name,
47
49
  'parameters': (value.parameters.map(_1.ParameterToJSON)),
48
50
  'platform': (0, _1.PlatformToJSON)(value.platform),
@@ -0,0 +1,52 @@
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
+ import { DeploymentModality, ParallelismStrategy } from './';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface StrategyConfig
17
+ */
18
+ export interface StrategyConfig {
19
+ /**
20
+ *
21
+ * @type {number}
22
+ * @memberof StrategyConfig
23
+ */
24
+ max_replicas?: number | null;
25
+ /**
26
+ *
27
+ * @type {number}
28
+ * @memberof StrategyConfig
29
+ */
30
+ max_ttl?: number | null;
31
+ /**
32
+ *
33
+ * @type {number}
34
+ * @memberof StrategyConfig
35
+ */
36
+ min_replicas: number;
37
+ /**
38
+ *
39
+ * @type {Array<DeploymentModality>}
40
+ * @memberof StrategyConfig
41
+ */
42
+ supported_deployment_modalities: Array<DeploymentModality>;
43
+ /**
44
+ *
45
+ * @type {Array<ParallelismStrategy>}
46
+ * @memberof StrategyConfig
47
+ */
48
+ supported_paralellism_strategies: Array<ParallelismStrategy>;
49
+ }
50
+ export declare function StrategyConfigFromJSON(json: any): StrategyConfig;
51
+ export declare function StrategyConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): StrategyConfig;
52
+ export declare function StrategyConfigToJSON(value?: StrategyConfig | null): any;
@@ -0,0 +1,50 @@
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.StrategyConfigFromJSON = StrategyConfigFromJSON;
17
+ exports.StrategyConfigFromJSONTyped = StrategyConfigFromJSONTyped;
18
+ exports.StrategyConfigToJSON = StrategyConfigToJSON;
19
+ var runtime_1 = require("../runtime");
20
+ var _1 = require("./");
21
+ function StrategyConfigFromJSON(json) {
22
+ return StrategyConfigFromJSONTyped(json, false);
23
+ }
24
+ function StrategyConfigFromJSONTyped(json, ignoreDiscriminator) {
25
+ if ((json === undefined) || (json === null)) {
26
+ return json;
27
+ }
28
+ return {
29
+ 'max_replicas': !(0, runtime_1.exists)(json, 'max_replicas') ? undefined : json['max_replicas'],
30
+ 'max_ttl': !(0, runtime_1.exists)(json, 'max_ttl') ? undefined : json['max_ttl'],
31
+ 'min_replicas': json['min_replicas'],
32
+ 'supported_deployment_modalities': (json['supported_deployment_modalities'].map(_1.DeploymentModalityFromJSON)),
33
+ 'supported_paralellism_strategies': (json['supported_paralellism_strategies'].map(_1.ParallelismStrategyFromJSON)),
34
+ };
35
+ }
36
+ function StrategyConfigToJSON(value) {
37
+ if (value === undefined) {
38
+ return undefined;
39
+ }
40
+ if (value === null) {
41
+ return null;
42
+ }
43
+ return {
44
+ 'max_replicas': value.max_replicas,
45
+ 'max_ttl': value.max_ttl,
46
+ 'min_replicas': value.min_replicas,
47
+ 'supported_deployment_modalities': (value.supported_deployment_modalities.map(_1.DeploymentModalityToJSON)),
48
+ 'supported_paralellism_strategies': (value.supported_paralellism_strategies.map(_1.ParallelismStrategyToJSON)),
49
+ };
50
+ }
@@ -23,4 +23,5 @@ export * from './Scope';
23
23
  export * from './ServerErrorResponse';
24
24
  export * from './State';
25
25
  export * from './Strategy';
26
+ export * from './StrategyConfig';
26
27
  export * from './Visibility';
@@ -41,4 +41,5 @@ __exportStar(require("./Scope"), exports);
41
41
  __exportStar(require("./ServerErrorResponse"), exports);
42
42
  __exportStar(require("./State"), exports);
43
43
  __exportStar(require("./Strategy"), exports);
44
+ __exportStar(require("./StrategyConfig"), exports);
44
45
  __exportStar(require("./Visibility"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mlhub/deployments-ts-sdk",
3
- "version": "0.12.0",
3
+ "version": "0.13.0",
4
4
  "description": "OpenAPI client for @mlhub/deployments-ts-sdk",
5
5
  "author": "OpenAPI-Generator",
6
6
  "main": "./dist/index.js",
@@ -14,6 +14,10 @@
14
14
 
15
15
  import { exists, mapValues } from '../runtime';
16
16
  import {
17
+ DeploymentModality,
18
+ DeploymentModalityFromJSON,
19
+ DeploymentModalityFromJSONTyped,
20
+ DeploymentModalityToJSON,
17
21
  Scope,
18
22
  ScopeFromJSON,
19
23
  ScopeFromJSONTyped,
@@ -26,6 +30,12 @@ import {
26
30
  * @interface DeployModelWithStrategyBody
27
31
  */
28
32
  export interface DeployModelWithStrategyBody {
33
+ /**
34
+ *
35
+ * @type {DeploymentModality}
36
+ * @memberof DeployModelWithStrategyBody
37
+ */
38
+ deployment_modality: DeploymentModality;
29
39
  /**
30
40
  *
31
41
  * @type {string}
@@ -74,6 +84,7 @@ export function DeployModelWithStrategyBodyFromJSONTyped(json: any, ignoreDiscri
74
84
  }
75
85
  return {
76
86
 
87
+ 'deployment_modality': DeploymentModalityFromJSON(json['deployment_modality']),
77
88
  'description': !exists(json, 'description') ? undefined : json['description'],
78
89
  'model_author': json['model_author'],
79
90
  'model_name': json['model_name'],
@@ -92,6 +103,7 @@ export function DeployModelWithStrategyBodyToJSON(value?: DeployModelWithStrateg
92
103
  }
93
104
  return {
94
105
 
106
+ 'deployment_modality': DeploymentModalityToJSON(value.deployment_modality),
95
107
  'description': value.description,
96
108
  'model_author': value.model_author,
97
109
  'model_name': value.model_name,
@@ -14,10 +14,6 @@
14
14
 
15
15
  import { exists, mapValues } from '../runtime';
16
16
  import {
17
- DeploymentModality,
18
- DeploymentModalityFromJSON,
19
- DeploymentModalityFromJSONTyped,
20
- DeploymentModalityToJSON,
21
17
  Parameter,
22
18
  ParameterFromJSON,
23
19
  ParameterFromJSONTyped,
@@ -26,6 +22,10 @@ import {
26
22
  PlatformFromJSON,
27
23
  PlatformFromJSONTyped,
28
24
  PlatformToJSON,
25
+ StrategyConfig,
26
+ StrategyConfigFromJSON,
27
+ StrategyConfigFromJSONTyped,
28
+ StrategyConfigToJSON,
29
29
  } from './';
30
30
 
31
31
  /**
@@ -36,16 +36,22 @@ import {
36
36
  export interface Strategy {
37
37
  /**
38
38
  *
39
- * @type {DeploymentModality}
39
+ * @type {StrategyConfig}
40
40
  * @memberof Strategy
41
41
  */
42
- deployment_modality: DeploymentModality;
42
+ config: StrategyConfig;
43
43
  /**
44
44
  *
45
45
  * @type {string}
46
46
  * @memberof Strategy
47
47
  */
48
48
  description?: string | null;
49
+ /**
50
+ *
51
+ * @type {boolean}
52
+ * @memberof Strategy
53
+ */
54
+ enabled: boolean;
49
55
  /**
50
56
  *
51
57
  * @type {string}
@@ -76,8 +82,9 @@ export function StrategyFromJSONTyped(json: any, ignoreDiscriminator: boolean):
76
82
  }
77
83
  return {
78
84
 
79
- 'deployment_modality': DeploymentModalityFromJSON(json['deployment_modality']),
85
+ 'config': StrategyConfigFromJSON(json['config']),
80
86
  'description': !exists(json, 'description') ? undefined : json['description'],
87
+ 'enabled': json['enabled'],
81
88
  'name': json['name'],
82
89
  'parameters': ((json['parameters'] as Array<any>).map(ParameterFromJSON)),
83
90
  'platform': PlatformFromJSON(json['platform']),
@@ -93,8 +100,9 @@ export function StrategyToJSON(value?: Strategy | null): any {
93
100
  }
94
101
  return {
95
102
 
96
- 'deployment_modality': DeploymentModalityToJSON(value.deployment_modality),
103
+ 'config': StrategyConfigToJSON(value.config),
97
104
  'description': value.description,
105
+ 'enabled': value.enabled,
98
106
  'name': value.name,
99
107
  'parameters': ((value.parameters as Array<any>).map(ParameterToJSON)),
100
108
  'platform': PlatformToJSON(value.platform),
@@ -0,0 +1,99 @@
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
+ import { exists, mapValues } from '../runtime';
16
+ import {
17
+ DeploymentModality,
18
+ DeploymentModalityFromJSON,
19
+ DeploymentModalityFromJSONTyped,
20
+ DeploymentModalityToJSON,
21
+ ParallelismStrategy,
22
+ ParallelismStrategyFromJSON,
23
+ ParallelismStrategyFromJSONTyped,
24
+ ParallelismStrategyToJSON,
25
+ } from './';
26
+
27
+ /**
28
+ *
29
+ * @export
30
+ * @interface StrategyConfig
31
+ */
32
+ export interface StrategyConfig {
33
+ /**
34
+ *
35
+ * @type {number}
36
+ * @memberof StrategyConfig
37
+ */
38
+ max_replicas?: number | null;
39
+ /**
40
+ *
41
+ * @type {number}
42
+ * @memberof StrategyConfig
43
+ */
44
+ max_ttl?: number | null;
45
+ /**
46
+ *
47
+ * @type {number}
48
+ * @memberof StrategyConfig
49
+ */
50
+ min_replicas: number;
51
+ /**
52
+ *
53
+ * @type {Array<DeploymentModality>}
54
+ * @memberof StrategyConfig
55
+ */
56
+ supported_deployment_modalities: Array<DeploymentModality>;
57
+ /**
58
+ *
59
+ * @type {Array<ParallelismStrategy>}
60
+ * @memberof StrategyConfig
61
+ */
62
+ supported_paralellism_strategies: Array<ParallelismStrategy>;
63
+ }
64
+
65
+ export function StrategyConfigFromJSON(json: any): StrategyConfig {
66
+ return StrategyConfigFromJSONTyped(json, false);
67
+ }
68
+
69
+ export function StrategyConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): StrategyConfig {
70
+ if ((json === undefined) || (json === null)) {
71
+ return json;
72
+ }
73
+ return {
74
+
75
+ 'max_replicas': !exists(json, 'max_replicas') ? undefined : json['max_replicas'],
76
+ 'max_ttl': !exists(json, 'max_ttl') ? undefined : json['max_ttl'],
77
+ 'min_replicas': json['min_replicas'],
78
+ 'supported_deployment_modalities': ((json['supported_deployment_modalities'] as Array<any>).map(DeploymentModalityFromJSON)),
79
+ 'supported_paralellism_strategies': ((json['supported_paralellism_strategies'] as Array<any>).map(ParallelismStrategyFromJSON)),
80
+ };
81
+ }
82
+
83
+ export function StrategyConfigToJSON(value?: StrategyConfig | null): any {
84
+ if (value === undefined) {
85
+ return undefined;
86
+ }
87
+ if (value === null) {
88
+ return null;
89
+ }
90
+ return {
91
+
92
+ 'max_replicas': value.max_replicas,
93
+ 'max_ttl': value.max_ttl,
94
+ 'min_replicas': value.min_replicas,
95
+ 'supported_deployment_modalities': ((value.supported_deployment_modalities as Array<any>).map(DeploymentModalityToJSON)),
96
+ 'supported_paralellism_strategies': ((value.supported_paralellism_strategies as Array<any>).map(ParallelismStrategyToJSON)),
97
+ };
98
+ }
99
+
@@ -25,4 +25,5 @@ export * from './Scope';
25
25
  export * from './ServerErrorResponse';
26
26
  export * from './State';
27
27
  export * from './Strategy';
28
+ export * from './StrategyConfig';
28
29
  export * from './Visibility';