method ICosmosItem.replace
ICosmosItem.replace(
body: Record<string, unknown>,
): Promise<CosmosItemResponse<Record<string, unknown>>>

Replaces the document wholesale.

Parameters

body: Record<string, unknown>

The full replacement document

optional
options: CosmosRequestOptions

Per-request options (the IfMatch guard)

Return Type

Promise<CosmosItemResponse<Record<string, unknown>>>

The replaced document envelope

Usage

import { type ICosmosItem } from "database-plugin/src/index.ts";