Files
new-phone-who-dis/typings/phone.ts
T
J Francisco Rader 107dc43624 Improve messages error handling (#181)
* Improve messages error handling

* Add types to getPlayerFromIdentifier function

* Add phone validation regex to message group form

* Add correct alert types to enum

* Improve locale

* Improve error message for unregistered numbers
2021-03-29 18:55:27 -04:00

16 lines
510 B
TypeScript

export const PHONE_NUMBER_REGEX = /^([0-9]{3}-[0-9]{4})|([0-9]{7})$/;
export enum PhoneEvents {
PLAYER_IS_READY = 'npwd:playerIsReady',
OPEN_APP_CONTACTS = 'npwd:app:CONTACTS',
OPEN_APP_BANK = 'npwd:app:BANK',
OPEN_APP_NOTES = 'npwd:app:NOTES',
OPEN_APP_LISTINGS = 'npwd:app:SELLOUT',
OPEN_APP_CAMERA = 'npwd:app:CAMERA',
OPEN_APP_DAILER = 'npwd:app:DIALER',
OPEN_PHONE = 'npwd:open',
CLOSE_PHONE = 'npwd:close',
SET_ALERT = 'npwd:setAlert',
SET_NOTIFICATION = 'npwd:setNotification',
}