@teemill/projects 1.4.0 → 1.5.0
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/.openapi-generator/FILES +9 -0
- package/.openapi-generator/VERSION +1 -1
- package/README.md +2 -2
- package/dist/apis/ProjectsApi.d.ts +126 -2
- package/dist/apis/ProjectsApi.js +580 -14
- package/dist/models/ApiError.d.ts +1 -1
- package/dist/models/ApiError.js +1 -1
- package/dist/models/CreateInviteRequest.d.ts +31 -0
- package/dist/models/CreateInviteRequest.js +50 -0
- package/dist/models/CreateProjectRequest.d.ts +1 -1
- package/dist/models/CreateProjectRequest.js +1 -1
- package/dist/models/CreateUserRequest.d.ts +56 -0
- package/dist/models/CreateUserRequest.js +62 -0
- package/dist/models/CreateUserRequestAvatar.d.ts +31 -0
- package/dist/models/CreateUserRequestAvatar.js +50 -0
- package/dist/models/Integration.d.ts +1 -1
- package/dist/models/Integration.js +1 -1
- package/dist/models/IntegrationInfo.d.ts +1 -1
- package/dist/models/IntegrationInfo.js +1 -1
- package/dist/models/IntegrationsResponse.d.ts +1 -1
- package/dist/models/IntegrationsResponse.js +1 -1
- package/dist/models/Project.d.ts +1 -1
- package/dist/models/Project.js +1 -1
- package/dist/models/ProjectInvite.d.ts +69 -0
- package/dist/models/ProjectInvite.js +70 -0
- package/dist/models/ProjectInvites.d.ts +32 -0
- package/dist/models/ProjectInvites.js +51 -0
- package/dist/models/ProjectLogo.d.ts +1 -1
- package/dist/models/ProjectLogo.js +1 -1
- package/dist/models/ProjectUser.d.ts +62 -0
- package/dist/models/ProjectUser.js +65 -0
- package/dist/models/ProjectUsers.d.ts +32 -0
- package/dist/models/ProjectUsers.js +51 -0
- package/dist/models/ProjectsResponse.d.ts +1 -1
- package/dist/models/ProjectsResponse.js +1 -1
- package/dist/models/UpdateProjectRequest.d.ts +1 -1
- package/dist/models/UpdateProjectRequest.js +1 -1
- package/dist/models/UpdateUserRequest.d.ts +56 -0
- package/dist/models/UpdateUserRequest.js +59 -0
- package/dist/models/UpdateUserRequestAvatar.d.ts +31 -0
- package/dist/models/UpdateUserRequestAvatar.js +50 -0
- package/dist/models/index.d.ts +9 -0
- package/dist/models/index.js +9 -0
- package/dist/runtime.d.ts +1 -1
- package/dist/runtime.js +1 -1
- package/package.json +1 -1
- package/src/apis/ProjectsApi.ts +555 -14
- package/src/models/ApiError.ts +1 -1
- package/src/models/CreateInviteRequest.ts +66 -0
- package/src/models/CreateProjectRequest.ts +1 -1
- package/src/models/CreateUserRequest.ts +107 -0
- package/src/models/CreateUserRequestAvatar.ts +65 -0
- package/src/models/Integration.ts +1 -1
- package/src/models/IntegrationInfo.ts +1 -1
- package/src/models/IntegrationsResponse.ts +1 -1
- package/src/models/Project.ts +1 -1
- package/src/models/ProjectInvite.ts +133 -0
- package/src/models/ProjectInvites.ts +73 -0
- package/src/models/ProjectLogo.ts +1 -1
- package/src/models/ProjectUser.ts +116 -0
- package/src/models/ProjectUsers.ts +73 -0
- package/src/models/ProjectsResponse.ts +1 -1
- package/src/models/UpdateProjectRequest.ts +1 -1
- package/src/models/UpdateUserRequest.ts +104 -0
- package/src/models/UpdateUserRequestAvatar.ts +65 -0
- package/src/models/index.ts +9 -0
- package/src/runtime.ts +1 -1
package/src/apis/ProjectsApi.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Projects API
|
|
5
5
|
* Manage Teemill Projects For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 1.
|
|
7
|
+
* The version of the OpenAPI document: 1.5.0
|
|
8
8
|
* Contact: hello@teemill.com
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -16,38 +16,75 @@
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
18
|
ApiError,
|
|
19
|
+
CreateInviteRequest,
|
|
19
20
|
CreateProjectRequest,
|
|
21
|
+
CreateUserRequest,
|
|
20
22
|
Integration,
|
|
21
23
|
IntegrationsResponse,
|
|
22
24
|
Project,
|
|
25
|
+
ProjectInvites,
|
|
26
|
+
ProjectUser,
|
|
27
|
+
ProjectUsers,
|
|
23
28
|
ProjectsResponse,
|
|
24
29
|
UpdateProjectRequest,
|
|
30
|
+
UpdateUserRequest,
|
|
25
31
|
} from '../models/index';
|
|
26
32
|
import {
|
|
27
33
|
ApiErrorFromJSON,
|
|
28
34
|
ApiErrorToJSON,
|
|
35
|
+
CreateInviteRequestFromJSON,
|
|
36
|
+
CreateInviteRequestToJSON,
|
|
29
37
|
CreateProjectRequestFromJSON,
|
|
30
38
|
CreateProjectRequestToJSON,
|
|
39
|
+
CreateUserRequestFromJSON,
|
|
40
|
+
CreateUserRequestToJSON,
|
|
31
41
|
IntegrationFromJSON,
|
|
32
42
|
IntegrationToJSON,
|
|
33
43
|
IntegrationsResponseFromJSON,
|
|
34
44
|
IntegrationsResponseToJSON,
|
|
35
45
|
ProjectFromJSON,
|
|
36
46
|
ProjectToJSON,
|
|
47
|
+
ProjectInvitesFromJSON,
|
|
48
|
+
ProjectInvitesToJSON,
|
|
49
|
+
ProjectUserFromJSON,
|
|
50
|
+
ProjectUserToJSON,
|
|
51
|
+
ProjectUsersFromJSON,
|
|
52
|
+
ProjectUsersToJSON,
|
|
37
53
|
ProjectsResponseFromJSON,
|
|
38
54
|
ProjectsResponseToJSON,
|
|
39
55
|
UpdateProjectRequestFromJSON,
|
|
40
56
|
UpdateProjectRequestToJSON,
|
|
57
|
+
UpdateUserRequestFromJSON,
|
|
58
|
+
UpdateUserRequestToJSON,
|
|
41
59
|
} from '../models/index';
|
|
42
60
|
|
|
61
|
+
export interface AcceptInviteRequest {
|
|
62
|
+
project: string;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface CreateInviteOperationRequest {
|
|
66
|
+
project: string;
|
|
67
|
+
createInviteRequest: CreateInviteRequest;
|
|
68
|
+
}
|
|
69
|
+
|
|
43
70
|
export interface CreateProjectOperationRequest {
|
|
44
71
|
createProjectRequest: CreateProjectRequest;
|
|
45
72
|
}
|
|
46
73
|
|
|
74
|
+
export interface CreateUserOperationRequest {
|
|
75
|
+
project: string;
|
|
76
|
+
createUserRequest: CreateUserRequest;
|
|
77
|
+
}
|
|
78
|
+
|
|
47
79
|
export interface DeleteProjectRequest {
|
|
48
80
|
project: string;
|
|
49
81
|
}
|
|
50
82
|
|
|
83
|
+
export interface DeleteUserRequest {
|
|
84
|
+
project: string;
|
|
85
|
+
user: string;
|
|
86
|
+
}
|
|
87
|
+
|
|
51
88
|
export interface GetIntegrationRequest {
|
|
52
89
|
project: string;
|
|
53
90
|
integration: string;
|
|
@@ -57,10 +94,28 @@ export interface GetIntegrationsRequest {
|
|
|
57
94
|
project: string;
|
|
58
95
|
}
|
|
59
96
|
|
|
97
|
+
export interface GetInviteTokenRequest {
|
|
98
|
+
project: string;
|
|
99
|
+
token: string;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export interface GetInvitesRequest {
|
|
103
|
+
project: string;
|
|
104
|
+
}
|
|
105
|
+
|
|
60
106
|
export interface GetProjectRequest {
|
|
61
107
|
project: string;
|
|
62
108
|
}
|
|
63
109
|
|
|
110
|
+
export interface GetUserRequest {
|
|
111
|
+
project: string;
|
|
112
|
+
user: string;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export interface GetUsersRequest {
|
|
116
|
+
project: string;
|
|
117
|
+
}
|
|
118
|
+
|
|
64
119
|
export interface InstallIntegrationRequest {
|
|
65
120
|
project: string;
|
|
66
121
|
integration: string;
|
|
@@ -81,11 +136,120 @@ export interface UpdateProjectOperationRequest {
|
|
|
81
136
|
updateProjectRequest: UpdateProjectRequest;
|
|
82
137
|
}
|
|
83
138
|
|
|
139
|
+
export interface UpdateUserOperationRequest {
|
|
140
|
+
project: string;
|
|
141
|
+
user: string;
|
|
142
|
+
updateUserRequest: UpdateUserRequest;
|
|
143
|
+
}
|
|
144
|
+
|
|
84
145
|
/**
|
|
85
146
|
*
|
|
86
147
|
*/
|
|
87
148
|
export class ProjectsApi extends runtime.BaseAPI {
|
|
88
149
|
|
|
150
|
+
/**
|
|
151
|
+
* accepts an invite to the project
|
|
152
|
+
* accepts an invite
|
|
153
|
+
*/
|
|
154
|
+
async acceptInviteRaw(requestParameters: AcceptInviteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
155
|
+
if (requestParameters.project === null || requestParameters.project === undefined) {
|
|
156
|
+
throw new runtime.RequiredError('project','Required parameter requestParameters.project was null or undefined when calling acceptInvite.');
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
const queryParameters: any = {};
|
|
160
|
+
|
|
161
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
162
|
+
|
|
163
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
164
|
+
// oauth required
|
|
165
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("session-oauth", []);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
169
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
const response = await this.request({
|
|
173
|
+
path: `/v1/projects/{project}/invites/accept`.replace(`{${"project"}}`, encodeURIComponent(String(requestParameters.project))),
|
|
174
|
+
method: 'POST',
|
|
175
|
+
headers: headerParameters,
|
|
176
|
+
query: queryParameters,
|
|
177
|
+
}, initOverrides);
|
|
178
|
+
|
|
179
|
+
return new runtime.VoidApiResponse(response);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* accepts an invite to the project
|
|
184
|
+
* accepts an invite
|
|
185
|
+
*/
|
|
186
|
+
async acceptInvite(
|
|
187
|
+
project: string,
|
|
188
|
+
initOverrides?: RequestInit | runtime.InitOverrideFunction
|
|
189
|
+
): Promise<void> {
|
|
190
|
+
await this.acceptInviteRaw(
|
|
191
|
+
{
|
|
192
|
+
project: project,
|
|
193
|
+
},
|
|
194
|
+
initOverrides
|
|
195
|
+
);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* creates an invite for the project
|
|
200
|
+
* creates an invite
|
|
201
|
+
*/
|
|
202
|
+
async createInviteRaw(requestParameters: CreateInviteOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
203
|
+
if (requestParameters.project === null || requestParameters.project === undefined) {
|
|
204
|
+
throw new runtime.RequiredError('project','Required parameter requestParameters.project was null or undefined when calling createInvite.');
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
if (requestParameters.createInviteRequest === null || requestParameters.createInviteRequest === undefined) {
|
|
208
|
+
throw new runtime.RequiredError('createInviteRequest','Required parameter requestParameters.createInviteRequest was null or undefined when calling createInvite.');
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
const queryParameters: any = {};
|
|
212
|
+
|
|
213
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
214
|
+
|
|
215
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
216
|
+
|
|
217
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
218
|
+
// oauth required
|
|
219
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("session-oauth", []);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
223
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
const response = await this.request({
|
|
227
|
+
path: `/v1/projects/{project}/invites`.replace(`{${"project"}}`, encodeURIComponent(String(requestParameters.project))),
|
|
228
|
+
method: 'POST',
|
|
229
|
+
headers: headerParameters,
|
|
230
|
+
query: queryParameters,
|
|
231
|
+
body: CreateInviteRequestToJSON(requestParameters.createInviteRequest),
|
|
232
|
+
}, initOverrides);
|
|
233
|
+
|
|
234
|
+
return new runtime.VoidApiResponse(response);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* creates an invite for the project
|
|
239
|
+
* creates an invite
|
|
240
|
+
*/
|
|
241
|
+
async createInvite(
|
|
242
|
+
project: string, createInviteRequest: CreateInviteRequest,
|
|
243
|
+
initOverrides?: RequestInit | runtime.InitOverrideFunction
|
|
244
|
+
): Promise<void> {
|
|
245
|
+
await this.createInviteRaw(
|
|
246
|
+
{
|
|
247
|
+
project: project,createInviteRequest: createInviteRequest,
|
|
248
|
+
},
|
|
249
|
+
initOverrides
|
|
250
|
+
);
|
|
251
|
+
}
|
|
252
|
+
|
|
89
253
|
/**
|
|
90
254
|
* Create a new projects
|
|
91
255
|
* Create project
|
|
@@ -131,7 +295,64 @@ export class ProjectsApi extends runtime.BaseAPI {
|
|
|
131
295
|
): Promise<Project> {
|
|
132
296
|
const response = await this.createProjectRaw(
|
|
133
297
|
{
|
|
134
|
-
createProjectRequest: createProjectRequest
|
|
298
|
+
createProjectRequest: createProjectRequest,
|
|
299
|
+
},
|
|
300
|
+
initOverrides
|
|
301
|
+
);
|
|
302
|
+
|
|
303
|
+
return await response.value();
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Create a new project user
|
|
308
|
+
* Create project user
|
|
309
|
+
*/
|
|
310
|
+
async createUserRaw(requestParameters: CreateUserOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ProjectUser>> {
|
|
311
|
+
if (requestParameters.project === null || requestParameters.project === undefined) {
|
|
312
|
+
throw new runtime.RequiredError('project','Required parameter requestParameters.project was null or undefined when calling createUser.');
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
if (requestParameters.createUserRequest === null || requestParameters.createUserRequest === undefined) {
|
|
316
|
+
throw new runtime.RequiredError('createUserRequest','Required parameter requestParameters.createUserRequest was null or undefined when calling createUser.');
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
const queryParameters: any = {};
|
|
320
|
+
|
|
321
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
322
|
+
|
|
323
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
324
|
+
|
|
325
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
326
|
+
// oauth required
|
|
327
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("session-oauth", []);
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
331
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
const response = await this.request({
|
|
335
|
+
path: `/v1/projects/{project}/users`.replace(`{${"project"}}`, encodeURIComponent(String(requestParameters.project))),
|
|
336
|
+
method: 'POST',
|
|
337
|
+
headers: headerParameters,
|
|
338
|
+
query: queryParameters,
|
|
339
|
+
body: CreateUserRequestToJSON(requestParameters.createUserRequest),
|
|
340
|
+
}, initOverrides);
|
|
341
|
+
|
|
342
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ProjectUserFromJSON(jsonValue));
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* Create a new project user
|
|
347
|
+
* Create project user
|
|
348
|
+
*/
|
|
349
|
+
async createUser(
|
|
350
|
+
project: string, createUserRequest: CreateUserRequest,
|
|
351
|
+
initOverrides?: RequestInit | runtime.InitOverrideFunction
|
|
352
|
+
): Promise<ProjectUser> {
|
|
353
|
+
const response = await this.createUserRaw(
|
|
354
|
+
{
|
|
355
|
+
project: project,createUserRequest: createUserRequest,
|
|
135
356
|
},
|
|
136
357
|
initOverrides
|
|
137
358
|
);
|
|
@@ -181,7 +402,7 @@ export class ProjectsApi extends runtime.BaseAPI {
|
|
|
181
402
|
): Promise<Project> {
|
|
182
403
|
const response = await this.deleteProjectRaw(
|
|
183
404
|
{
|
|
184
|
-
project: project
|
|
405
|
+
project: project,
|
|
185
406
|
},
|
|
186
407
|
initOverrides
|
|
187
408
|
);
|
|
@@ -189,6 +410,58 @@ export class ProjectsApi extends runtime.BaseAPI {
|
|
|
189
410
|
return await response.value();
|
|
190
411
|
}
|
|
191
412
|
|
|
413
|
+
/**
|
|
414
|
+
* Delete a project user by ID
|
|
415
|
+
* Delete a user by ID
|
|
416
|
+
*/
|
|
417
|
+
async deleteUserRaw(requestParameters: DeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
418
|
+
if (requestParameters.project === null || requestParameters.project === undefined) {
|
|
419
|
+
throw new runtime.RequiredError('project','Required parameter requestParameters.project was null or undefined when calling deleteUser.');
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
if (requestParameters.user === null || requestParameters.user === undefined) {
|
|
423
|
+
throw new runtime.RequiredError('user','Required parameter requestParameters.user was null or undefined when calling deleteUser.');
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
const queryParameters: any = {};
|
|
427
|
+
|
|
428
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
429
|
+
|
|
430
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
431
|
+
// oauth required
|
|
432
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("session-oauth", []);
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
436
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
const response = await this.request({
|
|
440
|
+
path: `/v1/projects/{project}/users/{user}`.replace(`{${"project"}}`, encodeURIComponent(String(requestParameters.project))).replace(`{${"user"}}`, encodeURIComponent(String(requestParameters.user))),
|
|
441
|
+
method: 'DELETE',
|
|
442
|
+
headers: headerParameters,
|
|
443
|
+
query: queryParameters,
|
|
444
|
+
}, initOverrides);
|
|
445
|
+
|
|
446
|
+
return new runtime.VoidApiResponse(response);
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
/**
|
|
450
|
+
* Delete a project user by ID
|
|
451
|
+
* Delete a user by ID
|
|
452
|
+
*/
|
|
453
|
+
async deleteUser(
|
|
454
|
+
project: string, user: string,
|
|
455
|
+
initOverrides?: RequestInit | runtime.InitOverrideFunction
|
|
456
|
+
): Promise<void> {
|
|
457
|
+
await this.deleteUserRaw(
|
|
458
|
+
{
|
|
459
|
+
project: project,user: user,
|
|
460
|
+
},
|
|
461
|
+
initOverrides
|
|
462
|
+
);
|
|
463
|
+
}
|
|
464
|
+
|
|
192
465
|
/**
|
|
193
466
|
* Get an integration
|
|
194
467
|
* Get integration
|
|
@@ -235,8 +508,7 @@ export class ProjectsApi extends runtime.BaseAPI {
|
|
|
235
508
|
): Promise<Integration> {
|
|
236
509
|
const response = await this.getIntegrationRaw(
|
|
237
510
|
{
|
|
238
|
-
project: project,
|
|
239
|
-
integration: integration
|
|
511
|
+
project: project,integration: integration,
|
|
240
512
|
},
|
|
241
513
|
initOverrides
|
|
242
514
|
);
|
|
@@ -286,7 +558,109 @@ export class ProjectsApi extends runtime.BaseAPI {
|
|
|
286
558
|
): Promise<IntegrationsResponse> {
|
|
287
559
|
const response = await this.getIntegrationsRaw(
|
|
288
560
|
{
|
|
289
|
-
project: project
|
|
561
|
+
project: project,
|
|
562
|
+
},
|
|
563
|
+
initOverrides
|
|
564
|
+
);
|
|
565
|
+
|
|
566
|
+
return await response.value();
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
/**
|
|
570
|
+
* gets the invite token and sets it in the session. This is used to ensure the user accepting the invitation is the invited user.
|
|
571
|
+
* gets the invite token
|
|
572
|
+
*/
|
|
573
|
+
async getInviteTokenRaw(requestParameters: GetInviteTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
574
|
+
if (requestParameters.project === null || requestParameters.project === undefined) {
|
|
575
|
+
throw new runtime.RequiredError('project','Required parameter requestParameters.project was null or undefined when calling getInviteToken.');
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
if (requestParameters.token === null || requestParameters.token === undefined) {
|
|
579
|
+
throw new runtime.RequiredError('token','Required parameter requestParameters.token was null or undefined when calling getInviteToken.');
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
const queryParameters: any = {};
|
|
583
|
+
|
|
584
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
585
|
+
|
|
586
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
587
|
+
// oauth required
|
|
588
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("session-oauth", []);
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
592
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
const response = await this.request({
|
|
596
|
+
path: `/v1/projects/{project}/invites/{token}`.replace(`{${"project"}}`, encodeURIComponent(String(requestParameters.project))).replace(`{${"token"}}`, encodeURIComponent(String(requestParameters.token))),
|
|
597
|
+
method: 'GET',
|
|
598
|
+
headers: headerParameters,
|
|
599
|
+
query: queryParameters,
|
|
600
|
+
}, initOverrides);
|
|
601
|
+
|
|
602
|
+
return new runtime.VoidApiResponse(response);
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
/**
|
|
606
|
+
* gets the invite token and sets it in the session. This is used to ensure the user accepting the invitation is the invited user.
|
|
607
|
+
* gets the invite token
|
|
608
|
+
*/
|
|
609
|
+
async getInviteToken(
|
|
610
|
+
project: string, token: string,
|
|
611
|
+
initOverrides?: RequestInit | runtime.InitOverrideFunction
|
|
612
|
+
): Promise<void> {
|
|
613
|
+
await this.getInviteTokenRaw(
|
|
614
|
+
{
|
|
615
|
+
project: project,token: token,
|
|
616
|
+
},
|
|
617
|
+
initOverrides
|
|
618
|
+
);
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
/**
|
|
622
|
+
* List the invites associated with a project
|
|
623
|
+
* List Invites
|
|
624
|
+
*/
|
|
625
|
+
async getInvitesRaw(requestParameters: GetInvitesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ProjectInvites>> {
|
|
626
|
+
if (requestParameters.project === null || requestParameters.project === undefined) {
|
|
627
|
+
throw new runtime.RequiredError('project','Required parameter requestParameters.project was null or undefined when calling getInvites.');
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
const queryParameters: any = {};
|
|
631
|
+
|
|
632
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
633
|
+
|
|
634
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
635
|
+
// oauth required
|
|
636
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("session-oauth", []);
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
640
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
const response = await this.request({
|
|
644
|
+
path: `/v1/projects/{project}/invites`.replace(`{${"project"}}`, encodeURIComponent(String(requestParameters.project))),
|
|
645
|
+
method: 'GET',
|
|
646
|
+
headers: headerParameters,
|
|
647
|
+
query: queryParameters,
|
|
648
|
+
}, initOverrides);
|
|
649
|
+
|
|
650
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ProjectInvitesFromJSON(jsonValue));
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
/**
|
|
654
|
+
* List the invites associated with a project
|
|
655
|
+
* List Invites
|
|
656
|
+
*/
|
|
657
|
+
async getInvites(
|
|
658
|
+
project: string,
|
|
659
|
+
initOverrides?: RequestInit | runtime.InitOverrideFunction
|
|
660
|
+
): Promise<ProjectInvites> {
|
|
661
|
+
const response = await this.getInvitesRaw(
|
|
662
|
+
{
|
|
663
|
+
project: project,
|
|
290
664
|
},
|
|
291
665
|
initOverrides
|
|
292
666
|
);
|
|
@@ -336,7 +710,7 @@ export class ProjectsApi extends runtime.BaseAPI {
|
|
|
336
710
|
): Promise<Project> {
|
|
337
711
|
const response = await this.getProjectRaw(
|
|
338
712
|
{
|
|
339
|
-
project: project
|
|
713
|
+
project: project,
|
|
340
714
|
},
|
|
341
715
|
initOverrides
|
|
342
716
|
);
|
|
@@ -388,6 +762,110 @@ export class ProjectsApi extends runtime.BaseAPI {
|
|
|
388
762
|
return await response.value();
|
|
389
763
|
}
|
|
390
764
|
|
|
765
|
+
/**
|
|
766
|
+
* Retrieve a project user by ID
|
|
767
|
+
* Retrieve a user by ID
|
|
768
|
+
*/
|
|
769
|
+
async getUserRaw(requestParameters: GetUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ProjectUser>> {
|
|
770
|
+
if (requestParameters.project === null || requestParameters.project === undefined) {
|
|
771
|
+
throw new runtime.RequiredError('project','Required parameter requestParameters.project was null or undefined when calling getUser.');
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
if (requestParameters.user === null || requestParameters.user === undefined) {
|
|
775
|
+
throw new runtime.RequiredError('user','Required parameter requestParameters.user was null or undefined when calling getUser.');
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
const queryParameters: any = {};
|
|
779
|
+
|
|
780
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
781
|
+
|
|
782
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
783
|
+
// oauth required
|
|
784
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("session-oauth", []);
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
788
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
const response = await this.request({
|
|
792
|
+
path: `/v1/projects/{project}/users/{user}`.replace(`{${"project"}}`, encodeURIComponent(String(requestParameters.project))).replace(`{${"user"}}`, encodeURIComponent(String(requestParameters.user))),
|
|
793
|
+
method: 'GET',
|
|
794
|
+
headers: headerParameters,
|
|
795
|
+
query: queryParameters,
|
|
796
|
+
}, initOverrides);
|
|
797
|
+
|
|
798
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ProjectUserFromJSON(jsonValue));
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
/**
|
|
802
|
+
* Retrieve a project user by ID
|
|
803
|
+
* Retrieve a user by ID
|
|
804
|
+
*/
|
|
805
|
+
async getUser(
|
|
806
|
+
project: string, user: string,
|
|
807
|
+
initOverrides?: RequestInit | runtime.InitOverrideFunction
|
|
808
|
+
): Promise<ProjectUser> {
|
|
809
|
+
const response = await this.getUserRaw(
|
|
810
|
+
{
|
|
811
|
+
project: project,user: user,
|
|
812
|
+
},
|
|
813
|
+
initOverrides
|
|
814
|
+
);
|
|
815
|
+
|
|
816
|
+
return await response.value();
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
/**
|
|
820
|
+
* List the users associated with a project
|
|
821
|
+
* List project users
|
|
822
|
+
*/
|
|
823
|
+
async getUsersRaw(requestParameters: GetUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ProjectUsers>> {
|
|
824
|
+
if (requestParameters.project === null || requestParameters.project === undefined) {
|
|
825
|
+
throw new runtime.RequiredError('project','Required parameter requestParameters.project was null or undefined when calling getUsers.');
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
const queryParameters: any = {};
|
|
829
|
+
|
|
830
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
831
|
+
|
|
832
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
833
|
+
// oauth required
|
|
834
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("session-oauth", []);
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
838
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
const response = await this.request({
|
|
842
|
+
path: `/v1/projects/{project}/users`.replace(`{${"project"}}`, encodeURIComponent(String(requestParameters.project))),
|
|
843
|
+
method: 'GET',
|
|
844
|
+
headers: headerParameters,
|
|
845
|
+
query: queryParameters,
|
|
846
|
+
}, initOverrides);
|
|
847
|
+
|
|
848
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ProjectUsersFromJSON(jsonValue));
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
/**
|
|
852
|
+
* List the users associated with a project
|
|
853
|
+
* List project users
|
|
854
|
+
*/
|
|
855
|
+
async getUsers(
|
|
856
|
+
project: string,
|
|
857
|
+
initOverrides?: RequestInit | runtime.InitOverrideFunction
|
|
858
|
+
): Promise<ProjectUsers> {
|
|
859
|
+
const response = await this.getUsersRaw(
|
|
860
|
+
{
|
|
861
|
+
project: project,
|
|
862
|
+
},
|
|
863
|
+
initOverrides
|
|
864
|
+
);
|
|
865
|
+
|
|
866
|
+
return await response.value();
|
|
867
|
+
}
|
|
868
|
+
|
|
391
869
|
/**
|
|
392
870
|
* Install an integration on the project
|
|
393
871
|
* Install integration
|
|
@@ -434,8 +912,7 @@ export class ProjectsApi extends runtime.BaseAPI {
|
|
|
434
912
|
): Promise<Integration> {
|
|
435
913
|
const response = await this.installIntegrationRaw(
|
|
436
914
|
{
|
|
437
|
-
project: project,
|
|
438
|
-
integration: integration
|
|
915
|
+
project: project,integration: integration,
|
|
439
916
|
},
|
|
440
917
|
initOverrides
|
|
441
918
|
);
|
|
@@ -489,8 +966,7 @@ export class ProjectsApi extends runtime.BaseAPI {
|
|
|
489
966
|
): Promise<IntegrationsResponse> {
|
|
490
967
|
const response = await this.installTemplateRaw(
|
|
491
968
|
{
|
|
492
|
-
project: project,
|
|
493
|
-
template: template
|
|
969
|
+
project: project,template: template,
|
|
494
970
|
},
|
|
495
971
|
initOverrides
|
|
496
972
|
);
|
|
@@ -542,7 +1018,12 @@ export class ProjectsApi extends runtime.BaseAPI {
|
|
|
542
1018
|
project: string, integration: string,
|
|
543
1019
|
initOverrides?: RequestInit | runtime.InitOverrideFunction
|
|
544
1020
|
): Promise<void> {
|
|
545
|
-
await this.uninstallIntegrationRaw(
|
|
1021
|
+
await this.uninstallIntegrationRaw(
|
|
1022
|
+
{
|
|
1023
|
+
project: project,integration: integration,
|
|
1024
|
+
},
|
|
1025
|
+
initOverrides
|
|
1026
|
+
);
|
|
546
1027
|
}
|
|
547
1028
|
|
|
548
1029
|
/**
|
|
@@ -594,8 +1075,68 @@ export class ProjectsApi extends runtime.BaseAPI {
|
|
|
594
1075
|
): Promise<Project> {
|
|
595
1076
|
const response = await this.updateProjectRaw(
|
|
596
1077
|
{
|
|
597
|
-
project: project,
|
|
598
|
-
|
|
1078
|
+
project: project,updateProjectRequest: updateProjectRequest,
|
|
1079
|
+
},
|
|
1080
|
+
initOverrides
|
|
1081
|
+
);
|
|
1082
|
+
|
|
1083
|
+
return await response.value();
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
/**
|
|
1087
|
+
* Update a project user by ID
|
|
1088
|
+
* Update a user by ID
|
|
1089
|
+
*/
|
|
1090
|
+
async updateUserRaw(requestParameters: UpdateUserOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ProjectUser>> {
|
|
1091
|
+
if (requestParameters.project === null || requestParameters.project === undefined) {
|
|
1092
|
+
throw new runtime.RequiredError('project','Required parameter requestParameters.project was null or undefined when calling updateUser.');
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
if (requestParameters.user === null || requestParameters.user === undefined) {
|
|
1096
|
+
throw new runtime.RequiredError('user','Required parameter requestParameters.user was null or undefined when calling updateUser.');
|
|
1097
|
+
}
|
|
1098
|
+
|
|
1099
|
+
if (requestParameters.updateUserRequest === null || requestParameters.updateUserRequest === undefined) {
|
|
1100
|
+
throw new runtime.RequiredError('updateUserRequest','Required parameter requestParameters.updateUserRequest was null or undefined when calling updateUser.');
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1103
|
+
const queryParameters: any = {};
|
|
1104
|
+
|
|
1105
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1106
|
+
|
|
1107
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1108
|
+
|
|
1109
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
1110
|
+
// oauth required
|
|
1111
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("session-oauth", []);
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1114
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1115
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
|
|
1116
|
+
}
|
|
1117
|
+
|
|
1118
|
+
const response = await this.request({
|
|
1119
|
+
path: `/v1/projects/{project}/users/{user}`.replace(`{${"project"}}`, encodeURIComponent(String(requestParameters.project))).replace(`{${"user"}}`, encodeURIComponent(String(requestParameters.user))),
|
|
1120
|
+
method: 'PATCH',
|
|
1121
|
+
headers: headerParameters,
|
|
1122
|
+
query: queryParameters,
|
|
1123
|
+
body: UpdateUserRequestToJSON(requestParameters.updateUserRequest),
|
|
1124
|
+
}, initOverrides);
|
|
1125
|
+
|
|
1126
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ProjectUserFromJSON(jsonValue));
|
|
1127
|
+
}
|
|
1128
|
+
|
|
1129
|
+
/**
|
|
1130
|
+
* Update a project user by ID
|
|
1131
|
+
* Update a user by ID
|
|
1132
|
+
*/
|
|
1133
|
+
async updateUser(
|
|
1134
|
+
project: string, user: string, updateUserRequest: UpdateUserRequest,
|
|
1135
|
+
initOverrides?: RequestInit | runtime.InitOverrideFunction
|
|
1136
|
+
): Promise<ProjectUser> {
|
|
1137
|
+
const response = await this.updateUserRaw(
|
|
1138
|
+
{
|
|
1139
|
+
project: project,user: user,updateUserRequest: updateUserRequest,
|
|
599
1140
|
},
|
|
600
1141
|
initOverrides
|
|
601
1142
|
);
|