parent
28bdf4e1f2
commit
0b00a92a21
40 changed files with 6884 additions and 0 deletions
@ -0,0 +1,5 @@ |
||||
# dependencies |
||||
/node_modules |
||||
|
||||
# next.js |
||||
/.next/ |
@ -0,0 +1,60 @@ |
||||
{ |
||||
"env": { |
||||
"browser": true, |
||||
"commonjs": true, |
||||
"es6": true, |
||||
"node": true |
||||
}, |
||||
"extends": [ |
||||
"airbnb", |
||||
"eslint:recommended", |
||||
"plugin:@typescript-eslint/recommended", |
||||
"plugin:import/errors", |
||||
"plugin:import/typescript", |
||||
"plugin:import/warnings", |
||||
"plugin:jsx-a11y/recommended", |
||||
"plugin:prettier/recommended", |
||||
"plugin:react/recommended", |
||||
"plugin:react-hooks/recommended", |
||||
"prettier/@typescript-eslint", |
||||
"prettier/react" |
||||
], |
||||
"plugins": [ |
||||
"@typescript-eslint", |
||||
"import", |
||||
"jsx-a11y", |
||||
"prettier", |
||||
"react", |
||||
"react-hooks" |
||||
], |
||||
"parser": "@typescript-eslint/parser", |
||||
"parserOptions": { |
||||
"ecmaFeatures": { |
||||
"jsx": true |
||||
}, |
||||
"ecmaVersion": 2020, |
||||
"sourceType": "module" |
||||
}, |
||||
"rules": { |
||||
"complexity": ["error", 5], |
||||
"import/extensions": [ |
||||
"error", |
||||
"ignorePackages", |
||||
{ |
||||
"js": "never", |
||||
"jsx": "never", |
||||
"ts": "never", |
||||
"tsx": "never" |
||||
} |
||||
], |
||||
// Allow JSX in files with other extensions |
||||
"react/jsx-filename-extension": [1, { "extensions": [".tsx"] }], |
||||
// Use TypeScript's types for component props |
||||
"react/prop-types": "off", |
||||
// Importing React is not required in Next.js |
||||
"react/react-in-jsx-scope": "off" |
||||
}, |
||||
"settings": { |
||||
"react": { "version": "detect" } |
||||
} |
||||
} |
@ -0,0 +1,34 @@ |
||||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. |
||||
|
||||
# dependencies |
||||
/node_modules |
||||
/.pnp |
||||
.pnp.js |
||||
|
||||
# testing |
||||
/coverage |
||||
|
||||
# next.js |
||||
/.next/ |
||||
/out/ |
||||
|
||||
# production |
||||
/build |
||||
|
||||
# misc |
||||
.DS_Store |
||||
*.pem |
||||
|
||||
# debug |
||||
npm-debug.log* |
||||
yarn-debug.log* |
||||
yarn-error.log* |
||||
|
||||
# local env files |
||||
.env.local |
||||
.env.development.local |
||||
.env.test.local |
||||
.env.production.local |
||||
|
||||
# vercel |
||||
.vercel |
@ -0,0 +1 @@ |
||||
_ |
@ -0,0 +1,6 @@ |
||||
#!/bin/sh |
||||
. "$(dirname "$0")/_/husky.sh" |
||||
|
||||
cd striker-ui |
||||
|
||||
npx --no-install commitlint --edit "$1" |
@ -0,0 +1,7 @@ |
||||
#!/bin/sh |
||||
. "$(dirname "$0")/_/husky.sh" |
||||
|
||||
# Must cd because pwd/cwd is the root of this repository. |
||||
cd striker-ui |
||||
|
||||
npx --no-install lint-staged |
@ -0,0 +1,4 @@ |
||||
{ |
||||
"*.{js,jsx,ts,tsx}": "npm run lint -- --fix", |
||||
"*.{json,md}": "prettier --write" |
||||
} |
@ -0,0 +1,6 @@ |
||||
{ |
||||
"endOfLine": "lf", |
||||
"singleQuote": true, |
||||
"tabWidth": 2, |
||||
"trailingComma": "all" |
||||
} |
@ -0,0 +1,34 @@ |
||||
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). |
||||
|
||||
## Getting Started |
||||
|
||||
First, run the development server: |
||||
|
||||
```bash |
||||
npm run dev |
||||
# or |
||||
yarn dev |
||||
``` |
||||
|
||||
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. |
||||
|
||||
You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file. |
||||
|
||||
[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.js`. |
||||
|
||||
The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages. |
||||
|
||||
## Learn More |
||||
|
||||
To learn more about Next.js, take a look at the following resources: |
||||
|
||||
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. |
||||
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. |
||||
|
||||
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! |
||||
|
||||
## Deploy on Vercel |
||||
|
||||
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. |
||||
|
||||
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. |
@ -0,0 +1,3 @@ |
||||
module.exports = { |
||||
extends: ['@commitlint/config-conventional'], |
||||
}; |
@ -0,0 +1,22 @@ |
||||
import fetchJSON from '../fetchers/fetchJSON'; |
||||
|
||||
async function getAllAnvil(): Promise<GetAllAnvilResponse> { |
||||
const response: GetAllAnvilResponse = { |
||||
anvilList: { |
||||
anvils: [], |
||||
}, |
||||
error: null, |
||||
}; |
||||
|
||||
try { |
||||
response.anvilList = await fetchJSON( |
||||
`${process.env.DATA_ENDPOINT_BASE_URL}/get_anvils`, |
||||
); |
||||
} catch (fetchError) { |
||||
response.error = fetchError; |
||||
} |
||||
|
||||
return response; |
||||
} |
||||
|
||||
export default getAllAnvil; |
@ -0,0 +1,23 @@ |
||||
import fetchJSON from '../fetchers/fetchJSON'; |
||||
|
||||
async function getOneAnvil(anvilUUID: string): Promise<GetOneAnvilResponse> { |
||||
const response: GetOneAnvilResponse = { |
||||
anvilStatus: { |
||||
nodes: [], |
||||
timestamp: 0, |
||||
}, |
||||
error: null, |
||||
}; |
||||
|
||||
try { |
||||
response.anvilStatus = await fetchJSON( |
||||
`${process.env.DATA_ENDPOINT_BASE_URL}/get_anvil_status?anvil_uuid=${anvilUUID}`, |
||||
); |
||||
} catch (fetchError) { |
||||
response.error = fetchError; |
||||
} |
||||
|
||||
return response; |
||||
} |
||||
|
||||
export default getOneAnvil; |
@ -0,0 +1,20 @@ |
||||
import { NextApiRequest, NextApiResponse } from 'next'; |
||||
|
||||
import getAllAnvil from './getAllAnvil'; |
||||
|
||||
async function handleAPIGetAllAnvil( |
||||
request: NextApiRequest, |
||||
response: NextApiResponse, |
||||
): Promise<void> { |
||||
const { anvilList, error }: GetAllAnvilResponse = await getAllAnvil(); |
||||
|
||||
if (error) { |
||||
response.status(503); |
||||
} else { |
||||
response.status(200); |
||||
} |
||||
|
||||
response.send(anvilList); |
||||
} |
||||
|
||||
export default handleAPIGetAllAnvil; |
@ -0,0 +1,28 @@ |
||||
import { NextApiRequest, NextApiResponse } from 'next'; |
||||
|
||||
import getOneAnvil from './getOneAnvil'; |
||||
|
||||
async function handleAPIGetOneAnvil( |
||||
request: NextApiRequest, |
||||
response: NextApiResponse, |
||||
): Promise<void> { |
||||
const { |
||||
query: { uuid }, |
||||
}: NextApiRequest = request; |
||||
|
||||
const anvilUUID: string = uuid instanceof Array ? uuid[0] : uuid; |
||||
|
||||
const { anvilStatus, error }: GetOneAnvilResponse = await getOneAnvil( |
||||
anvilUUID, |
||||
); |
||||
|
||||
if (error) { |
||||
response.status(503); |
||||
} else { |
||||
response.status(200); |
||||
} |
||||
|
||||
response.send(anvilStatus); |
||||
} |
||||
|
||||
export default handleAPIGetOneAnvil; |
@ -0,0 +1,7 @@ |
||||
import IS_DEV_ENV from './IS_DEV_ENV'; |
||||
|
||||
const API_BASE_URL = IS_DEV_ENV |
||||
? process.env.DEVELOPMENT_API_BASE_URL |
||||
: process.env.PRODUCTION_API_BASE_URL; |
||||
|
||||
export default API_BASE_URL; |
@ -0,0 +1,3 @@ |
||||
const IS_DEV_ENV: boolean = process.env.NODE_ENV !== 'production'; |
||||
|
||||
export default IS_DEV_ENV; |
@ -0,0 +1,5 @@ |
||||
function fetchJSON<T>(...args: [RequestInfo, RequestInit?]): Promise<T> { |
||||
return fetch(...args).then((response: Response) => response.json()); |
||||
} |
||||
|
||||
export default fetchJSON; |
@ -0,0 +1,2 @@ |
||||
/// <reference types="next" />
|
||||
/// <reference types="next/types/global" />
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,40 @@ |
||||
{ |
||||
"name": "striker-ui", |
||||
"version": "0.1.0", |
||||
"private": true, |
||||
"scripts": { |
||||
"build": "next build", |
||||
"dev": "next dev", |
||||
"lint": "eslint --config .eslintrc.json --ext js,jsx,ts,tsx --max-warnings=0", |
||||
"lint:dryrun": "npm run lint -- .", |
||||
"lint:fix": "npm run lint -- --fix .", |
||||
"postinstall": "cd .. && husky install striker-ui/.husky", |
||||
"start": "next start" |
||||
}, |
||||
"dependencies": { |
||||
"next": "10.0.6", |
||||
"react": "17.0.1", |
||||
"react-dom": "17.0.1", |
||||
"swr": "^0.4.2" |
||||
}, |
||||
"devDependencies": { |
||||
"@commitlint/cli": "^11.0.0", |
||||
"@commitlint/config-conventional": "^11.0.0", |
||||
"@types/node": "^14.14.26", |
||||
"@types/react": "^17.0.1", |
||||
"@typescript-eslint/eslint-plugin": "^4.15.0", |
||||
"@typescript-eslint/parser": "^4.15.0", |
||||
"eslint": "^7.19.0", |
||||
"eslint-config-airbnb": "^18.2.1", |
||||
"eslint-config-prettier": "^7.2.0", |
||||
"eslint-plugin-import": "^2.22.1", |
||||
"eslint-plugin-jsx-a11y": "^6.4.1", |
||||
"eslint-plugin-prettier": "^3.3.1", |
||||
"eslint-plugin-react": "^7.22.0", |
||||
"eslint-plugin-react-hooks": "^4.2.0", |
||||
"husky": "^5.0.9", |
||||
"lint-staged": "^10.5.4", |
||||
"prettier": "^2.2.1", |
||||
"typescript": "^4.1.5" |
||||
} |
||||
} |
@ -0,0 +1,10 @@ |
||||
import '../styles/globals.css'; |
||||
|
||||
import { AppProps } from 'next/app'; |
||||
|
||||
function App({ Component, pageProps }: AppProps): JSX.Element { |
||||
// eslint-disable-next-line react/jsx-props-no-spreading
|
||||
return <Component {...pageProps} />; |
||||
} |
||||
|
||||
export default App; |
@ -0,0 +1,20 @@ |
||||
import { NextApiRequest, NextApiResponse } from 'next'; |
||||
|
||||
import { APIRouteHandlerMap } from '../../../types/APIRouteHandlerMap'; |
||||
|
||||
import handleAPIGetOneAnvil from '../../../lib/Anvil/handleAPIGetOneAnvil'; |
||||
|
||||
const ROUTE_HANDLER_MAP: APIRouteHandlerMap = { |
||||
GET: handleAPIGetOneAnvil, |
||||
}; |
||||
|
||||
async function handleAPIOneAnvil( |
||||
request: NextApiRequest, |
||||
response: NextApiResponse, |
||||
): Promise<void> { |
||||
const { method: httpMethod = 'GET' }: NextApiRequest = request; |
||||
|
||||
await ROUTE_HANDLER_MAP[httpMethod](request, response); |
||||
} |
||||
|
||||
export default handleAPIOneAnvil; |
@ -0,0 +1,20 @@ |
||||
import { NextApiRequest, NextApiResponse } from 'next'; |
||||
|
||||
import { APIRouteHandlerMap } from '../../../types/APIRouteHandlerMap'; |
||||
|
||||
import handleAPIGetAllAnvil from '../../../lib/Anvil/handleAPIGetAllAnvil'; |
||||
|
||||
const ROUTE_HANDLER_MAP: APIRouteHandlerMap = { |
||||
GET: handleAPIGetAllAnvil, |
||||
}; |
||||
|
||||
async function handleAPIAllAnvil( |
||||
request: NextApiRequest, |
||||
response: NextApiResponse, |
||||
): Promise<void> { |
||||
const { method: httpMethod = 'GET' }: NextApiRequest = request; |
||||
|
||||
await ROUTE_HANDLER_MAP[httpMethod](request, response); |
||||
} |
||||
|
||||
export default handleAPIAllAnvil; |
@ -0,0 +1,9 @@ |
||||
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction
|
||||
|
||||
import type { NextApiRequest, NextApiResponse } from 'next'; |
||||
|
||||
function hello(req: NextApiRequest, res: NextApiResponse): void { |
||||
res.status(200).json({ name: 'John Doe' }); |
||||
} |
||||
|
||||
export default hello; |
@ -0,0 +1,27 @@ |
||||
import { GetServerSidePropsResult, InferGetServerSidePropsType } from 'next'; |
||||
|
||||
import API_BASE_URL from '../lib/consts/API_BASE_URL'; |
||||
|
||||
import fetchJSON from '../lib/fetchers/fetchJSON'; |
||||
|
||||
export async function getServerSideProps(): Promise< |
||||
GetServerSidePropsResult<AnvilList> |
||||
> { |
||||
return { |
||||
props: await fetchJSON(`${API_BASE_URL}/api/anvils`), |
||||
}; |
||||
} |
||||
|
||||
function DemoAnvilList({ |
||||
anvils, |
||||
}: InferGetServerSidePropsType<typeof getServerSideProps>): JSX.Element { |
||||
return ( |
||||
<div> |
||||
<h1>Demo Anvil List</h1> |
||||
<h2>anvils</h2> |
||||
<pre>{JSON.stringify(anvils, null, 4)}</pre> |
||||
</div> |
||||
); |
||||
} |
||||
|
||||
export default DemoAnvilList; |
@ -0,0 +1,32 @@ |
||||
import { GetServerSidePropsResult, InferGetServerSidePropsType } from 'next'; |
||||
|
||||
import API_BASE_URL from '../lib/consts/API_BASE_URL'; |
||||
|
||||
import fetchJSON from '../lib/fetchers/fetchJSON'; |
||||
|
||||
export async function getServerSideProps(): Promise< |
||||
GetServerSidePropsResult<AnvilStatus> |
||||
> { |
||||
return { |
||||
props: await fetchJSON( |
||||
`${API_BASE_URL}/api/anvils/1aded871-fcb1-4473-9b97-6e9c246fc568`, |
||||
), |
||||
}; |
||||
} |
||||
|
||||
function DemoAnvilStatus({ |
||||
nodes, |
||||
timestamp, |
||||
}: InferGetServerSidePropsType<typeof getServerSideProps>): JSX.Element { |
||||
return ( |
||||
<div> |
||||
<h1>Demo Anvil List</h1> |
||||
<h2>nodes</h2> |
||||
<pre>{JSON.stringify(nodes, null, 4)}</pre> |
||||
<h2>timestamp</h2> |
||||
<pre>{timestamp}</pre> |
||||
</div> |
||||
); |
||||
} |
||||
|
||||
export default DemoAnvilStatus; |
@ -0,0 +1,67 @@ |
||||
import Head from 'next/head'; |
||||
import styles from '../styles/Home.module.css'; |
||||
|
||||
function Home(): JSX.Element { |
||||
return ( |
||||
<div className={styles.container}> |
||||
<Head> |
||||
<title>Create Next App</title> |
||||
<link rel="icon" href="/favicon.ico" /> |
||||
</Head> |
||||
|
||||
<main className={styles.main}> |
||||
<h1 className={styles.title}> |
||||
Welcome to <a href="https://nextjs.org">Next.js!</a> |
||||
</h1> |
||||
|
||||
<p className={styles.description}> |
||||
Get started by editing{' '} |
||||
<code className={styles.code}>pages/index.js</code> |
||||
</p> |
||||
|
||||
<div className={styles.grid}> |
||||
<a href="https://nextjs.org/docs" className={styles.card}> |
||||
<h3>Documentation →</h3> |
||||
<p>Find in-depth information about Next.js features and API.</p> |
||||
</a> |
||||
|
||||
<a href="https://nextjs.org/learn" className={styles.card}> |
||||
<h3>Learn →</h3> |
||||
<p>Learn about Next.js in an interactive course with quizzes!</p> |
||||
</a> |
||||
|
||||
<a |
||||
href="https://github.com/vercel/next.js/tree/master/examples" |
||||
className={styles.card} |
||||
> |
||||
<h3>Examples →</h3> |
||||
<p>Discover and deploy boilerplate example Next.js projects.</p> |
||||
</a> |
||||
|
||||
<a |
||||
href="https://vercel.com/new?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app" |
||||
className={styles.card} |
||||
> |
||||
<h3>Deploy →</h3> |
||||
<p> |
||||
Instantly deploy your Next.js site to a public URL with Vercel. |
||||
</p> |
||||
</a> |
||||
</div> |
||||
</main> |
||||
|
||||
<footer className={styles.footer}> |
||||
<a |
||||
href="https://vercel.com?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app" |
||||
target="_blank" |
||||
rel="noopener noreferrer" |
||||
> |
||||
Powered by{' '} |
||||
<img src="/vercel.svg" alt="Vercel Logo" className={styles.logo} /> |
||||
</a> |
||||
</footer> |
||||
</div> |
||||
); |
||||
} |
||||
|
||||
export default Home; |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 1.1 KiB |
@ -0,0 +1,122 @@ |
||||
.container { |
||||
min-height: 100vh; |
||||
padding: 0 0.5rem; |
||||
display: flex; |
||||
flex-direction: column; |
||||
justify-content: center; |
||||
align-items: center; |
||||
} |
||||
|
||||
.main { |
||||
padding: 5rem 0; |
||||
flex: 1; |
||||
display: flex; |
||||
flex-direction: column; |
||||
justify-content: center; |
||||
align-items: center; |
||||
} |
||||
|
||||
.footer { |
||||
width: 100%; |
||||
height: 100px; |
||||
border-top: 1px solid #eaeaea; |
||||
display: flex; |
||||
justify-content: center; |
||||
align-items: center; |
||||
} |
||||
|
||||
.footer img { |
||||
margin-left: 0.5rem; |
||||
} |
||||
|
||||
.footer a { |
||||
display: flex; |
||||
justify-content: center; |
||||
align-items: center; |
||||
} |
||||
|
||||
.title a { |
||||
color: #0070f3; |
||||
text-decoration: none; |
||||
} |
||||
|
||||
.title a:hover, |
||||
.title a:focus, |
||||
.title a:active { |
||||
text-decoration: underline; |
||||
} |
||||
|
||||
.title { |
||||
margin: 0; |
||||
line-height: 1.15; |
||||
font-size: 4rem; |
||||
} |
||||
|
||||
.title, |
||||
.description { |
||||
text-align: center; |
||||
} |
||||
|
||||
.description { |
||||
line-height: 1.5; |
||||
font-size: 1.5rem; |
||||
} |
||||
|
||||
.code { |
||||
background: #fafafa; |
||||
border-radius: 5px; |
||||
padding: 0.75rem; |
||||
font-size: 1.1rem; |
||||
font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, |
||||
Bitstream Vera Sans Mono, Courier New, monospace; |
||||
} |
||||
|
||||
.grid { |
||||
display: flex; |
||||
align-items: center; |
||||
justify-content: center; |
||||
flex-wrap: wrap; |
||||
max-width: 800px; |
||||
margin-top: 3rem; |
||||
} |
||||
|
||||
.card { |
||||
margin: 1rem; |
||||
flex-basis: 45%; |
||||
padding: 1.5rem; |
||||
text-align: left; |
||||
color: inherit; |
||||
text-decoration: none; |
||||
border: 1px solid #eaeaea; |
||||
border-radius: 10px; |
||||
transition: color 0.15s ease, border-color 0.15s ease; |
||||
} |
||||
|
||||
.card:hover, |
||||
.card:focus, |
||||
.card:active { |
||||
color: #0070f3; |
||||
border-color: #0070f3; |
||||
} |
||||
|
||||
.card h3 { |
||||
margin: 0 0 1rem 0; |
||||
font-size: 1.5rem; |
||||
} |
||||
|
||||
.card p { |
||||
margin: 0; |
||||
font-size: 1.25rem; |
||||
line-height: 1.5; |
||||
} |
||||
|
||||
.logo { |
||||
height: 1em; |
||||
} |
||||
|
||||
@media (max-width: 600px) { |
||||
.grid { |
||||
width: 100%; |
||||
flex-direction: column; |
||||
} |
||||
} |
@ -0,0 +1,16 @@ |
||||
html, |
||||
body { |
||||
padding: 0; |
||||
margin: 0; |
||||
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, |
||||
Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; |
||||
} |
||||
|
||||
a { |
||||
color: inherit; |
||||
text-decoration: none; |
||||
} |
||||
|
||||
* { |
||||
box-sizing: border-box; |
||||
} |
@ -0,0 +1,21 @@ |
||||
{ |
||||
"compilerOptions": { |
||||
"target": "es5", |
||||
"lib": ["dom", "dom.iterable", "esnext"], |
||||
"allowJs": true, |
||||
"skipLibCheck": true, |
||||
"strict": true, |
||||
"forceConsistentCasingInFileNames": true, |
||||
"noEmit": true, |
||||
"esModuleInterop": true, |
||||
"module": "esnext", |
||||
"moduleResolution": "node", |
||||
"resolveJsonModule": true, |
||||
"isolatedModules": true, |
||||
"jsx": "preserve", |
||||
"noImplicitAny": true, |
||||
"typeRoots": ["types"] |
||||
}, |
||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], |
||||
"exclude": ["node_modules"] |
||||
} |
@ -0,0 +1,5 @@ |
||||
import { NextApiHandler } from 'next'; |
||||
|
||||
declare type APIRouteHandlerMap = Readonly<{ |
||||
[httpMethod: string]: NextApiHandler; |
||||
}>; |
@ -0,0 +1,3 @@ |
||||
declare type AnvilList = { |
||||
anvils: AnvilListItem[]; |
||||
}; |
@ -0,0 +1,3 @@ |
||||
declare type AnvilListItem = { |
||||
uuid: string; |
||||
}; |
@ -0,0 +1,3 @@ |
||||
declare type AnvilNodeStatus = { |
||||
on: 0 | 1; |
||||
}; |
@ -0,0 +1,4 @@ |
||||
declare type AnvilStatus = { |
||||
nodes: AnvilNodeStatus[]; |
||||
timestamp: number; |
||||
}; |
@ -0,0 +1,3 @@ |
||||
declare type FetchResponse = { |
||||
error: Error | null; |
||||
}; |
@ -0,0 +1,3 @@ |
||||
declare type GetAllAnvilResponse = FetchResponse & { |
||||
anvilList: AnvilList; |
||||
}; |
@ -0,0 +1,3 @@ |
||||
declare type GetOneAnvilResponse = FetchResponse & { |
||||
anvilStatus: AnvilStatus; |
||||
}; |
Loading…
Reference in new issue