linkPlugin API Reference Documentation: Appendix I: Types
linkattachment
Describes an attachment in a note. attachment objects can have the following properties:
name the String filename associated with the attachment
type a mime type String describing the content of the attachment
uuid a unique String identifier that can be used to identify the attachment
linkimage
Describes an image displayed inline in a note. image objects can have the following properties:
caption markdown String describing the content of the image caption
index when there are multiple images in a note with the same src value, the index can be used to disambiguate between the images. This property can not be updated.
src the String source URL of the image
text the String of OCR text recognized in the image
width optional Integer value that is the pixel width the image will be displayed at. The height is set matching the image aspect ratio.
linklink
Describes a link, which may include Rich Footnote content. link objects have the following properties:
description markdown string describing the content of the link's Rich Footnote content. Note that the markdown content supported in Rich Footnotes is a subset of the markdown content supported in notes themselves.
href the string that the link is set to link to
Any of these properties may be null, if the link does not have the corresponding value set.
linkmoodRating
Describes a mood rating the user has left, with the following properties:
note a string entered by the user when leaving the rating
rating the integer rating, ranging from -2 to +2 (inclusive)
timestamp the integer unix timestamp (seconds) when the rating was recorded
uuid a unique identifier string for this mood rating
linknoteHandle
Some app interface functions take a noteHandle argument. Note handles are objects that can identify notes even if they do not yet exist (e.g. future daily jot notes). Calling an app interface function with the noteHandle of a note that does not yet exist is likely to create that note, for example when inserting content into the note.
App interface functions that take a noteHandle argument can optionally be passed a string uuid instead of a noteHandle object, effectively providing someFunction("123") as a shorthand for someFunction({ uuid: "123" }).
An individual note that exists is identified by a uuid - however there are some cases where a note may not yet have been acknowledged by the server (e.g. in an extended period of offline usage), in which case the note's uuid may be prefixed with the string "local-" and may change once the note is fully persisted to the Amplenote servers. The local-prefixed uuid can continue to be used on the same client that created the note, even after the note has been fully persisted.
When an app.* interface function returns a NoteHandle object, it will be populated with additional metadata about the note in question, including the following attributes:
created an ISO 8601 datetime string representing when the note was originally created
name the string name (aka "title") of the note. For notes that do not have a name and show up as "untitled note", this will be null, not the string "untitled note".
published a boolean indicating that the note has one or more public links. This attribute is only present when true, otherwise it is elided.
shared a boolean indicating that the note is shared with additional users. This attribute is only present when true, otherwise it is elided.
tags an array of strings representing each tag applied to the note. For notes tagged with child/sub tags, e.g. "top-level/sub-tag", note that this array won't necessarily include "top-level" as a separate entry.
updated an ISO 8601 date-time string representing when the note was last modified
uuid the string identifier of the note
vault a boolean indicating that the note is a vault note. This attribute is only present when true, otherwise it is elided.
linksection
Describes a chunk of a note, where each note can be broken up into multiple sections, encompassing entirety of the note's content. A note is divided into sections by using headings and horizontal rules. The first part of a note before any headings appear is considered a section (that has no heading), while content after a horizontal rule is also considered a separate section (also with no heading).
Section objects have the following properties:
heading - will be null if the section does not start with a heading (e.g. if this is the first part of the note before any headings, or a section after a horizontal rule); otherwise, will be an object describing the heading, with the following properties:
anchor - the String anchor that can be used to navigate to the heading in the note
href - a String URL that is linked to from the heading - note only a link at the start of the heading content will be considered - links elsewhere in the heading are ignored.
level - the integer level of the heading (i.e. for H1-H3)
text - the String text of the heading, without any formatting that may be applied (bold/italic/etc)
index - if there are multiple sections with headings that otherwise match (either because they are all heading: null or the text of the heading is the same), sections after the first section will include this integer index of the heading.
Examples:


linktask
Some app interface functions return - or accept - task objects that can have the following properties:
completedAt integer unix (seconds) timestamp describing the (UTC) time at which the task was completed - only present if the task has been completed.
content markdown String describing the content of the task
deadline integer unix (seconds) timestamp describing the (UTC) time set as the deadline of the task
dismissedAt integer unix (seconds) timestamp describing the (UTC) time at which the task was dismissed - only present if the task has been dismissed.
endAt integer unix (seconds) timestamp describing the (UTC) time at which the task should end. When updating a task, must be after the startAt time of the task - and can not be set for a task that does not have a startAt time set (or provided in the same update call). The seconds between the startAt and endAt times define the duration of the task.
hideUntil integer unix (seconds) timestamp describing the (UTC) time that the task will be hidden until, or null if the task is not hidden.
important boolean indicating if the task is marked as important
noteUUID String uuid identifying the note that the task resides in. Passing this attribute to app interface functions that receive task objects will not have any effect.
score Number corresponding to the total task score attributed to the task at the current moment. Note that this accumulates once daily, depending on interaction with the task and/or note the task is in.
startAt integer unix (seconds) timestamp describing the (UTC) time that the task starts at, or null if the task does not have a start time set.
urgent boolean indicating if the task is marked as urgent
uuid String UUID uniquely identifying this task.