@cirrobio/api-client 0.1.11 → 0.1.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.
- package/.openapi-generator/FILES +4 -0
- package/README.md +1 -1
- package/dist/apis/AuditApi.d.ts +18 -2
- package/dist/apis/AuditApi.js +23 -4
- package/dist/apis/ProjectsApi.d.ts +68 -1
- package/dist/apis/ProjectsApi.js +287 -0
- package/dist/models/ApproveAccessRequest.d.ts +32 -0
- package/dist/models/ApproveAccessRequest.js +51 -0
- package/dist/models/ApproveProjectAccessRequest.d.ts +32 -0
- package/dist/models/ApproveProjectAccessRequest.js +51 -0
- package/dist/models/CreateProjectAccessRequest.d.ts +38 -0
- package/dist/models/CreateProjectAccessRequest.js +54 -0
- package/dist/models/PipelineCost.d.ts +1 -1
- package/dist/models/ProjectAccessRequest.d.ts +81 -0
- package/dist/models/ProjectAccessRequest.js +76 -0
- package/dist/models/ProjectSettings.d.ts +6 -0
- package/dist/models/ProjectSettings.js +2 -0
- package/dist/models/RequestStatus.d.ts +24 -0
- package/dist/models/RequestStatus.js +39 -0
- package/dist/models/Sample.d.ts +5 -5
- package/dist/models/Sample.js +7 -10
- package/dist/models/index.d.ts +4 -0
- package/dist/models/index.js +4 -0
- package/package.json +1 -1
- package/src/apis/AuditApi.ts +27 -6
- package/src/apis/ProjectsApi.ts +250 -0
- package/src/models/ApproveAccessRequest.ts +73 -0
- package/src/models/ApproveProjectAccessRequest.ts +73 -0
- package/src/models/CreateProjectAccessRequest.ts +82 -0
- package/src/models/PipelineCost.ts +1 -1
- package/src/models/ProjectAccessRequest.ts +151 -0
- package/src/models/ProjectSettings.ts +8 -0
- package/src/models/RequestStatus.ts +38 -0
- package/src/models/Sample.ts +10 -14
- package/src/models/index.ts +4 -0
package/src/apis/ProjectsApi.ts
CHANGED
|
@@ -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,151 @@
|
|
|
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
|
+
import type { RequestStatus } from './RequestStatus';
|
|
23
|
+
import {
|
|
24
|
+
RequestStatusFromJSON,
|
|
25
|
+
RequestStatusFromJSONTyped,
|
|
26
|
+
RequestStatusToJSON,
|
|
27
|
+
} from './RequestStatus';
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @export
|
|
32
|
+
* @interface ProjectAccessRequest
|
|
33
|
+
*/
|
|
34
|
+
export interface ProjectAccessRequest {
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @type {string}
|
|
38
|
+
* @memberof ProjectAccessRequest
|
|
39
|
+
*/
|
|
40
|
+
id: string;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @type {string}
|
|
44
|
+
* @memberof ProjectAccessRequest
|
|
45
|
+
*/
|
|
46
|
+
username: string;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @type {string}
|
|
50
|
+
* @memberof ProjectAccessRequest
|
|
51
|
+
*/
|
|
52
|
+
projectId: string;
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @type {ProjectRole}
|
|
56
|
+
* @memberof ProjectAccessRequest
|
|
57
|
+
*/
|
|
58
|
+
role: ProjectRole;
|
|
59
|
+
/**
|
|
60
|
+
*
|
|
61
|
+
* @type {string}
|
|
62
|
+
* @memberof ProjectAccessRequest
|
|
63
|
+
*/
|
|
64
|
+
message: string;
|
|
65
|
+
/**
|
|
66
|
+
*
|
|
67
|
+
* @type {RequestStatus}
|
|
68
|
+
* @memberof ProjectAccessRequest
|
|
69
|
+
*/
|
|
70
|
+
status: RequestStatus;
|
|
71
|
+
/**
|
|
72
|
+
*
|
|
73
|
+
* @type {string}
|
|
74
|
+
* @memberof ProjectAccessRequest
|
|
75
|
+
*/
|
|
76
|
+
reviewerUsername: string;
|
|
77
|
+
/**
|
|
78
|
+
*
|
|
79
|
+
* @type {Date}
|
|
80
|
+
* @memberof ProjectAccessRequest
|
|
81
|
+
*/
|
|
82
|
+
createdAt: Date;
|
|
83
|
+
/**
|
|
84
|
+
*
|
|
85
|
+
* @type {Date}
|
|
86
|
+
* @memberof ProjectAccessRequest
|
|
87
|
+
*/
|
|
88
|
+
expiry: Date;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Check if a given object implements the ProjectAccessRequest interface.
|
|
93
|
+
*/
|
|
94
|
+
export function instanceOfProjectAccessRequest(value: object): boolean {
|
|
95
|
+
let isInstance = true;
|
|
96
|
+
isInstance = isInstance && "id" in value;
|
|
97
|
+
isInstance = isInstance && "username" in value;
|
|
98
|
+
isInstance = isInstance && "projectId" in value;
|
|
99
|
+
isInstance = isInstance && "role" in value;
|
|
100
|
+
isInstance = isInstance && "message" in value;
|
|
101
|
+
isInstance = isInstance && "status" in value;
|
|
102
|
+
isInstance = isInstance && "reviewerUsername" in value;
|
|
103
|
+
isInstance = isInstance && "createdAt" in value;
|
|
104
|
+
isInstance = isInstance && "expiry" in value;
|
|
105
|
+
|
|
106
|
+
return isInstance;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export function ProjectAccessRequestFromJSON(json: any): ProjectAccessRequest {
|
|
110
|
+
return ProjectAccessRequestFromJSONTyped(json, false);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export function ProjectAccessRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProjectAccessRequest {
|
|
114
|
+
if ((json === undefined) || (json === null)) {
|
|
115
|
+
return json;
|
|
116
|
+
}
|
|
117
|
+
return {
|
|
118
|
+
|
|
119
|
+
'id': json['id'],
|
|
120
|
+
'username': json['username'],
|
|
121
|
+
'projectId': json['projectId'],
|
|
122
|
+
'role': ProjectRoleFromJSON(json['role']),
|
|
123
|
+
'message': json['message'],
|
|
124
|
+
'status': RequestStatusFromJSON(json['status']),
|
|
125
|
+
'reviewerUsername': json['reviewerUsername'],
|
|
126
|
+
'createdAt': (new Date(json['createdAt'])),
|
|
127
|
+
'expiry': (new Date(json['expiry'])),
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export function ProjectAccessRequestToJSON(value?: ProjectAccessRequest | null): any {
|
|
132
|
+
if (value === undefined) {
|
|
133
|
+
return undefined;
|
|
134
|
+
}
|
|
135
|
+
if (value === null) {
|
|
136
|
+
return null;
|
|
137
|
+
}
|
|
138
|
+
return {
|
|
139
|
+
|
|
140
|
+
'id': value.id,
|
|
141
|
+
'username': value.username,
|
|
142
|
+
'projectId': value.projectId,
|
|
143
|
+
'role': ProjectRoleToJSON(value.role),
|
|
144
|
+
'message': value.message,
|
|
145
|
+
'status': RequestStatusToJSON(value.status),
|
|
146
|
+
'reviewerUsername': value.reviewerUsername,
|
|
147
|
+
'createdAt': (value.createdAt.toISOString()),
|
|
148
|
+
'expiry': (value.expiry.toISOString()),
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
|