export default (function (intlPrefix, formatMessage, projectId) {
  return {
    autoQuery: true,
    paging: false,
    transport: {
      read: function read(_ref) {
        var data = _ref.data;
        return {
          url: "/devops/v1/projects/".concat(projectId, "/pipeline/page_by_options"),
          method: 'post',
          data: {
            triggerType: 'manual',
            executor: true,
            enabled: true,
            name: typeof data.params === 'string' ? [data.params] : data.params
          }
        };
      }
    },
    fields: [{
      name: 'name',
      type: 'string',
      label: formatMessage({
        id: "".concat(intlPrefix, ".pipeline.name")
      })
    }, {
      name: 'createUserName',
      type: 'string',
      label: formatMessage({
        id: 'creator'
      })
    }, {
      name: 'createUserRealName',
      type: 'string'
    }, {
      name: 'createUserUrl',
      type: 'string'
    }, {
      name: 'id',
      type: 'string'
    }],
    queryFields: []
  };
});