Class: SetResponse

SetResponse

new SetResponse(jmap, optsopt)

This class represents a JMAP [xxxSet] http://jmap.io/spec.html#setfoos.

Parameters:
Name Type Attributes Description
jmap Client

The Client instance that created this SetResponse.

opts Object <optional>

The optional properties of this SetResponse.

Properties
Name Type Attributes Default Description
accountId String <optional>
''

The id of the Account used in the request that originated this SetResponse.

oldState String <optional>
''

The state string that would have been returned by getXXX before making the requested changes, or null if the server doesn’t know what the previous state string was.

newState Array.<String> <optional>
''

The state string that will now be returned by getXXX.

created Array.<String> <optional>
[]

A map of the creation id to an object containing any server-assigned properties of the XXX object (including the id) for all successfully created records.

updated Array.<String> <optional>
[]

A list of XXX ids for records that were successfully updated.

destroyed Array.<String> <optional>
[]

A list of XXX ids for records that were successfully destroyed.

notCreated Array.<String> <optional>
[]

A map of creation id to a SetError object for each XXX that failed to be created.

notUpdated Array.<String> <optional>
[]

A map of XXX id to a SetError object for each XXX that failed to be updated.

notDestroyed Array.<String> <optional>
[]

A map of XXX id to a SetError object for each XXX that failed to be destroyed.

Source:
See:

Extends

Methods

(static) fromJSONObject(jmap, object) → {SetResponse}

Creates a SetResponse from its JSON representation.

Parameters:
Name Type Description
jmap Client

The Client instance passed to the SetResponse constructor.

object Object

The JSON representation of the SetResponse, as a Javascript object.

Source:
Returns:
Type
SetResponse