Optional Readonlyclient?: ICosmosClientAn already-constructed client; omit it to load the SDK lazily.
Readonlyendpoint: stringThe account endpoint, used to construct a client when none is injected.
Readonlykey: stringThe account key.
Readonlyclient: ICosmosClientAn already-constructed ICosmosClient.
When present, the lazy import('@azure/cosmos') never runs — the
seam that keeps the branching unit-testable.
Optional Readonlyendpoint?: stringThe account endpoint; unread once a client is injected.
Optional Readonlykey?: stringThe account key; unread once a client is injected.
Options for the CosmosAdapter — the
'cosmos'arm.A union of two arms, so supplying neither an
endpoint/keypair nor aclientis a compile error rather than aconnect()throw. Both members stay readable on either arm, so the adapter readsoptions.clientandoptions.endpointwithout narrowing first. An application using Entra ID (managed identity) constructs its own client and injects it, which is why this carries no credential surface beyond the account key.