Nutrient Web SDK

ReferenceAttachment

Interface Attachment

Interface

Hierarchy

RecordAttachment

Properties

The attachment's data as a Blob.

Default Value

null

Immutable Record API

30
  • Returns

    IterableIterator<["data", Blob | null]>

asImmutable

Deprecated
  • Returns

    this

    Deprecated

    Use withMutations() in place of asMutable() and asImmutable().

    See Also

    • Map#asImmutable

asMutable

Deprecated
  • Returns

    this

    Deprecated

    Use withMutations(), making the changes inside its callback.

    See Also

    • Map#asMutable

  • Returns a new instance of this Record type with all values set to their default values.

    Returns

    this
  • Returns a new instance of this Record type with the value for the specific key set to its default value.

    Type Parameters

    Kextends "data"

    Parameters

    keyK

    Returns

    this
  • Parameters

    keyPathIterable<unknown>

    Returns

    this
  • Parameters

    otherunknown

    Returns

    boolean
  • Returns the value associated with the provided key, which may be the default value defined when creating the Record factory function.

    If the requested key is not defined by this Record type, then notSetValue will be returned if provided. Note that this scenario would produce an error when using Flow or TypeScript.

    Type Parameters

    Kextends "data"

    Parameters

    keyK
    notSetValueunknown
    Optional

    Returns

    { data: Blob | null }[K]
  • Type Parameters

    T

    Parameters

    keystring
    notSetValueT

    Returns

  • Parameters

    keyPathIterable<unknown>

    Returns

    unknown
  • Parameters

    keystring

    Returns

    key is "data"

hashCode

Deprecated
  • Returns

    number

    Deprecated

    Use equals() to compare values.

  • Parameters

    keyPathIterable<unknown>

    Returns

    boolean
  • Parameters

    ...collections(Iterable<[string, unknown], any, any> | Partial<{ data: Blob | null }>)[]

    Returns

    this
  • Parameters

    ...collections(Iterable<[string, unknown], any, any> | Partial<{ data: Blob | null }>)[]

    Returns

    this
  • Parameters

    keyPathIterable<unknown>
    ...collectionsunknown[]

    Returns

    this
  • Parameters

    merger(oldVal: unknown, newVal: unknown, key: unknown) => unknown
    ...collections(Iterable<[string, unknown], any, any> | Partial<{ data: Blob | null }>)[]

    Returns

    this
  • Parameters

    keyPathIterable<unknown>
    ...collectionsunknown[]

    Returns

    this
  • Parameters

    merger(oldVal: unknown, newVal: unknown, key: "data") => unknown
    ...collections(Iterable<[string, unknown], any, any> | Partial<{ data: Blob | null }>)[]

    Returns

    this
  • Type Parameters

    Kextends "data"

    Parameters

    keyK

    Returns

    this
  • Parameters

    keyPathIterable<unknown>

    Returns

    this
  • Type Parameters

    Kextends "data"

    Parameters

    keyK
    value{ data: Blob | null }[K]

    Returns

    this
  • Parameters

    keyPathIterable<unknown>
    valueunknown

    Returns

    this
  • Deeply converts this Record to equivalent native JavaScript Object.

    Note: This method may not be overridden. Objects with custom serialization to plain JS may override toJSON() instead.

    Returns

    { data: unknown }
    • data: unknown

      The attachment's data as a Blob.

      Default Value

      null
  • Shallowly converts this Record to equivalent native JavaScript Object.

    Returns

    { data: Blob | null }
    • data: Blob | null

      The attachment's data as a Blob.

      Default Value

      null
  • Shallowly converts this Record to equivalent JavaScript Object.

    Returns

    { data: Blob | null }
    • data: Blob | null

      The attachment's data as a Blob.

      Default Value

      null

toSeq

Deprecated
  • Returns

    Keyed<"data", Blob | null>

    Deprecated

    Use toJSON(), which returns a plain object of its fields.

  • Type Parameters

    Kextends "data"

    Parameters

    keyK
    updater(value: { data: Blob | null }[K]) => { data: Blob | null }[K]

    Returns

    this
  • Parameters

    keyPathIterable<unknown>
    updater(value: unknown) => unknown

    Returns

    this

wasAltered

Deprecated
  • Returns

    boolean

    Deprecated

    Compare the result of withMutations() with the original using !==; it returns the original when nothing changed.

    See Also

    • Map#wasAltered

  • Note: Not all methods can be used on a mutable collection or within withMutations! Only set may be used mutatively.

    Parameters

    mutator(mutable: this) => unknown

    Returns

    this

    See Also

    • Map#withMutations