# This file was auto-generated by Fern from our API Definition.

from __future__ import annotations
import typing_extensions
import typing_extensions
import typing
from .catalog_item_modifier_list_info import CatalogItemModifierListInfoParams
from ..types.catalog_item_product_type import CatalogItemProductType
from .catalog_item_option_for_item import CatalogItemOptionForItemParams
from .catalog_object_category import CatalogObjectCategoryParams
from .catalog_ecom_seo_data import CatalogEcomSeoDataParams
from .catalog_item_food_and_beverage_details import CatalogItemFoodAndBeverageDetailsParams
import typing

if typing.TYPE_CHECKING:
    from .catalog_object import CatalogObjectParams


class CatalogItemParams(typing_extensions.TypedDict):
    """
    A [CatalogObject](entity:CatalogObject) instance of the `ITEM` type, also referred to as an item, in the catalog.
    """

    name: typing_extensions.NotRequired[typing.Optional[str]]
    """
    The item's name. This is a searchable attribute for use in applicable query filters, its value must not be empty, and the length is of Unicode code points.
    """

    description: typing_extensions.NotRequired[typing.Optional[str]]
    """
    The item's description. This is a searchable attribute for use in applicable query filters, and its value length is of Unicode code points.
    
    Deprecated at 2022-07-20, this field is planned to retire in 6 months. You should migrate to use `description_html` to set the description
    of the [CatalogItem](entity:CatalogItem) instance.  The `description` and `description_html` field values are kept in sync. If you try to
    set the both fields, the `description_html` text value overwrites the `description` value. Updates in one field are also reflected in the other,
    except for when you use an early version before Square API 2022-07-20 and `description_html` is set to blank, setting the `description` value to null
    does not nullify `description_html`.
    """

    abbreviation: typing_extensions.NotRequired[typing.Optional[str]]
    """
    The text of the item's display label in the Square Point of Sale app. Only up to the first five characters of the string are used.
    This attribute is searchable, and its value length is of Unicode code points.
    """

    label_color: typing_extensions.NotRequired[typing.Optional[str]]
    """
    The color of the item's display label in the Square Point of Sale app. This must be a valid hex color code.
    """

    is_taxable: typing_extensions.NotRequired[typing.Optional[bool]]
    """
    Indicates whether the item is taxable (`true`) or non-taxable (`false`). Default is `true`.
    """

    category_id: typing_extensions.NotRequired[typing.Optional[str]]
    """
    The ID of the item's category, if any. Deprecated since 2023-12-13. Use `CatalogItem.categories`, instead.
    """

    tax_ids: typing_extensions.NotRequired[typing.Optional[typing.Sequence[str]]]
    """
    A set of IDs indicating the taxes enabled for
    this item. When updating an item, any taxes listed here will be added to the item.
    Taxes may also be added to or deleted from an item using `UpdateItemTaxes`.
    """

    modifier_list_info: typing_extensions.NotRequired[
        typing.Optional[typing.Sequence[CatalogItemModifierListInfoParams]]
    ]
    """
    A set of `CatalogItemModifierListInfo` objects
    representing the modifier lists that apply to this item, along with the overrides and min
    and max limits that are specific to this item. Modifier lists
    may also be added to or deleted from an item using `UpdateItemModifierLists`.
    """

    variations: typing_extensions.NotRequired[typing.Optional[typing.Sequence["CatalogObjectParams"]]]
    """
    A list of [CatalogItemVariation](entity:CatalogItemVariation) objects for this item. An item must have
    at least one variation.
    """

    product_type: typing_extensions.NotRequired[CatalogItemProductType]
    """
    The product type of the item. Once set, the `product_type` value cannot be modified.
    
    Items of the `LEGACY_SQUARE_ONLINE_SERVICE` and `LEGACY_SQUARE_ONLINE_MEMBERSHIP` product types can be updated
    but cannot be created using the API.
    See [CatalogItemProductType](#type-catalogitemproducttype) for possible values
    """

    skip_modifier_screen: typing_extensions.NotRequired[typing.Optional[bool]]
    """
    If `false`, the Square Point of Sale app will present the `CatalogItem`'s
    details screen immediately, allowing the merchant to choose `CatalogModifier`s
    before adding the item to the cart.  This is the default behavior.
    
    If `true`, the Square Point of Sale app will immediately add the item to the cart with the pre-selected
    modifiers, and merchants can edit modifiers by drilling down onto the item's details.
    
    Third-party clients are encouraged to implement similar behaviors.
    """

    item_options: typing_extensions.NotRequired[typing.Optional[typing.Sequence[CatalogItemOptionForItemParams]]]
    """
    List of item options IDs for this item. Used to manage and group item
    variations in a specified order.
    
    Maximum: 6 item options.
    """

    ecom_uri: typing_extensions.NotRequired[typing.Optional[str]]
    """
    Deprecated. A URI pointing to a published e-commerce product page for the Item.
    """

    ecom_image_uris: typing_extensions.NotRequired[typing.Optional[typing.Sequence[str]]]
    """
    Deprecated. A comma-separated list of encoded URIs pointing to a set of published e-commerce images for the Item.
    """

    image_ids: typing_extensions.NotRequired[typing.Optional[typing.Sequence[str]]]
    """
    The IDs of images associated with this `CatalogItem` instance.
    These images will be shown to customers in Square Online Store.
    The first image will show up as the icon for this item in POS.
    """

    sort_name: typing_extensions.NotRequired[typing.Optional[str]]
    """
    A name to sort the item by. If this name is unspecified, namely, the `sort_name` field is absent, the regular `name` field is used for sorting.
    Its value must not be empty.
    
    It is currently supported for sellers of the Japanese locale only.
    """

    categories: typing_extensions.NotRequired[typing.Optional[typing.Sequence[CatalogObjectCategoryParams]]]
    """
    The list of categories.
    """

    description_html: typing_extensions.NotRequired[typing.Optional[str]]
    """
    The item's description as expressed in valid HTML elements. The length of this field value, including those of HTML tags,
    is of Unicode points. With application query filters, the text values of the HTML elements and attributes are searchable. Invalid or
    unsupported HTML elements or attributes are ignored.
    
    Supported HTML elements include:
    - `a`: Link. Supports linking to website URLs, email address, and telephone numbers.
    - `b`, `strong`:  Bold text
    - `br`: Line break
    - `code`: Computer code
    - `div`: Section
    - `h1-h6`: Headings
    - `i`, `em`: Italics
    - `li`: List element
    - `ol`: Numbered list
    - `p`: Paragraph
    - `ul`: Bullet list
    - `u`: Underline
    
    
    Supported HTML attributes include:
    - `align`: Alignment of the text content
    - `href`: Link destination
    - `rel`: Relationship between link's target and source
    - `target`: Place to open the linked document
    """

    description_plaintext: typing_extensions.NotRequired[str]
    """
    A server-generated plaintext version of the `description_html` field, without formatting tags.
    """

    channels: typing_extensions.NotRequired[typing.Optional[typing.Sequence[str]]]
    """
    A list of IDs representing channels, such as a Square Online site, where the item can be made visible or available.
    This field is read only and cannot be edited.
    """

    is_archived: typing_extensions.NotRequired[typing.Optional[bool]]
    """
    Indicates whether this item is archived (`true`) or not (`false`).
    """

    ecom_seo_data: typing_extensions.NotRequired[CatalogEcomSeoDataParams]
    """
    The SEO data for a seller's Square Online store.
    """

    food_and_beverage_details: typing_extensions.NotRequired[CatalogItemFoodAndBeverageDetailsParams]
    """
    The food and beverage-specific details for the `FOOD_AND_BEV` item.
    """

    reporting_category: typing_extensions.NotRequired[CatalogObjectCategoryParams]
    """
    The item's reporting category.
    """

    is_alcoholic: typing_extensions.NotRequired[typing.Optional[bool]]
    """
    Indicates whether this item is alcoholic (`true`) or not (`false`).
    """
