kanbanworkflowstimelinescrumrubyroadmapproject-planningproject-managementopenprojectangularissue-trackerifcgantt-chartganttbug-trackerboardsbcf
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
190 lines
3.8 KiB
190 lines
3.8 KiB
9 years ago
|
//-- copyright
|
||
|
// OpenProject is a project management system.
|
||
|
// Copyright (C) 2012-2015 the OpenProject Foundation (OPF)
|
||
|
//
|
||
|
// This program is free software; you can redistribute it and/or
|
||
|
// modify it under the terms of the GNU General Public License version 3.
|
||
|
//
|
||
|
// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
|
||
|
// Copyright (C) 2006-2013 Jean-Philippe Lang
|
||
|
// Copyright (C) 2010-2013 the ChiliProject Team
|
||
|
//
|
||
|
// This program is free software; you can redistribute it and/or
|
||
|
// modify it under the terms of the GNU General Public License
|
||
|
// as published by the Free Software Foundation; either version 2
|
||
|
// of the License, or (at your option) any later version.
|
||
|
//
|
||
|
// This program is distributed in the hope that it will be useful,
|
||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
|
// GNU General Public License for more details.
|
||
|
//
|
||
|
// You should have received a copy of the GNU General Public License
|
||
|
// along with this program; if not, write to the Free Software
|
||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||
|
//
|
||
|
// See doc/COPYRIGHT.rdoc for more details.
|
||
|
//++
|
||
|
|
||
|
/**
|
||
9 years ago
|
* API interfaces
|
||
9 years ago
|
*
|
||
|
* @see {@link http://opf.github.io/apiv3-doc/|Api V3 documentation}
|
||
|
*/
|
||
|
|
||
9 years ago
|
declare namespace api {
|
||
9 years ago
|
|
||
9 years ago
|
/**
|
||
|
* API v3
|
||
|
*/
|
||
|
namespace v3 {
|
||
|
interface Result {
|
||
|
_links;
|
||
|
_embedded;
|
||
|
_type:string;
|
||
|
}
|
||
|
|
||
|
interface Collection extends Result {
|
||
|
total:number;
|
||
|
pageSize:number;
|
||
|
count:number;
|
||
|
offset:number;
|
||
|
groups:any;
|
||
|
totalSums:any;
|
||
|
}
|
||
|
|
||
|
interface Duration extends String {
|
||
|
}
|
||
|
|
||
|
interface Formattable {
|
||
|
format:string;
|
||
|
raw:string;
|
||
|
html:string;
|
||
|
}
|
||
9 years ago
|
}
|
||
|
|
||
9 years ago
|
/**
|
||
|
* Experimental API
|
||
|
*/
|
||
|
namespace ex {
|
||
|
interface ColumnMeta {
|
||
|
data_type:string;
|
||
|
link:{
|
||
|
display:boolean;
|
||
|
model_type:string;
|
||
|
};
|
||
|
}
|
||
|
|
||
|
interface Column {
|
||
|
name:string;
|
||
|
title:string;
|
||
|
custom_field:boolean;
|
||
|
sortable:boolean;
|
||
|
goupable:boolean;
|
||
|
meta_data:ColumnMeta;
|
||
|
}
|
||
|
|
||
|
interface Query {
|
||
|
_links:any;
|
||
|
id:number;
|
||
9 years ago
|
columnNames;
|
||
|
displaySums:boolean;
|
||
9 years ago
|
filters;
|
||
9 years ago
|
groupBy:string;
|
||
|
isPublic:boolean;
|
||
9 years ago
|
name:string;
|
||
9 years ago
|
projectId:number;
|
||
|
sortCriteria;
|
||
9 years ago
|
starred:boolean;
|
||
9 years ago
|
userId:number;
|
||
9 years ago
|
}
|
||
|
|
||
|
interface Meta {
|
||
|
_links;
|
||
|
columns:Column[];
|
||
|
export_formats;
|
||
|
group_sums;
|
||
|
groupable_columns:Column[];
|
||
|
per_page_options:number[];
|
||
|
query:Query;
|
||
|
page:number;
|
||
|
per_page:number;
|
||
|
}
|
||
|
|
||
|
interface WorkPackagesMeta {
|
||
|
meta:Meta;
|
||
|
work_packages;
|
||
|
}
|
||
9 years ago
|
}
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* OpenProject interfaces
|
||
|
*/
|
||
|
|
||
9 years ago
|
interface Function {
|
||
9 years ago
|
$link?:any;
|
||
9 years ago
|
name:string;
|
||
|
_type:string;
|
||
9 years ago
|
}
|
||
|
|
||
9 years ago
|
declare var Factory:any;
|
||
|
|
||
9 years ago
|
declare namespace op {
|
||
9 years ago
|
/**
|
||
|
* General components
|
||
|
*/
|
||
9 years ago
|
interface Query {
|
||
|
id?:number;
|
||
|
columns?:any;
|
||
|
displaySums?;
|
||
|
projectId?;
|
||
|
groupBy?:string;
|
||
|
filters?;
|
||
|
sortCriteria?;
|
||
|
page?:number;
|
||
|
perPage?:number;
|
||
|
|
||
|
toUpdateParams?():any;
|
||
9 years ago
|
applyDefaultsFromFilters(workPackage);
|
||
9 years ago
|
}
|
||
|
|
||
|
interface I18n {
|
||
9 years ago
|
t(translateId:string, parameters?:any):string;
|
||
9 years ago
|
}
|
||
|
|
||
9 years ago
|
interface CacheService {
|
||
|
temporaryCache();
|
||
|
localStorage();
|
||
|
memoryStorage();
|
||
|
customCache(identifier, params);
|
||
|
isCacheDisabled();
|
||
|
enableCaching();
|
||
|
disableCaching();
|
||
|
cachedPromise(promiseFn, key, options?);
|
||
|
}
|
||
|
|
||
9 years ago
|
interface FieldSchema {
|
||
|
type:string;
|
||
|
writable:boolean;
|
||
9 years ago
|
allowedValues;
|
||
9 years ago
|
}
|
||
|
|
||
9 years ago
|
interface QueryParams {
|
||
|
offset?:number;
|
||
|
pageSize?:number;
|
||
|
filters?:any[];
|
||
|
groupBy?:string;
|
||
|
showSums?:boolean;
|
||
|
sortBy?:any[];
|
||
|
}
|
||
9 years ago
|
|
||
|
interface PathHelper {
|
||
|
workPackagePath(id):string;
|
||
|
}
|
||
|
|
||
|
interface WorkPackagesHelper {
|
||
|
formatValue(value, type):string;
|
||
|
}
|
||
9 years ago
|
}
|