@cirrobio/api-client 0.0.25-alpha → 0.0.26-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.
@@ -17,6 +17,7 @@ src/apis/SystemApi.ts
17
17
  src/apis/UsersApi.ts
18
18
  src/apis/index.ts
19
19
  src/index.ts
20
+ src/models/AllowedDataType.ts
20
21
  src/models/BillingAccount.ts
21
22
  src/models/BillingAccountRequest.ts
22
23
  src/models/BillingMethod.ts
@@ -35,6 +36,7 @@ src/models/DatasetDetail.ts
35
36
  src/models/DatasetFile.ts
36
37
  src/models/DatasetViz.ts
37
38
  src/models/Executor.ts
39
+ src/models/FileNamePattern.ts
38
40
  src/models/FormSchema.ts
39
41
  src/models/GenerateSftpCredentialsRequest.ts
40
42
  src/models/GetExecutionLogsResponse.ts
@@ -76,6 +78,8 @@ src/models/UpdateUserRequest.ts
76
78
  src/models/UploadDatasetCreateResponse.ts
77
79
  src/models/UploadDatasetRequest.ts
78
80
  src/models/User.ts
81
+ src/models/ValidateDataInputsRequest.ts
82
+ src/models/ValidateDataInputsResponse.ts
79
83
  src/models/index.ts
80
84
  src/runtime.ts
81
85
  tsconfig.json
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.25-alpha --save
39
+ npm install @cirrobio/api-client@0.0.26-alpha --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { FormSchema, Process, ProcessDetail } from '../models/index';
13
+ import type { FormSchema, Process, ProcessDetail, ValidateDataInputsRequest, ValidateDataInputsResponse } from '../models/index';
14
14
  export interface GetProcessRequest {
15
15
  processId: string;
16
16
  }
@@ -20,6 +20,10 @@ export interface GetProcessParametersRequest {
20
20
  export interface GetProcessesRequest {
21
21
  includeArchived?: boolean;
22
22
  }
23
+ export interface ValidateDataInputsOperationRequest {
24
+ processId: string;
25
+ validateDataInputsRequest: ValidateDataInputsRequest;
26
+ }
23
27
  /**
24
28
  *
25
29
  */
@@ -54,4 +58,14 @@ export declare class ProcessesApi extends runtime.BaseAPI {
54
58
  * List processes
55
59
  */
56
60
  getProcesses(requestParameters?: GetProcessesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Process>>;
61
+ /**
62
+ * Checks the input file names with the expected files for a data type (ingest processes only)
63
+ * Validate data inputs
64
+ */
65
+ validateDataInputsRaw(requestParameters: ValidateDataInputsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ValidateDataInputsResponse>>;
66
+ /**
67
+ * Checks the input file names with the expected files for a data type (ingest processes only)
68
+ * Validate data inputs
69
+ */
70
+ validateDataInputs(requestParameters: ValidateDataInputsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ValidateDataInputsResponse>;
57
71
  }
@@ -241,6 +241,66 @@ var ProcessesApi = /** @class */ (function (_super) {
241
241
  });
242
242
  });
243
243
  };
244
+ /**
245
+ * Checks the input file names with the expected files for a data type (ingest processes only)
246
+ * Validate data inputs
247
+ */
248
+ ProcessesApi.prototype.validateDataInputsRaw = function (requestParameters, initOverrides) {
249
+ return __awaiter(this, void 0, void 0, function () {
250
+ var queryParameters, headerParameters, token, tokenString, response;
251
+ return __generator(this, function (_a) {
252
+ switch (_a.label) {
253
+ case 0:
254
+ if (requestParameters.processId === null || requestParameters.processId === undefined) {
255
+ throw new runtime.RequiredError('processId', 'Required parameter requestParameters.processId was null or undefined when calling validateDataInputs.');
256
+ }
257
+ if (requestParameters.validateDataInputsRequest === null || requestParameters.validateDataInputsRequest === undefined) {
258
+ throw new runtime.RequiredError('validateDataInputsRequest', 'Required parameter requestParameters.validateDataInputsRequest was null or undefined when calling validateDataInputs.');
259
+ }
260
+ queryParameters = {};
261
+ headerParameters = {};
262
+ headerParameters['Content-Type'] = 'application/json';
263
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
264
+ token = this.configuration.accessToken;
265
+ return [4 /*yield*/, token("accessToken", [])];
266
+ case 1:
267
+ tokenString = _a.sent();
268
+ if (tokenString) {
269
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
270
+ }
271
+ _a.label = 2;
272
+ case 2: return [4 /*yield*/, this.request({
273
+ path: "/processes/{processId}/validate-inputs".replace("{".concat("processId", "}"), encodeURIComponent(String(requestParameters.processId))),
274
+ method: 'POST',
275
+ headers: headerParameters,
276
+ query: queryParameters,
277
+ body: (0, index_1.ValidateDataInputsRequestToJSON)(requestParameters.validateDataInputsRequest),
278
+ }, initOverrides)];
279
+ case 3:
280
+ response = _a.sent();
281
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ValidateDataInputsResponseFromJSON)(jsonValue); })];
282
+ }
283
+ });
284
+ });
285
+ };
286
+ /**
287
+ * Checks the input file names with the expected files for a data type (ingest processes only)
288
+ * Validate data inputs
289
+ */
290
+ ProcessesApi.prototype.validateDataInputs = function (requestParameters, initOverrides) {
291
+ return __awaiter(this, void 0, void 0, function () {
292
+ var response;
293
+ return __generator(this, function (_a) {
294
+ switch (_a.label) {
295
+ case 0: return [4 /*yield*/, this.validateDataInputsRaw(requestParameters, initOverrides)];
296
+ case 1:
297
+ response = _a.sent();
298
+ return [4 /*yield*/, response.value()];
299
+ case 2: return [2 /*return*/, _a.sent()];
300
+ }
301
+ });
302
+ });
303
+ };
244
304
  return ProcessesApi;
245
305
  }(runtime.BaseAPI));
246
306
  exports.ProcessesApi = ProcessesApi;
@@ -0,0 +1,44 @@
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 { FileNamePattern } from './FileNamePattern';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface AllowedDataType
17
+ */
18
+ export interface AllowedDataType {
19
+ /**
20
+ *
21
+ * @type {string}
22
+ * @memberof AllowedDataType
23
+ */
24
+ description: string;
25
+ /**
26
+ *
27
+ * @type {string}
28
+ * @memberof AllowedDataType
29
+ */
30
+ errorMsg: string;
31
+ /**
32
+ *
33
+ * @type {Array<FileNamePattern>}
34
+ * @memberof AllowedDataType
35
+ */
36
+ allowedPatterns: Array<FileNamePattern>;
37
+ }
38
+ /**
39
+ * Check if a given object implements the AllowedDataType interface.
40
+ */
41
+ export declare function instanceOfAllowedDataType(value: object): boolean;
42
+ export declare function AllowedDataTypeFromJSON(json: any): AllowedDataType;
43
+ export declare function AllowedDataTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): AllowedDataType;
44
+ export declare function AllowedDataTypeToJSON(value?: AllowedDataType | null): any;
@@ -0,0 +1,57 @@
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.AllowedDataTypeToJSON = exports.AllowedDataTypeFromJSONTyped = exports.AllowedDataTypeFromJSON = exports.instanceOfAllowedDataType = void 0;
17
+ var FileNamePattern_1 = require("./FileNamePattern");
18
+ /**
19
+ * Check if a given object implements the AllowedDataType interface.
20
+ */
21
+ function instanceOfAllowedDataType(value) {
22
+ var isInstance = true;
23
+ isInstance = isInstance && "description" in value;
24
+ isInstance = isInstance && "errorMsg" in value;
25
+ isInstance = isInstance && "allowedPatterns" in value;
26
+ return isInstance;
27
+ }
28
+ exports.instanceOfAllowedDataType = instanceOfAllowedDataType;
29
+ function AllowedDataTypeFromJSON(json) {
30
+ return AllowedDataTypeFromJSONTyped(json, false);
31
+ }
32
+ exports.AllowedDataTypeFromJSON = AllowedDataTypeFromJSON;
33
+ function AllowedDataTypeFromJSONTyped(json, ignoreDiscriminator) {
34
+ if ((json === undefined) || (json === null)) {
35
+ return json;
36
+ }
37
+ return {
38
+ 'description': json['description'],
39
+ 'errorMsg': json['errorMsg'],
40
+ 'allowedPatterns': (json['allowedPatterns'].map(FileNamePattern_1.FileNamePatternFromJSON)),
41
+ };
42
+ }
43
+ exports.AllowedDataTypeFromJSONTyped = AllowedDataTypeFromJSONTyped;
44
+ function AllowedDataTypeToJSON(value) {
45
+ if (value === undefined) {
46
+ return undefined;
47
+ }
48
+ if (value === null) {
49
+ return null;
50
+ }
51
+ return {
52
+ 'description': value.description,
53
+ 'errorMsg': value.errorMsg,
54
+ 'allowedPatterns': (value.allowedPatterns.map(FileNamePattern_1.FileNamePatternToJSON)),
55
+ };
56
+ }
57
+ exports.AllowedDataTypeToJSON = AllowedDataTypeToJSON;
@@ -0,0 +1,43 @@
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 FileNamePattern
16
+ */
17
+ export interface FileNamePattern {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof FileNamePattern
22
+ */
23
+ exampleName: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof FileNamePattern
28
+ */
29
+ description: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof FileNamePattern
34
+ */
35
+ sampleMatchingPattern: string;
36
+ }
37
+ /**
38
+ * Check if a given object implements the FileNamePattern interface.
39
+ */
40
+ export declare function instanceOfFileNamePattern(value: object): boolean;
41
+ export declare function FileNamePatternFromJSON(json: any): FileNamePattern;
42
+ export declare function FileNamePatternFromJSONTyped(json: any, ignoreDiscriminator: boolean): FileNamePattern;
43
+ export declare function FileNamePatternToJSON(value?: FileNamePattern | null): any;
@@ -0,0 +1,56 @@
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.FileNamePatternToJSON = exports.FileNamePatternFromJSONTyped = exports.FileNamePatternFromJSON = exports.instanceOfFileNamePattern = void 0;
17
+ /**
18
+ * Check if a given object implements the FileNamePattern interface.
19
+ */
20
+ function instanceOfFileNamePattern(value) {
21
+ var isInstance = true;
22
+ isInstance = isInstance && "exampleName" in value;
23
+ isInstance = isInstance && "description" in value;
24
+ isInstance = isInstance && "sampleMatchingPattern" in value;
25
+ return isInstance;
26
+ }
27
+ exports.instanceOfFileNamePattern = instanceOfFileNamePattern;
28
+ function FileNamePatternFromJSON(json) {
29
+ return FileNamePatternFromJSONTyped(json, false);
30
+ }
31
+ exports.FileNamePatternFromJSON = FileNamePatternFromJSON;
32
+ function FileNamePatternFromJSONTyped(json, ignoreDiscriminator) {
33
+ if ((json === undefined) || (json === null)) {
34
+ return json;
35
+ }
36
+ return {
37
+ 'exampleName': json['exampleName'],
38
+ 'description': json['description'],
39
+ 'sampleMatchingPattern': json['sampleMatchingPattern'],
40
+ };
41
+ }
42
+ exports.FileNamePatternFromJSONTyped = FileNamePatternFromJSONTyped;
43
+ function FileNamePatternToJSON(value) {
44
+ if (value === undefined) {
45
+ return undefined;
46
+ }
47
+ if (value === null) {
48
+ return null;
49
+ }
50
+ return {
51
+ 'exampleName': value.exampleName,
52
+ 'description': value.description,
53
+ 'sampleMatchingPattern': value.sampleMatchingPattern,
54
+ };
55
+ }
56
+ exports.FileNamePatternToJSON = FileNamePatternToJSON;
@@ -0,0 +1,37 @@
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 ValidateDataInputsRequest
16
+ */
17
+ export interface ValidateDataInputsRequest {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof ValidateDataInputsRequest
22
+ */
23
+ sampleSheet: string;
24
+ /**
25
+ *
26
+ * @type {Array<string>}
27
+ * @memberof ValidateDataInputsRequest
28
+ */
29
+ fileNames: Array<string>;
30
+ }
31
+ /**
32
+ * Check if a given object implements the ValidateDataInputsRequest interface.
33
+ */
34
+ export declare function instanceOfValidateDataInputsRequest(value: object): boolean;
35
+ export declare function ValidateDataInputsRequestFromJSON(json: any): ValidateDataInputsRequest;
36
+ export declare function ValidateDataInputsRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ValidateDataInputsRequest;
37
+ export declare function ValidateDataInputsRequestToJSON(value?: ValidateDataInputsRequest | 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.ValidateDataInputsRequestToJSON = exports.ValidateDataInputsRequestFromJSONTyped = exports.ValidateDataInputsRequestFromJSON = exports.instanceOfValidateDataInputsRequest = void 0;
17
+ /**
18
+ * Check if a given object implements the ValidateDataInputsRequest interface.
19
+ */
20
+ function instanceOfValidateDataInputsRequest(value) {
21
+ var isInstance = true;
22
+ isInstance = isInstance && "sampleSheet" in value;
23
+ isInstance = isInstance && "fileNames" in value;
24
+ return isInstance;
25
+ }
26
+ exports.instanceOfValidateDataInputsRequest = instanceOfValidateDataInputsRequest;
27
+ function ValidateDataInputsRequestFromJSON(json) {
28
+ return ValidateDataInputsRequestFromJSONTyped(json, false);
29
+ }
30
+ exports.ValidateDataInputsRequestFromJSON = ValidateDataInputsRequestFromJSON;
31
+ function ValidateDataInputsRequestFromJSONTyped(json, ignoreDiscriminator) {
32
+ if ((json === undefined) || (json === null)) {
33
+ return json;
34
+ }
35
+ return {
36
+ 'sampleSheet': json['sampleSheet'],
37
+ 'fileNames': json['fileNames'],
38
+ };
39
+ }
40
+ exports.ValidateDataInputsRequestFromJSONTyped = ValidateDataInputsRequestFromJSONTyped;
41
+ function ValidateDataInputsRequestToJSON(value) {
42
+ if (value === undefined) {
43
+ return undefined;
44
+ }
45
+ if (value === null) {
46
+ return null;
47
+ }
48
+ return {
49
+ 'sampleSheet': value.sampleSheet,
50
+ 'fileNames': value.fileNames,
51
+ };
52
+ }
53
+ exports.ValidateDataInputsRequestToJSON = ValidateDataInputsRequestToJSON;
@@ -0,0 +1,44 @@
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 { AllowedDataType } from './AllowedDataType';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface ValidateDataInputsResponse
17
+ */
18
+ export interface ValidateDataInputsResponse {
19
+ /**
20
+ *
21
+ * @type {Array<string>}
22
+ * @memberof ValidateDataInputsResponse
23
+ */
24
+ files: Array<string>;
25
+ /**
26
+ *
27
+ * @type {string}
28
+ * @memberof ValidateDataInputsResponse
29
+ */
30
+ errorMsg: string;
31
+ /**
32
+ *
33
+ * @type {Array<AllowedDataType>}
34
+ * @memberof ValidateDataInputsResponse
35
+ */
36
+ allowedDataTypes: Array<AllowedDataType>;
37
+ }
38
+ /**
39
+ * Check if a given object implements the ValidateDataInputsResponse interface.
40
+ */
41
+ export declare function instanceOfValidateDataInputsResponse(value: object): boolean;
42
+ export declare function ValidateDataInputsResponseFromJSON(json: any): ValidateDataInputsResponse;
43
+ export declare function ValidateDataInputsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ValidateDataInputsResponse;
44
+ export declare function ValidateDataInputsResponseToJSON(value?: ValidateDataInputsResponse | null): any;
@@ -0,0 +1,57 @@
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.ValidateDataInputsResponseToJSON = exports.ValidateDataInputsResponseFromJSONTyped = exports.ValidateDataInputsResponseFromJSON = exports.instanceOfValidateDataInputsResponse = void 0;
17
+ var AllowedDataType_1 = require("./AllowedDataType");
18
+ /**
19
+ * Check if a given object implements the ValidateDataInputsResponse interface.
20
+ */
21
+ function instanceOfValidateDataInputsResponse(value) {
22
+ var isInstance = true;
23
+ isInstance = isInstance && "files" in value;
24
+ isInstance = isInstance && "errorMsg" in value;
25
+ isInstance = isInstance && "allowedDataTypes" in value;
26
+ return isInstance;
27
+ }
28
+ exports.instanceOfValidateDataInputsResponse = instanceOfValidateDataInputsResponse;
29
+ function ValidateDataInputsResponseFromJSON(json) {
30
+ return ValidateDataInputsResponseFromJSONTyped(json, false);
31
+ }
32
+ exports.ValidateDataInputsResponseFromJSON = ValidateDataInputsResponseFromJSON;
33
+ function ValidateDataInputsResponseFromJSONTyped(json, ignoreDiscriminator) {
34
+ if ((json === undefined) || (json === null)) {
35
+ return json;
36
+ }
37
+ return {
38
+ 'files': json['files'],
39
+ 'errorMsg': json['errorMsg'],
40
+ 'allowedDataTypes': (json['allowedDataTypes'].map(AllowedDataType_1.AllowedDataTypeFromJSON)),
41
+ };
42
+ }
43
+ exports.ValidateDataInputsResponseFromJSONTyped = ValidateDataInputsResponseFromJSONTyped;
44
+ function ValidateDataInputsResponseToJSON(value) {
45
+ if (value === undefined) {
46
+ return undefined;
47
+ }
48
+ if (value === null) {
49
+ return null;
50
+ }
51
+ return {
52
+ 'files': value.files,
53
+ 'errorMsg': value.errorMsg,
54
+ 'allowedDataTypes': (value.allowedDataTypes.map(AllowedDataType_1.AllowedDataTypeToJSON)),
55
+ };
56
+ }
57
+ exports.ValidateDataInputsResponseToJSON = ValidateDataInputsResponseToJSON;
@@ -1,3 +1,4 @@
1
+ export * from './AllowedDataType';
1
2
  export * from './BillingAccount';
2
3
  export * from './BillingAccountRequest';
3
4
  export * from './BillingMethod';
@@ -16,6 +17,7 @@ export * from './DatasetDetail';
16
17
  export * from './DatasetFile';
17
18
  export * from './DatasetViz';
18
19
  export * from './Executor';
20
+ export * from './FileNamePattern';
19
21
  export * from './FormSchema';
20
22
  export * from './GenerateSftpCredentialsRequest';
21
23
  export * from './GetExecutionLogsResponse';
@@ -57,3 +59,5 @@ export * from './UpdateUserRequest';
57
59
  export * from './UploadDatasetCreateResponse';
58
60
  export * from './UploadDatasetRequest';
59
61
  export * from './User';
62
+ export * from './ValidateDataInputsRequest';
63
+ export * from './ValidateDataInputsResponse';
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  /* tslint:disable */
18
18
  /* eslint-disable */
19
+ __exportStar(require("./AllowedDataType"), exports);
19
20
  __exportStar(require("./BillingAccount"), exports);
20
21
  __exportStar(require("./BillingAccountRequest"), exports);
21
22
  __exportStar(require("./BillingMethod"), exports);
@@ -34,6 +35,7 @@ __exportStar(require("./DatasetDetail"), exports);
34
35
  __exportStar(require("./DatasetFile"), exports);
35
36
  __exportStar(require("./DatasetViz"), exports);
36
37
  __exportStar(require("./Executor"), exports);
38
+ __exportStar(require("./FileNamePattern"), exports);
37
39
  __exportStar(require("./FormSchema"), exports);
38
40
  __exportStar(require("./GenerateSftpCredentialsRequest"), exports);
39
41
  __exportStar(require("./GetExecutionLogsResponse"), exports);
@@ -75,3 +77,5 @@ __exportStar(require("./UpdateUserRequest"), exports);
75
77
  __exportStar(require("./UploadDatasetCreateResponse"), exports);
76
78
  __exportStar(require("./UploadDatasetRequest"), exports);
77
79
  __exportStar(require("./User"), exports);
80
+ __exportStar(require("./ValidateDataInputsRequest"), exports);
81
+ __exportStar(require("./ValidateDataInputsResponse"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cirrobio/api-client",
3
- "version": "0.0.25-alpha",
3
+ "version": "0.0.26-alpha",
4
4
  "description": "API client for Cirro",
5
5
  "author": "CirroBio",
6
6
  "repository": {
@@ -18,6 +18,8 @@ import type {
18
18
  FormSchema,
19
19
  Process,
20
20
  ProcessDetail,
21
+ ValidateDataInputsRequest,
22
+ ValidateDataInputsResponse,
21
23
  } from '../models/index';
22
24
  import {
23
25
  FormSchemaFromJSON,
@@ -26,6 +28,10 @@ import {
26
28
  ProcessToJSON,
27
29
  ProcessDetailFromJSON,
28
30
  ProcessDetailToJSON,
31
+ ValidateDataInputsRequestFromJSON,
32
+ ValidateDataInputsRequestToJSON,
33
+ ValidateDataInputsResponseFromJSON,
34
+ ValidateDataInputsResponseToJSON,
29
35
  } from '../models/index';
30
36
 
31
37
  export interface GetProcessRequest {
@@ -40,6 +46,11 @@ export interface GetProcessesRequest {
40
46
  includeArchived?: boolean;
41
47
  }
42
48
 
49
+ export interface ValidateDataInputsOperationRequest {
50
+ processId: string;
51
+ validateDataInputsRequest: ValidateDataInputsRequest;
52
+ }
53
+
43
54
  /**
44
55
  *
45
56
  */
@@ -165,4 +176,51 @@ export class ProcessesApi extends runtime.BaseAPI {
165
176
  return await response.value();
166
177
  }
167
178
 
179
+ /**
180
+ * Checks the input file names with the expected files for a data type (ingest processes only)
181
+ * Validate data inputs
182
+ */
183
+ async validateDataInputsRaw(requestParameters: ValidateDataInputsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ValidateDataInputsResponse>> {
184
+ if (requestParameters.processId === null || requestParameters.processId === undefined) {
185
+ throw new runtime.RequiredError('processId','Required parameter requestParameters.processId was null or undefined when calling validateDataInputs.');
186
+ }
187
+
188
+ if (requestParameters.validateDataInputsRequest === null || requestParameters.validateDataInputsRequest === undefined) {
189
+ throw new runtime.RequiredError('validateDataInputsRequest','Required parameter requestParameters.validateDataInputsRequest was null or undefined when calling validateDataInputs.');
190
+ }
191
+
192
+ const queryParameters: any = {};
193
+
194
+ const headerParameters: runtime.HTTPHeaders = {};
195
+
196
+ headerParameters['Content-Type'] = 'application/json';
197
+
198
+ if (this.configuration && this.configuration.accessToken) {
199
+ const token = this.configuration.accessToken;
200
+ const tokenString = await token("accessToken", []);
201
+
202
+ if (tokenString) {
203
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
204
+ }
205
+ }
206
+ const response = await this.request({
207
+ path: `/processes/{processId}/validate-inputs`.replace(`{${"processId"}}`, encodeURIComponent(String(requestParameters.processId))),
208
+ method: 'POST',
209
+ headers: headerParameters,
210
+ query: queryParameters,
211
+ body: ValidateDataInputsRequestToJSON(requestParameters.validateDataInputsRequest),
212
+ }, initOverrides);
213
+
214
+ return new runtime.JSONApiResponse(response, (jsonValue) => ValidateDataInputsResponseFromJSON(jsonValue));
215
+ }
216
+
217
+ /**
218
+ * Checks the input file names with the expected files for a data type (ingest processes only)
219
+ * Validate data inputs
220
+ */
221
+ async validateDataInputs(requestParameters: ValidateDataInputsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ValidateDataInputsResponse> {
222
+ const response = await this.validateDataInputsRaw(requestParameters, initOverrides);
223
+ return await response.value();
224
+ }
225
+
168
226
  }
@@ -0,0 +1,91 @@
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 { FileNamePattern } from './FileNamePattern';
17
+ import {
18
+ FileNamePatternFromJSON,
19
+ FileNamePatternFromJSONTyped,
20
+ FileNamePatternToJSON,
21
+ } from './FileNamePattern';
22
+
23
+ /**
24
+ *
25
+ * @export
26
+ * @interface AllowedDataType
27
+ */
28
+ export interface AllowedDataType {
29
+ /**
30
+ *
31
+ * @type {string}
32
+ * @memberof AllowedDataType
33
+ */
34
+ description: string;
35
+ /**
36
+ *
37
+ * @type {string}
38
+ * @memberof AllowedDataType
39
+ */
40
+ errorMsg: string;
41
+ /**
42
+ *
43
+ * @type {Array<FileNamePattern>}
44
+ * @memberof AllowedDataType
45
+ */
46
+ allowedPatterns: Array<FileNamePattern>;
47
+ }
48
+
49
+ /**
50
+ * Check if a given object implements the AllowedDataType interface.
51
+ */
52
+ export function instanceOfAllowedDataType(value: object): boolean {
53
+ let isInstance = true;
54
+ isInstance = isInstance && "description" in value;
55
+ isInstance = isInstance && "errorMsg" in value;
56
+ isInstance = isInstance && "allowedPatterns" in value;
57
+
58
+ return isInstance;
59
+ }
60
+
61
+ export function AllowedDataTypeFromJSON(json: any): AllowedDataType {
62
+ return AllowedDataTypeFromJSONTyped(json, false);
63
+ }
64
+
65
+ export function AllowedDataTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): AllowedDataType {
66
+ if ((json === undefined) || (json === null)) {
67
+ return json;
68
+ }
69
+ return {
70
+
71
+ 'description': json['description'],
72
+ 'errorMsg': json['errorMsg'],
73
+ 'allowedPatterns': ((json['allowedPatterns'] as Array<any>).map(FileNamePatternFromJSON)),
74
+ };
75
+ }
76
+
77
+ export function AllowedDataTypeToJSON(value?: AllowedDataType | null): any {
78
+ if (value === undefined) {
79
+ return undefined;
80
+ }
81
+ if (value === null) {
82
+ return null;
83
+ }
84
+ return {
85
+
86
+ 'description': value.description,
87
+ 'errorMsg': value.errorMsg,
88
+ 'allowedPatterns': ((value.allowedPatterns as Array<any>).map(FileNamePatternToJSON)),
89
+ };
90
+ }
91
+
@@ -0,0 +1,84 @@
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 FileNamePattern
20
+ */
21
+ export interface FileNamePattern {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof FileNamePattern
26
+ */
27
+ exampleName: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof FileNamePattern
32
+ */
33
+ description: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof FileNamePattern
38
+ */
39
+ sampleMatchingPattern: string;
40
+ }
41
+
42
+ /**
43
+ * Check if a given object implements the FileNamePattern interface.
44
+ */
45
+ export function instanceOfFileNamePattern(value: object): boolean {
46
+ let isInstance = true;
47
+ isInstance = isInstance && "exampleName" in value;
48
+ isInstance = isInstance && "description" in value;
49
+ isInstance = isInstance && "sampleMatchingPattern" in value;
50
+
51
+ return isInstance;
52
+ }
53
+
54
+ export function FileNamePatternFromJSON(json: any): FileNamePattern {
55
+ return FileNamePatternFromJSONTyped(json, false);
56
+ }
57
+
58
+ export function FileNamePatternFromJSONTyped(json: any, ignoreDiscriminator: boolean): FileNamePattern {
59
+ if ((json === undefined) || (json === null)) {
60
+ return json;
61
+ }
62
+ return {
63
+
64
+ 'exampleName': json['exampleName'],
65
+ 'description': json['description'],
66
+ 'sampleMatchingPattern': json['sampleMatchingPattern'],
67
+ };
68
+ }
69
+
70
+ export function FileNamePatternToJSON(value?: FileNamePattern | null): any {
71
+ if (value === undefined) {
72
+ return undefined;
73
+ }
74
+ if (value === null) {
75
+ return null;
76
+ }
77
+ return {
78
+
79
+ 'exampleName': value.exampleName,
80
+ 'description': value.description,
81
+ 'sampleMatchingPattern': value.sampleMatchingPattern,
82
+ };
83
+ }
84
+
@@ -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 ValidateDataInputsRequest
20
+ */
21
+ export interface ValidateDataInputsRequest {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof ValidateDataInputsRequest
26
+ */
27
+ sampleSheet: string;
28
+ /**
29
+ *
30
+ * @type {Array<string>}
31
+ * @memberof ValidateDataInputsRequest
32
+ */
33
+ fileNames: Array<string>;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the ValidateDataInputsRequest interface.
38
+ */
39
+ export function instanceOfValidateDataInputsRequest(value: object): boolean {
40
+ let isInstance = true;
41
+ isInstance = isInstance && "sampleSheet" in value;
42
+ isInstance = isInstance && "fileNames" in value;
43
+
44
+ return isInstance;
45
+ }
46
+
47
+ export function ValidateDataInputsRequestFromJSON(json: any): ValidateDataInputsRequest {
48
+ return ValidateDataInputsRequestFromJSONTyped(json, false);
49
+ }
50
+
51
+ export function ValidateDataInputsRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ValidateDataInputsRequest {
52
+ if ((json === undefined) || (json === null)) {
53
+ return json;
54
+ }
55
+ return {
56
+
57
+ 'sampleSheet': json['sampleSheet'],
58
+ 'fileNames': json['fileNames'],
59
+ };
60
+ }
61
+
62
+ export function ValidateDataInputsRequestToJSON(value?: ValidateDataInputsRequest | null): any {
63
+ if (value === undefined) {
64
+ return undefined;
65
+ }
66
+ if (value === null) {
67
+ return null;
68
+ }
69
+ return {
70
+
71
+ 'sampleSheet': value.sampleSheet,
72
+ 'fileNames': value.fileNames,
73
+ };
74
+ }
75
+
@@ -0,0 +1,91 @@
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 { AllowedDataType } from './AllowedDataType';
17
+ import {
18
+ AllowedDataTypeFromJSON,
19
+ AllowedDataTypeFromJSONTyped,
20
+ AllowedDataTypeToJSON,
21
+ } from './AllowedDataType';
22
+
23
+ /**
24
+ *
25
+ * @export
26
+ * @interface ValidateDataInputsResponse
27
+ */
28
+ export interface ValidateDataInputsResponse {
29
+ /**
30
+ *
31
+ * @type {Array<string>}
32
+ * @memberof ValidateDataInputsResponse
33
+ */
34
+ files: Array<string>;
35
+ /**
36
+ *
37
+ * @type {string}
38
+ * @memberof ValidateDataInputsResponse
39
+ */
40
+ errorMsg: string;
41
+ /**
42
+ *
43
+ * @type {Array<AllowedDataType>}
44
+ * @memberof ValidateDataInputsResponse
45
+ */
46
+ allowedDataTypes: Array<AllowedDataType>;
47
+ }
48
+
49
+ /**
50
+ * Check if a given object implements the ValidateDataInputsResponse interface.
51
+ */
52
+ export function instanceOfValidateDataInputsResponse(value: object): boolean {
53
+ let isInstance = true;
54
+ isInstance = isInstance && "files" in value;
55
+ isInstance = isInstance && "errorMsg" in value;
56
+ isInstance = isInstance && "allowedDataTypes" in value;
57
+
58
+ return isInstance;
59
+ }
60
+
61
+ export function ValidateDataInputsResponseFromJSON(json: any): ValidateDataInputsResponse {
62
+ return ValidateDataInputsResponseFromJSONTyped(json, false);
63
+ }
64
+
65
+ export function ValidateDataInputsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ValidateDataInputsResponse {
66
+ if ((json === undefined) || (json === null)) {
67
+ return json;
68
+ }
69
+ return {
70
+
71
+ 'files': json['files'],
72
+ 'errorMsg': json['errorMsg'],
73
+ 'allowedDataTypes': ((json['allowedDataTypes'] as Array<any>).map(AllowedDataTypeFromJSON)),
74
+ };
75
+ }
76
+
77
+ export function ValidateDataInputsResponseToJSON(value?: ValidateDataInputsResponse | null): any {
78
+ if (value === undefined) {
79
+ return undefined;
80
+ }
81
+ if (value === null) {
82
+ return null;
83
+ }
84
+ return {
85
+
86
+ 'files': value.files,
87
+ 'errorMsg': value.errorMsg,
88
+ 'allowedDataTypes': ((value.allowedDataTypes as Array<any>).map(AllowedDataTypeToJSON)),
89
+ };
90
+ }
91
+
@@ -1,5 +1,6 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
+ export * from './AllowedDataType';
3
4
  export * from './BillingAccount';
4
5
  export * from './BillingAccountRequest';
5
6
  export * from './BillingMethod';
@@ -18,6 +19,7 @@ export * from './DatasetDetail';
18
19
  export * from './DatasetFile';
19
20
  export * from './DatasetViz';
20
21
  export * from './Executor';
22
+ export * from './FileNamePattern';
21
23
  export * from './FormSchema';
22
24
  export * from './GenerateSftpCredentialsRequest';
23
25
  export * from './GetExecutionLogsResponse';
@@ -59,3 +61,5 @@ export * from './UpdateUserRequest';
59
61
  export * from './UploadDatasetCreateResponse';
60
62
  export * from './UploadDatasetRequest';
61
63
  export * from './User';
64
+ export * from './ValidateDataInputsRequest';
65
+ export * from './ValidateDataInputsResponse';