SERVER EXPORTS

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

Fetch Notes (By Source)

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

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

Returns:

  • NotesItem[]: An array of note objects.

Argument
Type
Optional
Explanation

src

number

โŒ

The player's server ID (source).

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

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

Returns:

  • NotesItem[]: An array of note objects.

Argument
Type
Optional
Explanation

number

number

โŒ

The player's phone number.

Add Note (By Source)

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

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

Returns:

  • number: The ID of the newly created note.

Argument
Type
Optional
Explanation

src

number

โŒ

The player's server ID (source).

title

string

โŒ

The title of the note.

description

string | JSONContent

โŒ

Note description (content). JSONContet is same as here

Add Note (By Number)

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

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

Returns:

  • number: The ID of the newly created note.

Argument
Type
Optional
Explanation

number

number

โŒ

The player's phone number.

title

string

โŒ

The title of the note.

description

string | JSONContent

โŒ

Note description (content). JSONContet is same as here

Delete Note

Permanently deletes a specific note.

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

Returns:

  • boolean: true if the note was successfully deleted.

Argument
Type
Optional
Explanation

noteId

number

โŒ

The ID of the note to delete.

Last updated