@medic/cht-datasource
    Preparing search index...

    Function update

    • Returns a function for updating a place from the given data context.

      Parameters

      Returns <T extends Place.v1.Place | PlaceWithLineage>(
          updated: UpdatePlaceInput<T>,
      ) => Promise<T>

      a function for updating a place

        • <T extends Place.v1.Place | PlaceWithLineage>(
              updated: UpdatePlaceInput<T>,
          ): Promise<T>
        • Updates an existing place to have the provided data.

          Type Parameters

          Parameters

          • updated: UpdatePlaceInput<T>

            the updated place data. The complete data for the place must be provided. Existing fields not included in the updated data will be removed from the place. If the provided parent/contact lineage is hydrated (e.g. for a PlaceWithLineage), the lineage will be properly dehydrated before being stored.

          Returns Promise<T>

          the updated place with the new _rev value

          InvalidArgumentError if _id is not provided

          ResourceNotFoundError if _id does not identify an existing place contact @throws InvalidArgumentError if _revis not provided or does not match the place's current_revvalue @throws InvalidArgumentError ifnameis not provided @throws InvalidArgumentError if the providedcontactis not the identifier of a valid person contact @throws InvalidArgumentError if any of the following read-only properties are changed:reported_date, parent, type, contact_type`

      Error if a data context is not provided