Class: Record

Record(opts)

The Record class wraps folder

Cannot directly be instantiated

Constructor

new Record(opts)

Creates a record

Parameters:
Name Type Description
opts object

The configuration options.

Methods

copy(uuid, dstId, newName) → {Promise.<*>}

Copy a record

Parameters:
Name Type Description
uuid

The uuid of the record

dstId

The uuid of the destination folder or record

newName

The newName of the record

Returns:
  • Return void
Type
Promise.<*>

copy(uuid, dstId, newName) → {Promise.<*>}

Copy a record

Parameters:
Name Type Description
uuid

The uuid of the record

dstId

The uuid of the destination folder or record

newName

The newName of the record

Returns:
  • Return void
Type
Promise.<*>

create(uuid, name) → {Promise.<*>}

Create a record

Parameters:
Name Type Description
uuid

The uuid of the parent

name

The name of the new record

Returns:
  • Return the record object
Type
Promise.<*>

create(uuid, name) → {Promise.<*>}

Create a record

Parameters:
Name Type Description
uuid

The uuid of the parent

name

The name of the new record

Returns:
  • Return the record object
Type
Promise.<*>

createFromTemplate(uuid, dstPath, categories, keywords, notes, properties) → {Promise.<any>|Promise.<T>}

Create records from template

Parameters:
Name Type Description
uuid

The uuid of the template

dstPath

The destination path of the new record

categories

When true copy categories

keywords

When true copy keywords

notes

When true copy notes

properties

The metadata groups

Returns:
Type
Promise.<any> | Promise.<T>

createFromTemplate(uuid, dstPath, categories, keywords, notes, properties) → {Promise.<any>|Promise.<T>}

Create records from template

Parameters:
Name Type Description
uuid

The uuid of the template

dstPath

The destination path of the new record

categories

When true copy categories

keywords

When true copy keywords

notes

When true copy notes

properties

The metadata groups

Returns:
Type
Promise.<any> | Promise.<T>

delete(uuid) → {Promise.<*>}

Delete a record

Parameters:
Name Type Description
uuid

The uuid of the record

Returns:
  • Return void
Type
Promise.<*>

delete(uuid) → {Promise.<*>}

Delete a record

Parameters:
Name Type Description
uuid

The uuid of the record

Returns:
  • Return void
Type
Promise.<*>

extendedCopy(uuid, dstId, newName, categories, keywords, notes, propertyGroups, wiki, security) → {Promise.<any>|Promise.<(*|never)>}

Extended copy of a record

Parameters:
Name Type Description
uuid

The uuid of the record

dstId

The uuid of the folder or record destination node

newName

The newName of the new node

categories

When true copy categories

keywords

When true copy keywords

notes

When true copy notes

propertyGroups

The metadata groups

wiki

When true copy wiki

security

When true copy security

Returns:

Return the properties of a record

Type
Promise.<any> | Promise.<(*|never)>

extendedCopy(uuid, dstId, newName, categories, keywords, notes, propertyGroups, wiki, security) → {Promise.<any>|Promise.<(*|never)>}

Extended copy of a record

Parameters:
Name Type Description
uuid

The uuid of the record

dstId

The uuid of the folder or record destination node

newName

The newName of the new node

categories

When true copy categories

keywords

When true copy keywords

notes

When true copy notes

propertyGroups

The metadata groups

wiki

When true copy wiki

security

When true copy security

Returns:

Return the properties of a record

Type
Promise.<any> | Promise.<(*|never)>

getChildren(uuid) → {Promise.<any>|Promise.<(*|never)>}

Get children records

Parameters:
Name Type Description
uuid

The uuid of a parent folder or record

Returns:

Return a list of records

Type
Promise.<any> | Promise.<(*|never)>

getChildren(uuid) → {Promise.<any>|Promise.<(*|never)>}

Get children records

Parameters:
Name Type Description
uuid

The uuid of a parent folder or record

Returns:

Return a list of records

Type
Promise.<any> | Promise.<(*|never)>

getProperties(uuid) → {Promise.<any>|Promise.<(*|never)>}

Get the record properties

Parameters:
Name Type Description
uuid

The uuid of a record node

Returns:

Return the properties of a record

Type
Promise.<any> | Promise.<(*|never)>

getProperties(uuid) → {Promise.<any>|Promise.<(*|never)>}

Get the record properties

Parameters:
Name Type Description
uuid

The uuid of a record node

Returns:

Return the properties of a record

Type
Promise.<any> | Promise.<(*|never)>

isValid(uuid) → {Promise.<any>|Promise.<(*|never)>}

Is valid record

Parameters:
Name Type Description
uuid

The uuid of the node

Returns:

Return true when node is a record otherwise false

Type
Promise.<any> | Promise.<(*|never)>

isValid(uuid) → {Promise.<any>|Promise.<(*|never)>}

Is valid record

Parameters:
Name Type Description
uuid

The uuid of the node

Returns:

Return true when node is a record otherwise false

Type
Promise.<any> | Promise.<(*|never)>

move(uuid, dstId) → {Promise.<*>}

Move a record

Parameters:
Name Type Description
uuid

The uuid of the record

dstId

The uuid of the destination folder or record

Returns:
  • Return void
Type
Promise.<*>

move(uuid, dstId) → {Promise.<*>}

Move a record

Parameters:
Name Type Description
uuid

The uuid of the record

dstId

The uuid of the destination folder or record

Returns:
  • Return void
Type
Promise.<*>

purge(uuid) → {Promise.<any>|Promise.<*>}

Purge folder

Parameters:
Name Type Description
uuid

The uuid of the folder

Returns:
Type
Promise.<any> | Promise.<*>

purge(uuid) → {Promise.<any>|Promise.<*>}

Purge folder

Parameters:
Name Type Description
uuid

The uuid of the folder

Returns:
Type
Promise.<any> | Promise.<*>

rename(uuid, newName) → {Promise.<*>}

Rename a record

Parameters:
Name Type Description
uuid

The uuid of the parent

newName

The name of the record

Returns:
  • Return void
Type
Promise.<*>

rename(uuid, newName) → {Promise.<*>}

Rename a record

Parameters:
Name Type Description
uuid

The uuid of the parent

newName

The name of the record

Returns:
  • Return void
Type
Promise.<*>

setDescription(uuid, description) → {Promise.<*>}

Set description

Parameters:
Name Type Description
uuid

The uuid of the parent

description

The description of the record

Returns:
  • Return void
Type
Promise.<*>

setDescription(uuid, description) → {Promise.<*>}

Set description

Parameters:
Name Type Description
uuid

The uuid of the parent

description

The description of the record

Returns:
  • Return void
Type
Promise.<*>

setNodeClass(uuid, ncId) → {Promise.<*>}

Set nodeClass

Parameters:
Name Type Description
uuid

The uuid of the record

ncId

The nodeClass id

Returns:
  • Return void
Type
Promise.<*>

setNodeClass(uuid, ncId) → {Promise.<*>}

Set nodeClass

Parameters:
Name Type Description
uuid

The uuid of the record

ncId

The nodeClass id

Returns:
  • Return void
Type
Promise.<*>

setRestUrl(restUrl)

Set the rest url

Parameters:
Name Type Description
restUrl

The rest url

setRestUrl(restUrl)

Set the rest url

Parameters:
Name Type Description
restUrl

The rest url

setTitle(uuid, title) → {Promise.<*>}

Set title

Parameters:
Name Type Description
uuid

The uuid of the parent

title

The title of the record

Returns:
  • Return void
Type
Promise.<*>

setTitle(uuid, title) → {Promise.<*>}

Set title

Parameters:
Name Type Description
uuid

The uuid of the parent

title

The title of the record

Returns:
  • Return void
Type
Promise.<*>

setToken(token)

Set the token in Record variables

Parameters:
Name Type Description
token

The authorization token value

setToken(token)

Set the token in Record variables

Parameters:
Name Type Description
token

The authorization token value

Record(opts)

The Record class wraps folder

Cannot directly be instantiated

Constructor

new Record(opts)

Creates a record

Parameters:
Name Type Description
opts object

The configuration options.

Methods

copy(uuid, dstId, newName) → {Promise.<*>}

Copy a record

Parameters:
Name Type Description
uuid

The uuid of the record

dstId

The uuid of the destination folder or record

newName

The newName of the record

Returns:
  • Return void
Type
Promise.<*>

copy(uuid, dstId, newName) → {Promise.<*>}

Copy a record

Parameters:
Name Type Description
uuid

The uuid of the record

dstId

The uuid of the destination folder or record

newName

The newName of the record

Returns:
  • Return void
Type
Promise.<*>

create(uuid, name) → {Promise.<*>}

Create a record

Parameters:
Name Type Description
uuid

The uuid of the parent

name

The name of the new record

Returns:
  • Return the record object
Type
Promise.<*>

create(uuid, name) → {Promise.<*>}

Create a record

Parameters:
Name Type Description
uuid

The uuid of the parent

name

The name of the new record

Returns:
  • Return the record object
Type
Promise.<*>

createFromTemplate(uuid, dstPath, categories, keywords, notes, properties) → {Promise.<any>|Promise.<T>}

Create records from template

Parameters:
Name Type Description
uuid

The uuid of the template

dstPath

The destination path of the new record

categories

When true copy categories

keywords

When true copy keywords

notes

When true copy notes

properties

The metadata groups

Returns:
Type
Promise.<any> | Promise.<T>

createFromTemplate(uuid, dstPath, categories, keywords, notes, properties) → {Promise.<any>|Promise.<T>}

Create records from template

Parameters:
Name Type Description
uuid

The uuid of the template

dstPath

The destination path of the new record

categories

When true copy categories

keywords

When true copy keywords

notes

When true copy notes

properties

The metadata groups

Returns:
Type
Promise.<any> | Promise.<T>

delete(uuid) → {Promise.<*>}

Delete a record

Parameters:
Name Type Description
uuid

The uuid of the record

Returns:
  • Return void
Type
Promise.<*>

delete(uuid) → {Promise.<*>}

Delete a record

Parameters:
Name Type Description
uuid

The uuid of the record

Returns:
  • Return void
Type
Promise.<*>

extendedCopy(uuid, dstId, newName, categories, keywords, notes, propertyGroups, wiki, security) → {Promise.<any>|Promise.<(*|never)>}

Extended copy of a record

Parameters:
Name Type Description
uuid

The uuid of the record

dstId

The uuid of the folder or record destination node

newName

The newName of the new node

categories

When true copy categories

keywords

When true copy keywords

notes

When true copy notes

propertyGroups

The metadata groups

wiki

When true copy wiki

security

When true copy security

Returns:

Return the properties of a record

Type
Promise.<any> | Promise.<(*|never)>

extendedCopy(uuid, dstId, newName, categories, keywords, notes, propertyGroups, wiki, security) → {Promise.<any>|Promise.<(*|never)>}

Extended copy of a record

Parameters:
Name Type Description
uuid

The uuid of the record

dstId

The uuid of the folder or record destination node

newName

The newName of the new node

categories

When true copy categories

keywords

When true copy keywords

notes

When true copy notes

propertyGroups

The metadata groups

wiki

When true copy wiki

security

When true copy security

Returns:

Return the properties of a record

Type
Promise.<any> | Promise.<(*|never)>

getChildren(uuid) → {Promise.<any>|Promise.<(*|never)>}

Get children records

Parameters:
Name Type Description
uuid

The uuid of a parent folder or record

Returns:

Return a list of records

Type
Promise.<any> | Promise.<(*|never)>

getChildren(uuid) → {Promise.<any>|Promise.<(*|never)>}

Get children records

Parameters:
Name Type Description
uuid

The uuid of a parent folder or record

Returns:

Return a list of records

Type
Promise.<any> | Promise.<(*|never)>

getProperties(uuid) → {Promise.<any>|Promise.<(*|never)>}

Get the record properties

Parameters:
Name Type Description
uuid

The uuid of a record node

Returns:

Return the properties of a record

Type
Promise.<any> | Promise.<(*|never)>

getProperties(uuid) → {Promise.<any>|Promise.<(*|never)>}

Get the record properties

Parameters:
Name Type Description
uuid

The uuid of a record node

Returns:

Return the properties of a record

Type
Promise.<any> | Promise.<(*|never)>

isValid(uuid) → {Promise.<any>|Promise.<(*|never)>}

Is valid record

Parameters:
Name Type Description
uuid

The uuid of the node

Returns:

Return true when node is a record otherwise false

Type
Promise.<any> | Promise.<(*|never)>

isValid(uuid) → {Promise.<any>|Promise.<(*|never)>}

Is valid record

Parameters:
Name Type Description
uuid

The uuid of the node

Returns:

Return true when node is a record otherwise false

Type
Promise.<any> | Promise.<(*|never)>

move(uuid, dstId) → {Promise.<*>}

Move a record

Parameters:
Name Type Description
uuid

The uuid of the record

dstId

The uuid of the destination folder or record

Returns:
  • Return void
Type
Promise.<*>

move(uuid, dstId) → {Promise.<*>}

Move a record

Parameters:
Name Type Description
uuid

The uuid of the record

dstId

The uuid of the destination folder or record

Returns:
  • Return void
Type
Promise.<*>

purge(uuid) → {Promise.<any>|Promise.<*>}

Purge folder

Parameters:
Name Type Description
uuid

The uuid of the folder

Returns:
Type
Promise.<any> | Promise.<*>

purge(uuid) → {Promise.<any>|Promise.<*>}

Purge folder

Parameters:
Name Type Description
uuid

The uuid of the folder

Returns:
Type
Promise.<any> | Promise.<*>

rename(uuid, newName) → {Promise.<*>}

Rename a record

Parameters:
Name Type Description
uuid

The uuid of the parent

newName

The name of the record

Returns:
  • Return void
Type
Promise.<*>

rename(uuid, newName) → {Promise.<*>}

Rename a record

Parameters:
Name Type Description
uuid

The uuid of the parent

newName

The name of the record

Returns:
  • Return void
Type
Promise.<*>

setDescription(uuid, description) → {Promise.<*>}

Set description

Parameters:
Name Type Description
uuid

The uuid of the parent

description

The description of the record

Returns:
  • Return void
Type
Promise.<*>

setDescription(uuid, description) → {Promise.<*>}

Set description

Parameters:
Name Type Description
uuid

The uuid of the parent

description

The description of the record

Returns:
  • Return void
Type
Promise.<*>

setNodeClass(uuid, ncId) → {Promise.<*>}

Set nodeClass

Parameters:
Name Type Description
uuid

The uuid of the record

ncId

The nodeClass id

Returns:
  • Return void
Type
Promise.<*>

setNodeClass(uuid, ncId) → {Promise.<*>}

Set nodeClass

Parameters:
Name Type Description
uuid

The uuid of the record

ncId

The nodeClass id

Returns:
  • Return void
Type
Promise.<*>

setRestUrl(restUrl)

Set the rest url

Parameters:
Name Type Description
restUrl

The rest url

setRestUrl(restUrl)

Set the rest url

Parameters:
Name Type Description
restUrl

The rest url

setTitle(uuid, title) → {Promise.<*>}

Set title

Parameters:
Name Type Description
uuid

The uuid of the parent

title

The title of the record

Returns:
  • Return void
Type
Promise.<*>

setTitle(uuid, title) → {Promise.<*>}

Set title

Parameters:
Name Type Description
uuid

The uuid of the parent

title

The title of the record

Returns:
  • Return void
Type
Promise.<*>

setToken(token)

Set the token in Record variables

Parameters:
Name Type Description
token

The authorization token value

setToken(token)

Set the token in Record variables

Parameters:
Name Type Description
token

The authorization token value