# Global

##

### Type Definitions

#### CreateNewNoteParams

##### Type:

- object

##### Properties:

Name | Type | Description
--- | --- | ---
`parentNoteId` | string | MANDATORY
`title` | string | MANDATORY
`content` | string | buffer | MANDATORY
`type` | string | text, code, file, image, search, book, relation-map - MANDATORY
`mime` | string | value is derived from default mimes for type
`isProtected` | boolean | default is false
`isExpanded` | boolean | default is false
`prefix` | string | default is empty string
`notePosition` | int | default is last existing notePosition in a parent + 10

Source:
  - services/backend_script_api.js, line 212

#### CreateNoteAttribute

##### Type:

- object

##### Properties:

Name | Type | Attributes | Description
--- | --- | --- | ---
`type` | string |  | attribute type - label, relation etc.
`name` | string |  | attribute name
`value` | string | <optional> | attribute value

Source:
  - services/backend_script_api.js, line 173

#### CreateNoteAttribute

##### Type:

- object

##### Properties:

Name | Type | Attributes | Description
--- | --- | --- | ---
`type` | string |  | attribute type - label, relation etc.
`name` | string |  | attribute name
`value` | string | <optional> | attribute value

Source:
  - services/backend_script_api.js, line 233

#### CreateNoteExtraOptions

##### Type:

- object

##### Properties:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`json` | boolean | <optional> | false | should the note be JSON
`isProtected` | boolean | <optional> | false | should the note be protected
`type` | string | <optional> | 'text' | note type
`mime` | string | <optional> | 'text/html' | MIME type of the note
`attributes` | Array.<CreateNoteAttribute> | <optional> | [] | attributes to be created for this note

Source:
  - services/backend_script_api.js, line 240