@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,109 @@
1
+ # RosterAnswerApi
2
+
3
+ All URIs are relative to _http://localhost_
4
+
5
+ | Method | HTTP request | Description |
6
+ | --------------------------------------------- | ----------------------------- | ------------------------------------------ |
7
+ | [**createRosterAnswer**](#createrosteranswer) | **POST** /roster/answer | Create a new roster shift answer |
8
+ | [**updateRosterAnswer**](#updaterosteranswer) | **PATCH** /roster/answer/{id} | Updates a roster answer with the new value |
9
+
10
+ # **createRosterAnswer**
11
+
12
+ > RosterAnswer createRosterAnswer(createParams)
13
+
14
+ ### Example
15
+
16
+ ```typescript
17
+ import {
18
+ RosterAnswerApi,
19
+ Configuration,
20
+ RosterAnswerCreateRequest,
21
+ } from "./api";
22
+
23
+ const configuration = new Configuration();
24
+ const apiInstance = new RosterAnswerApi(configuration);
25
+
26
+ let createParams: RosterAnswerCreateRequest; //Roster answer input
27
+
28
+ const { status, data } = await apiInstance.createRosterAnswer(createParams);
29
+ ```
30
+
31
+ ### Parameters
32
+
33
+ | Name | Type | Description | Notes |
34
+ | ---------------- | ----------------------------- | ------------------- | ----- |
35
+ | **createParams** | **RosterAnswerCreateRequest** | Roster answer input | |
36
+
37
+ ### Return type
38
+
39
+ **RosterAnswer**
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
+ # **updateRosterAnswer**
60
+
61
+ > RosterAnswer updateRosterAnswer(updateParams)
62
+
63
+ ### Example
64
+
65
+ ```typescript
66
+ import {
67
+ RosterAnswerApi,
68
+ Configuration,
69
+ RosterAnswerUpdateRequest,
70
+ } from "./api";
71
+
72
+ const configuration = new Configuration();
73
+ const apiInstance = new RosterAnswerApi(configuration);
74
+
75
+ let id: number; //Roster Answer ID (default to undefined)
76
+ let updateParams: RosterAnswerUpdateRequest; //New answer value
77
+
78
+ const { status, data } = await apiInstance.updateRosterAnswer(id, updateParams);
79
+ ```
80
+
81
+ ### Parameters
82
+
83
+ | Name | Type | Description | Notes |
84
+ | ---------------- | ----------------------------- | ---------------- | --------------------- |
85
+ | **updateParams** | **RosterAnswerUpdateRequest** | New answer value | |
86
+ | **id** | [**number**] | Roster Answer ID | defaults to undefined |
87
+
88
+ ### Return type
89
+
90
+ **RosterAnswer**
91
+
92
+ ### Authorization
93
+
94
+ [BearerAuth](../README.md#BearerAuth)
95
+
96
+ ### HTTP request headers
97
+
98
+ - **Content-Type**: application/json
99
+ - **Accept**: application/json
100
+
101
+ ### HTTP response details
102
+
103
+ | Status code | Description | Response headers |
104
+ | ----------- | ----------- | ---------------- |
105
+ | **200** | OK | - |
106
+ | **400** | Bad Request | - |
107
+ | **404** | Not Found | - |
108
+
109
+ [[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,25 @@
1
+ # RosterAnswerCreateRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ----------------- | ---------- | ----------- | --------------------------------- |
7
+ | **rosterId** | **number** | | [optional] [default to undefined] |
8
+ | **rosterShiftId** | **number** | | [optional] [default to undefined] |
9
+ | **userId** | **number** | | [optional] [default to undefined] |
10
+ | **value** | **string** | | [optional] [default to undefined] |
11
+
12
+ ## Example
13
+
14
+ ```typescript
15
+ import { RosterAnswerCreateRequest } from "./api";
16
+
17
+ const instance: RosterAnswerCreateRequest = {
18
+ rosterId,
19
+ rosterShiftId,
20
+ userId,
21
+ value,
22
+ };
23
+ ```
24
+
25
+ [[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,19 @@
1
+ # RosterAnswerUpdateRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | --------- | ---------- | ----------- | --------------------------------- |
7
+ | **value** | **string** | | [optional] [default to undefined] |
8
+
9
+ ## Example
10
+
11
+ ```typescript
12
+ import { RosterAnswerUpdateRequest } from "./api";
13
+
14
+ const instance: RosterAnswerUpdateRequest = {
15
+ value,
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,428 @@
1
+ # RosterApi
2
+
3
+ All URIs are relative to _http://localhost_
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------------------------------------------------- | -------------------------------- | ----------------------------------------------------------------- |
7
+ | [**createRoster**](#createroster) | **POST** /roster | CreateRoster a new roster |
8
+ | [**createRosterTemplate**](#createrostertemplate) | **POST** /roster/template | Creates a template of a roster by defining the name of the shifts |
9
+ | [**deleteRoster**](#deleteroster) | **DELETE** /roster/{id} | DeleteRoster a roster |
10
+ | [**deleteRosterTemplate**](#deleterostertemplate) | **DELETE** /roster/template/{id} | Deletes a roster template by ID |
11
+ | [**getRoster**](#getroster) | **GET** /roster/{id} | Get a specific roster by id |
12
+ | [**getRosterTemplate**](#getrostertemplate) | **GET** /roster/template/{id} | Get a roster template by ID |
13
+ | [**getRosterTemplates**](#getrostertemplates) | **GET** /roster/template | Get all rosters templates or query by organ ID |
14
+ | [**getRosters**](#getrosters) | **GET** /roster | Get all rosters or query by date and organ |
15
+ | [**updateRoster**](#updateroster) | **PATCH** /roster/{id} | Update a roster |
16
+
17
+ # **createRoster**
18
+
19
+ > Roster createRoster(createParams)
20
+
21
+ ### Example
22
+
23
+ ```typescript
24
+ import { RosterApi, Configuration, RosterCreateRequest } from "./api";
25
+
26
+ const configuration = new Configuration();
27
+ const apiInstance = new RosterApi(configuration);
28
+
29
+ let createParams: RosterCreateRequest; //Roster input
30
+
31
+ const { status, data } = await apiInstance.createRoster(createParams);
32
+ ```
33
+
34
+ ### Parameters
35
+
36
+ | Name | Type | Description | Notes |
37
+ | ---------------- | ----------------------- | ------------ | ----- |
38
+ | **createParams** | **RosterCreateRequest** | Roster input | |
39
+
40
+ ### Return type
41
+
42
+ **Roster**
43
+
44
+ ### Authorization
45
+
46
+ [BearerAuth](../README.md#BearerAuth)
47
+
48
+ ### HTTP request headers
49
+
50
+ - **Content-Type**: application/json
51
+ - **Accept**: application/json
52
+
53
+ ### HTTP response details
54
+
55
+ | Status code | Description | Response headers |
56
+ | ----------- | ----------- | ---------------- |
57
+ | **200** | OK | - |
58
+ | **400** | Bad Request | - |
59
+
60
+ [[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)
61
+
62
+ # **createRosterTemplate**
63
+
64
+ > Array<SavedShift> createRosterTemplate()
65
+
66
+ ### Example
67
+
68
+ ```typescript
69
+ import { RosterApi, Configuration, RosterTemplateCreateRequest } from "./api";
70
+
71
+ const configuration = new Configuration();
72
+ const apiInstance = new RosterApi(configuration);
73
+
74
+ let params: RosterTemplateCreateRequest; //Template Params (optional)
75
+
76
+ const { status, data } = await apiInstance.createRosterTemplate(params);
77
+ ```
78
+
79
+ ### Parameters
80
+
81
+ | Name | Type | Description | Notes |
82
+ | ---------- | ------------------------------- | --------------- | ----- |
83
+ | **params** | **RosterTemplateCreateRequest** | Template Params | |
84
+
85
+ ### Return type
86
+
87
+ **Array<SavedShift>**
88
+
89
+ ### Authorization
90
+
91
+ [BearerAuth](../README.md#BearerAuth)
92
+
93
+ ### HTTP request headers
94
+
95
+ - **Content-Type**: application/json
96
+ - **Accept**: application/json
97
+
98
+ ### HTTP response details
99
+
100
+ | Status code | Description | Response headers |
101
+ | ----------- | ---------------- | ---------------- |
102
+ | **200** | Created Template | - |
103
+ | **400** | Invalid request | - |
104
+
105
+ [[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)
106
+
107
+ # **deleteRoster**
108
+
109
+ > string deleteRoster()
110
+
111
+ ### Example
112
+
113
+ ```typescript
114
+ import { RosterApi, Configuration } from "./api";
115
+
116
+ const configuration = new Configuration();
117
+ const apiInstance = new RosterApi(configuration);
118
+
119
+ let id: number; //Roster ID (default to undefined)
120
+
121
+ const { status, data } = await apiInstance.deleteRoster(id);
122
+ ```
123
+
124
+ ### Parameters
125
+
126
+ | Name | Type | Description | Notes |
127
+ | ------ | ------------ | ----------- | --------------------- |
128
+ | **id** | [**number**] | Roster ID | defaults to undefined |
129
+
130
+ ### Return type
131
+
132
+ **string**
133
+
134
+ ### Authorization
135
+
136
+ [BearerAuth](../README.md#BearerAuth)
137
+
138
+ ### HTTP request headers
139
+
140
+ - **Content-Type**: Not defined
141
+ - **Accept**: application/json
142
+
143
+ ### HTTP response details
144
+
145
+ | Status code | Description | Response headers |
146
+ | ----------- | ----------- | ---------------- |
147
+ | **200** | OK | - |
148
+ | **400** | Bad Request | - |
149
+ | **404** | Not Found | - |
150
+
151
+ [[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)
152
+
153
+ # **deleteRosterTemplate**
154
+
155
+ > string deleteRosterTemplate()
156
+
157
+ ### Example
158
+
159
+ ```typescript
160
+ import { RosterApi, Configuration } from "./api";
161
+
162
+ const configuration = new Configuration();
163
+ const apiInstance = new RosterApi(configuration);
164
+
165
+ let id: number; //Template ID (default to undefined)
166
+
167
+ const { status, data } = await apiInstance.deleteRosterTemplate(id);
168
+ ```
169
+
170
+ ### Parameters
171
+
172
+ | Name | Type | Description | Notes |
173
+ | ------ | ------------ | ----------- | --------------------- |
174
+ | **id** | [**number**] | Template ID | defaults to undefined |
175
+
176
+ ### Return type
177
+
178
+ **string**
179
+
180
+ ### Authorization
181
+
182
+ [BearerAuth](../README.md#BearerAuth)
183
+
184
+ ### HTTP request headers
185
+
186
+ - **Content-Type**: Not defined
187
+ - **Accept**: application/json
188
+
189
+ ### HTTP response details
190
+
191
+ | Status code | Description | Response headers |
192
+ | ----------- | ----------- | ---------------- |
193
+ | **200** | OK | - |
194
+ | **400** | Bad Request | - |
195
+ | **404** | Not Found | - |
196
+
197
+ [[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)
198
+
199
+ # **getRoster**
200
+
201
+ > Roster getRoster()
202
+
203
+ ### Example
204
+
205
+ ```typescript
206
+ import { RosterApi, Configuration } from "./api";
207
+
208
+ const configuration = new Configuration();
209
+ const apiInstance = new RosterApi(configuration);
210
+
211
+ let id: number; //Roster ID (default to undefined)
212
+
213
+ const { status, data } = await apiInstance.getRoster(id);
214
+ ```
215
+
216
+ ### Parameters
217
+
218
+ | Name | Type | Description | Notes |
219
+ | ------ | ------------ | ----------- | --------------------- |
220
+ | **id** | [**number**] | Roster ID | defaults to undefined |
221
+
222
+ ### Return type
223
+
224
+ **Roster**
225
+
226
+ ### Authorization
227
+
228
+ [BearerAuth](../README.md#BearerAuth)
229
+
230
+ ### HTTP request headers
231
+
232
+ - **Content-Type**: Not defined
233
+ - **Accept**: application/json
234
+
235
+ ### HTTP response details
236
+
237
+ | Status code | Description | Response headers |
238
+ | ----------- | ----------- | ---------------- |
239
+ | **200** | OK | - |
240
+ | **400** | Bad Request | - |
241
+ | **404** | Not Found | - |
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
+ # **getRosterTemplate**
246
+
247
+ > RosterTemplate getRosterTemplate()
248
+
249
+ ### Example
250
+
251
+ ```typescript
252
+ import { RosterApi, Configuration } from "./api";
253
+
254
+ const configuration = new Configuration();
255
+ const apiInstance = new RosterApi(configuration);
256
+
257
+ let id: number; //Template ID (default to undefined)
258
+
259
+ const { status, data } = await apiInstance.getRosterTemplate(id);
260
+ ```
261
+
262
+ ### Parameters
263
+
264
+ | Name | Type | Description | Notes |
265
+ | ------ | ------------ | ----------- | --------------------- |
266
+ | **id** | [**number**] | Template ID | defaults to undefined |
267
+
268
+ ### Return type
269
+
270
+ **RosterTemplate**
271
+
272
+ ### Authorization
273
+
274
+ [BearerAuth](../README.md#BearerAuth)
275
+
276
+ ### HTTP request headers
277
+
278
+ - **Content-Type**: Not defined
279
+ - **Accept**: application/json
280
+
281
+ ### HTTP response details
282
+
283
+ | Status code | Description | Response headers |
284
+ | ----------- | ----------- | ---------------- |
285
+ | **200** | OK | - |
286
+ | **400** | Bad Request | - |
287
+ | **404** | Not Found | - |
288
+
289
+ [[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)
290
+
291
+ # **getRosterTemplates**
292
+
293
+ > Array<RosterTemplate> getRosterTemplates()
294
+
295
+ ### Example
296
+
297
+ ```typescript
298
+ import { RosterApi, Configuration } from "./api";
299
+
300
+ const configuration = new Configuration();
301
+ const apiInstance = new RosterApi(configuration);
302
+
303
+ let organId: number; // (optional) (default to undefined)
304
+
305
+ const { status, data } = await apiInstance.getRosterTemplates(organId);
306
+ ```
307
+
308
+ ### Parameters
309
+
310
+ | Name | Type | Description | Notes |
311
+ | ----------- | ------------ | ----------- | -------------------------------- |
312
+ | **organId** | [**number**] | | (optional) defaults to undefined |
313
+
314
+ ### Return type
315
+
316
+ **Array<RosterTemplate>**
317
+
318
+ ### Authorization
319
+
320
+ [BearerAuth](../README.md#BearerAuth)
321
+
322
+ ### HTTP request headers
323
+
324
+ - **Content-Type**: Not defined
325
+ - **Accept**: application/json
326
+
327
+ ### HTTP response details
328
+
329
+ | Status code | Description | Response headers |
330
+ | ----------- | ----------- | ---------------- |
331
+ | **200** | OK | - |
332
+ | **400** | Bad Request | - |
333
+
334
+ [[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)
335
+
336
+ # **getRosters**
337
+
338
+ > Array<Roster> getRosters()
339
+
340
+ ### Example
341
+
342
+ ```typescript
343
+ import { RosterApi, Configuration } from "./api";
344
+
345
+ const configuration = new Configuration();
346
+ const apiInstance = new RosterApi(configuration);
347
+
348
+ let date: string; //Date filter (ISO format) (optional) (default to undefined)
349
+ let organId: number; //Organ ID filter (optional) (default to undefined)
350
+
351
+ const { status, data } = await apiInstance.getRosters(date, organId);
352
+ ```
353
+
354
+ ### Parameters
355
+
356
+ | Name | Type | Description | Notes |
357
+ | ----------- | ------------ | ------------------------ | -------------------------------- |
358
+ | **date** | [**string**] | Date filter (ISO format) | (optional) defaults to undefined |
359
+ | **organId** | [**number**] | Organ ID filter | (optional) defaults to undefined |
360
+
361
+ ### Return type
362
+
363
+ **Array<Roster>**
364
+
365
+ ### Authorization
366
+
367
+ [BearerAuth](../README.md#BearerAuth)
368
+
369
+ ### HTTP request headers
370
+
371
+ - **Content-Type**: Not defined
372
+ - **Accept**: application/json
373
+
374
+ ### HTTP response details
375
+
376
+ | Status code | Description | Response headers |
377
+ | ----------- | ----------- | ---------------- |
378
+ | **200** | OK | - |
379
+ | **400** | Bad Request | - |
380
+
381
+ [[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)
382
+
383
+ # **updateRoster**
384
+
385
+ > Roster updateRoster(updateParams)
386
+
387
+ ### Example
388
+
389
+ ```typescript
390
+ import { RosterApi, Configuration, RosterUpdateRequest } from "./api";
391
+
392
+ const configuration = new Configuration();
393
+ const apiInstance = new RosterApi(configuration);
394
+
395
+ let id: number; //Roster ID (default to undefined)
396
+ let updateParams: RosterUpdateRequest; //Roster input
397
+
398
+ const { status, data } = await apiInstance.updateRoster(id, updateParams);
399
+ ```
400
+
401
+ ### Parameters
402
+
403
+ | Name | Type | Description | Notes |
404
+ | ---------------- | ----------------------- | ------------ | --------------------- |
405
+ | **updateParams** | **RosterUpdateRequest** | Roster input | |
406
+ | **id** | [**number**] | Roster ID | defaults to undefined |
407
+
408
+ ### Return type
409
+
410
+ **Roster**
411
+
412
+ ### Authorization
413
+
414
+ [BearerAuth](../README.md#BearerAuth)
415
+
416
+ ### HTTP request headers
417
+
418
+ - **Content-Type**: application/json
419
+ - **Accept**: application/json
420
+
421
+ ### HTTP response details
422
+
423
+ | Status code | Description | Response headers |
424
+ | ----------- | ----------- | ---------------- |
425
+ | **200** | OK | - |
426
+ | **400** | Bad Request | - |
427
+
428
+ [[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,25 @@
1
+ # RosterCreateRequest
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
+ | **organId** | **number** | | [optional] [default to undefined] |
10
+ | **shifts** | **Array&lt;string&gt;** | | [optional] [default to undefined] |
11
+
12
+ ## Example
13
+
14
+ ```typescript
15
+ import { RosterCreateRequest } from "./api";
16
+
17
+ const instance: RosterCreateRequest = {
18
+ date,
19
+ name,
20
+ organId,
21
+ shifts,
22
+ };
23
+ ```
24
+
25
+ [[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
+ # RosterShift
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
+ | **name** | **string** | | [optional] [default to undefined] |
11
+ | **rosterId** | **number** | | [optional] [default to undefined] |
12
+ | **updatedAt** | **string** | | [optional] [default to undefined] |
13
+
14
+ ## Example
15
+
16
+ ```typescript
17
+ import { RosterShift } from "./api";
18
+
19
+ const instance: RosterShift = {
20
+ createdAt,
21
+ deletedAt,
22
+ id,
23
+ name,
24
+ rosterId,
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)