52 lines
958 B
TypeScript
52 lines
958 B
TypeScript
import { KeyValueCache } from '@apollo/utils.keyvaluecache';
|
|
import { ClaimVerifyResult } from '../cognito/cognito-client';
|
|
|
|
export type Maybe<T> = T | undefined;
|
|
|
|
export interface IAuthObject {
|
|
userName: String;
|
|
isValid?: boolean;
|
|
accessToken?: String | null;
|
|
idToken?: String | null;
|
|
}
|
|
|
|
export type User = IAuthObject | ClaimVerifyResult;
|
|
|
|
export type DataSourceOptions = {
|
|
cache: KeyValueCache<string>;
|
|
user: IAuthObject | ClaimVerifyResult;
|
|
};
|
|
|
|
export interface PaginationInput {
|
|
limit: number;
|
|
offset?: number;
|
|
}
|
|
|
|
export interface DateInput {
|
|
from: Date;
|
|
to: Date;
|
|
}
|
|
|
|
export interface DateFilterInput {
|
|
dates: DateInput;
|
|
}
|
|
|
|
export interface GeneralInput {
|
|
pagination: PaginationInput;
|
|
filter?: DateFilterInput;
|
|
}
|
|
|
|
export interface PaginationResult {
|
|
total: Promise<number> | number;
|
|
offset: number;
|
|
limit: number;
|
|
}
|
|
|
|
export interface IdNumberResult {
|
|
id: number;
|
|
}
|
|
|
|
export interface MarketInput {
|
|
marketId: number;
|
|
}
|