@cirrobio/api-client 0.1.22 → 0.1.23
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 +1 -1
- package/dist/apis/ProjectsApi.d.ts +11 -1
- package/dist/apis/ProjectsApi.js +52 -0
- package/dist/models/Status.d.ts +2 -1
- package/dist/models/Status.js +1 -0
- package/package.json +1 -1
- package/src/apis/ProjectsApi.ts +39 -0
- package/src/models/Status.ts +2 -1
package/README.md
CHANGED
|
@@ -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
|
package/dist/apis/ProjectsApi.js
CHANGED
|
@@ -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
|
package/dist/models/Status.d.ts
CHANGED
|
@@ -23,7 +23,8 @@ export declare enum Status {
|
|
|
23
23
|
Deleting = "DELETING",
|
|
24
24
|
Suspended = "SUSPENDED",
|
|
25
25
|
Delete = "DELETE",
|
|
26
|
-
Failed = "FAILED"
|
|
26
|
+
Failed = "FAILED",
|
|
27
|
+
Unknown = "UNKNOWN"
|
|
27
28
|
}
|
|
28
29
|
export declare function StatusFromJSON(json: any): Status;
|
|
29
30
|
export declare function StatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): Status;
|
package/dist/models/Status.js
CHANGED
|
@@ -30,6 +30,7 @@ var Status;
|
|
|
30
30
|
Status["Suspended"] = "SUSPENDED";
|
|
31
31
|
Status["Delete"] = "DELETE";
|
|
32
32
|
Status["Failed"] = "FAILED";
|
|
33
|
+
Status["Unknown"] = "UNKNOWN";
|
|
33
34
|
})(Status = exports.Status || (exports.Status = {}));
|
|
34
35
|
function StatusFromJSON(json) {
|
|
35
36
|
return StatusFromJSONTyped(json, false);
|
package/package.json
CHANGED
package/src/apis/ProjectsApi.ts
CHANGED
|
@@ -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
|