# Module: types

### Type Definitions

#### Cart

##### Type:

- Object

##### Properties:

Name | Type | Description
--- | --- | ---
`id` | String | The cart id.
`customerInfo` | module:types.CustomerInformation | The information about the cart owner.
`items` | Array.<module:types.CartItem> | The cart items.
`shippingAddress` | module:types.OrderAddress | The destination shipping address.
`billingAddress` | module:types.OrderAddress | The billing address.
`shippingMethods` | Array.<module:types.ShippingMethod> | All the possible shipping methods for the cart.
`paymentMethods` | Array.<module:types.PaymentMethod> | All the possible payment methods for the cart.
`selectedShippingMethodId` | String | The selected shipping method for the cart.
`payments` | Array.<module:types.Payment> | All the current payments applied to the cart (such as credit card or gift card).
`couponEntries` | Array.<module:types.CouponEntry> | All the current coupons applied to the cart.
`subtotal` | Number | The subtotal before shipping, discounts, and tax.
`shipping` | Number | The shipping cost.
`discounts` | Number | The total of all discounts applied to the cart.
`tax` | Number | The total tax of the cart.
`total` | Number | The total cost of all the items in the cart after discounts, shipping, and tax.

Source:
  - types/cart.js, line 14

#### CartItem

##### Type:

- Object

##### Properties:

Name | Type | Description
--- | --- | ---
`id` | String | The cart id.
`productId` | String | The product id.
`productName` | String | The product name.
`quantity` | module:types.PositiveInteger | The quantity of this product in the cart.
`baseItemPrice` | Number | The price for one unit of this product before discounts.
`baseLinePrice` | Number | The price for all units of this product before discounts (usually baseItemPrice multiplied by quantity).
`itemPrice` | Number | The price for one unit of this product after discounts.
`linePrice` | Number | The price for all units of this product in the cart, after discounts (usually baseItemPrice multiplied by quantity).

Source:
  - types/cart-item.js, line 8

#### Category

##### Type:

- Object

##### Properties:

Name | Type | Description
--- | --- | ---
`id` | String | The category id.
`name` | String | The category name.
`description` | String | The category description.
`thumbnailImage` | module:types.Image | The category thumbnail image.
`backgroundImage` | module:types.Image | The category background image.
`categories` | Array.<module:types.Category> | The subcategories.

Source:
  - types/category.js, line 16

#### CategoryList

##### Type:

- Object

##### Properties:

Name | Type | Description
--- | --- | ---
`data` | Array.<module:types.Category> |
`count` | Number |
`total` | Number |

Source:
  - types/category-list.js, line 8

#### CountryCode

##### Type:

- String

Source:
  - types/country-code.js, line 8

#### CouponEntry

##### Type:

- Object

##### Properties:

Name | Type | Description
--- | --- | ---
`id` | String | The coupon id.
`active` | Boolean | The coupon status, whether it's active or not.
`code` | String | The coupon code.
`name` | String | The coupon name.
`description` | String | The coupon description.

Source:
  - types/coupon-entry.js, line 7

#### Customer

##### Type:

- Object

##### Properties:

Name | Type | Description
--- | --- | ---
`id` | String | The customer's id.
`firstName` | String | The customer's first name.
`lastName` | String | The customer's last name.
`email` | String | The customer's email address.

Source:
  - types/customer.js, line 7

#### CustomerInformation

##### Type:

- Object

##### Properties:

Name | Type | Description
--- | --- | ---
`id` | String | The customer id.
`email` | module:types.Email | The customer's email.

Source:
  - types/customer-info.js, line 8

#### CustomerRegistration

##### Type:

- Object

##### Properties:

Name | Type | Description
--- | --- | ---
`firstName` | String | The customer's first name.
`lastName` | String | The customer's last name.
`email` | String | The customer's email address.
`password` | String | The customer's password.

Source:
  - types/customer-registration.js, line 7

#### Email

##### Type:

- String

Source:
  - types/email.js, line 7

#### Filter

##### Type:

- Object

##### Properties:

Name | Type | Description
--- | --- | ---
`propertyId` | String | The filter's property id. (For example, color or size.)
`label` | String | The filter's text used for labels. (For example, the filter color may have a label attribute of "Color".)
`values` | Array.<module:types.FilterValue> | The filter values.

Source:
  - types/filter.js, line 8

#### FilterValue

##### Type:

- Object

##### Properties:

Name | Type | Description
--- | --- | ---
`count` | module:types.Integer | The filter value hit count. (For example, 10.)
`label` | String | The filter value label text (For example, 'Red'.)
`value` | String | The filter value (For example, 'red'.)

Source:
  - types/filter-value.js, line 8

#### HybrisCustomerRegistration

##### Type:

- Object

##### Properties:

Name | Type | Description
--- | --- | ---
`firstName` | String | The customer's first name.
`lastName` | String | The customer's last name.
`email` | String | The customer's email address.
`password` | String | The customer's password.
`titleCode` | String | The customer's title, such as Mr. or Mrs.

Source:
  - types/customer-registration.js, line 24

#### Image

##### Type:

- Object

##### Properties:

Name | Type | Description
--- | --- | ---
`alt` | String | The image alt text.
`description` | String | The image description.
`src` | String | The image src.
`title` | String | The image title.

Source:
  - types/image.js, line 7

#### ImageSet

##### Type:

- Object

##### Properties:

Name | Type | Description
--- | --- | ---
`images` | Array.<module:types.Image> | The images.
`variationProperties` | Array.<module:types.VariationProperty> | The variation properties that apply to the images.
`sizeType` | String | The images size type (such as 'small', 'medium', 'large', or 'swatch').

Source:
  - types/image-set.js, line 9

#### Integer

##### Type:

- Number

Source:
  - types/integer.js, line 6

#### Latitude

##### Type:

- Number

Source:
  - types/latitude.js, line 5

#### Link

##### Type:

- Object

##### Properties:

Name | Type | Description
--- | --- | ---
`href` | module:types.URL | The link's url.
`text` | String | The link's text.
`title` | String | The link's title.

Source:
  - types/link.js, line 8

#### Longitude

##### Type:

- Number

Source:
  - types/longitude.js, line 6

#### Order

##### Type:

- Object

##### Properties:

Name | Type | Description
--- | --- | ---
`id` | String | The order id.
`creationDate` | String | The date when the order was created.
`status` | String | The status of the order (such as validated, processed, shipped, or cancelled).
`customerInfo` | module:types.CustomerInformation | Information about the customer.
`items` | Array.<module:types.CartItem> | The order items.
`shippingAddress` | module:types.OrderAddress | The order's destination shipping address.
`billingAddress` | module:types.OrderAddress | The order's billing address.
`selectedShippingMethodId` | String | The selected shipping method for the order.
`payments` | Array.<module:types.Payment> | All the current payments for the order.
`subtotal` | Number | The subtotal before shipping, discounts, and tax.
`shipping` | Number | The shipping cost.
`discounts` | Number | The total discounts applied to the order.
`tax` | Number | The order's total tax.
`total` | Number | The order's total cost after discounts, shipping, and tax.

Source:
  - types/order.js, line 11

#### OrderAddress

##### Type:

- Object

##### Properties:

Name | Type | Description
--- | --- | ---
`id` | String | The id of the order address.
`titleCode` | String | The title code of the customer. (For example, 'Mr.' or 'Mrs.'.)
`firstName` | String | The customer's first name.
`lastName` | String | The customer's last name.
`phone` | module:types.PhoneNumber | The customer's phone number.
`addressLine1` | String | The customer's street name, street number, and suite/unit.
`addressLine2` | String | Any additional addressing information. (For example, a company name, or "Attn:".)
`countryCode` | module:types.CountryCode | The country code.
`stateCode` | String | The state code.
`city` | String | The city name.
`postalCode` | module:types.PostalCode | The postal code.

Source:
  - types/order-address.js, line 10

#### OrderList

##### Type:

- Object

##### Properties:

Name | Type | Description
--- | --- | ---
`count.` | Number |
`data.` | Array.<module:types.Product> |
`total.` | Number |

Source:
  - types/order-list.js, line 8

#### Payment

##### Type:

- Object

##### Properties:

Name | Type | Description
--- | --- | ---
`id` | String | The payment id.
`amount` | Number | The payment amount.
`methodId` | String | The payment method id.
`details` | module:types.PaymentDetails | The customer's payment details for the specified payment method.

Source:
  - types/payment.js, line 8

#### PaymentDetails

Details of the payment method (such as credit card, Paypal, or gift card).

##### Type:

- Object

##### Properties:

Name | Type | Description
--- | --- | ---
`type` | String | The type of payment method (such as Visa or Mastercard).
`holderName` | String | The name of the account holder.
`number` | String | The card/account number or code (such as credit card number, or gift card code).
`maskedNumber` | String | The card/account number or code, masked.
`username` | String | The card/account username. (For example, Paypal username.)
`expiryMonth` | module:types.PositiveInteger | The month when the card/account expires, in number form.
`expiryYear` | module:types.PositiveInteger | The year when the card/account expires.
`ccv` | String | The credit card's cvv (card verification value).

Source:
  - types/payment-details.js, line 8

#### PaymentMethod

##### Type:

- Object

##### Properties:

Name | Type | Description
--- | --- | ---
`id` | String | The payment method id.
`name` | String | The payment method name.
`types` | Array.<Object> | The different types of the particular payment method. (For example, a credit card payment method can have types Visa and Mastercard.)

Source:
  - types/payment-method.js, line 7

#### PhoneNumber

##### Type:

- String

Source:
  - types/phone-number.js, line 6

#### PositiveInteger

##### Type:

- Number

Source:
  - types/positive-integer.js, line 6

#### PostalCode

##### Type:

- String

Source:
  - types/postal-code.js, line 8

#### Product

##### Type:

- Object

##### Properties:

Name | Type | Description
--- | --- | ---
`id` | String | The product id.
`name` | String | The product name.
`imageSets` | Array.<module:types.ImageSet> | The product's image-sets.
`description` | String | The product's description.
`categoryId` | String | The product's main category id.
`brand` | String | The product's brand name.
`minimumOrderQuantity` | module:types.Integer | The product's minimum order quantity.
`stepQuantity` | module:types.Integer | The product's step quantity.
`upc` | String | The product's universal product code.
`unit` | String | The product's units, such as 'each', 'ea', or 'pair'.
`price` | Number | The default price.
`prices` | Object | The map of price type label and value. For example: {'Regular': 99.99, 'Sale': 69.99}
`variations` | Array.<module:types.Variation> | The different variations of the product.
`variationProperties` | Array.<module:types.VariationProperty> | All the product variations' different properties.
`variationValues` | Object | The product's property values.

Source:
  - types/product.js, line 11

#### ProductList

##### Type:

- Object

##### Properties:

Name | Type | Description
--- | --- | ---
`count.` | Number |
`data.` | Array.<module:types.Product> |
`total.` | Number |

Source:
  - types/product-list.js, line 8

#### ProductSearch

##### Type:

- Object

##### Properties:

Name | Type | Description
--- | --- | ---
`count` | module:types.Integer | The number of products returned.
`filters` | Array.<module:types.Filter> | The available search filters.
`results` | Array.<module:types.ProductSearchResult> | The product search results.
`query` | String | The search query.
`selectedFilters` | Object | The selected filters applied to the results as a propertyId and value map.
`selectedSortingOption` | String | The selected sorting option. NOTE: Only single sorting is supported.
`sortingOptions` | Array.<module:types.SortOption> | The available sorting options.
`start` | module:types.Integer | The search start index.
`total` | module:types.Integer | The search hit count.

Source:
  - types/product-search.js, line 11

#### ProductSearchRequest

##### Type:

- Object

##### Properties:

Name | Type | Description
--- | --- | ---
`count` | module:types.Integer | The number of products to return.
`filters` | Object | The search result filters.
`query` | String | The search query.
`start` | module:types.Integer | The starting position.
`sort` | String | The sorting method.

Source:
  - types/product-search-request.js, line 8

#### ProductSearchResult

##### Type:

- Object

##### Properties:

Name | Type | Description
--- | --- | ---
`available` | Boolean | Whether the product is available for order.
`productId` | String | The product id.
`productName` | String | The product name.
`price` | Number | The product price.
`rating` | Number | The product rating.
`defaultImage` | module:types.Image | The product main image.
`variationProperties` | Array.<module:types.VariationProperty> | The product variations.

Source:
  - types/product-search-result.js, line 9

#### ShippingMethod

##### Type:

- Object

##### Properties:

Name | Type | Description
--- | --- | ---
`id` | String | The shipping method id.
`name` | String | The shipping method name.
`cost` | Number | The cost of shipping.

Source:
  - types/shipping-method.js, line 6

#### SortOption

##### Type:

- Object

##### Properties:

Name | Type | Description
--- | --- | ---
`id` | String | The unique sort identifier.
`label` | String | The sort label.

Source:
  - types/sort-option.js, line 7

#### Store

##### Type:

- Object

##### Properties:

Name | Type | Description
--- | --- | ---
`addressLine1` | String | The store address.
`addressLine2` | String | A secondary store address.
`city` | String | The city where the store is located.
`country` | String | The country where the store is located.
`description` | String | The store description.
`features` | String | The various features of a store.
`email` | String | The store email.
`id` | String | The store unique identifier.
`name` | String | The store name.
`phone` | String | The store phone number.
`postalCode` | String | The store postal code.
`hours` | String | The store hours.
`images` | String | The store logo.

Source:
  - types/store.js, line 11

#### StoreSearchRequest

##### Type:

- Object

##### Properties:

Name | Type | Description
--- | --- | ---
`count` | module:types.Integer | The number of stores to return. Default is 20.
`start` | module:types.Integer | The zero-based index page number. Default is 0.
`latlon` | Object | The geographic coordinates informing the store search location. ###### Properties
Name | Type | Description
--- | --- | ---
`latitude` | module:types.Latitude |
`Longitude` | module:types.Longitude |

Source:
  - types/store-search-request.js, line 7

#### StoreSearchResult

##### Type:

- Object

##### Properties:

Name | Type | Description
--- | --- | ---
`count` | module:types.Integer | The number of stores returned.
`start` | module:types.Integer | A zero-based index page number.
`total` | module:types.Integer | The total number of search hits.
`stores` | Array.<module:types.Store> | The list of stores returned.

Source:
  - types/store-search-result.js, line 8

#### URL

##### Type:

- String

Source:
  - types/url.js, line 8

#### Variation

##### Type:

- Object

##### Properties:

Name | Type | Description
--- | --- | ---
`id` | String | The variation id (NOTE: In some cases this value may have to be generated).
`price` | Number | The product price.
`orderable` | Boolean | Whether this variation of the product can be ordered.
`values` | Object | The variation values.

Source:
  - types/variation.js, line 7

#### VariationProperty

Represents things like "color", "size", "width", etc.

##### Type:

- Object

##### Properties:

Name | Type | Description
--- | --- | ---
`id` | String | The variation property id.
`label` | String | The variation property label.
`values` | Array.<module:types.VariationPropertyValue> | The variation property values.

Source:
  - types/variation-property.js, line 8

#### VariationPropertyValue

Represents values for properties (e.g. size property would have the individual sizes).

##### Type:

- Object

##### Properties:

Name | Type | Description
--- | --- | ---
`name` | String |
`value` | String |
`mainImage` | Image |
`swatchImage` | Image |

Source:
  - types/variation-property-value.js, line 8