# SERVER EXPORTS

<details>

<summary>NotesItem Structure</summary>

```
{
  "id": 1,
  "number": "555-0123",
  "title": "Shopping List",
  "description": {
    "type": "doc",
    "content": [
      {
        "type": "paragraph",
        "content": [
          {
            "type": "text",
            "text": "Milk, Bread, Eggs"
          }
        ]
      }
    ]
  },
  "createdAt": 1678900000
}
```

</details>

### Fetch Notes (By Source)

Retrieves a list of all notes belonging to a player using their Server ID (Source).

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

```lua
local notes = exports["17mov_Phone"]:Notes_FetchNotesById(src)
```

{% endcode %}

**Returns:**

* `NotesItem[]`: An array of note objects.

<table><thead><tr><th width="114" align="center">Argument</th><th width="93" align="center">Type</th><th width="133" align="center">Optional</th><th>Explanation</th></tr></thead><tbody><tr><td align="center">src</td><td align="center"><code>number</code></td><td align="center">❌</td><td>The player's server ID (source).</td></tr></tbody></table>

Retrieves a list of all notes belonging to a player using their phone number.

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

```lua
local notes = exports["17mov_Phone"]:Notes_FetchNotesByNumber(number)
```

{% endcode %}

**Returns:**

* `NotesItem[]`: An array of note objects.

<table><thead><tr><th width="112" align="center">Argument</th><th width="100" align="center">Type</th><th width="109" align="center">Optional</th><th>Explanation</th></tr></thead><tbody><tr><td align="center">number</td><td align="center"><code>number</code></td><td align="center">❌</td><td>The player's phone number.</td></tr></tbody></table>

### Add Note (By Source)

Creates a new note for a player using their Server ID (Source).

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

```lua
local noteId = exports["17mov_Phone"]:Notes_AddNoteBySrc(src, title, description)
```

{% endcode %}

**Returns:**

* `number`: The ID of the newly created note.

<table><thead><tr><th width="133" align="center">Argument</th><th width="205" align="center">Type</th><th width="161" align="center">Optional</th><th>Explanation</th></tr></thead><tbody><tr><td align="center">src</td><td align="center"><code>number</code></td><td align="center">❌</td><td>The player's server ID (source).</td></tr><tr><td align="center">title</td><td align="center"><code>string</code></td><td align="center">❌</td><td>The title of the note.</td></tr><tr><td align="center">description</td><td align="center"><code>string | JSONContent</code> </td><td align="center">❌</td><td>Note description (content). JSONContet is same as <a href="../../companies/server-exports#jsoncontent-example">here</a></td></tr></tbody></table>

### Add Note (By Number)

Creates a new note for a player using their phone number.

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

```lua
local noteId = exports["17mov_Phone"]:Notes_AddNoteByNumber(number, title, description)
```

{% endcode %}

**Returns:**

* `number`: The ID of the newly created note.

<table><thead><tr><th width="137" align="center">Argument</th><th width="206" align="center">Type</th><th width="149" 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">title</td><td align="center"><code>string</code></td><td align="center">❌</td><td align="center">The title of the note.</td></tr><tr><td align="center">description</td><td align="center"><code>string | JSONContent</code></td><td align="center">❌</td><td align="center">Note description (content). JSONContet is same as <a href="../../companies/server-exports#jsoncontent-example">here</a></td></tr></tbody></table>

### Delete Note

Permanently deletes a specific note.

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

```lua
local success = exports["17mov_Phone"]:Notes_DeleteNote(noteId)
```

{% endcode %}

**Returns:**

* `boolean`: `true` if the note was successfully deleted.

<table><thead><tr><th width="125" align="center">Argument</th><th width="109" align="center">Type</th><th width="114" align="center">Optional</th><th>Explanation</th></tr></thead><tbody><tr><td align="center">noteId</td><td align="center"><code>number</code></td><td align="center">❌</td><td>The ID of the note to delete.</td></tr></tbody></table>
