chore(typings): Moved common typings to root dir

This commit is contained in:
Taso committed 2021-03-14 15:19:30 -04:00
1 parent 378830245d
commit f0c5e5101e
47 files changed
+41 -46

No files matched your search

@@ -1,6 +1,6 @@
import { useRecoilValue } from 'recoil'; import { useRecoilValue } from 'recoil';
import { Transfer } from '../../../common/typings/bank'; import { Transfer } from '../../../../../typings/bank';
import { bankState } from './state'; import { bankState } from './state';
interface IBankNotification { interface IBankNotification {
+1 -1
View File
@@ -1,6 +1,6 @@
import { useRecoilValue } from 'recoil'; import { useRecoilValue } from 'recoil';
import { bankState } from './state'; import { bankState } from './state';
import { IBankCredentials } from '../../../common/typings/bank'; import { IBankCredentials } from '../../../../../typings/bank';
interface ICredentialsHook { interface ICredentialsHook {
credentials: IBankCredentials; credentials: IBankCredentials;
+1 -1
View File
@@ -1,7 +1,7 @@
import { useRecoilValue } from 'recoil'; import { useRecoilValue } from 'recoil';
import { contactsState } from './state'; import { contactsState } from './state';
import { Contact } from '../../../common/typings/contact'; import { Contact } from '../../../../../typings/contact';
import { useCallback } from 'react'; import { useCallback } from 'react';
interface IUseContacts { interface IUseContacts {
@@ -8,7 +8,7 @@ import { ListItem } from '../../../../ui/components/ListItem';
import Nui from '../../../../os/nui-events/utils/Nui'; import Nui from '../../../../os/nui-events/utils/Nui';
import { useSimcard } from '../../../../os/simcard/hooks/useSimcard'; import { useSimcard } from '../../../../os/simcard/hooks/useSimcard';
import { useContacts } from '../../../contacts/hooks/useContacts'; import { useContacts } from '../../../contacts/hooks/useContacts';
import { ICall } from '../../../../common/typings/call'; import { ICall } from '../../../../../../typings/call';
import dayjs from 'dayjs'; import dayjs from 'dayjs';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { Box, IconButton, ListItemIcon, ListItemText } from '@material-ui/core'; import { Box, IconButton, ListItemIcon, ListItemText } from '@material-ui/core';
@@ -1,5 +1,5 @@
import { useRecoilValue } from 'recoil'; import { useRecoilValue } from 'recoil';
import { ICall } from '../../../common/typings/call'; import { ICall } from '../../../../../typings/call';
import { dialState } from './state'; import { dialState } from './state';
interface ICallUI { interface ICallUI {
history: ICall[]; history: ICall[];
@@ -6,7 +6,7 @@ import Nui from '../../../../os/nui-events/utils/Nui';
import { useHistory } from 'react-router-dom'; import { useHistory } from 'react-router-dom';
import { Autocomplete } from '@material-ui/lab'; import { Autocomplete } from '@material-ui/lab';
import { useContacts } from '../../../contacts/hooks/useContacts'; import { useContacts } from '../../../contacts/hooks/useContacts';
import { Contact } from '../../../../common/typings/contact'; import { Contact } from '../../../../../../typings/contact';
const NewMessageGroupForm = ({ phoneNumber }: { phoneNumber?: string }) => { const NewMessageGroupForm = ({ phoneNumber }: { phoneNumber?: string }) => {
const history = useHistory(); const history = useHistory();
@@ -7,7 +7,7 @@ import {
Badge, Badge,
} from '@material-ui/core'; } from '@material-ui/core';
import { MessageGroup } from '../../../../common/typings/messages'; import { MessageGroup } from '../../../../../../typings/messages';
interface IProps { interface IProps {
messageGroup: MessageGroup; messageGroup: MessageGroup;
handleClick: (group: MessageGroup) => () => void; handleClick: (group: MessageGroup) => () => void;
@@ -22,7 +22,7 @@ const MessageGroupItem = ({ messageGroup, handleClick }: IProps): any => {
return ( return (
<ListItem key={messageGroup.groupId} onClick={handleClick(messageGroup)} divider button> <ListItem key={messageGroup.groupId} onClick={handleClick(messageGroup)} divider button>
<ListItemAvatar> <ListItemAvatar>
<Badge color='error' variant='dot' invisible={!hasUnread}> <Badge color="error" variant="dot" invisible={!hasUnread}>
<MuiAvatar src={messageGroup?.avatar} /> <MuiAvatar src={messageGroup?.avatar} />
</Badge> </Badge>
</ListItemAvatar> </ListItemAvatar>
@@ -1,6 +1,6 @@
import React, { useEffect, useState } from 'react'; import React, { useEffect, useState } from 'react';
import { Box, List } from '@material-ui/core'; import { Box, List } from '@material-ui/core';
import { MessageGroup } from '../../../../common/typings/messages'; import { MessageGroup } from '../../../../../../typings/messages';
import Nui from '../../../../os/nui-events/utils/Nui'; import Nui from '../../../../os/nui-events/utils/Nui';
import useMessages from '../../hooks/useMessages'; import useMessages from '../../hooks/useMessages';
import MessageGroupItem from './MessageGroupItem'; import MessageGroupItem from './MessageGroupItem';
@@ -1,7 +1,7 @@
import React, { useState } from 'react'; import React, { useState } from 'react';
import { Box } from '@material-ui/core'; import { Box } from '@material-ui/core';
import { Message, MessageGroup } from '../../../../common/typings/messages'; import { Message, MessageGroup } from '../../../../../../typings/messages';
import MessageInput from '../form/MessageInput'; import MessageInput from '../form/MessageInput';
import useStyles from './modal.styles'; import useStyles from './modal.styles';
import { MessageImageModal } from './MessageImageModal'; import { MessageImageModal } from './MessageImageModal';
@@ -1,6 +1,6 @@
import { Box, Link, makeStyles, Paper, Typography } from '@material-ui/core'; import { Box, Link, makeStyles, Paper, Typography } from '@material-ui/core';
import React from 'react'; import React from 'react';
import { Message } from '../../../../common/typings/messages'; import { Message } from '../../../../../../typings/messages';
import { PictureResponsive } from '../../../../ui/components/PictureResponsive'; import { PictureResponsive } from '../../../../ui/components/PictureResponsive';
import { PictureReveal } from '../../../../ui/components/PictureReveal'; import { PictureReveal } from '../../../../ui/components/PictureReveal';
+1 -1
View File
@@ -1,6 +1,6 @@
import { useCallback } from 'react'; import { useCallback } from 'react';
import { useRecoilState, useRecoilValue } from 'recoil'; import { useRecoilState, useRecoilValue } from 'recoil';
import { CreateMessageGroupResult, Message, MessageGroup } from '../../../common/typings/messages'; import { CreateMessageGroupResult, Message, MessageGroup } from '../../../../../typings/messages';
import { messageState } from './state'; import { messageState } from './state';
interface IUseMessages { interface IUseMessages {
+1 -1
View File
@@ -1,5 +1,5 @@
import { useRecoilState } from 'recoil'; import { useRecoilState } from 'recoil';
import { Note } from '../../../common/typings/notes'; import { Note } from '../../../../../typings/notes';
import { noteStates } from './state'; import { noteStates } from './state';
interface NoteDetailProps { interface NoteDetailProps {
+1 -1
View File
@@ -1,5 +1,5 @@
import { useRecoilValue } from 'recoil'; import { useRecoilValue } from 'recoil';
import { Note } from '../../../common/typings/notes'; import { Note } from '../../../../../typings/notes';
import { noteStates } from './state'; import { noteStates } from './state';
interface NotesProps { interface NotesProps {
@@ -1,7 +1,7 @@
import { Box, Tooltip, Button } from '@material-ui/core'; import { Box, Tooltip, Button } from '@material-ui/core';
import { makeStyles, Theme } from '@material-ui/core/styles'; import { makeStyles, Theme } from '@material-ui/core/styles';
import React from 'react'; import React from 'react';
import { MarketplaceListing } from '../../../../common/typings/marketplace'; import { MarketplaceListing } from '../../../../../../typings/marketplace';
import { useSimcard } from '../../../../os/simcard/hooks/useSimcard'; import { useSimcard } from '../../../../os/simcard/hooks/useSimcard';
import DeleteIcon from '@material-ui/icons/Delete'; import DeleteIcon from '@material-ui/icons/Delete';
import ReportIcon from '@material-ui/icons/Report'; import ReportIcon from '@material-ui/icons/Report';
@@ -3,7 +3,7 @@ import { makeStyles } from '@material-ui/core/styles';
import { Typography, Paper } from '@material-ui/core'; import { Typography, Paper } from '@material-ui/core';
import { ListItem } from '../../../../ui/components/ListItem'; import { ListItem } from '../../../../ui/components/ListItem';
import { PictureResponsive } from '../../../../ui/components/PictureResponsive'; import { PictureResponsive } from '../../../../ui/components/PictureResponsive';
import { MarketplaceListing } from '../../../../common/typings/marketplace'; import { MarketplaceListing } from '../../../../../../typings/marketplace';
import { ListingActions } from './ListingActions'; import { ListingActions } from './ListingActions';
import { PictureReveal } from '../../../../ui/components/PictureReveal'; import { PictureReveal } from '../../../../ui/components/PictureReveal';
+1 -1
View File
@@ -1,5 +1,5 @@
import { useRecoilValue } from 'recoil'; import { useRecoilValue } from 'recoil';
import { MarketplaceListing } from '../../../common/typings/marketplace'; import { MarketplaceListing } from '../../../../../typings/marketplace';
import { selloutState } from './state'; import { selloutState } from './state';
export const useListing = () => { export const useListing = () => {
+1 -1
View File
@@ -1,6 +1,6 @@
import { atom, DefaultValue, SetterOrUpdater, useRecoilState } from 'recoil'; import { atom, DefaultValue, SetterOrUpdater, useRecoilState } from 'recoil';
import { SETTINGS_ALL_TWEETS, SETTING_MENTIONS } from '../../../common/typings/twitter'; import { SETTINGS_ALL_TWEETS, SETTING_MENTIONS } from '../../../../../typings/twitter';
import config from '../../../config/default.json'; import config from '../../../config/default.json';
import { SettingOption } from '../../../ui/hooks/useContextMenu'; import { SettingOption } from '../../../ui/hooks/useContextMenu';
@@ -15,7 +15,7 @@ import ControlButtons from './buttons/ControlButtons';
import IconButtons from './buttons/IconButtons'; import IconButtons from './buttons/IconButtons';
import { usePhone } from '../../../os/phone/hooks/usePhone'; import { usePhone } from '../../../os/phone/hooks/usePhone';
import { getNewLineCount } from '../utils/message'; import { getNewLineCount } from '../utils/message';
import { NewTweet } from '../../../common/typings/twitter'; import { NewTweet } from '../../../../../typings/twitter';
const useStyles = makeStyles((theme) => ({ const useStyles = makeStyles((theme) => ({
root: { root: {
@@ -4,7 +4,7 @@ import { useTranslation } from 'react-i18next';
import { makeStyles } from '@material-ui/core/styles'; import { makeStyles } from '@material-ui/core/styles';
import { ListItemAvatar, Avatar as MuiAvatar, ListItem, Typography } from '@material-ui/core'; import { ListItemAvatar, Avatar as MuiAvatar, ListItem, Typography } from '@material-ui/core';
import { Tweet as ITweet } from '../../../../common/typings/twitter'; import { Tweet as ITweet } from '../../../../../../typings/twitter';
import { secondsToHumanReadable } from '../../utils/time'; import { secondsToHumanReadable } from '../../utils/time';
import LikeButton from '../buttons/LikeButton'; import LikeButton from '../buttons/LikeButton';
import ReplyButton from '../buttons/ReplyButton'; import ReplyButton from '../buttons/ReplyButton';
+1 -1
View File
@@ -1,5 +1,5 @@
import { useRecoilState } from 'recoil'; import { useRecoilState } from 'recoil';
import { CallProps } from '../../../common/typings/call'; import { CallProps } from '../../../../../typings/call';
import Nui from '../../nui-events/utils/Nui'; import Nui from '../../nui-events/utils/Nui';
import { callerState } from './state'; import { callerState } from './state';
@@ -1,7 +1,7 @@
import React from 'react'; import React from 'react';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { useHistory } from 'react-router-dom'; import { useHistory } from 'react-router-dom';
import { CallProps } from '../../../common/typings/call'; import { CallProps } from '../../../../../typings/call';
import { useApp } from '../../apps/hooks/useApps'; import { useApp } from '../../apps/hooks/useApps';
import { useNotifications } from '../../notifications/hooks/useNotifications'; import { useNotifications } from '../../notifications/hooks/useNotifications';
import { useRingtoneSound } from '../../sound/hooks/useRingtoneSound'; import { useRingtoneSound } from '../../sound/hooks/useRingtoneSound';
@@ -65,7 +65,7 @@ export const useCallNotifications = () => {
</CallNotification> </CallNotification>
), ),
}, },
(n) => addNotification(n) (n) => addNotification(n),
); );
} }
}; };
+1 -1
View File
@@ -2,7 +2,7 @@ import { useEffect, useState } from 'react';
import { useNuiEvent } from '../../nui-events/hooks/useNuiEvent'; import { useNuiEvent } from '../../nui-events/hooks/useNuiEvent';
import { useSetRecoilState } from 'recoil'; import { useSetRecoilState } from 'recoil';
import { useCall } from './useCall'; import { useCall } from './useCall';
import { CallProps } from '../../../common/typings/call'; import { CallProps } from '../../../../../typings/call';
import InjectDebugData from '../../debug/InjectDebugData'; import InjectDebugData from '../../debug/InjectDebugData';
import { useCallModal } from './useCallModal'; import { useCallModal } from './useCallModal';
import { useHistory, useLocation } from 'react-router-dom'; import { useHistory, useLocation } from 'react-router-dom';
+1 -1
View File
@@ -1,5 +1,5 @@
import { useRecoilValue } from 'recoil'; import { useRecoilValue } from 'recoil';
import { IServerConfig } from '../../../common/typings/config'; import { IServerConfig } from '../../../../../typings/config';
import ServerConfig from '../../../config.autogen.json'; import ServerConfig from '../../../config.autogen.json';
import { useNotifications } from '../../notifications/hooks/useNotifications'; import { useNotifications } from '../../notifications/hooks/useNotifications';
import Nui from '../../nui-events/utils/Nui'; import Nui from '../../nui-events/utils/Nui';
+1 -1
View File
@@ -1,4 +1,4 @@
import { IAlertProps } from '../../phone/src/common/typings/alerts'; import { IAlertProps } from '../../typings/alerts';
import events from '../utils/events'; import events from '../utils/events';
onNet(events.BANK_SEND_TRANSFERS, (transfer: any) => { onNet(events.BANK_SEND_TRANSFERS, (transfer: any) => {
+1 -1
View File
@@ -1,5 +1,5 @@
import events from '../utils/events'; import events from '../utils/events';
import { ICall } from '../../phone/src/common/typings/call'; import { ICall } from '../../typings/call';
import { phoneCallStartAnim, phoneCallEndAnim } from './functions'; import { phoneCallStartAnim, phoneCallEndAnim } from './functions';
const exp = (global as any).exports; const exp = (global as any).exports;
+1 -1
View File
@@ -4,7 +4,7 @@ import {
Message, Message,
MessageGroup, MessageGroup,
SetMessageRead, SetMessageRead,
} from '../../phone/src/common/typings/messages'; } from '../../typings/messages';
import { sendMessageEvent } from '../utils/messages'; import { sendMessageEvent } from '../utils/messages';
/** /**
+2 -2
View File
@@ -1,6 +1,6 @@
import events from '../utils/events'; import events from '../utils/events';
import { MarketplaceListing } from '../../phone/src/common/typings/marketplace'; import { MarketplaceListing } from '../../typings/marketplace';
import { IAlertProps } from '../../phone/src/common/typings/alerts'; import { IAlertProps } from '../../typings/alerts';
onNet(events.SELLOUT_SEND_LISTING, (listing: MarketplaceListing) => { onNet(events.SELLOUT_SEND_LISTING, (listing: MarketplaceListing) => {
SendNuiMessage( SendNuiMessage(
+1 -2
View File
@@ -1,6 +1,6 @@
import events from '../utils/events'; import events from '../utils/events';
import { sendTwitterMessage } from '../utils/messages'; import { sendTwitterMessage } from '../utils/messages';
import { IAlertProps } from '../../phone/src/common/typings/alerts'; import { IAlertProps } from '../../typings/alerts';
/** /**
* Twitter get or create profile * Twitter get or create profile
@@ -124,7 +124,6 @@ onNet(events.TWITTER_RETWEET_EXISTS, (alert: IAlertProps) => {
sendTwitterMessage(events.TWITTER_RETWEET_EXISTS, alert); sendTwitterMessage(events.TWITTER_RETWEET_EXISTS, alert);
}); });
/** /**
* Twitter reporting tweets * Twitter reporting tweets
*/ */
+2 -2
View File
@@ -1,9 +1,9 @@
import axios, { AxiosResponse } from 'axios'; import axios, { AxiosResponse } from 'axios';
import { Tweet, Profile } from '../../phone/src/common/typings/twitter'; import { Tweet, Profile } from '../../typings/twitter';
import { IMAGE_DELIMITER } from '../../phone/src/apps/twitter/utils/images'; import { IMAGE_DELIMITER } from '../../phone/src/apps/twitter/utils/images';
import { mainLogger } from './sv_logger'; import { mainLogger } from './sv_logger';
import { MarketplaceListing } from '../../phone/src/common/typings/marketplace'; import { MarketplaceListing } from '../../typings/marketplace';
const discordLogger = mainLogger.child({ module: 'discord' }); const discordLogger = mainLogger.child({ module: 'discord' });
+1 -1
View File
@@ -2,7 +2,7 @@ import events from '../utils/events';
import { ESX } from './server'; import { ESX } from './server';
import { getSource } from './functions'; import { getSource } from './functions';
import { pool } from './db'; import { pool } from './db';
import { Transfer, IBankCredentials } from '../../phone/src/common/typings/bank'; import { Transfer, IBankCredentials } from '../../typings/bank';
import { getIdentifier } from './functions'; import { getIdentifier } from './functions';
import { mainLogger } from './sv_logger'; import { mainLogger } from './sv_logger';
+1 -1
View File
@@ -2,7 +2,7 @@ import events from '../utils/events';
import { getIdentifierByPhoneNumber, getPlayer, getSource } from './functions'; import { getIdentifierByPhoneNumber, getPlayer, getSource } from './functions';
import { getPlayerFromIdentifier } from './functions'; import { getPlayerFromIdentifier } from './functions';
import { ICall } from '../../phone/src/common/typings/call'; import { ICall } from '../../typings/call';
import { pool } from './db'; import { pool } from './db';
import { v4 as uuidv4 } from 'uuid'; import { v4 as uuidv4 } from 'uuid';
+1 -5
View File
@@ -1,11 +1,7 @@
import md5 from 'md5'; import md5 from 'md5';
import events from '../utils/events'; import events from '../utils/events';
import { import { CreateMessageGroupResult, Message, MessageGroup } from '../../typings/messages';
CreateMessageGroupResult,
Message,
MessageGroup,
} from '../../phone/src/common/typings/messages';
import { pool, withTransaction } from './db'; import { pool, withTransaction } from './db';
import { getIdentifier, getSource, getPlayerFromIdentifier } from './functions'; import { getIdentifier, getSource, getPlayerFromIdentifier } from './functions';
import { mainLogger } from './sv_logger'; import { mainLogger } from './sv_logger';
+1 -1
View File
@@ -1,7 +1,7 @@
import events from '../utils/events'; import events from '../utils/events';
import { pool } from './db'; import { pool } from './db';
import { getIdentifier, getSource } from './functions'; import { getIdentifier, getSource } from './functions';
import { Note, NoteId } from '../../phone/src/common/typings/notes'; import { Note, NoteId } from '../../typings/notes';
import { mainLogger } from './sv_logger'; import { mainLogger } from './sv_logger';
const notesLogger = mainLogger.child({ module: 'notes' }); const notesLogger = mainLogger.child({ module: 'notes' });
+1 -1
View File
@@ -1,7 +1,7 @@
import events from '../utils/events'; import events from '../utils/events';
import { pool } from './db'; import { pool } from './db';
import { getIdentifier, getSource } from './functions'; import { getIdentifier, getSource } from './functions';
import { IPhoto } from '../../phone/src/common/typings/photo'; import { IPhoto } from '../../typings/photo';
import { mainLogger } from './sv_logger'; import { mainLogger } from './sv_logger';
const photoLogger = mainLogger.child({ module: 'photo' }); const photoLogger = mainLogger.child({ module: 'photo' });
+1 -1
View File
@@ -2,7 +2,7 @@ import events from '../utils/events';
import { getIdentifier, getPlayer, getSource } from './functions'; import { getIdentifier, getPlayer, getSource } from './functions';
import { pool } from './db'; import { pool } from './db';
import { mainLogger } from './sv_logger'; import { mainLogger } from './sv_logger';
import { MarketplaceListing } from '../../phone/src/common/typings/marketplace'; import { MarketplaceListing } from '../../typings/marketplace';
import { reportListingToDiscord } from './discord'; import { reportListingToDiscord } from './discord';
const selloutLogger = mainLogger.child({ module: 'sellout' }); const selloutLogger = mainLogger.child({ module: 'sellout' });
+1 -1
View File
@@ -1,6 +1,6 @@
import { pool } from './db'; import { pool } from './db';
import { getIdentifier, getSource } from './functions'; import { getIdentifier, getSource } from './functions';
import { NewTweet, Tweet, Profile } from '../../phone/src/common/typings/twitter'; import { NewTweet, Tweet, Profile } from '../../typings/twitter';
import events from '../utils/events'; import events from '../utils/events';
import config from '../utils/config'; import config from '../utils/config';
import { reportTweetToDiscord } from './discord'; import { reportTweetToDiscord } from './discord';
+1 -1
View File
@@ -1,4 +1,4 @@
import config from '../../config.json'; import config from '../../config.json';
import { IServerConfig } from '../../phone/src/common/typings/config'; import { IServerConfig } from '../../typings/config';
export default <IServerConfig>config; export default <IServerConfig>config;
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.