@cirrobio/api-client 0.1.5 → 0.1.7

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/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.1.5 --save
39
+ npm install @cirrobio/api-client@0.1.7 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
@@ -22,6 +22,8 @@ export interface GetDatasetRequest {
22
22
  export interface GetDatasetManifestRequest {
23
23
  datasetId: string;
24
24
  projectId: string;
25
+ fileOffset: number;
26
+ fileLimit: number;
25
27
  }
26
28
  export interface GetDatasetsRequest {
27
29
  projectId: string;
@@ -205,7 +205,19 @@ var DatasetsApi = /** @class */ (function (_super) {
205
205
  if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
206
206
  throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling getDatasetManifest.');
207
207
  }
208
+ if (requestParameters.fileOffset === null || requestParameters.fileOffset === undefined) {
209
+ throw new runtime.RequiredError('fileOffset', 'Required parameter requestParameters.fileOffset was null or undefined when calling getDatasetManifest.');
210
+ }
211
+ if (requestParameters.fileLimit === null || requestParameters.fileLimit === undefined) {
212
+ throw new runtime.RequiredError('fileLimit', 'Required parameter requestParameters.fileLimit was null or undefined when calling getDatasetManifest.');
213
+ }
208
214
  queryParameters = {};
215
+ if (requestParameters.fileOffset !== undefined) {
216
+ queryParameters['fileOffset'] = requestParameters.fileOffset;
217
+ }
218
+ if (requestParameters.fileLimit !== undefined) {
219
+ queryParameters['fileLimit'] = requestParameters.fileLimit;
220
+ }
209
221
  headerParameters = {};
210
222
  if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
211
223
  token = this.configuration.accessToken;
@@ -30,6 +30,12 @@ export interface DatasetAssetsManifest {
30
30
  * @memberof DatasetAssetsManifest
31
31
  */
32
32
  files?: Array<FileEntry>;
33
+ /**
34
+ * Total number of files in the dataset, used for pagination
35
+ * @type {number}
36
+ * @memberof DatasetAssetsManifest
37
+ */
38
+ totalFiles?: number;
33
39
  /**
34
40
  * List of viz to render for the dataset
35
41
  * @type {Array<DatasetViz>}
@@ -37,6 +37,7 @@ function DatasetAssetsManifestFromJSONTyped(json, ignoreDiscriminator) {
37
37
  return {
38
38
  'domain': !(0, runtime_1.exists)(json, 'domain') ? undefined : json['domain'],
39
39
  'files': !(0, runtime_1.exists)(json, 'files') ? undefined : (json['files'].map(FileEntry_1.FileEntryFromJSON)),
40
+ 'totalFiles': !(0, runtime_1.exists)(json, 'totalFiles') ? undefined : json['totalFiles'],
40
41
  'viz': !(0, runtime_1.exists)(json, 'viz') ? undefined : (json['viz'].map(DatasetViz_1.DatasetVizFromJSON)),
41
42
  'tables': !(0, runtime_1.exists)(json, 'tables') ? undefined : (json['tables'].map(Table_1.TableFromJSON)),
42
43
  };
@@ -52,6 +53,7 @@ function DatasetAssetsManifestToJSON(value) {
52
53
  return {
53
54
  'domain': value.domain,
54
55
  'files': value.files === undefined ? undefined : (value.files.map(FileEntry_1.FileEntryToJSON)),
56
+ 'totalFiles': value.totalFiles,
55
57
  'viz': value.viz === undefined ? undefined : (value.viz.map(DatasetViz_1.DatasetVizToJSON)),
56
58
  'tables': value.tables === undefined ? undefined : (value.tables.map(Table_1.TableToJSON)),
57
59
  };
@@ -16,37 +16,49 @@
16
16
  */
17
17
  export interface UpdateUserRequest {
18
18
  /**
19
- *
19
+ * Display name of the user
20
20
  * @type {string}
21
21
  * @memberof UpdateUserRequest
22
22
  */
23
23
  name: string;
24
24
  /**
25
- *
25
+ * Email address of the user
26
26
  * @type {string}
27
27
  * @memberof UpdateUserRequest
28
28
  */
29
29
  email: string;
30
30
  /**
31
- *
31
+ * Phone number of the user
32
32
  * @type {string}
33
33
  * @memberof UpdateUserRequest
34
34
  */
35
- phone: string;
35
+ phone?: string;
36
36
  /**
37
- *
37
+ * Department or lab the user belongs to
38
38
  * @type {string}
39
39
  * @memberof UpdateUserRequest
40
40
  */
41
- department: string;
41
+ department?: string;
42
42
  /**
43
- *
43
+ * The organization the user belongs to, only editable by administrators
44
+ * @type {string}
45
+ * @memberof UpdateUserRequest
46
+ */
47
+ organization?: string;
48
+ /**
49
+ * Additional settings for the user
44
50
  * @type {{ [key: string]: any; }}
45
51
  * @memberof UpdateUserRequest
46
52
  */
47
- settings: {
53
+ settings?: {
48
54
  [key: string]: any;
49
55
  };
56
+ /**
57
+ * Groups the user belongs to, only editable by administrators
58
+ * @type {Array<string>}
59
+ * @memberof UpdateUserRequest
60
+ */
61
+ groups?: Array<string>;
50
62
  }
51
63
  /**
52
64
  * Check if a given object implements the UpdateUserRequest interface.
@@ -14,6 +14,7 @@
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.UpdateUserRequestToJSON = exports.UpdateUserRequestFromJSONTyped = exports.UpdateUserRequestFromJSON = exports.instanceOfUpdateUserRequest = void 0;
17
+ var runtime_1 = require("../runtime");
17
18
  /**
18
19
  * Check if a given object implements the UpdateUserRequest interface.
19
20
  */
@@ -21,9 +22,6 @@ function instanceOfUpdateUserRequest(value) {
21
22
  var isInstance = true;
22
23
  isInstance = isInstance && "name" in value;
23
24
  isInstance = isInstance && "email" in value;
24
- isInstance = isInstance && "phone" in value;
25
- isInstance = isInstance && "department" in value;
26
- isInstance = isInstance && "settings" in value;
27
25
  return isInstance;
28
26
  }
29
27
  exports.instanceOfUpdateUserRequest = instanceOfUpdateUserRequest;
@@ -38,9 +36,11 @@ function UpdateUserRequestFromJSONTyped(json, ignoreDiscriminator) {
38
36
  return {
39
37
  'name': json['name'],
40
38
  'email': json['email'],
41
- 'phone': json['phone'],
42
- 'department': json['department'],
43
- 'settings': json['settings'],
39
+ 'phone': !(0, runtime_1.exists)(json, 'phone') ? undefined : json['phone'],
40
+ 'department': !(0, runtime_1.exists)(json, 'department') ? undefined : json['department'],
41
+ 'organization': !(0, runtime_1.exists)(json, 'organization') ? undefined : json['organization'],
42
+ 'settings': !(0, runtime_1.exists)(json, 'settings') ? undefined : json['settings'],
43
+ 'groups': !(0, runtime_1.exists)(json, 'groups') ? undefined : json['groups'],
44
44
  };
45
45
  }
46
46
  exports.UpdateUserRequestFromJSONTyped = UpdateUserRequestFromJSONTyped;
@@ -56,7 +56,9 @@ function UpdateUserRequestToJSON(value) {
56
56
  'email': value.email,
57
57
  'phone': value.phone,
58
58
  'department': value.department,
59
+ 'organization': value.organization,
59
60
  'settings': value.settings,
61
+ 'groups': value.groups,
60
62
  };
61
63
  }
62
64
  exports.UpdateUserRequestToJSON = UpdateUserRequestToJSON;
@@ -70,6 +70,12 @@ export interface UserDetail {
70
70
  * @memberof UserDetail
71
71
  */
72
72
  projectAssignments: Array<UserProjectAssignment>;
73
+ /**
74
+ *
75
+ * @type {Array<string>}
76
+ * @memberof UserDetail
77
+ */
78
+ groups: Array<string>;
73
79
  }
74
80
  /**
75
81
  * Check if a given object implements the UserDetail interface.
@@ -29,6 +29,7 @@ function instanceOfUserDetail(value) {
29
29
  isInstance = isInstance && "department" in value;
30
30
  isInstance = isInstance && "invitedBy" in value;
31
31
  isInstance = isInstance && "projectAssignments" in value;
32
+ isInstance = isInstance && "groups" in value;
32
33
  return isInstance;
33
34
  }
34
35
  exports.instanceOfUserDetail = instanceOfUserDetail;
@@ -50,6 +51,7 @@ function UserDetailFromJSONTyped(json, ignoreDiscriminator) {
50
51
  'invitedBy': json['invitedBy'],
51
52
  'signUpTime': !(0, runtime_1.exists)(json, 'signUpTime') ? undefined : (json['signUpTime'] === null ? null : new Date(json['signUpTime'])),
52
53
  'projectAssignments': (json['projectAssignments'].map(UserProjectAssignment_1.UserProjectAssignmentFromJSON)),
54
+ 'groups': json['groups'],
53
55
  };
54
56
  }
55
57
  exports.UserDetailFromJSONTyped = UserDetailFromJSONTyped;
@@ -70,6 +72,7 @@ function UserDetailToJSON(value) {
70
72
  'invitedBy': value.invitedBy,
71
73
  'signUpTime': value.signUpTime === undefined ? undefined : (value.signUpTime === null ? null : value.signUpTime.toISOString()),
72
74
  'projectAssignments': (value.projectAssignments.map(UserProjectAssignment_1.UserProjectAssignmentToJSON)),
75
+ 'groups': value.groups,
73
76
  };
74
77
  }
75
78
  exports.UserDetailToJSON = UserDetailToJSON;
package/dist/runtime.js CHANGED
@@ -76,7 +76,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
76
76
  };
77
77
  Object.defineProperty(exports, "__esModule", { value: true });
78
78
  exports.TextApiResponse = exports.BlobApiResponse = exports.VoidApiResponse = exports.JSONApiResponse = exports.canConsumeForm = exports.mapValues = exports.querystring = exports.exists = exports.COLLECTION_FORMATS = exports.RequiredError = exports.FetchError = exports.ResponseError = exports.BaseAPI = exports.DefaultConfig = exports.Configuration = exports.BASE_PATH = void 0;
79
- exports.BASE_PATH = "https://api.cirro.bio".replace(/\/+$/, "");
79
+ exports.BASE_PATH = "http://localhost:8080/api".replace(/\/+$/, "");
80
80
  var Configuration = /** @class */ (function () {
81
81
  function Configuration(configuration) {
82
82
  if (configuration === void 0) { configuration = {}; }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cirrobio/api-client",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "description": "API client for Cirro",
5
5
  "author": "CirroBio",
6
6
  "repository": {
@@ -56,6 +56,8 @@ export interface GetDatasetRequest {
56
56
  export interface GetDatasetManifestRequest {
57
57
  datasetId: string;
58
58
  projectId: string;
59
+ fileOffset: number;
60
+ fileLimit: number;
59
61
  }
60
62
 
61
63
  export interface GetDatasetsRequest {
@@ -200,8 +202,24 @@ export class DatasetsApi extends runtime.BaseAPI {
200
202
  throw new runtime.RequiredError('projectId','Required parameter requestParameters.projectId was null or undefined when calling getDatasetManifest.');
201
203
  }
202
204
 
205
+ if (requestParameters.fileOffset === null || requestParameters.fileOffset === undefined) {
206
+ throw new runtime.RequiredError('fileOffset','Required parameter requestParameters.fileOffset was null or undefined when calling getDatasetManifest.');
207
+ }
208
+
209
+ if (requestParameters.fileLimit === null || requestParameters.fileLimit === undefined) {
210
+ throw new runtime.RequiredError('fileLimit','Required parameter requestParameters.fileLimit was null or undefined when calling getDatasetManifest.');
211
+ }
212
+
203
213
  const queryParameters: any = {};
204
214
 
215
+ if (requestParameters.fileOffset !== undefined) {
216
+ queryParameters['fileOffset'] = requestParameters.fileOffset;
217
+ }
218
+
219
+ if (requestParameters.fileLimit !== undefined) {
220
+ queryParameters['fileLimit'] = requestParameters.fileLimit;
221
+ }
222
+
205
223
  const headerParameters: runtime.HTTPHeaders = {};
206
224
 
207
225
  if (this.configuration && this.configuration.accessToken) {
@@ -50,6 +50,12 @@ export interface DatasetAssetsManifest {
50
50
  * @memberof DatasetAssetsManifest
51
51
  */
52
52
  files?: Array<FileEntry>;
53
+ /**
54
+ * Total number of files in the dataset, used for pagination
55
+ * @type {number}
56
+ * @memberof DatasetAssetsManifest
57
+ */
58
+ totalFiles?: number;
53
59
  /**
54
60
  * List of viz to render for the dataset
55
61
  * @type {Array<DatasetViz>}
@@ -85,6 +91,7 @@ export function DatasetAssetsManifestFromJSONTyped(json: any, ignoreDiscriminato
85
91
 
86
92
  'domain': !exists(json, 'domain') ? undefined : json['domain'],
87
93
  'files': !exists(json, 'files') ? undefined : ((json['files'] as Array<any>).map(FileEntryFromJSON)),
94
+ 'totalFiles': !exists(json, 'totalFiles') ? undefined : json['totalFiles'],
88
95
  'viz': !exists(json, 'viz') ? undefined : ((json['viz'] as Array<any>).map(DatasetVizFromJSON)),
89
96
  'tables': !exists(json, 'tables') ? undefined : ((json['tables'] as Array<any>).map(TableFromJSON)),
90
97
  };
@@ -101,6 +108,7 @@ export function DatasetAssetsManifestToJSON(value?: DatasetAssetsManifest | null
101
108
 
102
109
  'domain': value.domain,
103
110
  'files': value.files === undefined ? undefined : ((value.files as Array<any>).map(FileEntryToJSON)),
111
+ 'totalFiles': value.totalFiles,
104
112
  'viz': value.viz === undefined ? undefined : ((value.viz as Array<any>).map(DatasetVizToJSON)),
105
113
  'tables': value.tables === undefined ? undefined : ((value.tables as Array<any>).map(TableToJSON)),
106
114
  };
@@ -20,35 +20,47 @@ import { exists, mapValues } from '../runtime';
20
20
  */
21
21
  export interface UpdateUserRequest {
22
22
  /**
23
- *
23
+ * Display name of the user
24
24
  * @type {string}
25
25
  * @memberof UpdateUserRequest
26
26
  */
27
27
  name: string;
28
28
  /**
29
- *
29
+ * Email address of the user
30
30
  * @type {string}
31
31
  * @memberof UpdateUserRequest
32
32
  */
33
33
  email: string;
34
34
  /**
35
- *
35
+ * Phone number of the user
36
36
  * @type {string}
37
37
  * @memberof UpdateUserRequest
38
38
  */
39
- phone: string;
39
+ phone?: string;
40
40
  /**
41
- *
41
+ * Department or lab the user belongs to
42
42
  * @type {string}
43
43
  * @memberof UpdateUserRequest
44
44
  */
45
- department: string;
45
+ department?: string;
46
46
  /**
47
- *
47
+ * The organization the user belongs to, only editable by administrators
48
+ * @type {string}
49
+ * @memberof UpdateUserRequest
50
+ */
51
+ organization?: string;
52
+ /**
53
+ * Additional settings for the user
48
54
  * @type {{ [key: string]: any; }}
49
55
  * @memberof UpdateUserRequest
50
56
  */
51
- settings: { [key: string]: any; };
57
+ settings?: { [key: string]: any; };
58
+ /**
59
+ * Groups the user belongs to, only editable by administrators
60
+ * @type {Array<string>}
61
+ * @memberof UpdateUserRequest
62
+ */
63
+ groups?: Array<string>;
52
64
  }
53
65
 
54
66
  /**
@@ -58,9 +70,6 @@ export function instanceOfUpdateUserRequest(value: object): boolean {
58
70
  let isInstance = true;
59
71
  isInstance = isInstance && "name" in value;
60
72
  isInstance = isInstance && "email" in value;
61
- isInstance = isInstance && "phone" in value;
62
- isInstance = isInstance && "department" in value;
63
- isInstance = isInstance && "settings" in value;
64
73
 
65
74
  return isInstance;
66
75
  }
@@ -77,9 +86,11 @@ export function UpdateUserRequestFromJSONTyped(json: any, ignoreDiscriminator: b
77
86
 
78
87
  'name': json['name'],
79
88
  'email': json['email'],
80
- 'phone': json['phone'],
81
- 'department': json['department'],
82
- 'settings': json['settings'],
89
+ 'phone': !exists(json, 'phone') ? undefined : json['phone'],
90
+ 'department': !exists(json, 'department') ? undefined : json['department'],
91
+ 'organization': !exists(json, 'organization') ? undefined : json['organization'],
92
+ 'settings': !exists(json, 'settings') ? undefined : json['settings'],
93
+ 'groups': !exists(json, 'groups') ? undefined : json['groups'],
83
94
  };
84
95
  }
85
96
 
@@ -96,7 +107,9 @@ export function UpdateUserRequestToJSON(value?: UpdateUserRequest | null): any {
96
107
  'email': value.email,
97
108
  'phone': value.phone,
98
109
  'department': value.department,
110
+ 'organization': value.organization,
99
111
  'settings': value.settings,
112
+ 'groups': value.groups,
100
113
  };
101
114
  }
102
115
 
@@ -80,6 +80,12 @@ export interface UserDetail {
80
80
  * @memberof UserDetail
81
81
  */
82
82
  projectAssignments: Array<UserProjectAssignment>;
83
+ /**
84
+ *
85
+ * @type {Array<string>}
86
+ * @memberof UserDetail
87
+ */
88
+ groups: Array<string>;
83
89
  }
84
90
 
85
91
  /**
@@ -95,6 +101,7 @@ export function instanceOfUserDetail(value: object): boolean {
95
101
  isInstance = isInstance && "department" in value;
96
102
  isInstance = isInstance && "invitedBy" in value;
97
103
  isInstance = isInstance && "projectAssignments" in value;
104
+ isInstance = isInstance && "groups" in value;
98
105
 
99
106
  return isInstance;
100
107
  }
@@ -118,6 +125,7 @@ export function UserDetailFromJSONTyped(json: any, ignoreDiscriminator: boolean)
118
125
  'invitedBy': json['invitedBy'],
119
126
  'signUpTime': !exists(json, 'signUpTime') ? undefined : (json['signUpTime'] === null ? null : new Date(json['signUpTime'])),
120
127
  'projectAssignments': ((json['projectAssignments'] as Array<any>).map(UserProjectAssignmentFromJSON)),
128
+ 'groups': json['groups'],
121
129
  };
122
130
  }
123
131
 
@@ -139,6 +147,7 @@ export function UserDetailToJSON(value?: UserDetail | null): any {
139
147
  'invitedBy': value.invitedBy,
140
148
  'signUpTime': value.signUpTime === undefined ? undefined : (value.signUpTime === null ? null : value.signUpTime.toISOString()),
141
149
  'projectAssignments': ((value.projectAssignments as Array<any>).map(UserProjectAssignmentToJSON)),
150
+ 'groups': value.groups,
142
151
  };
143
152
  }
144
153
 
package/src/runtime.ts CHANGED
@@ -13,7 +13,7 @@
13
13
  */
14
14
 
15
15
 
16
- export const BASE_PATH = "https://api.cirro.bio".replace(/\/+$/, "");
16
+ export const BASE_PATH = "http://localhost:8080/api".replace(/\/+$/, "");
17
17
 
18
18
  export interface ConfigurationParameters {
19
19
  basePath?: string; // override base path