mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-02 22:17:39 +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
36 lines
845 B
TypeScript
36 lines
845 B
TypeScript
export type AlertCategory =
|
|
| 'NOTES_ADD_SUCCESS'
|
|
| 'NOTES_ADD_FAILED'
|
|
| 'NOTES_UPDATE_SUCCESS'
|
|
| 'NOTES_UPDATE_FAILED'
|
|
| 'NOTES_DELETE_SUCCESS'
|
|
| 'NOTES_DELETE_FAILED';
|
|
|
|
export interface INotesAlert {
|
|
alert: AlertCategory;
|
|
setAlert: (type: AlertCategory) => void;
|
|
}
|
|
|
|
export interface Note {
|
|
id?: number;
|
|
title: string;
|
|
content: string;
|
|
}
|
|
|
|
export interface NoteId {
|
|
id: number;
|
|
}
|
|
|
|
export enum NotesEvents {
|
|
ADD_NOTE = 'npwd:addNote',
|
|
FETCH_ALL_NOTES = 'npwd:fetchAllNotes',
|
|
SEND_NOTE = 'npwd:sendNote',
|
|
SEND_NOTE_SUCCESS = 'npwd:sendNoteSuccess',
|
|
DELETE_NOTE = 'npwd:deleteNote',
|
|
DELETE_NOTE_SUCCESS = 'npwd:deleteNoteSuccess',
|
|
UPDATE_NOTE = 'npwd:updateNote',
|
|
UPDATE_NOTE_SUCCESS = 'npwd:updateNoteSuccess',
|
|
UPDATE_NOTE_FAILURE = 'npwd:updateNoteFailure',
|
|
ACTION_RESULT = 'npwd:notesActionResult',
|
|
}
|