/* eslint-disable import/no-anonymous-default-export */
export default (function (_ref) {
  var projectId = _ref.projectId,
      selectedPipelineId = _ref.selectedPipelineId,
      startDate = _ref.startDate,
      endDate = _ref.endDate;
  return {
    paging: false,
    autoQuery: true,
    transport: {
      read: function read(_ref2) {
        var dataSet = _ref2.dataSet;
        return selectedPipelineId && startDate && endDate ? {
          url: "devops/v1/projects/".concat(projectId, "/cicd_pipelines/trigger?pipeline_id=").concat(selectedPipelineId, "&start_time=").concat(startDate, "&end_time=").concat(endDate),
          method: 'get'
        } : {};
      }
    }
  };
});