@teemill/projects 1.3.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 +596 -10
- 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 +7 -1
- package/dist/models/CreateProjectRequest.js +4 -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 +6 -1
- package/dist/runtime.js +6 -3
- package/package.json +1 -1
- package/src/apis/ProjectsApi.ts +648 -21
- package/src/models/ApiError.ts +1 -1
- package/src/models/{Project1.ts → CreateInviteRequest.ts} +14 -14
- package/src/models/CreateProjectRequest.ts +9 -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/{Project2.ts → UpdateUserRequestAvatar.ts} +13 -13
- package/src/models/index.ts +9 -0
- package/src/runtime.ts +13 -3
- package/dist/apis/IntegrationsApi.d.ts +0 -72
- package/dist/apis/IntegrationsApi.js +0 -320
- package/dist/models/Project1.d.ts +0 -31
- package/dist/models/Project1.js +0 -50
- package/dist/models/Project2.d.ts +0 -31
- package/dist/models/Project2.js +0 -50
- package/src/apis/IntegrationsApi.ts +0 -225
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
|
|
@@ -125,8 +289,74 @@ export class ProjectsApi extends runtime.BaseAPI {
|
|
|
125
289
|
* Create a new projects
|
|
126
290
|
* Create project
|
|
127
291
|
*/
|
|
128
|
-
async createProject(
|
|
129
|
-
|
|
292
|
+
async createProject(
|
|
293
|
+
createProjectRequest: CreateProjectRequest,
|
|
294
|
+
initOverrides?: RequestInit | runtime.InitOverrideFunction
|
|
295
|
+
): Promise<Project> {
|
|
296
|
+
const response = await this.createProjectRaw(
|
|
297
|
+
{
|
|
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,
|
|
356
|
+
},
|
|
357
|
+
initOverrides
|
|
358
|
+
);
|
|
359
|
+
|
|
130
360
|
return await response.value();
|
|
131
361
|
}
|
|
132
362
|
|
|
@@ -166,11 +396,72 @@ export class ProjectsApi extends runtime.BaseAPI {
|
|
|
166
396
|
* Delete a project
|
|
167
397
|
* Delete project
|
|
168
398
|
*/
|
|
169
|
-
async deleteProject(
|
|
170
|
-
|
|
399
|
+
async deleteProject(
|
|
400
|
+
project: string,
|
|
401
|
+
initOverrides?: RequestInit | runtime.InitOverrideFunction
|
|
402
|
+
): Promise<Project> {
|
|
403
|
+
const response = await this.deleteProjectRaw(
|
|
404
|
+
{
|
|
405
|
+
project: project,
|
|
406
|
+
},
|
|
407
|
+
initOverrides
|
|
408
|
+
);
|
|
409
|
+
|
|
171
410
|
return await response.value();
|
|
172
411
|
}
|
|
173
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
|
+
|
|
174
465
|
/**
|
|
175
466
|
* Get an integration
|
|
176
467
|
* Get integration
|
|
@@ -211,8 +502,17 @@ export class ProjectsApi extends runtime.BaseAPI {
|
|
|
211
502
|
* Get an integration
|
|
212
503
|
* Get integration
|
|
213
504
|
*/
|
|
214
|
-
async getIntegration(
|
|
215
|
-
|
|
505
|
+
async getIntegration(
|
|
506
|
+
project: string, integration: string,
|
|
507
|
+
initOverrides?: RequestInit | runtime.InitOverrideFunction
|
|
508
|
+
): Promise<Integration> {
|
|
509
|
+
const response = await this.getIntegrationRaw(
|
|
510
|
+
{
|
|
511
|
+
project: project,integration: integration,
|
|
512
|
+
},
|
|
513
|
+
initOverrides
|
|
514
|
+
);
|
|
515
|
+
|
|
216
516
|
return await response.value();
|
|
217
517
|
}
|
|
218
518
|
|
|
@@ -252,8 +552,119 @@ export class ProjectsApi extends runtime.BaseAPI {
|
|
|
252
552
|
* List all integrations installed on a project
|
|
253
553
|
* List integrations
|
|
254
554
|
*/
|
|
255
|
-
async getIntegrations(
|
|
256
|
-
|
|
555
|
+
async getIntegrations(
|
|
556
|
+
project: string,
|
|
557
|
+
initOverrides?: RequestInit | runtime.InitOverrideFunction
|
|
558
|
+
): Promise<IntegrationsResponse> {
|
|
559
|
+
const response = await this.getIntegrationsRaw(
|
|
560
|
+
{
|
|
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,
|
|
664
|
+
},
|
|
665
|
+
initOverrides
|
|
666
|
+
);
|
|
667
|
+
|
|
257
668
|
return await response.value();
|
|
258
669
|
}
|
|
259
670
|
|
|
@@ -293,8 +704,17 @@ export class ProjectsApi extends runtime.BaseAPI {
|
|
|
293
704
|
* Get a project
|
|
294
705
|
* Get project
|
|
295
706
|
*/
|
|
296
|
-
async getProject(
|
|
297
|
-
|
|
707
|
+
async getProject(
|
|
708
|
+
project: string,
|
|
709
|
+
initOverrides?: RequestInit | runtime.InitOverrideFunction
|
|
710
|
+
): Promise<Project> {
|
|
711
|
+
const response = await this.getProjectRaw(
|
|
712
|
+
{
|
|
713
|
+
project: project,
|
|
714
|
+
},
|
|
715
|
+
initOverrides
|
|
716
|
+
);
|
|
717
|
+
|
|
298
718
|
return await response.value();
|
|
299
719
|
}
|
|
300
720
|
|
|
@@ -330,8 +750,119 @@ export class ProjectsApi extends runtime.BaseAPI {
|
|
|
330
750
|
* List all projects available
|
|
331
751
|
* List projects
|
|
332
752
|
*/
|
|
333
|
-
async getProjects(
|
|
334
|
-
|
|
753
|
+
async getProjects(
|
|
754
|
+
|
|
755
|
+
initOverrides?: RequestInit | runtime.InitOverrideFunction
|
|
756
|
+
): Promise<ProjectsResponse> {
|
|
757
|
+
const response = await this.getProjectsRaw(
|
|
758
|
+
|
|
759
|
+
initOverrides
|
|
760
|
+
);
|
|
761
|
+
|
|
762
|
+
return await response.value();
|
|
763
|
+
}
|
|
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
|
+
|
|
335
866
|
return await response.value();
|
|
336
867
|
}
|
|
337
868
|
|
|
@@ -375,8 +906,17 @@ export class ProjectsApi extends runtime.BaseAPI {
|
|
|
375
906
|
* Install an integration on the project
|
|
376
907
|
* Install integration
|
|
377
908
|
*/
|
|
378
|
-
async installIntegration(
|
|
379
|
-
|
|
909
|
+
async installIntegration(
|
|
910
|
+
project: string, integration: string,
|
|
911
|
+
initOverrides?: RequestInit | runtime.InitOverrideFunction
|
|
912
|
+
): Promise<Integration> {
|
|
913
|
+
const response = await this.installIntegrationRaw(
|
|
914
|
+
{
|
|
915
|
+
project: project,integration: integration,
|
|
916
|
+
},
|
|
917
|
+
initOverrides
|
|
918
|
+
);
|
|
919
|
+
|
|
380
920
|
return await response.value();
|
|
381
921
|
}
|
|
382
922
|
|
|
@@ -420,8 +960,17 @@ export class ProjectsApi extends runtime.BaseAPI {
|
|
|
420
960
|
* Install an integration template on the project
|
|
421
961
|
* Install integration template
|
|
422
962
|
*/
|
|
423
|
-
async installTemplate(
|
|
424
|
-
|
|
963
|
+
async installTemplate(
|
|
964
|
+
project: string, template: string,
|
|
965
|
+
initOverrides?: RequestInit | runtime.InitOverrideFunction
|
|
966
|
+
): Promise<IntegrationsResponse> {
|
|
967
|
+
const response = await this.installTemplateRaw(
|
|
968
|
+
{
|
|
969
|
+
project: project,template: template,
|
|
970
|
+
},
|
|
971
|
+
initOverrides
|
|
972
|
+
);
|
|
973
|
+
|
|
425
974
|
return await response.value();
|
|
426
975
|
}
|
|
427
976
|
|
|
@@ -465,8 +1014,16 @@ export class ProjectsApi extends runtime.BaseAPI {
|
|
|
465
1014
|
* Uninstall a projects integration
|
|
466
1015
|
* Uninstall integration
|
|
467
1016
|
*/
|
|
468
|
-
async uninstallIntegration(
|
|
469
|
-
|
|
1017
|
+
async uninstallIntegration(
|
|
1018
|
+
project: string, integration: string,
|
|
1019
|
+
initOverrides?: RequestInit | runtime.InitOverrideFunction
|
|
1020
|
+
): Promise<void> {
|
|
1021
|
+
await this.uninstallIntegrationRaw(
|
|
1022
|
+
{
|
|
1023
|
+
project: project,integration: integration,
|
|
1024
|
+
},
|
|
1025
|
+
initOverrides
|
|
1026
|
+
);
|
|
470
1027
|
}
|
|
471
1028
|
|
|
472
1029
|
/**
|
|
@@ -512,8 +1069,78 @@ export class ProjectsApi extends runtime.BaseAPI {
|
|
|
512
1069
|
* Update a project
|
|
513
1070
|
* Update project
|
|
514
1071
|
*/
|
|
515
|
-
async updateProject(
|
|
516
|
-
|
|
1072
|
+
async updateProject(
|
|
1073
|
+
project: string, updateProjectRequest: UpdateProjectRequest,
|
|
1074
|
+
initOverrides?: RequestInit | runtime.InitOverrideFunction
|
|
1075
|
+
): Promise<Project> {
|
|
1076
|
+
const response = await this.updateProjectRaw(
|
|
1077
|
+
{
|
|
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,
|
|
1140
|
+
},
|
|
1141
|
+
initOverrides
|
|
1142
|
+
);
|
|
1143
|
+
|
|
517
1144
|
return await response.value();
|
|
518
1145
|
}
|
|
519
1146
|
|