<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dictionary SYSTEM "file://localhost/System/Library/DTDs/sdef.dtd">

<dictionary title="Standard Terminology">
    <suite name="Standard Suite" code="????" description="Common classes and commands for all applications.">
        <class name="application" code="capp" description="The application's top-level scripting object.">
            <cocoa class="NSApplication"/>
            <property name="name" code="pnam" type="text" access="r" description="The name of the application."/>
            <property name="frontmost" code="pisf" type="boolean" access="r" description="Is this the active application?">
                <cocoa key="isActive"/>
            </property>
            <property name="version" code="vers" type="text" access="r" description="The version number of the application."/>
            
            <responds-to command="quit">
                <cocoa method="handleQuitScriptCommand:"/>
            </responds-to>
        </class>
        
        <command name="count" code="corecnte" description="Return the number of elements of a particular class within an object.">
            <cocoa class="NSCountCommand"/>
            <access-group identifier="*"/>
            <direct-parameter type="specifier" requires-access="r" description="The objects to be counted."/>
            <parameter name="each" code="kocl" type="type" optional="yes" description="The class of objects to be counted." hidden="yes">
                <cocoa key="ObjectClass"/>
            </parameter>
            <result type="integer" description="The count."/>
        </command>
        
        <command name="delete" code="coredelo" description="Delete an object.">
            <cocoa class="NSDeleteCommand"/>
            <access-group identifier="*"/>
            <direct-parameter type="specifier" description="The object(s) to delete."/>
        </command>
        
        <command name="duplicate" code="coreclon" description="Copy an object.">
            <cocoa class="NSCloneCommand"/>
            <access-group identifier="*"/>
            <direct-parameter type="specifier" requires-access="r" description="The object(s) to copy."/>
            <parameter name="to" code="insh" type="location specifier" description="The location for the new copy or copies." optional="yes">
                <cocoa key="ToLocation"/>
            </parameter>
            <parameter name="with properties" code="prdt" type="record" description="Properties to set in the new copy or copies right away." optional="yes">
                <cocoa key="WithProperties"/>
            </parameter>
        </command>
        
        <command name="exists" code="coredoex" description="Verify that an object exists.">
            <cocoa class="NSExistsCommand"/>
            <access-group identifier="*"/>
            <direct-parameter type="any" requires-access="r" description="The object(s) to check."/>
            <result type="boolean" description="Did the object(s) exist?"/>
        </command>
        
        <command name="make" code="corecrel" description="Create a new object.">
            <cocoa class="NSCreateCommand"/>
            <access-group identifier="*"/>
            <parameter name="new" code="kocl" type="type" description="The class of the new object.">
                <cocoa key="ObjectClass"/>
            </parameter>
            <parameter name="at" code="insh" type="location specifier" optional="yes" description="The location at which to insert the object.">
                <cocoa key="Location"/>
            </parameter>
            <parameter name="with data" code="data" type="any" optional="yes" description="The initial contents of the object.">
                <cocoa key="ObjectData"/>
            </parameter>
            <parameter name="with properties" code="prdt" type="record" optional="yes" description="The initial values for properties of the object.">
                <cocoa key="KeyDictionary"/>
            </parameter>
            <result type="specifier" description="The new object."/>
        </command>
    </suite>
    
    <suite name="SideNotes Suite" code="SNAC" description="SideNotes suite.">
        <class name="application" code="capp" description="SideNotes top level scripting object." plural="applications">
            <cocoa class="NSApplication"/>
            
            <property name="current folder" code="CF  " type="folder" access="rw" description="Currently open folder">
                <cocoa key="currentFolder"/>
            </property>
            
            <property name="current note" code="CN  " type="note" access="rw" description="Currently open note">
                <cocoa key="currentNote"/>
            </property>
            
            <element type="folder" access="rw">
                <cocoa key="folders"/>
            </element>
            
            <element type="note" access="r">
                <cocoa key="notes" />
            </element>
            
            <property name="themes" code="TH  " type="list of theme" access="r" description="User Interface Themes">
                <cocoa key="themes"/>
            </property>
        </class>
        
        <class name="folder" code="snfd" inherits="item"  description="Represents a folder.">
            <cocoa class="Folder" />
            
            <property name="id" code="ID  " type="text" access="r" description="The unique identifier of the folder.">
                <cocoa key="id"/>
            </property>
            
            <property name="name" code="pnam" type="text" description="Name of the folder.">
                <cocoa key="name" />
            </property>
            
            <element type="note" description="Notes" access="rw">
                <cocoa key="orderedNotes" />
            </element>
        </class>
        
        <record-type name="search result item" code="srit">
            <property name="identifier" code="siid" type="text" />
            <property name="type" code="sitp" type="search result item type" />
            <property name="title" code="ptit" type="text" />
            <property name="details" code="side" type="text" />
        </record-type>
        
        <enumeration name="search result item type" code="srit">
            <enumerator name="folder" code="srtf" />
            <enumerator name="note" code="srtn" />
        </enumeration>
        
        <enumeration name="color" code="colr">
            <enumerator name="red" code="ncre" />
            <enumerator name="green" code="ncgr" />
            <enumerator name="blue" code="ncbl" />
            <enumerator name="gray" code="ncga" />
            <enumerator name="yellow" code="ncye" />
            <enumerator name="purple" code="ncpu" />
        </enumeration>
        
        <enumeration name="text formatting" code="tfrm">
            <enumerator name="markdown" code="tfmd" />
            <enumerator name="plain" code="tfpt" />
            <enumerator name="code" code="tfco" />
        </enumeration>
        
        <class name="note" code="snnt" inherits="item" description="Represents a note.">
            <cocoa class="Note" />
            
            <property name="id" code="ID  " type="text" access="r" description="The unique identifier of the note.">
                <cocoa key="id"/>
            </property>
            
            <property name="text" code="nttx" type="text" description="Text">
                <cocoa key="text" />
            </property>
            
            <property name="text formatting" code="nttf" type="text formatting" description="ID of the text formatting.">
                <cocoa key="appleScriptTextFormatting" />
            </property>
            
            <property name="date" code="ntda" type="date" description="Date of creation.">
                <cocoa key="date" />
            </property>
            
            <property name="color" code="ntcl" type="color" description="Color of the note.">
                <cocoa key="appleScriptColor" />
            </property>
            
            <property name="title" code="ptit" type="text" description="Title of the note based on its first line. If it starts with Markdown hash, the hash is omitted.">
                <cocoa key="titleText" />
            </property>
            
            <property name="content" code="ntco" type="text" description="Content of the note excluding the title">
                <cocoa key="contentText" />
            </property>
        </class>
        
        <record-type name="theme" code="thme">
            <property name="name" code="thna" type="text" />
            <property name="path" code="thpa" type="text" />
        </record-type>
        
        <command name="open" code="SNCMOpen" description="Opens a folder or even a note.">
            <cocoa class="OpenFolderCommand" />
            
            <parameter name="folder" type="folder" code="offl" description="Folder specifier." />
            <parameter name="note" type="note" optional="yes" code="ofnt" description="Folder specifier." />
        </command>
        
        <command name="open with id" code="SNCMOpid" description="Opens a folder or even a note.">
            <cocoa class="OpenIDCommand" />
            
            <direct-parameter name="id" type="text" code="opid" description="Identifier of folder or note" />
        </command>
        
        <command name="search" code="SNCMSrch" description="Searches for notes and folders">
            <cocoa class="SearchCommand" />
            
            <direct-parameter name="query" type="text" code="sequ" description="Search Query" />
            
            <result type="list of search result item" description="Search Results" />
        </command>
        
        <command name="search notes" code="SNCMSeno" description="Searches for notes only">
            <cocoa class="SearchNotesCommand" />
            
            <direct-parameter name="query" type="text" code="snqu" description="Search Query" />
            
            <result type="list of search result item" description="Search Results" />
        </command>
        
        <command name="search themes" code="SNCMSrth" description="Searches for themes">
            <cocoa class="SearchThemesCommand" />
            
            <direct-parameter name="query" type="text" code="stqu" description="Search Query" />
            
            <result type="list of theme" description="Search Results" />
        </command>
        
        <command name="set theme" code="SNCMSeth" description="Sets the current theme as the given path">
            <cocoa class="SetThemeCommand" />
            <direct-parameter name="path" type="text" code="stpa" description="Theme path" />
        </command>
        
        <command name="get theme" code="SNCMGeth" description="Gets the current theme as the given path">
            <cocoa class="GetThemeCommand" />
            <result type="text" description="Current theme path" />
        </command>
        
        <command name="show all folders" code="SNCMSAll" description="Shows all folders">
            <cocoa class="ShowAllFoldersCommand" />
        </command>
        
        <command name="create note" code="SNCMCrNo" description="Creates a new note - just like the global shortcut.">
            <cocoa class="CreateNewNoteCommand" />
            <parameter name="folder" type="folder" code="cnfo" optional="yes" description="Folder specifier. If folder is not given, it will be determined automatically." />
            <parameter name="text" type="text" code="cnte" description="Text to be saved" />
            <parameter name="ispath" optional="yes" type="boolean" code="cnip" description="Determines if the given text is a path to a file." />
            <result type="note" description="Created note" />
        </command>
        
        <command name="show preferences" code="SNCMShpr" description="Shows preferences window">
            <cocoa class="ShowPreferencesCommand" />
        </command>
        
        <command name="search folders" code="SNCMSrfo" description="Searches for folders">
            <cocoa class="SearchFoldersCommand" />
            
            <direct-parameter name="query" type="text" code="sfqu" description="Search Query" />
            
            <result type="list of folder" description="Search Results" />
        </command>
        
        <command name="export images of" code="SNCMExim" description="Export images of the given folder">
            <cocoa class="ExportImagesOfNoteCommand" />
            
            <parameter name="note" type="note" code="exno" optional="no" description="A note" />
            <parameter name="to" type="text" code="eipa" description="Path of a folder where images will be saved" />
        </command>
    </suite>
</dictionary>
