@gewis/grooster-backend-ts 1.0.1

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,98 @@
1
+ # RosterShiftApi
2
+
3
+ All URIs are relative to _http://localhost_
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------------------------------------------- | ----------------------------- | ------------------------- |
7
+ | [**createRosterShift**](#createrostershift) | **POST** /roster/shift | Create a new roster shift |
8
+ | [**deleteRosterShift**](#deleterostershift) | **DELETE** /roster/shift/{id} | Deletes a roster shift |
9
+
10
+ # **createRosterShift**
11
+
12
+ > RosterShift createRosterShift(createParams)
13
+
14
+ ### Example
15
+
16
+ ```typescript
17
+ import { RosterShiftApi, Configuration, RosterShiftCreateRequest } from "./api";
18
+
19
+ const configuration = new Configuration();
20
+ const apiInstance = new RosterShiftApi(configuration);
21
+
22
+ let createParams: RosterShiftCreateRequest; //Roster shift input
23
+
24
+ const { status, data } = await apiInstance.createRosterShift(createParams);
25
+ ```
26
+
27
+ ### Parameters
28
+
29
+ | Name | Type | Description | Notes |
30
+ | ---------------- | ---------------------------- | ------------------ | ----- |
31
+ | **createParams** | **RosterShiftCreateRequest** | Roster shift input | |
32
+
33
+ ### Return type
34
+
35
+ **RosterShift**
36
+
37
+ ### Authorization
38
+
39
+ [BearerAuth](../README.md#BearerAuth)
40
+
41
+ ### HTTP request headers
42
+
43
+ - **Content-Type**: application/json
44
+ - **Accept**: application/json
45
+
46
+ ### HTTP response details
47
+
48
+ | Status code | Description | Response headers |
49
+ | ----------- | ----------- | ---------------- |
50
+ | **200** | OK | - |
51
+ | **400** | Bad Request | - |
52
+
53
+ [[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)
54
+
55
+ # **deleteRosterShift**
56
+
57
+ > string deleteRosterShift()
58
+
59
+ ### Example
60
+
61
+ ```typescript
62
+ import { RosterShiftApi, Configuration } from "./api";
63
+
64
+ const configuration = new Configuration();
65
+ const apiInstance = new RosterShiftApi(configuration);
66
+
67
+ let id: number; //Roster Answer ID (default to undefined)
68
+
69
+ const { status, data } = await apiInstance.deleteRosterShift(id);
70
+ ```
71
+
72
+ ### Parameters
73
+
74
+ | Name | Type | Description | Notes |
75
+ | ------ | ------------ | ---------------- | --------------------- |
76
+ | **id** | [**number**] | Roster Answer ID | defaults to undefined |
77
+
78
+ ### Return type
79
+
80
+ **string**
81
+
82
+ ### Authorization
83
+
84
+ [BearerAuth](../README.md#BearerAuth)
85
+
86
+ ### HTTP request headers
87
+
88
+ - **Content-Type**: Not defined
89
+ - **Accept**: application/json
90
+
91
+ ### HTTP response details
92
+
93
+ | Status code | Description | Response headers |
94
+ | ----------- | ----------- | ---------------- |
95
+ | **200** | OK | - |
96
+ | **400** | Bad Request | - |
97
+
98
+ [[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)
@@ -0,0 +1,21 @@
1
+ # RosterShiftCreateRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ------------ | ---------- | ----------- | --------------------------------- |
7
+ | **name** | **string** | | [optional] [default to undefined] |
8
+ | **rosterId** | **number** | | [optional] [default to undefined] |
9
+
10
+ ## Example
11
+
12
+ ```typescript
13
+ import { RosterShiftCreateRequest } from "./api";
14
+
15
+ const instance: RosterShiftCreateRequest = {
16
+ name,
17
+ rosterId,
18
+ };
19
+ ```
20
+
21
+ [[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,29 @@
1
+ # RosterTemplate
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ------------- | ------------------------------------- | ----------- | --------------------------------- |
7
+ | **createdAt** | **string** | | [optional] [default to undefined] |
8
+ | **deletedAt** | [**GormDeletedAt**](GormDeletedAt.md) | | [optional] [default to undefined] |
9
+ | **id** | **number** | | [optional] [default to undefined] |
10
+ | **organId** | **number** | | [optional] [default to undefined] |
11
+ | **shifts** | **Array<string>** | | [optional] [default to undefined] |
12
+ | **updatedAt** | **string** | | [optional] [default to undefined] |
13
+
14
+ ## Example
15
+
16
+ ```typescript
17
+ import { RosterTemplate } from "./api";
18
+
19
+ const instance: RosterTemplate = {
20
+ createdAt,
21
+ deletedAt,
22
+ id,
23
+ organId,
24
+ shifts,
25
+ updatedAt,
26
+ };
27
+ ```
28
+
29
+ [[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,21 @@
1
+ # RosterTemplateCreateRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ----------- | ----------------------- | ----------- | --------------------------------- |
7
+ | **organId** | **number** | | [optional] [default to undefined] |
8
+ | **shifts** | **Array<string>** | | [optional] [default to undefined] |
9
+
10
+ ## Example
11
+
12
+ ```typescript
13
+ import { RosterTemplateCreateRequest } from "./api";
14
+
15
+ const instance: RosterTemplateCreateRequest = {
16
+ organId,
17
+ shifts,
18
+ };
19
+ ```
20
+
21
+ [[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,21 @@
1
+ # RosterUpdateRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | -------- | ---------- | ----------- | --------------------------------- |
7
+ | **date** | **string** | | [optional] [default to undefined] |
8
+ | **name** | **string** | | [optional] [default to undefined] |
9
+
10
+ ## Example
11
+
12
+ ```typescript
13
+ import { RosterUpdateRequest } from "./api";
14
+
15
+ const instance: RosterUpdateRequest = {
16
+ date,
17
+ name,
18
+ };
19
+ ```
20
+
21
+ [[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
+ # SavedShift
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ----------------- | ------------------------------------- | ----------- | --------------------------------- |
7
+ | **createdAt** | **string** | | [optional] [default to undefined] |
8
+ | **deletedAt** | [**GormDeletedAt**](GormDeletedAt.md) | | [optional] [default to undefined] |
9
+ | **id** | **number** | | [optional] [default to undefined] |
10
+ | **rosterId** | **number** | | [optional] [default to undefined] |
11
+ | **rosterShift** | [**RosterShift**](RosterShift.md) | | [optional] [default to undefined] |
12
+ | **rosterShiftId** | **number** | | [optional] [default to undefined] |
13
+ | **updatedAt** | **string** | | [optional] [default to undefined] |
14
+ | **users** | [**Array<User>**](User.md) | | [optional] [default to undefined] |
15
+
16
+ ## Example
17
+
18
+ ```typescript
19
+ import { SavedShift } from "./api";
20
+
21
+ const instance: SavedShift = {
22
+ createdAt,
23
+ deletedAt,
24
+ id,
25
+ rosterId,
26
+ rosterShift,
27
+ rosterShiftId,
28
+ updatedAt,
29
+ users,
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,149 @@
1
+ # SavedShiftApi
2
+
3
+ All URIs are relative to _http://localhost_
4
+
5
+ | Method | HTTP request | Description |
6
+ | ----------------------------------------- | ---------------------------------- | ------------------------------------------ |
7
+ | [**getSavedRoster**](#getsavedroster) | **GET** /roster/saved-shift/{id} | Get all saved shifts for a specific roster |
8
+ | [**rosterSave**](#rostersave) | **POST** /roster/{id}/save | Save a specific roster |
9
+ | [**updateSavedShift**](#updatesavedshift) | **PATCH** /roster/saved-shift/{id} | Update a specific saved shift |
10
+
11
+ # **getSavedRoster**
12
+
13
+ > Array<SavedShift> getSavedRoster()
14
+
15
+ ### Example
16
+
17
+ ```typescript
18
+ import { SavedShiftApi, Configuration } from "./api";
19
+
20
+ const configuration = new Configuration();
21
+ const apiInstance = new SavedShiftApi(configuration);
22
+
23
+ let id: number; //Roster ID (default to undefined)
24
+
25
+ const { status, data } = await apiInstance.getSavedRoster(id);
26
+ ```
27
+
28
+ ### Parameters
29
+
30
+ | Name | Type | Description | Notes |
31
+ | ------ | ------------ | ----------- | --------------------- |
32
+ | **id** | [**number**] | Roster ID | defaults to undefined |
33
+
34
+ ### Return type
35
+
36
+ **Array<SavedShift>**
37
+
38
+ ### Authorization
39
+
40
+ [BearerAuth](../README.md#BearerAuth)
41
+
42
+ ### HTTP request headers
43
+
44
+ - **Content-Type**: Not defined
45
+ - **Accept**: application/json
46
+
47
+ ### HTTP response details
48
+
49
+ | Status code | Description | Response headers |
50
+ | ----------- | -------------------- | ---------------- |
51
+ | **200** | Saved Shifts | - |
52
+ | **400** | Invalid request | - |
53
+ | **404** | SavedShift not found | - |
54
+
55
+ [[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)
56
+
57
+ # **rosterSave**
58
+
59
+ > string rosterSave()
60
+
61
+ ### Example
62
+
63
+ ```typescript
64
+ import { SavedShiftApi, Configuration } from "./api";
65
+
66
+ const configuration = new Configuration();
67
+ const apiInstance = new SavedShiftApi(configuration);
68
+
69
+ let id: number; //Roster ID (default to undefined)
70
+
71
+ const { status, data } = await apiInstance.rosterSave(id);
72
+ ```
73
+
74
+ ### Parameters
75
+
76
+ | Name | Type | Description | Notes |
77
+ | ------ | ------------ | ----------- | --------------------- |
78
+ | **id** | [**number**] | Roster ID | defaults to undefined |
79
+
80
+ ### Return type
81
+
82
+ **string**
83
+
84
+ ### Authorization
85
+
86
+ [BearerAuth](../README.md#BearerAuth)
87
+
88
+ ### HTTP request headers
89
+
90
+ - **Content-Type**: Not defined
91
+ - **Accept**: application/json
92
+
93
+ ### HTTP response details
94
+
95
+ | Status code | Description | Response headers |
96
+ | ----------- | ----------- | ---------------- |
97
+ | **200** | OK | - |
98
+ | **400** | Bad Request | - |
99
+ | **404** | Not Found | - |
100
+
101
+ [[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)
102
+
103
+ # **updateSavedShift**
104
+
105
+ > SavedShift updateSavedShift(updateParams)
106
+
107
+ ### Example
108
+
109
+ ```typescript
110
+ import { SavedShiftApi, Configuration, SavedShiftUpdateRequest } from "./api";
111
+
112
+ const configuration = new Configuration();
113
+ const apiInstance = new SavedShiftApi(configuration);
114
+
115
+ let id: number; //SavedShift ID (default to undefined)
116
+ let updateParams: SavedShiftUpdateRequest; //Update data
117
+
118
+ const { status, data } = await apiInstance.updateSavedShift(id, updateParams);
119
+ ```
120
+
121
+ ### Parameters
122
+
123
+ | Name | Type | Description | Notes |
124
+ | ---------------- | --------------------------- | ------------- | --------------------- |
125
+ | **updateParams** | **SavedShiftUpdateRequest** | Update data | |
126
+ | **id** | [**number**] | SavedShift ID | defaults to undefined |
127
+
128
+ ### Return type
129
+
130
+ **SavedShift**
131
+
132
+ ### Authorization
133
+
134
+ [BearerAuth](../README.md#BearerAuth)
135
+
136
+ ### HTTP request headers
137
+
138
+ - **Content-Type**: application/json
139
+ - **Accept**: application/json
140
+
141
+ ### HTTP response details
142
+
143
+ | Status code | Description | Response headers |
144
+ | ----------- | -------------------- | ---------------- |
145
+ | **200** | OK | - |
146
+ | **400** | Invalid request | - |
147
+ | **404** | SavedShift not found | - |
148
+
149
+ [[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)
@@ -0,0 +1,19 @@
1
+ # SavedShiftUpdateRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | --------- | ----------------------- | ----------- | --------------------------------- |
7
+ | **users** | **Array&lt;number&gt;** | | [optional] [default to undefined] |
8
+
9
+ ## Example
10
+
11
+ ```typescript
12
+ import { SavedShiftUpdateRequest } from "./api";
13
+
14
+ const instance: SavedShiftUpdateRequest = {
15
+ users,
16
+ };
17
+ ```
18
+
19
+ [[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,31 @@
1
+ # User
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ------------- | ------------------------------------- | ----------- | --------------------------------- |
7
+ | **createdAt** | **string** | | [optional] [default to undefined] |
8
+ | **deletedAt** | [**GormDeletedAt**](GormDeletedAt.md) | | [optional] [default to undefined] |
9
+ | **gewis_id** | **number** | | [optional] [default to undefined] |
10
+ | **id** | **number** | | [optional] [default to undefined] |
11
+ | **name** | **string** | | [optional] [default to undefined] |
12
+ | **organs** | [**Array&lt;Organ&gt;**](Organ.md) | | [optional] [default to undefined] |
13
+ | **updatedAt** | **string** | | [optional] [default to undefined] |
14
+
15
+ ## Example
16
+
17
+ ```typescript
18
+ import { User } from "./api";
19
+
20
+ const instance: User = {
21
+ createdAt,
22
+ deletedAt,
23
+ gewis_id,
24
+ id,
25
+ name,
26
+ organs,
27
+ updatedAt,
28
+ };
29
+ ```
30
+
31
+ [[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,200 @@
1
+ # UserApi
2
+
3
+ All URIs are relative to _http://localhost_
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------------------------------------- | --------------------- | ------------------------------------- |
7
+ | [**userCreatePost**](#usercreatepost) | **POST** /user/create | CreateRoster a new user |
8
+ | [**userGet**](#userget) | **GET** /user/ | Get all users with optional filtering |
9
+ | [**userIdDelete**](#useriddelete) | **DELETE** /user/{id} | DeleteRoster a user |
10
+ | [**userIdGet**](#useridget) | **GET** /user/{id} | Get user by ID |
11
+
12
+ # **userCreatePost**
13
+
14
+ > User userCreatePost(createParams)
15
+
16
+ create user
17
+
18
+ ### Example
19
+
20
+ ```typescript
21
+ import { UserApi, Configuration, UserCreateRequest } from "./api";
22
+
23
+ const configuration = new Configuration();
24
+ const apiInstance = new UserApi(configuration);
25
+
26
+ let createParams: UserCreateRequest; //User input
27
+
28
+ const { status, data } = await apiInstance.userCreatePost(createParams);
29
+ ```
30
+
31
+ ### Parameters
32
+
33
+ | Name | Type | Description | Notes |
34
+ | ---------------- | --------------------- | ----------- | ----- |
35
+ | **createParams** | **UserCreateRequest** | User input | |
36
+
37
+ ### Return type
38
+
39
+ **User**
40
+
41
+ ### Authorization
42
+
43
+ [BearerAuth](../README.md#BearerAuth)
44
+
45
+ ### HTTP request headers
46
+
47
+ - **Content-Type**: application/json
48
+ - **Accept**: application/json
49
+
50
+ ### HTTP response details
51
+
52
+ | Status code | Description | Response headers |
53
+ | ----------- | ----------- | ---------------- |
54
+ | **200** | OK | - |
55
+ | **400** | Bad Request | - |
56
+
57
+ [[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)
58
+
59
+ # **userGet**
60
+
61
+ > Array<User> userGet()
62
+
63
+ Retrieve a list of users with optional query parameter filtering
64
+
65
+ ### Example
66
+
67
+ ```typescript
68
+ import { UserApi, Configuration } from "./api";
69
+
70
+ const configuration = new Configuration();
71
+ const apiInstance = new UserApi(configuration);
72
+
73
+ let organId: number; //Organ ID (optional) (default to undefined)
74
+ let gewisId: number; //GEWIS ID (optional) (default to undefined)
75
+
76
+ const { status, data } = await apiInstance.userGet(organId, gewisId);
77
+ ```
78
+
79
+ ### Parameters
80
+
81
+ | Name | Type | Description | Notes |
82
+ | ----------- | ------------ | ----------- | -------------------------------- |
83
+ | **organId** | [**number**] | Organ ID | (optional) defaults to undefined |
84
+ | **gewisId** | [**number**] | GEWIS ID | (optional) defaults to undefined |
85
+
86
+ ### Return type
87
+
88
+ **Array<User>**
89
+
90
+ ### Authorization
91
+
92
+ [BearerAuth](../README.md#BearerAuth)
93
+
94
+ ### HTTP request headers
95
+
96
+ - **Content-Type**: Not defined
97
+ - **Accept**: application/json
98
+
99
+ ### HTTP response details
100
+
101
+ | Status code | Description | Response headers |
102
+ | ----------- | ----------- | ---------------- |
103
+ | **200** | OK | - |
104
+ | **400** | Bad Request | - |
105
+
106
+ [[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)
107
+
108
+ # **userIdDelete**
109
+
110
+ > string userIdDelete()
111
+
112
+ ### Example
113
+
114
+ ```typescript
115
+ import { UserApi, Configuration } from "./api";
116
+
117
+ const configuration = new Configuration();
118
+ const apiInstance = new UserApi(configuration);
119
+
120
+ let id: number; //User ID (default to undefined)
121
+
122
+ const { status, data } = await apiInstance.userIdDelete(id);
123
+ ```
124
+
125
+ ### Parameters
126
+
127
+ | Name | Type | Description | Notes |
128
+ | ------ | ------------ | ----------- | --------------------- |
129
+ | **id** | [**number**] | User ID | defaults to undefined |
130
+
131
+ ### Return type
132
+
133
+ **string**
134
+
135
+ ### Authorization
136
+
137
+ [BearerAuth](../README.md#BearerAuth)
138
+
139
+ ### HTTP request headers
140
+
141
+ - **Content-Type**: Not defined
142
+ - **Accept**: application/json
143
+
144
+ ### HTTP response details
145
+
146
+ | Status code | Description | Response headers |
147
+ | ----------- | ----------- | ---------------- |
148
+ | **200** | OK | - |
149
+ | **400** | Bad Request | - |
150
+ | **404** | Not Found | - |
151
+
152
+ [[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)
153
+
154
+ # **userIdGet**
155
+
156
+ > User userIdGet()
157
+
158
+ Retrieve a specific user by their unique ID
159
+
160
+ ### Example
161
+
162
+ ```typescript
163
+ import { UserApi, Configuration } from "./api";
164
+
165
+ const configuration = new Configuration();
166
+ const apiInstance = new UserApi(configuration);
167
+
168
+ let id: number; //User ID (default to undefined)
169
+
170
+ const { status, data } = await apiInstance.userIdGet(id);
171
+ ```
172
+
173
+ ### Parameters
174
+
175
+ | Name | Type | Description | Notes |
176
+ | ------ | ------------ | ----------- | --------------------- |
177
+ | **id** | [**number**] | User ID | defaults to undefined |
178
+
179
+ ### Return type
180
+
181
+ **User**
182
+
183
+ ### Authorization
184
+
185
+ [BearerAuth](../README.md#BearerAuth)
186
+
187
+ ### HTTP request headers
188
+
189
+ - **Content-Type**: Not defined
190
+ - **Accept**: application/json
191
+
192
+ ### HTTP response details
193
+
194
+ | Status code | Description | Response headers |
195
+ | ----------- | ----------- | ---------------- |
196
+ | **200** | OK | - |
197
+ | **400** | Bad Request | - |
198
+ | **404** | Not Found | - |
199
+
200
+ [[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)
@@ -0,0 +1,23 @@
1
+ # UserCreateRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ----------- | ---------------------------------- | ----------- | --------------------------------- |
7
+ | **gewisid** | **number** | | [optional] [default to undefined] |
8
+ | **name** | **string** | | [optional] [default to undefined] |
9
+ | **organs** | [**Array&lt;Organ&gt;**](Organ.md) | | [optional] [default to undefined] |
10
+
11
+ ## Example
12
+
13
+ ```typescript
14
+ import { UserCreateRequest } from "./api";
15
+
16
+ const instance: UserCreateRequest = {
17
+ gewisid,
18
+ name,
19
+ organs,
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)