/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { Body_upload_passport_image } from '../models/Body_upload_passport_image';
import type { CreateUserRequest } from '../models/CreateUserRequest';
import type { CreateUserResponse } from '../models/CreateUserResponse';
import type { GetAllUsersResponse } from '../models/GetAllUsersResponse';
import type { GetManagersResponse } from '../models/GetManagersResponse';
import type { UpdateUserDepartmentSectionsRequest } from '../models/UpdateUserDepartmentSectionsRequest';
import type { UpdateUserDepartmentSectionsResponse } from '../models/UpdateUserDepartmentSectionsResponse';
import type { UpdateUserRequest } from '../models/UpdateUserRequest';
import type { UpdateUserResponse } from '../models/UpdateUserResponse';
import type { UploadPassportImageResponse } from '../models/UploadPassportImageResponse';
import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';
export class UserService {
    /**
     * Get All
     * @returns GetAllUsersResponse Successful Response
     * @throws ApiError
     */
    public static getAllUsers(): CancelablePromise<GetAllUsersResponse> {
        return __request(OpenAPI, {
            method: 'GET',
            url: '/user/get-all',
        });
    }
    /**
     * Update
     * @returns UpdateUserResponse Successful Response
     * @throws ApiError
     */
    public static updateUser({
        requestBody,
    }: {
        requestBody: UpdateUserRequest,
    }): CancelablePromise<UpdateUserResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/user/update',
            body: requestBody,
            mediaType: 'application/json',
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Update User Department Sections
     * @returns UpdateUserDepartmentSectionsResponse Successful Response
     * @throws ApiError
     */
    public static updateUserDepartmentSections({
        userId,
        requestBody,
    }: {
        userId: number,
        requestBody: UpdateUserDepartmentSectionsRequest,
    }): CancelablePromise<UpdateUserDepartmentSectionsResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/user/update/department-sections/{user_id}',
            path: {
                'user_id': userId,
            },
            body: requestBody,
            mediaType: 'application/json',
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Create
     * @returns CreateUserResponse Successful Response
     * @throws ApiError
     */
    public static createUser({
        requestBody,
    }: {
        requestBody: CreateUserRequest,
    }): CancelablePromise<CreateUserResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/user/create',
            body: requestBody,
            mediaType: 'application/json',
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Get Managers
     * @returns GetManagersResponse Successful Response
     * @throws ApiError
     */
    public static getManagers(): CancelablePromise<GetManagersResponse> {
        return __request(OpenAPI, {
            method: 'GET',
            url: '/user/get-managers',
        });
    }
    /**
     * Upload Passport Image
     * @returns UploadPassportImageResponse Successful Response
     * @throws ApiError
     */
    public static uploadPassportImage({
        userId,
        formData,
    }: {
        userId: number,
        formData: Body_upload_passport_image,
    }): CancelablePromise<UploadPassportImageResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/user/passport-images/upload/{user_id}',
            path: {
                'user_id': userId,
            },
            formData: formData,
            mediaType: 'multipart/form-data',
            errors: {
                422: `Validation Error`,
            },
        });
    }
}
