gopadjs 2.8.0 → 2.10.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.
@@ -0,0 +1,548 @@
1
+ # UserApi
2
+
3
+ All URIs are relative to *https://try.gopad.eu/api/v1*
4
+
5
+ |Method | HTTP request | Description|
6
+ |------------- | ------------- | -------------|
7
+ |[**attachUserToGroup**](#attachusertogroup) | **POST** /users/{user_id}/groups | Attach a group to user|
8
+ |[**createUser**](#createuser) | **POST** /users | Create a new user|
9
+ |[**deleteUser**](#deleteuser) | **DELETE** /users/{user_id} | Delete a specific user|
10
+ |[**deleteUserFromGroup**](#deleteuserfromgroup) | **DELETE** /users/{user_id}/groups | Unlink a group from user|
11
+ |[**listUserGroups**](#listusergroups) | **GET** /users/{user_id}/groups | Fetch all groups attached to user|
12
+ |[**listUsers**](#listusers) | **GET** /users | Fetch all available users|
13
+ |[**permitUserGroup**](#permitusergroup) | **PUT** /users/{user_id}/groups | Update group perms for user|
14
+ |[**showUser**](#showuser) | **GET** /users/{user_id} | Fetch a specific user|
15
+ |[**updateUser**](#updateuser) | **PUT** /users/{user_id} | Update a specific user|
16
+
17
+ # **attachUserToGroup**
18
+ > Notification attachUserToGroup(permitUserGroupRequest)
19
+
20
+
21
+ ### Example
22
+
23
+ ```typescript
24
+ import {
25
+ UserApi,
26
+ Configuration,
27
+ PermitUserGroupRequest
28
+ } from 'gopadjs';
29
+
30
+ const configuration = new Configuration();
31
+ const apiInstance = new UserApi(configuration);
32
+
33
+ let userId: string; //A user identifier or slug (default to undefined)
34
+ let permitUserGroupRequest: PermitUserGroupRequest; //The user group data to permit
35
+
36
+ const { status, data } = await apiInstance.attachUserToGroup(
37
+ userId,
38
+ permitUserGroupRequest
39
+ );
40
+ ```
41
+
42
+ ### Parameters
43
+
44
+ |Name | Type | Description | Notes|
45
+ |------------- | ------------- | ------------- | -------------|
46
+ | **permitUserGroupRequest** | **PermitUserGroupRequest**| The user group data to permit | |
47
+ | **userId** | [**string**] | A user identifier or slug | defaults to undefined|
48
+
49
+
50
+ ### Return type
51
+
52
+ **Notification**
53
+
54
+ ### Authorization
55
+
56
+ [Basic](../README.md#Basic), [Header](../README.md#Header), [Bearer](../README.md#Bearer)
57
+
58
+ ### HTTP request headers
59
+
60
+ - **Content-Type**: application/json
61
+ - **Accept**: application/json
62
+
63
+
64
+ ### HTTP response details
65
+ | Status code | Description | Response headers |
66
+ |-------------|-------------|------------------|
67
+ |**200** | Plain success message | - |
68
+ |**400** | Failed to parse request | - |
69
+ |**403** | User is not authorized | - |
70
+ |**404** | Resource not found | - |
71
+ |**412** | Resource is already attached | - |
72
+ |**422** | Failed to validate request | - |
73
+ |**500** | Some internal server error | - |
74
+
75
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
76
+
77
+ # **createUser**
78
+ > User createUser(createUserRequest)
79
+
80
+
81
+ ### Example
82
+
83
+ ```typescript
84
+ import {
85
+ UserApi,
86
+ Configuration,
87
+ CreateUserRequest
88
+ } from 'gopadjs';
89
+
90
+ const configuration = new Configuration();
91
+ const apiInstance = new UserApi(configuration);
92
+
93
+ let createUserRequest: CreateUserRequest; //The user data to create
94
+
95
+ const { status, data } = await apiInstance.createUser(
96
+ createUserRequest
97
+ );
98
+ ```
99
+
100
+ ### Parameters
101
+
102
+ |Name | Type | Description | Notes|
103
+ |------------- | ------------- | ------------- | -------------|
104
+ | **createUserRequest** | **CreateUserRequest**| The user data to create | |
105
+
106
+
107
+ ### Return type
108
+
109
+ **User**
110
+
111
+ ### Authorization
112
+
113
+ [Basic](../README.md#Basic), [Header](../README.md#Header), [Bearer](../README.md#Bearer)
114
+
115
+ ### HTTP request headers
116
+
117
+ - **Content-Type**: application/json
118
+ - **Accept**: application/json
119
+
120
+
121
+ ### HTTP response details
122
+ | Status code | Description | Response headers |
123
+ |-------------|-------------|------------------|
124
+ |**200** | The details for an user | - |
125
+ |**400** | Failed to parse request | - |
126
+ |**403** | User is not authorized | - |
127
+ |**422** | Failed to validate request | - |
128
+ |**500** | Some internal server error | - |
129
+
130
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
131
+
132
+ # **deleteUser**
133
+ > Notification deleteUser()
134
+
135
+
136
+ ### Example
137
+
138
+ ```typescript
139
+ import {
140
+ UserApi,
141
+ Configuration
142
+ } from 'gopadjs';
143
+
144
+ const configuration = new Configuration();
145
+ const apiInstance = new UserApi(configuration);
146
+
147
+ let userId: string; //A user identifier or slug (default to undefined)
148
+
149
+ const { status, data } = await apiInstance.deleteUser(
150
+ userId
151
+ );
152
+ ```
153
+
154
+ ### Parameters
155
+
156
+ |Name | Type | Description | Notes|
157
+ |------------- | ------------- | ------------- | -------------|
158
+ | **userId** | [**string**] | A user identifier or slug | defaults to undefined|
159
+
160
+
161
+ ### Return type
162
+
163
+ **Notification**
164
+
165
+ ### Authorization
166
+
167
+ [Basic](../README.md#Basic), [Header](../README.md#Header), [Bearer](../README.md#Bearer)
168
+
169
+ ### HTTP request headers
170
+
171
+ - **Content-Type**: Not defined
172
+ - **Accept**: application/json
173
+
174
+
175
+ ### HTTP response details
176
+ | Status code | Description | Response headers |
177
+ |-------------|-------------|------------------|
178
+ |**200** | Plain success message | - |
179
+ |**403** | User is not authorized | - |
180
+ |**404** | Resource not found | - |
181
+ |**400** | Failed to execute action for resource | - |
182
+ |**500** | Some internal server error | - |
183
+
184
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
185
+
186
+ # **deleteUserFromGroup**
187
+ > Notification deleteUserFromGroup(deleteUserFromGroupRequest)
188
+
189
+
190
+ ### Example
191
+
192
+ ```typescript
193
+ import {
194
+ UserApi,
195
+ Configuration,
196
+ DeleteUserFromGroupRequest
197
+ } from 'gopadjs';
198
+
199
+ const configuration = new Configuration();
200
+ const apiInstance = new UserApi(configuration);
201
+
202
+ let userId: string; //A user identifier or slug (default to undefined)
203
+ let deleteUserFromGroupRequest: DeleteUserFromGroupRequest; //The user group data to unlink
204
+
205
+ const { status, data } = await apiInstance.deleteUserFromGroup(
206
+ userId,
207
+ deleteUserFromGroupRequest
208
+ );
209
+ ```
210
+
211
+ ### Parameters
212
+
213
+ |Name | Type | Description | Notes|
214
+ |------------- | ------------- | ------------- | -------------|
215
+ | **deleteUserFromGroupRequest** | **DeleteUserFromGroupRequest**| The user group data to unlink | |
216
+ | **userId** | [**string**] | A user identifier or slug | defaults to undefined|
217
+
218
+
219
+ ### Return type
220
+
221
+ **Notification**
222
+
223
+ ### Authorization
224
+
225
+ [Basic](../README.md#Basic), [Header](../README.md#Header), [Bearer](../README.md#Bearer)
226
+
227
+ ### HTTP request headers
228
+
229
+ - **Content-Type**: application/json
230
+ - **Accept**: application/json
231
+
232
+
233
+ ### HTTP response details
234
+ | Status code | Description | Response headers |
235
+ |-------------|-------------|------------------|
236
+ |**200** | Plain success message | - |
237
+ |**400** | Failed to parse request | - |
238
+ |**403** | User is not authorized | - |
239
+ |**404** | Resource not found | - |
240
+ |**412** | Resource is not attached | - |
241
+ |**500** | Some internal server error | - |
242
+
243
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
244
+
245
+ # **listUserGroups**
246
+ > ListUserGroups200Response listUserGroups()
247
+
248
+
249
+ ### Example
250
+
251
+ ```typescript
252
+ import {
253
+ UserApi,
254
+ Configuration
255
+ } from 'gopadjs';
256
+
257
+ const configuration = new Configuration();
258
+ const apiInstance = new UserApi(configuration);
259
+
260
+ let userId: string; //A user identifier or slug (default to undefined)
261
+ let search: string; //Search query (optional) (default to undefined)
262
+ let sort: string; //Sorting column (optional) (default to undefined)
263
+ let order: 'asc' | 'desc'; //Sorting order (optional) (default to 'asc')
264
+ let limit: number; //Paging limit (optional) (default to 100)
265
+ let offset: number; //Paging offset (optional) (default to 0)
266
+
267
+ const { status, data } = await apiInstance.listUserGroups(
268
+ userId,
269
+ search,
270
+ sort,
271
+ order,
272
+ limit,
273
+ offset
274
+ );
275
+ ```
276
+
277
+ ### Parameters
278
+
279
+ |Name | Type | Description | Notes|
280
+ |------------- | ------------- | ------------- | -------------|
281
+ | **userId** | [**string**] | A user identifier or slug | defaults to undefined|
282
+ | **search** | [**string**] | Search query | (optional) defaults to undefined|
283
+ | **sort** | [**string**] | Sorting column | (optional) defaults to undefined|
284
+ | **order** | [**&#39;asc&#39; | &#39;desc&#39;**]**Array<&#39;asc&#39; &#124; &#39;desc&#39;>** | Sorting order | (optional) defaults to 'asc'|
285
+ | **limit** | [**number**] | Paging limit | (optional) defaults to 100|
286
+ | **offset** | [**number**] | Paging offset | (optional) defaults to 0|
287
+
288
+
289
+ ### Return type
290
+
291
+ **ListUserGroups200Response**
292
+
293
+ ### Authorization
294
+
295
+ [Basic](../README.md#Basic), [Header](../README.md#Header), [Bearer](../README.md#Bearer)
296
+
297
+ ### HTTP request headers
298
+
299
+ - **Content-Type**: Not defined
300
+ - **Accept**: application/json
301
+
302
+
303
+ ### HTTP response details
304
+ | Status code | Description | Response headers |
305
+ |-------------|-------------|------------------|
306
+ |**200** | A collection of user groups | - |
307
+ |**403** | User is not authorized | - |
308
+ |**404** | Resource not found | - |
309
+ |**500** | Some internal server error | - |
310
+
311
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
312
+
313
+ # **listUsers**
314
+ > ListUsers200Response listUsers()
315
+
316
+
317
+ ### Example
318
+
319
+ ```typescript
320
+ import {
321
+ UserApi,
322
+ Configuration
323
+ } from 'gopadjs';
324
+
325
+ const configuration = new Configuration();
326
+ const apiInstance = new UserApi(configuration);
327
+
328
+ let search: string; //Search query (optional) (default to undefined)
329
+ let sort: string; //Sorting column (optional) (default to undefined)
330
+ let order: 'asc' | 'desc'; //Sorting order (optional) (default to 'asc')
331
+ let limit: number; //Paging limit (optional) (default to 100)
332
+ let offset: number; //Paging offset (optional) (default to 0)
333
+
334
+ const { status, data } = await apiInstance.listUsers(
335
+ search,
336
+ sort,
337
+ order,
338
+ limit,
339
+ offset
340
+ );
341
+ ```
342
+
343
+ ### Parameters
344
+
345
+ |Name | Type | Description | Notes|
346
+ |------------- | ------------- | ------------- | -------------|
347
+ | **search** | [**string**] | Search query | (optional) defaults to undefined|
348
+ | **sort** | [**string**] | Sorting column | (optional) defaults to undefined|
349
+ | **order** | [**&#39;asc&#39; | &#39;desc&#39;**]**Array<&#39;asc&#39; &#124; &#39;desc&#39;>** | Sorting order | (optional) defaults to 'asc'|
350
+ | **limit** | [**number**] | Paging limit | (optional) defaults to 100|
351
+ | **offset** | [**number**] | Paging offset | (optional) defaults to 0|
352
+
353
+
354
+ ### Return type
355
+
356
+ **ListUsers200Response**
357
+
358
+ ### Authorization
359
+
360
+ [Basic](../README.md#Basic), [Header](../README.md#Header), [Bearer](../README.md#Bearer)
361
+
362
+ ### HTTP request headers
363
+
364
+ - **Content-Type**: Not defined
365
+ - **Accept**: application/json
366
+
367
+
368
+ ### HTTP response details
369
+ | Status code | Description | Response headers |
370
+ |-------------|-------------|------------------|
371
+ |**200** | A collection of users | - |
372
+ |**403** | User is not authorized | - |
373
+ |**500** | Some internal server error | - |
374
+
375
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
376
+
377
+ # **permitUserGroup**
378
+ > Notification permitUserGroup(permitUserGroupRequest)
379
+
380
+
381
+ ### Example
382
+
383
+ ```typescript
384
+ import {
385
+ UserApi,
386
+ Configuration,
387
+ PermitUserGroupRequest
388
+ } from 'gopadjs';
389
+
390
+ const configuration = new Configuration();
391
+ const apiInstance = new UserApi(configuration);
392
+
393
+ let userId: string; //A user identifier or slug (default to undefined)
394
+ let permitUserGroupRequest: PermitUserGroupRequest; //The user group data to permit
395
+
396
+ const { status, data } = await apiInstance.permitUserGroup(
397
+ userId,
398
+ permitUserGroupRequest
399
+ );
400
+ ```
401
+
402
+ ### Parameters
403
+
404
+ |Name | Type | Description | Notes|
405
+ |------------- | ------------- | ------------- | -------------|
406
+ | **permitUserGroupRequest** | **PermitUserGroupRequest**| The user group data to permit | |
407
+ | **userId** | [**string**] | A user identifier or slug | defaults to undefined|
408
+
409
+
410
+ ### Return type
411
+
412
+ **Notification**
413
+
414
+ ### Authorization
415
+
416
+ [Basic](../README.md#Basic), [Header](../README.md#Header), [Bearer](../README.md#Bearer)
417
+
418
+ ### HTTP request headers
419
+
420
+ - **Content-Type**: application/json
421
+ - **Accept**: application/json
422
+
423
+
424
+ ### HTTP response details
425
+ | Status code | Description | Response headers |
426
+ |-------------|-------------|------------------|
427
+ |**200** | Plain success message | - |
428
+ |**400** | Failed to parse request | - |
429
+ |**403** | User is not authorized | - |
430
+ |**404** | Resource not found | - |
431
+ |**412** | Resource is not attached | - |
432
+ |**422** | Failed to validate request | - |
433
+ |**500** | Some internal server error | - |
434
+
435
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
436
+
437
+ # **showUser**
438
+ > User showUser()
439
+
440
+
441
+ ### Example
442
+
443
+ ```typescript
444
+ import {
445
+ UserApi,
446
+ Configuration
447
+ } from 'gopadjs';
448
+
449
+ const configuration = new Configuration();
450
+ const apiInstance = new UserApi(configuration);
451
+
452
+ let userId: string; //A user identifier or slug (default to undefined)
453
+
454
+ const { status, data } = await apiInstance.showUser(
455
+ userId
456
+ );
457
+ ```
458
+
459
+ ### Parameters
460
+
461
+ |Name | Type | Description | Notes|
462
+ |------------- | ------------- | ------------- | -------------|
463
+ | **userId** | [**string**] | A user identifier or slug | defaults to undefined|
464
+
465
+
466
+ ### Return type
467
+
468
+ **User**
469
+
470
+ ### Authorization
471
+
472
+ [Basic](../README.md#Basic), [Header](../README.md#Header), [Bearer](../README.md#Bearer)
473
+
474
+ ### HTTP request headers
475
+
476
+ - **Content-Type**: Not defined
477
+ - **Accept**: application/json
478
+
479
+
480
+ ### HTTP response details
481
+ | Status code | Description | Response headers |
482
+ |-------------|-------------|------------------|
483
+ |**200** | The details for an user | - |
484
+ |**403** | User is not authorized | - |
485
+ |**404** | Resource not found | - |
486
+ |**500** | Some internal server error | - |
487
+
488
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
489
+
490
+ # **updateUser**
491
+ > User updateUser(updateUserRequest)
492
+
493
+
494
+ ### Example
495
+
496
+ ```typescript
497
+ import {
498
+ UserApi,
499
+ Configuration,
500
+ UpdateUserRequest
501
+ } from 'gopadjs';
502
+
503
+ const configuration = new Configuration();
504
+ const apiInstance = new UserApi(configuration);
505
+
506
+ let userId: string; //A user identifier or slug (default to undefined)
507
+ let updateUserRequest: UpdateUserRequest; //The user data to update
508
+
509
+ const { status, data } = await apiInstance.updateUser(
510
+ userId,
511
+ updateUserRequest
512
+ );
513
+ ```
514
+
515
+ ### Parameters
516
+
517
+ |Name | Type | Description | Notes|
518
+ |------------- | ------------- | ------------- | -------------|
519
+ | **updateUserRequest** | **UpdateUserRequest**| The user data to update | |
520
+ | **userId** | [**string**] | A user identifier or slug | defaults to undefined|
521
+
522
+
523
+ ### Return type
524
+
525
+ **User**
526
+
527
+ ### Authorization
528
+
529
+ [Basic](../README.md#Basic), [Header](../README.md#Header), [Bearer](../README.md#Bearer)
530
+
531
+ ### HTTP request headers
532
+
533
+ - **Content-Type**: application/json
534
+ - **Accept**: application/json
535
+
536
+
537
+ ### HTTP response details
538
+ | Status code | Description | Response headers |
539
+ |-------------|-------------|------------------|
540
+ |**200** | The details for an user | - |
541
+ |**400** | Failed to parse request | - |
542
+ |**403** | User is not authorized | - |
543
+ |**404** | Resource not found | - |
544
+ |**422** | Failed to validate request | - |
545
+ |**500** | Some internal server error | - |
546
+
547
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
548
+
@@ -0,0 +1,27 @@
1
+ # UserAuth
2
+
3
+ Model to represent user auth
4
+
5
+ ## Properties
6
+
7
+ Name | Type | Description | Notes
8
+ ------------ | ------------- | ------------- | -------------
9
+ **provider** | **string** | | [optional] [default to undefined]
10
+ **ref** | **string** | | [optional] [default to undefined]
11
+ **created_at** | **string** | | [optional] [readonly] [default to undefined]
12
+ **updated_at** | **string** | | [optional] [readonly] [default to undefined]
13
+
14
+ ## Example
15
+
16
+ ```typescript
17
+ import { UserAuth } from 'gopadjs';
18
+
19
+ const instance: UserAuth = {
20
+ provider,
21
+ ref,
22
+ created_at,
23
+ updated_at,
24
+ };
25
+ ```
26
+
27
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -0,0 +1,33 @@
1
+ # UserGroup
2
+
3
+ Model to represent user group
4
+
5
+ ## Properties
6
+
7
+ Name | Type | Description | Notes
8
+ ------------ | ------------- | ------------- | -------------
9
+ **user_id** | **string** | | [default to undefined]
10
+ **user** | [**User**](User.md) | | [optional] [default to undefined]
11
+ **group_id** | **string** | | [default to undefined]
12
+ **group** | [**Group**](Group.md) | | [optional] [default to undefined]
13
+ **perm** | **string** | | [optional] [default to PermEnum_User]
14
+ **created_at** | **string** | | [optional] [readonly] [default to undefined]
15
+ **updated_at** | **string** | | [optional] [readonly] [default to undefined]
16
+
17
+ ## Example
18
+
19
+ ```typescript
20
+ import { UserGroup } from 'gopadjs';
21
+
22
+ const instance: UserGroup = {
23
+ user_id,
24
+ user,
25
+ group_id,
26
+ group,
27
+ perm,
28
+ created_at,
29
+ updated_at,
30
+ };
31
+ ```
32
+
33
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -0,0 +1,23 @@
1
+ # Validation
2
+
3
+ General structure to show validation errors
4
+
5
+ ## Properties
6
+
7
+ Name | Type | Description | Notes
8
+ ------------ | ------------- | ------------- | -------------
9
+ **field** | **string** | | [optional] [default to undefined]
10
+ **message** | **string** | | [optional] [default to undefined]
11
+
12
+ ## Example
13
+
14
+ ```typescript
15
+ import { Validation } from 'gopadjs';
16
+
17
+ const instance: Validation = {
18
+ field,
19
+ message,
20
+ };
21
+ ```
22
+
23
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)