# com.io7m.cardant.protocol.inventory.cb

## Types

- CAI1Attachment
- CAI1AttachmentKey
- CAI1AuditEvent
- CAI1AuditSearchParameters
- CAI1CommandAuditSearchBegin
- CAI1CommandAuditSearchNext
- CAI1CommandAuditSearchPrevious
- CAI1CommandFileDelete
- CAI1CommandFileGet
- CAI1CommandFilePut
- CAI1CommandFileSearchBegin
- CAI1CommandFileSearchNext
- CAI1CommandFileSearchPrevious
- CAI1CommandItemAttachmentAdd
- CAI1CommandItemAttachmentRemove
- CAI1CommandItemCreate
- CAI1CommandItemDelete
- CAI1CommandItemGet
- CAI1CommandItemLocationsList
- CAI1CommandItemMetadataPut
- CAI1CommandItemMetadataRemove
- CAI1CommandItemSearchBegin
- CAI1CommandItemSearchNext
- CAI1CommandItemSearchPrevious
- CAI1CommandItemSetName
- CAI1CommandItemTypesAssign
- CAI1CommandItemTypesRevoke
- CAI1CommandLocationAttachmentAdd
- CAI1CommandLocationAttachmentRemove
- CAI1CommandLocationDelete
- CAI1CommandLocationGet
- CAI1CommandLocationList
- CAI1CommandLocationMetadataPut
- CAI1CommandLocationMetadataRemove
- CAI1CommandLocationPut
- CAI1CommandLocationTypesAssign
- CAI1CommandLocationTypesRevoke
- CAI1CommandLogin
- CAI1CommandRolesAssign
- CAI1CommandRolesGet
- CAI1CommandRolesRevoke
- CAI1CommandStockCount
- CAI1CommandStockReposit
- CAI1CommandStockSearchBegin
- CAI1CommandStockSearchNext
- CAI1CommandStockSearchPrevious
- CAI1CommandTypePackageGetText
- CAI1CommandTypePackageInstall
- CAI1CommandTypePackageSearchBegin
- CAI1CommandTypePackageSearchNext
- CAI1CommandTypePackageSearchPrevious
- CAI1CommandTypePackageUninstall
- CAI1CommandTypePackageUpgrade
- CAI1ComparisonExact
- CAI1ComparisonFuzzy
- CAI1ComparisonSet
- CAI1Error
- CAI1EventUpdated
- CAI1File
- CAI1FileColumn
- CAI1FileColumnOrdering
- CAI1FileSearchParameters
- CAI1Id
- CAI1IncludeDeleted
- CAI1Item
- CAI1ItemColumn
- CAI1ItemColumnOrdering
- CAI1ItemSearchParameters
- CAI1ItemSerial
- CAI1ItemSummary
- CAI1Location
- CAI1LocationMatch
- CAI1LocationSummary
- CAI1Metadata
- CAI1MetadataElementMatch
- CAI1MetadataValueMatch
- CAI1Page
- CAI1ResponseAuditSearch
- CAI1ResponseBlame
- CAI1ResponseError
- CAI1ResponseFileDelete
- CAI1ResponseFileGet
- CAI1ResponseFilePut
- CAI1ResponseFileSearch
- CAI1ResponseItemAttachmentAdd
- CAI1ResponseItemAttachmentRemove
- CAI1ResponseItemCreate
- CAI1ResponseItemDelete
- CAI1ResponseItemGet
- CAI1ResponseItemMetadataPut
- CAI1ResponseItemMetadataRemove
- CAI1ResponseItemSearch
- CAI1ResponseItemSetName
- CAI1ResponseItemTypesAssign
- CAI1ResponseItemTypesRevoke
- CAI1ResponseLocationAttachmentAdd
- CAI1ResponseLocationAttachmentRemove
- CAI1ResponseLocationDelete
- CAI1ResponseLocationGet
- CAI1ResponseLocationList
- CAI1ResponseLocationMetadataPut
- CAI1ResponseLocationMetadataRemove
- CAI1ResponseLocationPut
- CAI1ResponseLocationTypesAssign
- CAI1ResponseLocationTypesRevoke
- CAI1ResponseLogin
- CAI1ResponseRolesAssign
- CAI1ResponseRolesGet
- CAI1ResponseRolesRevoke
- CAI1ResponseStockCount
- CAI1ResponseStockReposit
- CAI1ResponseStockSearch
- CAI1ResponseTypePackageGetText
- CAI1ResponseTypePackageInstall
- CAI1ResponseTypePackageSearch
- CAI1ResponseTypePackageUninstall
- CAI1ResponseTypePackageUpgrade
- CAI1SizeRange
- CAI1StockOccurrence
- CAI1StockOccurrenceKind
- CAI1StockReposit
- CAI1StockSearchParameters
- CAI1TimeRange
- CAI1TypeField
- CAI1TypePackageIdentifier
- CAI1TypePackageSearchParameters
- CAI1TypePackageSummary
- CAI1TypePackageTypeRemovalBehavior
- CAI1TypePackageUninstall
- CAI1TypePackageVersionBehavior
- CAI1TypeRecord
- CAI1TypeRecordFieldIdentifier
- CAI1TypeRecordIdentifier
- CAI1TypeRecordSearchParameters
- CAI1TypeRecordSummary
- CAI1TypeScalar
- CAI1TypeScalarIdentifier
- CAI1TypeScalarSearchParameters
- CAI1Version

### CAI1Attachment

An item attachment.

    [record CAI1Attachment
      [field file CAI1File]
      [field relation String]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
file | CAI1File | The file ID.
relation | String | The relation.

### CAI1AttachmentKey

The values that uniquely identify an attachment on an object.

    [record CAI1AttachmentKey
      [field id UUID]
      [field relation String]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
id | UUID | The file ID.
relation | String | The relation.

### CAI1AuditEvent

An audit event.

    [record CAI1AuditEvent
      [field id IntegerUnsigned64]
      [field time OffsetDateTime]
      [field owner UUID]
      [field type String]
      [field data [MapStringString]]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
id | IntegerUnsigned64 | The event ID.
time | OffsetDateTime | The event time.
owner | UUID | The event owner.
type | String | The event type.
data | [Map String String] | The event data.

### CAI1AuditSearchParameters

The audit search parameters.

    [record CAI1AuditSearchParameters
      [field owner [OptionUUID]]
      [field type [CAI1ComparisonExactString]]
      [field timeRange CAI1TimeRange]
      [field pageSize IntegerUnsigned32]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
owner | [Option UUID] | Limit to events with the given owner.
type | [CAI1ComparisonExact String] | Limit to events with the given type.
timeRange | CAI1TimeRange | Limit to events in the given time range.
pageSize | IntegerUnsigned32 | The page size.

### CAI1CommandAuditSearchBegin

Start searching audit events.

    [record CAI1CommandAuditSearchBegin
      [field parameters CAI1AuditSearchParameters]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
parameters | CAI1AuditSearchParameters | The search parameters.

### CAI1CommandAuditSearchNext

Continue searching audit events.

    [record CAI1CommandAuditSearchNext]

#### Fields

The record type has no fields.

### CAI1CommandAuditSearchPrevious

Continue searching audit events.

    [record CAI1CommandAuditSearchPrevious]

#### Fields

The record type has no fields.

### CAI1CommandFileDelete

Delete files.

    [record CAI1CommandFileDelete
      [field id UUID]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
id | UUID | The file ID.

### CAI1CommandFileGet

Retrieve a file.

    [record CAI1CommandFileGet
      [field fileId UUID]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
fileId | UUID | The file ID.

### CAI1CommandFilePut

Add or update files.

    [record CAI1CommandFilePut
      [field file CAI1File]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
file | CAI1File | The file.

### CAI1CommandFileSearchBegin

Start searching for items.

    [record CAI1CommandFileSearchBegin
      [field parameters CAI1FileSearchParameters]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
parameters | CAI1FileSearchParameters | The search parameters.

### CAI1CommandFileSearchNext

Return the next page of search results.

    [record CAI1CommandFileSearchNext]

#### Fields

The record type has no fields.

### CAI1CommandFileSearchPrevious

Return the next page of search results.

    [record CAI1CommandFileSearchPrevious]

#### Fields

The record type has no fields.

### CAI1CommandItemAttachmentAdd

Add item attachments.

    [record CAI1CommandItemAttachmentAdd
      [field itemId UUID]
      [field fileId UUID]
      [field relation String]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
itemId | UUID | The item ID.
fileId | UUID | The file ID.
relation | String | The attachment relation.

### CAI1CommandItemAttachmentRemove

Remove item attachments.

    [record CAI1CommandItemAttachmentRemove
      [field itemId UUID]
      [field fileId UUID]
      [field relation String]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
itemId | UUID | The item ID.
fileId | UUID | The file ID.
relation | String | The attachment relation.

### CAI1CommandItemCreate

Create a new item.

    [record CAI1CommandItemCreate
      [field itemId UUID]
      [field name String]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
itemId | UUID | The item ID.
name | String | The item name.

### CAI1CommandItemDelete

Delete items.

    [record CAI1CommandItemDelete
      [field item UUID]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
item | UUID | The items.

### CAI1CommandItemGet

Retrieve an item.

    [record CAI1CommandItemGet
      [field itemId UUID]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
itemId | UUID | The item ID.

### CAI1CommandItemLocationsList

List all the locations an item is in, and how many times the item is in them.

    [record CAI1CommandItemLocationsList
      [field itemId UUID]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
itemId | UUID | The item ID.

### CAI1CommandItemMetadataPut

Add or update metadata values in an item.

    [record CAI1CommandItemMetadataPut
      [field itemId UUID]
      [field metadatas [ListCAI1Metadata]]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
itemId | UUID | The item ID.
metadatas | [List CAI1Metadata] | The item metadatas.

### CAI1CommandItemMetadataRemove

Remove metadata values from an item.

    [record CAI1CommandItemMetadataRemove
      [field itemId UUID]
      [field metadatas [ListCAI1TypeRecordFieldIdentifier]]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
itemId | UUID | The item ID.
metadatas | [List CAI1TypeRecordFieldIdentifier] | The item metadatas.

### CAI1CommandItemSearchBegin

Start searching for items.

    [record CAI1CommandItemSearchBegin
      [field parameters CAI1ItemSearchParameters]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
parameters | CAI1ItemSearchParameters | The search parameters.

### CAI1CommandItemSearchNext

Return the next page of search results.

    [record CAI1CommandItemSearchNext]

#### Fields

The record type has no fields.

### CAI1CommandItemSearchPrevious

Return the next page of search results.

    [record CAI1CommandItemSearchPrevious]

#### Fields

The record type has no fields.

### CAI1CommandItemSetName

Update the names of items.

    [record CAI1CommandItemSetName
      [field item UUID]
      [field name String]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
item | UUID | The item ID.
name | String | The item name.

### CAI1CommandItemTypesAssign

Assign a set of types to an item.

    [record CAI1CommandItemTypesAssign
      [field item UUID]
      [field types [ListCAI1TypeRecordIdentifier]]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
item | UUID | The target item.
types | [List CAI1TypeRecordIdentifier] | The assigned types.

### CAI1CommandItemTypesRevoke

Revoke a set of types from an item.

    [record CAI1CommandItemTypesRevoke
      [field item UUID]
      [field types [ListCAI1TypeRecordIdentifier]]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
item | UUID | The target item.
types | [List CAI1TypeRecordIdentifier] | The removed types.

### CAI1CommandLocationAttachmentAdd

Add location attachments.

    [record CAI1CommandLocationAttachmentAdd
      [field locationId UUID]
      [field fileId UUID]
      [field relation String]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
locationId | UUID | The location ID.
fileId | UUID | The file ID.
relation | String | The attachment relation.

### CAI1CommandLocationAttachmentRemove

Remove location attachments.

    [record CAI1CommandLocationAttachmentRemove
      [field locationId UUID]
      [field fileId UUID]
      [field relation String]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
locationId | UUID | The location ID.
fileId | UUID | The file ID.
relation | String | The attachment relation.

### CAI1CommandLocationDelete

Delete locations.

    [record CAI1CommandLocationDelete
      [field location UUID]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
location | UUID | The location.

### CAI1CommandLocationGet

Retrieve a location.

    [record CAI1CommandLocationGet
      [field location UUID]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
location | UUID | The location ID.

### CAI1CommandLocationList

List locations.

    [record CAI1CommandLocationList]

#### Fields

The record type has no fields.

### CAI1CommandLocationMetadataPut

Add or update metadata values in a location.

    [record CAI1CommandLocationMetadataPut
      [field locationId UUID]
      [field metadatas [ListCAI1Metadata]]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
locationId | UUID | The location ID.
metadatas | [List CAI1Metadata] | The location metadatas.

### CAI1CommandLocationMetadataRemove

Remove metadata values from a location.

    [record CAI1CommandLocationMetadataRemove
      [field locationId UUID]
      [field metadatas [ListCAI1TypeRecordFieldIdentifier]]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
locationId | UUID | The location ID.
metadatas | [List CAI1TypeRecordFieldIdentifier] | The location metadatas.

### CAI1CommandLocationPut

Create or update a location.

    [record CAI1CommandLocationPut
      [field location CAI1Location]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
location | CAI1Location | The location.

### CAI1CommandLocationTypesAssign

Assign a set of types to a location.

    [record CAI1CommandLocationTypesAssign
      [field location UUID]
      [field types [ListCAI1TypeRecordIdentifier]]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
location | UUID | The target location.
types | [List CAI1TypeRecordIdentifier] | The assigned types.

### CAI1CommandLocationTypesRevoke

Revoke a set of types from a location.

    [record CAI1CommandLocationTypesRevoke
      [field location UUID]
      [field types [ListCAI1TypeRecordIdentifier]]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
location | UUID | The target location.
types | [List CAI1TypeRecordIdentifier] | The removed types.

### CAI1CommandLogin

A request to log in.

    [record CAI1CommandLogin
      [field userName String]
      [field password String]
      [field metadata [MapStringString]]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
userName | String | The username.
password | String | The password.
metadata | [Map String String] | Extra metadata included with the login request.

### CAI1CommandRolesAssign

Assign a set of roles to a user.

    [record CAI1CommandRolesAssign
      [field user UUID]
      [field roles [ListString]]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
user | UUID | The target user.
roles | [List String] | The assigned roles.

### CAI1CommandRolesGet

Get the roles for a user.

    [record CAI1CommandRolesGet
      [field user UUID]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
user | UUID | The target user.

### CAI1CommandRolesRevoke

Revoke a set of roles from a user.

    [record CAI1CommandRolesRevoke
      [field user UUID]
      [field roles [ListString]]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
user | UUID | The target user.
roles | [List String] | The roles.

### CAI1CommandStockCount

Count stock.

    [record CAI1CommandStockCount
      [field parameters CAI1StockSearchParameters]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
parameters | CAI1StockSearchParameters | The search parameters.

### CAI1CommandStockReposit

Reposit an item.

    [record CAI1CommandStockReposit
      [field reposit CAI1StockReposit]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
reposit | CAI1StockReposit | The item reposition.

### CAI1CommandStockSearchBegin

Search stock.

    [record CAI1CommandStockSearchBegin
      [field parameters CAI1StockSearchParameters]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
parameters | CAI1StockSearchParameters | The search parameters.

### CAI1CommandStockSearchNext

Search stock.

    [record CAI1CommandStockSearchNext]

#### Fields

The record type has no fields.

### CAI1CommandStockSearchPrevious

Search stock.

    [record CAI1CommandStockSearchPrevious]

#### Fields

The record type has no fields.

### CAI1CommandTypePackageGetText

Get a type package.

    [record CAI1CommandTypePackageGetText
      [field identifier CAI1TypePackageIdentifier]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
identifier | CAI1TypePackageIdentifier | The type package identifier.

### CAI1CommandTypePackageInstall

Install a type package.

    [record CAI1CommandTypePackageInstall
      [field text String]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
text | String | The type package text.

### CAI1CommandTypePackageSearchBegin

Start searching type packages.

    [record CAI1CommandTypePackageSearchBegin
      [field parameters CAI1TypePackageSearchParameters]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
parameters | CAI1TypePackageSearchParameters | The search parameters.

### CAI1CommandTypePackageSearchNext

Continue searching type packages.

    [record CAI1CommandTypePackageSearchNext]

#### Fields

The record type has no fields.

### CAI1CommandTypePackageSearchPrevious

Continue searching type packages.

    [record CAI1CommandTypePackageSearchPrevious]

#### Fields

The record type has no fields.

### CAI1CommandTypePackageUninstall

Uninstall a type package.

    [record CAI1CommandTypePackageUninstall
      [field parameters CAI1TypePackageUninstall]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
parameters | CAI1TypePackageUninstall | The uninstall parameters.

### CAI1CommandTypePackageUpgrade

Upgrade a type package.

    [record CAI1CommandTypePackageUpgrade
      [field typeRemovalBehavior CAI1TypePackageTypeRemovalBehavior]
      [field versionBehavior CAI1TypePackageVersionBehavior]
      [field text String]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
typeRemovalBehavior | CAI1TypePackageTypeRemovalBehavior | The type removal behavior.
versionBehavior | CAI1TypePackageVersionBehavior | The version behavior.
text | String | The type package text.

### CAI1ComparisonExact

    [variant CAI1ComparisonExact
      [parameter T]
      [case Anything]
      [case IsEqualTo
        [field value T]
      ]
      [case IsNotEqualTo
        [field value T]
      ]
    ]

#### Parameters

Name | Description
--- | ---
T | No description provided.

#### Cases

##### Case Anything

The case Anything has no fields.

##### Case IsEqualTo

Name | Type | Description
--- | --- | ---
value | T |

##### Case IsNotEqualTo

Name | Type | Description
--- | --- | ---
value | T |

### CAI1ComparisonFuzzy

    [variant CAI1ComparisonFuzzy
      [parameter T]
      [case Anything]
      [case IsEqualTo
        [field value T]
      ]
      [case IsNotEqualTo
        [field value T]
      ]
      [case IsSimilarTo
        [field value T]
      ]
      [case IsNotSimilarTo
        [field value T]
      ]
    ]

#### Parameters

Name | Description
--- | ---
T | No description provided.

#### Cases

##### Case Anything

The case Anything has no fields.

##### Case IsEqualTo

Name | Type | Description
--- | --- | ---
value | T |

##### Case IsNotEqualTo

Name | Type | Description
--- | --- | ---
value | T |

##### Case IsSimilarTo

Name | Type | Description
--- | --- | ---
value | T |

##### Case IsNotSimilarTo

Name | Type | Description
--- | --- | ---
value | T |

### CAI1ComparisonSet

    [variant CAI1ComparisonSet
      [parameter T]
      [case Anything]
      [case IsEqualTo
        [field value [ListT]]
      ]
      [case IsNotEqualTo
        [field value [ListT]]
      ]
      [case IsSubsetOf
        [field value [ListT]]
      ]
      [case IsSupersetOf
        [field value [ListT]]
      ]
      [case IsOverlapping
        [field value [ListT]]
      ]
    ]

#### Parameters

Name | Description
--- | ---
T | No description provided.

#### Cases

##### Case Anything

The case Anything has no fields.

##### Case IsEqualTo

Name | Type | Description
--- | --- | ---
value | [List T] |

##### Case IsNotEqualTo

Name | Type | Description
--- | --- | ---
value | [List T] |

##### Case IsSubsetOf

Name | Type | Description
--- | --- | ---
value | [List T] |

##### Case IsSupersetOf

Name | Type | Description
--- | --- | ---
value | [List T] |

##### Case IsOverlapping

Name | Type | Description
--- | --- | ---
value | [List T] |

### CAI1Error

An error response.

    [record CAI1Error
      [field errorCode String]
      [field message String]
      [field attributes [MapStringString]]
      [field remediatingAction [OptionString]]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
errorCode | String | The error code.
message | String | The error message.
attributes | [Map String String] | The error attributes.
remediatingAction | [Option String] | The remediating action, if any.

### CAI1EventUpdated

Data on the server was updated.

    [record CAI1EventUpdated
      [field updated [ListCAI1Id]]
      [field removed [ListCAI1Id]]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
updated | [List CAI1Id] | The list of objects that were updated.
removed | [List CAI1Id] | The list of objects that were removed.

### CAI1File

A file.

    [variant CAI1File
      [case CAI1FileWithoutData
        [field id UUID]
        [field description String]
        [field mediaType String]
        [field size IntegerUnsigned64]
        [field hashAlgorithm String]
        [field hashValue String]
      ]
      [case CAI1FileWithData
        [field id UUID]
        [field description String]
        [field mediaType String]
        [field size IntegerUnsigned64]
        [field hashAlgorithm String]
        [field hashValue String]
        [field data ByteArray]
      ]
    ]

#### Cases

##### Case CAI1FileWithoutData

Name | Type | Description
--- | --- | ---
id | UUID | The file ID.
description | String | The file description.
mediaType | String | The media type.
size | IntegerUnsigned64 | The file size.
hashAlgorithm | String | The hash algorithm name.
hashValue | String | The hash value.

##### Case CAI1FileWithData

Name | Type | Description
--- | --- | ---
id | UUID | The file ID.
description | String | The file description.
mediaType | String | The media type.
size | IntegerUnsigned64 | The file size.
hashAlgorithm | String | The hash algorithm name.
hashValue | String | The hash value.
data | ByteArray | The file data.

### CAI1FileColumn

The item column by which to order results.

    [variant CAI1FileColumn
      [case CAI1ById]
      [case CAI1ByDescription]
    ]

#### Cases

##### Case CAI1ById

The case CAI1ById has no fields.

##### Case CAI1ByDescription

The case CAI1ByDescription has no fields.

### CAI1FileColumnOrdering

The file column by which to order results.

    [record CAI1FileColumnOrdering
      [field column CAI1FileColumn]
      [field ascending Boolean]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
column | CAI1FileColumn | The file column.
ascending | Boolean | Whether results should be in ascending order.

### CAI1FileSearchParameters

The file search parameters.

    [record CAI1FileSearchParameters
      [field search [CAI1ComparisonFuzzyString]]
      [field mediaType [CAI1ComparisonFuzzyString]]
      [field sizeRange CAI1SizeRange]
      [field order CAI1FileColumnOrdering]
      [field limit IntegerUnsigned32]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
search | [CAI1ComparisonFuzzy String] | The file description search query.
mediaType | [CAI1ComparisonFuzzy String] | The file media type search query.
sizeRange | CAI1SizeRange | The file size range query.
order | CAI1FileColumnOrdering | The file result ordering.
limit | IntegerUnsigned32 | The file limit.

### CAI1Id

An identifier value.

    [variant CAI1Id
      [case CAI1FileID
        [field id UUID]
      ]
      [case CAI1ItemID
        [field id UUID]
      ]
      [case CAI1LocationID
        [field id UUID]
      ]
      [case CAI1UserID
        [field id UUID]
      ]
      [case CAI1StockInstanceID
        [field id UUID]
      ]
    ]

#### Cases

##### Case CAI1FileID

Name | Type | Description
--- | --- | ---
id | UUID |

##### Case CAI1ItemID

Name | Type | Description
--- | --- | ---
id | UUID |

##### Case CAI1LocationID

Name | Type | Description
--- | --- | ---
id | UUID |

##### Case CAI1UserID

Name | Type | Description
--- | --- | ---
id | UUID |

##### Case CAI1StockInstanceID

Name | Type | Description
--- | --- | ---
id | UUID |

### CAI1IncludeDeleted

Include deleted data in search results.

    [variant CAI1IncludeDeleted
      [case IncludeOnlyLive]
      [case IncludeOnlyDeleted]
      [case IncludeLiveAndDeleted]
    ]

#### Cases

##### Case IncludeOnlyLive

The case IncludeOnlyLive has no fields.

##### Case IncludeOnlyDeleted

The case IncludeOnlyDeleted has no fields.

##### Case IncludeLiveAndDeleted

The case IncludeLiveAndDeleted has no fields.

### CAI1Item

An item.

    [record CAI1Item
      [field id UUID]
      [field name String]
      [field created OffsetDateTime]
      [field updated OffsetDateTime]
      [field metadata [MapCAI1TypeRecordFieldIdentifierCAI1Metadata]]
      [field attachments [MapCAI1AttachmentKeyCAI1Attachment]]
      [field types [ListCAI1TypeRecordIdentifier]]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
id | UUID | The item ID.
name | String | The item name.
created | OffsetDateTime | The creation time
updated | OffsetDateTime | The updated time
metadata | [Map CAI1TypeRecordFieldIdentifier CAI1Metadata] | The item metadata.
attachments | [Map CAI1AttachmentKey CAI1Attachment] | The item attachments.
types | [List CAI1TypeRecordIdentifier] | The item types.

### CAI1ItemColumn

The item column by which to order results.

    [variant CAI1ItemColumn
      [case CAI1ById]
      [case CAI1ByName]
    ]

#### Cases

##### Case CAI1ById

The case CAI1ById has no fields.

##### Case CAI1ByName

The case CAI1ByName has no fields.

### CAI1ItemColumnOrdering

The item column by which to order results.

    [record CAI1ItemColumnOrdering
      [field column CAI1ItemColumn]
      [field ascending Boolean]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
column | CAI1ItemColumn | The item column.
ascending | Boolean | Whether results should be in ascending order.

### CAI1ItemSearchParameters

The item search parameters.

    [record CAI1ItemSearchParameters
      [field nameMatch [CAI1ComparisonFuzzyString]]
      [field descriptionMatch [CAI1ComparisonFuzzyString]]
      [field typeMatch [CAI1ComparisonSetCAI1TypeRecordIdentifier]]
      [field metaMatch CAI1MetadataElementMatch]
      [field includeDeleted CAI1IncludeDeleted]
      [field order CAI1ItemColumnOrdering]
      [field limit IntegerUnsigned32]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
nameMatch | [CAI1ComparisonFuzzy String] | The item name match expression.
descriptionMatch | [CAI1ComparisonFuzzy String] | The item description match expression.
typeMatch | [CAI1ComparisonSet CAI1TypeRecordIdentifier] | The item type match expression.
metaMatch | CAI1MetadataElementMatch | The item metadata match expression.
includeDeleted | CAI1IncludeDeleted | Include live/deleted data.
order | CAI1ItemColumnOrdering | The item result ordering.
limit | IntegerUnsigned32 | The item limit.

### CAI1ItemSerial

A serial number.

    [record CAI1ItemSerial
      [field type String]
      [field value String]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
type | String |
value | String |

### CAI1ItemSummary

A summary of an item.

    [record CAI1ItemSummary
      [field id UUID]
      [field name String]
      [field created OffsetDateTime]
      [field updated OffsetDateTime]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
id | UUID |
name | String |
created | OffsetDateTime | The creation time
updated | OffsetDateTime | The updated time

### CAI1Location

A location.

    [record CAI1Location
      [field locationId UUID]
      [field parent [OptionUUID]]
      [field path [ListString]]
      [field created OffsetDateTime]
      [field updated OffsetDateTime]
      [field metadata [MapCAI1TypeRecordFieldIdentifierCAI1Metadata]]
      [field attachments [MapCAI1AttachmentKeyCAI1Attachment]]
      [field types [ListCAI1TypeRecordIdentifier]]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
locationId | UUID | The location ID.
parent | [Option UUID] | The location parent.
path | [List String] | The location path.
created | OffsetDateTime | The creation time
updated | OffsetDateTime | The updated time
metadata | [Map CAI1TypeRecordFieldIdentifier CAI1Metadata] | The item metadata.
attachments | [Map CAI1AttachmentKey CAI1Attachment] | The item attachments.
types | [List CAI1TypeRecordIdentifier] | The item types.

### CAI1LocationMatch

The behaviour requested for matching locations.

    [variant CAI1LocationMatch
      [case CAI1LocationExact
        [field locationId UUID]
      ]
      [case CAI1LocationWithDescendants
        [field locationId UUID]
      ]
      [case CAI1LocationAny]
    ]

#### Cases

##### Case CAI1LocationExact

Name | Type | Description
--- | --- | ---
locationId | UUID |

##### Case CAI1LocationWithDescendants

Name | Type | Description
--- | --- | ---
locationId | UUID |

##### Case CAI1LocationAny

The case CAI1LocationAny has no fields.

### CAI1LocationSummary

A summary of a location.

    [record CAI1LocationSummary
      [field id UUID]
      [field parent [OptionUUID]]
      [field path [ListString]]
      [field created OffsetDateTime]
      [field updated OffsetDateTime]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
id | UUID |
parent | [Option UUID] |
path | [List String] |
created | OffsetDateTime | The creation time
updated | OffsetDateTime | The updated time

### CAI1Metadata

A metadata value.

    [variant CAI1Metadata
      [case Integral
        [field key CAI1TypeRecordFieldIdentifier]
        [field value IntegerSigned64]
      ]
      [case Text
        [field key CAI1TypeRecordFieldIdentifier]
        [field value String]
      ]
      [case Time
        [field key CAI1TypeRecordFieldIdentifier]
        [field value OffsetDateTime]
      ]
      [case Monetary
        [field key CAI1TypeRecordFieldIdentifier]
        [field value String]
        [field currency String]
      ]
      [case Real
        [field key CAI1TypeRecordFieldIdentifier]
        [field value Float64]
      ]
    ]

#### Cases

##### Case Integral

Name | Type | Description
--- | --- | ---
key | CAI1TypeRecordFieldIdentifier | The metadata value key.
value | IntegerSigned64 | The metadata value.

##### Case Text

Name | Type | Description
--- | --- | ---
key | CAI1TypeRecordFieldIdentifier | The metadata value key.
value | String | The metadata value.

##### Case Time

Name | Type | Description
--- | --- | ---
key | CAI1TypeRecordFieldIdentifier | The metadata value key.
value | OffsetDateTime | The metadata value.

##### Case Monetary

Name | Type | Description
--- | --- | ---
key | CAI1TypeRecordFieldIdentifier | The metadata value key.
value | String | The metadata value.
currency | String | The metadata currency unit.

##### Case Real

Name | Type | Description
--- | --- | ---
key | CAI1TypeRecordFieldIdentifier | The metadata value key.
value | Float64 | The metadata value.

### CAI1MetadataElementMatch

An expression against which item metadata is matched.

    [variant CAI1MetadataElementMatch
      [case And
        [field e0 CAI1MetadataElementMatch]
        [field e1 CAI1MetadataElementMatch]
      ]
      [case Or
        [field e0 CAI1MetadataElementMatch]
        [field e1 CAI1MetadataElementMatch]
      ]
      [case Specific
        [field packageName [CAI1ComparisonExactString]]
        [field typeName [CAI1ComparisonExactString]]
        [field fieldName [CAI1ComparisonExactString]]
        [field value CAI1MetadataValueMatch]
      ]
    ]

#### Cases

##### Case And

Name | Type | Description
--- | --- | ---
e0 | CAI1MetadataElementMatch |
e1 | CAI1MetadataElementMatch |

##### Case Or

Name | Type | Description
--- | --- | ---
e0 | CAI1MetadataElementMatch |
e1 | CAI1MetadataElementMatch |

##### Case Specific

Name | Type | Description
--- | --- | ---
packageName | [CAI1ComparisonExact String] |
typeName | [CAI1ComparisonExact String] |
fieldName | [CAI1ComparisonExact String] |
value | CAI1MetadataValueMatch |

### CAI1MetadataValueMatch

An expression against which item metadata values are matched.

    [variant CAI1MetadataValueMatch
      [case Anything]
      [case IntegralWithinRange
        [field lower IntegerSigned64]
        [field upper IntegerSigned64]
      ]
      [case RealWithinRange
        [field lower Float64]
        [field upper Float64]
      ]
      [case TimeWithinRange
        [field lower OffsetDateTime]
        [field upper OffsetDateTime]
      ]
      [case MonetaryWithinRange
        [field lower String]
        [field upper String]
      ]
      [case MonetaryWithCurrency
        [field currency String]
      ]
      [case TextExact
        [field exact String]
      ]
      [case TextSearch
        [field search String]
      ]
    ]

#### Cases

##### Case Anything

The case Anything has no fields.

##### Case IntegralWithinRange

Name | Type | Description
--- | --- | ---
lower | IntegerSigned64 |
upper | IntegerSigned64 |

##### Case RealWithinRange

Name | Type | Description
--- | --- | ---
lower | Float64 |
upper | Float64 |

##### Case TimeWithinRange

Name | Type | Description
--- | --- | ---
lower | OffsetDateTime |
upper | OffsetDateTime |

##### Case MonetaryWithinRange

Name | Type | Description
--- | --- | ---
lower | String |
upper | String |

##### Case MonetaryWithCurrency

Name | Type | Description
--- | --- | ---
currency | String |

##### Case TextExact

Name | Type | Description
--- | --- | ---
exact | String |

##### Case TextSearch

Name | Type | Description
--- | --- | ---
search | String |

### CAI1Page

A page of search results.

    [record CAI1Page
      [parameter T]

      [field items [ListT]]
      [field pageIndex IntegerUnsigned32]
      [field pageCount IntegerUnsigned32]
      [field pageFirstOffset IntegerUnsigned64]
    ]

#### Parameters

Name | Description
--- | ---
T | No description provided.

#### Fields

Name | Type | Description
--- | --- | ---
items | [List T] |
pageIndex | IntegerUnsigned32 |
pageCount | IntegerUnsigned32 |
pageFirstOffset | IntegerUnsigned64 |

### CAI1ResponseAuditSearch

A response to CAI1CommandAuditSearchBegin.

    [record CAI1ResponseAuditSearch
      [field requestId UUID]
      [field results [CAI1PageCAI1AuditEvent]]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
requestId | UUID | The ID of the request that yielded this response.
results | [CAI1Page CAI1AuditEvent] | The results

### CAI1ResponseBlame

A blame assignment.

    [variant CAI1ResponseBlame
      [case BlameClient]
      [case BlameServer]
    ]

#### Cases

##### Case BlameClient

The case BlameClient has no fields.

##### Case BlameServer

The case BlameServer has no fields.

### CAI1ResponseError

An error response.

    [record CAI1ResponseError
      [field requestId UUID]
      [field errorCode String]
      [field message String]
      [field attributes [MapStringString]]
      [field remediatingAction [OptionString]]
      [field blame CAI1ResponseBlame]
      [field extras [ListCAI1Error]]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
requestId | UUID | The ID of the request that yielded this response.
errorCode | String | The error code.
message | String | The error message.
attributes | [Map String String] | The error attributes.
remediatingAction | [Option String] | The remediating action, if any.
blame | CAI1ResponseBlame | The blame assignment.
extras | [List CAI1Error] | The extra errors.

### CAI1ResponseFileDelete

A response to CAI1CommandFileDelete.

    [record CAI1ResponseFileDelete
      [field requestId UUID]
      [field id UUID]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
requestId | UUID | The ID of the request that yielded this response.
id | UUID | The file ID.

### CAI1ResponseFileGet

A response to CAI1CommandFileGet.

    [record CAI1ResponseFileGet
      [field requestId UUID]
      [field file CAI1File]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
requestId | UUID | The ID of the request that yielded this response.
file | CAI1File | The file.

### CAI1ResponseFilePut

A response to CAI1CommandFilePut.

    [record CAI1ResponseFilePut
      [field requestId UUID]
      [field file CAI1File]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
requestId | UUID | The ID of the request that yielded this response.
file | CAI1File | The file.

### CAI1ResponseFileSearch

A response to CAI1CommandFileSearch.

    [record CAI1ResponseFileSearch
      [field requestId UUID]
      [field results [CAI1PageCAI1File]]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
requestId | UUID | The ID of the request that yielded this response.
results | [CAI1Page CAI1File] | The results.

### CAI1ResponseItemAttachmentAdd

A response to CAI1CommandItemAttachmentAdd.

    [record CAI1ResponseItemAttachmentAdd
      [field requestId UUID]
      [field item CAI1Item]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
requestId | UUID | The ID of the request that yielded this response.
item | CAI1Item | The item.

### CAI1ResponseItemAttachmentRemove

A response to CAI1CommandItemAttachmentRemove.

    [record CAI1ResponseItemAttachmentRemove
      [field requestId UUID]
      [field item CAI1Item]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
requestId | UUID | The ID of the request that yielded this response.
item | CAI1Item | The item.

### CAI1ResponseItemCreate

A response to CAI1CommandItemCreate.

    [record CAI1ResponseItemCreate
      [field requestId UUID]
      [field item CAI1Item]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
requestId | UUID | The ID of the request that yielded this response.
item | CAI1Item | The item.

### CAI1ResponseItemDelete

A response to CAI1CommandItemDelete.

    [record CAI1ResponseItemDelete
      [field requestId UUID]
      [field item UUID]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
requestId | UUID | The ID of the request that yielded this response.
item | UUID | The item.

### CAI1ResponseItemGet

A response to CAI1CommandItemGet.

    [record CAI1ResponseItemGet
      [field requestId UUID]
      [field item CAI1Item]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
requestId | UUID | The ID of the request that yielded this response.
item | CAI1Item | The item.

### CAI1ResponseItemMetadataPut

A response to CAI1CommandItemMetadataPut.

    [record CAI1ResponseItemMetadataPut
      [field requestId UUID]
      [field item CAI1Item]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
requestId | UUID | The ID of the request that yielded this response.
item | CAI1Item | The item.

### CAI1ResponseItemMetadataRemove

A response to CAI1CommandItemMetadataRemove.

    [record CAI1ResponseItemMetadataRemove
      [field requestId UUID]
      [field item CAI1Item]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
requestId | UUID | The ID of the request that yielded this response.
item | CAI1Item | The item.

### CAI1ResponseItemSearch

A response to CAI1CommandItemSearch.

    [record CAI1ResponseItemSearch
      [field requestId UUID]
      [field results [CAI1PageCAI1ItemSummary]]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
requestId | UUID | The ID of the request that yielded this response.
results | [CAI1Page CAI1ItemSummary] | The results.

### CAI1ResponseItemSetName

A response to CAI1CommandItemSetName.

    [record CAI1ResponseItemSetName
      [field requestId UUID]
      [field item CAI1Item]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
requestId | UUID | The ID of the request that yielded this response.
item | CAI1Item | The item.

### CAI1ResponseItemTypesAssign

A response to CAI1CommandItemTypesAssign.

    [record CAI1ResponseItemTypesAssign
      [field requestId UUID]
      [field item CAI1Item]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
requestId | UUID | The ID of the request that yielded this response.
item | CAI1Item | The item.

### CAI1ResponseItemTypesRevoke

A response to CAI1CommandItemTypesRevoke.

    [record CAI1ResponseItemTypesRevoke
      [field requestId UUID]
      [field item CAI1Item]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
requestId | UUID | The ID of the request that yielded this response.
item | CAI1Item | The item.

### CAI1ResponseLocationAttachmentAdd

A response to CAI1CommandLocationAttachmentAdd.

    [record CAI1ResponseLocationAttachmentAdd
      [field requestId UUID]
      [field location CAI1Location]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
requestId | UUID | The ID of the request that yielded this response.
location | CAI1Location | The location.

### CAI1ResponseLocationAttachmentRemove

A response to CAI1CommandLocationAttachmentRemove.

    [record CAI1ResponseLocationAttachmentRemove
      [field requestId UUID]
      [field location CAI1Location]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
requestId | UUID | The ID of the request that yielded this response.
location | CAI1Location | The location.

### CAI1ResponseLocationDelete

A response to CAI1CommandLocationDelete.

    [record CAI1ResponseLocationDelete
      [field requestId UUID]
      [field location UUID]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
requestId | UUID | The ID of the request that yielded this response.
location | UUID | The location.

### CAI1ResponseLocationGet

A response to CAI1CommandLocationGet.

    [record CAI1ResponseLocationGet
      [field requestId UUID]
      [field location CAI1Location]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
requestId | UUID | The ID of the request that yielded this response.
location | CAI1Location | The location.

### CAI1ResponseLocationList

A response to CAI1CommandLocationList.

    [record CAI1ResponseLocationList
      [field requestId UUID]
      [field locations [MapUUIDCAI1LocationSummary]]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
requestId | UUID | The ID of the request that yielded this response.
locations | [Map UUID CAI1LocationSummary] | The locations.

### CAI1ResponseLocationMetadataPut

A response to CAI1CommandLocationMetadataPut.

    [record CAI1ResponseLocationMetadataPut
      [field requestId UUID]
      [field location CAI1Location]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
requestId | UUID | The ID of the request that yielded this response.
location | CAI1Location | The location.

### CAI1ResponseLocationMetadataRemove

A response to CAI1CommandLocationMetadataRemove.

    [record CAI1ResponseLocationMetadataRemove
      [field requestId UUID]
      [field location CAI1Location]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
requestId | UUID | The ID of the request that yielded this response.
location | CAI1Location | The location.

### CAI1ResponseLocationPut

A response to CAI1CommandLocationPut.

    [record CAI1ResponseLocationPut
      [field requestId UUID]
      [field location CAI1Location]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
requestId | UUID | The ID of the request that yielded this response.
location | CAI1Location | The location.

### CAI1ResponseLocationTypesAssign

A response to CAI1CommandLocationTypesAssign.

    [record CAI1ResponseLocationTypesAssign
      [field requestId UUID]
      [field location CAI1Location]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
requestId | UUID | The ID of the request that yielded this response.
location | CAI1Location | The location.

### CAI1ResponseLocationTypesRevoke

A response to CAI1CommandLocationTypesRevoke.

    [record CAI1ResponseLocationTypesRevoke
      [field requestId UUID]
      [field location CAI1Location]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
requestId | UUID | The ID of the request that yielded this response.
location | CAI1Location | The location.

### CAI1ResponseLogin

A response to CAI1CommandLogin.

    [record CAI1ResponseLogin
      [field requestId UUID]
      [field userId UUID]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
requestId | UUID | The ID of the request that yielded this response.
userId | UUID | The ID of the user that logged in.

### CAI1ResponseRolesAssign

A response to CAI1ResponseRolesAssign.

    [record CAI1ResponseRolesAssign
      [field requestId UUID]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
requestId | UUID | The ID of the request that yielded this response.

### CAI1ResponseRolesGet

A response to CAI1ResponseRolesGet.

    [record CAI1ResponseRolesGet
      [field requestId UUID]
      [field roles [ListString]]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
requestId | UUID | The ID of the request that yielded this response.
roles | [List String] | The roles.

### CAI1ResponseRolesRevoke

A response to CAI1ResponseRolesRevoke.

    [record CAI1ResponseRolesRevoke
      [field requestId UUID]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
requestId | UUID | The ID of the request that yielded this response.

### CAI1ResponseStockCount

A response to CAI1CommandStockCount.

    [record CAI1ResponseStockCount
      [field requestId UUID]
      [field count IntegerUnsigned64]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
requestId | UUID | The ID of the request that yielded this response.
count | IntegerUnsigned64 | The count.

### CAI1ResponseStockReposit

A response to CAI1CommandStockReposit.

    [record CAI1ResponseStockReposit
      [field requestId UUID]
      [field stock CAI1StockOccurrence]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
requestId | UUID | The ID of the request that yielded this response.
stock | CAI1StockOccurrence | The stock.

### CAI1ResponseStockSearch

A response to CAI1CommandStockSearch.

    [record CAI1ResponseStockSearch
      [field requestId UUID]
      [field results [CAI1PageCAI1StockOccurrence]]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
requestId | UUID | The ID of the request that yielded this response.
results | [CAI1Page CAI1StockOccurrence] | The results.

### CAI1ResponseTypePackageGetText

A response to CAI1CommandTypePackageGetText.

    [record CAI1ResponseTypePackageGetText
      [field requestId UUID]
      [field results String]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
requestId | UUID | The ID of the request that yielded this response.
results | String | The results.

### CAI1ResponseTypePackageInstall

A response to CAI1CommandTypePackageInstall.

    [record CAI1ResponseTypePackageInstall
      [field requestId UUID]
      [field identifier CAI1TypePackageIdentifier]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
requestId | UUID | The ID of the request that yielded this response.
identifier | CAI1TypePackageIdentifier | The identifier.

### CAI1ResponseTypePackageSearch

A response to CAI1CommandTypePackageSearch.

    [record CAI1ResponseTypePackageSearch
      [field requestId UUID]
      [field results [CAI1PageCAI1TypePackageSummary]]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
requestId | UUID | The ID of the request that yielded this response.
results | [CAI1Page CAI1TypePackageSummary] | The results.

### CAI1ResponseTypePackageUninstall

A response to CAI1CommandTypePackageUninstall.

    [record CAI1ResponseTypePackageUninstall
      [field requestId UUID]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
requestId | UUID | The ID of the request that yielded this response.

### CAI1ResponseTypePackageUpgrade

A response to CAI1CommandTypePackageUpgrade.

    [record CAI1ResponseTypePackageUpgrade
      [field requestId UUID]
      [field identifier CAI1TypePackageIdentifier]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
requestId | UUID | The ID of the request that yielded this response.
identifier | CAI1TypePackageIdentifier | The identifier.

### CAI1SizeRange

A size range.

    [record CAI1SizeRange
      [field sizeMinimum IntegerUnsigned64]
      [field sizeMaximum IntegerUnsigned64]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
sizeMinimum | IntegerUnsigned64 | The lower bound (inclusive).
sizeMaximum | IntegerUnsigned64 | The upper bound (inclusive).

### CAI1StockOccurrence

    [variant CAI1StockOccurrence
      [case Serial
        [field instance UUID]
        [field location CAI1LocationSummary]
        [field item CAI1ItemSummary]
        [field serials [ListCAI1ItemSerial]]
      ]
      [case Set
        [field instance UUID]
        [field location CAI1LocationSummary]
        [field item CAI1ItemSummary]
        [field count IntegerUnsigned64]
      ]
    ]

#### Cases

##### Case Serial

Name | Type | Description
--- | --- | ---
instance | UUID |
location | CAI1LocationSummary |
item | CAI1ItemSummary |
serials | [List CAI1ItemSerial] |

##### Case Set

Name | Type | Description
--- | --- | ---
instance | UUID |
location | CAI1LocationSummary |
item | CAI1ItemSummary |
count | IntegerUnsigned64 |

### CAI1StockOccurrenceKind

    [variant CAI1StockOccurrenceKind
      [case Set]
      [case Serial]
    ]

#### Cases

##### Case Set

The case Set has no fields.

##### Case Serial

The case Serial has no fields.

### CAI1StockReposit

The type of item reposit operations.

    [variant CAI1StockReposit
      [case CAI1StockRepositSetIntroduce
        [field instanceId UUID]
        [field itemId UUID]
        [field locationId UUID]
        [field count IntegerUnsigned64]
      ]
      [case CAI1StockRepositSetAdd
        [field instanceId UUID]
        [field count IntegerUnsigned64]
      ]
      [case CAI1StockRepositSetMove
        [field instanceSource UUID]
        [field instanceTarget UUID]
        [field locationTo UUID]
        [field count IntegerUnsigned64]
      ]
      [case CAI1StockRepositSetRemove
        [field instanceId UUID]
        [field count IntegerUnsigned64]
      ]
      [case CAI1StockRepositSerialIntroduce
        [field instanceId UUID]
        [field itemId UUID]
        [field locationId UUID]
        [field serial CAI1ItemSerial]
      ]
      [case CAI1StockRepositSerialMove
        [field instanceId UUID]
        [field locationTo UUID]
      ]
      [case CAI1StockRepositSerialRemove
        [field instanceId UUID]
      ]
      [case CAI1StockRepositSerialNumberAdd
        [field instanceId UUID]
        [field serial CAI1ItemSerial]
      ]
      [case CAI1StockRepositSerialNumberRemove
        [field instanceId UUID]
        [field serial CAI1ItemSerial]
      ]
    ]

#### Cases

##### Case CAI1StockRepositSetIntroduce

Name | Type | Description
--- | --- | ---
instanceId | UUID | The instance.
itemId | UUID | The item.
locationId | UUID | The location ID.
count | IntegerUnsigned64 | The count.

##### Case CAI1StockRepositSetAdd

Name | Type | Description
--- | --- | ---
instanceId | UUID | The instance.
count | IntegerUnsigned64 | The count.

##### Case CAI1StockRepositSetMove

Name | Type | Description
--- | --- | ---
instanceSource | UUID | The source instance.
instanceTarget | UUID | The target instance.
locationTo | UUID | The target location.
count | IntegerUnsigned64 | The count.

##### Case CAI1StockRepositSetRemove

Name | Type | Description
--- | --- | ---
instanceId | UUID | The instance.
count | IntegerUnsigned64 | The count.

##### Case CAI1StockRepositSerialIntroduce

Name | Type | Description
--- | --- | ---
instanceId | UUID | The instance.
itemId | UUID | The item.
locationId | UUID | The location ID.
serial | CAI1ItemSerial | The serial number.

##### Case CAI1StockRepositSerialMove

Name | Type | Description
--- | --- | ---
instanceId | UUID | The instance.
locationTo | UUID | The target location.

##### Case CAI1StockRepositSerialRemove

Name | Type | Description
--- | --- | ---
instanceId | UUID | The instance.

##### Case CAI1StockRepositSerialNumberAdd

Name | Type | Description
--- | --- | ---
instanceId | UUID | The instance.
serial | CAI1ItemSerial | The serial number.

##### Case CAI1StockRepositSerialNumberRemove

Name | Type | Description
--- | --- | ---
instanceId | UUID | The instance.
serial | CAI1ItemSerial | The serial number.

### CAI1StockSearchParameters

The stock search parameters.

    [record CAI1StockSearchParameters
      [field locationMatch CAI1LocationMatch]
      [field itemMatch [CAI1ComparisonExactUUID]]
      [field includeOccurrences [ListCAI1StockOccurrenceKind]]
      [field pageSize IntegerUnsigned32]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
locationMatch | CAI1LocationMatch | The location match.
itemMatch | [CAI1ComparisonExact UUID] | The item match.
includeOccurrences | [List CAI1StockOccurrenceKind] | The kinds of stock occurrences to include.
pageSize | IntegerUnsigned32 | The page size.

### CAI1TimeRange

An inclusive time range.

    [record CAI1TimeRange
      [field timeLower OffsetDateTime]
      [field timeUpper OffsetDateTime]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
timeLower | OffsetDateTime |
timeUpper | OffsetDateTime |

### CAI1TypeField

A field within a type declaration.

    [record CAI1TypeField
      [field name CAI1TypeRecordFieldIdentifier]
      [field description String]
      [field type CAI1TypeScalar]
      [field required Boolean]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
name | CAI1TypeRecordFieldIdentifier | The type field name.
description | String | The type field description.
type | CAI1TypeScalar | The type of the field.
required | Boolean | Whether or not the field is required to be present.

### CAI1TypePackageIdentifier

The type package identifier.

    [record CAI1TypePackageIdentifier
      [field name String]
      [field version CAI1Version]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
name | String | The package name.
version | CAI1Version | The package version.

### CAI1TypePackageSearchParameters

The type package search parameters.

    [record CAI1TypePackageSearchParameters
      [field descriptionMatch [CAI1ComparisonFuzzyString]]
      [field limit IntegerUnsigned32]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
descriptionMatch | [CAI1ComparisonFuzzy String] | The type package description match expression.
limit | IntegerUnsigned32 | The item limit.

### CAI1TypePackageSummary

The type package summary.

    [record CAI1TypePackageSummary
      [field identifier CAI1TypePackageIdentifier]
      [field description String]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
identifier | CAI1TypePackageIdentifier | The package identifier.
description | String | The package description.

### CAI1TypePackageTypeRemovalBehavior

The type package type removal behavior.

    [variant CAI1TypePackageTypeRemovalBehavior
      [case FailIfTypesReferenced]
      [case RevokeTypes]
    ]

#### Cases

##### Case FailIfTypesReferenced

The case FailIfTypesReferenced has no fields.

##### Case RevokeTypes

The case RevokeTypes has no fields.

### CAI1TypePackageUninstall

The type package uninstall parameters.

    [record CAI1TypePackageUninstall
      [field typeRemovalBehavior CAI1TypePackageTypeRemovalBehavior]
      [field identifier CAI1TypePackageIdentifier]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
typeRemovalBehavior | CAI1TypePackageTypeRemovalBehavior |
identifier | CAI1TypePackageIdentifier |

### CAI1TypePackageVersionBehavior

The type package version behavior.

    [variant CAI1TypePackageVersionBehavior
      [case AllowDowngrades]
      [case DisallowDowngrades]
    ]

#### Cases

##### Case AllowDowngrades

The case AllowDowngrades has no fields.

##### Case DisallowDowngrades

The case DisallowDowngrades has no fields.

### CAI1TypeRecord

A type declaration.

    [record CAI1TypeRecord
      [field name CAI1TypeRecordIdentifier]
      [field description String]
      [field fields [MapCAI1TypeRecordFieldIdentifierCAI1TypeField]]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
name | CAI1TypeRecordIdentifier | The type declaration name.
description | String | The type declaration description.
fields | [Map CAI1TypeRecordFieldIdentifier CAI1TypeField] | Whether or not the field is required to be present.

### CAI1TypeRecordFieldIdentifier

    [record CAI1TypeRecordFieldIdentifier
      [field packageName String]
      [field typeName String]
      [field fieldName String]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
packageName | String |
typeName | String |
fieldName | String |

### CAI1TypeRecordIdentifier

    [record CAI1TypeRecordIdentifier
      [field packageName String]
      [field typeName String]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
packageName | String |
typeName | String |

### CAI1TypeRecordSearchParameters

The declared type search parameters.

    [record CAI1TypeRecordSearchParameters
      [field nameSearch [CAI1ComparisonFuzzyString]]
      [field descriptionSearch [CAI1ComparisonFuzzyString]]
      [field limit IntegerUnsigned32]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
nameSearch | [CAI1ComparisonFuzzy String] | The type description search query.
descriptionSearch | [CAI1ComparisonFuzzy String] | The type description search query.
limit | IntegerUnsigned32 | The limit.

### CAI1TypeRecordSummary

A type declaration summary.

    [record CAI1TypeRecordSummary
      [field name CAI1TypeRecordIdentifier]
      [field description String]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
name | CAI1TypeRecordIdentifier | The type declaration name.
description | String | The type declaration description.

### CAI1TypeScalar

A scalar type.

    [variant CAI1TypeScalar
      [case Integral
        [field name CAI1TypeScalarIdentifier]
        [field description String]
        [field rangeLower IntegerSigned64]
        [field rangeUpper IntegerSigned64]
      ]
      [case Text
        [field name CAI1TypeScalarIdentifier]
        [field description String]
        [field pattern String]
      ]
      [case Time
        [field name CAI1TypeScalarIdentifier]
        [field description String]
        [field rangeLower OffsetDateTime]
        [field rangeUpper OffsetDateTime]
      ]
      [case Monetary
        [field name CAI1TypeScalarIdentifier]
        [field description String]
        [field rangeLower String]
        [field rangeUpper String]
      ]
      [case Real
        [field name CAI1TypeScalarIdentifier]
        [field description String]
        [field rangeLower Float64]
        [field rangeUpper Float64]
      ]
    ]

#### Cases

##### Case Integral

Name | Type | Description
--- | --- | ---
name | CAI1TypeScalarIdentifier | The type name.
description | String | The type description.
rangeLower | IntegerSigned64 |
rangeUpper | IntegerSigned64 |

##### Case Text

Name | Type | Description
--- | --- | ---
name | CAI1TypeScalarIdentifier | The type name.
description | String | The type description.
pattern | String |

##### Case Time

Name | Type | Description
--- | --- | ---
name | CAI1TypeScalarIdentifier | The type name.
description | String | The type description.
rangeLower | OffsetDateTime |
rangeUpper | OffsetDateTime |

##### Case Monetary

Name | Type | Description
--- | --- | ---
name | CAI1TypeScalarIdentifier | The type name.
description | String | The type description.
rangeLower | String |
rangeUpper | String |

##### Case Real

Name | Type | Description
--- | --- | ---
name | CAI1TypeScalarIdentifier | The type name.
description | String | The type description.
rangeLower | Float64 |
rangeUpper | Float64 |

### CAI1TypeScalarIdentifier

    [record CAI1TypeScalarIdentifier
      [field packageName String]
      [field typeName String]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
packageName | String |
typeName | String |

### CAI1TypeScalarSearchParameters

The scalar type search parameters.

    [record CAI1TypeScalarSearchParameters
      [field nameSearch [CAI1ComparisonFuzzyString]]
      [field descriptionSearch [CAI1ComparisonFuzzyString]]
      [field limit IntegerUnsigned32]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
nameSearch | [CAI1ComparisonFuzzy String] | The type description search query.
descriptionSearch | [CAI1ComparisonFuzzy String] | The type description search query.
limit | IntegerUnsigned32 | The limit.

### CAI1Version

A version number.

    [record CAI1Version
      [field versionMajor IntegerUnsigned32]
      [field versionMinor IntegerUnsigned32]
      [field versionPatch IntegerUnsigned32]
      [field versionQualifier [OptionString]]
    ]

#### Fields

Name | Type | Description
--- | --- | ---
versionMajor | IntegerUnsigned32 | The major version.
versionMinor | IntegerUnsigned32 | The minor version.
versionPatch | IntegerUnsigned32 | The patch version.
versionQualifier | [Option String] | The version qualifier.

## Protocols

- CAI

### CAI

Protocol identifier: `ea97717d-8a36-312d-82e4-9bad187770cc`

The Inventory protocol.

#### Version 1 Messages

Name | Description
--- | ---
CAI1CommandAuditSearchBegin | Start searching audit events.
CAI1CommandAuditSearchNext | Continue searching audit events.
CAI1CommandAuditSearchPrevious | Continue searching audit events.
CAI1CommandFileDelete | Delete files.
CAI1CommandFileGet | Retrieve a file.
CAI1CommandFilePut | Add or update files.
CAI1CommandFileSearchBegin | Start searching for items.
CAI1CommandFileSearchNext | Return the next page of search results.
CAI1CommandFileSearchPrevious | Return the next page of search results.
CAI1CommandItemAttachmentAdd | Add item attachments.
CAI1CommandItemAttachmentRemove | Remove item attachments.
CAI1CommandItemCreate | Create a new item.
CAI1CommandItemDelete | Delete items.
CAI1CommandItemGet | Retrieve an item.
CAI1CommandItemMetadataPut | Add or update metadata values in an item.
CAI1CommandItemMetadataRemove | Remove metadata values from an item.
CAI1CommandItemSearchBegin | Start searching for items.
CAI1CommandItemSearchNext | Return the next page of search results.
CAI1CommandItemSearchPrevious | Return the next page of search results.
CAI1CommandItemSetName | Update the names of items.
CAI1CommandItemTypesAssign | Assign a set of types to an item.
CAI1CommandItemTypesRevoke | Revoke a set of types from an item.
CAI1CommandLocationAttachmentAdd | Add location attachments.
CAI1CommandLocationAttachmentRemove | Remove location attachments.
CAI1CommandLocationDelete | Delete locations.
CAI1CommandLocationGet | Retrieve a location.
CAI1CommandLocationList | List locations.
CAI1CommandLocationMetadataPut | Add or update metadata values in a location.
CAI1CommandLocationMetadataRemove | Remove metadata values from a location.
CAI1CommandLocationPut | Create or update a location.
CAI1CommandLocationTypesAssign | Assign a set of types to a location.
CAI1CommandLocationTypesRevoke | Revoke a set of types from a location.
CAI1CommandLogin | A request to log in.
CAI1CommandRolesAssign | Assign a set of roles to a user.
CAI1CommandRolesGet | Get the roles for a user.
CAI1CommandRolesRevoke | Revoke a set of roles from a user.
CAI1CommandStockCount | Count stock.
CAI1CommandStockReposit | Reposit an item.
CAI1CommandStockSearchBegin | Search stock.
CAI1CommandStockSearchNext | Search stock.
CAI1CommandStockSearchPrevious | Search stock.
CAI1CommandTypePackageGetText | Get a type package.
CAI1CommandTypePackageInstall | Install a type package.
CAI1CommandTypePackageSearchBegin | Start searching type packages.
CAI1CommandTypePackageSearchNext | Continue searching type packages.
CAI1CommandTypePackageSearchPrevious | Continue searching type packages.
CAI1CommandTypePackageUninstall | Uninstall a type package.
CAI1CommandTypePackageUpgrade | Upgrade a type package.
CAI1EventUpdated | Data on the server was updated.
CAI1ResponseAuditSearch | A response to CAI1CommandAuditSearchBegin.
CAI1ResponseError | An error response.
CAI1ResponseFileDelete | A response to CAI1CommandFileDelete.
CAI1ResponseFileGet | A response to CAI1CommandFileGet.
CAI1ResponseFilePut | A response to CAI1CommandFilePut.
CAI1ResponseFileSearch | A response to CAI1CommandFileSearch.
CAI1ResponseItemAttachmentAdd | A response to CAI1CommandItemAttachmentAdd.
CAI1ResponseItemAttachmentRemove | A response to CAI1CommandItemAttachmentRemove.
CAI1ResponseItemCreate | A response to CAI1CommandItemCreate.
CAI1ResponseItemDelete | A response to CAI1CommandItemDelete.
CAI1ResponseItemGet | A response to CAI1CommandItemGet.
CAI1ResponseItemMetadataPut | A response to CAI1CommandItemMetadataPut.
CAI1ResponseItemMetadataRemove | A response to CAI1CommandItemMetadataRemove.
CAI1ResponseItemSearch | A response to CAI1CommandItemSearch.
CAI1ResponseItemSetName | A response to CAI1CommandItemSetName.
CAI1ResponseItemTypesAssign | A response to CAI1CommandItemTypesAssign.
CAI1ResponseItemTypesRevoke | A response to CAI1CommandItemTypesRevoke.
CAI1ResponseLocationAttachmentAdd | A response to CAI1CommandLocationAttachmentAdd.
CAI1ResponseLocationAttachmentRemove | A response to CAI1CommandLocationAttachmentRemove.
CAI1ResponseLocationDelete | A response to CAI1CommandLocationDelete.
CAI1ResponseLocationGet | A response to CAI1CommandLocationGet.
CAI1ResponseLocationList | A response to CAI1CommandLocationList.
CAI1ResponseLocationMetadataPut | A response to CAI1CommandLocationMetadataPut.
CAI1ResponseLocationMetadataRemove | A response to CAI1CommandLocationMetadataRemove.
CAI1ResponseLocationPut | A response to CAI1CommandLocationPut.
CAI1ResponseLocationTypesAssign | A response to CAI1CommandLocationTypesAssign.
CAI1ResponseLocationTypesRevoke | A response to CAI1CommandLocationTypesRevoke.
CAI1ResponseLogin | A response to CAI1CommandLogin.
CAI1ResponseRolesAssign | A response to CAI1ResponseRolesAssign.
CAI1ResponseRolesGet | A response to CAI1ResponseRolesGet.
CAI1ResponseRolesRevoke | A response to CAI1ResponseRolesRevoke.
CAI1ResponseStockCount | A response to CAI1CommandStockCount.
CAI1ResponseStockReposit | A response to CAI1CommandStockReposit.
CAI1ResponseStockSearch | A response to CAI1CommandStockSearch.
CAI1ResponseTypePackageGetText | A response to CAI1CommandTypePackageGetText.
CAI1ResponseTypePackageInstall | A response to CAI1CommandTypePackageInstall.
CAI1ResponseTypePackageSearch | A response to CAI1CommandTypePackageSearch.
CAI1ResponseTypePackageUninstall | A response to CAI1CommandTypePackageUninstall.
CAI1ResponseTypePackageUpgrade | A response to CAI1CommandTypePackageUpgrade.