# Types

{% hint style="warning" %}
**Navixy Repository API is a work in progress.** This documentation is published for preview purposes only and doesn't reflect a stable release. Structure, field names, and behaviors are subject to change.
{% endhint %}

## Objects

### AssetGroupType

A type for asset groups with membership constraints.

**Implements:** [CatalogItem](https://www.navixy.com/docs/navixy-repository-api/catalogs/catalog-items#type-catalogitem), [Node](https://www.navixy.com/docs/navixy-repository-api/common#type-node), [Versioned](https://www.navixy.com/docs/navixy-repository-api/common#type-versioned), [Titled](https://www.navixy.com/docs/navixy-repository-api/common#type-titled)

| Field               | Type                                                                                                              | Description                                                                     |
| ------------------- | ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| `id`                | `ID!`                                                                                                             | A globally unique identifier.                                                   |
| `version`           | `Int!`                                                                                                            | The version number for optimistic locking.                                      |
| `title`             | `String!`                                                                                                         | The human-readable display name. Can be localized.                              |
| `code`              | `Code!`                                                                                                           | A machine-readable code, unique within the catalog scope.                       |
| `order`             | `Int!`                                                                                                            | The display order within the same level or category.                            |
| `catalog`           | [Catalog](https://www.navixy.com/docs/navixy-repository-api/catalogs/catalog-items#type-catalog)!                 | The catalog this item belongs to.                                               |
| `organization`      | [Organization](https://www.navixy.com/docs/navixy-repository-api/organizations#type-organization)                 | The organization that owns this item. Null for system items.                    |
| `meta`              | [CatalogItemMeta](https://www.navixy.com/docs/navixy-repository-api/catalogs/catalog-items#type-catalogitemmeta)! | Metadata about this item including description, origin, and display properties. |
| `allowedAssetTypes` | \[[AssetGroupTypeConstraint](#type-assetgrouptypeconstraint)!]!                                                   | The asset types allowed in groups of this type, with optional quantity limits.  |

***

### AssetGroupTypeConstraint

A constraint defining which asset types can be included in an asset group type.

| Field       | Type                                                                                                    | Description                                                                           |
| ----------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
| `assetType` | [AssetType](https://www.navixy.com/docs/navixy-repository-api/core-api-reference/types#type-assettype)! | The asset type allowed in the group.                                                  |
| `maxItems`  | `Int`                                                                                                   | The maximum number of assets of this type allowed in one group. Null means unlimited. |

***

### AssetGroup

A group of assets.

**Implements:** [Node](https://www.navixy.com/docs/navixy-repository-api/common#type-node), [Versioned](https://www.navixy.com/docs/navixy-repository-api/common#type-versioned), [Titled](https://www.navixy.com/docs/navixy-repository-api/common#type-titled)

| Field           | Type                                                                                                                | Description                                                                                                                                                                                               |
| --------------- | ------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`            | `ID!`                                                                                                               | A globally unique identifier. This ID is opaque and should not be parsed by clients.                                                                                                                      |
| `version`       | `Int!`                                                                                                              | The version number for optimistic locking. Incremented on each update. Can be provided in update/delete mutations to prevent lost updates. If omitted, the update proceeds without stale-read protection. |
| `title`         | `String!`                                                                                                           | The human-readable display name.                                                                                                                                                                          |
| `organization`  | [Organization](https://www.navixy.com/docs/navixy-repository-api/organizations#type-organization)!                  | The organization that owns this group.                                                                                                                                                                    |
| `type`          | [AssetGroupType](#type-assetgrouptype)                                                                              | The group type with membership constraints.                                                                                                                                                               |
| `color`         | `HexColorCode`                                                                                                      | The color for UI display in hexadecimal format.                                                                                                                                                           |
| `currentAssets` | [AssetConnection](https://www.navixy.com/docs/navixy-repository-api/core-api-reference/types#type-assetconnection)! | The assets currently in this group.                                                                                                                                                                       |
| `history`       | [AssetGroupItemConnection](#type-assetgroupitemconnection)!                                                         | The full membership history for this group.                                                                                                                                                               |

***

### AssetGroupItem

A record of an asset's membership in a group.

**Implements:** [Node](https://www.navixy.com/docs/navixy-repository-api/common#type-node)

| Field        | Type                                                                                            | Description                                                                                              |
| ------------ | ----------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| `id`         | `ID!`                                                                                           | A globally unique identifier. This ID is opaque and should not be parsed by clients.                     |
| `group`      | [AssetGroup](#type-assetgroup)!                                                                 | The group containing the asset.                                                                          |
| `asset`      | [Asset](https://www.navixy.com/docs/navixy-repository-api/core-api-reference/types#type-asset)! | The asset in the group.                                                                                  |
| `attachedAt` | `DateTime!`                                                                                     | The date and time when the asset was added to the group.                                                 |
| `detachedAt` | `DateTime`                                                                                      | The date and time when the asset was removed from the group. Null means the asset is currently attached. |

***

### AssetGroupPayload

The result of an asset group mutation.

| Field        | Type                            | Description                         |
| ------------ | ------------------------------- | ----------------------------------- |
| `assetGroup` | [AssetGroup](#type-assetgroup)! | The created or updated asset group. |

***

### AssetGroupTypePayload

The result of an asset group type mutation.

| Field            | Type                                    | Description                              |
| ---------------- | --------------------------------------- | ---------------------------------------- |
| `assetGroupType` | [AssetGroupType](#type-assetgrouptype)! | The created or updated asset group type. |

***

## Inputs

### AssetGroupFilter

Filtering options for asset groups.

| Field           | Type     | Description                                         |
| --------------- | -------- | --------------------------------------------------- |
| `typeIds`       | `[ID!]`  | Filter by group types (OR within field).            |
| `titleContains` | `String` | Partial match on title (case-insensitive contains). |

***

### AssetGroupOrder

Ordering options for asset groups.

| Field       | Type                                                                                            | Description             |
| ----------- | ----------------------------------------------------------------------------------------------- | ----------------------- |
| `field`     | [AssetGroupOrderField](#type-assetgrouporderfield)!                                             | The field to order by.  |
| `direction` | [OrderDirection](https://www.navixy.com/docs/navixy-repository-api/common#type-orderdirection)! | The direction to order. |

***

### AssetGroupItemFilter

Filtering options for asset group items.

| Field        | Type      | Description                                    |
| ------------ | --------- | ---------------------------------------------- |
| `activeOnly` | `Boolean` | If true, return only currently attached items. |

***

### AssetGroupItemOrder

Ordering options for asset group items.

| Field       | Type                                                                                            | Description             |
| ----------- | ----------------------------------------------------------------------------------------------- | ----------------------- |
| `field`     | [AssetGroupItemOrderField](#type-assetgroupitemorderfield)!                                     | The field to order by.  |
| `direction` | [OrderDirection](https://www.navixy.com/docs/navixy-repository-api/common#type-orderdirection)! | The direction to order. |

***

### AssetGroupCreateInput

Input for creating a new asset group.

| Field            | Type           | Description                                    |
| ---------------- | -------------- | ---------------------------------------------- |
| `organizationId` | `ID!`          | The organization that will own the group.      |
| `typeId`         | `ID`           | The group type ID.                             |
| `title`          | `String!`      | The group display name.                        |
| `color`          | `HexColorCode` | The color for UI display.                      |
| `assetIds`       | `[ID!]`        | Initial list of asset IDs to add to the group. |

***

### AssetGroupUpdateInput

Input for updating an existing asset group.

| Field      | Type           | Description                                                                                     |
| ---------- | -------------- | ----------------------------------------------------------------------------------------------- |
| `id`       | `ID!`          | The asset group ID to update.                                                                   |
| `version`  | `Int`          | The current version for optimistic locking. If omitted, auto-increments without conflict check. |
| `title`    | `String`       | The new display name.                                                                           |
| `color`    | `HexColorCode` | The new color.                                                                                  |
| `assetIds` | `[ID!]`        | Full replacement list of asset IDs in the group. If provided, replaces all current memberships. |

***

### AssetGroupDeleteInput

Input for deleting an asset group.

| Field     | Type  | Description                                                                                     |
| --------- | ----- | ----------------------------------------------------------------------------------------------- |
| `id`      | `ID!` | The asset group ID to delete.                                                                   |
| `version` | `Int` | The current version for optimistic locking. If omitted, auto-increments without conflict check. |

***

### AssetGroupItemsAddInput

Input for adding assets to a group.

| Field      | Type     | Description           |
| ---------- | -------- | --------------------- |
| `groupId`  | `ID!`    | The group ID.         |
| `assetIds` | `[ID!]!` | The asset IDs to add. |

***

### AssetGroupItemsRemoveInput

Input for removing assets from a group.

| Field      | Type     | Description              |
| ---------- | -------- | ------------------------ |
| `groupId`  | `ID!`    | The group ID.            |
| `assetIds` | `[ID!]!` | The asset IDs to remove. |

***

### AssetGroupTypeCreateInput

Input for creating an asset group type.

| Field               | Type                                                                                                                       | Description                                                      |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- |
| `organizationId`    | `ID!`                                                                                                                      | The organization that will own the item.                         |
| `code`              | `Code`                                                                                                                     | The machine-readable code. Auto-generated from title if omitted. |
| `title`             | `String!`                                                                                                                  | The display name.                                                |
| `order`             | `Int`                                                                                                                      | The display order. Auto-calculated as last position if omitted.  |
| `allowedAssetTypes` | \[[AssetGroupTypeConstraintInput](#type-assetgrouptypeconstraintinput)!]                                                   | The allowed asset types with optional limits.                    |
| `meta`              | [CatalogItemMetaInput](https://www.navixy.com/docs/navixy-repository-api/catalogs/catalog-items#type-catalogitemmetainput) | The display properties.                                          |

***

### AssetGroupTypeUpdateInput

Input for updating an asset group type.

| Field               | Type                                                                                                                       | Description                                                                                     |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| `id`                | `ID!`                                                                                                                      | The item ID to update.                                                                          |
| `version`           | `Int`                                                                                                                      | The current version for optimistic locking. If omitted, auto-increments without conflict check. |
| `title`             | `String`                                                                                                                   | The new display name.                                                                           |
| `order`             | `Int`                                                                                                                      | The new display order.                                                                          |
| `allowedAssetTypes` | \[[AssetGroupTypeConstraintInput](#type-assetgrouptypeconstraintinput)!]                                                   | Replace allowed asset types. Null means no change.                                              |
| `meta`              | [CatalogItemMetaInput](https://www.navixy.com/docs/navixy-repository-api/catalogs/catalog-items#type-catalogitemmetainput) | The display properties.                                                                         |

***

### AssetGroupTypeConstraintInput

Input for a constraint defining allowed asset types in an asset group type.

| Field         | Type  | Description                                            |
| ------------- | ----- | ------------------------------------------------------ |
| `assetTypeId` | `ID!` | The asset type ID.                                     |
| `maxItems`    | `Int` | The maximum assets of this type. Null means unlimited. |

***

## Enums

### AssetGroupOrderField

Fields available for ordering asset groups.

| Value   | Description     |
| ------- | --------------- |
| `TITLE` | Order by title. |

***

### AssetGroupItemOrderField

Fields available for ordering asset group items.

| Value         | Description               |
| ------------- | ------------------------- |
| `ATTACHED_AT` | Order by attachment date. |

***

## Pagination types

### AssetGroupConnection

A paginated list of AssetGroup items.

**Implements:** [Connection](https://www.navixy.com/docs/navixy-repository-api/common#type-connection)

| Field      | Type                                                                                 | Description                                                |
| ---------- | ------------------------------------------------------------------------------------ | ---------------------------------------------------------- |
| `edges`    | \[[AssetGroupEdge](#type-assetgroupedge)!]!                                          | A list of edges.                                           |
| `nodes`    | \[[AssetGroup](#type-assetgroup)!]!                                                  | A list of nodes in the connection (without edge metadata). |
| `pageInfo` | [PageInfo](https://www.navixy.com/docs/navixy-repository-api/common#type-pageinfo)!  | Information about the current page.                        |
| `total`    | [CountInfo](https://www.navixy.com/docs/navixy-repository-api/common#type-countinfo) | The total count of items matching the filter.              |

***

### AssetGroupEdge

An edge in the AssetGroup connection.

**Implements:** [Edge](https://www.navixy.com/docs/navixy-repository-api/common#type-edge)

| Field    | Type                            | Description                             |
| -------- | ------------------------------- | --------------------------------------- |
| `cursor` | `String!`                       | An opaque cursor for this edge.         |
| `node`   | [AssetGroup](#type-assetgroup)! | The asset group at the end of the edge. |

***

### AssetGroupItemConnection

A paginated list of AssetGroupItem items.

**Implements:** [Connection](https://www.navixy.com/docs/navixy-repository-api/common#type-connection)

| Field      | Type                                                                                 | Description                                                |
| ---------- | ------------------------------------------------------------------------------------ | ---------------------------------------------------------- |
| `edges`    | \[[AssetGroupItemEdge](#type-assetgroupitemedge)!]!                                  | A list of edges.                                           |
| `nodes`    | \[[AssetGroupItem](#type-assetgroupitem)!]!                                          | A list of nodes in the connection (without edge metadata). |
| `pageInfo` | [PageInfo](https://www.navixy.com/docs/navixy-repository-api/common#type-pageinfo)!  | Information about the current page.                        |
| `total`    | [CountInfo](https://www.navixy.com/docs/navixy-repository-api/common#type-countinfo) | The total count of items matching the filter.              |

***

### AssetGroupItemEdge

An edge in the AssetGroupItem connection.

**Implements:** [Edge](https://www.navixy.com/docs/navixy-repository-api/common#type-edge)

| Field    | Type                                    | Description                                  |
| -------- | --------------------------------------- | -------------------------------------------- |
| `cursor` | `String!`                               | An opaque cursor for this edge.              |
| `node`   | [AssetGroupItem](#type-assetgroupitem)! | The asset group item at the end of the edge. |

***

### AssetGroupTypeConnection

A paginated list of AssetGroupType items.

**Implements:** [Connection](https://www.navixy.com/docs/navixy-repository-api/common#type-connection)

| Field      | Type                                                                                 | Description                                                |
| ---------- | ------------------------------------------------------------------------------------ | ---------------------------------------------------------- |
| `edges`    | \[[AssetGroupTypeEdge](#type-assetgrouptypeedge)!]!                                  | A list of edges.                                           |
| `nodes`    | \[[AssetGroupType](#type-assetgrouptype)!]!                                          | A list of nodes in the connection (without edge metadata). |
| `pageInfo` | [PageInfo](https://www.navixy.com/docs/navixy-repository-api/common#type-pageinfo)!  | Information about the current page.                        |
| `total`    | [CountInfo](https://www.navixy.com/docs/navixy-repository-api/common#type-countinfo) | The total count of items matching the filter.              |

***

### AssetGroupTypeEdge

An edge in the AssetGroupType connection.

**Implements:** [Edge](https://www.navixy.com/docs/navixy-repository-api/common#type-edge)

| Field    | Type                                    | Description                                  |
| -------- | --------------------------------------- | -------------------------------------------- |
| `cursor` | `String!`                               | An opaque cursor for this edge.              |
| `node`   | [AssetGroupType](#type-assetgrouptype)! | The asset group type at the end of the edge. |

***
