/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* 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';
import { request as __request } from '../core/request';
export class WorkShiftsService {
    /**
     * Generate Qr Code
     * @returns any Successful Response
     * @throws ApiError
     */
    public static generateQrCode({
        userId,
    }: {
        userId: number,
    }): CancelablePromise<any> {
        return __request(OpenAPI, {
            method: 'GET',
            url: '/work-shifts/generate-qr-code/{user_id}',
            path: {
                'user_id': userId,
            },
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Start Shift
     * @returns StartShiftResponse Successful Response
     * @throws ApiError
     */
    public static startShift({
        userId,
    }: {
        userId: number,
    }): CancelablePromise<StartShiftResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/work-shifts/start-shift/{user_id}',
            path: {
                'user_id': userId,
            },
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Finish Shift
     * @returns FinishShiftResponse Successful Response
     * @throws ApiError
     */
    public static finishShift({
        userId,
    }: {
        userId: number,
    }): CancelablePromise<FinishShiftResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/work-shifts/finish-shift/{user_id}',
            path: {
                'user_id': userId,
            },
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Finish Work Shift By Id
     * @returns FinishShiftByIdResponse Successful Response
     * @throws ApiError
     */
    public static finishWorkShiftById({
        shiftId,
    }: {
        shiftId: number,
    }): CancelablePromise<FinishShiftByIdResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/work-shifts/finish-shift-by-id/{shift_id}',
            path: {
                'shift_id': shiftId,
            },
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Get Shifts
     * @returns GetWorkShiftsResponse Successful Response
     * @throws ApiError
     */
    public static getShifts({
        isActive,
        page,
        itemsPerPage,
    }: {
        isActive: boolean,
        page?: (number | null),
        itemsPerPage?: (number | null),
    }): CancelablePromise<GetWorkShiftsResponse> {
        return __request(OpenAPI, {
            method: 'GET',
            url: '/work-shifts/get-shifts/{is_active}',
            path: {
                'is_active': isActive,
            },
            query: {
                'page': page,
                'items_per_page': itemsPerPage,
            },
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Delete Work Shift
     * @returns DeleteShiftResponse Successful Response
     * @throws ApiError
     */
    public static deleteWorkShift({
        shiftId,
    }: {
        shiftId: number,
    }): CancelablePromise<DeleteShiftResponse> {
        return __request(OpenAPI, {
            method: 'DELETE',
            url: '/work-shifts/delete-shift/{shift_id}',
            path: {
                'shift_id': shiftId,
            },
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * 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`,
            },
        });
    }
}
