@cirrobio/api-client 0.1.19 → 0.1.21

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.
@@ -73,6 +73,7 @@ src/models/Process.ts
73
73
  src/models/ProcessDetail.ts
74
74
  src/models/Project.ts
75
75
  src/models/ProjectAccessRequest.ts
76
+ src/models/ProjectCreateOptions.ts
76
77
  src/models/ProjectDetail.ts
77
78
  src/models/ProjectMetrics.ts
78
79
  src/models/ProjectRequest.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.1.19 --save
39
+ npm install @cirrobio/api-client@0.1.21 --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 { ApproveProjectAccessRequest, CreateProjectAccessRequest, CreateResponse, Project, ProjectAccessRequest, ProjectDetail, ProjectRequest, ProjectUser, SetUserProjectRoleRequest, Tag } from '../models/index';
13
+ import type { ApproveProjectAccessRequest, CreateProjectAccessRequest, CreateResponse, Project, ProjectAccessRequest, ProjectCreateOptions, ProjectDetail, ProjectRequest, ProjectUser, SetUserProjectRoleRequest, Tag } from '../models/index';
14
14
  export interface ApproveAccessRequestRequest {
15
15
  projectId: string;
16
16
  accessRequestId: string;
@@ -142,6 +142,16 @@ export declare class ProjectsApi extends runtime.BaseAPI {
142
142
  * Get project
143
143
  */
144
144
  getProject(requestParameters: GetProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProjectDetail>;
145
+ /**
146
+ * Get allowed options for creating a project
147
+ * Get project create options
148
+ */
149
+ getProjectCreateOptionsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ProjectCreateOptions>>;
150
+ /**
151
+ * Get allowed options for creating a project
152
+ * Get project create options
153
+ */
154
+ getProjectCreateOptions(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProjectCreateOptions>;
145
155
  /**
146
156
  * Gets users who have access to the project
147
157
  * Get project permissions
@@ -527,6 +527,58 @@ var ProjectsApi = /** @class */ (function (_super) {
527
527
  });
528
528
  });
529
529
  };
530
+ /**
531
+ * Get allowed options for creating a project
532
+ * Get project create options
533
+ */
534
+ ProjectsApi.prototype.getProjectCreateOptionsRaw = function (initOverrides) {
535
+ return __awaiter(this, void 0, void 0, function () {
536
+ var queryParameters, headerParameters, token, tokenString, response;
537
+ return __generator(this, function (_a) {
538
+ switch (_a.label) {
539
+ case 0:
540
+ queryParameters = {};
541
+ headerParameters = {};
542
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
543
+ token = this.configuration.accessToken;
544
+ return [4 /*yield*/, token("accessToken", [])];
545
+ case 1:
546
+ tokenString = _a.sent();
547
+ if (tokenString) {
548
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
549
+ }
550
+ _a.label = 2;
551
+ case 2: return [4 /*yield*/, this.request({
552
+ path: "/projects",
553
+ method: 'OPTIONS',
554
+ headers: headerParameters,
555
+ query: queryParameters,
556
+ }, initOverrides)];
557
+ case 3:
558
+ response = _a.sent();
559
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ProjectCreateOptionsFromJSON)(jsonValue); })];
560
+ }
561
+ });
562
+ });
563
+ };
564
+ /**
565
+ * Get allowed options for creating a project
566
+ * Get project create options
567
+ */
568
+ ProjectsApi.prototype.getProjectCreateOptions = function (initOverrides) {
569
+ return __awaiter(this, void 0, void 0, function () {
570
+ var response;
571
+ return __generator(this, function (_a) {
572
+ switch (_a.label) {
573
+ case 0: return [4 /*yield*/, this.getProjectCreateOptionsRaw(initOverrides)];
574
+ case 1:
575
+ response = _a.sent();
576
+ return [4 /*yield*/, response.value()];
577
+ case 2: return [2 /*return*/, _a.sent()];
578
+ }
579
+ });
580
+ });
581
+ };
530
582
  /**
531
583
  * Gets users who have access to the project
532
584
  * Get project permissions
@@ -27,6 +27,12 @@ export interface FeatureFlags {
27
27
  * @memberof FeatureFlags
28
28
  */
29
29
  governanceEnabled: boolean;
30
+ /**
31
+ *
32
+ * @type {boolean}
33
+ * @memberof FeatureFlags
34
+ */
35
+ projectRequestsEnabled: boolean;
30
36
  }
31
37
  /**
32
38
  * Check if a given object implements the FeatureFlags interface.
@@ -21,6 +21,7 @@ function instanceOfFeatureFlags(value) {
21
21
  var isInstance = true;
22
22
  isInstance = isInstance && "sftpEnabled" in value;
23
23
  isInstance = isInstance && "governanceEnabled" in value;
24
+ isInstance = isInstance && "projectRequestsEnabled" in value;
24
25
  return isInstance;
25
26
  }
26
27
  exports.instanceOfFeatureFlags = instanceOfFeatureFlags;
@@ -35,6 +36,7 @@ function FeatureFlagsFromJSONTyped(json, ignoreDiscriminator) {
35
36
  return {
36
37
  'sftpEnabled': json['sftpEnabled'],
37
38
  'governanceEnabled': json['governanceEnabled'],
39
+ 'projectRequestsEnabled': json['projectRequestsEnabled'],
38
40
  };
39
41
  }
40
42
  exports.FeatureFlagsFromJSONTyped = FeatureFlagsFromJSONTyped;
@@ -48,6 +50,7 @@ function FeatureFlagsToJSON(value) {
48
50
  return {
49
51
  'sftpEnabled': value.sftpEnabled,
50
52
  'governanceEnabled': value.governanceEnabled,
53
+ 'projectRequestsEnabled': value.projectRequestsEnabled,
51
54
  };
52
55
  }
53
56
  exports.FeatureFlagsToJSON = FeatureFlagsToJSON;
@@ -0,0 +1,56 @@
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 { CloudAccountType } from './CloudAccountType';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface ProjectCreateOptions
17
+ */
18
+ export interface ProjectCreateOptions {
19
+ /**
20
+ *
21
+ * @type {Array<CloudAccountType>}
22
+ * @memberof ProjectCreateOptions
23
+ */
24
+ enabledAccountTypes: Array<CloudAccountType>;
25
+ /**
26
+ *
27
+ * @type {string}
28
+ * @memberof ProjectCreateOptions
29
+ */
30
+ portalAccountId: string;
31
+ /**
32
+ *
33
+ * @type {string}
34
+ * @memberof ProjectCreateOptions
35
+ */
36
+ portalRegion: string;
37
+ /**
38
+ *
39
+ * @type {string}
40
+ * @memberof ProjectCreateOptions
41
+ */
42
+ templateUrl: string;
43
+ /**
44
+ *
45
+ * @type {string}
46
+ * @memberof ProjectCreateOptions
47
+ */
48
+ wizardUrl: string;
49
+ }
50
+ /**
51
+ * Check if a given object implements the ProjectCreateOptions interface.
52
+ */
53
+ export declare function instanceOfProjectCreateOptions(value: object): boolean;
54
+ export declare function ProjectCreateOptionsFromJSON(json: any): ProjectCreateOptions;
55
+ export declare function ProjectCreateOptionsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProjectCreateOptions;
56
+ export declare function ProjectCreateOptionsToJSON(value?: ProjectCreateOptions | null): any;
@@ -0,0 +1,63 @@
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.ProjectCreateOptionsToJSON = exports.ProjectCreateOptionsFromJSONTyped = exports.ProjectCreateOptionsFromJSON = exports.instanceOfProjectCreateOptions = void 0;
17
+ var CloudAccountType_1 = require("./CloudAccountType");
18
+ /**
19
+ * Check if a given object implements the ProjectCreateOptions interface.
20
+ */
21
+ function instanceOfProjectCreateOptions(value) {
22
+ var isInstance = true;
23
+ isInstance = isInstance && "enabledAccountTypes" in value;
24
+ isInstance = isInstance && "portalAccountId" in value;
25
+ isInstance = isInstance && "portalRegion" in value;
26
+ isInstance = isInstance && "templateUrl" in value;
27
+ isInstance = isInstance && "wizardUrl" in value;
28
+ return isInstance;
29
+ }
30
+ exports.instanceOfProjectCreateOptions = instanceOfProjectCreateOptions;
31
+ function ProjectCreateOptionsFromJSON(json) {
32
+ return ProjectCreateOptionsFromJSONTyped(json, false);
33
+ }
34
+ exports.ProjectCreateOptionsFromJSON = ProjectCreateOptionsFromJSON;
35
+ function ProjectCreateOptionsFromJSONTyped(json, ignoreDiscriminator) {
36
+ if ((json === undefined) || (json === null)) {
37
+ return json;
38
+ }
39
+ return {
40
+ 'enabledAccountTypes': (json['enabledAccountTypes'].map(CloudAccountType_1.CloudAccountTypeFromJSON)),
41
+ 'portalAccountId': json['portalAccountId'],
42
+ 'portalRegion': json['portalRegion'],
43
+ 'templateUrl': json['templateUrl'],
44
+ 'wizardUrl': json['wizardUrl'],
45
+ };
46
+ }
47
+ exports.ProjectCreateOptionsFromJSONTyped = ProjectCreateOptionsFromJSONTyped;
48
+ function ProjectCreateOptionsToJSON(value) {
49
+ if (value === undefined) {
50
+ return undefined;
51
+ }
52
+ if (value === null) {
53
+ return null;
54
+ }
55
+ return {
56
+ 'enabledAccountTypes': (value.enabledAccountTypes.map(CloudAccountType_1.CloudAccountTypeToJSON)),
57
+ 'portalAccountId': value.portalAccountId,
58
+ 'portalRegion': value.portalRegion,
59
+ 'templateUrl': value.templateUrl,
60
+ 'wizardUrl': value.wizardUrl,
61
+ };
62
+ }
63
+ exports.ProjectCreateOptionsToJSON = ProjectCreateOptionsToJSON;
@@ -53,6 +53,7 @@ export * from './Process';
53
53
  export * from './ProcessDetail';
54
54
  export * from './Project';
55
55
  export * from './ProjectAccessRequest';
56
+ export * from './ProjectCreateOptions';
56
57
  export * from './ProjectDetail';
57
58
  export * from './ProjectMetrics';
58
59
  export * from './ProjectRequest';
@@ -71,6 +71,7 @@ __exportStar(require("./Process"), exports);
71
71
  __exportStar(require("./ProcessDetail"), exports);
72
72
  __exportStar(require("./Project"), exports);
73
73
  __exportStar(require("./ProjectAccessRequest"), exports);
74
+ __exportStar(require("./ProjectCreateOptions"), exports);
74
75
  __exportStar(require("./ProjectDetail"), exports);
75
76
  __exportStar(require("./ProjectMetrics"), exports);
76
77
  __exportStar(require("./ProjectRequest"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cirrobio/api-client",
3
- "version": "0.1.19",
3
+ "version": "0.1.21",
4
4
  "description": "API client for Cirro",
5
5
  "author": "CirroBio",
6
6
  "repository": {
@@ -20,6 +20,7 @@ import type {
20
20
  CreateResponse,
21
21
  Project,
22
22
  ProjectAccessRequest,
23
+ ProjectCreateOptions,
23
24
  ProjectDetail,
24
25
  ProjectRequest,
25
26
  ProjectUser,
@@ -37,6 +38,8 @@ import {
37
38
  ProjectToJSON,
38
39
  ProjectAccessRequestFromJSON,
39
40
  ProjectAccessRequestToJSON,
41
+ ProjectCreateOptionsFromJSON,
42
+ ProjectCreateOptionsToJSON,
40
43
  ProjectDetailFromJSON,
41
44
  ProjectDetailToJSON,
42
45
  ProjectRequestFromJSON,
@@ -456,6 +459,42 @@ export class ProjectsApi extends runtime.BaseAPI {
456
459
  return await response.value();
457
460
  }
458
461
 
462
+ /**
463
+ * Get allowed options for creating a project
464
+ * Get project create options
465
+ */
466
+ async getProjectCreateOptionsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ProjectCreateOptions>> {
467
+ const queryParameters: any = {};
468
+
469
+ const headerParameters: runtime.HTTPHeaders = {};
470
+
471
+ if (this.configuration && this.configuration.accessToken) {
472
+ const token = this.configuration.accessToken;
473
+ const tokenString = await token("accessToken", []);
474
+
475
+ if (tokenString) {
476
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
477
+ }
478
+ }
479
+ const response = await this.request({
480
+ path: `/projects`,
481
+ method: 'OPTIONS',
482
+ headers: headerParameters,
483
+ query: queryParameters,
484
+ }, initOverrides);
485
+
486
+ return new runtime.JSONApiResponse(response, (jsonValue) => ProjectCreateOptionsFromJSON(jsonValue));
487
+ }
488
+
489
+ /**
490
+ * Get allowed options for creating a project
491
+ * Get project create options
492
+ */
493
+ async getProjectCreateOptions(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProjectCreateOptions> {
494
+ const response = await this.getProjectCreateOptionsRaw(initOverrides);
495
+ return await response.value();
496
+ }
497
+
459
498
  /**
460
499
  * Gets users who have access to the project
461
500
  * Get project permissions
@@ -31,6 +31,12 @@ export interface FeatureFlags {
31
31
  * @memberof FeatureFlags
32
32
  */
33
33
  governanceEnabled: boolean;
34
+ /**
35
+ *
36
+ * @type {boolean}
37
+ * @memberof FeatureFlags
38
+ */
39
+ projectRequestsEnabled: boolean;
34
40
  }
35
41
 
36
42
  /**
@@ -40,6 +46,7 @@ export function instanceOfFeatureFlags(value: object): boolean {
40
46
  let isInstance = true;
41
47
  isInstance = isInstance && "sftpEnabled" in value;
42
48
  isInstance = isInstance && "governanceEnabled" in value;
49
+ isInstance = isInstance && "projectRequestsEnabled" in value;
43
50
 
44
51
  return isInstance;
45
52
  }
@@ -56,6 +63,7 @@ export function FeatureFlagsFromJSONTyped(json: any, ignoreDiscriminator: boolea
56
63
 
57
64
  'sftpEnabled': json['sftpEnabled'],
58
65
  'governanceEnabled': json['governanceEnabled'],
66
+ 'projectRequestsEnabled': json['projectRequestsEnabled'],
59
67
  };
60
68
  }
61
69
 
@@ -70,6 +78,7 @@ export function FeatureFlagsToJSON(value?: FeatureFlags | null): any {
70
78
 
71
79
  'sftpEnabled': value.sftpEnabled,
72
80
  'governanceEnabled': value.governanceEnabled,
81
+ 'projectRequestsEnabled': value.projectRequestsEnabled,
73
82
  };
74
83
  }
75
84
 
@@ -0,0 +1,109 @@
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 { CloudAccountType } from './CloudAccountType';
17
+ import {
18
+ CloudAccountTypeFromJSON,
19
+ CloudAccountTypeFromJSONTyped,
20
+ CloudAccountTypeToJSON,
21
+ } from './CloudAccountType';
22
+
23
+ /**
24
+ *
25
+ * @export
26
+ * @interface ProjectCreateOptions
27
+ */
28
+ export interface ProjectCreateOptions {
29
+ /**
30
+ *
31
+ * @type {Array<CloudAccountType>}
32
+ * @memberof ProjectCreateOptions
33
+ */
34
+ enabledAccountTypes: Array<CloudAccountType>;
35
+ /**
36
+ *
37
+ * @type {string}
38
+ * @memberof ProjectCreateOptions
39
+ */
40
+ portalAccountId: string;
41
+ /**
42
+ *
43
+ * @type {string}
44
+ * @memberof ProjectCreateOptions
45
+ */
46
+ portalRegion: string;
47
+ /**
48
+ *
49
+ * @type {string}
50
+ * @memberof ProjectCreateOptions
51
+ */
52
+ templateUrl: string;
53
+ /**
54
+ *
55
+ * @type {string}
56
+ * @memberof ProjectCreateOptions
57
+ */
58
+ wizardUrl: string;
59
+ }
60
+
61
+ /**
62
+ * Check if a given object implements the ProjectCreateOptions interface.
63
+ */
64
+ export function instanceOfProjectCreateOptions(value: object): boolean {
65
+ let isInstance = true;
66
+ isInstance = isInstance && "enabledAccountTypes" in value;
67
+ isInstance = isInstance && "portalAccountId" in value;
68
+ isInstance = isInstance && "portalRegion" in value;
69
+ isInstance = isInstance && "templateUrl" in value;
70
+ isInstance = isInstance && "wizardUrl" in value;
71
+
72
+ return isInstance;
73
+ }
74
+
75
+ export function ProjectCreateOptionsFromJSON(json: any): ProjectCreateOptions {
76
+ return ProjectCreateOptionsFromJSONTyped(json, false);
77
+ }
78
+
79
+ export function ProjectCreateOptionsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProjectCreateOptions {
80
+ if ((json === undefined) || (json === null)) {
81
+ return json;
82
+ }
83
+ return {
84
+
85
+ 'enabledAccountTypes': ((json['enabledAccountTypes'] as Array<any>).map(CloudAccountTypeFromJSON)),
86
+ 'portalAccountId': json['portalAccountId'],
87
+ 'portalRegion': json['portalRegion'],
88
+ 'templateUrl': json['templateUrl'],
89
+ 'wizardUrl': json['wizardUrl'],
90
+ };
91
+ }
92
+
93
+ export function ProjectCreateOptionsToJSON(value?: ProjectCreateOptions | null): any {
94
+ if (value === undefined) {
95
+ return undefined;
96
+ }
97
+ if (value === null) {
98
+ return null;
99
+ }
100
+ return {
101
+
102
+ 'enabledAccountTypes': ((value.enabledAccountTypes as Array<any>).map(CloudAccountTypeToJSON)),
103
+ 'portalAccountId': value.portalAccountId,
104
+ 'portalRegion': value.portalRegion,
105
+ 'templateUrl': value.templateUrl,
106
+ 'wizardUrl': value.wizardUrl,
107
+ };
108
+ }
109
+
@@ -55,6 +55,7 @@ export * from './Process';
55
55
  export * from './ProcessDetail';
56
56
  export * from './Project';
57
57
  export * from './ProjectAccessRequest';
58
+ export * from './ProjectCreateOptions';
58
59
  export * from './ProjectDetail';
59
60
  export * from './ProjectMetrics';
60
61
  export * from './ProjectRequest';