feat: work shift pauses
This commit is contained in:
		@@ -149,6 +149,8 @@ export type { DeleteShippingWarehouseRequest } from './models/DeleteShippingWare
 | 
			
		||||
export type { DeleteShippingWarehouseResponse } from './models/DeleteShippingWarehouseResponse';
 | 
			
		||||
export type { ExpenseSchemaBase } from './models/ExpenseSchemaBase';
 | 
			
		||||
export type { ExpenseTagSchema } from './models/ExpenseTagSchema';
 | 
			
		||||
export type { FinishPauseByShiftIdResponse } from './models/FinishPauseByShiftIdResponse';
 | 
			
		||||
export type { FinishPauseByUserIdResponse } from './models/FinishPauseByUserIdResponse';
 | 
			
		||||
export type { FinishShiftByIdResponse } from './models/FinishShiftByIdResponse';
 | 
			
		||||
export type { FinishShiftResponse } from './models/FinishShiftResponse';
 | 
			
		||||
export type { GetAllBarcodeTemplateAttributesResponse } from './models/GetAllBarcodeTemplateAttributesResponse';
 | 
			
		||||
@@ -245,6 +247,8 @@ export type { ServiceUpdateCategoryResponse } from './models/ServiceUpdateCatego
 | 
			
		||||
export type { ServiceUpdateRequest } from './models/ServiceUpdateRequest';
 | 
			
		||||
export type { ServiceUpdateResponse } from './models/ServiceUpdateResponse';
 | 
			
		||||
export type { ShippingWarehouseSchema } from './models/ShippingWarehouseSchema';
 | 
			
		||||
export type { StartPauseByShiftIdResponse } from './models/StartPauseByShiftIdResponse';
 | 
			
		||||
export type { StartPauseByUserIdResponse } from './models/StartPauseByUserIdResponse';
 | 
			
		||||
export type { StartShiftResponse } from './models/StartShiftResponse';
 | 
			
		||||
export type { SynchronizeMarketplaceRequest } from './models/SynchronizeMarketplaceRequest';
 | 
			
		||||
export type { TaskInfoResponse } from './models/TaskInfoResponse';
 | 
			
		||||
@@ -274,6 +278,7 @@ export type { UserCreate } from './models/UserCreate';
 | 
			
		||||
export type { UserSchema } from './models/UserSchema';
 | 
			
		||||
export type { UserUpdate } from './models/UserUpdate';
 | 
			
		||||
export type { ValidationError } from './models/ValidationError';
 | 
			
		||||
export type { WorkShiftRowSchema } from './models/WorkShiftRowSchema';
 | 
			
		||||
export type { WorkShiftSchema } from './models/WorkShiftSchema';
 | 
			
		||||
 | 
			
		||||
export { AuthService } from './services/AuthService';
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										9
									
								
								src/client/models/FinishPauseByShiftIdResponse.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								src/client/models/FinishPauseByShiftIdResponse.ts
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,9 @@
 | 
			
		||||
/* generated using openapi-typescript-codegen -- do not edit */
 | 
			
		||||
/* istanbul ignore file */
 | 
			
		||||
/* tslint:disable */
 | 
			
		||||
/* eslint-disable */
 | 
			
		||||
export type FinishPauseByShiftIdResponse = {
 | 
			
		||||
    ok: boolean;
 | 
			
		||||
    message: string;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										9
									
								
								src/client/models/FinishPauseByUserIdResponse.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								src/client/models/FinishPauseByUserIdResponse.ts
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,9 @@
 | 
			
		||||
/* generated using openapi-typescript-codegen -- do not edit */
 | 
			
		||||
/* istanbul ignore file */
 | 
			
		||||
/* tslint:disable */
 | 
			
		||||
/* eslint-disable */
 | 
			
		||||
export type FinishPauseByUserIdResponse = {
 | 
			
		||||
    ok: boolean;
 | 
			
		||||
    message: string;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
@@ -3,9 +3,9 @@
 | 
			
		||||
/* tslint:disable */
 | 
			
		||||
/* eslint-disable */
 | 
			
		||||
import type { PaginationInfoSchema } from './PaginationInfoSchema';
 | 
			
		||||
import type { WorkShiftSchema } from './WorkShiftSchema';
 | 
			
		||||
import type { WorkShiftRowSchema } from './WorkShiftRowSchema';
 | 
			
		||||
export type GetWorkShiftsResponse = {
 | 
			
		||||
    shifts: Array<WorkShiftSchema>;
 | 
			
		||||
    shifts: Array<WorkShiftRowSchema>;
 | 
			
		||||
    paginationInfo: PaginationInfoSchema;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										9
									
								
								src/client/models/StartPauseByShiftIdResponse.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								src/client/models/StartPauseByShiftIdResponse.ts
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,9 @@
 | 
			
		||||
/* generated using openapi-typescript-codegen -- do not edit */
 | 
			
		||||
/* istanbul ignore file */
 | 
			
		||||
/* tslint:disable */
 | 
			
		||||
/* eslint-disable */
 | 
			
		||||
export type StartPauseByShiftIdResponse = {
 | 
			
		||||
    ok: boolean;
 | 
			
		||||
    message: string;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										9
									
								
								src/client/models/StartPauseByUserIdResponse.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								src/client/models/StartPauseByUserIdResponse.ts
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,9 @@
 | 
			
		||||
/* generated using openapi-typescript-codegen -- do not edit */
 | 
			
		||||
/* istanbul ignore file */
 | 
			
		||||
/* tslint:disable */
 | 
			
		||||
/* eslint-disable */
 | 
			
		||||
export type StartPauseByUserIdResponse = {
 | 
			
		||||
    ok: boolean;
 | 
			
		||||
    message: string;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										11
									
								
								src/client/models/WorkShiftRowSchema.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								src/client/models/WorkShiftRowSchema.ts
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,11 @@
 | 
			
		||||
/* generated using openapi-typescript-codegen -- do not edit */
 | 
			
		||||
/* istanbul ignore file */
 | 
			
		||||
/* tslint:disable */
 | 
			
		||||
/* eslint-disable */
 | 
			
		||||
import type { WorkShiftSchema } from './WorkShiftSchema';
 | 
			
		||||
export type WorkShiftRowSchema = {
 | 
			
		||||
    workShift: WorkShiftSchema;
 | 
			
		||||
    totalHours?: (number | null);
 | 
			
		||||
    pauseHours?: (number | null);
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
@@ -7,7 +7,7 @@ export type WorkShiftSchema = {
 | 
			
		||||
    id: number;
 | 
			
		||||
    startedAt: string;
 | 
			
		||||
    finishedAt?: (string | null);
 | 
			
		||||
    hours?: (number | null);
 | 
			
		||||
    isPaused?: (boolean | null);
 | 
			
		||||
    user: UserSchema;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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