# SERVER EXPORTS

### Add Job News

Use this export to add a news post to a specific company page as a "System" message.&#x20;

{% code lineNumbers="true" %}

```lua
local result = exports["17mov_Phone"]:Companies_AddJobNews(title, content, image, company)
```

{% endcode %}

**Returns:**

* `table`: `{ success: boolean, itemId: number }`

<table><thead><tr><th width="118" align="center">Argument</th><th width="206" align="center">Type</th><th width="107" align="center">Optional</th><th align="center">Explanatio</th></tr></thead><tbody><tr><td align="center">title</td><td align="center"><code>string</code></td><td align="center">❌</td><td align="center">The title of the news post.</td></tr><tr><td align="center">content</td><td align="center"><code>string | JSONContent</code>   </td><td align="center">❌</td><td align="center">The content of the post. Can be a simple string or a <code>JSONContent</code> object.</td></tr><tr><td align="center">image</td><td align="center"><code>string</code></td><td align="center">❌</td><td align="center">URL to the image attached to the news.</td></tr><tr><td align="center">company</td><td align="center"><code>string</code></td><td align="center">❌</td><td align="center">The identifier of the company posting the news.</td></tr></tbody></table>

<details>

<summary>JSONContent Example</summary>

```
{
    "type": "doc",
    "content": [
        {
            "type": "paragraph",
            "content": [
                {
                    "type": "text",
                    "marks": [
                        {
                            "type": "bold"
                        }
                    ],
                    "text": "This is Bold text"
                }
            ],
            "attrs": []
        },
        {
            "type": "paragraph",
            "content": [
                {
                    "type": "text",
                    "marks": [
                        {
                            "type": "italic"
                        }
                    ],
                    "text": "This is Italic text"
                }
            ],
            "attrs": []
        },
        {
            "type": "paragraph",
            "content": [
                {
                    "type": "text",
                    "marks": [
                        {
                            "type": "strike"
                        }
                    ],
                    "text": "This is Strikethrough text"
                }
            ],
            "attrs": []
        },
        {
            "type": "paragraph",
            "content": [
                {
                    "type": "text",
                    "text": "This is normal text"
                }
            ],
            "attrs": []
        }
    ]
}
--- Comes from https://tiptap.dev/
```

**OUTPUT:**

<div align="left"><figure><img src="https://3673882971-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFxWJGV2Spk1WhY0R0XVU%2Fuploads%2FhKPF6FwiZxLDz34GfH0N%2Fimage.png?alt=media&#x26;token=7f244d17-14ff-4d6d-bbd0-3e0ee326a710" alt=""><figcaption></figcaption></figure></div>

</details>

### Set Call Notifications (By Source)

Toggle the state of company calls notifications for a player using their Server ID (Source).

{% code overflow="wrap" lineNumbers="true" %}

```lua
exports["17mov_Phone"]:Companies_SetCompaniesCallStateBySrc(src, state)
```

{% endcode %}

<table><thead><tr><th width="115" align="center">Argument</th><th width="90" valign="middle">Type</th><th width="113" align="center" valign="middle">Optional</th><th align="center" valign="middle">Explanation</th></tr></thead><tbody><tr><td align="center">src</td><td valign="middle"><code>number</code></td><td align="center" valign="middle">❌</td><td align="center" valign="middle">The player's server ID (source).</td></tr><tr><td align="center">state</td><td valign="middle"><code>boolean</code></td><td align="center" valign="middle">❌</td><td align="center" valign="middle"><code>true</code> to enable notifications, <code>false</code> to disable.</td></tr></tbody></table>

### Set Call Notifications (By Number)

Toggle the state of company calls notifications for a player using their phone number.

<pre class="language-lua" data-line-numbers><code class="lang-lua"><strong>exports["17mov_Phone"]:Companies_SetCompaniesCallStateByNumber(number, state)
</strong></code></pre>

<table><thead><tr><th width="117" align="center">Argument</th><th width="111" align="center">Type</th><th width="107" align="center">Optional</th><th align="center">Explanation</th></tr></thead><tbody><tr><td align="center">number</td><td align="center"><code>number</code></td><td align="center">❌</td><td align="center">The player's phone number.</td></tr><tr><td align="center">state</td><td align="center"><code>boolean</code></td><td align="center">❌</td><td align="center"><code>true</code> to enable notifications, <code>false</code> to disable.</td></tr></tbody></table>

### Set Message Notifications (By Source)

Toggle the state of company message notifications for a player using their Server ID (Source).

{% code lineNumbers="true" %}

```lua
exports["17mov_Phone"]:Companies_SetCompaniesMessagesStateBySrc(src, state)
```

{% endcode %}

<table><thead><tr><th width="114" align="center">Argument</th><th width="109" align="center">Type</th><th width="114" align="center">Optional</th><th align="center">Explanation</th></tr></thead><tbody><tr><td align="center">src</td><td align="center"><code>number</code></td><td align="center">❌</td><td align="center">The player's server ID (source).</td></tr><tr><td align="center">state</td><td align="center"><code>boolean</code></td><td align="center">❌</td><td align="center"><code>true</code> to enable notifications, <code>false</code> to disable.</td></tr></tbody></table>

### Set Message Notifications (By Number)

Toggle the state of company message notifications for a player using their phone number.

{% code lineNumbers="true" %}

```lua
exports["17mov_Phone"]:Companies_SetCompaniesMessagesStateByNumber(number, state)
```

{% endcode %}

<table><thead><tr><th width="115" align="center">Argument</th><th width="106" align="center">Type</th><th width="107" align="center">Optional</th><th align="center">Explanation</th></tr></thead><tbody><tr><td align="center">number</td><td align="center"><code>number</code></td><td align="center">❌</td><td align="center">The player's phone number.</td></tr><tr><td align="center">state</td><td align="center"><code>boolean</code></td><td align="center">❌</td><td align="center"><code>true</code> to enable notifications, <code>false</code> to disable.</td></tr></tbody></table>
