stack

Home > @infiniteobjects/shopify-data-manager > AdminTypes > MetafieldDefinitionInput

AdminTypes.MetafieldDefinitionInput interface

The input fields required to create a metafield definition.

Signature:

export interface MetafieldDefinitionInput 

Properties

Property Modifiers Type Description
access?   InputMaybe<MetafieldAccessInput> (Optional) The access settings that apply to each of the metafields that belong to the metafield definition.
description?   InputMaybe<Scalars[‘String’][‘input’]> (Optional) The description for the metafield definition.
key   Scalars[‘String’][‘input’] <p>The unique identifier for the metafield definition within its namespace.</p><p>Must be 3-64 characters long and only contain alphanumeric, hyphen, and underscore characters.</p>
name   Scalars[‘String’][‘input’] The human-readable name for the metafield definition.
namespace?   InputMaybe<Scalars[‘String’][‘input’]> <p>(Optional) The container for a group of metafields that the metafield definition will be associated with. If omitted, the app-reserved namespace will be used.</p><p>Must be 3-255 characters long and only contain alphanumeric, hyphen, and underscore characters.</p>
ownerType   MetafieldOwnerType | `${MetafieldOwnerType}` The resource type that the metafield definition is attached to.
pin?   InputMaybe<Scalars[‘Boolean’][‘input’]> (Optional) Whether to [pin](https://help.shopify.com/manual/custom-data/metafields/pinning-metafield-definitions) the metafield definition.
type   Scalars[‘String’][‘input’] The type of data that each of the metafields that belong to the metafield definition will store. Refer to the list of [supported types](https://shopify.dev/apps/metafields/types).
useAsCollectionCondition?   InputMaybe<Scalars[‘Boolean’][‘input’]> (Optional) Whether the metafield definition can be used as a collection condition.
validations?   InputMaybe<Array<MetafieldDefinitionValidationInput>> (Optional) A list of [validation options](https://shopify.dev/apps/metafields/definitions/validation) for the metafields that belong to the metafield definition. For example, for a metafield definition with the type date, you can set a minimum date validation so that each of the metafields that belong to it can only store dates after the specified minimum.
visibleToStorefrontApi?   InputMaybe<Scalars[‘Boolean’][‘input’]> (Optional) Whether metafields for the metafield definition are visible using the Storefront API.