feat: work shift pauses
This commit is contained in:
@@ -3,9 +3,13 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { DeleteShiftResponse } from '../models/DeleteShiftResponse';
|
||||
import type { FinishPauseByShiftIdResponse } from '../models/FinishPauseByShiftIdResponse';
|
||||
import type { FinishPauseByUserIdResponse } from '../models/FinishPauseByUserIdResponse';
|
||||
import type { FinishShiftByIdResponse } from '../models/FinishShiftByIdResponse';
|
||||
import type { FinishShiftResponse } from '../models/FinishShiftResponse';
|
||||
import type { GetWorkShiftsResponse } from '../models/GetWorkShiftsResponse';
|
||||
import type { StartPauseByShiftIdResponse } from '../models/StartPauseByShiftIdResponse';
|
||||
import type { StartPauseByUserIdResponse } from '../models/StartPauseByUserIdResponse';
|
||||
import type { StartShiftResponse } from '../models/StartShiftResponse';
|
||||
import type { CancelablePromise } from '../core/CancelablePromise';
|
||||
import { OpenAPI } from '../core/OpenAPI';
|
||||
@@ -145,4 +149,88 @@ export class WorkShiftsService {
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Start Pause By Shift Id
|
||||
* @returns StartPauseByShiftIdResponse Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static startPauseByShiftId({
|
||||
shiftId,
|
||||
}: {
|
||||
shiftId: number,
|
||||
}): CancelablePromise<StartPauseByShiftIdResponse> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/work-shifts/pause/start/{shift_id}',
|
||||
path: {
|
||||
'shift_id': shiftId,
|
||||
},
|
||||
errors: {
|
||||
422: `Validation Error`,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Start Pause By User Id
|
||||
* @returns StartPauseByUserIdResponse Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static startPauseByUserId({
|
||||
userId,
|
||||
}: {
|
||||
userId: number,
|
||||
}): CancelablePromise<StartPauseByUserIdResponse> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/work-shifts/pause/start/for-user/{user_id}',
|
||||
path: {
|
||||
'user_id': userId,
|
||||
},
|
||||
errors: {
|
||||
422: `Validation Error`,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Finish Pause By Shift Id
|
||||
* @returns FinishPauseByShiftIdResponse Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static finishPauseByShiftId({
|
||||
shiftId,
|
||||
}: {
|
||||
shiftId: number,
|
||||
}): CancelablePromise<FinishPauseByShiftIdResponse> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/work-shifts/pause/finish/{shift_id}',
|
||||
path: {
|
||||
'shift_id': shiftId,
|
||||
},
|
||||
errors: {
|
||||
422: `Validation Error`,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Finish Pause By User Id
|
||||
* @returns FinishPauseByUserIdResponse Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static finishPauseByUserId({
|
||||
userId,
|
||||
}: {
|
||||
userId: number,
|
||||
}): CancelablePromise<FinishPauseByUserIdResponse> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/work-shifts/pause/finish/for-user/{shift_id}',
|
||||
query: {
|
||||
'user_id': userId,
|
||||
},
|
||||
errors: {
|
||||
422: `Validation Error`,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user