/**
 * @type OrderBy
 * @description Describes and order with a list of order specifications
 * @example `someField` ordered ascending, `otherField` ordered descending
 * const orderBy: OrderBy = [
 *      {fieldName: 'someField', direction: Direction.asc},
 *      {fieldName: 'otherField', direction: Direction.desc}
 * ]
 */
export type OrderBy = OrderSpec[]

/**
 * @interface OrderSpec
 * @description Order specification for single field.
 * @example `someField` ordered ascending
 * const ascOrder: OrderSpec = {fieldName: 'someField', direction: Direction.asc}
 */
export interface OrderSpec {
  fieldName: string
  direction: Direction
}

export enum Direction {
    asc = 'asc',
    desc = 'desc'
}
