@cirrobio/api-client 0.1.10 → 0.1.12

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 (38) hide show
  1. package/.openapi-generator/FILES +5 -0
  2. package/README.md +1 -1
  3. package/dist/apis/ProcessesApi.d.ts +15 -1
  4. package/dist/apis/ProcessesApi.js +60 -0
  5. package/dist/apis/ProjectsApi.d.ts +68 -1
  6. package/dist/apis/ProjectsApi.js +287 -0
  7. package/dist/models/ApproveAccessRequest.d.ts +32 -0
  8. package/dist/models/ApproveAccessRequest.js +51 -0
  9. package/dist/models/ApproveProjectAccessRequest.d.ts +32 -0
  10. package/dist/models/ApproveProjectAccessRequest.js +51 -0
  11. package/dist/models/CreateProjectAccessRequest.d.ts +38 -0
  12. package/dist/models/CreateProjectAccessRequest.js +54 -0
  13. package/dist/models/PipelineCost.d.ts +43 -0
  14. package/dist/models/PipelineCost.js +54 -0
  15. package/dist/models/ProjectAccessRequest.d.ts +75 -0
  16. package/dist/models/ProjectAccessRequest.js +73 -0
  17. package/dist/models/ProjectSettings.d.ts +6 -0
  18. package/dist/models/ProjectSettings.js +2 -0
  19. package/dist/models/RequestStatus.d.ts +24 -0
  20. package/dist/models/RequestStatus.js +39 -0
  21. package/dist/models/Sample.d.ts +5 -5
  22. package/dist/models/Sample.js +7 -10
  23. package/dist/models/index.d.ts +5 -0
  24. package/dist/models/index.js +5 -0
  25. package/dist/runtime.js +1 -1
  26. package/package.json +1 -1
  27. package/src/apis/ProcessesApi.ts +55 -0
  28. package/src/apis/ProjectsApi.ts +250 -0
  29. package/src/models/ApproveAccessRequest.ts +73 -0
  30. package/src/models/ApproveProjectAccessRequest.ts +73 -0
  31. package/src/models/CreateProjectAccessRequest.ts +82 -0
  32. package/src/models/PipelineCost.ts +81 -0
  33. package/src/models/ProjectAccessRequest.ts +142 -0
  34. package/src/models/ProjectSettings.ts +8 -0
  35. package/src/models/RequestStatus.ts +38 -0
  36. package/src/models/Sample.ts +10 -14
  37. package/src/models/index.ts +5 -0
  38. package/src/runtime.ts +1 -1
@@ -20,6 +20,7 @@ import type {
20
20
  ErrorMessage,
21
21
  FileRequirements,
22
22
  FormSchema,
23
+ PipelineCost,
23
24
  PortalErrorResponse,
24
25
  Process,
25
26
  ProcessDetail,
@@ -36,6 +37,8 @@ import {
36
37
  FileRequirementsToJSON,
37
38
  FormSchemaFromJSON,
38
39
  FormSchemaToJSON,
40
+ PipelineCostFromJSON,
41
+ PipelineCostToJSON,
39
42
  PortalErrorResponseFromJSON,
40
43
  PortalErrorResponseToJSON,
41
44
  ProcessFromJSON,
@@ -50,6 +53,11 @@ export interface ArchiveCustomProcessRequest {
50
53
  processId: string;
51
54
  }
52
55
 
56
+ export interface CalculatePipelineCostRequest {
57
+ processId: string;
58
+ body: object;
59
+ }
60
+
53
61
  export interface CreateCustomProcessRequest {
54
62
  processDetail: ProcessDetail;
55
63
  }
@@ -124,6 +132,53 @@ export class ProcessesApi extends runtime.BaseAPI {
124
132
  await this.archiveCustomProcessRaw(requestParameters, initOverrides);
125
133
  }
126
134
 
135
+ /**
136
+ * Retrieves the cost of running the pipeline
137
+ * Calculate pipeline cost
138
+ */
139
+ async calculatePipelineCostRaw(requestParameters: CalculatePipelineCostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PipelineCost>> {
140
+ if (requestParameters.processId === null || requestParameters.processId === undefined) {
141
+ throw new runtime.RequiredError('processId','Required parameter requestParameters.processId was null or undefined when calling calculatePipelineCost.');
142
+ }
143
+
144
+ if (requestParameters.body === null || requestParameters.body === undefined) {
145
+ throw new runtime.RequiredError('body','Required parameter requestParameters.body was null or undefined when calling calculatePipelineCost.');
146
+ }
147
+
148
+ const queryParameters: any = {};
149
+
150
+ const headerParameters: runtime.HTTPHeaders = {};
151
+
152
+ headerParameters['Content-Type'] = 'application/json';
153
+
154
+ if (this.configuration && this.configuration.accessToken) {
155
+ const token = this.configuration.accessToken;
156
+ const tokenString = await token("accessToken", []);
157
+
158
+ if (tokenString) {
159
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
160
+ }
161
+ }
162
+ const response = await this.request({
163
+ path: `/processes/{processId}/cost`.replace(`{${"processId"}}`, encodeURIComponent(String(requestParameters.processId))),
164
+ method: 'POST',
165
+ headers: headerParameters,
166
+ query: queryParameters,
167
+ body: requestParameters.body as any,
168
+ }, initOverrides);
169
+
170
+ return new runtime.JSONApiResponse(response, (jsonValue) => PipelineCostFromJSON(jsonValue));
171
+ }
172
+
173
+ /**
174
+ * Retrieves the cost of running the pipeline
175
+ * Calculate pipeline cost
176
+ */
177
+ async calculatePipelineCost(requestParameters: CalculatePipelineCostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PipelineCost> {
178
+ const response = await this.calculatePipelineCostRaw(requestParameters, initOverrides);
179
+ return await response.value();
180
+ }
181
+
127
182
  /**
128
183
  * Creates a custom data type or pipeline which you can use in the listed projects.
129
184
  * Create custom process
@@ -15,8 +15,11 @@
15
15
 
16
16
  import * as runtime from '../runtime';
17
17
  import type {
18
+ ApproveProjectAccessRequest,
19
+ CreateProjectAccessRequest,
18
20
  CreateResponse,
19
21
  Project,
22
+ ProjectAccessRequest,
20
23
  ProjectDetail,
21
24
  ProjectRequest,
22
25
  ProjectUser,
@@ -24,10 +27,16 @@ import type {
24
27
  Tag,
25
28
  } from '../models/index';
26
29
  import {
30
+ ApproveProjectAccessRequestFromJSON,
31
+ ApproveProjectAccessRequestToJSON,
32
+ CreateProjectAccessRequestFromJSON,
33
+ CreateProjectAccessRequestToJSON,
27
34
  CreateResponseFromJSON,
28
35
  CreateResponseToJSON,
29
36
  ProjectFromJSON,
30
37
  ProjectToJSON,
38
+ ProjectAccessRequestFromJSON,
39
+ ProjectAccessRequestToJSON,
31
40
  ProjectDetailFromJSON,
32
41
  ProjectDetailToJSON,
33
42
  ProjectRequestFromJSON,
@@ -40,10 +49,31 @@ import {
40
49
  TagToJSON,
41
50
  } from '../models/index';
42
51
 
52
+ export interface ApproveAccessRequestRequest {
53
+ projectId: string;
54
+ accessRequestId: string;
55
+ approveProjectAccessRequest: ApproveProjectAccessRequest;
56
+ }
57
+
58
+ export interface CreateAccessRequestRequest {
59
+ projectId: string;
60
+ createProjectAccessRequest: CreateProjectAccessRequest;
61
+ }
62
+
43
63
  export interface CreateProjectRequest {
44
64
  projectRequest: ProjectRequest;
45
65
  }
46
66
 
67
+ export interface DenyAccessRequestRequest {
68
+ projectId: string;
69
+ accessRequestId: string;
70
+ }
71
+
72
+ export interface GetAccessRequestsRequest {
73
+ projectId: string;
74
+ includeClosed?: boolean;
75
+ }
76
+
47
77
  export interface GetProjectRequest {
48
78
  projectId: string;
49
79
  }
@@ -76,6 +106,103 @@ export interface UpdateProjectTagsRequest {
76
106
  */
77
107
  export class ProjectsApi extends runtime.BaseAPI {
78
108
 
109
+ /**
110
+ * Approves an access request for the project
111
+ * Approve access request
112
+ */
113
+ async approveAccessRequestRaw(requestParameters: ApproveAccessRequestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
114
+ if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
115
+ throw new runtime.RequiredError('projectId','Required parameter requestParameters.projectId was null or undefined when calling approveAccessRequest.');
116
+ }
117
+
118
+ if (requestParameters.accessRequestId === null || requestParameters.accessRequestId === undefined) {
119
+ throw new runtime.RequiredError('accessRequestId','Required parameter requestParameters.accessRequestId was null or undefined when calling approveAccessRequest.');
120
+ }
121
+
122
+ if (requestParameters.approveProjectAccessRequest === null || requestParameters.approveProjectAccessRequest === undefined) {
123
+ throw new runtime.RequiredError('approveProjectAccessRequest','Required parameter requestParameters.approveProjectAccessRequest was null or undefined when calling approveAccessRequest.');
124
+ }
125
+
126
+ const queryParameters: any = {};
127
+
128
+ const headerParameters: runtime.HTTPHeaders = {};
129
+
130
+ headerParameters['Content-Type'] = 'application/json';
131
+
132
+ if (this.configuration && this.configuration.accessToken) {
133
+ const token = this.configuration.accessToken;
134
+ const tokenString = await token("accessToken", []);
135
+
136
+ if (tokenString) {
137
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
138
+ }
139
+ }
140
+ const response = await this.request({
141
+ path: `/projects/{projectId}/access-requests/{accessRequestId}:approve`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))).replace(`{${"accessRequestId"}}`, encodeURIComponent(String(requestParameters.accessRequestId))),
142
+ method: 'PUT',
143
+ headers: headerParameters,
144
+ query: queryParameters,
145
+ body: ApproveProjectAccessRequestToJSON(requestParameters.approveProjectAccessRequest),
146
+ }, initOverrides);
147
+
148
+ return new runtime.VoidApiResponse(response);
149
+ }
150
+
151
+ /**
152
+ * Approves an access request for the project
153
+ * Approve access request
154
+ */
155
+ async approveAccessRequest(requestParameters: ApproveAccessRequestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
156
+ await this.approveAccessRequestRaw(requestParameters, initOverrides);
157
+ }
158
+
159
+ /**
160
+ * Creates an access request for the project
161
+ * Create access request
162
+ */
163
+ async createAccessRequestRaw(requestParameters: CreateAccessRequestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateResponse>> {
164
+ if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
165
+ throw new runtime.RequiredError('projectId','Required parameter requestParameters.projectId was null or undefined when calling createAccessRequest.');
166
+ }
167
+
168
+ if (requestParameters.createProjectAccessRequest === null || requestParameters.createProjectAccessRequest === undefined) {
169
+ throw new runtime.RequiredError('createProjectAccessRequest','Required parameter requestParameters.createProjectAccessRequest was null or undefined when calling createAccessRequest.');
170
+ }
171
+
172
+ const queryParameters: any = {};
173
+
174
+ const headerParameters: runtime.HTTPHeaders = {};
175
+
176
+ headerParameters['Content-Type'] = 'application/json';
177
+
178
+ if (this.configuration && this.configuration.accessToken) {
179
+ const token = this.configuration.accessToken;
180
+ const tokenString = await token("accessToken", []);
181
+
182
+ if (tokenString) {
183
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
184
+ }
185
+ }
186
+ const response = await this.request({
187
+ path: `/projects/{projectId}/access-requests`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))),
188
+ method: 'POST',
189
+ headers: headerParameters,
190
+ query: queryParameters,
191
+ body: CreateProjectAccessRequestToJSON(requestParameters.createProjectAccessRequest),
192
+ }, initOverrides);
193
+
194
+ return new runtime.JSONApiResponse(response, (jsonValue) => CreateResponseFromJSON(jsonValue));
195
+ }
196
+
197
+ /**
198
+ * Creates an access request for the project
199
+ * Create access request
200
+ */
201
+ async createAccessRequest(requestParameters: CreateAccessRequestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateResponse> {
202
+ const response = await this.createAccessRequestRaw(requestParameters, initOverrides);
203
+ return await response.value();
204
+ }
205
+
79
206
  /**
80
207
  * Creates a project
81
208
  * Create project
@@ -119,6 +246,129 @@ export class ProjectsApi extends runtime.BaseAPI {
119
246
  return await response.value();
120
247
  }
121
248
 
249
+ /**
250
+ * Denies an access request for the project
251
+ * Deny access request
252
+ */
253
+ async denyAccessRequestRaw(requestParameters: DenyAccessRequestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
254
+ if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
255
+ throw new runtime.RequiredError('projectId','Required parameter requestParameters.projectId was null or undefined when calling denyAccessRequest.');
256
+ }
257
+
258
+ if (requestParameters.accessRequestId === null || requestParameters.accessRequestId === undefined) {
259
+ throw new runtime.RequiredError('accessRequestId','Required parameter requestParameters.accessRequestId was null or undefined when calling denyAccessRequest.');
260
+ }
261
+
262
+ const queryParameters: any = {};
263
+
264
+ const headerParameters: runtime.HTTPHeaders = {};
265
+
266
+ if (this.configuration && this.configuration.accessToken) {
267
+ const token = this.configuration.accessToken;
268
+ const tokenString = await token("accessToken", []);
269
+
270
+ if (tokenString) {
271
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
272
+ }
273
+ }
274
+ const response = await this.request({
275
+ path: `/projects/{projectId}/access-requests/{accessRequestId}:deny`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))).replace(`{${"accessRequestId"}}`, encodeURIComponent(String(requestParameters.accessRequestId))),
276
+ method: 'PUT',
277
+ headers: headerParameters,
278
+ query: queryParameters,
279
+ }, initOverrides);
280
+
281
+ return new runtime.VoidApiResponse(response);
282
+ }
283
+
284
+ /**
285
+ * Denies an access request for the project
286
+ * Deny access request
287
+ */
288
+ async denyAccessRequest(requestParameters: DenyAccessRequestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
289
+ await this.denyAccessRequestRaw(requestParameters, initOverrides);
290
+ }
291
+
292
+ /**
293
+ * Gets users who have requested access to the project
294
+ * Get access requests
295
+ */
296
+ async getAccessRequestsRaw(requestParameters: GetAccessRequestsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ProjectAccessRequest>>> {
297
+ if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
298
+ throw new runtime.RequiredError('projectId','Required parameter requestParameters.projectId was null or undefined when calling getAccessRequests.');
299
+ }
300
+
301
+ const queryParameters: any = {};
302
+
303
+ if (requestParameters.includeClosed !== undefined) {
304
+ queryParameters['includeClosed'] = requestParameters.includeClosed;
305
+ }
306
+
307
+ const headerParameters: runtime.HTTPHeaders = {};
308
+
309
+ if (this.configuration && this.configuration.accessToken) {
310
+ const token = this.configuration.accessToken;
311
+ const tokenString = await token("accessToken", []);
312
+
313
+ if (tokenString) {
314
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
315
+ }
316
+ }
317
+ const response = await this.request({
318
+ path: `/projects/{projectId}/access-requests`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))),
319
+ method: 'GET',
320
+ headers: headerParameters,
321
+ query: queryParameters,
322
+ }, initOverrides);
323
+
324
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ProjectAccessRequestFromJSON));
325
+ }
326
+
327
+ /**
328
+ * Gets users who have requested access to the project
329
+ * Get access requests
330
+ */
331
+ async getAccessRequests(requestParameters: GetAccessRequestsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ProjectAccessRequest>> {
332
+ const response = await this.getAccessRequestsRaw(requestParameters, initOverrides);
333
+ return await response.value();
334
+ }
335
+
336
+ /**
337
+ * Retrieve a list of projects that a user can request access to
338
+ * Get discoverable projects
339
+ */
340
+ async getDiscoverableProjectsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Project>>> {
341
+ const queryParameters: any = {};
342
+
343
+ const headerParameters: runtime.HTTPHeaders = {};
344
+
345
+ if (this.configuration && this.configuration.accessToken) {
346
+ const token = this.configuration.accessToken;
347
+ const tokenString = await token("accessToken", []);
348
+
349
+ if (tokenString) {
350
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
351
+ }
352
+ }
353
+ const response = await this.request({
354
+ path: `/projects/discover`,
355
+ method: 'GET',
356
+ headers: headerParameters,
357
+ query: queryParameters,
358
+ }, initOverrides);
359
+
360
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ProjectFromJSON));
361
+ }
362
+
363
+ /**
364
+ * Retrieve a list of projects that a user can request access to
365
+ * Get discoverable projects
366
+ */
367
+ async getDiscoverableProjects(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Project>> {
368
+ const response = await this.getDiscoverableProjectsRaw(initOverrides);
369
+ return await response.value();
370
+ }
371
+
122
372
  /**
123
373
  * Get detailed project information
124
374
  * Get project
@@ -0,0 +1,73 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Cirro Data
5
+ * Cirro Data Platform service API
6
+ *
7
+ * The version of the OpenAPI document: latest
8
+ * Contact: support@cirro.bio
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 type { ProjectRole } from './ProjectRole';
17
+ import {
18
+ ProjectRoleFromJSON,
19
+ ProjectRoleFromJSONTyped,
20
+ ProjectRoleToJSON,
21
+ } from './ProjectRole';
22
+
23
+ /**
24
+ *
25
+ * @export
26
+ * @interface ApproveAccessRequest
27
+ */
28
+ export interface ApproveAccessRequest {
29
+ /**
30
+ *
31
+ * @type {ProjectRole}
32
+ * @memberof ApproveAccessRequest
33
+ */
34
+ role: ProjectRole;
35
+ }
36
+
37
+ /**
38
+ * Check if a given object implements the ApproveAccessRequest interface.
39
+ */
40
+ export function instanceOfApproveAccessRequest(value: object): boolean {
41
+ let isInstance = true;
42
+ isInstance = isInstance && "role" in value;
43
+
44
+ return isInstance;
45
+ }
46
+
47
+ export function ApproveAccessRequestFromJSON(json: any): ApproveAccessRequest {
48
+ return ApproveAccessRequestFromJSONTyped(json, false);
49
+ }
50
+
51
+ export function ApproveAccessRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApproveAccessRequest {
52
+ if ((json === undefined) || (json === null)) {
53
+ return json;
54
+ }
55
+ return {
56
+
57
+ 'role': ProjectRoleFromJSON(json['role']),
58
+ };
59
+ }
60
+
61
+ export function ApproveAccessRequestToJSON(value?: ApproveAccessRequest | null): any {
62
+ if (value === undefined) {
63
+ return undefined;
64
+ }
65
+ if (value === null) {
66
+ return null;
67
+ }
68
+ return {
69
+
70
+ 'role': ProjectRoleToJSON(value.role),
71
+ };
72
+ }
73
+
@@ -0,0 +1,73 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Cirro Data
5
+ * Cirro Data Platform service API
6
+ *
7
+ * The version of the OpenAPI document: latest
8
+ * Contact: support@cirro.bio
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 type { ProjectRole } from './ProjectRole';
17
+ import {
18
+ ProjectRoleFromJSON,
19
+ ProjectRoleFromJSONTyped,
20
+ ProjectRoleToJSON,
21
+ } from './ProjectRole';
22
+
23
+ /**
24
+ *
25
+ * @export
26
+ * @interface ApproveProjectAccessRequest
27
+ */
28
+ export interface ApproveProjectAccessRequest {
29
+ /**
30
+ *
31
+ * @type {ProjectRole}
32
+ * @memberof ApproveProjectAccessRequest
33
+ */
34
+ role: ProjectRole;
35
+ }
36
+
37
+ /**
38
+ * Check if a given object implements the ApproveProjectAccessRequest interface.
39
+ */
40
+ export function instanceOfApproveProjectAccessRequest(value: object): boolean {
41
+ let isInstance = true;
42
+ isInstance = isInstance && "role" in value;
43
+
44
+ return isInstance;
45
+ }
46
+
47
+ export function ApproveProjectAccessRequestFromJSON(json: any): ApproveProjectAccessRequest {
48
+ return ApproveProjectAccessRequestFromJSONTyped(json, false);
49
+ }
50
+
51
+ export function ApproveProjectAccessRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApproveProjectAccessRequest {
52
+ if ((json === undefined) || (json === null)) {
53
+ return json;
54
+ }
55
+ return {
56
+
57
+ 'role': ProjectRoleFromJSON(json['role']),
58
+ };
59
+ }
60
+
61
+ export function ApproveProjectAccessRequestToJSON(value?: ApproveProjectAccessRequest | null): any {
62
+ if (value === undefined) {
63
+ return undefined;
64
+ }
65
+ if (value === null) {
66
+ return null;
67
+ }
68
+ return {
69
+
70
+ 'role': ProjectRoleToJSON(value.role),
71
+ };
72
+ }
73
+
@@ -0,0 +1,82 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Cirro Data
5
+ * Cirro Data Platform service API
6
+ *
7
+ * The version of the OpenAPI document: latest
8
+ * Contact: support@cirro.bio
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 type { ProjectRole } from './ProjectRole';
17
+ import {
18
+ ProjectRoleFromJSON,
19
+ ProjectRoleFromJSONTyped,
20
+ ProjectRoleToJSON,
21
+ } from './ProjectRole';
22
+
23
+ /**
24
+ *
25
+ * @export
26
+ * @interface CreateProjectAccessRequest
27
+ */
28
+ export interface CreateProjectAccessRequest {
29
+ /**
30
+ *
31
+ * @type {ProjectRole}
32
+ * @memberof CreateProjectAccessRequest
33
+ */
34
+ role: ProjectRole;
35
+ /**
36
+ *
37
+ * @type {string}
38
+ * @memberof CreateProjectAccessRequest
39
+ */
40
+ message: string;
41
+ }
42
+
43
+ /**
44
+ * Check if a given object implements the CreateProjectAccessRequest interface.
45
+ */
46
+ export function instanceOfCreateProjectAccessRequest(value: object): boolean {
47
+ let isInstance = true;
48
+ isInstance = isInstance && "role" in value;
49
+ isInstance = isInstance && "message" in value;
50
+
51
+ return isInstance;
52
+ }
53
+
54
+ export function CreateProjectAccessRequestFromJSON(json: any): CreateProjectAccessRequest {
55
+ return CreateProjectAccessRequestFromJSONTyped(json, false);
56
+ }
57
+
58
+ export function CreateProjectAccessRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateProjectAccessRequest {
59
+ if ((json === undefined) || (json === null)) {
60
+ return json;
61
+ }
62
+ return {
63
+
64
+ 'role': ProjectRoleFromJSON(json['role']),
65
+ 'message': json['message'],
66
+ };
67
+ }
68
+
69
+ export function CreateProjectAccessRequestToJSON(value?: CreateProjectAccessRequest | null): any {
70
+ if (value === undefined) {
71
+ return undefined;
72
+ }
73
+ if (value === null) {
74
+ return null;
75
+ }
76
+ return {
77
+
78
+ 'role': ProjectRoleToJSON(value.role),
79
+ 'message': value.message,
80
+ };
81
+ }
82
+
@@ -0,0 +1,81 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Cirro Data
5
+ * Cirro Data Platform service API
6
+ *
7
+ * The version of the OpenAPI document: latest
8
+ * Contact: support@cirro.bio
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
+ /**
17
+ *
18
+ * @export
19
+ * @interface PipelineCost
20
+ */
21
+ export interface PipelineCost {
22
+ /**
23
+ * The total cost of running the pipeline
24
+ * @type {number}
25
+ * @memberof PipelineCost
26
+ */
27
+ totalCost?: number | null;
28
+ /**
29
+ * Is this an estimate of the cost?
30
+ * @type {boolean}
31
+ * @memberof PipelineCost
32
+ */
33
+ isEstimate?: boolean;
34
+ /**
35
+ * Description of the cost calculation
36
+ * @type {string}
37
+ * @memberof PipelineCost
38
+ */
39
+ description?: string;
40
+ }
41
+
42
+ /**
43
+ * Check if a given object implements the PipelineCost interface.
44
+ */
45
+ export function instanceOfPipelineCost(value: object): boolean {
46
+ let isInstance = true;
47
+
48
+ return isInstance;
49
+ }
50
+
51
+ export function PipelineCostFromJSON(json: any): PipelineCost {
52
+ return PipelineCostFromJSONTyped(json, false);
53
+ }
54
+
55
+ export function PipelineCostFromJSONTyped(json: any, ignoreDiscriminator: boolean): PipelineCost {
56
+ if ((json === undefined) || (json === null)) {
57
+ return json;
58
+ }
59
+ return {
60
+
61
+ 'totalCost': !exists(json, 'totalCost') ? undefined : json['totalCost'],
62
+ 'isEstimate': !exists(json, 'isEstimate') ? undefined : json['isEstimate'],
63
+ 'description': !exists(json, 'description') ? undefined : json['description'],
64
+ };
65
+ }
66
+
67
+ export function PipelineCostToJSON(value?: PipelineCost | null): any {
68
+ if (value === undefined) {
69
+ return undefined;
70
+ }
71
+ if (value === null) {
72
+ return null;
73
+ }
74
+ return {
75
+
76
+ 'totalCost': value.totalCost,
77
+ 'isEstimate': value.isEstimate,
78
+ 'description': value.description,
79
+ };
80
+ }
81
+