mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-03 22:16:54 +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
62 lines
1.6 KiB
TypeScript
62 lines
1.6 KiB
TypeScript
export interface Message {
|
|
id: number;
|
|
message: string;
|
|
user_identifier: string;
|
|
phone_number: string;
|
|
groupId?: string;
|
|
display?: string;
|
|
avatar?: string;
|
|
isRead: boolean;
|
|
isMine: boolean;
|
|
updatedAt: string;
|
|
}
|
|
|
|
export interface MessageGroup {
|
|
groupId: string;
|
|
groupDisplay: string;
|
|
isGroupChat: boolean;
|
|
avatar?: string;
|
|
label?: string;
|
|
updatedAt: string;
|
|
unreadCount: number;
|
|
phoneNumbers: string[];
|
|
participants: string[];
|
|
}
|
|
|
|
export interface CreateMessageGroupResult {
|
|
error?: boolean;
|
|
phoneNumber?: string;
|
|
duplicate?: boolean;
|
|
groupId?: string;
|
|
mine?: boolean;
|
|
identifiers?: string[];
|
|
}
|
|
|
|
export interface CreateMessageBroadcast {
|
|
message: string;
|
|
groupName: string;
|
|
groupId: string;
|
|
}
|
|
|
|
export interface SetMessageRead {
|
|
groupId: string;
|
|
}
|
|
|
|
export enum MessageEvents {
|
|
FETCH_MESSAGE_GROUPS = 'npwd:fetchMessageGroups',
|
|
FETCH_MESSAGE_GROUPS_SUCCESS = 'npwd:fetchMessageGroupsSuccess',
|
|
FETCH_MESSAGE_GROUPS_FAILED = 'npwd:fetchMessageGroupsFailed',
|
|
CREATE_MESSAGE_GROUP = 'npwd:createMessageGroup',
|
|
CREATE_MESSAGE_GROUP_SUCCESS = 'npwd:createMessageGroupSuccess',
|
|
CREATE_MESSAGE_GROUP_FAILED = 'npwd:createMessageGroupFailed',
|
|
SEND_MESSAGE = 'npwd:sendMessage',
|
|
SEND_MESSAGE_SUCCESS = 'npwd:sendMessageSuccess',
|
|
SEND_MESSAGE_FAILED = 'npwd:sendMessageFailed',
|
|
FETCH_MESSAGES = 'npwd:fetchMessages',
|
|
FETCH_MESSAGES_SUCCESS = 'npwd:fetchMessagesSuccess',
|
|
FETCH_MESSAGES_FAILED = 'npwd:fetchMessagesFailed',
|
|
ACTION_RESULT = 'npwd:setMessagesAlert',
|
|
CREATE_MESSAGE_BROADCAST = 'createMessagesBroadcast',
|
|
SET_MESSAGE_READ = 'npwd:setReadMessages',
|
|
}
|