@cirrobio/api-client 0.0.9-alpha → 0.0.10-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.
- package/README.md +1 -1
- package/dist/apis/ProjectsApi.d.ts +0 -1
- package/dist/apis/ProjectsApi.js +1 -4
- package/dist/apis/SystemApi.d.ts +8 -0
- package/dist/apis/SystemApi.js +41 -0
- package/dist/models/SetUserProjectRoleRequest.d.ts +15 -2
- package/dist/models/SetUserProjectRoleRequest.js +9 -2
- package/package.json +1 -1
- package/src/apis/ProjectsApi.ts +1 -6
- package/src/apis/SystemApi.ts +26 -0
- package/src/models/SetUserProjectRoleRequest.ts +29 -4
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.
|
|
39
|
+
npm install @cirrobio/api-client@0.0.10-alpha --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
package/dist/apis/ProjectsApi.js
CHANGED
|
@@ -307,9 +307,6 @@ var ProjectsApi = /** @class */ (function (_super) {
|
|
|
307
307
|
if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
|
|
308
308
|
throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling setUserProjectRole.');
|
|
309
309
|
}
|
|
310
|
-
if (requestParameters.username === null || requestParameters.username === undefined) {
|
|
311
|
-
throw new runtime.RequiredError('username', 'Required parameter requestParameters.username was null or undefined when calling setUserProjectRole.');
|
|
312
|
-
}
|
|
313
310
|
if (requestParameters.setUserProjectRoleRequest === null || requestParameters.setUserProjectRoleRequest === undefined) {
|
|
314
311
|
throw new runtime.RequiredError('setUserProjectRoleRequest', 'Required parameter requestParameters.setUserProjectRoleRequest was null or undefined when calling setUserProjectRole.');
|
|
315
312
|
}
|
|
@@ -326,7 +323,7 @@ var ProjectsApi = /** @class */ (function (_super) {
|
|
|
326
323
|
}
|
|
327
324
|
_a.label = 2;
|
|
328
325
|
case 2: return [4 /*yield*/, this.request({
|
|
329
|
-
path: "/projects/{projectId}/permissions
|
|
326
|
+
path: "/projects/{projectId}/permissions".replace("{".concat("projectId", "}"), encodeURIComponent(String(requestParameters.projectId))),
|
|
330
327
|
method: 'PUT',
|
|
331
328
|
headers: headerParameters,
|
|
332
329
|
query: queryParameters,
|
package/dist/apis/SystemApi.d.ts
CHANGED
|
@@ -33,4 +33,12 @@ export declare class SystemApi extends runtime.BaseAPI {
|
|
|
33
33
|
* Get system info
|
|
34
34
|
*/
|
|
35
35
|
info(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SystemInfoResponse>;
|
|
36
|
+
/**
|
|
37
|
+
* Get system info
|
|
38
|
+
*/
|
|
39
|
+
info1Raw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SystemInfoResponse>>;
|
|
40
|
+
/**
|
|
41
|
+
* Get system info
|
|
42
|
+
*/
|
|
43
|
+
info1(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SystemInfoResponse>;
|
|
36
44
|
}
|
package/dist/apis/SystemApi.js
CHANGED
|
@@ -168,6 +168,47 @@ var SystemApi = /** @class */ (function (_super) {
|
|
|
168
168
|
});
|
|
169
169
|
});
|
|
170
170
|
};
|
|
171
|
+
/**
|
|
172
|
+
* Get system info
|
|
173
|
+
*/
|
|
174
|
+
SystemApi.prototype.info1Raw = function (initOverrides) {
|
|
175
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
176
|
+
var queryParameters, headerParameters, response;
|
|
177
|
+
return __generator(this, function (_a) {
|
|
178
|
+
switch (_a.label) {
|
|
179
|
+
case 0:
|
|
180
|
+
queryParameters = {};
|
|
181
|
+
headerParameters = {};
|
|
182
|
+
return [4 /*yield*/, this.request({
|
|
183
|
+
path: "/info/system",
|
|
184
|
+
method: 'GET',
|
|
185
|
+
headers: headerParameters,
|
|
186
|
+
query: queryParameters,
|
|
187
|
+
}, initOverrides)];
|
|
188
|
+
case 1:
|
|
189
|
+
response = _a.sent();
|
|
190
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.SystemInfoResponseFromJSON)(jsonValue); })];
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
});
|
|
194
|
+
};
|
|
195
|
+
/**
|
|
196
|
+
* Get system info
|
|
197
|
+
*/
|
|
198
|
+
SystemApi.prototype.info1 = function (initOverrides) {
|
|
199
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
200
|
+
var response;
|
|
201
|
+
return __generator(this, function (_a) {
|
|
202
|
+
switch (_a.label) {
|
|
203
|
+
case 0: return [4 /*yield*/, this.info1Raw(initOverrides)];
|
|
204
|
+
case 1:
|
|
205
|
+
response = _a.sent();
|
|
206
|
+
return [4 /*yield*/, response.value()];
|
|
207
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
});
|
|
211
|
+
};
|
|
171
212
|
return SystemApi;
|
|
172
213
|
}(runtime.BaseAPI));
|
|
173
214
|
exports.SystemApi = SystemApi;
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { ProjectRole } from './ProjectRole';
|
|
12
13
|
/**
|
|
13
14
|
*
|
|
14
15
|
* @export
|
|
@@ -17,10 +18,22 @@
|
|
|
17
18
|
export interface SetUserProjectRoleRequest {
|
|
18
19
|
/**
|
|
19
20
|
*
|
|
20
|
-
* @type {
|
|
21
|
+
* @type {string}
|
|
21
22
|
* @memberof SetUserProjectRoleRequest
|
|
22
23
|
*/
|
|
23
|
-
|
|
24
|
+
username: string;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {ProjectRole}
|
|
28
|
+
* @memberof SetUserProjectRoleRequest
|
|
29
|
+
*/
|
|
30
|
+
role: ProjectRole;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {boolean}
|
|
34
|
+
* @memberof SetUserProjectRoleRequest
|
|
35
|
+
*/
|
|
36
|
+
supressNotification?: boolean;
|
|
24
37
|
}
|
|
25
38
|
/**
|
|
26
39
|
* Check if a given object implements the SetUserProjectRoleRequest interface.
|
|
@@ -15,11 +15,14 @@
|
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
16
|
exports.SetUserProjectRoleRequestToJSON = exports.SetUserProjectRoleRequestFromJSONTyped = exports.SetUserProjectRoleRequestFromJSON = exports.instanceOfSetUserProjectRoleRequest = void 0;
|
|
17
17
|
var runtime_1 = require("../runtime");
|
|
18
|
+
var ProjectRole_1 = require("./ProjectRole");
|
|
18
19
|
/**
|
|
19
20
|
* Check if a given object implements the SetUserProjectRoleRequest interface.
|
|
20
21
|
*/
|
|
21
22
|
function instanceOfSetUserProjectRoleRequest(value) {
|
|
22
23
|
var isInstance = true;
|
|
24
|
+
isInstance = isInstance && "username" in value;
|
|
25
|
+
isInstance = isInstance && "role" in value;
|
|
23
26
|
return isInstance;
|
|
24
27
|
}
|
|
25
28
|
exports.instanceOfSetUserProjectRoleRequest = instanceOfSetUserProjectRoleRequest;
|
|
@@ -32,7 +35,9 @@ function SetUserProjectRoleRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
32
35
|
return json;
|
|
33
36
|
}
|
|
34
37
|
return {
|
|
35
|
-
'
|
|
38
|
+
'username': json['username'],
|
|
39
|
+
'role': (0, ProjectRole_1.ProjectRoleFromJSON)(json['role']),
|
|
40
|
+
'supressNotification': !(0, runtime_1.exists)(json, 'supressNotification') ? undefined : json['supressNotification'],
|
|
36
41
|
};
|
|
37
42
|
}
|
|
38
43
|
exports.SetUserProjectRoleRequestFromJSONTyped = SetUserProjectRoleRequestFromJSONTyped;
|
|
@@ -44,7 +49,9 @@ function SetUserProjectRoleRequestToJSON(value) {
|
|
|
44
49
|
return null;
|
|
45
50
|
}
|
|
46
51
|
return {
|
|
47
|
-
'
|
|
52
|
+
'username': value.username,
|
|
53
|
+
'role': (0, ProjectRole_1.ProjectRoleToJSON)(value.role),
|
|
54
|
+
'supressNotification': value.supressNotification,
|
|
48
55
|
};
|
|
49
56
|
}
|
|
50
57
|
exports.SetUserProjectRoleRequestToJSON = SetUserProjectRoleRequestToJSON;
|
package/package.json
CHANGED
package/src/apis/ProjectsApi.ts
CHANGED
|
@@ -54,7 +54,6 @@ export interface GetProjectUsersRequest {
|
|
|
54
54
|
|
|
55
55
|
export interface SetUserProjectRoleOperationRequest {
|
|
56
56
|
projectId: string;
|
|
57
|
-
username: string;
|
|
58
57
|
setUserProjectRoleRequest: SetUserProjectRoleRequest;
|
|
59
58
|
}
|
|
60
59
|
|
|
@@ -241,10 +240,6 @@ export class ProjectsApi extends runtime.BaseAPI {
|
|
|
241
240
|
throw new runtime.RequiredError('projectId','Required parameter requestParameters.projectId was null or undefined when calling setUserProjectRole.');
|
|
242
241
|
}
|
|
243
242
|
|
|
244
|
-
if (requestParameters.username === null || requestParameters.username === undefined) {
|
|
245
|
-
throw new runtime.RequiredError('username','Required parameter requestParameters.username was null or undefined when calling setUserProjectRole.');
|
|
246
|
-
}
|
|
247
|
-
|
|
248
243
|
if (requestParameters.setUserProjectRoleRequest === null || requestParameters.setUserProjectRoleRequest === undefined) {
|
|
249
244
|
throw new runtime.RequiredError('setUserProjectRoleRequest','Required parameter requestParameters.setUserProjectRoleRequest was null or undefined when calling setUserProjectRole.');
|
|
250
245
|
}
|
|
@@ -264,7 +259,7 @@ export class ProjectsApi extends runtime.BaseAPI {
|
|
|
264
259
|
}
|
|
265
260
|
}
|
|
266
261
|
const response = await this.request({
|
|
267
|
-
path: `/projects/{projectId}/permissions
|
|
262
|
+
path: `/projects/{projectId}/permissions`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))),
|
|
268
263
|
method: 'PUT',
|
|
269
264
|
headers: headerParameters,
|
|
270
265
|
query: queryParameters,
|
package/src/apis/SystemApi.ts
CHANGED
|
@@ -92,4 +92,30 @@ export class SystemApi extends runtime.BaseAPI {
|
|
|
92
92
|
return await response.value();
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
+
/**
|
|
96
|
+
* Get system info
|
|
97
|
+
*/
|
|
98
|
+
async info1Raw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SystemInfoResponse>> {
|
|
99
|
+
const queryParameters: any = {};
|
|
100
|
+
|
|
101
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
102
|
+
|
|
103
|
+
const response = await this.request({
|
|
104
|
+
path: `/info/system`,
|
|
105
|
+
method: 'GET',
|
|
106
|
+
headers: headerParameters,
|
|
107
|
+
query: queryParameters,
|
|
108
|
+
}, initOverrides);
|
|
109
|
+
|
|
110
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SystemInfoResponseFromJSON(jsonValue));
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Get system info
|
|
115
|
+
*/
|
|
116
|
+
async info1(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SystemInfoResponse> {
|
|
117
|
+
const response = await this.info1Raw(initOverrides);
|
|
118
|
+
return await response.value();
|
|
119
|
+
}
|
|
120
|
+
|
|
95
121
|
}
|
|
@@ -13,6 +13,13 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { exists, mapValues } from '../runtime';
|
|
16
|
+
import type { ProjectRole } from './ProjectRole';
|
|
17
|
+
import {
|
|
18
|
+
ProjectRoleFromJSON,
|
|
19
|
+
ProjectRoleFromJSONTyped,
|
|
20
|
+
ProjectRoleToJSON,
|
|
21
|
+
} from './ProjectRole';
|
|
22
|
+
|
|
16
23
|
/**
|
|
17
24
|
*
|
|
18
25
|
* @export
|
|
@@ -21,10 +28,22 @@ import { exists, mapValues } from '../runtime';
|
|
|
21
28
|
export interface SetUserProjectRoleRequest {
|
|
22
29
|
/**
|
|
23
30
|
*
|
|
24
|
-
* @type {
|
|
31
|
+
* @type {string}
|
|
32
|
+
* @memberof SetUserProjectRoleRequest
|
|
33
|
+
*/
|
|
34
|
+
username: string;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @type {ProjectRole}
|
|
38
|
+
* @memberof SetUserProjectRoleRequest
|
|
39
|
+
*/
|
|
40
|
+
role: ProjectRole;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @type {boolean}
|
|
25
44
|
* @memberof SetUserProjectRoleRequest
|
|
26
45
|
*/
|
|
27
|
-
|
|
46
|
+
supressNotification?: boolean;
|
|
28
47
|
}
|
|
29
48
|
|
|
30
49
|
/**
|
|
@@ -32,6 +51,8 @@ export interface SetUserProjectRoleRequest {
|
|
|
32
51
|
*/
|
|
33
52
|
export function instanceOfSetUserProjectRoleRequest(value: object): boolean {
|
|
34
53
|
let isInstance = true;
|
|
54
|
+
isInstance = isInstance && "username" in value;
|
|
55
|
+
isInstance = isInstance && "role" in value;
|
|
35
56
|
|
|
36
57
|
return isInstance;
|
|
37
58
|
}
|
|
@@ -46,7 +67,9 @@ export function SetUserProjectRoleRequestFromJSONTyped(json: any, ignoreDiscrimi
|
|
|
46
67
|
}
|
|
47
68
|
return {
|
|
48
69
|
|
|
49
|
-
'
|
|
70
|
+
'username': json['username'],
|
|
71
|
+
'role': ProjectRoleFromJSON(json['role']),
|
|
72
|
+
'supressNotification': !exists(json, 'supressNotification') ? undefined : json['supressNotification'],
|
|
50
73
|
};
|
|
51
74
|
}
|
|
52
75
|
|
|
@@ -59,7 +82,9 @@ export function SetUserProjectRoleRequestToJSON(value?: SetUserProjectRoleReques
|
|
|
59
82
|
}
|
|
60
83
|
return {
|
|
61
84
|
|
|
62
|
-
'
|
|
85
|
+
'username': value.username,
|
|
86
|
+
'role': ProjectRoleToJSON(value.role),
|
|
87
|
+
'supressNotification': value.supressNotification,
|
|
63
88
|
};
|
|
64
89
|
}
|
|
65
90
|
|