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 { User } from "../model";
48
+ // @ts-ignore
49
+ import type { UserTeamParams } from "../model";
50
+ // @ts-ignore
51
+ import type { UserTeams } from "../model";
52
+ // @ts-ignore
53
+ import type { Users } from "../model";
54
+ /**
55
+ * UserApi - axios parameter creator
56
+ * @export
57
+ */
58
+ export const UserApiAxiosParamCreator = function (
59
+ configuration?: Configuration,
60
+ ) {
61
+ return {
62
+ /**
63
+ *
64
+ * @summary Assign a team to user
65
+ * @param {string} userId A user identifier or slug
66
+ * @param {UserTeamParams} userTeamParams The user team data to attach
67
+ * @param {*} [options] Override http request option.
68
+ * @throws {RequiredError}
69
+ */
70
+ attachUserToTeam: async (
71
+ userId: string,
72
+ userTeamParams: UserTeamParams,
73
+ options: RawAxiosRequestConfig = {},
74
+ ): Promise<RequestArgs> => {
75
+ // verify required parameter 'userId' is not null or undefined
76
+ assertParamExists("attachUserToTeam", "userId", userId);
77
+ // verify required parameter 'userTeamParams' is not null or undefined
78
+ assertParamExists("attachUserToTeam", "userTeamParams", userTeamParams);
79
+ const localVarPath = `/users/{user_id}/teams`.replace(
80
+ `{${"user_id"}}`,
81
+ encodeURIComponent(String(userId)),
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
+ userTeamParams,
124
+ localVarRequestOptions,
125
+ configuration,
126
+ );
127
+
128
+ return {
129
+ url: toPathString(localVarUrlObj),
130
+ options: localVarRequestOptions,
131
+ };
132
+ },
133
+ /**
134
+ *
135
+ * @summary Create a new user
136
+ * @param {User} user The user data to create
137
+ * @param {*} [options] Override http request option.
138
+ * @throws {RequiredError}
139
+ */
140
+ createUser: async (
141
+ user: User,
142
+ options: RawAxiosRequestConfig = {},
143
+ ): Promise<RequestArgs> => {
144
+ // verify required parameter 'user' is not null or undefined
145
+ assertParamExists("createUser", "user", user);
146
+ const localVarPath = `/users`;
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
+ user,
188
+ localVarRequestOptions,
189
+ configuration,
190
+ );
191
+
192
+ return {
193
+ url: toPathString(localVarUrlObj),
194
+ options: localVarRequestOptions,
195
+ };
196
+ },
197
+ /**
198
+ *
199
+ * @summary Delete a specific user
200
+ * @param {string} userId A user identifier or slug
201
+ * @param {*} [options] Override http request option.
202
+ * @throws {RequiredError}
203
+ */
204
+ deleteUser: async (
205
+ userId: string,
206
+ options: RawAxiosRequestConfig = {},
207
+ ): Promise<RequestArgs> => {
208
+ // verify required parameter 'userId' is not null or undefined
209
+ assertParamExists("deleteUser", "userId", userId);
210
+ const localVarPath = `/users/{user_id}`.replace(
211
+ `{${"user_id"}}`,
212
+ encodeURIComponent(String(userId)),
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 team from user
260
+ * @param {string} userId A user identifier or slug
261
+ * @param {UserTeamParams} userTeamParams The user team data to delete
262
+ * @param {*} [options] Override http request option.
263
+ * @throws {RequiredError}
264
+ */
265
+ deleteUserFromTeam: async (
266
+ userId: string,
267
+ userTeamParams: UserTeamParams,
268
+ options: RawAxiosRequestConfig = {},
269
+ ): Promise<RequestArgs> => {
270
+ // verify required parameter 'userId' is not null or undefined
271
+ assertParamExists("deleteUserFromTeam", "userId", userId);
272
+ // verify required parameter 'userTeamParams' is not null or undefined
273
+ assertParamExists("deleteUserFromTeam", "userTeamParams", userTeamParams);
274
+ const localVarPath = `/users/{user_id}/teams`.replace(
275
+ `{${"user_id"}}`,
276
+ encodeURIComponent(String(userId)),
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
+ userTeamParams,
319
+ localVarRequestOptions,
320
+ configuration,
321
+ );
322
+
323
+ return {
324
+ url: toPathString(localVarUrlObj),
325
+ options: localVarRequestOptions,
326
+ };
327
+ },
328
+ /**
329
+ *
330
+ * @summary Fetch all teams assigned to user
331
+ * @param {string} userId A user identifier or slug
332
+ * @param {string} [search] Search query
333
+ * @param {ListUserTeamsSortEnum} [sort] Sorting column
334
+ * @param {ListUserTeamsOrderEnum} [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
+ listUserTeams: async (
341
+ userId: string,
342
+ search?: string,
343
+ sort?: ListUserTeamsSortEnum,
344
+ order?: ListUserTeamsOrderEnum,
345
+ limit?: number,
346
+ offset?: number,
347
+ options: RawAxiosRequestConfig = {},
348
+ ): Promise<RequestArgs> => {
349
+ // verify required parameter 'userId' is not null or undefined
350
+ assertParamExists("listUserTeams", "userId", userId);
351
+ const localVarPath = `/users/{user_id}/teams`.replace(
352
+ `{${"user_id"}}`,
353
+ encodeURIComponent(String(userId)),
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 users
421
+ * @param {string} [search] Search query
422
+ * @param {ListUsersSortEnum} [sort] Sorting column
423
+ * @param {ListUsersOrderEnum} [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
+ listUsers: async (
430
+ search?: string,
431
+ sort?: ListUsersSortEnum,
432
+ order?: ListUsersOrderEnum,
433
+ limit?: number,
434
+ offset?: number,
435
+ options: RawAxiosRequestConfig = {},
436
+ ): Promise<RequestArgs> => {
437
+ const localVarPath = `/users`;
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 team perms for user
504
+ * @param {string} userId A user identifier or slug
505
+ * @param {UserTeamParams} userTeamParams The user team data to update
506
+ * @param {*} [options] Override http request option.
507
+ * @throws {RequiredError}
508
+ */
509
+ permitUserTeam: async (
510
+ userId: string,
511
+ userTeamParams: UserTeamParams,
512
+ options: RawAxiosRequestConfig = {},
513
+ ): Promise<RequestArgs> => {
514
+ // verify required parameter 'userId' is not null or undefined
515
+ assertParamExists("permitUserTeam", "userId", userId);
516
+ // verify required parameter 'userTeamParams' is not null or undefined
517
+ assertParamExists("permitUserTeam", "userTeamParams", userTeamParams);
518
+ const localVarPath = `/users/{user_id}/teams`.replace(
519
+ `{${"user_id"}}`,
520
+ encodeURIComponent(String(userId)),
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
+ userTeamParams,
563
+ localVarRequestOptions,
564
+ configuration,
565
+ );
566
+
567
+ return {
568
+ url: toPathString(localVarUrlObj),
569
+ options: localVarRequestOptions,
570
+ };
571
+ },
572
+ /**
573
+ *
574
+ * @summary Fetch a specific user
575
+ * @param {string} userId A user identifier or slug
576
+ * @param {*} [options] Override http request option.
577
+ * @throws {RequiredError}
578
+ */
579
+ showUser: async (
580
+ userId: string,
581
+ options: RawAxiosRequestConfig = {},
582
+ ): Promise<RequestArgs> => {
583
+ // verify required parameter 'userId' is not null or undefined
584
+ assertParamExists("showUser", "userId", userId);
585
+ const localVarPath = `/users/{user_id}`.replace(
586
+ `{${"user_id"}}`,
587
+ encodeURIComponent(String(userId)),
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 user
635
+ * @param {string} userId A user identifier or slug
636
+ * @param {User} user The user data to update
637
+ * @param {*} [options] Override http request option.
638
+ * @throws {RequiredError}
639
+ */
640
+ updateUser: async (
641
+ userId: string,
642
+ user: User,
643
+ options: RawAxiosRequestConfig = {},
644
+ ): Promise<RequestArgs> => {
645
+ // verify required parameter 'userId' is not null or undefined
646
+ assertParamExists("updateUser", "userId", userId);
647
+ // verify required parameter 'user' is not null or undefined
648
+ assertParamExists("updateUser", "user", user);
649
+ const localVarPath = `/users/{user_id}`.replace(
650
+ `{${"user_id"}}`,
651
+ encodeURIComponent(String(userId)),
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
+ user,
694
+ localVarRequestOptions,
695
+ configuration,
696
+ );
697
+
698
+ return {
699
+ url: toPathString(localVarUrlObj),
700
+ options: localVarRequestOptions,
701
+ };
702
+ },
703
+ };
704
+ };
705
+
706
+ /**
707
+ * UserApi - functional programming interface
708
+ * @export
709
+ */
710
+ export const UserApiFp = function (configuration?: Configuration) {
711
+ const localVarAxiosParamCreator = UserApiAxiosParamCreator(configuration);
712
+ return {
713
+ /**
714
+ *
715
+ * @summary Assign a team to user
716
+ * @param {string} userId A user identifier or slug
717
+ * @param {UserTeamParams} userTeamParams The user team data to attach
718
+ * @param {*} [options] Override http request option.
719
+ * @throws {RequiredError}
720
+ */
721
+ async attachUserToTeam(
722
+ userId: string,
723
+ userTeamParams: UserTeamParams,
724
+ options?: RawAxiosRequestConfig,
725
+ ): Promise<
726
+ (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Notification>
727
+ > {
728
+ const localVarAxiosArgs =
729
+ await localVarAxiosParamCreator.attachUserToTeam(
730
+ userId,
731
+ userTeamParams,
732
+ options,
733
+ );
734
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
735
+ const localVarOperationServerBasePath =
736
+ operationServerMap["UserApi.attachUserToTeam"]?.[
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 user
750
+ * @param {User} user The user data to create
751
+ * @param {*} [options] Override http request option.
752
+ * @throws {RequiredError}
753
+ */
754
+ async createUser(
755
+ user: User,
756
+ options?: RawAxiosRequestConfig,
757
+ ): Promise<
758
+ (axios?: AxiosInstance, basePath?: string) => AxiosPromise<User>
759
+ > {
760
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createUser(
761
+ user,
762
+ options,
763
+ );
764
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
765
+ const localVarOperationServerBasePath =
766
+ operationServerMap["UserApi.createUser"]?.[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 user
779
+ * @param {string} userId A user identifier or slug
780
+ * @param {*} [options] Override http request option.
781
+ * @throws {RequiredError}
782
+ */
783
+ async deleteUser(
784
+ userId: string,
785
+ options?: RawAxiosRequestConfig,
786
+ ): Promise<
787
+ (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Notification>
788
+ > {
789
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteUser(
790
+ userId,
791
+ options,
792
+ );
793
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
794
+ const localVarOperationServerBasePath =
795
+ operationServerMap["UserApi.deleteUser"]?.[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 team from user
808
+ * @param {string} userId A user identifier or slug
809
+ * @param {UserTeamParams} userTeamParams The user team data to delete
810
+ * @param {*} [options] Override http request option.
811
+ * @throws {RequiredError}
812
+ */
813
+ async deleteUserFromTeam(
814
+ userId: string,
815
+ userTeamParams: UserTeamParams,
816
+ options?: RawAxiosRequestConfig,
817
+ ): Promise<
818
+ (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Notification>
819
+ > {
820
+ const localVarAxiosArgs =
821
+ await localVarAxiosParamCreator.deleteUserFromTeam(
822
+ userId,
823
+ userTeamParams,
824
+ options,
825
+ );
826
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
827
+ const localVarOperationServerBasePath =
828
+ operationServerMap["UserApi.deleteUserFromTeam"]?.[
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 teams assigned to user
842
+ * @param {string} userId A user identifier or slug
843
+ * @param {string} [search] Search query
844
+ * @param {ListUserTeamsSortEnum} [sort] Sorting column
845
+ * @param {ListUserTeamsOrderEnum} [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 listUserTeams(
852
+ userId: string,
853
+ search?: string,
854
+ sort?: ListUserTeamsSortEnum,
855
+ order?: ListUserTeamsOrderEnum,
856
+ limit?: number,
857
+ offset?: number,
858
+ options?: RawAxiosRequestConfig,
859
+ ): Promise<
860
+ (axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserTeams>
861
+ > {
862
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listUserTeams(
863
+ userId,
864
+ search,
865
+ sort,
866
+ order,
867
+ limit,
868
+ offset,
869
+ options,
870
+ );
871
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
872
+ const localVarOperationServerBasePath =
873
+ operationServerMap["UserApi.listUserTeams"]?.[
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 users
887
+ * @param {string} [search] Search query
888
+ * @param {ListUsersSortEnum} [sort] Sorting column
889
+ * @param {ListUsersOrderEnum} [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 listUsers(
896
+ search?: string,
897
+ sort?: ListUsersSortEnum,
898
+ order?: ListUsersOrderEnum,
899
+ limit?: number,
900
+ offset?: number,
901
+ options?: RawAxiosRequestConfig,
902
+ ): Promise<
903
+ (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Users>
904
+ > {
905
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listUsers(
906
+ search,
907
+ sort,
908
+ order,
909
+ limit,
910
+ offset,
911
+ options,
912
+ );
913
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
914
+ const localVarOperationServerBasePath =
915
+ operationServerMap["UserApi.listUsers"]?.[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 team perms for user
928
+ * @param {string} userId A user identifier or slug
929
+ * @param {UserTeamParams} userTeamParams The user team data to update
930
+ * @param {*} [options] Override http request option.
931
+ * @throws {RequiredError}
932
+ */
933
+ async permitUserTeam(
934
+ userId: string,
935
+ userTeamParams: UserTeamParams,
936
+ options?: RawAxiosRequestConfig,
937
+ ): Promise<
938
+ (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Notification>
939
+ > {
940
+ const localVarAxiosArgs = await localVarAxiosParamCreator.permitUserTeam(
941
+ userId,
942
+ userTeamParams,
943
+ options,
944
+ );
945
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
946
+ const localVarOperationServerBasePath =
947
+ operationServerMap["UserApi.permitUserTeam"]?.[
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 user
961
+ * @param {string} userId A user identifier or slug
962
+ * @param {*} [options] Override http request option.
963
+ * @throws {RequiredError}
964
+ */
965
+ async showUser(
966
+ userId: string,
967
+ options?: RawAxiosRequestConfig,
968
+ ): Promise<
969
+ (axios?: AxiosInstance, basePath?: string) => AxiosPromise<User>
970
+ > {
971
+ const localVarAxiosArgs = await localVarAxiosParamCreator.showUser(
972
+ userId,
973
+ options,
974
+ );
975
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
976
+ const localVarOperationServerBasePath =
977
+ operationServerMap["UserApi.showUser"]?.[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 user
990
+ * @param {string} userId A user identifier or slug
991
+ * @param {User} user The user data to update
992
+ * @param {*} [options] Override http request option.
993
+ * @throws {RequiredError}
994
+ */
995
+ async updateUser(
996
+ userId: string,
997
+ user: User,
998
+ options?: RawAxiosRequestConfig,
999
+ ): Promise<
1000
+ (axios?: AxiosInstance, basePath?: string) => AxiosPromise<User>
1001
+ > {
1002
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateUser(
1003
+ userId,
1004
+ user,
1005
+ options,
1006
+ );
1007
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1008
+ const localVarOperationServerBasePath =
1009
+ operationServerMap["UserApi.updateUser"]?.[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
+ * UserApi - factory interface
1024
+ * @export
1025
+ */
1026
+ export const UserApiFactory = function (
1027
+ configuration?: Configuration,
1028
+ basePath?: string,
1029
+ axios?: AxiosInstance,
1030
+ ) {
1031
+ const localVarFp = UserApiFp(configuration);
1032
+ return {
1033
+ /**
1034
+ *
1035
+ * @summary Assign a team to user
1036
+ * @param {UserApiAttachUserToTeamRequest} requestParameters Request parameters.
1037
+ * @param {*} [options] Override http request option.
1038
+ * @throws {RequiredError}
1039
+ */
1040
+ attachUserToTeam(
1041
+ requestParameters: UserApiAttachUserToTeamRequest,
1042
+ options?: RawAxiosRequestConfig,
1043
+ ): AxiosPromise<Notification> {
1044
+ return localVarFp
1045
+ .attachUserToTeam(
1046
+ requestParameters.userId,
1047
+ requestParameters.userTeamParams,
1048
+ options,
1049
+ )
1050
+ .then((request) => request(axios, basePath));
1051
+ },
1052
+ /**
1053
+ *
1054
+ * @summary Create a new user
1055
+ * @param {UserApiCreateUserRequest} requestParameters Request parameters.
1056
+ * @param {*} [options] Override http request option.
1057
+ * @throws {RequiredError}
1058
+ */
1059
+ createUser(
1060
+ requestParameters: UserApiCreateUserRequest,
1061
+ options?: RawAxiosRequestConfig,
1062
+ ): AxiosPromise<User> {
1063
+ return localVarFp
1064
+ .createUser(requestParameters.user, options)
1065
+ .then((request) => request(axios, basePath));
1066
+ },
1067
+ /**
1068
+ *
1069
+ * @summary Delete a specific user
1070
+ * @param {UserApiDeleteUserRequest} requestParameters Request parameters.
1071
+ * @param {*} [options] Override http request option.
1072
+ * @throws {RequiredError}
1073
+ */
1074
+ deleteUser(
1075
+ requestParameters: UserApiDeleteUserRequest,
1076
+ options?: RawAxiosRequestConfig,
1077
+ ): AxiosPromise<Notification> {
1078
+ return localVarFp
1079
+ .deleteUser(requestParameters.userId, options)
1080
+ .then((request) => request(axios, basePath));
1081
+ },
1082
+ /**
1083
+ *
1084
+ * @summary Remove a team from user
1085
+ * @param {UserApiDeleteUserFromTeamRequest} requestParameters Request parameters.
1086
+ * @param {*} [options] Override http request option.
1087
+ * @throws {RequiredError}
1088
+ */
1089
+ deleteUserFromTeam(
1090
+ requestParameters: UserApiDeleteUserFromTeamRequest,
1091
+ options?: RawAxiosRequestConfig,
1092
+ ): AxiosPromise<Notification> {
1093
+ return localVarFp
1094
+ .deleteUserFromTeam(
1095
+ requestParameters.userId,
1096
+ requestParameters.userTeamParams,
1097
+ options,
1098
+ )
1099
+ .then((request) => request(axios, basePath));
1100
+ },
1101
+ /**
1102
+ *
1103
+ * @summary Fetch all teams assigned to user
1104
+ * @param {UserApiListUserTeamsRequest} requestParameters Request parameters.
1105
+ * @param {*} [options] Override http request option.
1106
+ * @throws {RequiredError}
1107
+ */
1108
+ listUserTeams(
1109
+ requestParameters: UserApiListUserTeamsRequest,
1110
+ options?: RawAxiosRequestConfig,
1111
+ ): AxiosPromise<UserTeams> {
1112
+ return localVarFp
1113
+ .listUserTeams(
1114
+ requestParameters.userId,
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 users
1127
+ * @param {UserApiListUsersRequest} requestParameters Request parameters.
1128
+ * @param {*} [options] Override http request option.
1129
+ * @throws {RequiredError}
1130
+ */
1131
+ listUsers(
1132
+ requestParameters: UserApiListUsersRequest = {},
1133
+ options?: RawAxiosRequestConfig,
1134
+ ): AxiosPromise<Users> {
1135
+ return localVarFp
1136
+ .listUsers(
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 team perms for user
1149
+ * @param {UserApiPermitUserTeamRequest} requestParameters Request parameters.
1150
+ * @param {*} [options] Override http request option.
1151
+ * @throws {RequiredError}
1152
+ */
1153
+ permitUserTeam(
1154
+ requestParameters: UserApiPermitUserTeamRequest,
1155
+ options?: RawAxiosRequestConfig,
1156
+ ): AxiosPromise<Notification> {
1157
+ return localVarFp
1158
+ .permitUserTeam(
1159
+ requestParameters.userId,
1160
+ requestParameters.userTeamParams,
1161
+ options,
1162
+ )
1163
+ .then((request) => request(axios, basePath));
1164
+ },
1165
+ /**
1166
+ *
1167
+ * @summary Fetch a specific user
1168
+ * @param {UserApiShowUserRequest} requestParameters Request parameters.
1169
+ * @param {*} [options] Override http request option.
1170
+ * @throws {RequiredError}
1171
+ */
1172
+ showUser(
1173
+ requestParameters: UserApiShowUserRequest,
1174
+ options?: RawAxiosRequestConfig,
1175
+ ): AxiosPromise<User> {
1176
+ return localVarFp
1177
+ .showUser(requestParameters.userId, options)
1178
+ .then((request) => request(axios, basePath));
1179
+ },
1180
+ /**
1181
+ *
1182
+ * @summary Update a specific user
1183
+ * @param {UserApiUpdateUserRequest} requestParameters Request parameters.
1184
+ * @param {*} [options] Override http request option.
1185
+ * @throws {RequiredError}
1186
+ */
1187
+ updateUser(
1188
+ requestParameters: UserApiUpdateUserRequest,
1189
+ options?: RawAxiosRequestConfig,
1190
+ ): AxiosPromise<User> {
1191
+ return localVarFp
1192
+ .updateUser(requestParameters.userId, requestParameters.user, options)
1193
+ .then((request) => request(axios, basePath));
1194
+ },
1195
+ };
1196
+ };
1197
+
1198
+ /**
1199
+ * Request parameters for attachUserToTeam operation in UserApi.
1200
+ * @export
1201
+ * @interface UserApiAttachUserToTeamRequest
1202
+ */
1203
+ export interface UserApiAttachUserToTeamRequest {
1204
+ /**
1205
+ * A user identifier or slug
1206
+ * @type {string}
1207
+ * @memberof UserApiAttachUserToTeam
1208
+ */
1209
+ readonly userId: string;
1210
+
1211
+ /**
1212
+ * The user team data to attach
1213
+ * @type {UserTeamParams}
1214
+ * @memberof UserApiAttachUserToTeam
1215
+ */
1216
+ readonly userTeamParams: UserTeamParams;
1217
+ }
1218
+
1219
+ /**
1220
+ * Request parameters for createUser operation in UserApi.
1221
+ * @export
1222
+ * @interface UserApiCreateUserRequest
1223
+ */
1224
+ export interface UserApiCreateUserRequest {
1225
+ /**
1226
+ * The user data to create
1227
+ * @type {User}
1228
+ * @memberof UserApiCreateUser
1229
+ */
1230
+ readonly user: User;
1231
+ }
1232
+
1233
+ /**
1234
+ * Request parameters for deleteUser operation in UserApi.
1235
+ * @export
1236
+ * @interface UserApiDeleteUserRequest
1237
+ */
1238
+ export interface UserApiDeleteUserRequest {
1239
+ /**
1240
+ * A user identifier or slug
1241
+ * @type {string}
1242
+ * @memberof UserApiDeleteUser
1243
+ */
1244
+ readonly userId: string;
1245
+ }
1246
+
1247
+ /**
1248
+ * Request parameters for deleteUserFromTeam operation in UserApi.
1249
+ * @export
1250
+ * @interface UserApiDeleteUserFromTeamRequest
1251
+ */
1252
+ export interface UserApiDeleteUserFromTeamRequest {
1253
+ /**
1254
+ * A user identifier or slug
1255
+ * @type {string}
1256
+ * @memberof UserApiDeleteUserFromTeam
1257
+ */
1258
+ readonly userId: string;
1259
+
1260
+ /**
1261
+ * The user team data to delete
1262
+ * @type {UserTeamParams}
1263
+ * @memberof UserApiDeleteUserFromTeam
1264
+ */
1265
+ readonly userTeamParams: UserTeamParams;
1266
+ }
1267
+
1268
+ /**
1269
+ * Request parameters for listUserTeams operation in UserApi.
1270
+ * @export
1271
+ * @interface UserApiListUserTeamsRequest
1272
+ */
1273
+ export interface UserApiListUserTeamsRequest {
1274
+ /**
1275
+ * A user identifier or slug
1276
+ * @type {string}
1277
+ * @memberof UserApiListUserTeams
1278
+ */
1279
+ readonly userId: string;
1280
+
1281
+ /**
1282
+ * Search query
1283
+ * @type {string}
1284
+ * @memberof UserApiListUserTeams
1285
+ */
1286
+ readonly search?: string;
1287
+
1288
+ /**
1289
+ * Sorting column
1290
+ * @type {'slug' | 'name'}
1291
+ * @memberof UserApiListUserTeams
1292
+ */
1293
+ readonly sort?: ListUserTeamsSortEnum;
1294
+
1295
+ /**
1296
+ * Sorting order
1297
+ * @type {'asc' | 'desc'}
1298
+ * @memberof UserApiListUserTeams
1299
+ */
1300
+ readonly order?: ListUserTeamsOrderEnum;
1301
+
1302
+ /**
1303
+ * Paging limit
1304
+ * @type {number}
1305
+ * @memberof UserApiListUserTeams
1306
+ */
1307
+ readonly limit?: number;
1308
+
1309
+ /**
1310
+ * Paging offset
1311
+ * @type {number}
1312
+ * @memberof UserApiListUserTeams
1313
+ */
1314
+ readonly offset?: number;
1315
+ }
1316
+
1317
+ /**
1318
+ * Request parameters for listUsers operation in UserApi.
1319
+ * @export
1320
+ * @interface UserApiListUsersRequest
1321
+ */
1322
+ export interface UserApiListUsersRequest {
1323
+ /**
1324
+ * Search query
1325
+ * @type {string}
1326
+ * @memberof UserApiListUsers
1327
+ */
1328
+ readonly search?: string;
1329
+
1330
+ /**
1331
+ * Sorting column
1332
+ * @type {'username' | 'email' | 'fullname' | 'admin' | 'active'}
1333
+ * @memberof UserApiListUsers
1334
+ */
1335
+ readonly sort?: ListUsersSortEnum;
1336
+
1337
+ /**
1338
+ * Sorting order
1339
+ * @type {'asc' | 'desc'}
1340
+ * @memberof UserApiListUsers
1341
+ */
1342
+ readonly order?: ListUsersOrderEnum;
1343
+
1344
+ /**
1345
+ * Paging limit
1346
+ * @type {number}
1347
+ * @memberof UserApiListUsers
1348
+ */
1349
+ readonly limit?: number;
1350
+
1351
+ /**
1352
+ * Paging offset
1353
+ * @type {number}
1354
+ * @memberof UserApiListUsers
1355
+ */
1356
+ readonly offset?: number;
1357
+ }
1358
+
1359
+ /**
1360
+ * Request parameters for permitUserTeam operation in UserApi.
1361
+ * @export
1362
+ * @interface UserApiPermitUserTeamRequest
1363
+ */
1364
+ export interface UserApiPermitUserTeamRequest {
1365
+ /**
1366
+ * A user identifier or slug
1367
+ * @type {string}
1368
+ * @memberof UserApiPermitUserTeam
1369
+ */
1370
+ readonly userId: string;
1371
+
1372
+ /**
1373
+ * The user team data to update
1374
+ * @type {UserTeamParams}
1375
+ * @memberof UserApiPermitUserTeam
1376
+ */
1377
+ readonly userTeamParams: UserTeamParams;
1378
+ }
1379
+
1380
+ /**
1381
+ * Request parameters for showUser operation in UserApi.
1382
+ * @export
1383
+ * @interface UserApiShowUserRequest
1384
+ */
1385
+ export interface UserApiShowUserRequest {
1386
+ /**
1387
+ * A user identifier or slug
1388
+ * @type {string}
1389
+ * @memberof UserApiShowUser
1390
+ */
1391
+ readonly userId: string;
1392
+ }
1393
+
1394
+ /**
1395
+ * Request parameters for updateUser operation in UserApi.
1396
+ * @export
1397
+ * @interface UserApiUpdateUserRequest
1398
+ */
1399
+ export interface UserApiUpdateUserRequest {
1400
+ /**
1401
+ * A user identifier or slug
1402
+ * @type {string}
1403
+ * @memberof UserApiUpdateUser
1404
+ */
1405
+ readonly userId: string;
1406
+
1407
+ /**
1408
+ * The user data to update
1409
+ * @type {User}
1410
+ * @memberof UserApiUpdateUser
1411
+ */
1412
+ readonly user: User;
1413
+ }
1414
+
1415
+ /**
1416
+ * UserApi - object-oriented interface
1417
+ * @export
1418
+ * @class UserApi
1419
+ * @extends {BaseAPI}
1420
+ */
1421
+ export class UserApi extends BaseAPI {
1422
+ /**
1423
+ *
1424
+ * @summary Assign a team to user
1425
+ * @param {UserApiAttachUserToTeamRequest} requestParameters Request parameters.
1426
+ * @param {*} [options] Override http request option.
1427
+ * @throws {RequiredError}
1428
+ * @memberof UserApi
1429
+ */
1430
+ public attachUserToTeam(
1431
+ requestParameters: UserApiAttachUserToTeamRequest,
1432
+ options?: RawAxiosRequestConfig,
1433
+ ) {
1434
+ return UserApiFp(this.configuration)
1435
+ .attachUserToTeam(
1436
+ requestParameters.userId,
1437
+ requestParameters.userTeamParams,
1438
+ options,
1439
+ )
1440
+ .then((request) => request(this.axios, this.basePath));
1441
+ }
1442
+
1443
+ /**
1444
+ *
1445
+ * @summary Create a new user
1446
+ * @param {UserApiCreateUserRequest} requestParameters Request parameters.
1447
+ * @param {*} [options] Override http request option.
1448
+ * @throws {RequiredError}
1449
+ * @memberof UserApi
1450
+ */
1451
+ public createUser(
1452
+ requestParameters: UserApiCreateUserRequest,
1453
+ options?: RawAxiosRequestConfig,
1454
+ ) {
1455
+ return UserApiFp(this.configuration)
1456
+ .createUser(requestParameters.user, options)
1457
+ .then((request) => request(this.axios, this.basePath));
1458
+ }
1459
+
1460
+ /**
1461
+ *
1462
+ * @summary Delete a specific user
1463
+ * @param {UserApiDeleteUserRequest} requestParameters Request parameters.
1464
+ * @param {*} [options] Override http request option.
1465
+ * @throws {RequiredError}
1466
+ * @memberof UserApi
1467
+ */
1468
+ public deleteUser(
1469
+ requestParameters: UserApiDeleteUserRequest,
1470
+ options?: RawAxiosRequestConfig,
1471
+ ) {
1472
+ return UserApiFp(this.configuration)
1473
+ .deleteUser(requestParameters.userId, options)
1474
+ .then((request) => request(this.axios, this.basePath));
1475
+ }
1476
+
1477
+ /**
1478
+ *
1479
+ * @summary Remove a team from user
1480
+ * @param {UserApiDeleteUserFromTeamRequest} requestParameters Request parameters.
1481
+ * @param {*} [options] Override http request option.
1482
+ * @throws {RequiredError}
1483
+ * @memberof UserApi
1484
+ */
1485
+ public deleteUserFromTeam(
1486
+ requestParameters: UserApiDeleteUserFromTeamRequest,
1487
+ options?: RawAxiosRequestConfig,
1488
+ ) {
1489
+ return UserApiFp(this.configuration)
1490
+ .deleteUserFromTeam(
1491
+ requestParameters.userId,
1492
+ requestParameters.userTeamParams,
1493
+ options,
1494
+ )
1495
+ .then((request) => request(this.axios, this.basePath));
1496
+ }
1497
+
1498
+ /**
1499
+ *
1500
+ * @summary Fetch all teams assigned to user
1501
+ * @param {UserApiListUserTeamsRequest} requestParameters Request parameters.
1502
+ * @param {*} [options] Override http request option.
1503
+ * @throws {RequiredError}
1504
+ * @memberof UserApi
1505
+ */
1506
+ public listUserTeams(
1507
+ requestParameters: UserApiListUserTeamsRequest,
1508
+ options?: RawAxiosRequestConfig,
1509
+ ) {
1510
+ return UserApiFp(this.configuration)
1511
+ .listUserTeams(
1512
+ requestParameters.userId,
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 users
1526
+ * @param {UserApiListUsersRequest} requestParameters Request parameters.
1527
+ * @param {*} [options] Override http request option.
1528
+ * @throws {RequiredError}
1529
+ * @memberof UserApi
1530
+ */
1531
+ public listUsers(
1532
+ requestParameters: UserApiListUsersRequest = {},
1533
+ options?: RawAxiosRequestConfig,
1534
+ ) {
1535
+ return UserApiFp(this.configuration)
1536
+ .listUsers(
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 team perms for user
1550
+ * @param {UserApiPermitUserTeamRequest} requestParameters Request parameters.
1551
+ * @param {*} [options] Override http request option.
1552
+ * @throws {RequiredError}
1553
+ * @memberof UserApi
1554
+ */
1555
+ public permitUserTeam(
1556
+ requestParameters: UserApiPermitUserTeamRequest,
1557
+ options?: RawAxiosRequestConfig,
1558
+ ) {
1559
+ return UserApiFp(this.configuration)
1560
+ .permitUserTeam(
1561
+ requestParameters.userId,
1562
+ requestParameters.userTeamParams,
1563
+ options,
1564
+ )
1565
+ .then((request) => request(this.axios, this.basePath));
1566
+ }
1567
+
1568
+ /**
1569
+ *
1570
+ * @summary Fetch a specific user
1571
+ * @param {UserApiShowUserRequest} requestParameters Request parameters.
1572
+ * @param {*} [options] Override http request option.
1573
+ * @throws {RequiredError}
1574
+ * @memberof UserApi
1575
+ */
1576
+ public showUser(
1577
+ requestParameters: UserApiShowUserRequest,
1578
+ options?: RawAxiosRequestConfig,
1579
+ ) {
1580
+ return UserApiFp(this.configuration)
1581
+ .showUser(requestParameters.userId, options)
1582
+ .then((request) => request(this.axios, this.basePath));
1583
+ }
1584
+
1585
+ /**
1586
+ *
1587
+ * @summary Update a specific user
1588
+ * @param {UserApiUpdateUserRequest} requestParameters Request parameters.
1589
+ * @param {*} [options] Override http request option.
1590
+ * @throws {RequiredError}
1591
+ * @memberof UserApi
1592
+ */
1593
+ public updateUser(
1594
+ requestParameters: UserApiUpdateUserRequest,
1595
+ options?: RawAxiosRequestConfig,
1596
+ ) {
1597
+ return UserApiFp(this.configuration)
1598
+ .updateUser(requestParameters.userId, requestParameters.user, options)
1599
+ .then((request) => request(this.axios, this.basePath));
1600
+ }
1601
+ }
1602
+
1603
+ /**
1604
+ * @export
1605
+ */
1606
+ export const ListUserTeamsSortEnum = {
1607
+ Slug: "slug",
1608
+ Name: "name",
1609
+ } as const;
1610
+ export type ListUserTeamsSortEnum =
1611
+ (typeof ListUserTeamsSortEnum)[keyof typeof ListUserTeamsSortEnum];
1612
+ /**
1613
+ * @export
1614
+ */
1615
+ export const ListUserTeamsOrderEnum = {
1616
+ Asc: "asc",
1617
+ Desc: "desc",
1618
+ } as const;
1619
+ export type ListUserTeamsOrderEnum =
1620
+ (typeof ListUserTeamsOrderEnum)[keyof typeof ListUserTeamsOrderEnum];
1621
+ /**
1622
+ * @export
1623
+ */
1624
+ export const ListUsersSortEnum = {
1625
+ Username: "username",
1626
+ Email: "email",
1627
+ Fullname: "fullname",
1628
+ Admin: "admin",
1629
+ Active: "active",
1630
+ } as const;
1631
+ export type ListUsersSortEnum =
1632
+ (typeof ListUsersSortEnum)[keyof typeof ListUsersSortEnum];
1633
+ /**
1634
+ * @export
1635
+ */
1636
+ export const ListUsersOrderEnum = {
1637
+ Asc: "asc",
1638
+ Desc: "desc",
1639
+ } as const;
1640
+ export type ListUsersOrderEnum =
1641
+ (typeof ListUsersOrderEnum)[keyof typeof ListUsersOrderEnum];