Reorganize types
This commit is contained in:
parent
341fa45cbd
commit
8e731e838f
9 changed files with 9 additions and 13 deletions
|
@ -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';
|
||||
|
||||
|
|
|
@ -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';
|
||||
|
|
0
resources/scripts/api/definitions/admin/models.d.ts
vendored
Normal file
0
resources/scripts/api/definitions/admin/models.d.ts
vendored
Normal file
0
resources/scripts/api/definitions/admin/transformers.ts
Normal file
0
resources/scripts/api/definitions/admin/transformers.ts
Normal 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 {
|
|
@ -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';
|
||||
|
|
|
@ -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": [
|
||||
|
|
|
@ -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',
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue