Native Object Client
    Preparing search index...

    Function putNativeObject

    • Replaces a native object

      Type Parameters

      • T = any

      Parameters

      • uri: string & $brand<"primaryKeyUri">
      • body: unknown
      • opts: Options = {}

      Returns Promise<T>

      The following example shows replacing a my-type native object instance with a primary key of foo:

      import { primaryKeyUriString, putNativeObject } from "@contextual-io/native-object-client"

      const replacedObject = await putNativeObject(
      primaryKeyUriString("my-type/foo"),
      {
      "id": "foo",
      "bar": "fizz",
      },
      )