chore: cleanup interfaces

This commit is contained in:
AP 2019-12-03 19:43:36 +01:00
parent 396b61c4a0
commit ac2349c60c
2 changed files with 22 additions and 21 deletions

View file

@ -5,3 +5,24 @@ export interface InOutProps {
export interface InOutListProps {
[key: string]: InOutProps[];
}
export interface PaymentProps {
created_at: string;
is_confirmed: boolean;
tokens: number;
}
export interface PaymentsProps {
payments: PaymentProps[];
}
export interface InvoiceProps {
created_at: string;
is_confirmed: boolean;
received: number;
}
export interface InvoicesProps {
invoices: InvoiceProps[];
next: string;
}

View file

@ -10,27 +10,7 @@ import { differenceInHours, differenceInCalendarDays } from 'date-fns';
import { groupBy } from 'underscore';
import { reduceInOutArray } from '../report/Helpers';
import { InOutType } from '../../../schemaTypes/query/flow/InOut';
interface PaymentProps {
created_at: string;
is_confirmed: boolean;
tokens: number;
}
interface PaymentsProps {
payments: PaymentProps[];
}
interface InvoiceProps {
created_at: string;
is_confirmed: boolean;
received: number;
}
interface InvoicesProps {
invoices: InvoiceProps[];
next: string;
}
import { InvoicesProps, PaymentsProps } from './getInOut.interface';
export const getInOut = {
type: InOutType,