> 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-customer/structure.md).

# Internal Structure

## Class `CustomerQuery`

```javascript
import {CustomerQuery} from '@scandipwa/shopify-customer/src/api/Customer.query.js'
```

**Description:** Customer query declaration. 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**: `ShopifyCustomer/Api/Customer/Query/CustomerQuery`

### Method `_getCustomerFields`

**Description:** Function that returns the list of customer fields. Read more: [Extending Query controllers](https://app.gitbook.com/@scandipwa/s/shopify/solutions/query-controller#extension)

### Method `getCustomerAccessTokenCreateField`

**Description:** Field getter for access token creation \[returns node]

### Method `getCustomerAccessTokenDeleteField`

**Description:** Field getter for access token removal \[returns node]

### Method `getCustomerCreateField`

**Description:** Customer create field getter \[returns node]

### Method `getCustomerField`

**Description:** Field getter for customer get \[returns node]

## Function `processCustomer`

```javascript
import {processCustomer} from '@scandipwa/shopify-customer/src/api/Customer.processor.js'
```

**Description:** Single customer processor.

**Namespace**: `ShopifyCustomer/Api/Customer/Processor/processCustomer`

**🔮 Common extension point:** Process newly added fields.

```javascript
{
    'ShopifyCustomer/Api/Customer/Processor/processCustomer': {
        'function': ([customer], callback) => {
                 customer.addresses = customer.addresses.edges.map({ node } => node);
            }
    }
}
```

## Variable `CUSTOMER_CREATE`

```javascript
import {CUSTOMER_CREATE} from '@scandipwa/shopify-customer/src/api/Customer.query.js'
```

**Description:** A type of `CustomerQuery` associated with `getCustomerCreateField` function.

**Usage examples:**

```javascript
// Returns getter of customer create mutation
import getCustomerQueryByType, { CUSTOMER_CREATE } from '@scandipwa/shopify-customer/src/api/Customer.query.js';
const queryGetter = getCustomerQueryByType(CUSTOMER_CREATE);
```

## Variable `CUSTOMER_GET`

```javascript
import {CUSTOMER_GET} from '@scandipwa/shopify-customer/src/api/Customer.query.js'
```

**Description:** A type of `CustomerQuery` associated with `getCustomerField` function.

**Usage examples:**

```javascript
// Returns getter of customer get query
import getCustomerQueryByType, { CUSTOMER_GET } from '@scandipwa/shopify-customer/src/api/Customer.query.js';
const queryGetter = getCustomerQueryByType(CUSTOMER_GET);
```

## Variable `CUSTOMER_LOGIN`

```javascript
import {CUSTOMER_LOGIN} from '@scandipwa/shopify-customer/src/api/Customer.query.js'
```

**Description:** A type of `CustomerQuery` associated with `getCustomerAccessTokenCreateField` function.

**Usage examples:**

```javascript
// Returns getter of customer login query
import getCustomerQueryByType, { CUSTOMER_LOGIN } from '@scandipwa/shopify-customer/src/api/Customer.query.js';
const queryGetter = getCustomerQueryByType(CUSTOMER_LOGIN);
```

## Variable `CUSTOMER_LOGOUT`

```javascript
import {CUSTOMER_LOGOUT} from '@scandipwa/shopify-customer/src/api/Customer.query.js'
```

**Description:** A type of `CustomerQuery` associated with `getCustomerAccessTokenDeleteField` function.

**Usage examples:**

```javascript
// Returns getter of customer logout mutation
import getCustomerQueryByType, { CUSTOMER_LOGOUT } from '@scandipwa/shopify-customer/src/api/Customer.query.js';
const queryGetter = getCustomerQueryByType(CUSTOMER_LOGOUT);
```

## Class `AccountDetailsComponent`

```javascript
import {AccountDetailsComponent} from '@scandipwa/shopify-customer/src/component/AccountDetails/AccountDetails.component.js'
```

**Description:** Account details component

**Namespace**: `ShopifyCustomer/Component/AccountDetails/Component/AccountDetailsComponent`

### Member `detailsRenderMap`

**Description:** A list of render methods used by account details component. Read more: [SortedRenderMap](/shopify/solutions/sortedmap-and-sortedrendermap.md)

## Function `AccountFallbackPage`

```javascript
import {AccountFallbackPage} from '@scandipwa/shopify-customer/src/component/AccountFallbackPage/index.js'
```

**Description:** A component used as fallback while the account details component is loading

**Namespace**: `ShopifyCustomer/Component/AccountFallbackPage/Index/AccountFallbackPage`

## Class `AccountPageComponent`

```javascript
import {AccountPageComponent} from '@scandipwa/shopify-customer/src/component/AccountPage/AccountPage.component.js'
```

**Description:** Account page component

**Namespace**: `ShopifyCustomer/Component/AccountPage/Component/AccountPageComponent`

### Member `contentRenderMap`

**Description:** A list of render methods used by account page. Read more: [SortedRenderMap](/shopify/solutions/sortedmap-and-sortedrendermap.md)

## Class `AccountPageContainer`

```javascript
import {AccountPageContainer} from '@scandipwa/shopify-customer/src/component/AccountPage/AccountPage.container.js'
```

**Description:** Account page container. Used to setup a redirect in case user is not logged in.

**Namespace**: `ShopifyCustomer/Component/AccountPage/Container/AccountPageContainer`

## Function `LoginFallbackPage`

```javascript
import {LoginFallbackPage} from '@scandipwa/shopify-customer/src/component/LoginFallbackPage/index.js'
```

**Description:** A component used as fallback while the login page is loading

**Namespace**: `ShopifyCustomer/Component/LoginFallbackPage/Index/LoginFallbackPage`

## Class `LoginFormComponent`

```javascript
import {LoginFormComponent} from '@scandipwa/shopify-customer/src/component/LoginForm/LoginForm.component.js'
```

**Description:** Login form component

**Namespace**: `ShopifyCustomer/Component/LoginForm/Component/LoginFormComponent`

### Member `contentRenderMap`

**Description:** A list of render methods used by login form component. Read more: [SortedRenderMap](/shopify/solutions/sortedmap-and-sortedrendermap.md)

### Member `formFieldsRenderMap`

**Description:** A list of field render methods used by the login form. Read more: [SortedRenderMap](/shopify/solutions/sortedmap-and-sortedrendermap.md)

## Class `LoginFormContainer`

```javascript
import {LoginFormContainer} from '@scandipwa/shopify-customer/src/component/LoginForm/LoginForm.container.js'
```

**Description:** Login form container. Used to define handlers for form operations.

**Namespace**: `ShopifyCustomer/Component/LoginForm/Container/LoginFormContainer`

## Class `LoginPageComponent`

```javascript
import {LoginPageComponent} from '@scandipwa/shopify-customer/src/component/LoginPage/LoginPage.component.js'
```

**Description:** Login page component.

**Namespace**: `ShopifyCustomer/Component/LoginPage/Component/LoginPageComponent`

## Function `RegisterFallbackPage`

```javascript
import {RegisterFallbackPage} from '@scandipwa/shopify-customer/src/component/RegisterFallbackPage/index.js'
```

**Description:** A component used as fallback while the register page is loading

**Namespace**: `ShopifyCustomer/Component/RegisterFallbackPage/Index/RegisterFallbackPage`

## Class `RegisterFormContainer`

```javascript
import {RegisterFormContainer} from '@scandipwa/shopify-customer/src/component/RegisterForm/RegisterForm.container.js'
```

**Description:** Reginster form container. Used to define handlers for form operations.

**Namespace**: `ShopifyCustomer/Component/RegisterForm/Container/RegisterFormContainer`

## Class `RegisterPageComponent`

```javascript
import {RegisterPageComponent} from '@scandipwa/shopify-customer/src/component/RegisterPage/RegisterPage.component.js'
```

**Description:** Login page component.

**Namespace**: `ShopifyCustomer/Component/RegisterPage/Component/RegisterPageComponent`

{% 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 %}
