@wastesentry/trak-client 0.1.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 +120 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +23 -0
- package/apis/DefaultApi.ts +176 -0
- package/apis/InfoApi.ts +80 -0
- package/apis/ManifestApi.ts +604 -0
- package/apis/MyProfileApi.ts +63 -0
- package/apis/OrgsApi.ts +172 -0
- package/apis/PegasusApi.ts +336 -0
- package/apis/ProfileApi.ts +229 -0
- package/apis/SiteApi.ts +108 -0
- package/apis/SitesApi.ts +119 -0
- package/apis/SyncApi.ts +55 -0
- package/apis/TeamsApi.ts +673 -0
- package/apis/index.ts +12 -0
- package/docs/AdditionalInfo.md +41 -0
- package/docs/DefaultApi.md +235 -0
- package/docs/ESignature.md +43 -0
- package/docs/Handler.md +41 -0
- package/docs/HandlerSearch.md +34 -0
- package/docs/HandlerSearchSiteTypeEnum.md +31 -0
- package/docs/InfoApi.md +81 -0
- package/docs/Invitation.md +42 -0
- package/docs/LockReasonEnum.md +31 -0
- package/docs/Manifest.md +93 -0
- package/docs/ManifestApi.md +907 -0
- package/docs/ManifestPhone.md +35 -0
- package/docs/Membership.md +42 -0
- package/docs/Mtn.md +39 -0
- package/docs/MyProfileApi.md +73 -0
- package/docs/NullEnum.md +30 -0
- package/docs/OpenInvitation.md +38 -0
- package/docs/Org.md +39 -0
- package/docs/OrgsApi.md +232 -0
- package/docs/PaginatedInvitationList.md +38 -0
- package/docs/PaginatedMtnList.md +38 -0
- package/docs/PaginatedOrgList.md +38 -0
- package/docs/PaginatedSiteList.md +38 -0
- package/docs/PaginatedTeamList.md +38 -0
- package/docs/PaperSignature.md +35 -0
- package/docs/PatchedInvitation.md +42 -0
- package/docs/PatchedProfile.md +35 -0
- package/docs/PatchedRcrainfoProfile.md +45 -0
- package/docs/PatchedTeam.md +48 -0
- package/docs/Price.md +42 -0
- package/docs/Profile.md +35 -0
- package/docs/ProfileApi.md +241 -0
- package/docs/QuickerSign.md +43 -0
- package/docs/RcraAddress.md +45 -0
- package/docs/RcraContact.md +43 -0
- package/docs/RcraPhone.md +35 -0
- package/docs/RcraSite.md +57 -0
- package/docs/RcraSitePermission.md +45 -0
- package/docs/RcraSiteSiteTypeEnum.md +31 -0
- package/docs/RcrainfoProfile.md +45 -0
- package/docs/RoleEnum.md +31 -0
- package/docs/Signer.md +49 -0
- package/docs/Site.md +35 -0
- package/docs/SiteApi.md +147 -0
- package/docs/SiteManifestSyncRequest.md +32 -0
- package/docs/SiteManifestSyncResponse.md +32 -0
- package/docs/SitesApi.md +155 -0
- package/docs/StatusC23Enum.md +31 -0
- package/docs/Subscription.md +51 -0
- package/docs/SubscriptionItem.md +36 -0
- package/docs/SubscriptionStatusEnum.md +31 -0
- package/docs/SyncApi.md +73 -0
- package/docs/Team.md +48 -0
- package/docs/TeamsApi.md +965 -0
- package/docs/TrakUser.md +43 -0
- package/docs/Transporter.md +41 -0
- package/docs/UserInvitationsResponse.md +32 -0
- package/docs/WasteLine.md +55 -0
- package/index.ts +5 -0
- package/models/AdditionalInfo.ts +96 -0
- package/models/AggregateEmployeeData.ts +83 -0
- package/models/DepartmentEnum.ts +59 -0
- package/models/ESignature.ts +112 -0
- package/models/Employee.ts +125 -0
- package/models/Handler.ts +126 -0
- package/models/HandlerSearch.ts +84 -0
- package/models/HandlerSearchSiteTypeEnum.ts +57 -0
- package/models/Invitation.ts +116 -0
- package/models/LockReasonEnum.ts +55 -0
- package/models/Manifest.ts +353 -0
- package/models/ManifestPhone.ts +73 -0
- package/models/Membership.ts +115 -0
- package/models/Mtn.ts +98 -0
- package/models/NullEnum.ts +50 -0
- package/models/OpenInvitation.ts +88 -0
- package/models/Org.ts +88 -0
- package/models/PaginatedEmployeeList.ts +98 -0
- package/models/PaginatedInvitationList.ts +98 -0
- package/models/PaginatedMtnList.ts +98 -0
- package/models/PaginatedOrgList.ts +98 -0
- package/models/PaginatedSiteList.ts +98 -0
- package/models/PaginatedTeamList.ts +98 -0
- package/models/PaperSignature.ts +74 -0
- package/models/PatchedEmployee.ts +118 -0
- package/models/PatchedInvitation.ts +112 -0
- package/models/PatchedProfile.ts +79 -0
- package/models/PatchedRcrainfoProfile.ts +119 -0
- package/models/PatchedTeam.ts +143 -0
- package/models/Price.ts +106 -0
- package/models/Profile.ts +80 -0
- package/models/QuickerSign.ts +108 -0
- package/models/RcraAddress.ts +113 -0
- package/models/RcraContact.ts +112 -0
- package/models/RcraPhone.ts +73 -0
- package/models/RcraSite.ts +200 -0
- package/models/RcraSitePermission.ts +121 -0
- package/models/RcraSiteSiteTypeEnum.ts +57 -0
- package/models/RcrainfoProfile.ts +120 -0
- package/models/RoleEnum.ts +53 -0
- package/models/Signer.ts +136 -0
- package/models/Site.ts +81 -0
- package/models/SiteManifestSyncRequest.ts +65 -0
- package/models/SiteManifestSyncResponse.ts +65 -0
- package/models/StatusC23Enum.ts +67 -0
- package/models/StatusEnum.ts +63 -0
- package/models/Subscription.ts +168 -0
- package/models/SubscriptionItem.ts +90 -0
- package/models/SubscriptionStatusEnum.ts +63 -0
- package/models/Team.ts +151 -0
- package/models/TrakUser.ts +106 -0
- package/models/Transporter.ts +120 -0
- package/models/UserInvitationsResponse.ts +73 -0
- package/models/WasteLine.ts +157 -0
- package/models/index.ts +50 -0
- package/package.json +17 -0
- package/runtime.ts +432 -0
package/apis/TeamsApi.ts
ADDED
|
@@ -0,0 +1,673 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* trak
|
|
5
|
+
* Hazardous waste tracking application
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.7.2
|
|
8
|
+
*
|
|
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
|
+
|
|
16
|
+
import * as runtime from '../runtime';
|
|
17
|
+
import type {
|
|
18
|
+
Invitation,
|
|
19
|
+
PaginatedInvitationList,
|
|
20
|
+
PaginatedTeamList,
|
|
21
|
+
PatchedInvitation,
|
|
22
|
+
PatchedTeam,
|
|
23
|
+
Team,
|
|
24
|
+
UserInvitationsResponse,
|
|
25
|
+
} from '../models/index';
|
|
26
|
+
import {
|
|
27
|
+
InvitationFromJSON,
|
|
28
|
+
InvitationToJSON,
|
|
29
|
+
PaginatedInvitationListFromJSON,
|
|
30
|
+
PaginatedInvitationListToJSON,
|
|
31
|
+
PaginatedTeamListFromJSON,
|
|
32
|
+
PaginatedTeamListToJSON,
|
|
33
|
+
PatchedInvitationFromJSON,
|
|
34
|
+
PatchedInvitationToJSON,
|
|
35
|
+
PatchedTeamFromJSON,
|
|
36
|
+
PatchedTeamToJSON,
|
|
37
|
+
TeamFromJSON,
|
|
38
|
+
TeamToJSON,
|
|
39
|
+
UserInvitationsResponseFromJSON,
|
|
40
|
+
UserInvitationsResponseToJSON,
|
|
41
|
+
} from '../models/index';
|
|
42
|
+
|
|
43
|
+
export interface InvitationsCreateRequest {
|
|
44
|
+
teamSlug: string;
|
|
45
|
+
invitation: Omit<Invitation, 'id'|'invited_by'>;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface InvitationsDestroyRequest {
|
|
49
|
+
id: string;
|
|
50
|
+
teamSlug: string;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface InvitationsListRequest {
|
|
54
|
+
teamSlug: string;
|
|
55
|
+
page?: number;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface InvitationsPartialUpdateRequest {
|
|
59
|
+
id: string;
|
|
60
|
+
teamSlug: string;
|
|
61
|
+
patchedInvitation?: Omit<PatchedInvitation, 'id'|'invited_by'>;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export interface InvitationsRetrieveRequest {
|
|
65
|
+
id: string;
|
|
66
|
+
teamSlug: string;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export interface InvitationsUpdateRequest {
|
|
70
|
+
id: string;
|
|
71
|
+
teamSlug: string;
|
|
72
|
+
invitation: Omit<Invitation, 'id'|'invited_by'>;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface TeamsCreateRequest {
|
|
76
|
+
team: Omit<Team, 'id'|'members'|'invitations'|'dashboard_url'|'is_admin'|'subscription'|'has_active_subscription'>;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export interface TeamsDestroyRequest {
|
|
80
|
+
id: number;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export interface TeamsListRequest {
|
|
84
|
+
page?: number;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export interface TeamsPartialUpdateRequest {
|
|
88
|
+
id: number;
|
|
89
|
+
patchedTeam?: Omit<PatchedTeam, 'id'|'members'|'invitations'|'dashboard_url'|'is_admin'|'subscription'|'has_active_subscription'>;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export interface TeamsRetrieveRequest {
|
|
93
|
+
id: number;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export interface TeamsUpdateRequest {
|
|
97
|
+
id: number;
|
|
98
|
+
team: Omit<Team, 'id'|'members'|'invitations'|'dashboard_url'|'is_admin'|'subscription'|'has_active_subscription'>;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
*
|
|
103
|
+
*/
|
|
104
|
+
export class TeamsApi extends runtime.BaseAPI {
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
*/
|
|
108
|
+
async invitationsCreateRaw(requestParameters: InvitationsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Invitation>> {
|
|
109
|
+
if (requestParameters['teamSlug'] == null) {
|
|
110
|
+
throw new runtime.RequiredError(
|
|
111
|
+
'teamSlug',
|
|
112
|
+
'Required parameter "teamSlug" was null or undefined when calling invitationsCreate().'
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
if (requestParameters['invitation'] == null) {
|
|
117
|
+
throw new runtime.RequiredError(
|
|
118
|
+
'invitation',
|
|
119
|
+
'Required parameter "invitation" was null or undefined when calling invitationsCreate().'
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
const queryParameters: any = {};
|
|
124
|
+
|
|
125
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
126
|
+
|
|
127
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
128
|
+
|
|
129
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
130
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
let urlPath = `/a/{team_slug}/team/api/invitations/`;
|
|
135
|
+
urlPath = urlPath.replace(`{${"team_slug"}}`, encodeURIComponent(String(requestParameters['teamSlug'])));
|
|
136
|
+
|
|
137
|
+
const response = await this.request({
|
|
138
|
+
path: urlPath,
|
|
139
|
+
method: 'POST',
|
|
140
|
+
headers: headerParameters,
|
|
141
|
+
query: queryParameters,
|
|
142
|
+
body: InvitationToJSON(requestParameters['invitation']),
|
|
143
|
+
}, initOverrides);
|
|
144
|
+
|
|
145
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => InvitationFromJSON(jsonValue));
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
*/
|
|
150
|
+
async invitationsCreate(requestParameters: InvitationsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Invitation> {
|
|
151
|
+
const response = await this.invitationsCreateRaw(requestParameters, initOverrides);
|
|
152
|
+
return await response.value();
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
*/
|
|
157
|
+
async invitationsDestroyRaw(requestParameters: InvitationsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
158
|
+
if (requestParameters['id'] == null) {
|
|
159
|
+
throw new runtime.RequiredError(
|
|
160
|
+
'id',
|
|
161
|
+
'Required parameter "id" was null or undefined when calling invitationsDestroy().'
|
|
162
|
+
);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
if (requestParameters['teamSlug'] == null) {
|
|
166
|
+
throw new runtime.RequiredError(
|
|
167
|
+
'teamSlug',
|
|
168
|
+
'Required parameter "teamSlug" was null or undefined when calling invitationsDestroy().'
|
|
169
|
+
);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
const queryParameters: any = {};
|
|
173
|
+
|
|
174
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
175
|
+
|
|
176
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
177
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
let urlPath = `/a/{team_slug}/team/api/invitations/{id}/`;
|
|
182
|
+
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
183
|
+
urlPath = urlPath.replace(`{${"team_slug"}}`, encodeURIComponent(String(requestParameters['teamSlug'])));
|
|
184
|
+
|
|
185
|
+
const response = await this.request({
|
|
186
|
+
path: urlPath,
|
|
187
|
+
method: 'DELETE',
|
|
188
|
+
headers: headerParameters,
|
|
189
|
+
query: queryParameters,
|
|
190
|
+
}, initOverrides);
|
|
191
|
+
|
|
192
|
+
return new runtime.VoidApiResponse(response);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
*/
|
|
197
|
+
async invitationsDestroy(requestParameters: InvitationsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
198
|
+
await this.invitationsDestroyRaw(requestParameters, initOverrides);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
*/
|
|
203
|
+
async invitationsListRaw(requestParameters: InvitationsListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedInvitationList>> {
|
|
204
|
+
if (requestParameters['teamSlug'] == null) {
|
|
205
|
+
throw new runtime.RequiredError(
|
|
206
|
+
'teamSlug',
|
|
207
|
+
'Required parameter "teamSlug" was null or undefined when calling invitationsList().'
|
|
208
|
+
);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
const queryParameters: any = {};
|
|
212
|
+
|
|
213
|
+
if (requestParameters['page'] != null) {
|
|
214
|
+
queryParameters['page'] = requestParameters['page'];
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
218
|
+
|
|
219
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
220
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
let urlPath = `/a/{team_slug}/team/api/invitations/`;
|
|
225
|
+
urlPath = urlPath.replace(`{${"team_slug"}}`, encodeURIComponent(String(requestParameters['teamSlug'])));
|
|
226
|
+
|
|
227
|
+
const response = await this.request({
|
|
228
|
+
path: urlPath,
|
|
229
|
+
method: 'GET',
|
|
230
|
+
headers: headerParameters,
|
|
231
|
+
query: queryParameters,
|
|
232
|
+
}, initOverrides);
|
|
233
|
+
|
|
234
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedInvitationListFromJSON(jsonValue));
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
*/
|
|
239
|
+
async invitationsList(requestParameters: InvitationsListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedInvitationList> {
|
|
240
|
+
const response = await this.invitationsListRaw(requestParameters, initOverrides);
|
|
241
|
+
return await response.value();
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
*/
|
|
246
|
+
async invitationsPartialUpdateRaw(requestParameters: InvitationsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Invitation>> {
|
|
247
|
+
if (requestParameters['id'] == null) {
|
|
248
|
+
throw new runtime.RequiredError(
|
|
249
|
+
'id',
|
|
250
|
+
'Required parameter "id" was null or undefined when calling invitationsPartialUpdate().'
|
|
251
|
+
);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
if (requestParameters['teamSlug'] == null) {
|
|
255
|
+
throw new runtime.RequiredError(
|
|
256
|
+
'teamSlug',
|
|
257
|
+
'Required parameter "teamSlug" was null or undefined when calling invitationsPartialUpdate().'
|
|
258
|
+
);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
const queryParameters: any = {};
|
|
262
|
+
|
|
263
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
264
|
+
|
|
265
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
266
|
+
|
|
267
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
268
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
let urlPath = `/a/{team_slug}/team/api/invitations/{id}/`;
|
|
273
|
+
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
274
|
+
urlPath = urlPath.replace(`{${"team_slug"}}`, encodeURIComponent(String(requestParameters['teamSlug'])));
|
|
275
|
+
|
|
276
|
+
const response = await this.request({
|
|
277
|
+
path: urlPath,
|
|
278
|
+
method: 'PATCH',
|
|
279
|
+
headers: headerParameters,
|
|
280
|
+
query: queryParameters,
|
|
281
|
+
body: PatchedInvitationToJSON(requestParameters['patchedInvitation']),
|
|
282
|
+
}, initOverrides);
|
|
283
|
+
|
|
284
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => InvitationFromJSON(jsonValue));
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
*/
|
|
289
|
+
async invitationsPartialUpdate(requestParameters: InvitationsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Invitation> {
|
|
290
|
+
const response = await this.invitationsPartialUpdateRaw(requestParameters, initOverrides);
|
|
291
|
+
return await response.value();
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
*/
|
|
296
|
+
async invitationsRetrieveRaw(requestParameters: InvitationsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Invitation>> {
|
|
297
|
+
if (requestParameters['id'] == null) {
|
|
298
|
+
throw new runtime.RequiredError(
|
|
299
|
+
'id',
|
|
300
|
+
'Required parameter "id" was null or undefined when calling invitationsRetrieve().'
|
|
301
|
+
);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
if (requestParameters['teamSlug'] == null) {
|
|
305
|
+
throw new runtime.RequiredError(
|
|
306
|
+
'teamSlug',
|
|
307
|
+
'Required parameter "teamSlug" was null or undefined when calling invitationsRetrieve().'
|
|
308
|
+
);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
const queryParameters: any = {};
|
|
312
|
+
|
|
313
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
314
|
+
|
|
315
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
316
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
let urlPath = `/a/{team_slug}/team/api/invitations/{id}/`;
|
|
321
|
+
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
322
|
+
urlPath = urlPath.replace(`{${"team_slug"}}`, encodeURIComponent(String(requestParameters['teamSlug'])));
|
|
323
|
+
|
|
324
|
+
const response = await this.request({
|
|
325
|
+
path: urlPath,
|
|
326
|
+
method: 'GET',
|
|
327
|
+
headers: headerParameters,
|
|
328
|
+
query: queryParameters,
|
|
329
|
+
}, initOverrides);
|
|
330
|
+
|
|
331
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => InvitationFromJSON(jsonValue));
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
*/
|
|
336
|
+
async invitationsRetrieve(requestParameters: InvitationsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Invitation> {
|
|
337
|
+
const response = await this.invitationsRetrieveRaw(requestParameters, initOverrides);
|
|
338
|
+
return await response.value();
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
*/
|
|
343
|
+
async invitationsUpdateRaw(requestParameters: InvitationsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Invitation>> {
|
|
344
|
+
if (requestParameters['id'] == null) {
|
|
345
|
+
throw new runtime.RequiredError(
|
|
346
|
+
'id',
|
|
347
|
+
'Required parameter "id" was null or undefined when calling invitationsUpdate().'
|
|
348
|
+
);
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
if (requestParameters['teamSlug'] == null) {
|
|
352
|
+
throw new runtime.RequiredError(
|
|
353
|
+
'teamSlug',
|
|
354
|
+
'Required parameter "teamSlug" was null or undefined when calling invitationsUpdate().'
|
|
355
|
+
);
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
if (requestParameters['invitation'] == null) {
|
|
359
|
+
throw new runtime.RequiredError(
|
|
360
|
+
'invitation',
|
|
361
|
+
'Required parameter "invitation" was null or undefined when calling invitationsUpdate().'
|
|
362
|
+
);
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
const queryParameters: any = {};
|
|
366
|
+
|
|
367
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
368
|
+
|
|
369
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
370
|
+
|
|
371
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
372
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
|
|
376
|
+
let urlPath = `/a/{team_slug}/team/api/invitations/{id}/`;
|
|
377
|
+
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
378
|
+
urlPath = urlPath.replace(`{${"team_slug"}}`, encodeURIComponent(String(requestParameters['teamSlug'])));
|
|
379
|
+
|
|
380
|
+
const response = await this.request({
|
|
381
|
+
path: urlPath,
|
|
382
|
+
method: 'PUT',
|
|
383
|
+
headers: headerParameters,
|
|
384
|
+
query: queryParameters,
|
|
385
|
+
body: InvitationToJSON(requestParameters['invitation']),
|
|
386
|
+
}, initOverrides);
|
|
387
|
+
|
|
388
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => InvitationFromJSON(jsonValue));
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
/**
|
|
392
|
+
*/
|
|
393
|
+
async invitationsUpdate(requestParameters: InvitationsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Invitation> {
|
|
394
|
+
const response = await this.invitationsUpdateRaw(requestParameters, initOverrides);
|
|
395
|
+
return await response.value();
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
/**
|
|
399
|
+
*/
|
|
400
|
+
async teamsCreateRaw(requestParameters: TeamsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Team>> {
|
|
401
|
+
if (requestParameters['team'] == null) {
|
|
402
|
+
throw new runtime.RequiredError(
|
|
403
|
+
'team',
|
|
404
|
+
'Required parameter "team" was null or undefined when calling teamsCreate().'
|
|
405
|
+
);
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
const queryParameters: any = {};
|
|
409
|
+
|
|
410
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
411
|
+
|
|
412
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
413
|
+
|
|
414
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
415
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
|
|
419
|
+
let urlPath = `/teams/api/teams/`;
|
|
420
|
+
|
|
421
|
+
const response = await this.request({
|
|
422
|
+
path: urlPath,
|
|
423
|
+
method: 'POST',
|
|
424
|
+
headers: headerParameters,
|
|
425
|
+
query: queryParameters,
|
|
426
|
+
body: TeamToJSON(requestParameters['team']),
|
|
427
|
+
}, initOverrides);
|
|
428
|
+
|
|
429
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => TeamFromJSON(jsonValue));
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
/**
|
|
433
|
+
*/
|
|
434
|
+
async teamsCreate(requestParameters: TeamsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Team> {
|
|
435
|
+
const response = await this.teamsCreateRaw(requestParameters, initOverrides);
|
|
436
|
+
return await response.value();
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
*/
|
|
441
|
+
async teamsDestroyRaw(requestParameters: TeamsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
442
|
+
if (requestParameters['id'] == null) {
|
|
443
|
+
throw new runtime.RequiredError(
|
|
444
|
+
'id',
|
|
445
|
+
'Required parameter "id" was null or undefined when calling teamsDestroy().'
|
|
446
|
+
);
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
const queryParameters: any = {};
|
|
450
|
+
|
|
451
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
452
|
+
|
|
453
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
454
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
|
|
458
|
+
let urlPath = `/teams/api/teams/{id}/`;
|
|
459
|
+
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
460
|
+
|
|
461
|
+
const response = await this.request({
|
|
462
|
+
path: urlPath,
|
|
463
|
+
method: 'DELETE',
|
|
464
|
+
headers: headerParameters,
|
|
465
|
+
query: queryParameters,
|
|
466
|
+
}, initOverrides);
|
|
467
|
+
|
|
468
|
+
return new runtime.VoidApiResponse(response);
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
/**
|
|
472
|
+
*/
|
|
473
|
+
async teamsDestroy(requestParameters: TeamsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
474
|
+
await this.teamsDestroyRaw(requestParameters, initOverrides);
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
/**
|
|
478
|
+
*/
|
|
479
|
+
async teamsListRaw(requestParameters: TeamsListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedTeamList>> {
|
|
480
|
+
const queryParameters: any = {};
|
|
481
|
+
|
|
482
|
+
if (requestParameters['page'] != null) {
|
|
483
|
+
queryParameters['page'] = requestParameters['page'];
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
487
|
+
|
|
488
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
489
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
|
|
493
|
+
let urlPath = `/teams/api/teams/`;
|
|
494
|
+
|
|
495
|
+
const response = await this.request({
|
|
496
|
+
path: urlPath,
|
|
497
|
+
method: 'GET',
|
|
498
|
+
headers: headerParameters,
|
|
499
|
+
query: queryParameters,
|
|
500
|
+
}, initOverrides);
|
|
501
|
+
|
|
502
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedTeamListFromJSON(jsonValue));
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
/**
|
|
506
|
+
*/
|
|
507
|
+
async teamsList(requestParameters: TeamsListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedTeamList> {
|
|
508
|
+
const response = await this.teamsListRaw(requestParameters, initOverrides);
|
|
509
|
+
return await response.value();
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
/**
|
|
513
|
+
*/
|
|
514
|
+
async teamsPartialUpdateRaw(requestParameters: TeamsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Team>> {
|
|
515
|
+
if (requestParameters['id'] == null) {
|
|
516
|
+
throw new runtime.RequiredError(
|
|
517
|
+
'id',
|
|
518
|
+
'Required parameter "id" was null or undefined when calling teamsPartialUpdate().'
|
|
519
|
+
);
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
const queryParameters: any = {};
|
|
523
|
+
|
|
524
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
525
|
+
|
|
526
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
527
|
+
|
|
528
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
529
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
|
|
533
|
+
let urlPath = `/teams/api/teams/{id}/`;
|
|
534
|
+
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
535
|
+
|
|
536
|
+
const response = await this.request({
|
|
537
|
+
path: urlPath,
|
|
538
|
+
method: 'PATCH',
|
|
539
|
+
headers: headerParameters,
|
|
540
|
+
query: queryParameters,
|
|
541
|
+
body: PatchedTeamToJSON(requestParameters['patchedTeam']),
|
|
542
|
+
}, initOverrides);
|
|
543
|
+
|
|
544
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => TeamFromJSON(jsonValue));
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
/**
|
|
548
|
+
*/
|
|
549
|
+
async teamsPartialUpdate(requestParameters: TeamsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Team> {
|
|
550
|
+
const response = await this.teamsPartialUpdateRaw(requestParameters, initOverrides);
|
|
551
|
+
return await response.value();
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
/**
|
|
555
|
+
*/
|
|
556
|
+
async teamsRetrieveRaw(requestParameters: TeamsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Team>> {
|
|
557
|
+
if (requestParameters['id'] == null) {
|
|
558
|
+
throw new runtime.RequiredError(
|
|
559
|
+
'id',
|
|
560
|
+
'Required parameter "id" was null or undefined when calling teamsRetrieve().'
|
|
561
|
+
);
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
const queryParameters: any = {};
|
|
565
|
+
|
|
566
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
567
|
+
|
|
568
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
569
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
|
|
573
|
+
let urlPath = `/teams/api/teams/{id}/`;
|
|
574
|
+
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
575
|
+
|
|
576
|
+
const response = await this.request({
|
|
577
|
+
path: urlPath,
|
|
578
|
+
method: 'GET',
|
|
579
|
+
headers: headerParameters,
|
|
580
|
+
query: queryParameters,
|
|
581
|
+
}, initOverrides);
|
|
582
|
+
|
|
583
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => TeamFromJSON(jsonValue));
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
/**
|
|
587
|
+
*/
|
|
588
|
+
async teamsRetrieve(requestParameters: TeamsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Team> {
|
|
589
|
+
const response = await this.teamsRetrieveRaw(requestParameters, initOverrides);
|
|
590
|
+
return await response.value();
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
/**
|
|
594
|
+
*/
|
|
595
|
+
async teamsUpdateRaw(requestParameters: TeamsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Team>> {
|
|
596
|
+
if (requestParameters['id'] == null) {
|
|
597
|
+
throw new runtime.RequiredError(
|
|
598
|
+
'id',
|
|
599
|
+
'Required parameter "id" was null or undefined when calling teamsUpdate().'
|
|
600
|
+
);
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
if (requestParameters['team'] == null) {
|
|
604
|
+
throw new runtime.RequiredError(
|
|
605
|
+
'team',
|
|
606
|
+
'Required parameter "team" was null or undefined when calling teamsUpdate().'
|
|
607
|
+
);
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
const queryParameters: any = {};
|
|
611
|
+
|
|
612
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
613
|
+
|
|
614
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
615
|
+
|
|
616
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
617
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
|
|
621
|
+
let urlPath = `/teams/api/teams/{id}/`;
|
|
622
|
+
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
623
|
+
|
|
624
|
+
const response = await this.request({
|
|
625
|
+
path: urlPath,
|
|
626
|
+
method: 'PUT',
|
|
627
|
+
headers: headerParameters,
|
|
628
|
+
query: queryParameters,
|
|
629
|
+
body: TeamToJSON(requestParameters['team']),
|
|
630
|
+
}, initOverrides);
|
|
631
|
+
|
|
632
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => TeamFromJSON(jsonValue));
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
/**
|
|
636
|
+
*/
|
|
637
|
+
async teamsUpdate(requestParameters: TeamsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Team> {
|
|
638
|
+
const response = await this.teamsUpdateRaw(requestParameters, initOverrides);
|
|
639
|
+
return await response.value();
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
/**
|
|
643
|
+
*/
|
|
644
|
+
async userInvitationsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserInvitationsResponse>> {
|
|
645
|
+
const queryParameters: any = {};
|
|
646
|
+
|
|
647
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
648
|
+
|
|
649
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
650
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
|
|
654
|
+
let urlPath = `/teams/api/user-invitations/`;
|
|
655
|
+
|
|
656
|
+
const response = await this.request({
|
|
657
|
+
path: urlPath,
|
|
658
|
+
method: 'GET',
|
|
659
|
+
headers: headerParameters,
|
|
660
|
+
query: queryParameters,
|
|
661
|
+
}, initOverrides);
|
|
662
|
+
|
|
663
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => UserInvitationsResponseFromJSON(jsonValue));
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
/**
|
|
667
|
+
*/
|
|
668
|
+
async userInvitations(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserInvitationsResponse> {
|
|
669
|
+
const response = await this.userInvitationsRaw(initOverrides);
|
|
670
|
+
return await response.value();
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
}
|
package/apis/index.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
export * from './DefaultApi';
|
|
4
|
+
export * from './InfoApi';
|
|
5
|
+
export * from './ManifestApi';
|
|
6
|
+
export * from './MyProfileApi';
|
|
7
|
+
export * from './OrgsApi';
|
|
8
|
+
export * from './ProfileApi';
|
|
9
|
+
export * from './SiteApi';
|
|
10
|
+
export * from './SitesApi';
|
|
11
|
+
export * from './SyncApi';
|
|
12
|
+
export * from './TeamsApi';
|