hunk.code_window:       await this.createExecutionDetails.execute(
           CreateExecutionDetailsCommand.create({
             ...CreateExecutionDetailsCommand.getDetailsFromJob(job),
             detail: DetailEnum.STEPS_FILTERED_BY_PREFERENCES,
             source: ExecutionDetailsSourceEnum.INTERNAL,
  
hunk.labels: keep keep keep replace keep
hunk.after_edit:           detail: DetailEnum.STEP_FILTERED_BY_PREFERENCES,
  
hunk.file_path: apps/api/src/app/events/usecases/send-message/send-message.usecase.ts
hunk.type: replace
file: import { useQuery } from 'react-query';
  import { useEnvController } from '../../store/use-env-controller';
  import { getPromotedChanges, getUnpromotedChanges } from '../changes';
  import { QueryKeys } from '../query.keys';
  
  export function usePromotedChanges(page = 0, limit = 10) {
    const { environment } = useEnvController();
    const {
      data,
      isLoading: isLoadingHistory,
      refetch: refetchHistory,
    } = useQuery(
      [QueryKeys.currentPromotedChanges, environment?._id, page, limit],
      () => getPromotedChanges(page, limit),
      {
        keepPreviousData: true,
      }
    );
  
    return {
      isLoadingHistory,
      history: data?.data,
      totalHistoryCount: data?.totalCount,
      historyPageSize: data?.pageSize,
      refetchHistory,
    };
  }
  
  export function useUnPromotedChanges(page = 0, limit = 10) {
    const { environment } = useEnvController();
    const {
      data,
      isLoading: isLoadingChanges,
      refetch: refetchChanges,
    } = useQuery(
      [QueryKeys.currentUnpromotedChanges, environment?._id, page, limit],
      () => getUnpromotedChanges(page, limit),
      {
        keepPreviousData: true,
      }
    );
  
    return {
      isLoadingChanges,
      changes: data?.data,
      totalChangesCount: data?.totalCount,
      changesPageSize: data?.pageSize,
      refetchChanges,
    };
  }
  