> For the complete documentation index, see [llms.txt](https://scandipwa.gitbook.io/shopify/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://scandipwa.gitbook.io/shopify/packages/shopify-checkout-line-items/structure.md).

# Internal Structure

## Class `CheckoutLineItemsQuery`

```javascript
import {CheckoutLineItemsQuery} from '@scandipwa/shopify-checkout-line-items/src/api/CheckoutLineItems.query.js'
```

**Description:** Query declaration for Checkout line items. Read more: [Query controller](https://app.gitbook.com/@scandipwa/s/shopify/solutions/query-controller), [TypedQuery](https://app.gitbook.com/@scandipwa/s/shopify/solutions/query-controller#typedquery)

**Namespace**: `ShopifyCheckoutLineItems/Api/CheckoutLineItems/Query/CheckoutLineItemsQuery`

### Method `getCheckoutLineItemsField`

**Description:** Get line items in checkout query getter \[returns node]

### Method `getLineItemsAddField`

**Description:** Add line items to checkout mutation getter \[returns node]

### Method `getLineItemsRemoveField`

**Description:** Remove line items from checkout mutation getter \[returns node]

### Method `getLineItemsUpdateField`

**Description:** Update line items in checkout mutation getter \[returns node]

## Variable `ADD_LINE_ITEMS`

```javascript
import {ADD_LINE_ITEMS} from '@scandipwa/shopify-checkout-line-items/src/api/CheckoutLineItems.query.js'
```

**Description:** A type of `CheckoutLineItemsQuery` associated with `getLineItemsAddField` function.

**Usage examples:**

```javascript
// Returns getter of add checkout line item mutation fields.
import getCheckoutLineItemsQueryByType, { ADD_LINE_ITEMS } from '@scandipwa/shopify-checkout-line-items/src/api/CheckoutLineItems.query.js';
const queryGetter = getCheckoutLineItemsQueryByType(ADD_LINE_ITEMS);
```

## Variable `CHECKOUT_LINE_ITEMS`

```javascript
import {CHECKOUT_LINE_ITEMS} from '@scandipwa/shopify-checkout-line-items/src/api/CheckoutLineItems.query.js'
```

**Description:** A type of `CheckoutLineItemsQuery` associated with `getCheckoutLineItemsField` function.

**Usage examples:**

```javascript
// Returns getter of checkout line item fields.
import getCheckoutLineItemsQueryByType, { CHECKOUT_LINE_ITEMS } from '@scandipwa/shopify-checkout-line-items/src/api/CheckoutLineItems.query.js';
const queryGetter = getCheckoutLineItemsQueryByType(CHECKOUT_LINE_ITEMS);
```

## Variable `REMOVE_LINE_ITEMS`

```javascript
import {REMOVE_LINE_ITEMS} from '@scandipwa/shopify-checkout-line-items/src/api/CheckoutLineItems.query.js'
```

**Description:** A type of `CheckoutLineItemsQuery` associated with `getLineItemsRemoveField` function.

**Usage examples:**

```javascript
// Returns getter of remove checkout line item mutation fields.
import getCheckoutLineItemsQueryByType, { REMOVE_LINE_ITEMS } from '@scandipwa/shopify-checkout-line-items/src/api/CheckoutLineItems.query.js';
const queryGetter = getCheckoutLineItemsQueryByType(REMOVE_LINE_ITEMS);
```

## Variable `UPDATE_LINE_ITEMS`

```javascript
import {UPDATE_LINE_ITEMS} from '@scandipwa/shopify-checkout-line-items/src/api/CheckoutLineItems.query.js'
```

**Description:** A type of `CheckoutLineItemsQuery` associated with `getLineItemsUpdateField` function.

**Usage examples:**

```javascript
// Returns getter of update checkout line item mutation fields.
import getCheckoutLineItemsQueryByType, { UPDATE_LINE_ITEMS } from '@scandipwa/shopify-checkout-line-items/src/api/CheckoutLineItems.query.js';
const queryGetter = getCheckoutLineItemsQueryByType(UPDATE_LINE_ITEMS);
```

## Class `LineItemComponent`

```javascript
import {LineItemComponent} from '@scandipwa/shopify-checkout-line-items/src/component/LineItem/LineItem.component.js'
```

**Description:** Line Item component

**Namespace**: `ShopifyCheckoutLineItems/Component/LineItem/Component/LineItemComponent`

### Member `sortedRenderMap`

**Description:** The list of elements to be displayed in the line item block. Read more: [SortedRenderMap](/shopify/solutions/sortedmap-and-sortedrendermap.md)

## Class `LineItemContainer`

```javascript
import {LineItemContainer} from '@scandipwa/shopify-checkout-line-items/src/component/LineItem/LineItem.container.js'
```

**Description:** Line item block container. Used to initialize the Line Items Context.

**Namespace**: `ShopifyCheckoutLineItems/Component/LineItem/Container/LineItemContainer`

## Function `LineItemFallback`

```javascript
import {LineItemFallback} from '@scandipwa/shopify-checkout-line-items/src/component/LineItemFallback/index.js'
```

**Description:** The component to be used as fallback while the line item block is loading

**Namespace**: `ShopifyCheckoutLineItems/Component/LineItemFallback/Index/LineItemFallback`

## Class `LineItemPriceComponent`

```javascript
import {LineItemPriceComponent} from '@scandipwa/shopify-checkout-line-items/src/component/LineItemPrice/LineItemPrice.component.js'
```

**Description:** Line item price component

**Namespace**: `ShopifyCheckoutLineItems/Component/LineItemPrice/Component/LineItemPriceComponent`

## Class `LineItemQuantityComponent`

```javascript
import {LineItemQuantityComponent} from '@scandipwa/shopify-checkout-line-items/src/component/LineItemQuantity/LineItemQuantity.component.js'
```

**Description:** Line item quantity component.

**Namespace**: `ShopifyCheckoutLineItems/Component/LineItemQuantity/Component/LineItemQuantityComponent`

## Class `LineItemQuantityContainer`

```javascript
import {LineItemQuantityContainer} from '@scandipwa/shopify-checkout-line-items/src/component/LineItemQuantity/LineItemQuantity.container.js'
```

**Description:** Conainer for line item block. Used to define event handlers and other logic.

**Namespace**: `ShopifyCheckoutLineItems/Component/LineItemQuantity/Container/LineItemQuantityContainer`

## Class `LineItemsComponent`

```javascript
import {LineItemsComponent} from '@scandipwa/shopify-checkout-line-items/src/component/LineItems/LineItems.component.js'
```

**Description:** Line items component. Used to render a list of line items.

**Namespace**: `ShopifyCheckoutLineItems/Component/LineItems/Component/LineItemsComponent`

## Class `LineItemsProvider`

```javascript
import {LineItemsProvider} from '@scandipwa/shopify-checkout-line-items/src/context/LineItems.provider.js'
```

**Description:** Provider class for Line Items Context. Used to make line item data available to all children components.

**Namespace**: `ShopifyCheckoutLineItems/Context/LineItems/Provider/LineItemsProvider`

### Method `getContextValue`

**Description:** A function which returns an object that will be visible in the Line Item Context

**🔮 Common extension point:** Add more fields to Line Item Context.

```javascript
{
    'ShopifyCheckoutLineItems/Context/LineItems/Provider/LineItemsProvider': {
        'member-function': {
            'getContextValue': (args, callback, instance) => ({
                     ...args,
                     isLineItemLoaded: !!instance.props.lineItem
                })
        }
    }
}
```

{% hint style="danger" %}

### **This page is automatically generated**

All modification will be erased during the next deployment. If you intend to modify the contents, please refer to the source-code.
{% endhint %}
