TagEditor

TagEditor

An interface for editing tags.

Example

const contact = await sdk.contact
const editor = await contact.editTags()

editor.add("my-group", ["tag1", "tag2"])
await editor.apply()

Methods

add(group, tag) → {TagEditor}

Queue tag additions for a given tag group.

Parameters:
Name Type Description
group string

the tag group

tag string | Array.<string>

the tag or list of tags to apply

Returns:
Type:
TagEditor

apply() → {Promise.<void>}

Applies any previously queued changes.

Returns:
  • resolves if changes were applied successfully.

  • Type:
    Promise.<void>

remove(group, tag) → {TagEditor}

Queue tag removals for a given tag group.

Parameters:
Name Type Description
group string

the tag group

tag string | Array.<string>

the tag or list of tags to remove

Returns:
Type:
TagEditor

set(group, tag) → {TagEditor}

Queue tag replacement for a given tag group.

Parameters:
Name Type Description
group string

the tag group

tag string | Array.<string>

the tag or list of tags to replace

Returns:
Type:
TagEditor