> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bijection.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Interface: CommandReader<Model>

> One shared method contract keeps command identity invariant in both query and mutation contexts, including after declaration emission.

[server](https://docs.bijection.com/api/modules/server).CommandReader

One shared method contract keeps command identity invariant in both query
and mutation contexts, including after declaration emission.

## Type parameters

| Name | Type |
| :- | :- |
| `Model` | extends [`GenericDataModel`](https://docs.bijection.com/api/modules/server#genericdatamodel) = [`GenericDataModel`](https://docs.bijection.com/api/modules/server#genericdatamodel) |

## Hierarchy

* **`CommandReader`**

  ↳ [`Commands`](https://docs.bijection.com/api/interfaces/server.Commands)

## Methods

### getTarget

▸ **getTarget**\<`C`, `Name`>(`command`, `options`): `Promise`\<[`CommandTarget`](https://docs.bijection.com/api/modules/values#commandtarget)\<`C`> | `null`>

#### Type parameters

| Name | Type |
| :- | :- |
| `C` | extends [`CommandHandle`](https://docs.bijection.com/api/modules/server#commandhandle)\<`any`, `"record"`> |
| `Name` | extends [`RecordTargetTable`](https://docs.bijection.com/api/modules/server#recordtargettable)\<`C`, `Model`> |

#### Parameters

| Name | Type |
| :- | :- |
| `command` | `C` |
| `options` | `Object` |
| `options.table` | `Name` |
| `options.id` | [`GenericId`](https://docs.bijection.com/api/modules/values#genericid)\<`NoInfer`\<`Name`>> |
| `options.maximumAgeMs?` | `number` |

#### Returns

`Promise`\<[`CommandTarget`](https://docs.bijection.com/api/modules/values#commandtarget)\<`C`> | `null`>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.