@migration-planner-ui/api-client 0.0.11 → 0.0.13

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.
@@ -20,14 +20,8 @@ import { HostFromJSON, HostToJSON, } from './Host';
20
20
  export function instanceOfInfra(value) {
21
21
  if (!('totalHosts' in value) || value['totalHosts'] === undefined)
22
22
  return false;
23
- if (!('totalDatacenters' in value) || value['totalDatacenters'] === undefined)
24
- return false;
25
23
  if (!('totalClusters' in value) || value['totalClusters'] === undefined)
26
24
  return false;
27
- if (!('clustersPerDatacenter' in value) || value['clustersPerDatacenter'] === undefined)
28
- return false;
29
- if (!('hosts' in value) || value['hosts'] === undefined)
30
- return false;
31
25
  if (!('hostsPerCluster' in value) || value['hostsPerCluster'] === undefined)
32
26
  return false;
33
27
  if (!('hostPowerStates' in value) || value['hostPowerStates'] === undefined)
@@ -46,15 +40,15 @@ export function InfraFromJSONTyped(json, ignoreDiscriminator) {
46
40
  return json;
47
41
  }
48
42
  return {
49
- 'totalHosts': json['totalHosts'] || 0,
50
- 'totalDatacenters': json['totalDatacenters'] || 0,
51
- 'totalClusters': json['totalClusters'] || 0,
52
- 'clustersPerDatacenter': json['clustersPerDatacenter'] || [],
53
- 'hosts': (json['hosts'] || []).map(HostFromJSON),
54
- 'hostsPerCluster': json['hostsPerCluster'] || [],
55
- 'hostPowerStates': json['hostPowerStates'] || {},
56
- 'networks': (json['networks'] || []).map(NetworkFromJSON),
57
- 'datastores': (json['datastores'] || []).map(DatastoreFromJSON),
43
+ 'totalHosts': json['totalHosts'],
44
+ 'totalDatacenters': json['totalDatacenters'] == null ? undefined : json['totalDatacenters'],
45
+ 'totalClusters': json['totalClusters'],
46
+ 'clustersPerDatacenter': json['clustersPerDatacenter'] == null ? undefined : json['clustersPerDatacenter'],
47
+ 'hosts': json['hosts'] == null ? undefined : (json['hosts'].map(HostFromJSON)),
48
+ 'hostsPerCluster': json['hostsPerCluster'],
49
+ 'hostPowerStates': json['hostPowerStates'],
50
+ 'networks': (json['networks'].map(NetworkFromJSON)),
51
+ 'datastores': (json['datastores'].map(DatastoreFromJSON)),
58
52
  };
59
53
  }
60
54
  export function InfraToJSON(value) {
@@ -66,7 +60,7 @@ export function InfraToJSON(value) {
66
60
  'totalDatacenters': value['totalDatacenters'],
67
61
  'totalClusters': value['totalClusters'],
68
62
  'clustersPerDatacenter': value['clustersPerDatacenter'],
69
- 'hosts': (value['hosts'].map(HostToJSON)),
63
+ 'hosts': value['hosts'] == null ? undefined : (value['hosts'].map(HostToJSON)),
70
64
  'hostsPerCluster': value['hostsPerCluster'],
71
65
  'hostPowerStates': value['hostPowerStates'],
72
66
  'networks': (value['networks'].map(NetworkToJSON)),
@@ -10,6 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import type { AgentProxy } from './AgentProxy';
13
+ import type { Label } from './Label';
13
14
  /**
14
15
  *
15
16
  * @export
@@ -40,6 +41,12 @@ export interface SourceCreate {
40
41
  * @memberof SourceCreate
41
42
  */
42
43
  certificateChain?: string | null;
44
+ /**
45
+ *
46
+ * @type {Array<Label>}
47
+ * @memberof SourceCreate
48
+ */
49
+ labels?: Array<Label>;
43
50
  }
44
51
  /**
45
52
  * Check if a given object implements the SourceCreate interface.
@@ -12,6 +12,7 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
  import { AgentProxyFromJSON, AgentProxyToJSON, } from './AgentProxy';
15
+ import { LabelFromJSON, LabelToJSON, } from './Label';
15
16
  /**
16
17
  * Check if a given object implements the SourceCreate interface.
17
18
  */
@@ -32,6 +33,7 @@ export function SourceCreateFromJSONTyped(json, ignoreDiscriminator) {
32
33
  'sshPublicKey': json['sshPublicKey'] == null ? undefined : json['sshPublicKey'],
33
34
  'proxy': json['proxy'] == null ? undefined : AgentProxyFromJSON(json['proxy']),
34
35
  'certificateChain': json['certificateChain'] == null ? undefined : json['certificateChain'],
36
+ 'labels': json['labels'] == null ? undefined : (json['labels'].map(LabelFromJSON)),
35
37
  };
36
38
  }
37
39
  export function SourceCreateToJSON(value) {
@@ -43,5 +45,6 @@ export function SourceCreateToJSON(value) {
43
45
  'sshPublicKey': value['sshPublicKey'],
44
46
  'proxy': AgentProxyToJSON(value['proxy']),
45
47
  'certificateChain': value['certificateChain'],
48
+ 'labels': value['labels'] == null ? undefined : (value['labels'].map(LabelToJSON)),
46
49
  };
47
50
  }
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Migration Planner API
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: undefined
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 type { AgentProxy } from './AgentProxy';
13
+ import type { Label } from './Label';
14
+ /**
15
+ *
16
+ * @export
17
+ * @interface SourceUpdate
18
+ */
19
+ export interface SourceUpdate {
20
+ /**
21
+ *
22
+ * @type {string}
23
+ * @memberof SourceUpdate
24
+ */
25
+ name?: string;
26
+ /**
27
+ *
28
+ * @type {Array<Label>}
29
+ * @memberof SourceUpdate
30
+ */
31
+ labels?: Array<Label>;
32
+ /**
33
+ *
34
+ * @type {string}
35
+ * @memberof SourceUpdate
36
+ */
37
+ sshPublicKey?: string | null;
38
+ /**
39
+ *
40
+ * @type {string}
41
+ * @memberof SourceUpdate
42
+ */
43
+ certificateChain?: string | null;
44
+ /**
45
+ *
46
+ * @type {AgentProxy}
47
+ * @memberof SourceUpdate
48
+ */
49
+ proxy?: AgentProxy;
50
+ }
51
+ /**
52
+ * Check if a given object implements the SourceUpdate interface.
53
+ */
54
+ export declare function instanceOfSourceUpdate(value: object): value is SourceUpdate;
55
+ export declare function SourceUpdateFromJSON(json: any): SourceUpdate;
56
+ export declare function SourceUpdateFromJSONTyped(json: any, ignoreDiscriminator: boolean): SourceUpdate;
57
+ export declare function SourceUpdateToJSON(value?: SourceUpdate | null): any;
@@ -0,0 +1,48 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Migration Planner API
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: undefined
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
+ import { AgentProxyFromJSON, AgentProxyToJSON, } from './AgentProxy';
15
+ import { LabelFromJSON, LabelToJSON, } from './Label';
16
+ /**
17
+ * Check if a given object implements the SourceUpdate interface.
18
+ */
19
+ export function instanceOfSourceUpdate(value) {
20
+ return true;
21
+ }
22
+ export function SourceUpdateFromJSON(json) {
23
+ return SourceUpdateFromJSONTyped(json, false);
24
+ }
25
+ export function SourceUpdateFromJSONTyped(json, ignoreDiscriminator) {
26
+ if (json == null) {
27
+ return json;
28
+ }
29
+ return {
30
+ 'name': json['name'] == null ? undefined : json['name'],
31
+ 'labels': json['labels'] == null ? undefined : (json['labels'].map(LabelFromJSON)),
32
+ 'sshPublicKey': json['sshPublicKey'] == null ? undefined : json['sshPublicKey'],
33
+ 'certificateChain': json['certificateChain'] == null ? undefined : json['certificateChain'],
34
+ 'proxy': json['proxy'] == null ? undefined : AgentProxyFromJSON(json['proxy']),
35
+ };
36
+ }
37
+ export function SourceUpdateToJSON(value) {
38
+ if (value == null) {
39
+ return value;
40
+ }
41
+ return {
42
+ 'name': value['name'],
43
+ 'labels': value['labels'] == null ? undefined : (value['labels'].map(LabelToJSON)),
44
+ 'sshPublicKey': value['sshPublicKey'],
45
+ 'certificateChain': value['certificateChain'],
46
+ 'proxy': AgentProxyToJSON(value['proxy']),
47
+ };
48
+ }
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Migration Planner API
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: undefined
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 type { Inventory } from './Inventory';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface UpdateInventory
17
+ */
18
+ export interface UpdateInventory {
19
+ /**
20
+ *
21
+ * @type {string}
22
+ * @memberof UpdateInventory
23
+ */
24
+ agentId: string;
25
+ /**
26
+ *
27
+ * @type {Inventory}
28
+ * @memberof UpdateInventory
29
+ */
30
+ inventory: Inventory;
31
+ }
32
+ /**
33
+ * Check if a given object implements the UpdateInventory interface.
34
+ */
35
+ export declare function instanceOfUpdateInventory(value: object): value is UpdateInventory;
36
+ export declare function UpdateInventoryFromJSON(json: any): UpdateInventory;
37
+ export declare function UpdateInventoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateInventory;
38
+ export declare function UpdateInventoryToJSON(value?: UpdateInventory | null): any;
@@ -0,0 +1,45 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Migration Planner API
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: undefined
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
+ import { InventoryFromJSON, InventoryToJSON, } from './Inventory';
15
+ /**
16
+ * Check if a given object implements the UpdateInventory interface.
17
+ */
18
+ export function instanceOfUpdateInventory(value) {
19
+ if (!('agentId' in value) || value['agentId'] === undefined)
20
+ return false;
21
+ if (!('inventory' in value) || value['inventory'] === undefined)
22
+ return false;
23
+ return true;
24
+ }
25
+ export function UpdateInventoryFromJSON(json) {
26
+ return UpdateInventoryFromJSONTyped(json, false);
27
+ }
28
+ export function UpdateInventoryFromJSONTyped(json, ignoreDiscriminator) {
29
+ if (json == null) {
30
+ return json;
31
+ }
32
+ return {
33
+ 'agentId': json['agentId'],
34
+ 'inventory': InventoryFromJSON(json['inventory']),
35
+ };
36
+ }
37
+ export function UpdateInventoryToJSON(value) {
38
+ if (value == null) {
39
+ return value;
40
+ }
41
+ return {
42
+ 'agentId': value['agentId'],
43
+ 'inventory': InventoryToJSON(value['inventory']),
44
+ };
45
+ }
@@ -60,6 +60,12 @@ export interface VMs {
60
60
  * @memberof VMs
61
61
  */
62
62
  diskCount: VMResourceBreakdown;
63
+ /**
64
+ *
65
+ * @type {VMResourceBreakdown}
66
+ * @memberof VMs
67
+ */
68
+ nicCount?: VMResourceBreakdown;
63
69
  /**
64
70
  *
65
71
  * @type {{ [key: string]: number; }}
@@ -56,6 +56,7 @@ export function VMsFromJSONTyped(json, ignoreDiscriminator) {
56
56
  'ramGB': VMResourceBreakdownFromJSON(json['ramGB']),
57
57
  'diskGB': VMResourceBreakdownFromJSON(json['diskGB']),
58
58
  'diskCount': VMResourceBreakdownFromJSON(json['diskCount']),
59
+ 'nicCount': json['nicCount'] == null ? undefined : VMResourceBreakdownFromJSON(json['nicCount']),
59
60
  'powerStates': json['powerStates'],
60
61
  'os': json['os'],
61
62
  'osInfo': json['osInfo'] == null ? undefined : (mapValues(json['osInfo'], OsInfoFromJSON)),
@@ -75,6 +76,7 @@ export function VMsToJSON(value) {
75
76
  'ramGB': VMResourceBreakdownToJSON(value['ramGB']),
76
77
  'diskGB': VMResourceBreakdownToJSON(value['diskGB']),
77
78
  'diskCount': VMResourceBreakdownToJSON(value['diskCount']),
79
+ 'nicCount': VMResourceBreakdownToJSON(value['nicCount']),
78
80
  'powerStates': value['powerStates'],
79
81
  'os': value['os'],
80
82
  'osInfo': value['osInfo'] == null ? undefined : (mapValues(value['osInfo'], OsInfoToJSON)),
@@ -1,24 +1,27 @@
1
1
  export * from './Agent';
2
2
  export * from './AgentProxy';
3
+ export * from './Assessment';
4
+ export * from './AssessmentForm';
3
5
  export * from './Datastore';
4
6
  export * from './Histogram';
5
7
  export * from './Host';
6
8
  export * from './Infra';
9
+ export * from './InfraDatastoresInner';
10
+ export * from './InfraNetworksInner';
7
11
  export * from './Inventory';
8
12
  export * from './Label';
9
13
  export * from './MigrationIssue';
14
+ export * from './MigrationIssuesInner';
10
15
  export * from './ModelError';
11
16
  export * from './Network';
12
17
  export * from './OsInfo';
13
18
  export * from './PresignedUrl';
14
19
  export * from './Source';
15
20
  export * from './SourceCreate';
16
- export * from './SourceUpdateOnPrem';
21
+ export * from './SourceUpdate';
17
22
  export * from './Status';
23
+ export * from './UpdateInventory';
18
24
  export * from './UploadRvtoolsFile200Response';
19
25
  export * from './VCenter';
20
26
  export * from './VMResourceBreakdown';
21
27
  export * from './VMs';
22
- export * from './InfraDatastoresInner';
23
- export * from './InfraNetworksInner';
24
- export * from './MigrationIssuesInner';
@@ -2,25 +2,28 @@
2
2
  /* eslint-disable */
3
3
  export * from './Agent';
4
4
  export * from './AgentProxy';
5
+ export * from './Assessment';
6
+ export * from './AssessmentForm';
5
7
  export * from './Datastore';
6
8
  export * from './Histogram';
7
9
  export * from './Host';
8
10
  export * from './Infra';
11
+ export * from './InfraDatastoresInner';
12
+ export * from './InfraNetworksInner';
9
13
  export * from './Inventory';
10
14
  export * from './Label';
11
15
  export * from './MigrationIssue';
16
+ export * from './MigrationIssuesInner';
12
17
  export * from './ModelError';
13
18
  export * from './Network';
14
19
  export * from './OsInfo';
15
20
  export * from './PresignedUrl';
16
21
  export * from './Source';
17
22
  export * from './SourceCreate';
18
- export * from './SourceUpdateOnPrem';
23
+ export * from './SourceUpdate';
19
24
  export * from './Status';
25
+ export * from './UpdateInventory';
20
26
  export * from './UploadRvtoolsFile200Response';
21
27
  export * from './VCenter';
22
28
  export * from './VMResourceBreakdown';
23
29
  export * from './VMs';
24
- export * from './InfraDatastoresInner';
25
- export * from './InfraNetworksInner';
26
- export * from './MigrationIssuesInner';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@migration-planner-ui/api-client",
3
- "version": "0.0.11",
3
+ "version": "0.0.13",
4
4
  "description": "OpenAPI client for the Migration Planner API",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -0,0 +1,237 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Migration Planner API
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: undefined
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
+ import * as runtime from '../runtime';
17
+ import type {
18
+ Assessment,
19
+ AssessmentForm,
20
+ } from '../models/index';
21
+ import {
22
+ AssessmentFromJSON,
23
+ AssessmentToJSON,
24
+ AssessmentFormFromJSON,
25
+ AssessmentFormToJSON,
26
+ } from '../models/index';
27
+
28
+ export interface CreateAssessmentRequest {
29
+ assessmentForm: AssessmentForm;
30
+ }
31
+
32
+ export interface DeleteAssessmentRequest {
33
+ id: string;
34
+ }
35
+
36
+ export interface GetAssessmentRequest {
37
+ id: string;
38
+ }
39
+
40
+ /**
41
+ * AssessmentApi - interface
42
+ *
43
+ * @export
44
+ * @interface AssessmentApiInterface
45
+ */
46
+ export interface AssessmentApiInterface {
47
+ /**
48
+ * Create an assessment
49
+ * @param {AssessmentForm} assessmentForm
50
+ * @param {*} [options] Override http request option.
51
+ * @throws {RequiredError}
52
+ * @memberof AssessmentApiInterface
53
+ */
54
+ createAssessmentRaw(requestParameters: CreateAssessmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Assessment>>;
55
+
56
+ /**
57
+ * Create an assessment
58
+ */
59
+ createAssessment(requestParameters: CreateAssessmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Assessment>;
60
+
61
+ /**
62
+ * Delete an assessment
63
+ * @param {string} id ID of the assessment
64
+ * @param {*} [options] Override http request option.
65
+ * @throws {RequiredError}
66
+ * @memberof AssessmentApiInterface
67
+ */
68
+ deleteAssessmentRaw(requestParameters: DeleteAssessmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Assessment>>;
69
+
70
+ /**
71
+ * Delete an assessment
72
+ */
73
+ deleteAssessment(requestParameters: DeleteAssessmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Assessment>;
74
+
75
+ /**
76
+ * Get the specified assessment
77
+ * @param {string} id ID of the assessment
78
+ * @param {*} [options] Override http request option.
79
+ * @throws {RequiredError}
80
+ * @memberof AssessmentApiInterface
81
+ */
82
+ getAssessmentRaw(requestParameters: GetAssessmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Assessment>>;
83
+
84
+ /**
85
+ * Get the specified assessment
86
+ */
87
+ getAssessment(requestParameters: GetAssessmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Assessment>;
88
+
89
+ /**
90
+ * List assessments
91
+ * @param {*} [options] Override http request option.
92
+ * @throws {RequiredError}
93
+ * @memberof AssessmentApiInterface
94
+ */
95
+ listAssessmentsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Assessment>>>;
96
+
97
+ /**
98
+ * List assessments
99
+ */
100
+ listAssessments(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Assessment>>;
101
+
102
+ }
103
+
104
+ /**
105
+ *
106
+ */
107
+ export class AssessmentApi extends runtime.BaseAPI implements AssessmentApiInterface {
108
+
109
+ /**
110
+ * Create an assessment
111
+ */
112
+ async createAssessmentRaw(requestParameters: CreateAssessmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Assessment>> {
113
+ if (requestParameters['assessmentForm'] == null) {
114
+ throw new runtime.RequiredError(
115
+ 'assessmentForm',
116
+ 'Required parameter "assessmentForm" was null or undefined when calling createAssessment().'
117
+ );
118
+ }
119
+
120
+ const queryParameters: any = {};
121
+
122
+ const headerParameters: runtime.HTTPHeaders = {};
123
+
124
+ headerParameters['Content-Type'] = 'application/json';
125
+
126
+ const response = await this.request({
127
+ path: `/api/v1/assessments`,
128
+ method: 'POST',
129
+ headers: headerParameters,
130
+ query: queryParameters,
131
+ body: AssessmentFormToJSON(requestParameters['assessmentForm']),
132
+ }, initOverrides);
133
+
134
+ return new runtime.JSONApiResponse(response, (jsonValue) => AssessmentFromJSON(jsonValue));
135
+ }
136
+
137
+ /**
138
+ * Create an assessment
139
+ */
140
+ async createAssessment(requestParameters: CreateAssessmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Assessment> {
141
+ const response = await this.createAssessmentRaw(requestParameters, initOverrides);
142
+ return await response.value();
143
+ }
144
+
145
+ /**
146
+ * Delete an assessment
147
+ */
148
+ async deleteAssessmentRaw(requestParameters: DeleteAssessmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Assessment>> {
149
+ if (requestParameters['id'] == null) {
150
+ throw new runtime.RequiredError(
151
+ 'id',
152
+ 'Required parameter "id" was null or undefined when calling deleteAssessment().'
153
+ );
154
+ }
155
+
156
+ const queryParameters: any = {};
157
+
158
+ const headerParameters: runtime.HTTPHeaders = {};
159
+
160
+ const response = await this.request({
161
+ path: `/api/v1/assessments/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
162
+ method: 'DELETE',
163
+ headers: headerParameters,
164
+ query: queryParameters,
165
+ }, initOverrides);
166
+
167
+ return new runtime.JSONApiResponse(response, (jsonValue) => AssessmentFromJSON(jsonValue));
168
+ }
169
+
170
+ /**
171
+ * Delete an assessment
172
+ */
173
+ async deleteAssessment(requestParameters: DeleteAssessmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Assessment> {
174
+ const response = await this.deleteAssessmentRaw(requestParameters, initOverrides);
175
+ return await response.value();
176
+ }
177
+
178
+ /**
179
+ * Get the specified assessment
180
+ */
181
+ async getAssessmentRaw(requestParameters: GetAssessmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Assessment>> {
182
+ if (requestParameters['id'] == null) {
183
+ throw new runtime.RequiredError(
184
+ 'id',
185
+ 'Required parameter "id" was null or undefined when calling getAssessment().'
186
+ );
187
+ }
188
+
189
+ const queryParameters: any = {};
190
+
191
+ const headerParameters: runtime.HTTPHeaders = {};
192
+
193
+ const response = await this.request({
194
+ path: `/api/v1/assessments/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
195
+ method: 'GET',
196
+ headers: headerParameters,
197
+ query: queryParameters,
198
+ }, initOverrides);
199
+
200
+ return new runtime.JSONApiResponse(response, (jsonValue) => AssessmentFromJSON(jsonValue));
201
+ }
202
+
203
+ /**
204
+ * Get the specified assessment
205
+ */
206
+ async getAssessment(requestParameters: GetAssessmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Assessment> {
207
+ const response = await this.getAssessmentRaw(requestParameters, initOverrides);
208
+ return await response.value();
209
+ }
210
+
211
+ /**
212
+ * List assessments
213
+ */
214
+ async listAssessmentsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Assessment>>> {
215
+ const queryParameters: any = {};
216
+
217
+ const headerParameters: runtime.HTTPHeaders = {};
218
+
219
+ const response = await this.request({
220
+ path: `/api/v1/assessments`,
221
+ method: 'GET',
222
+ headers: headerParameters,
223
+ query: queryParameters,
224
+ }, initOverrides);
225
+
226
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(AssessmentFromJSON));
227
+ }
228
+
229
+ /**
230
+ * List assessments
231
+ */
232
+ async listAssessments(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Assessment>> {
233
+ const response = await this.listAssessmentsRaw(initOverrides);
234
+ return await response.value();
235
+ }
236
+
237
+ }