@cirrobio/api-client 0.0.13-alpha → 0.0.15-alpha

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.
@@ -39,6 +39,7 @@ src/models/NotebookInstance.ts
39
39
  src/models/NotebookInstanceStatusResponse.ts
40
40
  src/models/OpenNotebookInstanceResponse.ts
41
41
  src/models/PaginatedResponseDatasetListDto.ts
42
+ src/models/PaginatedResponseSampleDto.ts
42
43
  src/models/Process.ts
43
44
  src/models/ProcessDetail.ts
44
45
  src/models/Project.ts
@@ -53,6 +54,7 @@ src/models/ReferenceType.ts
53
54
  src/models/RegisterDatasetRequest.ts
54
55
  src/models/RegisterPublicDataRequest.ts
55
56
  src/models/Sample.ts
57
+ src/models/SampleRequest.ts
56
58
  src/models/ServiceConnection.ts
57
59
  src/models/SetUserProjectRoleRequest.ts
58
60
  src/models/Status.ts
package/README.md CHANGED
@@ -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 @cirrobio/api-client@0.0.13-alpha --save
39
+ npm install @cirrobio/api-client@0.0.15-alpha --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
@@ -10,16 +10,19 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { FormSchema, Sample } from '../models/index';
13
+ import type { FormSchema, PaginatedResponseSampleDto, Sample, SampleRequest } from '../models/index';
14
14
  export interface GetProjectSamplesRequest {
15
15
  projectId: string;
16
+ limit?: number;
17
+ nextToken?: string;
16
18
  }
17
19
  export interface GetProjectSchemaRequest {
18
20
  projectId: string;
19
21
  }
20
22
  export interface UpdateSampleRequest {
21
23
  projectId: string;
22
- sample: Sample;
24
+ sampleId: string;
25
+ sampleRequest: SampleRequest;
23
26
  }
24
27
  /**
25
28
  *
@@ -28,11 +31,11 @@ export declare class MetadataApi extends runtime.BaseAPI {
28
31
  /**
29
32
  * Get project samples
30
33
  */
31
- getProjectSamplesRaw(requestParameters: GetProjectSamplesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Sample>>>;
34
+ getProjectSamplesRaw(requestParameters: GetProjectSamplesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResponseSampleDto>>;
32
35
  /**
33
36
  * Get project samples
34
37
  */
35
- getProjectSamples(requestParameters: GetProjectSamplesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Sample>>;
38
+ getProjectSamples(requestParameters: GetProjectSamplesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseSampleDto>;
36
39
  /**
37
40
  * Get project metadata schema
38
41
  */
@@ -88,6 +88,12 @@ var MetadataApi = /** @class */ (function (_super) {
88
88
  throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling getProjectSamples.');
89
89
  }
90
90
  queryParameters = {};
91
+ if (requestParameters.limit !== undefined) {
92
+ queryParameters['limit'] = requestParameters.limit;
93
+ }
94
+ if (requestParameters.nextToken !== undefined) {
95
+ queryParameters['nextToken'] = requestParameters.nextToken;
96
+ }
91
97
  headerParameters = {};
92
98
  if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
93
99
  token = this.configuration.accessToken;
@@ -106,7 +112,7 @@ var MetadataApi = /** @class */ (function (_super) {
106
112
  }, initOverrides)];
107
113
  case 3:
108
114
  response = _a.sent();
109
- return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return jsonValue.map(index_1.SampleFromJSON); })];
115
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.PaginatedResponseSampleDtoFromJSON)(jsonValue); })];
110
116
  }
111
117
  });
112
118
  });
@@ -193,8 +199,11 @@ var MetadataApi = /** @class */ (function (_super) {
193
199
  if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
194
200
  throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling updateSample.');
195
201
  }
196
- if (requestParameters.sample === null || requestParameters.sample === undefined) {
197
- throw new runtime.RequiredError('sample', 'Required parameter requestParameters.sample was null or undefined when calling updateSample.');
202
+ if (requestParameters.sampleId === null || requestParameters.sampleId === undefined) {
203
+ throw new runtime.RequiredError('sampleId', 'Required parameter requestParameters.sampleId was null or undefined when calling updateSample.');
204
+ }
205
+ if (requestParameters.sampleRequest === null || requestParameters.sampleRequest === undefined) {
206
+ throw new runtime.RequiredError('sampleRequest', 'Required parameter requestParameters.sampleRequest was null or undefined when calling updateSample.');
198
207
  }
199
208
  queryParameters = {};
200
209
  headerParameters = {};
@@ -209,11 +218,11 @@ var MetadataApi = /** @class */ (function (_super) {
209
218
  }
210
219
  _a.label = 2;
211
220
  case 2: return [4 /*yield*/, this.request({
212
- path: "/projects/{projectId}/samples".replace("{".concat("projectId", "}"), encodeURIComponent(String(requestParameters.projectId))),
221
+ path: "/projects/{projectId}/samples/{sampleId}".replace("{".concat("projectId", "}"), encodeURIComponent(String(requestParameters.projectId))).replace("{".concat("sampleId", "}"), encodeURIComponent(String(requestParameters.sampleId))),
213
222
  method: 'PUT',
214
223
  headers: headerParameters,
215
224
  query: queryParameters,
216
- body: (0, index_1.SampleToJSON)(requestParameters.sample),
225
+ body: (0, index_1.SampleRequestToJSON)(requestParameters.sampleRequest),
217
226
  }, initOverrides)];
218
227
  case 3:
219
228
  response = _a.sent();
@@ -20,25 +20,25 @@ export interface Contact {
20
20
  * @type {string}
21
21
  * @memberof Contact
22
22
  */
23
- name?: string;
23
+ name: string;
24
24
  /**
25
25
  *
26
26
  * @type {string}
27
27
  * @memberof Contact
28
28
  */
29
- organization?: string;
29
+ organization: string;
30
30
  /**
31
31
  *
32
32
  * @type {string}
33
33
  * @memberof Contact
34
34
  */
35
- email?: string;
35
+ email: string;
36
36
  /**
37
37
  *
38
38
  * @type {string}
39
39
  * @memberof Contact
40
40
  */
41
- phone?: string;
41
+ phone: string;
42
42
  }
43
43
  /**
44
44
  * Check if a given object implements the Contact interface.
@@ -14,12 +14,15 @@
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.ContactToJSON = exports.ContactFromJSONTyped = exports.ContactFromJSON = exports.instanceOfContact = void 0;
17
- var runtime_1 = require("../runtime");
18
17
  /**
19
18
  * Check if a given object implements the Contact interface.
20
19
  */
21
20
  function instanceOfContact(value) {
22
21
  var isInstance = true;
22
+ isInstance = isInstance && "name" in value;
23
+ isInstance = isInstance && "organization" in value;
24
+ isInstance = isInstance && "email" in value;
25
+ isInstance = isInstance && "phone" in value;
23
26
  return isInstance;
24
27
  }
25
28
  exports.instanceOfContact = instanceOfContact;
@@ -32,10 +35,10 @@ function ContactFromJSONTyped(json, ignoreDiscriminator) {
32
35
  return json;
33
36
  }
34
37
  return {
35
- 'name': !(0, runtime_1.exists)(json, 'name') ? undefined : json['name'],
36
- 'organization': !(0, runtime_1.exists)(json, 'organization') ? undefined : json['organization'],
37
- 'email': !(0, runtime_1.exists)(json, 'email') ? undefined : json['email'],
38
- 'phone': !(0, runtime_1.exists)(json, 'phone') ? undefined : json['phone'],
38
+ 'name': json['name'],
39
+ 'organization': json['organization'],
40
+ 'email': json['email'],
41
+ 'phone': json['phone'],
39
42
  };
40
43
  }
41
44
  exports.ContactFromJSONTyped = ContactFromJSONTyped;
@@ -33,6 +33,12 @@ export interface Dashboard {
33
33
  * @memberof Dashboard
34
34
  */
35
35
  description: string;
36
+ /**
37
+ *
38
+ * @type {Array<string>}
39
+ * @memberof Dashboard
40
+ */
41
+ processIds: Array<string>;
36
42
  /**
37
43
  *
38
44
  * @type {{ [key: string]: any; }}
@@ -22,6 +22,7 @@ function instanceOfDashboard(value) {
22
22
  isInstance = isInstance && "id" in value;
23
23
  isInstance = isInstance && "name" in value;
24
24
  isInstance = isInstance && "description" in value;
25
+ isInstance = isInstance && "processIds" in value;
25
26
  isInstance = isInstance && "dashboardData" in value;
26
27
  isInstance = isInstance && "info" in value;
27
28
  isInstance = isInstance && "createdBy" in value;
@@ -42,6 +43,7 @@ function DashboardFromJSONTyped(json, ignoreDiscriminator) {
42
43
  'id': json['id'],
43
44
  'name': json['name'],
44
45
  'description': json['description'],
46
+ 'processIds': json['processIds'],
45
47
  'dashboardData': json['dashboardData'],
46
48
  'info': json['info'],
47
49
  'createdBy': json['createdBy'],
@@ -61,6 +63,7 @@ function DashboardToJSON(value) {
61
63
  'id': value.id,
62
64
  'name': value.name,
63
65
  'description': value.description,
66
+ 'processIds': value.processIds,
64
67
  'dashboardData': value.dashboardData,
65
68
  'info': value.info,
66
69
  'createdBy': value.createdBy,
@@ -27,6 +27,12 @@ export interface DashboardRequest {
27
27
  * @memberof DashboardRequest
28
28
  */
29
29
  description: string;
30
+ /**
31
+ *
32
+ * @type {Array<string>}
33
+ * @memberof DashboardRequest
34
+ */
35
+ processIds: Array<string>;
30
36
  /**
31
37
  *
32
38
  * @type {{ [key: string]: any; }}
@@ -21,6 +21,7 @@ function instanceOfDashboardRequest(value) {
21
21
  var isInstance = true;
22
22
  isInstance = isInstance && "name" in value;
23
23
  isInstance = isInstance && "description" in value;
24
+ isInstance = isInstance && "processIds" in value;
24
25
  isInstance = isInstance && "dashboardData" in value;
25
26
  isInstance = isInstance && "info" in value;
26
27
  return isInstance;
@@ -37,6 +38,7 @@ function DashboardRequestFromJSONTyped(json, ignoreDiscriminator) {
37
38
  return {
38
39
  'name': json['name'],
39
40
  'description': json['description'],
41
+ 'processIds': json['processIds'],
40
42
  'dashboardData': json['dashboardData'],
41
43
  'info': json['info'],
42
44
  };
@@ -52,6 +54,7 @@ function DashboardRequestToJSON(value) {
52
54
  return {
53
55
  'name': value.name,
54
56
  'description': value.description,
57
+ 'processIds': value.processIds,
55
58
  'dashboardData': value.dashboardData,
56
59
  'info': value.info,
57
60
  };
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { Status } from './Status';
12
13
  /**
13
14
  *
14
15
  * @export
@@ -27,6 +28,30 @@ export interface NotebookInstance {
27
28
  * @memberof NotebookInstance
28
29
  */
29
30
  name: string;
31
+ /**
32
+ *
33
+ * @type {Status}
34
+ * @memberof NotebookInstance
35
+ */
36
+ status: Status;
37
+ /**
38
+ *
39
+ * @type {string}
40
+ * @memberof NotebookInstance
41
+ */
42
+ instanceType: string;
43
+ /**
44
+ *
45
+ * @type {Array<string>}
46
+ * @memberof NotebookInstance
47
+ */
48
+ acceleratorTypes: Array<string>;
49
+ /**
50
+ *
51
+ * @type {number}
52
+ * @memberof NotebookInstance
53
+ */
54
+ volumeSizeGB: number;
30
55
  /**
31
56
  *
32
57
  * @type {string}
@@ -14,6 +14,7 @@
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.NotebookInstanceToJSON = exports.NotebookInstanceFromJSONTyped = exports.NotebookInstanceFromJSON = exports.instanceOfNotebookInstance = void 0;
17
+ var Status_1 = require("./Status");
17
18
  /**
18
19
  * Check if a given object implements the NotebookInstance interface.
19
20
  */
@@ -21,6 +22,10 @@ function instanceOfNotebookInstance(value) {
21
22
  var isInstance = true;
22
23
  isInstance = isInstance && "id" in value;
23
24
  isInstance = isInstance && "name" in value;
25
+ isInstance = isInstance && "status" in value;
26
+ isInstance = isInstance && "instanceType" in value;
27
+ isInstance = isInstance && "acceleratorTypes" in value;
28
+ isInstance = isInstance && "volumeSizeGB" in value;
24
29
  isInstance = isInstance && "createdBy" in value;
25
30
  return isInstance;
26
31
  }
@@ -36,6 +41,10 @@ function NotebookInstanceFromJSONTyped(json, ignoreDiscriminator) {
36
41
  return {
37
42
  'id': json['id'],
38
43
  'name': json['name'],
44
+ 'status': (0, Status_1.StatusFromJSON)(json['status']),
45
+ 'instanceType': json['instanceType'],
46
+ 'acceleratorTypes': json['acceleratorTypes'],
47
+ 'volumeSizeGB': json['volumeSizeGB'],
39
48
  'createdBy': json['createdBy'],
40
49
  };
41
50
  }
@@ -50,6 +59,10 @@ function NotebookInstanceToJSON(value) {
50
59
  return {
51
60
  'id': value.id,
52
61
  'name': value.name,
62
+ 'status': (0, Status_1.StatusToJSON)(value.status),
63
+ 'instanceType': value.instanceType,
64
+ 'acceleratorTypes': value.acceleratorTypes,
65
+ 'volumeSizeGB': value.volumeSizeGB,
53
66
  'createdBy': value.createdBy,
54
67
  };
55
68
  }
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Cirro Data
3
+ * Cirro Data Platform service API
4
+ *
5
+ * The version of the OpenAPI document: latest
6
+ * Contact: support@cirro.bio
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 { Sample } from './Sample';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface PaginatedResponseSampleDto
17
+ */
18
+ export interface PaginatedResponseSampleDto {
19
+ /**
20
+ *
21
+ * @type {Array<Sample>}
22
+ * @memberof PaginatedResponseSampleDto
23
+ */
24
+ data: Array<Sample>;
25
+ /**
26
+ *
27
+ * @type {string}
28
+ * @memberof PaginatedResponseSampleDto
29
+ */
30
+ nextToken: string;
31
+ }
32
+ /**
33
+ * Check if a given object implements the PaginatedResponseSampleDto interface.
34
+ */
35
+ export declare function instanceOfPaginatedResponseSampleDto(value: object): boolean;
36
+ export declare function PaginatedResponseSampleDtoFromJSON(json: any): PaginatedResponseSampleDto;
37
+ export declare function PaginatedResponseSampleDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedResponseSampleDto;
38
+ export declare function PaginatedResponseSampleDtoToJSON(value?: PaginatedResponseSampleDto | null): any;
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Cirro Data
6
+ * Cirro Data Platform service API
7
+ *
8
+ * The version of the OpenAPI document: latest
9
+ * Contact: support@cirro.bio
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.PaginatedResponseSampleDtoToJSON = exports.PaginatedResponseSampleDtoFromJSONTyped = exports.PaginatedResponseSampleDtoFromJSON = exports.instanceOfPaginatedResponseSampleDto = void 0;
17
+ var Sample_1 = require("./Sample");
18
+ /**
19
+ * Check if a given object implements the PaginatedResponseSampleDto interface.
20
+ */
21
+ function instanceOfPaginatedResponseSampleDto(value) {
22
+ var isInstance = true;
23
+ isInstance = isInstance && "data" in value;
24
+ isInstance = isInstance && "nextToken" in value;
25
+ return isInstance;
26
+ }
27
+ exports.instanceOfPaginatedResponseSampleDto = instanceOfPaginatedResponseSampleDto;
28
+ function PaginatedResponseSampleDtoFromJSON(json) {
29
+ return PaginatedResponseSampleDtoFromJSONTyped(json, false);
30
+ }
31
+ exports.PaginatedResponseSampleDtoFromJSON = PaginatedResponseSampleDtoFromJSON;
32
+ function PaginatedResponseSampleDtoFromJSONTyped(json, ignoreDiscriminator) {
33
+ if ((json === undefined) || (json === null)) {
34
+ return json;
35
+ }
36
+ return {
37
+ 'data': (json['data'].map(Sample_1.SampleFromJSON)),
38
+ 'nextToken': json['nextToken'],
39
+ };
40
+ }
41
+ exports.PaginatedResponseSampleDtoFromJSONTyped = PaginatedResponseSampleDtoFromJSONTyped;
42
+ function PaginatedResponseSampleDtoToJSON(value) {
43
+ if (value === undefined) {
44
+ return undefined;
45
+ }
46
+ if (value === null) {
47
+ return null;
48
+ }
49
+ return {
50
+ 'data': (value.data.map(Sample_1.SampleToJSON)),
51
+ 'nextToken': value.nextToken,
52
+ };
53
+ }
54
+ exports.PaginatedResponseSampleDtoToJSON = PaginatedResponseSampleDtoToJSON;
@@ -35,6 +35,12 @@ export interface Sample {
35
35
  metadata: {
36
36
  [key: string]: any;
37
37
  };
38
+ /**
39
+ *
40
+ * @type {Array<string>}
41
+ * @memberof Sample
42
+ */
43
+ datasetIds: Array<string>;
38
44
  /**
39
45
  *
40
46
  * @type {Date}
@@ -22,6 +22,7 @@ function instanceOfSample(value) {
22
22
  isInstance = isInstance && "id" in value;
23
23
  isInstance = isInstance && "name" in value;
24
24
  isInstance = isInstance && "metadata" in value;
25
+ isInstance = isInstance && "datasetIds" in value;
25
26
  isInstance = isInstance && "createdAt" in value;
26
27
  isInstance = isInstance && "updatedAt" in value;
27
28
  return isInstance;
@@ -39,6 +40,7 @@ function SampleFromJSONTyped(json, ignoreDiscriminator) {
39
40
  'id': json['id'],
40
41
  'name': json['name'],
41
42
  'metadata': json['metadata'],
43
+ 'datasetIds': json['datasetIds'],
42
44
  'createdAt': (new Date(json['createdAt'])),
43
45
  'updatedAt': (new Date(json['updatedAt'])),
44
46
  };
@@ -55,6 +57,7 @@ function SampleToJSON(value) {
55
57
  'id': value.id,
56
58
  'name': value.name,
57
59
  'metadata': value.metadata,
60
+ 'datasetIds': value.datasetIds,
58
61
  'createdAt': (value.createdAt.toISOString()),
59
62
  'updatedAt': (value.updatedAt.toISOString()),
60
63
  };
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Cirro Data
3
+ * Cirro Data Platform service API
4
+ *
5
+ * The version of the OpenAPI document: latest
6
+ * Contact: support@cirro.bio
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
+ /**
13
+ *
14
+ * @export
15
+ * @interface SampleRequest
16
+ */
17
+ export interface SampleRequest {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof SampleRequest
22
+ */
23
+ name: string;
24
+ /**
25
+ *
26
+ * @type {{ [key: string]: any; }}
27
+ * @memberof SampleRequest
28
+ */
29
+ metadata: {
30
+ [key: string]: any;
31
+ };
32
+ }
33
+ /**
34
+ * Check if a given object implements the SampleRequest interface.
35
+ */
36
+ export declare function instanceOfSampleRequest(value: object): boolean;
37
+ export declare function SampleRequestFromJSON(json: any): SampleRequest;
38
+ export declare function SampleRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SampleRequest;
39
+ export declare function SampleRequestToJSON(value?: SampleRequest | null): any;
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Cirro Data
6
+ * Cirro Data Platform service API
7
+ *
8
+ * The version of the OpenAPI document: latest
9
+ * Contact: support@cirro.bio
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.SampleRequestToJSON = exports.SampleRequestFromJSONTyped = exports.SampleRequestFromJSON = exports.instanceOfSampleRequest = void 0;
17
+ /**
18
+ * Check if a given object implements the SampleRequest interface.
19
+ */
20
+ function instanceOfSampleRequest(value) {
21
+ var isInstance = true;
22
+ isInstance = isInstance && "name" in value;
23
+ isInstance = isInstance && "metadata" in value;
24
+ return isInstance;
25
+ }
26
+ exports.instanceOfSampleRequest = instanceOfSampleRequest;
27
+ function SampleRequestFromJSON(json) {
28
+ return SampleRequestFromJSONTyped(json, false);
29
+ }
30
+ exports.SampleRequestFromJSON = SampleRequestFromJSON;
31
+ function SampleRequestFromJSONTyped(json, ignoreDiscriminator) {
32
+ if ((json === undefined) || (json === null)) {
33
+ return json;
34
+ }
35
+ return {
36
+ 'name': json['name'],
37
+ 'metadata': json['metadata'],
38
+ };
39
+ }
40
+ exports.SampleRequestFromJSONTyped = SampleRequestFromJSONTyped;
41
+ function SampleRequestToJSON(value) {
42
+ if (value === undefined) {
43
+ return undefined;
44
+ }
45
+ if (value === null) {
46
+ return null;
47
+ }
48
+ return {
49
+ 'name': value.name,
50
+ 'metadata': value.metadata,
51
+ };
52
+ }
53
+ exports.SampleRequestToJSON = SampleRequestToJSON;
@@ -21,6 +21,7 @@ export * from './NotebookInstance';
21
21
  export * from './NotebookInstanceStatusResponse';
22
22
  export * from './OpenNotebookInstanceResponse';
23
23
  export * from './PaginatedResponseDatasetListDto';
24
+ export * from './PaginatedResponseSampleDto';
24
25
  export * from './Process';
25
26
  export * from './ProcessDetail';
26
27
  export * from './Project';
@@ -35,6 +36,7 @@ export * from './ReferenceType';
35
36
  export * from './RegisterDatasetRequest';
36
37
  export * from './RegisterPublicDataRequest';
37
38
  export * from './Sample';
39
+ export * from './SampleRequest';
38
40
  export * from './ServiceConnection';
39
41
  export * from './SetUserProjectRoleRequest';
40
42
  export * from './Status';
@@ -39,6 +39,7 @@ __exportStar(require("./NotebookInstance"), exports);
39
39
  __exportStar(require("./NotebookInstanceStatusResponse"), exports);
40
40
  __exportStar(require("./OpenNotebookInstanceResponse"), exports);
41
41
  __exportStar(require("./PaginatedResponseDatasetListDto"), exports);
42
+ __exportStar(require("./PaginatedResponseSampleDto"), exports);
42
43
  __exportStar(require("./Process"), exports);
43
44
  __exportStar(require("./ProcessDetail"), exports);
44
45
  __exportStar(require("./Project"), exports);
@@ -53,6 +54,7 @@ __exportStar(require("./ReferenceType"), exports);
53
54
  __exportStar(require("./RegisterDatasetRequest"), exports);
54
55
  __exportStar(require("./RegisterPublicDataRequest"), exports);
55
56
  __exportStar(require("./Sample"), exports);
57
+ __exportStar(require("./SampleRequest"), exports);
56
58
  __exportStar(require("./ServiceConnection"), exports);
57
59
  __exportStar(require("./SetUserProjectRoleRequest"), exports);
58
60
  __exportStar(require("./Status"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cirrobio/api-client",
3
- "version": "0.0.13-alpha",
3
+ "version": "0.0.15-alpha",
4
4
  "description": "API client for Cirro",
5
5
  "author": "CirroBio",
6
6
  "repository": {
@@ -16,17 +16,25 @@
16
16
  import * as runtime from '../runtime';
17
17
  import type {
18
18
  FormSchema,
19
+ PaginatedResponseSampleDto,
19
20
  Sample,
21
+ SampleRequest,
20
22
  } from '../models/index';
21
23
  import {
22
24
  FormSchemaFromJSON,
23
25
  FormSchemaToJSON,
26
+ PaginatedResponseSampleDtoFromJSON,
27
+ PaginatedResponseSampleDtoToJSON,
24
28
  SampleFromJSON,
25
29
  SampleToJSON,
30
+ SampleRequestFromJSON,
31
+ SampleRequestToJSON,
26
32
  } from '../models/index';
27
33
 
28
34
  export interface GetProjectSamplesRequest {
29
35
  projectId: string;
36
+ limit?: number;
37
+ nextToken?: string;
30
38
  }
31
39
 
32
40
  export interface GetProjectSchemaRequest {
@@ -35,7 +43,8 @@ export interface GetProjectSchemaRequest {
35
43
 
36
44
  export interface UpdateSampleRequest {
37
45
  projectId: string;
38
- sample: Sample;
46
+ sampleId: string;
47
+ sampleRequest: SampleRequest;
39
48
  }
40
49
 
41
50
  /**
@@ -46,13 +55,21 @@ export class MetadataApi extends runtime.BaseAPI {
46
55
  /**
47
56
  * Get project samples
48
57
  */
49
- async getProjectSamplesRaw(requestParameters: GetProjectSamplesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Sample>>> {
58
+ async getProjectSamplesRaw(requestParameters: GetProjectSamplesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResponseSampleDto>> {
50
59
  if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
51
60
  throw new runtime.RequiredError('projectId','Required parameter requestParameters.projectId was null or undefined when calling getProjectSamples.');
52
61
  }
53
62
 
54
63
  const queryParameters: any = {};
55
64
 
65
+ if (requestParameters.limit !== undefined) {
66
+ queryParameters['limit'] = requestParameters.limit;
67
+ }
68
+
69
+ if (requestParameters.nextToken !== undefined) {
70
+ queryParameters['nextToken'] = requestParameters.nextToken;
71
+ }
72
+
56
73
  const headerParameters: runtime.HTTPHeaders = {};
57
74
 
58
75
  if (this.configuration && this.configuration.accessToken) {
@@ -70,13 +87,13 @@ export class MetadataApi extends runtime.BaseAPI {
70
87
  query: queryParameters,
71
88
  }, initOverrides);
72
89
 
73
- return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(SampleFromJSON));
90
+ return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedResponseSampleDtoFromJSON(jsonValue));
74
91
  }
75
92
 
76
93
  /**
77
94
  * Get project samples
78
95
  */
79
- async getProjectSamples(requestParameters: GetProjectSamplesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Sample>> {
96
+ async getProjectSamples(requestParameters: GetProjectSamplesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseSampleDto> {
80
97
  const response = await this.getProjectSamplesRaw(requestParameters, initOverrides);
81
98
  return await response.value();
82
99
  }
@@ -127,8 +144,12 @@ export class MetadataApi extends runtime.BaseAPI {
127
144
  throw new runtime.RequiredError('projectId','Required parameter requestParameters.projectId was null or undefined when calling updateSample.');
128
145
  }
129
146
 
130
- if (requestParameters.sample === null || requestParameters.sample === undefined) {
131
- throw new runtime.RequiredError('sample','Required parameter requestParameters.sample was null or undefined when calling updateSample.');
147
+ if (requestParameters.sampleId === null || requestParameters.sampleId === undefined) {
148
+ throw new runtime.RequiredError('sampleId','Required parameter requestParameters.sampleId was null or undefined when calling updateSample.');
149
+ }
150
+
151
+ if (requestParameters.sampleRequest === null || requestParameters.sampleRequest === undefined) {
152
+ throw new runtime.RequiredError('sampleRequest','Required parameter requestParameters.sampleRequest was null or undefined when calling updateSample.');
132
153
  }
133
154
 
134
155
  const queryParameters: any = {};
@@ -146,11 +167,11 @@ export class MetadataApi extends runtime.BaseAPI {
146
167
  }
147
168
  }
148
169
  const response = await this.request({
149
- path: `/projects/{projectId}/samples`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))),
170
+ path: `/projects/{projectId}/samples/{sampleId}`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))).replace(`{${"sampleId"}}`, encodeURIComponent(String(requestParameters.sampleId))),
150
171
  method: 'PUT',
151
172
  headers: headerParameters,
152
173
  query: queryParameters,
153
- body: SampleToJSON(requestParameters.sample),
174
+ body: SampleRequestToJSON(requestParameters.sampleRequest),
154
175
  }, initOverrides);
155
176
 
156
177
  return new runtime.JSONApiResponse(response, (jsonValue) => SampleFromJSON(jsonValue));
@@ -24,25 +24,25 @@ export interface Contact {
24
24
  * @type {string}
25
25
  * @memberof Contact
26
26
  */
27
- name?: string;
27
+ name: string;
28
28
  /**
29
29
  *
30
30
  * @type {string}
31
31
  * @memberof Contact
32
32
  */
33
- organization?: string;
33
+ organization: string;
34
34
  /**
35
35
  *
36
36
  * @type {string}
37
37
  * @memberof Contact
38
38
  */
39
- email?: string;
39
+ email: string;
40
40
  /**
41
41
  *
42
42
  * @type {string}
43
43
  * @memberof Contact
44
44
  */
45
- phone?: string;
45
+ phone: string;
46
46
  }
47
47
 
48
48
  /**
@@ -50,6 +50,10 @@ export interface Contact {
50
50
  */
51
51
  export function instanceOfContact(value: object): boolean {
52
52
  let isInstance = true;
53
+ isInstance = isInstance && "name" in value;
54
+ isInstance = isInstance && "organization" in value;
55
+ isInstance = isInstance && "email" in value;
56
+ isInstance = isInstance && "phone" in value;
53
57
 
54
58
  return isInstance;
55
59
  }
@@ -64,10 +68,10 @@ export function ContactFromJSONTyped(json: any, ignoreDiscriminator: boolean): C
64
68
  }
65
69
  return {
66
70
 
67
- 'name': !exists(json, 'name') ? undefined : json['name'],
68
- 'organization': !exists(json, 'organization') ? undefined : json['organization'],
69
- 'email': !exists(json, 'email') ? undefined : json['email'],
70
- 'phone': !exists(json, 'phone') ? undefined : json['phone'],
71
+ 'name': json['name'],
72
+ 'organization': json['organization'],
73
+ 'email': json['email'],
74
+ 'phone': json['phone'],
71
75
  };
72
76
  }
73
77
 
@@ -37,6 +37,12 @@ export interface Dashboard {
37
37
  * @memberof Dashboard
38
38
  */
39
39
  description: string;
40
+ /**
41
+ *
42
+ * @type {Array<string>}
43
+ * @memberof Dashboard
44
+ */
45
+ processIds: Array<string>;
40
46
  /**
41
47
  *
42
48
  * @type {{ [key: string]: any; }}
@@ -77,6 +83,7 @@ export function instanceOfDashboard(value: object): boolean {
77
83
  isInstance = isInstance && "id" in value;
78
84
  isInstance = isInstance && "name" in value;
79
85
  isInstance = isInstance && "description" in value;
86
+ isInstance = isInstance && "processIds" in value;
80
87
  isInstance = isInstance && "dashboardData" in value;
81
88
  isInstance = isInstance && "info" in value;
82
89
  isInstance = isInstance && "createdBy" in value;
@@ -99,6 +106,7 @@ export function DashboardFromJSONTyped(json: any, ignoreDiscriminator: boolean):
99
106
  'id': json['id'],
100
107
  'name': json['name'],
101
108
  'description': json['description'],
109
+ 'processIds': json['processIds'],
102
110
  'dashboardData': json['dashboardData'],
103
111
  'info': json['info'],
104
112
  'createdBy': json['createdBy'],
@@ -119,6 +127,7 @@ export function DashboardToJSON(value?: Dashboard | null): any {
119
127
  'id': value.id,
120
128
  'name': value.name,
121
129
  'description': value.description,
130
+ 'processIds': value.processIds,
122
131
  'dashboardData': value.dashboardData,
123
132
  'info': value.info,
124
133
  'createdBy': value.createdBy,
@@ -31,6 +31,12 @@ export interface DashboardRequest {
31
31
  * @memberof DashboardRequest
32
32
  */
33
33
  description: string;
34
+ /**
35
+ *
36
+ * @type {Array<string>}
37
+ * @memberof DashboardRequest
38
+ */
39
+ processIds: Array<string>;
34
40
  /**
35
41
  *
36
42
  * @type {{ [key: string]: any; }}
@@ -52,6 +58,7 @@ export function instanceOfDashboardRequest(value: object): boolean {
52
58
  let isInstance = true;
53
59
  isInstance = isInstance && "name" in value;
54
60
  isInstance = isInstance && "description" in value;
61
+ isInstance = isInstance && "processIds" in value;
55
62
  isInstance = isInstance && "dashboardData" in value;
56
63
  isInstance = isInstance && "info" in value;
57
64
 
@@ -70,6 +77,7 @@ export function DashboardRequestFromJSONTyped(json: any, ignoreDiscriminator: bo
70
77
 
71
78
  'name': json['name'],
72
79
  'description': json['description'],
80
+ 'processIds': json['processIds'],
73
81
  'dashboardData': json['dashboardData'],
74
82
  'info': json['info'],
75
83
  };
@@ -86,6 +94,7 @@ export function DashboardRequestToJSON(value?: DashboardRequest | null): any {
86
94
 
87
95
  'name': value.name,
88
96
  'description': value.description,
97
+ 'processIds': value.processIds,
89
98
  'dashboardData': value.dashboardData,
90
99
  'info': value.info,
91
100
  };
@@ -13,6 +13,13 @@
13
13
  */
14
14
 
15
15
  import { exists, mapValues } from '../runtime';
16
+ import type { Status } from './Status';
17
+ import {
18
+ StatusFromJSON,
19
+ StatusFromJSONTyped,
20
+ StatusToJSON,
21
+ } from './Status';
22
+
16
23
  /**
17
24
  *
18
25
  * @export
@@ -31,6 +38,30 @@ export interface NotebookInstance {
31
38
  * @memberof NotebookInstance
32
39
  */
33
40
  name: string;
41
+ /**
42
+ *
43
+ * @type {Status}
44
+ * @memberof NotebookInstance
45
+ */
46
+ status: Status;
47
+ /**
48
+ *
49
+ * @type {string}
50
+ * @memberof NotebookInstance
51
+ */
52
+ instanceType: string;
53
+ /**
54
+ *
55
+ * @type {Array<string>}
56
+ * @memberof NotebookInstance
57
+ */
58
+ acceleratorTypes: Array<string>;
59
+ /**
60
+ *
61
+ * @type {number}
62
+ * @memberof NotebookInstance
63
+ */
64
+ volumeSizeGB: number;
34
65
  /**
35
66
  *
36
67
  * @type {string}
@@ -46,6 +77,10 @@ export function instanceOfNotebookInstance(value: object): boolean {
46
77
  let isInstance = true;
47
78
  isInstance = isInstance && "id" in value;
48
79
  isInstance = isInstance && "name" in value;
80
+ isInstance = isInstance && "status" in value;
81
+ isInstance = isInstance && "instanceType" in value;
82
+ isInstance = isInstance && "acceleratorTypes" in value;
83
+ isInstance = isInstance && "volumeSizeGB" in value;
49
84
  isInstance = isInstance && "createdBy" in value;
50
85
 
51
86
  return isInstance;
@@ -63,6 +98,10 @@ export function NotebookInstanceFromJSONTyped(json: any, ignoreDiscriminator: bo
63
98
 
64
99
  'id': json['id'],
65
100
  'name': json['name'],
101
+ 'status': StatusFromJSON(json['status']),
102
+ 'instanceType': json['instanceType'],
103
+ 'acceleratorTypes': json['acceleratorTypes'],
104
+ 'volumeSizeGB': json['volumeSizeGB'],
66
105
  'createdBy': json['createdBy'],
67
106
  };
68
107
  }
@@ -78,6 +117,10 @@ export function NotebookInstanceToJSON(value?: NotebookInstance | null): any {
78
117
 
79
118
  'id': value.id,
80
119
  'name': value.name,
120
+ 'status': StatusToJSON(value.status),
121
+ 'instanceType': value.instanceType,
122
+ 'acceleratorTypes': value.acceleratorTypes,
123
+ 'volumeSizeGB': value.volumeSizeGB,
81
124
  'createdBy': value.createdBy,
82
125
  };
83
126
  }
@@ -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 { Sample } from './Sample';
17
+ import {
18
+ SampleFromJSON,
19
+ SampleFromJSONTyped,
20
+ SampleToJSON,
21
+ } from './Sample';
22
+
23
+ /**
24
+ *
25
+ * @export
26
+ * @interface PaginatedResponseSampleDto
27
+ */
28
+ export interface PaginatedResponseSampleDto {
29
+ /**
30
+ *
31
+ * @type {Array<Sample>}
32
+ * @memberof PaginatedResponseSampleDto
33
+ */
34
+ data: Array<Sample>;
35
+ /**
36
+ *
37
+ * @type {string}
38
+ * @memberof PaginatedResponseSampleDto
39
+ */
40
+ nextToken: string;
41
+ }
42
+
43
+ /**
44
+ * Check if a given object implements the PaginatedResponseSampleDto interface.
45
+ */
46
+ export function instanceOfPaginatedResponseSampleDto(value: object): boolean {
47
+ let isInstance = true;
48
+ isInstance = isInstance && "data" in value;
49
+ isInstance = isInstance && "nextToken" in value;
50
+
51
+ return isInstance;
52
+ }
53
+
54
+ export function PaginatedResponseSampleDtoFromJSON(json: any): PaginatedResponseSampleDto {
55
+ return PaginatedResponseSampleDtoFromJSONTyped(json, false);
56
+ }
57
+
58
+ export function PaginatedResponseSampleDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedResponseSampleDto {
59
+ if ((json === undefined) || (json === null)) {
60
+ return json;
61
+ }
62
+ return {
63
+
64
+ 'data': ((json['data'] as Array<any>).map(SampleFromJSON)),
65
+ 'nextToken': json['nextToken'],
66
+ };
67
+ }
68
+
69
+ export function PaginatedResponseSampleDtoToJSON(value?: PaginatedResponseSampleDto | null): any {
70
+ if (value === undefined) {
71
+ return undefined;
72
+ }
73
+ if (value === null) {
74
+ return null;
75
+ }
76
+ return {
77
+
78
+ 'data': ((value.data as Array<any>).map(SampleToJSON)),
79
+ 'nextToken': value.nextToken,
80
+ };
81
+ }
82
+
@@ -37,6 +37,12 @@ export interface Sample {
37
37
  * @memberof Sample
38
38
  */
39
39
  metadata: { [key: string]: any; };
40
+ /**
41
+ *
42
+ * @type {Array<string>}
43
+ * @memberof Sample
44
+ */
45
+ datasetIds: Array<string>;
40
46
  /**
41
47
  *
42
48
  * @type {Date}
@@ -59,6 +65,7 @@ export function instanceOfSample(value: object): boolean {
59
65
  isInstance = isInstance && "id" in value;
60
66
  isInstance = isInstance && "name" in value;
61
67
  isInstance = isInstance && "metadata" in value;
68
+ isInstance = isInstance && "datasetIds" in value;
62
69
  isInstance = isInstance && "createdAt" in value;
63
70
  isInstance = isInstance && "updatedAt" in value;
64
71
 
@@ -78,6 +85,7 @@ export function SampleFromJSONTyped(json: any, ignoreDiscriminator: boolean): Sa
78
85
  'id': json['id'],
79
86
  'name': json['name'],
80
87
  'metadata': json['metadata'],
88
+ 'datasetIds': json['datasetIds'],
81
89
  'createdAt': (new Date(json['createdAt'])),
82
90
  'updatedAt': (new Date(json['updatedAt'])),
83
91
  };
@@ -95,6 +103,7 @@ export function SampleToJSON(value?: Sample | null): any {
95
103
  'id': value.id,
96
104
  'name': value.name,
97
105
  'metadata': value.metadata,
106
+ 'datasetIds': value.datasetIds,
98
107
  'createdAt': (value.createdAt.toISOString()),
99
108
  'updatedAt': (value.updatedAt.toISOString()),
100
109
  };
@@ -0,0 +1,75 @@
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 SampleRequest
20
+ */
21
+ export interface SampleRequest {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof SampleRequest
26
+ */
27
+ name: string;
28
+ /**
29
+ *
30
+ * @type {{ [key: string]: any; }}
31
+ * @memberof SampleRequest
32
+ */
33
+ metadata: { [key: string]: any; };
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the SampleRequest interface.
38
+ */
39
+ export function instanceOfSampleRequest(value: object): boolean {
40
+ let isInstance = true;
41
+ isInstance = isInstance && "name" in value;
42
+ isInstance = isInstance && "metadata" in value;
43
+
44
+ return isInstance;
45
+ }
46
+
47
+ export function SampleRequestFromJSON(json: any): SampleRequest {
48
+ return SampleRequestFromJSONTyped(json, false);
49
+ }
50
+
51
+ export function SampleRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SampleRequest {
52
+ if ((json === undefined) || (json === null)) {
53
+ return json;
54
+ }
55
+ return {
56
+
57
+ 'name': json['name'],
58
+ 'metadata': json['metadata'],
59
+ };
60
+ }
61
+
62
+ export function SampleRequestToJSON(value?: SampleRequest | null): any {
63
+ if (value === undefined) {
64
+ return undefined;
65
+ }
66
+ if (value === null) {
67
+ return null;
68
+ }
69
+ return {
70
+
71
+ 'name': value.name,
72
+ 'metadata': value.metadata,
73
+ };
74
+ }
75
+
@@ -23,6 +23,7 @@ export * from './NotebookInstance';
23
23
  export * from './NotebookInstanceStatusResponse';
24
24
  export * from './OpenNotebookInstanceResponse';
25
25
  export * from './PaginatedResponseDatasetListDto';
26
+ export * from './PaginatedResponseSampleDto';
26
27
  export * from './Process';
27
28
  export * from './ProcessDetail';
28
29
  export * from './Project';
@@ -37,6 +38,7 @@ export * from './ReferenceType';
37
38
  export * from './RegisterDatasetRequest';
38
39
  export * from './RegisterPublicDataRequest';
39
40
  export * from './Sample';
41
+ export * from './SampleRequest';
40
42
  export * from './ServiceConnection';
41
43
  export * from './SetUserProjectRoleRequest';
42
44
  export * from './Status';