mirror of
https://github.com/KevinMidboe/seasoned.git
synced 2026-03-11 11:55:38 +00:00
Resolved ALL eslint issues for project
This commit is contained in:
163
src/interfaces/IAutocompleteSearch.ts
Normal file
163
src/interfaces/IAutocompleteSearch.ts
Normal file
@@ -0,0 +1,163 @@
|
||||
/* eslint-disable no-use-before-define */
|
||||
import { MediaTypes } from "./IList";
|
||||
|
||||
export interface IAutocompleteResult {
|
||||
title: string;
|
||||
id: number;
|
||||
adult: boolean;
|
||||
type: MediaTypes;
|
||||
}
|
||||
|
||||
export interface IAutocompleteSearchResults {
|
||||
took: number;
|
||||
timed_out: boolean;
|
||||
_shards: Shards;
|
||||
hits: Hits;
|
||||
}
|
||||
|
||||
export interface Shards {
|
||||
total: number;
|
||||
successful: number;
|
||||
skipped: number;
|
||||
failed: number;
|
||||
}
|
||||
|
||||
export interface Hits {
|
||||
total: Total;
|
||||
max_score: null;
|
||||
hits: Hit[];
|
||||
}
|
||||
|
||||
export interface Hit {
|
||||
_index: Index;
|
||||
_type: Type;
|
||||
_id: string;
|
||||
_score: number;
|
||||
_source: Source;
|
||||
sort: number[];
|
||||
}
|
||||
|
||||
export enum Index {
|
||||
Movies = "movies",
|
||||
Shows = "shows"
|
||||
}
|
||||
|
||||
export interface Source {
|
||||
tags: Tag[];
|
||||
ecs: Ecs;
|
||||
"@timestamp": Date;
|
||||
adult: boolean;
|
||||
input: Input;
|
||||
host: Host;
|
||||
"@version": string;
|
||||
popularity: number;
|
||||
log: Log;
|
||||
video: boolean;
|
||||
id: number;
|
||||
agent: Agent;
|
||||
original_title: string;
|
||||
original_name?: string;
|
||||
}
|
||||
|
||||
export interface Agent {
|
||||
version: AgentVersion;
|
||||
ephemeral_id: string;
|
||||
id: string;
|
||||
hostname: HostnameEnum;
|
||||
type: AgentType;
|
||||
}
|
||||
|
||||
export enum HostnameEnum {
|
||||
MACProLocal = "macPro.local"
|
||||
}
|
||||
|
||||
export enum AgentType {
|
||||
Filebeat = "filebeat"
|
||||
}
|
||||
|
||||
export enum AgentVersion {
|
||||
The700 = "7.0.0"
|
||||
}
|
||||
|
||||
export interface Ecs {
|
||||
version: EcsVersion;
|
||||
}
|
||||
|
||||
export enum EcsVersion {
|
||||
The100 = "1.0.0"
|
||||
}
|
||||
|
||||
export interface Host {
|
||||
os: OS;
|
||||
name: HostnameEnum;
|
||||
id: ID;
|
||||
hostname: HostnameEnum;
|
||||
architecture: Architecture;
|
||||
}
|
||||
|
||||
export enum Architecture {
|
||||
X8664 = "x86_64"
|
||||
}
|
||||
|
||||
export enum ID {
|
||||
The30D157C386235739Aa1E30A9464Fa192 = "30D157C3-8623-5739-AA1E-30A9464FA192"
|
||||
}
|
||||
|
||||
export interface OS {
|
||||
version: OSVersion;
|
||||
name: OSName;
|
||||
build: Build;
|
||||
family: Family;
|
||||
platform: Family;
|
||||
kernel: Kernel;
|
||||
}
|
||||
|
||||
export enum Build {
|
||||
The18D109 = "18D109"
|
||||
}
|
||||
|
||||
export enum Family {
|
||||
Darwin = "darwin"
|
||||
}
|
||||
|
||||
export enum Kernel {
|
||||
The1820 = "18.2.0"
|
||||
}
|
||||
|
||||
export enum OSName {
|
||||
MACOSX = "Mac OS X"
|
||||
}
|
||||
|
||||
export enum OSVersion {
|
||||
The10143 = "10.14.3"
|
||||
}
|
||||
|
||||
export interface Input {
|
||||
type: InputType;
|
||||
}
|
||||
|
||||
export enum InputType {
|
||||
Log = "log"
|
||||
}
|
||||
|
||||
export interface Log {
|
||||
offset: number;
|
||||
file: File;
|
||||
}
|
||||
|
||||
export interface File {
|
||||
path: string;
|
||||
}
|
||||
|
||||
export enum Tag {
|
||||
BeatsInputRawEvent = "beats_input_raw_event"
|
||||
}
|
||||
|
||||
export enum Type {
|
||||
Doc = "_doc"
|
||||
}
|
||||
|
||||
export interface Total {
|
||||
value: number;
|
||||
relation: string;
|
||||
}
|
||||
36
src/interfaces/IGraph.ts
Normal file
36
src/interfaces/IGraph.ts
Normal file
@@ -0,0 +1,36 @@
|
||||
/* eslint-disable no-use-before-define */
|
||||
|
||||
export enum GraphTypes {
|
||||
Plays = "plays",
|
||||
Duration = "duration"
|
||||
}
|
||||
|
||||
export enum GraphValueTypes {
|
||||
Number = "number",
|
||||
Time = "time"
|
||||
}
|
||||
|
||||
export interface IGraphDataset {
|
||||
name: string;
|
||||
data: Array<number>;
|
||||
}
|
||||
|
||||
export interface IGraphData {
|
||||
labels: Array<string>;
|
||||
series: Array<IGraphDataset>;
|
||||
}
|
||||
|
||||
export interface IGraphResponse {
|
||||
success: boolean;
|
||||
data: Data;
|
||||
}
|
||||
|
||||
export interface Data {
|
||||
categories: Date[];
|
||||
series: Series[];
|
||||
}
|
||||
|
||||
export interface Series {
|
||||
name: string;
|
||||
data: number[];
|
||||
}
|
||||
@@ -1,25 +1,3 @@
|
||||
export interface IList {
|
||||
results: ListResults;
|
||||
page: number;
|
||||
total_results: number;
|
||||
total_pages: number;
|
||||
}
|
||||
|
||||
export interface IMediaCredits {
|
||||
cast: Array<ICast>;
|
||||
crew: Array<ICrew>;
|
||||
id: number;
|
||||
}
|
||||
|
||||
export interface IPersonCredits {
|
||||
cast: Array<IMovie | IShow>;
|
||||
crew: Array<ICrew>;
|
||||
id: number;
|
||||
type?: string;
|
||||
}
|
||||
|
||||
export type ListResults = Array<IMovie | IShow | IPerson | IRequest>;
|
||||
|
||||
export enum MediaTypes {
|
||||
Movie = "movie",
|
||||
Show = "show",
|
||||
@@ -155,3 +133,25 @@ export interface ICrew {
|
||||
profile_path: string | null;
|
||||
type: string;
|
||||
}
|
||||
|
||||
export interface IMediaCredits {
|
||||
cast: Array<ICast>;
|
||||
crew: Array<ICrew>;
|
||||
id: number;
|
||||
}
|
||||
|
||||
export interface IPersonCredits {
|
||||
cast: Array<IMovie | IShow>;
|
||||
crew: Array<ICrew>;
|
||||
id: number;
|
||||
type?: string;
|
||||
}
|
||||
|
||||
export type ListResults = Array<IMovie | IShow | IPerson | IRequest>;
|
||||
|
||||
export interface IList {
|
||||
results: ListResults;
|
||||
page: number;
|
||||
total_results: number;
|
||||
total_pages: number;
|
||||
}
|
||||
|
||||
6
src/interfaces/ILoader.ts
Normal file
6
src/interfaces/ILoader.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
enum LoaderHeightType {
|
||||
Page = "page",
|
||||
Section = "section"
|
||||
}
|
||||
|
||||
export default LoaderHeightType;
|
||||
@@ -1,6 +1,6 @@
|
||||
export default interface INavigationIcon {
|
||||
title: string;
|
||||
route: string;
|
||||
icon: any;
|
||||
icon: any; // eslint-disable-line @typescript-eslint/no-explicit-any
|
||||
requiresAuth?: boolean;
|
||||
}
|
||||
|
||||
@@ -1,17 +1,13 @@
|
||||
import type { MediaTypes } from "./IList";
|
||||
// export enum PopupTypes {
|
||||
// Movie = "movie",
|
||||
// Show = "show",
|
||||
// Person = "person"
|
||||
// }
|
||||
|
||||
// export interface IPopupOpen {
|
||||
// id: string | number;
|
||||
// type: PopupTypes;
|
||||
// }
|
||||
|
||||
export interface IStatePopup {
|
||||
id: number;
|
||||
type: MediaTypes;
|
||||
open: boolean;
|
||||
}
|
||||
|
||||
export interface IPopupQuery {
|
||||
movie?: number | string;
|
||||
show?: number | string;
|
||||
person?: number | string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user