gopadjs 1.0.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.
Files changed (53) hide show
  1. package/.codacy.yml +8 -0
  2. package/.editorconfig +24 -0
  3. package/.github/RELEASE +1 -0
  4. package/.github/issue_template.md +9 -0
  5. package/.github/pull_request_template.md +8 -0
  6. package/.github/renovate.json +6 -0
  7. package/.github/semantic.yml +23 -0
  8. package/.github/settings.yml +43 -0
  9. package/.github/workflows/automerge.yml +49 -0
  10. package/.github/workflows/flake.yml +56 -0
  11. package/.github/workflows/general.yml +45 -0
  12. package/.github/workflows/release.yml +49 -0
  13. package/.openapi-generator/FILES +25 -0
  14. package/.openapi-generator/VERSION +1 -0
  15. package/.openapi-generator-ignore +3 -0
  16. package/.releaserc +140 -0
  17. package/CHANGELOG.md +16 -0
  18. package/CONTRIBUTING.md +121 -0
  19. package/DCO +34 -0
  20. package/LICENSE +202 -0
  21. package/README.md +88 -0
  22. package/api/auth-api.ts +399 -0
  23. package/api/team-api.ts +1641 -0
  24. package/api/user-api.ts +1641 -0
  25. package/api.ts +17 -0
  26. package/base.ts +91 -0
  27. package/common.ts +203 -0
  28. package/configuration.ts +132 -0
  29. package/flake.lock +472 -0
  30. package/flake.nix +57 -0
  31. package/hack/generate-client.sh +65 -0
  32. package/hack/openapi/templates/README.mustache +93 -0
  33. package/hack/openapi/templates/gitignore +6 -0
  34. package/hack/semantic-version.sh +17 -0
  35. package/index.ts +17 -0
  36. package/model/index.ts +12 -0
  37. package/model/notification.ts +43 -0
  38. package/model/team-user-params.ts +42 -0
  39. package/model/team-users.ts +46 -0
  40. package/model/team.ts +61 -0
  41. package/model/teams.ts +37 -0
  42. package/model/user-auth.ts +45 -0
  43. package/model/user-team-params.ts +42 -0
  44. package/model/user-team.ts +79 -0
  45. package/model/user-teams.ts +46 -0
  46. package/model/user.ts +100 -0
  47. package/model/users.ts +37 -0
  48. package/model/validation.ts +33 -0
  49. package/openapi.yml +12 -0
  50. package/openapitools.json +7 -0
  51. package/package.json +41 -0
  52. package/tsconfig.esm.json +7 -0
  53. package/tsconfig.json +18 -0
@@ -0,0 +1,1641 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Gopad OpenAPI
5
+ * API definition for Gopad, Etherpad for markdown with go
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0-alpha1
8
+ * Contact: gopad@webhippie.de
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
+ import type { Configuration } from "../configuration";
16
+ import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from "axios";
17
+ import globalAxios from "axios";
18
+ // URLSearchParams not necessarily used
19
+ // @ts-ignore
20
+ import { URL, URLSearchParams } from "url";
21
+ // Some imports not used depending on template conditions
22
+ // @ts-ignore
23
+ import {
24
+ DUMMY_BASE_URL,
25
+ assertParamExists,
26
+ setApiKeyToObject,
27
+ setBasicAuthToObject,
28
+ setBearerAuthToObject,
29
+ setOAuthToObject,
30
+ setSearchParams,
31
+ serializeDataIfNeeded,
32
+ toPathString,
33
+ createRequestFunction,
34
+ } from "../common";
35
+ // @ts-ignore
36
+ import {
37
+ BASE_PATH,
38
+ COLLECTION_FORMATS,
39
+ type RequestArgs,
40
+ BaseAPI,
41
+ RequiredError,
42
+ operationServerMap,
43
+ } from "../base";
44
+ // @ts-ignore
45
+ import type { Notification } from "../model";
46
+ // @ts-ignore
47
+ import type { Team } from "../model";
48
+ // @ts-ignore
49
+ import type { TeamUserParams } from "../model";
50
+ // @ts-ignore
51
+ import type { TeamUsers } from "../model";
52
+ // @ts-ignore
53
+ import type { Teams } from "../model";
54
+ /**
55
+ * TeamApi - axios parameter creator
56
+ * @export
57
+ */
58
+ export const TeamApiAxiosParamCreator = function (
59
+ configuration?: Configuration,
60
+ ) {
61
+ return {
62
+ /**
63
+ *
64
+ * @summary Assign a user to team
65
+ * @param {string} teamId A team identifier or slug
66
+ * @param {TeamUserParams} teamUserParams The team user data to attach
67
+ * @param {*} [options] Override http request option.
68
+ * @throws {RequiredError}
69
+ */
70
+ attachTeamToUser: async (
71
+ teamId: string,
72
+ teamUserParams: TeamUserParams,
73
+ options: RawAxiosRequestConfig = {},
74
+ ): Promise<RequestArgs> => {
75
+ // verify required parameter 'teamId' is not null or undefined
76
+ assertParamExists("attachTeamToUser", "teamId", teamId);
77
+ // verify required parameter 'teamUserParams' is not null or undefined
78
+ assertParamExists("attachTeamToUser", "teamUserParams", teamUserParams);
79
+ const localVarPath = `/teams/{team_id}/users`.replace(
80
+ `{${"team_id"}}`,
81
+ encodeURIComponent(String(teamId)),
82
+ );
83
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
84
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
85
+ let baseOptions;
86
+ if (configuration) {
87
+ baseOptions = configuration.baseOptions;
88
+ }
89
+
90
+ const localVarRequestOptions = {
91
+ method: "POST",
92
+ ...baseOptions,
93
+ ...options,
94
+ };
95
+ const localVarHeaderParameter = {} as any;
96
+ const localVarQueryParameter = {} as any;
97
+
98
+ // authentication Cookie required
99
+ await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration);
100
+
101
+ // authentication Basic required
102
+ // http basic authentication required
103
+ setBasicAuthToObject(localVarRequestOptions, configuration);
104
+
105
+ // authentication Header required
106
+ await setApiKeyToObject(
107
+ localVarHeaderParameter,
108
+ "X-API-Key",
109
+ configuration,
110
+ );
111
+
112
+ localVarHeaderParameter["Content-Type"] = "application/json";
113
+
114
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
115
+ let headersFromBaseOptions =
116
+ baseOptions && baseOptions.headers ? baseOptions.headers : {};
117
+ localVarRequestOptions.headers = {
118
+ ...localVarHeaderParameter,
119
+ ...headersFromBaseOptions,
120
+ ...options.headers,
121
+ };
122
+ localVarRequestOptions.data = serializeDataIfNeeded(
123
+ teamUserParams,
124
+ localVarRequestOptions,
125
+ configuration,
126
+ );
127
+
128
+ return {
129
+ url: toPathString(localVarUrlObj),
130
+ options: localVarRequestOptions,
131
+ };
132
+ },
133
+ /**
134
+ *
135
+ * @summary Create a new team
136
+ * @param {Team} team The team data to create
137
+ * @param {*} [options] Override http request option.
138
+ * @throws {RequiredError}
139
+ */
140
+ createTeam: async (
141
+ team: Team,
142
+ options: RawAxiosRequestConfig = {},
143
+ ): Promise<RequestArgs> => {
144
+ // verify required parameter 'team' is not null or undefined
145
+ assertParamExists("createTeam", "team", team);
146
+ const localVarPath = `/teams`;
147
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
148
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
149
+ let baseOptions;
150
+ if (configuration) {
151
+ baseOptions = configuration.baseOptions;
152
+ }
153
+
154
+ const localVarRequestOptions = {
155
+ method: "POST",
156
+ ...baseOptions,
157
+ ...options,
158
+ };
159
+ const localVarHeaderParameter = {} as any;
160
+ const localVarQueryParameter = {} as any;
161
+
162
+ // authentication Cookie required
163
+ await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration);
164
+
165
+ // authentication Basic required
166
+ // http basic authentication required
167
+ setBasicAuthToObject(localVarRequestOptions, configuration);
168
+
169
+ // authentication Header required
170
+ await setApiKeyToObject(
171
+ localVarHeaderParameter,
172
+ "X-API-Key",
173
+ configuration,
174
+ );
175
+
176
+ localVarHeaderParameter["Content-Type"] = "application/json";
177
+
178
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
179
+ let headersFromBaseOptions =
180
+ baseOptions && baseOptions.headers ? baseOptions.headers : {};
181
+ localVarRequestOptions.headers = {
182
+ ...localVarHeaderParameter,
183
+ ...headersFromBaseOptions,
184
+ ...options.headers,
185
+ };
186
+ localVarRequestOptions.data = serializeDataIfNeeded(
187
+ team,
188
+ localVarRequestOptions,
189
+ configuration,
190
+ );
191
+
192
+ return {
193
+ url: toPathString(localVarUrlObj),
194
+ options: localVarRequestOptions,
195
+ };
196
+ },
197
+ /**
198
+ *
199
+ * @summary Delete a specific team
200
+ * @param {string} teamId A team identifier or slug
201
+ * @param {*} [options] Override http request option.
202
+ * @throws {RequiredError}
203
+ */
204
+ deleteTeam: async (
205
+ teamId: string,
206
+ options: RawAxiosRequestConfig = {},
207
+ ): Promise<RequestArgs> => {
208
+ // verify required parameter 'teamId' is not null or undefined
209
+ assertParamExists("deleteTeam", "teamId", teamId);
210
+ const localVarPath = `/teams/{team_id}`.replace(
211
+ `{${"team_id"}}`,
212
+ encodeURIComponent(String(teamId)),
213
+ );
214
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
215
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
216
+ let baseOptions;
217
+ if (configuration) {
218
+ baseOptions = configuration.baseOptions;
219
+ }
220
+
221
+ const localVarRequestOptions = {
222
+ method: "DELETE",
223
+ ...baseOptions,
224
+ ...options,
225
+ };
226
+ const localVarHeaderParameter = {} as any;
227
+ const localVarQueryParameter = {} as any;
228
+
229
+ // authentication Cookie required
230
+ await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration);
231
+
232
+ // authentication Basic required
233
+ // http basic authentication required
234
+ setBasicAuthToObject(localVarRequestOptions, configuration);
235
+
236
+ // authentication Header required
237
+ await setApiKeyToObject(
238
+ localVarHeaderParameter,
239
+ "X-API-Key",
240
+ configuration,
241
+ );
242
+
243
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
244
+ let headersFromBaseOptions =
245
+ baseOptions && baseOptions.headers ? baseOptions.headers : {};
246
+ localVarRequestOptions.headers = {
247
+ ...localVarHeaderParameter,
248
+ ...headersFromBaseOptions,
249
+ ...options.headers,
250
+ };
251
+
252
+ return {
253
+ url: toPathString(localVarUrlObj),
254
+ options: localVarRequestOptions,
255
+ };
256
+ },
257
+ /**
258
+ *
259
+ * @summary Remove a user from team
260
+ * @param {string} teamId A team identifier or slug
261
+ * @param {TeamUserParams} teamUserParams The team user data to delete
262
+ * @param {*} [options] Override http request option.
263
+ * @throws {RequiredError}
264
+ */
265
+ deleteTeamFromUser: async (
266
+ teamId: string,
267
+ teamUserParams: TeamUserParams,
268
+ options: RawAxiosRequestConfig = {},
269
+ ): Promise<RequestArgs> => {
270
+ // verify required parameter 'teamId' is not null or undefined
271
+ assertParamExists("deleteTeamFromUser", "teamId", teamId);
272
+ // verify required parameter 'teamUserParams' is not null or undefined
273
+ assertParamExists("deleteTeamFromUser", "teamUserParams", teamUserParams);
274
+ const localVarPath = `/teams/{team_id}/users`.replace(
275
+ `{${"team_id"}}`,
276
+ encodeURIComponent(String(teamId)),
277
+ );
278
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
279
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
280
+ let baseOptions;
281
+ if (configuration) {
282
+ baseOptions = configuration.baseOptions;
283
+ }
284
+
285
+ const localVarRequestOptions = {
286
+ method: "DELETE",
287
+ ...baseOptions,
288
+ ...options,
289
+ };
290
+ const localVarHeaderParameter = {} as any;
291
+ const localVarQueryParameter = {} as any;
292
+
293
+ // authentication Cookie required
294
+ await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration);
295
+
296
+ // authentication Basic required
297
+ // http basic authentication required
298
+ setBasicAuthToObject(localVarRequestOptions, configuration);
299
+
300
+ // authentication Header required
301
+ await setApiKeyToObject(
302
+ localVarHeaderParameter,
303
+ "X-API-Key",
304
+ configuration,
305
+ );
306
+
307
+ localVarHeaderParameter["Content-Type"] = "application/json";
308
+
309
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
310
+ let headersFromBaseOptions =
311
+ baseOptions && baseOptions.headers ? baseOptions.headers : {};
312
+ localVarRequestOptions.headers = {
313
+ ...localVarHeaderParameter,
314
+ ...headersFromBaseOptions,
315
+ ...options.headers,
316
+ };
317
+ localVarRequestOptions.data = serializeDataIfNeeded(
318
+ teamUserParams,
319
+ localVarRequestOptions,
320
+ configuration,
321
+ );
322
+
323
+ return {
324
+ url: toPathString(localVarUrlObj),
325
+ options: localVarRequestOptions,
326
+ };
327
+ },
328
+ /**
329
+ *
330
+ * @summary Fetch all users assigned to team
331
+ * @param {string} teamId A team identifier or slug
332
+ * @param {string} [search] Search query
333
+ * @param {ListTeamUsersSortEnum} [sort] Sorting column
334
+ * @param {ListTeamUsersOrderEnum} [order] Sorting order
335
+ * @param {number} [limit] Paging limit
336
+ * @param {number} [offset] Paging offset
337
+ * @param {*} [options] Override http request option.
338
+ * @throws {RequiredError}
339
+ */
340
+ listTeamUsers: async (
341
+ teamId: string,
342
+ search?: string,
343
+ sort?: ListTeamUsersSortEnum,
344
+ order?: ListTeamUsersOrderEnum,
345
+ limit?: number,
346
+ offset?: number,
347
+ options: RawAxiosRequestConfig = {},
348
+ ): Promise<RequestArgs> => {
349
+ // verify required parameter 'teamId' is not null or undefined
350
+ assertParamExists("listTeamUsers", "teamId", teamId);
351
+ const localVarPath = `/teams/{team_id}/users`.replace(
352
+ `{${"team_id"}}`,
353
+ encodeURIComponent(String(teamId)),
354
+ );
355
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
356
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
357
+ let baseOptions;
358
+ if (configuration) {
359
+ baseOptions = configuration.baseOptions;
360
+ }
361
+
362
+ const localVarRequestOptions = {
363
+ method: "GET",
364
+ ...baseOptions,
365
+ ...options,
366
+ };
367
+ const localVarHeaderParameter = {} as any;
368
+ const localVarQueryParameter = {} as any;
369
+
370
+ // authentication Cookie required
371
+ await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration);
372
+
373
+ // authentication Basic required
374
+ // http basic authentication required
375
+ setBasicAuthToObject(localVarRequestOptions, configuration);
376
+
377
+ // authentication Header required
378
+ await setApiKeyToObject(
379
+ localVarHeaderParameter,
380
+ "X-API-Key",
381
+ configuration,
382
+ );
383
+
384
+ if (search !== undefined) {
385
+ localVarQueryParameter["search"] = search;
386
+ }
387
+
388
+ if (sort !== undefined) {
389
+ localVarQueryParameter["sort"] = sort;
390
+ }
391
+
392
+ if (order !== undefined) {
393
+ localVarQueryParameter["order"] = order;
394
+ }
395
+
396
+ if (limit !== undefined) {
397
+ localVarQueryParameter["limit"] = limit;
398
+ }
399
+
400
+ if (offset !== undefined) {
401
+ localVarQueryParameter["offset"] = offset;
402
+ }
403
+
404
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
405
+ let headersFromBaseOptions =
406
+ baseOptions && baseOptions.headers ? baseOptions.headers : {};
407
+ localVarRequestOptions.headers = {
408
+ ...localVarHeaderParameter,
409
+ ...headersFromBaseOptions,
410
+ ...options.headers,
411
+ };
412
+
413
+ return {
414
+ url: toPathString(localVarUrlObj),
415
+ options: localVarRequestOptions,
416
+ };
417
+ },
418
+ /**
419
+ *
420
+ * @summary Fetch all available teams
421
+ * @param {string} [search] Search query
422
+ * @param {ListTeamsSortEnum} [sort] Sorting column
423
+ * @param {ListTeamsOrderEnum} [order] Sorting order
424
+ * @param {number} [limit] Paging limit
425
+ * @param {number} [offset] Paging offset
426
+ * @param {*} [options] Override http request option.
427
+ * @throws {RequiredError}
428
+ */
429
+ listTeams: async (
430
+ search?: string,
431
+ sort?: ListTeamsSortEnum,
432
+ order?: ListTeamsOrderEnum,
433
+ limit?: number,
434
+ offset?: number,
435
+ options: RawAxiosRequestConfig = {},
436
+ ): Promise<RequestArgs> => {
437
+ const localVarPath = `/teams`;
438
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
439
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
440
+ let baseOptions;
441
+ if (configuration) {
442
+ baseOptions = configuration.baseOptions;
443
+ }
444
+
445
+ const localVarRequestOptions = {
446
+ method: "GET",
447
+ ...baseOptions,
448
+ ...options,
449
+ };
450
+ const localVarHeaderParameter = {} as any;
451
+ const localVarQueryParameter = {} as any;
452
+
453
+ // authentication Cookie required
454
+ await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration);
455
+
456
+ // authentication Basic required
457
+ // http basic authentication required
458
+ setBasicAuthToObject(localVarRequestOptions, configuration);
459
+
460
+ // authentication Header required
461
+ await setApiKeyToObject(
462
+ localVarHeaderParameter,
463
+ "X-API-Key",
464
+ configuration,
465
+ );
466
+
467
+ if (search !== undefined) {
468
+ localVarQueryParameter["search"] = search;
469
+ }
470
+
471
+ if (sort !== undefined) {
472
+ localVarQueryParameter["sort"] = sort;
473
+ }
474
+
475
+ if (order !== undefined) {
476
+ localVarQueryParameter["order"] = order;
477
+ }
478
+
479
+ if (limit !== undefined) {
480
+ localVarQueryParameter["limit"] = limit;
481
+ }
482
+
483
+ if (offset !== undefined) {
484
+ localVarQueryParameter["offset"] = offset;
485
+ }
486
+
487
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
488
+ let headersFromBaseOptions =
489
+ baseOptions && baseOptions.headers ? baseOptions.headers : {};
490
+ localVarRequestOptions.headers = {
491
+ ...localVarHeaderParameter,
492
+ ...headersFromBaseOptions,
493
+ ...options.headers,
494
+ };
495
+
496
+ return {
497
+ url: toPathString(localVarUrlObj),
498
+ options: localVarRequestOptions,
499
+ };
500
+ },
501
+ /**
502
+ *
503
+ * @summary Update user perms for team
504
+ * @param {string} teamId A team identifier or slug
505
+ * @param {TeamUserParams} teamUserParams The team user data to update
506
+ * @param {*} [options] Override http request option.
507
+ * @throws {RequiredError}
508
+ */
509
+ permitTeamUser: async (
510
+ teamId: string,
511
+ teamUserParams: TeamUserParams,
512
+ options: RawAxiosRequestConfig = {},
513
+ ): Promise<RequestArgs> => {
514
+ // verify required parameter 'teamId' is not null or undefined
515
+ assertParamExists("permitTeamUser", "teamId", teamId);
516
+ // verify required parameter 'teamUserParams' is not null or undefined
517
+ assertParamExists("permitTeamUser", "teamUserParams", teamUserParams);
518
+ const localVarPath = `/teams/{team_id}/users`.replace(
519
+ `{${"team_id"}}`,
520
+ encodeURIComponent(String(teamId)),
521
+ );
522
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
523
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
524
+ let baseOptions;
525
+ if (configuration) {
526
+ baseOptions = configuration.baseOptions;
527
+ }
528
+
529
+ const localVarRequestOptions = {
530
+ method: "PUT",
531
+ ...baseOptions,
532
+ ...options,
533
+ };
534
+ const localVarHeaderParameter = {} as any;
535
+ const localVarQueryParameter = {} as any;
536
+
537
+ // authentication Cookie required
538
+ await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration);
539
+
540
+ // authentication Basic required
541
+ // http basic authentication required
542
+ setBasicAuthToObject(localVarRequestOptions, configuration);
543
+
544
+ // authentication Header required
545
+ await setApiKeyToObject(
546
+ localVarHeaderParameter,
547
+ "X-API-Key",
548
+ configuration,
549
+ );
550
+
551
+ localVarHeaderParameter["Content-Type"] = "application/json";
552
+
553
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
554
+ let headersFromBaseOptions =
555
+ baseOptions && baseOptions.headers ? baseOptions.headers : {};
556
+ localVarRequestOptions.headers = {
557
+ ...localVarHeaderParameter,
558
+ ...headersFromBaseOptions,
559
+ ...options.headers,
560
+ };
561
+ localVarRequestOptions.data = serializeDataIfNeeded(
562
+ teamUserParams,
563
+ localVarRequestOptions,
564
+ configuration,
565
+ );
566
+
567
+ return {
568
+ url: toPathString(localVarUrlObj),
569
+ options: localVarRequestOptions,
570
+ };
571
+ },
572
+ /**
573
+ *
574
+ * @summary Fetch a specific team
575
+ * @param {string} teamId A team identifier or slug
576
+ * @param {*} [options] Override http request option.
577
+ * @throws {RequiredError}
578
+ */
579
+ showTeam: async (
580
+ teamId: string,
581
+ options: RawAxiosRequestConfig = {},
582
+ ): Promise<RequestArgs> => {
583
+ // verify required parameter 'teamId' is not null or undefined
584
+ assertParamExists("showTeam", "teamId", teamId);
585
+ const localVarPath = `/teams/{team_id}`.replace(
586
+ `{${"team_id"}}`,
587
+ encodeURIComponent(String(teamId)),
588
+ );
589
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
590
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
591
+ let baseOptions;
592
+ if (configuration) {
593
+ baseOptions = configuration.baseOptions;
594
+ }
595
+
596
+ const localVarRequestOptions = {
597
+ method: "GET",
598
+ ...baseOptions,
599
+ ...options,
600
+ };
601
+ const localVarHeaderParameter = {} as any;
602
+ const localVarQueryParameter = {} as any;
603
+
604
+ // authentication Cookie required
605
+ await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration);
606
+
607
+ // authentication Basic required
608
+ // http basic authentication required
609
+ setBasicAuthToObject(localVarRequestOptions, configuration);
610
+
611
+ // authentication Header required
612
+ await setApiKeyToObject(
613
+ localVarHeaderParameter,
614
+ "X-API-Key",
615
+ configuration,
616
+ );
617
+
618
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
619
+ let headersFromBaseOptions =
620
+ baseOptions && baseOptions.headers ? baseOptions.headers : {};
621
+ localVarRequestOptions.headers = {
622
+ ...localVarHeaderParameter,
623
+ ...headersFromBaseOptions,
624
+ ...options.headers,
625
+ };
626
+
627
+ return {
628
+ url: toPathString(localVarUrlObj),
629
+ options: localVarRequestOptions,
630
+ };
631
+ },
632
+ /**
633
+ *
634
+ * @summary Update a specific team
635
+ * @param {string} teamId A team identifier or slug
636
+ * @param {Team} team The team data to update
637
+ * @param {*} [options] Override http request option.
638
+ * @throws {RequiredError}
639
+ */
640
+ updateTeam: async (
641
+ teamId: string,
642
+ team: Team,
643
+ options: RawAxiosRequestConfig = {},
644
+ ): Promise<RequestArgs> => {
645
+ // verify required parameter 'teamId' is not null or undefined
646
+ assertParamExists("updateTeam", "teamId", teamId);
647
+ // verify required parameter 'team' is not null or undefined
648
+ assertParamExists("updateTeam", "team", team);
649
+ const localVarPath = `/teams/{team_id}`.replace(
650
+ `{${"team_id"}}`,
651
+ encodeURIComponent(String(teamId)),
652
+ );
653
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
654
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
655
+ let baseOptions;
656
+ if (configuration) {
657
+ baseOptions = configuration.baseOptions;
658
+ }
659
+
660
+ const localVarRequestOptions = {
661
+ method: "PUT",
662
+ ...baseOptions,
663
+ ...options,
664
+ };
665
+ const localVarHeaderParameter = {} as any;
666
+ const localVarQueryParameter = {} as any;
667
+
668
+ // authentication Cookie required
669
+ await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration);
670
+
671
+ // authentication Basic required
672
+ // http basic authentication required
673
+ setBasicAuthToObject(localVarRequestOptions, configuration);
674
+
675
+ // authentication Header required
676
+ await setApiKeyToObject(
677
+ localVarHeaderParameter,
678
+ "X-API-Key",
679
+ configuration,
680
+ );
681
+
682
+ localVarHeaderParameter["Content-Type"] = "application/json";
683
+
684
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
685
+ let headersFromBaseOptions =
686
+ baseOptions && baseOptions.headers ? baseOptions.headers : {};
687
+ localVarRequestOptions.headers = {
688
+ ...localVarHeaderParameter,
689
+ ...headersFromBaseOptions,
690
+ ...options.headers,
691
+ };
692
+ localVarRequestOptions.data = serializeDataIfNeeded(
693
+ team,
694
+ localVarRequestOptions,
695
+ configuration,
696
+ );
697
+
698
+ return {
699
+ url: toPathString(localVarUrlObj),
700
+ options: localVarRequestOptions,
701
+ };
702
+ },
703
+ };
704
+ };
705
+
706
+ /**
707
+ * TeamApi - functional programming interface
708
+ * @export
709
+ */
710
+ export const TeamApiFp = function (configuration?: Configuration) {
711
+ const localVarAxiosParamCreator = TeamApiAxiosParamCreator(configuration);
712
+ return {
713
+ /**
714
+ *
715
+ * @summary Assign a user to team
716
+ * @param {string} teamId A team identifier or slug
717
+ * @param {TeamUserParams} teamUserParams The team user data to attach
718
+ * @param {*} [options] Override http request option.
719
+ * @throws {RequiredError}
720
+ */
721
+ async attachTeamToUser(
722
+ teamId: string,
723
+ teamUserParams: TeamUserParams,
724
+ options?: RawAxiosRequestConfig,
725
+ ): Promise<
726
+ (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Notification>
727
+ > {
728
+ const localVarAxiosArgs =
729
+ await localVarAxiosParamCreator.attachTeamToUser(
730
+ teamId,
731
+ teamUserParams,
732
+ options,
733
+ );
734
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
735
+ const localVarOperationServerBasePath =
736
+ operationServerMap["TeamApi.attachTeamToUser"]?.[
737
+ localVarOperationServerIndex
738
+ ]?.url;
739
+ return (axios, basePath) =>
740
+ createRequestFunction(
741
+ localVarAxiosArgs,
742
+ globalAxios,
743
+ BASE_PATH,
744
+ configuration,
745
+ )(axios, localVarOperationServerBasePath || basePath);
746
+ },
747
+ /**
748
+ *
749
+ * @summary Create a new team
750
+ * @param {Team} team The team data to create
751
+ * @param {*} [options] Override http request option.
752
+ * @throws {RequiredError}
753
+ */
754
+ async createTeam(
755
+ team: Team,
756
+ options?: RawAxiosRequestConfig,
757
+ ): Promise<
758
+ (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Team>
759
+ > {
760
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createTeam(
761
+ team,
762
+ options,
763
+ );
764
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
765
+ const localVarOperationServerBasePath =
766
+ operationServerMap["TeamApi.createTeam"]?.[localVarOperationServerIndex]
767
+ ?.url;
768
+ return (axios, basePath) =>
769
+ createRequestFunction(
770
+ localVarAxiosArgs,
771
+ globalAxios,
772
+ BASE_PATH,
773
+ configuration,
774
+ )(axios, localVarOperationServerBasePath || basePath);
775
+ },
776
+ /**
777
+ *
778
+ * @summary Delete a specific team
779
+ * @param {string} teamId A team identifier or slug
780
+ * @param {*} [options] Override http request option.
781
+ * @throws {RequiredError}
782
+ */
783
+ async deleteTeam(
784
+ teamId: string,
785
+ options?: RawAxiosRequestConfig,
786
+ ): Promise<
787
+ (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Notification>
788
+ > {
789
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteTeam(
790
+ teamId,
791
+ options,
792
+ );
793
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
794
+ const localVarOperationServerBasePath =
795
+ operationServerMap["TeamApi.deleteTeam"]?.[localVarOperationServerIndex]
796
+ ?.url;
797
+ return (axios, basePath) =>
798
+ createRequestFunction(
799
+ localVarAxiosArgs,
800
+ globalAxios,
801
+ BASE_PATH,
802
+ configuration,
803
+ )(axios, localVarOperationServerBasePath || basePath);
804
+ },
805
+ /**
806
+ *
807
+ * @summary Remove a user from team
808
+ * @param {string} teamId A team identifier or slug
809
+ * @param {TeamUserParams} teamUserParams The team user data to delete
810
+ * @param {*} [options] Override http request option.
811
+ * @throws {RequiredError}
812
+ */
813
+ async deleteTeamFromUser(
814
+ teamId: string,
815
+ teamUserParams: TeamUserParams,
816
+ options?: RawAxiosRequestConfig,
817
+ ): Promise<
818
+ (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Notification>
819
+ > {
820
+ const localVarAxiosArgs =
821
+ await localVarAxiosParamCreator.deleteTeamFromUser(
822
+ teamId,
823
+ teamUserParams,
824
+ options,
825
+ );
826
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
827
+ const localVarOperationServerBasePath =
828
+ operationServerMap["TeamApi.deleteTeamFromUser"]?.[
829
+ localVarOperationServerIndex
830
+ ]?.url;
831
+ return (axios, basePath) =>
832
+ createRequestFunction(
833
+ localVarAxiosArgs,
834
+ globalAxios,
835
+ BASE_PATH,
836
+ configuration,
837
+ )(axios, localVarOperationServerBasePath || basePath);
838
+ },
839
+ /**
840
+ *
841
+ * @summary Fetch all users assigned to team
842
+ * @param {string} teamId A team identifier or slug
843
+ * @param {string} [search] Search query
844
+ * @param {ListTeamUsersSortEnum} [sort] Sorting column
845
+ * @param {ListTeamUsersOrderEnum} [order] Sorting order
846
+ * @param {number} [limit] Paging limit
847
+ * @param {number} [offset] Paging offset
848
+ * @param {*} [options] Override http request option.
849
+ * @throws {RequiredError}
850
+ */
851
+ async listTeamUsers(
852
+ teamId: string,
853
+ search?: string,
854
+ sort?: ListTeamUsersSortEnum,
855
+ order?: ListTeamUsersOrderEnum,
856
+ limit?: number,
857
+ offset?: number,
858
+ options?: RawAxiosRequestConfig,
859
+ ): Promise<
860
+ (axios?: AxiosInstance, basePath?: string) => AxiosPromise<TeamUsers>
861
+ > {
862
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listTeamUsers(
863
+ teamId,
864
+ search,
865
+ sort,
866
+ order,
867
+ limit,
868
+ offset,
869
+ options,
870
+ );
871
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
872
+ const localVarOperationServerBasePath =
873
+ operationServerMap["TeamApi.listTeamUsers"]?.[
874
+ localVarOperationServerIndex
875
+ ]?.url;
876
+ return (axios, basePath) =>
877
+ createRequestFunction(
878
+ localVarAxiosArgs,
879
+ globalAxios,
880
+ BASE_PATH,
881
+ configuration,
882
+ )(axios, localVarOperationServerBasePath || basePath);
883
+ },
884
+ /**
885
+ *
886
+ * @summary Fetch all available teams
887
+ * @param {string} [search] Search query
888
+ * @param {ListTeamsSortEnum} [sort] Sorting column
889
+ * @param {ListTeamsOrderEnum} [order] Sorting order
890
+ * @param {number} [limit] Paging limit
891
+ * @param {number} [offset] Paging offset
892
+ * @param {*} [options] Override http request option.
893
+ * @throws {RequiredError}
894
+ */
895
+ async listTeams(
896
+ search?: string,
897
+ sort?: ListTeamsSortEnum,
898
+ order?: ListTeamsOrderEnum,
899
+ limit?: number,
900
+ offset?: number,
901
+ options?: RawAxiosRequestConfig,
902
+ ): Promise<
903
+ (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Teams>
904
+ > {
905
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listTeams(
906
+ search,
907
+ sort,
908
+ order,
909
+ limit,
910
+ offset,
911
+ options,
912
+ );
913
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
914
+ const localVarOperationServerBasePath =
915
+ operationServerMap["TeamApi.listTeams"]?.[localVarOperationServerIndex]
916
+ ?.url;
917
+ return (axios, basePath) =>
918
+ createRequestFunction(
919
+ localVarAxiosArgs,
920
+ globalAxios,
921
+ BASE_PATH,
922
+ configuration,
923
+ )(axios, localVarOperationServerBasePath || basePath);
924
+ },
925
+ /**
926
+ *
927
+ * @summary Update user perms for team
928
+ * @param {string} teamId A team identifier or slug
929
+ * @param {TeamUserParams} teamUserParams The team user data to update
930
+ * @param {*} [options] Override http request option.
931
+ * @throws {RequiredError}
932
+ */
933
+ async permitTeamUser(
934
+ teamId: string,
935
+ teamUserParams: TeamUserParams,
936
+ options?: RawAxiosRequestConfig,
937
+ ): Promise<
938
+ (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Notification>
939
+ > {
940
+ const localVarAxiosArgs = await localVarAxiosParamCreator.permitTeamUser(
941
+ teamId,
942
+ teamUserParams,
943
+ options,
944
+ );
945
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
946
+ const localVarOperationServerBasePath =
947
+ operationServerMap["TeamApi.permitTeamUser"]?.[
948
+ localVarOperationServerIndex
949
+ ]?.url;
950
+ return (axios, basePath) =>
951
+ createRequestFunction(
952
+ localVarAxiosArgs,
953
+ globalAxios,
954
+ BASE_PATH,
955
+ configuration,
956
+ )(axios, localVarOperationServerBasePath || basePath);
957
+ },
958
+ /**
959
+ *
960
+ * @summary Fetch a specific team
961
+ * @param {string} teamId A team identifier or slug
962
+ * @param {*} [options] Override http request option.
963
+ * @throws {RequiredError}
964
+ */
965
+ async showTeam(
966
+ teamId: string,
967
+ options?: RawAxiosRequestConfig,
968
+ ): Promise<
969
+ (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Team>
970
+ > {
971
+ const localVarAxiosArgs = await localVarAxiosParamCreator.showTeam(
972
+ teamId,
973
+ options,
974
+ );
975
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
976
+ const localVarOperationServerBasePath =
977
+ operationServerMap["TeamApi.showTeam"]?.[localVarOperationServerIndex]
978
+ ?.url;
979
+ return (axios, basePath) =>
980
+ createRequestFunction(
981
+ localVarAxiosArgs,
982
+ globalAxios,
983
+ BASE_PATH,
984
+ configuration,
985
+ )(axios, localVarOperationServerBasePath || basePath);
986
+ },
987
+ /**
988
+ *
989
+ * @summary Update a specific team
990
+ * @param {string} teamId A team identifier or slug
991
+ * @param {Team} team The team data to update
992
+ * @param {*} [options] Override http request option.
993
+ * @throws {RequiredError}
994
+ */
995
+ async updateTeam(
996
+ teamId: string,
997
+ team: Team,
998
+ options?: RawAxiosRequestConfig,
999
+ ): Promise<
1000
+ (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Team>
1001
+ > {
1002
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateTeam(
1003
+ teamId,
1004
+ team,
1005
+ options,
1006
+ );
1007
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1008
+ const localVarOperationServerBasePath =
1009
+ operationServerMap["TeamApi.updateTeam"]?.[localVarOperationServerIndex]
1010
+ ?.url;
1011
+ return (axios, basePath) =>
1012
+ createRequestFunction(
1013
+ localVarAxiosArgs,
1014
+ globalAxios,
1015
+ BASE_PATH,
1016
+ configuration,
1017
+ )(axios, localVarOperationServerBasePath || basePath);
1018
+ },
1019
+ };
1020
+ };
1021
+
1022
+ /**
1023
+ * TeamApi - factory interface
1024
+ * @export
1025
+ */
1026
+ export const TeamApiFactory = function (
1027
+ configuration?: Configuration,
1028
+ basePath?: string,
1029
+ axios?: AxiosInstance,
1030
+ ) {
1031
+ const localVarFp = TeamApiFp(configuration);
1032
+ return {
1033
+ /**
1034
+ *
1035
+ * @summary Assign a user to team
1036
+ * @param {TeamApiAttachTeamToUserRequest} requestParameters Request parameters.
1037
+ * @param {*} [options] Override http request option.
1038
+ * @throws {RequiredError}
1039
+ */
1040
+ attachTeamToUser(
1041
+ requestParameters: TeamApiAttachTeamToUserRequest,
1042
+ options?: RawAxiosRequestConfig,
1043
+ ): AxiosPromise<Notification> {
1044
+ return localVarFp
1045
+ .attachTeamToUser(
1046
+ requestParameters.teamId,
1047
+ requestParameters.teamUserParams,
1048
+ options,
1049
+ )
1050
+ .then((request) => request(axios, basePath));
1051
+ },
1052
+ /**
1053
+ *
1054
+ * @summary Create a new team
1055
+ * @param {TeamApiCreateTeamRequest} requestParameters Request parameters.
1056
+ * @param {*} [options] Override http request option.
1057
+ * @throws {RequiredError}
1058
+ */
1059
+ createTeam(
1060
+ requestParameters: TeamApiCreateTeamRequest,
1061
+ options?: RawAxiosRequestConfig,
1062
+ ): AxiosPromise<Team> {
1063
+ return localVarFp
1064
+ .createTeam(requestParameters.team, options)
1065
+ .then((request) => request(axios, basePath));
1066
+ },
1067
+ /**
1068
+ *
1069
+ * @summary Delete a specific team
1070
+ * @param {TeamApiDeleteTeamRequest} requestParameters Request parameters.
1071
+ * @param {*} [options] Override http request option.
1072
+ * @throws {RequiredError}
1073
+ */
1074
+ deleteTeam(
1075
+ requestParameters: TeamApiDeleteTeamRequest,
1076
+ options?: RawAxiosRequestConfig,
1077
+ ): AxiosPromise<Notification> {
1078
+ return localVarFp
1079
+ .deleteTeam(requestParameters.teamId, options)
1080
+ .then((request) => request(axios, basePath));
1081
+ },
1082
+ /**
1083
+ *
1084
+ * @summary Remove a user from team
1085
+ * @param {TeamApiDeleteTeamFromUserRequest} requestParameters Request parameters.
1086
+ * @param {*} [options] Override http request option.
1087
+ * @throws {RequiredError}
1088
+ */
1089
+ deleteTeamFromUser(
1090
+ requestParameters: TeamApiDeleteTeamFromUserRequest,
1091
+ options?: RawAxiosRequestConfig,
1092
+ ): AxiosPromise<Notification> {
1093
+ return localVarFp
1094
+ .deleteTeamFromUser(
1095
+ requestParameters.teamId,
1096
+ requestParameters.teamUserParams,
1097
+ options,
1098
+ )
1099
+ .then((request) => request(axios, basePath));
1100
+ },
1101
+ /**
1102
+ *
1103
+ * @summary Fetch all users assigned to team
1104
+ * @param {TeamApiListTeamUsersRequest} requestParameters Request parameters.
1105
+ * @param {*} [options] Override http request option.
1106
+ * @throws {RequiredError}
1107
+ */
1108
+ listTeamUsers(
1109
+ requestParameters: TeamApiListTeamUsersRequest,
1110
+ options?: RawAxiosRequestConfig,
1111
+ ): AxiosPromise<TeamUsers> {
1112
+ return localVarFp
1113
+ .listTeamUsers(
1114
+ requestParameters.teamId,
1115
+ requestParameters.search,
1116
+ requestParameters.sort,
1117
+ requestParameters.order,
1118
+ requestParameters.limit,
1119
+ requestParameters.offset,
1120
+ options,
1121
+ )
1122
+ .then((request) => request(axios, basePath));
1123
+ },
1124
+ /**
1125
+ *
1126
+ * @summary Fetch all available teams
1127
+ * @param {TeamApiListTeamsRequest} requestParameters Request parameters.
1128
+ * @param {*} [options] Override http request option.
1129
+ * @throws {RequiredError}
1130
+ */
1131
+ listTeams(
1132
+ requestParameters: TeamApiListTeamsRequest = {},
1133
+ options?: RawAxiosRequestConfig,
1134
+ ): AxiosPromise<Teams> {
1135
+ return localVarFp
1136
+ .listTeams(
1137
+ requestParameters.search,
1138
+ requestParameters.sort,
1139
+ requestParameters.order,
1140
+ requestParameters.limit,
1141
+ requestParameters.offset,
1142
+ options,
1143
+ )
1144
+ .then((request) => request(axios, basePath));
1145
+ },
1146
+ /**
1147
+ *
1148
+ * @summary Update user perms for team
1149
+ * @param {TeamApiPermitTeamUserRequest} requestParameters Request parameters.
1150
+ * @param {*} [options] Override http request option.
1151
+ * @throws {RequiredError}
1152
+ */
1153
+ permitTeamUser(
1154
+ requestParameters: TeamApiPermitTeamUserRequest,
1155
+ options?: RawAxiosRequestConfig,
1156
+ ): AxiosPromise<Notification> {
1157
+ return localVarFp
1158
+ .permitTeamUser(
1159
+ requestParameters.teamId,
1160
+ requestParameters.teamUserParams,
1161
+ options,
1162
+ )
1163
+ .then((request) => request(axios, basePath));
1164
+ },
1165
+ /**
1166
+ *
1167
+ * @summary Fetch a specific team
1168
+ * @param {TeamApiShowTeamRequest} requestParameters Request parameters.
1169
+ * @param {*} [options] Override http request option.
1170
+ * @throws {RequiredError}
1171
+ */
1172
+ showTeam(
1173
+ requestParameters: TeamApiShowTeamRequest,
1174
+ options?: RawAxiosRequestConfig,
1175
+ ): AxiosPromise<Team> {
1176
+ return localVarFp
1177
+ .showTeam(requestParameters.teamId, options)
1178
+ .then((request) => request(axios, basePath));
1179
+ },
1180
+ /**
1181
+ *
1182
+ * @summary Update a specific team
1183
+ * @param {TeamApiUpdateTeamRequest} requestParameters Request parameters.
1184
+ * @param {*} [options] Override http request option.
1185
+ * @throws {RequiredError}
1186
+ */
1187
+ updateTeam(
1188
+ requestParameters: TeamApiUpdateTeamRequest,
1189
+ options?: RawAxiosRequestConfig,
1190
+ ): AxiosPromise<Team> {
1191
+ return localVarFp
1192
+ .updateTeam(requestParameters.teamId, requestParameters.team, options)
1193
+ .then((request) => request(axios, basePath));
1194
+ },
1195
+ };
1196
+ };
1197
+
1198
+ /**
1199
+ * Request parameters for attachTeamToUser operation in TeamApi.
1200
+ * @export
1201
+ * @interface TeamApiAttachTeamToUserRequest
1202
+ */
1203
+ export interface TeamApiAttachTeamToUserRequest {
1204
+ /**
1205
+ * A team identifier or slug
1206
+ * @type {string}
1207
+ * @memberof TeamApiAttachTeamToUser
1208
+ */
1209
+ readonly teamId: string;
1210
+
1211
+ /**
1212
+ * The team user data to attach
1213
+ * @type {TeamUserParams}
1214
+ * @memberof TeamApiAttachTeamToUser
1215
+ */
1216
+ readonly teamUserParams: TeamUserParams;
1217
+ }
1218
+
1219
+ /**
1220
+ * Request parameters for createTeam operation in TeamApi.
1221
+ * @export
1222
+ * @interface TeamApiCreateTeamRequest
1223
+ */
1224
+ export interface TeamApiCreateTeamRequest {
1225
+ /**
1226
+ * The team data to create
1227
+ * @type {Team}
1228
+ * @memberof TeamApiCreateTeam
1229
+ */
1230
+ readonly team: Team;
1231
+ }
1232
+
1233
+ /**
1234
+ * Request parameters for deleteTeam operation in TeamApi.
1235
+ * @export
1236
+ * @interface TeamApiDeleteTeamRequest
1237
+ */
1238
+ export interface TeamApiDeleteTeamRequest {
1239
+ /**
1240
+ * A team identifier or slug
1241
+ * @type {string}
1242
+ * @memberof TeamApiDeleteTeam
1243
+ */
1244
+ readonly teamId: string;
1245
+ }
1246
+
1247
+ /**
1248
+ * Request parameters for deleteTeamFromUser operation in TeamApi.
1249
+ * @export
1250
+ * @interface TeamApiDeleteTeamFromUserRequest
1251
+ */
1252
+ export interface TeamApiDeleteTeamFromUserRequest {
1253
+ /**
1254
+ * A team identifier or slug
1255
+ * @type {string}
1256
+ * @memberof TeamApiDeleteTeamFromUser
1257
+ */
1258
+ readonly teamId: string;
1259
+
1260
+ /**
1261
+ * The team user data to delete
1262
+ * @type {TeamUserParams}
1263
+ * @memberof TeamApiDeleteTeamFromUser
1264
+ */
1265
+ readonly teamUserParams: TeamUserParams;
1266
+ }
1267
+
1268
+ /**
1269
+ * Request parameters for listTeamUsers operation in TeamApi.
1270
+ * @export
1271
+ * @interface TeamApiListTeamUsersRequest
1272
+ */
1273
+ export interface TeamApiListTeamUsersRequest {
1274
+ /**
1275
+ * A team identifier or slug
1276
+ * @type {string}
1277
+ * @memberof TeamApiListTeamUsers
1278
+ */
1279
+ readonly teamId: string;
1280
+
1281
+ /**
1282
+ * Search query
1283
+ * @type {string}
1284
+ * @memberof TeamApiListTeamUsers
1285
+ */
1286
+ readonly search?: string;
1287
+
1288
+ /**
1289
+ * Sorting column
1290
+ * @type {'username' | 'email' | 'fullname' | 'admin' | 'active'}
1291
+ * @memberof TeamApiListTeamUsers
1292
+ */
1293
+ readonly sort?: ListTeamUsersSortEnum;
1294
+
1295
+ /**
1296
+ * Sorting order
1297
+ * @type {'asc' | 'desc'}
1298
+ * @memberof TeamApiListTeamUsers
1299
+ */
1300
+ readonly order?: ListTeamUsersOrderEnum;
1301
+
1302
+ /**
1303
+ * Paging limit
1304
+ * @type {number}
1305
+ * @memberof TeamApiListTeamUsers
1306
+ */
1307
+ readonly limit?: number;
1308
+
1309
+ /**
1310
+ * Paging offset
1311
+ * @type {number}
1312
+ * @memberof TeamApiListTeamUsers
1313
+ */
1314
+ readonly offset?: number;
1315
+ }
1316
+
1317
+ /**
1318
+ * Request parameters for listTeams operation in TeamApi.
1319
+ * @export
1320
+ * @interface TeamApiListTeamsRequest
1321
+ */
1322
+ export interface TeamApiListTeamsRequest {
1323
+ /**
1324
+ * Search query
1325
+ * @type {string}
1326
+ * @memberof TeamApiListTeams
1327
+ */
1328
+ readonly search?: string;
1329
+
1330
+ /**
1331
+ * Sorting column
1332
+ * @type {'slug' | 'name'}
1333
+ * @memberof TeamApiListTeams
1334
+ */
1335
+ readonly sort?: ListTeamsSortEnum;
1336
+
1337
+ /**
1338
+ * Sorting order
1339
+ * @type {'asc' | 'desc'}
1340
+ * @memberof TeamApiListTeams
1341
+ */
1342
+ readonly order?: ListTeamsOrderEnum;
1343
+
1344
+ /**
1345
+ * Paging limit
1346
+ * @type {number}
1347
+ * @memberof TeamApiListTeams
1348
+ */
1349
+ readonly limit?: number;
1350
+
1351
+ /**
1352
+ * Paging offset
1353
+ * @type {number}
1354
+ * @memberof TeamApiListTeams
1355
+ */
1356
+ readonly offset?: number;
1357
+ }
1358
+
1359
+ /**
1360
+ * Request parameters for permitTeamUser operation in TeamApi.
1361
+ * @export
1362
+ * @interface TeamApiPermitTeamUserRequest
1363
+ */
1364
+ export interface TeamApiPermitTeamUserRequest {
1365
+ /**
1366
+ * A team identifier or slug
1367
+ * @type {string}
1368
+ * @memberof TeamApiPermitTeamUser
1369
+ */
1370
+ readonly teamId: string;
1371
+
1372
+ /**
1373
+ * The team user data to update
1374
+ * @type {TeamUserParams}
1375
+ * @memberof TeamApiPermitTeamUser
1376
+ */
1377
+ readonly teamUserParams: TeamUserParams;
1378
+ }
1379
+
1380
+ /**
1381
+ * Request parameters for showTeam operation in TeamApi.
1382
+ * @export
1383
+ * @interface TeamApiShowTeamRequest
1384
+ */
1385
+ export interface TeamApiShowTeamRequest {
1386
+ /**
1387
+ * A team identifier or slug
1388
+ * @type {string}
1389
+ * @memberof TeamApiShowTeam
1390
+ */
1391
+ readonly teamId: string;
1392
+ }
1393
+
1394
+ /**
1395
+ * Request parameters for updateTeam operation in TeamApi.
1396
+ * @export
1397
+ * @interface TeamApiUpdateTeamRequest
1398
+ */
1399
+ export interface TeamApiUpdateTeamRequest {
1400
+ /**
1401
+ * A team identifier or slug
1402
+ * @type {string}
1403
+ * @memberof TeamApiUpdateTeam
1404
+ */
1405
+ readonly teamId: string;
1406
+
1407
+ /**
1408
+ * The team data to update
1409
+ * @type {Team}
1410
+ * @memberof TeamApiUpdateTeam
1411
+ */
1412
+ readonly team: Team;
1413
+ }
1414
+
1415
+ /**
1416
+ * TeamApi - object-oriented interface
1417
+ * @export
1418
+ * @class TeamApi
1419
+ * @extends {BaseAPI}
1420
+ */
1421
+ export class TeamApi extends BaseAPI {
1422
+ /**
1423
+ *
1424
+ * @summary Assign a user to team
1425
+ * @param {TeamApiAttachTeamToUserRequest} requestParameters Request parameters.
1426
+ * @param {*} [options] Override http request option.
1427
+ * @throws {RequiredError}
1428
+ * @memberof TeamApi
1429
+ */
1430
+ public attachTeamToUser(
1431
+ requestParameters: TeamApiAttachTeamToUserRequest,
1432
+ options?: RawAxiosRequestConfig,
1433
+ ) {
1434
+ return TeamApiFp(this.configuration)
1435
+ .attachTeamToUser(
1436
+ requestParameters.teamId,
1437
+ requestParameters.teamUserParams,
1438
+ options,
1439
+ )
1440
+ .then((request) => request(this.axios, this.basePath));
1441
+ }
1442
+
1443
+ /**
1444
+ *
1445
+ * @summary Create a new team
1446
+ * @param {TeamApiCreateTeamRequest} requestParameters Request parameters.
1447
+ * @param {*} [options] Override http request option.
1448
+ * @throws {RequiredError}
1449
+ * @memberof TeamApi
1450
+ */
1451
+ public createTeam(
1452
+ requestParameters: TeamApiCreateTeamRequest,
1453
+ options?: RawAxiosRequestConfig,
1454
+ ) {
1455
+ return TeamApiFp(this.configuration)
1456
+ .createTeam(requestParameters.team, options)
1457
+ .then((request) => request(this.axios, this.basePath));
1458
+ }
1459
+
1460
+ /**
1461
+ *
1462
+ * @summary Delete a specific team
1463
+ * @param {TeamApiDeleteTeamRequest} requestParameters Request parameters.
1464
+ * @param {*} [options] Override http request option.
1465
+ * @throws {RequiredError}
1466
+ * @memberof TeamApi
1467
+ */
1468
+ public deleteTeam(
1469
+ requestParameters: TeamApiDeleteTeamRequest,
1470
+ options?: RawAxiosRequestConfig,
1471
+ ) {
1472
+ return TeamApiFp(this.configuration)
1473
+ .deleteTeam(requestParameters.teamId, options)
1474
+ .then((request) => request(this.axios, this.basePath));
1475
+ }
1476
+
1477
+ /**
1478
+ *
1479
+ * @summary Remove a user from team
1480
+ * @param {TeamApiDeleteTeamFromUserRequest} requestParameters Request parameters.
1481
+ * @param {*} [options] Override http request option.
1482
+ * @throws {RequiredError}
1483
+ * @memberof TeamApi
1484
+ */
1485
+ public deleteTeamFromUser(
1486
+ requestParameters: TeamApiDeleteTeamFromUserRequest,
1487
+ options?: RawAxiosRequestConfig,
1488
+ ) {
1489
+ return TeamApiFp(this.configuration)
1490
+ .deleteTeamFromUser(
1491
+ requestParameters.teamId,
1492
+ requestParameters.teamUserParams,
1493
+ options,
1494
+ )
1495
+ .then((request) => request(this.axios, this.basePath));
1496
+ }
1497
+
1498
+ /**
1499
+ *
1500
+ * @summary Fetch all users assigned to team
1501
+ * @param {TeamApiListTeamUsersRequest} requestParameters Request parameters.
1502
+ * @param {*} [options] Override http request option.
1503
+ * @throws {RequiredError}
1504
+ * @memberof TeamApi
1505
+ */
1506
+ public listTeamUsers(
1507
+ requestParameters: TeamApiListTeamUsersRequest,
1508
+ options?: RawAxiosRequestConfig,
1509
+ ) {
1510
+ return TeamApiFp(this.configuration)
1511
+ .listTeamUsers(
1512
+ requestParameters.teamId,
1513
+ requestParameters.search,
1514
+ requestParameters.sort,
1515
+ requestParameters.order,
1516
+ requestParameters.limit,
1517
+ requestParameters.offset,
1518
+ options,
1519
+ )
1520
+ .then((request) => request(this.axios, this.basePath));
1521
+ }
1522
+
1523
+ /**
1524
+ *
1525
+ * @summary Fetch all available teams
1526
+ * @param {TeamApiListTeamsRequest} requestParameters Request parameters.
1527
+ * @param {*} [options] Override http request option.
1528
+ * @throws {RequiredError}
1529
+ * @memberof TeamApi
1530
+ */
1531
+ public listTeams(
1532
+ requestParameters: TeamApiListTeamsRequest = {},
1533
+ options?: RawAxiosRequestConfig,
1534
+ ) {
1535
+ return TeamApiFp(this.configuration)
1536
+ .listTeams(
1537
+ requestParameters.search,
1538
+ requestParameters.sort,
1539
+ requestParameters.order,
1540
+ requestParameters.limit,
1541
+ requestParameters.offset,
1542
+ options,
1543
+ )
1544
+ .then((request) => request(this.axios, this.basePath));
1545
+ }
1546
+
1547
+ /**
1548
+ *
1549
+ * @summary Update user perms for team
1550
+ * @param {TeamApiPermitTeamUserRequest} requestParameters Request parameters.
1551
+ * @param {*} [options] Override http request option.
1552
+ * @throws {RequiredError}
1553
+ * @memberof TeamApi
1554
+ */
1555
+ public permitTeamUser(
1556
+ requestParameters: TeamApiPermitTeamUserRequest,
1557
+ options?: RawAxiosRequestConfig,
1558
+ ) {
1559
+ return TeamApiFp(this.configuration)
1560
+ .permitTeamUser(
1561
+ requestParameters.teamId,
1562
+ requestParameters.teamUserParams,
1563
+ options,
1564
+ )
1565
+ .then((request) => request(this.axios, this.basePath));
1566
+ }
1567
+
1568
+ /**
1569
+ *
1570
+ * @summary Fetch a specific team
1571
+ * @param {TeamApiShowTeamRequest} requestParameters Request parameters.
1572
+ * @param {*} [options] Override http request option.
1573
+ * @throws {RequiredError}
1574
+ * @memberof TeamApi
1575
+ */
1576
+ public showTeam(
1577
+ requestParameters: TeamApiShowTeamRequest,
1578
+ options?: RawAxiosRequestConfig,
1579
+ ) {
1580
+ return TeamApiFp(this.configuration)
1581
+ .showTeam(requestParameters.teamId, options)
1582
+ .then((request) => request(this.axios, this.basePath));
1583
+ }
1584
+
1585
+ /**
1586
+ *
1587
+ * @summary Update a specific team
1588
+ * @param {TeamApiUpdateTeamRequest} requestParameters Request parameters.
1589
+ * @param {*} [options] Override http request option.
1590
+ * @throws {RequiredError}
1591
+ * @memberof TeamApi
1592
+ */
1593
+ public updateTeam(
1594
+ requestParameters: TeamApiUpdateTeamRequest,
1595
+ options?: RawAxiosRequestConfig,
1596
+ ) {
1597
+ return TeamApiFp(this.configuration)
1598
+ .updateTeam(requestParameters.teamId, requestParameters.team, options)
1599
+ .then((request) => request(this.axios, this.basePath));
1600
+ }
1601
+ }
1602
+
1603
+ /**
1604
+ * @export
1605
+ */
1606
+ export const ListTeamUsersSortEnum = {
1607
+ Username: "username",
1608
+ Email: "email",
1609
+ Fullname: "fullname",
1610
+ Admin: "admin",
1611
+ Active: "active",
1612
+ } as const;
1613
+ export type ListTeamUsersSortEnum =
1614
+ (typeof ListTeamUsersSortEnum)[keyof typeof ListTeamUsersSortEnum];
1615
+ /**
1616
+ * @export
1617
+ */
1618
+ export const ListTeamUsersOrderEnum = {
1619
+ Asc: "asc",
1620
+ Desc: "desc",
1621
+ } as const;
1622
+ export type ListTeamUsersOrderEnum =
1623
+ (typeof ListTeamUsersOrderEnum)[keyof typeof ListTeamUsersOrderEnum];
1624
+ /**
1625
+ * @export
1626
+ */
1627
+ export const ListTeamsSortEnum = {
1628
+ Slug: "slug",
1629
+ Name: "name",
1630
+ } as const;
1631
+ export type ListTeamsSortEnum =
1632
+ (typeof ListTeamsSortEnum)[keyof typeof ListTeamsSortEnum];
1633
+ /**
1634
+ * @export
1635
+ */
1636
+ export const ListTeamsOrderEnum = {
1637
+ Asc: "asc",
1638
+ Desc: "desc",
1639
+ } as const;
1640
+ export type ListTeamsOrderEnum =
1641
+ (typeof ListTeamsOrderEnum)[keyof typeof ListTeamsOrderEnum];