OpenProject is the leading open source project management software.
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.
 
 
 
 
 
 
openproject/frontend/app/components/wp-query/query-column.ts

35 lines
960 B

import {HalResource} from '../api/api-v3/hal-resources/hal-resource.service';
export const queryColumnTypes = {
PROPERTY: 'QueryColumn::Property',
RELATION_OF_TYPE: 'QueryColumn::RelationOfType',
RELATION_TO_TYPE: 'QueryColumn::RelationToType',
};
export function isRelationColumn(column:QueryColumn) {
const relationTypes = [queryColumnTypes.RELATION_TO_TYPE, queryColumnTypes.RELATION_OF_TYPE];
return relationTypes.indexOf(column._type) >= 0;
}
/**
* A reference to a query column object as returned from the API.
*/
export interface QueryColumn extends HalResource {
id:string;
name:string;
_links?: {
self:{ href:string, title:string };
};
}
export interface TypeRelationQueryColumn extends QueryColumn {
type:{ href: string, name:string },
_links?: {
self:{ href:string, title:string },
type:{ href:string, title:string }
}
}
export interface RelationQueryColumn extends QueryColumn {
relationType: string;
}