mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 06:28:51 +00:00
* chore(scripts/twitter): Refactored twitter to use event enums * chore(scripts/marketplace): Refactored marketplace to use event enums * chore(scripts/messages): Refactored messages to use event enums * chore(scripts/contacts): Refactored contacts to use event enums * chore(scripts/calls): Refactored calls to use event enums * chore(scripts/notes): Refactored notes to use event enums * chore(scripts/photos): Refactored photos to use event enums * chore(scripts/bank): Refactored bank to use event enums * chore(scripts/phone): Refactored phone to use event enums * chore(events): Removed old events object * refactor(phone/nui-events): Attached NUI events to respective enum * tweak(event-enums): Added npwd prefix to all events * tweak(phone/serve): Added craco to override CRA without eject Also bumped react-scripts to 4.0.1, with seemingly no issues * fix(typings/twitter): Fixed method enums for twitter
32 lines
813 B
TypeScript
32 lines
813 B
TypeScript
export type AlertCategory =
|
|
| 'CONTACT_ADD_SUCCESS'
|
|
| 'CONTACT_ADD_FAILED'
|
|
| 'CONTACT_UPDATE_SUCCESS'
|
|
| 'CONTACT_UPDATE_FAILED'
|
|
| 'CONTACT_DELETE_SUCCESS'
|
|
| 'CONTACT_DELETE_FAILED';
|
|
|
|
export interface IContactAlert {
|
|
alert: AlertCategory;
|
|
setAlert: (type: string) => void;
|
|
}
|
|
|
|
export interface Contact {
|
|
id: number;
|
|
display: string;
|
|
number: string;
|
|
avatar?: string;
|
|
}
|
|
|
|
export enum ContactEvents {
|
|
SEND_CONTACTS = 'npwd:sendContacts',
|
|
GET_CONTACTS = 'npwd:getContacts',
|
|
ADD_CONTACT = 'npwd:addContacts',
|
|
ADD_CONTACT_SUCCESS = 'contacts:addSuccess',
|
|
UPDATE_CONTACT = 'npwd:updateContact',
|
|
DELETE_CONTACT = 'npwd:deleteContact',
|
|
DELETE_CONTACT_SUCCESS = 'npwd:deleteSuccess',
|
|
UPDATE_CONTACT_SUCCESS = 'npwd:updateContactSuccess',
|
|
ACTION_RESULT = 'npwd:contactActionResult',
|
|
}
|