Reorganize types

This commit is contained in:
Dane Everitt 2022-02-27 11:04:50 -05:00
parent 341fa45cbd
commit 8e731e838f
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
9 changed files with 9 additions and 13 deletions

View file

@ -1,7 +1,7 @@
import useSWR, { SWRConfiguration, SWRResponse } from 'swr'; import useSWR, { SWRConfiguration, SWRResponse } from 'swr';
import http, { FractalResponseList } from '@/api/http'; import http, { FractalResponseList } from '@/api/http';
import Transformers from '@transformers'; import Transformers from '@definitions/user/transformers';
import { PersonalAccessToken } from '@models'; import { PersonalAccessToken } from '@definitions/user/models';
import { AxiosError } from 'axios'; import { AxiosError } from 'axios';
import useUserSWRContextKey from '@/plugins/useUserSWRContextKey'; import useUserSWRContextKey from '@/plugins/useUserSWRContextKey';

View file

@ -1,7 +1,7 @@
import useSWR, { SWRConfiguration, SWRResponse } from 'swr'; import useSWR, { SWRConfiguration, SWRResponse } from 'swr';
import http, { FractalResponseList } from '@/api/http'; import http, { FractalResponseList } from '@/api/http';
import Transformers from '@transformers'; import Transformers from '@definitions/user/transformers';
import { SecurityKey } from '@models'; import { SecurityKey } from '@definitions/user/models';
import { AxiosError } from 'axios'; import { AxiosError } from 'axios';
import { base64Decode, bufferDecode, bufferEncode, decodeSecurityKeyCredentials } from '@/helpers'; import { base64Decode, bufferDecode, bufferEncode, decodeSecurityKeyCredentials } from '@/helpers';
import { LoginResponse } from '@/api/auth/login'; import { LoginResponse } from '@/api/auth/login';

View file

View file

@ -1,4 +1,4 @@
import * as Models from '@models'; import * as Models from './models';
export default class Transformers { export default class Transformers {
static toSecurityKey (data: Record<string, any>): Models.SecurityKey { static toSecurityKey (data: Record<string, any>): Models.SecurityKey {

View file

@ -1,4 +1,4 @@
import { SecurityKey } from '@models'; import { SecurityKey } from '@definitions/user/models';
import { useFlashKey } from '@/plugins/useFlash'; import { useFlashKey } from '@/plugins/useFlash';
import { Form, Formik, FormikHelpers } from 'formik'; import { Form, Formik, FormikHelpers } from 'formik';
import { registerSecurityKey } from '@/api/account/security-keys'; import { registerSecurityKey } from '@/api/account/security-keys';

View file

@ -26,11 +26,8 @@
"@feature/*": [ "@feature/*": [
"./resources/scripts/components/server/features/*" "./resources/scripts/components/server/features/*"
], ],
"@models": [ "@definitions/*": [
"./resources/scripts/api/types/models.d.ts" "./resources/scripts/api/definitions/*"
],
"@transformers": [
"./resources/scripts/api/types/transformers.ts"
] ]
}, },
"plugins": [ "plugins": [

View file

@ -78,8 +78,7 @@ module.exports = {
extensions: ['.ts', '.tsx', '.js', '.json'], extensions: ['.ts', '.tsx', '.js', '.json'],
alias: { alias: {
'@': path.join(__dirname, '/resources/scripts'), '@': path.join(__dirname, '/resources/scripts'),
'@models': path.join(__dirname, '/resources/scripts/api/types/models.d.ts'), '@definitions': path.join(__dirname, '/resources/scripts/api/definitions'),
'@transformers': path.join(__dirname, '/resources/scripts/api/types/transformers.ts'),
'@feature': path.join(__dirname, '/resources/scripts/components/server/features'), '@feature': path.join(__dirname, '/resources/scripts/components/server/features'),
'react-dom': '@hot-loader/react-dom', 'react-dom': '@hot-loader/react-dom',
}, },