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 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';
|
||||||
|
|
||||||
|
|
|
@ -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';
|
||||||
|
|
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 {
|
export default class Transformers {
|
||||||
static toSecurityKey (data: Record<string, any>): Models.SecurityKey {
|
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 { 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';
|
||||||
|
|
|
@ -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": [
|
||||||
|
|
|
@ -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',
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue