Shared
Shared export functions / types
General
addApplication
Adds an application on the phone. Recommended to use on the server-side for optimization purposes.
Arguments
Name | Type | Description |
---|---|---|
name | string | (Key / name / index) of the app |
data | AppConfig | Application config, following the applications.lua config format. |
locales | table | Table of locales for the app, it is inserted into ui.apps. . |
Example
addLocales
Merges custom locales into existing ones. Useful for custom application labels and when using phone's built-in i18n module.
Arguments
Name | Type | Description |
---|---|---|
locale | table | Table of locales |
Example
formatNumber
Formats a phone number string into what you have configured.
Arguments
Name | Type | Description |
---|---|---|
number | string | Phone number that you want to format |
Example
generateNumber
Generates a phone number based on your config and returns it unformatted
Example
Types
Attachment
Name | Type | Description |
---|---|---|
type | 'media' | 'contact' | 'note' | Attachment type |
content | Media | Contact | Note | Any attachments content (see below) |
Media
Name | Type | Description |
---|---|---|
type | 'image' | 'video' | Media type |
url | string | Media URL |
Contact
Name | Type | Description |
---|---|---|
number | string | Phone number |
name | string | Name |
photo | string | Photo URL |
Note
Name | Type | Description |
---|---|---|
title | string | Note title |
content | string | Note content |
Last updated on