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 http, { FractalResponseList } from '@/api/http';
import Transformers from '@transformers';
import { PersonalAccessToken } from '@models';
import Transformers from '@definitions/user/transformers';
import { PersonalAccessToken } from '@definitions/user/models';
import { AxiosError } from 'axios';
import useUserSWRContextKey from '@/plugins/useUserSWRContextKey';

View file

@ -1,7 +1,7 @@
import useSWR, { SWRConfiguration, SWRResponse } from 'swr';
import http, { FractalResponseList } from '@/api/http';
import Transformers from '@transformers';
import { SecurityKey } from '@models';
import Transformers from '@definitions/user/transformers';
import { SecurityKey } from '@definitions/user/models';
import { AxiosError } from 'axios';
import { base64Decode, bufferDecode, bufferEncode, decodeSecurityKeyCredentials } from '@/helpers';
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 {
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 { Form, Formik, FormikHelpers } from 'formik';
import { registerSecurityKey } from '@/api/account/security-keys';

View file

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

View file

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