diff --git a/resources/utils/apps.ts b/resources/utils/apps.ts index 0e99372..dbc059f 100644 --- a/resources/utils/apps.ts +++ b/resources/utils/apps.ts @@ -2,4 +2,7 @@ export default { TWITTER: 'TWITTER', MESSAGES: 'MESSAGES', NOTES: 'NOTES', + MARKETPLACE: 'SELLOUT', + CONTACTS: 'CONTACTS', + CAMERA: 'CAMERA', }; diff --git a/resources/utils/messages.ts b/resources/utils/messages.ts index 3b89f7f..c978904 100644 --- a/resources/utils/messages.ts +++ b/resources/utils/messages.ts @@ -1,6 +1,6 @@ import apps from './apps'; -function sendMessage(app: string, method: string, data: any) { +export function sendMessage(app: string, method: string, data: any) { return SendNuiMessage( JSON.stringify({ app, @@ -21,3 +21,15 @@ export function sendMessageEvent(method: string, data: any = {}) { export function sendNotesEvent(method: string, data: any = {}) { return sendMessage(apps.NOTES, method, data); } + +export function sendMarketplaceEvent(method: string, data: any = {}) { + sendMessage(apps.MARKETPLACE, method, data); +} + +export function sendContactsEvent(method: string, data: any = {}) { + sendMessage(apps.CONTACTS, method, data); +} + +export function sendCameraEvent(method: string, data: any = {}) { + sendMessage(apps.CAMERA, method, data); +}