method ICosmosItems.create
ICosmosItems.create(body: Record<string, unknown>): Promise<CosmosItemResponse<Record<string, unknown>>>

Inserts one document, refusing a duplicate id within the partition.

Parameters

body: Record<string, unknown>

The document to insert

Return Type

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

The created document envelope

Usage

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