diff --git a/.all-contributorsrc b/.all-contributorsrc
index 944b65f28..8b7a1f4fa 100644
--- a/.all-contributorsrc
+++ b/.all-contributorsrc
@@ -75,7 +75,8 @@
"avatar_url": "https://avatars.githubusercontent.com/u/789614?v=4",
"profile": "https://github.com/KevinGorjan",
"contributions": [
- "code"
+ "code",
+ "doc"
]
},
{
@@ -84,7 +85,11 @@
"avatar_url": "https://avatars.githubusercontent.com/u/16045377?v=4",
"profile": "https://github.com/bartoszherba",
"contributions": [
- "code"
+ "code",
+ "doc",
+ "maintenance",
+ "mentoring",
+ "review"
]
},
{
@@ -94,7 +99,13 @@
"profile": "https://github.com/Frodigo",
"contributions": [
"code",
- "projectManagement"
+ "projectManagement",
+ "business",
+ "doc",
+ "ideas",
+ "maintenance",
+ "mentoring",
+ "review"
]
},
{
@@ -116,7 +127,8 @@
"contributions": [
"question",
"mentoring",
- "review"
+ "review",
+ "doc"
]
},
{
@@ -158,6 +170,42 @@
"contributions": [
"code"
]
+ },
+ {
+ "login": "sethidden",
+ "name": "Artur Tagisow",
+ "avatar_url": "https://avatars.githubusercontent.com/u/5359825?v=4",
+ "profile": "https://github.com/sethidden",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "jonathanribas",
+ "name": "Jonathan Ribas",
+ "avatar_url": "https://avatars.githubusercontent.com/u/3003782?v=4",
+ "profile": "https://github.com/jonathanribas",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "Aliaaaam",
+ "name": "Ali Ghanei",
+ "avatar_url": "https://avatars.githubusercontent.com/u/88658555?v=4",
+ "profile": "https://github.com/Aliaaaam",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "mayashavin",
+ "name": "Maya Shavin",
+ "avatar_url": "https://avatars.githubusercontent.com/u/6650139?v=4",
+ "profile": "https://github.com/mayashavin",
+ "contributions": [
+ "doc"
+ ]
}
],
"contributorsPerLine": 5
diff --git a/docs/guide/about.md b/docs/guide/about.md
index 44de0c09e..684a9f953 100644
--- a/docs/guide/about.md
+++ b/docs/guide/about.md
@@ -9,12 +9,12 @@
## Support
-If you have any questions about this integration we will be happy to answer them on `magento2-vsf2` channel on [our Discord](discord.vuestorefront.io).
+If you have any questions about this integration we will be happy to answer them on `magento2` channel on [our Discord](discord.vuestorefront.io).
## Contributors β¨
### Honorable Mentions
-
+- [Caravel x](https://www.caravelx.com/)
- [Cyberfuze](https://cyberfuze.com/)
- [Leonex](https://www.leonex.de/)
@@ -33,18 +33,24 @@ Thanks go to these wonderful people π:
 Patrick Monteiro π» |
-  Kevin Gorjan π» |
-  Bartosz Herba π» |
-  Marcin Kwiatkowski π» π |
+  Kevin Gorjan π» π |
+  Bartosz Herba π» π π§ π§βπ« π |
+  Marcin Kwiatkowski π» π πΌ π π€ π§ π§βπ« π |
 Filip Rakowski π¬ π§βπ« π |
-  Filip Sobol π¬ π§βπ« π |
+  Filip Sobol π¬ π§βπ« π π |
 Patryk Andrzejewski π¬ π§βπ« π |
 Renan Oliveira π§ π |
 Dominik Deimel π» π |
 Lior Lindvor π» |
+
+  Artur Tagisow π» |
+  Jonathan Ribas π» |
+  Ali Ghanei π» |
+  Maya Shavin π |
+
diff --git a/docs/guide/composables/use-addresses.md b/docs/guide/composables/use-addresses.md
deleted file mode 100644
index 5f5662cc5..000000000
--- a/docs/guide/composables/use-addresses.md
+++ /dev/null
@@ -1,29 +0,0 @@
-# useAddresses
-
-`useAddresses`:
-
-## API
-```typescript
-export interface UseAddresses extends Composable {
- error: ComputedProperty;
- loading: ComputedProperty;
- addresses: ComputedProperty;
- load: (loadParams?: LOAD_ADDRESS_PARAMS) => Promise,
- save: (saveParams: SAVE_ADDRESS_PARAMS) => Promise,
- remove: (removeParams: REMOVE_ADDRESS_PARAMS) => Promise,
- update: (updateParams: UPDATE_ADDRESS_PARAMS) => Promise,
-}
-```
-
-* `` -
-
-## Example
-
-```javascript
-```
diff --git a/docs/guide/composables/use-billing.md b/docs/guide/composables/use-billing.md
deleted file mode 100644
index ccf376c73..000000000
--- a/docs/guide/composables/use-billing.md
+++ /dev/null
@@ -1,113 +0,0 @@
-# useBilling
-
-## Features
-`useBilling` composable can be used to:
-* fetch existing billing addresses,
-* submit new billing addresses,
-* modify and delete existing billing addresses.
-
-## API
-
-### `load`
-Function that takes in `CustomQuery` as optional params and gets the `billing` accordingly
-
-### `billing`
-Returns `billing` as a `computed` property
-```typescript
-// packages/composables/src/composables/useBilling/index.ts
-export default useBillingFactory(factoryParams);
-
-// packages/api-client/src/types/GraphQL.ts
-interface BillingCartAddress {
- city: Scalars['String'];
- company?: Maybe;
- country: CartAddressCountry;
- firstname: Scalars['String'];
- lastname: Scalars['String'];
- postcode?: Maybe;
- region?: Maybe;
- street: Array>;
- telephone: Scalars['String'];
-}
-```
-
-### `save`
-Saves new address
-
-### `loading`
-Returns the `loading` state of `search`
-
-### `error`
-reactive object containing the error message, if search failed for any reason.
-
-## Getters
-* `getAddresses` - returns list of billing addresses.
-* `getDefault` - returns a default billing address.
-* `getTotal` - returns total number of billing addresses user has.
-* `getId` - returns id from an individual address.
-* `getPostCode` - returns post code from an individual address.
-* `getStreetName` - returns street name from an individual address.
-* `getStreetNumber` - returns street number from an individual address.
-* `getCity` - returns city name from an individual address.
-* `getFirstName` - returns first name from an individual address.
-* `getLastName` - returns last name from an individual address.
-* `getCountry` - returns country name from an individual address.
-* `getPhone` - return phone number from an individual address.
-* `getEmail` - returns e-mail address from an individual address.
-* `getProvince` - returns province (state) from an individual address.
-* `getCompanyName` - returns company name from an individual address.
-* `getTaxNumber` - returns tax number from an individual address.
-* `getApartmentNumber` - returns apartment number from an individual address.
-* `isDefault` - return information if address is current default.
-
-```typescript
-interface UserBillingGetters {
- getAddresses: (billing, criteria?: Record) => any[];
- getDefault: (billing) => any;
- getTotal: (billing) => number;
- getPostCode: (address) => string;
- getStreetName: (address) => string;
- getStreetNumber: (address) => string | number;
- getCity: (address) => string;
- getFirstName: (address) => string;
- getLastName: (address) => string;
- getCountry: (address) => string;
- getPhone: (address) => string;
- getEmail: (address) => string;
- getProvince: (address) => string;
- getCompanyName: (address) => string;
- getTaxNumber: (address) => string;
- getId: (address) => string;
- getApartmentNumber: (address) => string | number;
- isDefault: (address) => boolean;
-}
-```
-
-## Example
-
-```javascript
-import { onSSR } from '@vue-storefront/core';
-import { useBilling, userBillingGetters } from '@vue-storefront/magento';
-
-export default {
- setup() {
- const {
- billing,
- load,
- addAddress,
- deleteAddress,
- updateAddress
- } = useBilling();
-
- // If you're using Nuxt or any other framework for Universal Vue apps
- onSSR(async () => {
- await load();
- });
-
- return {
- billing: computed(() => userBillingGetters.getAddresses(billing.value)),
- userBillingGetters
- };
- }
-};
-```
diff --git a/docs/guide/composables/use-cart.md b/docs/guide/composables/use-cart.md
deleted file mode 100644
index df12e35b3..000000000
--- a/docs/guide/composables/use-cart.md
+++ /dev/null
@@ -1,186 +0,0 @@
-# useCart
-
-## Features
-`useCart` composable can be used to:
-* load cart information,
-* add, update and remove items in the cart,
-* applying and removing coupons,
-* checking if product is already added to the cart.
-
-## API
-```typescript
-interface UseCart {
- cart: ComputedProperty;
- setCart(cart: Cart): void;
- addItem(params: {
- product: Product;
- quantity: number;
- customQuery?: CustomQuery;
- }): Promise;
- isInCart: ({ product: Product }: {
- product: any;
- }) => boolean;
- removeItem(params: {
- product: CartItem;
- customQuery?: CustomQuery;
- }): Promise;
- updateItemQty(params: {
- product: CartItem;
- quantity?: number;
- customQuery?: CustomQuery;
- }): Promise;
- clear(): Promise;
- applyCoupon(params: {
- couponCode: string;
- customQuery?: CustomQuery;
- }): Promise;
- removeCoupon(params: {
- coupon: Coupon;
- customQuery?: CustomQuery;
- }): Promise;
- load(): Promise;
- load(params: {
- customQuery?: CustomQuery;
- }): Promise;
- error: ComputedProperty;
- loading: ComputedProperty;
-}
-
-export interface Cart {
- /**
- * An array of coupons that have been applied to the cart
- * @deprecated Use applied_coupons instead
- */
- applied_coupon?: Maybe;
- /** An array of `AppliedCoupon` objects. Each object contains the `code` text attribute, which specifies the coupon code */
- applied_coupons?: Maybe>>;
- /** Available payment methods */
- available_payment_methods?: Maybe>>;
- billing_address?: Maybe;
- email?: Maybe;
- /** The entered gift message for the cart */
- gift_message?: Maybe;
- /** The unique ID for a `Cart` object */
- id: Scalars['ID'];
- is_virtual: Scalars['Boolean'];
- items?: Maybe>>;
- prices?: Maybe;
- selected_payment_method?: Maybe;
- shipping_addresses: Array>;
- total_quantity: Scalars['Float'];
-}
-
-export interface CartItem {
- prices?: Maybe;
- product: ProductInterface;
- quantity: Scalars['Float'];
- /** The unique ID for a `CartItemInterface` object */
- uid: Scalars['ID'];
-}
-
-export interface Coupon {
- code: Scalars['String'];
-}
-
-```
-> For more information on [Product interface](use-product) visit the dedicated documentation.
-
-
-### `cart`
-Returns the Items in the Cart as a `computed` property
-
-### `setCart`
-set new Cart
-
-### `addItem`
-Function that takes in a `product` and its `quantity` and adds it to the cart
-
-### `isInCart`
-Function that takes in a `product` and returns `true` or `false`
-
-### `removeItem`
-Function that takes in a `product` and removes it from the `cart`
-
-### `updateItemQty`
-Function that takes in a `product` and its new `quantaty` and updates it accordingly
-
-### `clear`
-Function that clears cart
-
-### `applyCoupon`
-Function that takes in a `coupon` and applies it to the cart
-
-### `removeCoupon`
-Function that removes all applied coupons
-
-### `load`
-Function that loads the current `cart`
-
-### `error`
-reactive object containing the error message, if some properties failed for any reason.
-
-### `loading`
-a reactive object containing information about loading state of the cart.
-
-
-## Getters
-
-````typescript
-interface CartGetters {
- getItems: (cart: Cart) => CartItem[];
- getItemName: (cartItem: CartItem) => string;
- getItemImage: (cartItem: CartItem) => string;
- getItemPrice: (cartItem: CartItem) => AgnosticPrice;
- getItemQty: (cartItem: CartItem) => number;
- getItemAttributes: (
- cartItem: CartItem,
- _filterByAttributeName?: Array,
- ) => Record;
- getItemSku: (cartItem: CartItem) => string;
- getTotals: (cart: Cart) => AgnosticTotals;
- getShippingPrice: (cart: Cart) => number;
- getTotalItems: (cart: Cart) => number;
- getFormattedPrice: (price: number) => string;
- getCoupons: (cart: Cart) => AgnosticCoupon[];
- getDiscounts: (cart: Cart) => AgnosticDiscount[];
-}
-````
-
-* `getItems` - returns all items from cart.
-* `getItemName` - returns product name.
-* `getItemImage` - returns product image.
-* `getItemPrice` - returns product price.
-* `getItemQty` - returns product quantity.
-* `getItemAttributes` - returns product attribute.
-* `getItemSku` - returns product SKU.
-* `getTotals` - returns cart totals.
-* `getShippingPrice` - returns current shipping price.
-* `getTotalItems` - returns products amount.
-* `getFormattedPrice` - returns product price with currency sign.
-* `getCoupons` - returns applied coupons.
-* `getDiscounts` - returns all discounts.
-
-## Example
-
-```javascript
-import { useCart, cartGetters } from '@vue-storefront/magento';
-import { onSSR } from '@vue-storefront/core'
-
-export default {
- setup () {
- const { cart, removeItem, updateItemQty, load } = useCart();
-
- onSSR(async () => {
- await load();
- })
-
- return {
- removeItem,
- updateItemQty,
- products: computed(() => cartGetters.getItems(cart.value)),
- totals: computed(() => cartGetters.getTotals(cart.value)),
- totalItems: computed(() => cartGetters.getTotalItems(cart.value))
- }
- }
-}
-```
diff --git a/docs/guide/composables/use-category-search.md b/docs/guide/composables/use-category-search.md
deleted file mode 100644
index 6808916d3..000000000
--- a/docs/guide/composables/use-category-search.md
+++ /dev/null
@@ -1,63 +0,0 @@
-# useCategorySearch
-
-## Features
-`useCategorySearch` composable is responsible for fetching a list of categories based on search term provided. A common usage scenario for this composable is navigation subtrees.
-
-## API
-The `useCategorySearch` composable implements custom factory `useCategorySearchFactory` located in `packages/composables/src/factories/useCategorySearchFactory.ts` and returns `UseCategorySearch` interface:
-
-```typescript
-export interface UseCategorySearch {
- search: (params: { term: string }) => Promise;
- result: ComputedProperty;
- error: ComputedProperty;
- loading: ComputedProperty;
-}
-
-export interface UseCategorySearchErrors {
- search: Error;
-}
-```
-> For more information on [Category interface](use-category) visit the dedicated documentation.
-
-### `search`
-Function that takes `term` as search param and gets the `categories` accordingly
-
-### `result`
-Returns an array of categories fetched by `search` method as a `computed` property.
-See [useCategory](use-category.html) for more information on `categories` interface
-
-### `loading`
-Returns the current state of `search` as `computed` boolean property
-
-### `error`
-Reactive object containing the error message, if search failed for any reason.
-
-## Example
-```javascript
-import { onSSR } from '@vue-storefront/core';
-import { useCategorySearch } from '@vue-storefront/magento';
-
-export default {
- setup () {
- const {
- loading,
- error,
- result: categories,
- search: categoriesSearch,
- } = useCategorySearch('AppHeader:Categories');
-
- onSSR(async () => {
- await categoriesSearch({
- term: 'value',
- });
- });
-
- return {
- categories,
- loading,
- error,
- }
- }
-}
-```
diff --git a/docs/guide/composables/use-category.md b/docs/guide/composables/use-category.md
deleted file mode 100644
index 51c7a603e..000000000
--- a/docs/guide/composables/use-category.md
+++ /dev/null
@@ -1,142 +0,0 @@
-# useCategory
-
-## Features
-`useCategory` composable is responsible for fetching a list of categories. A common usage scenario for this composable is navigation.
-
-## API
-```typescript
-interface UseCategory {
- categories: ComputedProperty;
- search(params: ComposableFunctionArgs): Promise;
- loading: ComputedProperty;
- error: ComputedProperty;
-}
-
-export type CategoryListQueryVariables = Exact<{ [key: string]: never; }>;
-
-export interface Category {
- available_sort_by?: Maybe>>;
- /** Breadcrumbs, parent categories info. */
- breadcrumbs?: Maybe>>;
- /** Relative canonical URL. This value is returned only if the system setting 'Use Canonical Link Meta Tag For Categories' is enabled */
- canonical_url?: Maybe;
- /** Child categories tree. */
- children?: Maybe>>;
- children_count?: Maybe;
- /** Category CMS Block. */
- cms_block?: Maybe;
- /**
- * Timestamp indicating when the category was created.
- * @deprecated The field should not be used on the storefront.
- */
- created_at?: Maybe;
- custom_layout_update_file?: Maybe;
- /** The attribute to use for sorting. */
- default_sort_by?: Maybe;
- /** An optional description of the category. */
- description?: Maybe;
- display_mode?: Maybe;
- filter_price_range?: Maybe;
- /**
- * An ID that uniquely identifies the category.
- * @deprecated Use the `uid` argument instead.
- */
- id?: Maybe;
- image?: Maybe;
- include_in_menu?: Maybe;
- is_anchor?: Maybe;
- landing_page?: Maybe;
- /** Indicates the depth of the category within the tree. */
- level?: Maybe;
- meta_description?: Maybe;
- meta_keywords?: Maybe;
- meta_title?: Maybe;
- /** The display name of the category. */
- name?: Maybe;
- /** Category Path. */
- path?: Maybe;
- /** Category path in store. */
- path_in_store?: Maybe;
- /** The position of the category relative to other categories at the same level in tree. */
- position?: Maybe;
- /** The number of products in the category that are marked as visible. By default, in complex products, parent products are visible, but their child products are not. */
- product_count?: Maybe;
- /** The list of products assigned to the category. */
- products?: Maybe;
- /** The unique ID for a `CategoryInterface` object. */
- uid: Scalars['ID'];
- /**
- * Timestamp indicating when the category was updated.
- * @deprecated The field should not be used on the storefront.
- */
- updated_at?: Maybe;
- /** The url key assigned to the category. */
- url_key?: Maybe;
- /** The url path assigned to the category. */
- url_path?: Maybe;
- /** The part of the category URL that is appended after the url key */
- url_suffix?: Maybe;
-}
-```
-
-### `search`
-Function that takes `CategoryListQueryVariables`as optional param and gets the `categories` accordingly
-
-### `categories`
-Returns an array of categories fetched by `search` method as a `computed` property.
-
-### `loading`
-Returns the current state of `search` as `computed` boolean property
-
-### `error`
-Reactive object containing the error message, if search failed for any reason.
-
-## Getters
-````typescript
-interface CategoryGetters {
- getTree: (category: Category) => AgnosticCategoryTree | null;
- getBreadcrumbs: (category: Category) => AgnosticBreadcrumb[];
- getCategoryTree?: (
- category: Category,
- currentCategory: string,
- withProducts: boolean,
- ) => AgnosticCategoryTree | null;
-}
-
-export interface AgnosticBreadcrumb {
- text: string;
- link: string;
-}
-
-export interface AgnosticCategoryTree {
- label: string;
- slug?: string;
- items: AgnosticCategoryTree[];
- isCurrent: boolean;
- count?: number;
- [x: string]: unknown;
-}
-````
-## Example
-
-```javascript
-import { onSSR } from '@vue-storefront/core';
-import { useCategory } from '@vue-storefront/magento';
-
-export default {
- setup () {
- const { categories, search, loading } = useCategory('AppHeader:Categories');
-
- onSSR(async () => {
- await search({
- pageSize: 100,
- });
- });
-
- return {
- categories,
- loading
- }
- }
-}
-```
diff --git a/docs/guide/composables/use-config.md b/docs/guide/composables/use-config.md
deleted file mode 100644
index c48f7288e..000000000
--- a/docs/guide/composables/use-config.md
+++ /dev/null
@@ -1,209 +0,0 @@
-# useConfig
-
-## Features
-`useConfig` composable is responsible, as its name suggests, for interactions with the configuration in your eCommerce.
-
-## API
-The `useConfig` composable implements custom factory `useConfigFactory` located in `packages/composables/src/factories/useConfigFactory.ts` and returns `UseConfig` interface:
-```typescript
-interface UseConfig {
- config: ComputedRef;
- loadConfig: () => Promise;
- loading: ComputedRef;
-}
-
-export interface StoreConfig {
- /** Footer Miscellaneous HTML */
- absolute_footer?: Maybe;
- /** Indicates whether guest users can write product reviews. Possible values: 1 (Yes) and 0 (No) */
- allow_guests_to_write_product_reviews?: Maybe;
- /** The value of the Allow Gift Messages for Order Items option */
- allow_items?: Maybe;
- /** The value of the Allow Gift Messages on Order Level option */
- allow_order?: Maybe;
- /** Enable autocomplete on login and forgot password forms */
- autocomplete_on_storefront?: Maybe;
- /** Base currency code */
- base_currency_code?: Maybe;
- /** Base link URL for the store */
- base_link_url?: Maybe;
- /** Base media URL for the store */
- base_media_url?: Maybe;
- /** Base static URL for the store */
- base_static_url?: Maybe;
- /** Base URL for the store */
- base_url?: Maybe;
- /** Braintree cc vault status. */
- braintree_cc_vault_active?: Maybe;
- /** Default Sort By. */
- catalog_default_sort_by?: Maybe;
- /** Corresponds to the 'Display Prices In Product Lists' field. It indicates how FPT information is displayed on category pages */
- category_fixed_product_tax_display_setting?: Maybe;
- /** Category URL Suffix. */
- category_url_suffix?: Maybe;
- /** CMS Home Page */
- cms_home_page?: Maybe;
- /** CMS No Cookies Page */
- cms_no_cookies?: Maybe;
- /** CMS No Route Page */
- cms_no_route?: Maybe;
- /**
- * A code assigned to the store to identify it
- * @deprecated Use `store_code` instead.
- */
- code?: Maybe;
- /** The configuration setting determines which thumbnail should be used in the cart for configurable products. */
- configurable_thumbnail_source?: Maybe;
- /** Copyright */
- copyright?: Maybe;
- /** Default Meta Description */
- default_description?: Maybe;
- /** Default display currency code */
- default_display_currency_code?: Maybe;
- /** Default Meta Keywords */
- default_keywords?: Maybe;
- /** Default Page Title */
- default_title?: Maybe;
- /** Display Demo Store Notice */
- demonotice?: Maybe;
- /** Default Web URL */
- front?: Maybe;
- /** Products per Page on Grid Default Value. */
- grid_per_page?: Maybe;
- /** Products per Page on Grid Allowed Values. */
- grid_per_page_values?: Maybe;
- /** Scripts and Style Sheets */
- head_includes?: Maybe;
- /** Favicon Icon */
- head_shortcut_icon?: Maybe;
- /** Logo Image */
- header_logo_src?: Maybe;
- /**
- * The ID number assigned to the store
- * @deprecated Use `store_code` instead.
- */
- id?: Maybe;
- /** Indicates whether the store view has been designated as the default within the store group */
- is_default_store?: Maybe;
- /** Indicates whether the store group has been designated as the default within the website */
- is_default_store_group?: Maybe;
- /** List Mode. */
- list_mode?: Maybe;
- /** Products per Page on List Default Value. */
- list_per_page?: Maybe;
- /** Products per Page on List Allowed Values. */
- list_per_page_values?: Maybe;
- /** Store locale */
- locale?: Maybe;
- /** Logo Image Alt */
- logo_alt?: Maybe;
- /** Logo Attribute Height */
- logo_height?: Maybe;
- /** Logo Attribute Width */
- logo_width?: Maybe;
- /** Indicates whether wishlists are enabled (1) or disabled (0) */
- magento_wishlist_general_is_enabled?: Maybe;
- /** The minimum number of characters required for a valid password. */
- minimum_password_length?: Maybe;
- /** Default No-route URL */
- no_route?: Maybe;
- /** Payflow Pro vault status. */
- payment_payflowpro_cc_vault_active?: Maybe;
- /** Corresponds to the 'Display Prices On Product View Page' field. It indicates how FPT information is displayed on product pages */
- product_fixed_product_tax_display_setting?: Maybe;
- /** Indicates whether product reviews are enabled. Possible values: 1 (Yes) and 0 (No) */
- product_reviews_enabled?: Maybe;
- /** Product URL Suffix. */
- product_url_suffix?: Maybe;
- /** The number of different character classes required in a password (lowercase, uppercase, digits, special characters). */
- required_character_classes_number?: Maybe;
- /**
- * The ID of the root category
- * @deprecated Use `root_category_uid` instead
- */
- root_category_id?: Maybe;
- /** The unique ID for a `CategoryInterface` object. */
- root_category_uid?: Maybe;
- /** Corresponds to the 'Display Prices In Sales Modules' field. It indicates how FPT information is displayed on cart, checkout, and order pages */
- sales_fixed_product_tax_display_setting?: Maybe;
- /** Secure base link URL for the store */
- secure_base_link_url?: Maybe;
- /** Secure base media URL for the store */
- secure_base_media_url?: Maybe;
- /** Secure base static URL for the store */
- secure_base_static_url?: Maybe;
- /** Secure base URL for the store */
- secure_base_url?: Maybe;
- /** Email to a Friend configuration. */
- send_friend?: Maybe;
- /** Show Breadcrumbs for CMS Pages */
- show_cms_breadcrumbs?: Maybe;
- /** The unique ID of the store view. In the Admin, this is called the Store View Code. When making a GraphQL call, assign this value to the `Store` header to provide the scope */
- store_code?: Maybe;
- /** The unique ID assigned to the store group. In the Admin, this is called the Store Name */
- store_group_code?: Maybe;
- /** The label assigned to the store group */
- store_group_name?: Maybe;
- /** The label assigned to the store view */
- store_name?: Maybe;
- /** The store view sort order */
- store_sort_order?: Maybe;
- /** Timezone of the store */
- timezone?: Maybe;
- /** Page Title Prefix */
- title_prefix?: Maybe;
- /** Page Title Separator. */
- title_separator?: Maybe;
- /** Page Title Suffix */
- title_suffix?: Maybe;
- /** The configuration determines if the store code should be used in the URL */
- use_store_in_url?: Maybe;
- /** The unique ID for the website */
- website_code?: Maybe;
- /**
- * The ID number assigned to the website store
- * @deprecated The field should not be used on the storefront
- */
- website_id?: Maybe;
- /** The label assigned to the website */
- website_name?: Maybe;
- /** The unit of weight */
- weight_unit?: Maybe;
- /** Welcome Text */
- welcome?: Maybe;
-}
-```
-
-### `config`
-Returns the loaded `config` as `computed` property
-
-### `loadConfig`
-Function to load the `config`
-
-### `loading`
-Return state of `loadConfig` Function as `computed` property
-
-## Example
-```javascript
-import { onSSR } from '@vue-storefront/core';
-import { useConfig } from '@vue-storefront/magento';
-
-export default {
- setup() {
- const {
- config,
- loadConfig,
- loading
- } = useConfig();
-
- onSSR(async () => {
- await loadConfig();
- })
-
- return {
- config,
- loading
- };
- }
-};
-```
diff --git a/docs/guide/composables/use-country-search.md b/docs/guide/composables/use-country-search.md
deleted file mode 100644
index e5e78f711..000000000
--- a/docs/guide/composables/use-country-search.md
+++ /dev/null
@@ -1,77 +0,0 @@
-# useCountrySearch
-
-## Features
-`useCountrySearch` composable is responsible for fetching a list of categories. A common usage scenario for this composable is navigation.
-
-## API
-The `useCountrySearch` composable implements custom factory `useCountrySearchFactory` located in `packages/composables/src/composables/useCountrySearch/index.ts` and returns `UseCountrySearch` interface:
-```typescript
-export interface UseCountrySearch {
- load: () => Promise;
- search: (params: { id: string }) => Promise;
- countries: ComputedProperty;
- country: ComputedProperty;
- error: ComputedProperty;
- loading: ComputedProperty;
-}
-
-export type Countries = CountriesListQuery['countries'][0];
-
-export interface Country {
- available_regions?: Maybe>>;
- full_name_english?: Maybe;
- full_name_locale?: Maybe;
- /** The unique ID for a `Country` object. */
- id?: Maybe;
- three_letter_abbreviation?: Maybe;
- two_letter_abbreviation?: Maybe;
-}
-```
-
-### `load`
-Function that takes no params and gets the `Countries` array accordingly
-
-### `search`
-Function that takes `id`as search param and gets the `Country` accordingly
-
-### `countries`
-Returns an array of countries fetched by `load` method as a `computed` property.
-
-### `country`
-Returns a single `Country` object fetched by `search` method as a `computed` property.
-
-### `loading`
-Returns the current state of `search` as `computed` boolean property
-
-### `error`
-Reactive object containing the error message, if search failed for any reason.
-
-## Example
-
-```javascript
-import { onSSR } from '@vue-storefront/core';
-import { useCountrySearch } from '@vue-storefront/magento';
-
-export default {
- setup (props) {
- const {
- load: loadCountries,
- countries,
- search: searchCountry,
- country,
- } = useCountrySearch('Step:Billing');
-
- onSSR(async () => {
- await searchCountry({
- id: props.identifier,
- });
- });
-
- return {
- loadCountries,
- countries,
- country,
- }
- }
-}
-```
diff --git a/docs/guide/composables/use-custom-mutation.md b/docs/guide/composables/use-custom-mutation.md
deleted file mode 100644
index 1c983d1b3..000000000
--- a/docs/guide/composables/use-custom-mutation.md
+++ /dev/null
@@ -1,84 +0,0 @@
-# useCustomMutation
-
-## Features
-`useCustomMutation` composition function can be used to execute custom Mutation on the Magento GraphQL API.
-
-What makes it powerful is the ability to accept any GraphQL mutation, and execute it.
-
-## API
-```typescript
-export interface UseCustomMutation extends Composable {
- setMutationString: (newMutationString: string) => void;
- mutationString: ComputedProperty;
- mutation: ({ variables, fetchPolicy }: {
- variables: MUTATION_VARIABLES,
- fetchPolicy?: FetchPolicy,
- }) => Promise;
- result: ComputedProperty;
- loading: ComputedProperty;
- error: ComputedProperty;
- [x: string]: any;
-}
-```
-
-### `setMutationString`
-Function to define the mutation to be executed on the GraphQL Mutation
-
-### `mutationString`
-`sharedRef` of the GraphQL mutation string
-
-### `query`
-Actual query function to mutate the data under the Magento GraphQL API.
-
-### `result`
-Reactive object containing the result information from mutation method.
-
-### `loading`
-Reactive object containing the loading state of the query function.
-
-### `error`
-Reactive object containing the error message, if mutation failed for any reason.
-
-## Example
-`customMutationExample.ts`
-
-```typescript
-import { useCustomMutation } from '@vue-storefront/magento';
-
-export const customMutation = (id?: string) => {
- const {
- error,
- loading,
- mutation,
- result,
- setMutationString,
- } = useCustomMutation(id);
-
- setMutationString(`
- mutation subscribeEmailToNewsletter($email: String!){
- subscribeEmailToNewsletter(email: $email) {
- status
- }
- }`);
-
- return {
- error,
- loading,
- mutation,
- result,
- };
-};
-```
-
-`Any File`
-```typescript
-import { customQuery } from '~/composables/customMutationExample.ts';
-
-const { mutation } = customQuery(id);
-
-await mutation({
- variables: {
- email: `${newEmail}`,
- },
-});
-```
diff --git a/docs/guide/composables/use-custom-query.md b/docs/guide/composables/use-custom-query.md
deleted file mode 100644
index dda849fd1..000000000
--- a/docs/guide/composables/use-custom-query.md
+++ /dev/null
@@ -1,87 +0,0 @@
-# useCustomQuery
-
-## Features
-`useCustomQuery` composition function can be used to execute custom Queries on the Magento GraphQL API.
-
-What makes it powerful is the ability to accept any GraphQL query, and execute it.
-
-## API
-```typescript
-export interface UseCustomQuery extends Composable {
- setQueryString: (newQueryString: string) => void;
- queryString: ComputedProperty;
- query: ({ variables, fetchPolicy, }: {
- variables: QUERY_VARIABLES,
- fetchPolicy?: FetchPolicy,
- }) => Promise;
- result: ComputedProperty;
- loading: ComputedProperty;
- error: ComputedProperty;
-}
-```
-
-### `setQueryString`
-Function to define the query to be executed on the GraphQL Query
-
-### `queryString`
-`sharedRef` of the GraphQL query string
-
-### `query`
-Actual query function to fetch the data under the Magento GraphQL API.
-
-### `result`
-Reactive object containing the result information from query method.
-
-### `loading`
-Reactive object containing the loading state of the query function.
-
-### `error`
-Reactive object containing the error message, if query failed for any reason.
-
-## Example
-`customQueryExample.ts`
-
-```typescript
-import { useCustomQuery } from '@vue-storefront/magento';
-
-export const customQuery = (id?: string) => {
- const {
- error,
- loading,
- query,
- result,
- setQueryString,
- } = useCustomQuery(id);
-
- setQueryString(`
- query urlResolver($url: String!) {
- urlResolver(url:$url) {
- id,
- redirectCode,
- relative_url,
- type
- entity_uid
- }
- }`);
-
- return {
- error,
- loading,
- query,
- result,
- };
-};
-```
-
-`Any File`
-```typescript
-import { customQuery } from '~/composables/customQueryExample.ts';
-
-const { query } = customQuery(path);
-
-await query({
- variables: {
- url: path.replace(/\/[cp|]\//gi, ''),
- },
-});
-```
diff --git a/docs/guide/composables/use-external-checkout.md b/docs/guide/composables/use-external-checkout.md
deleted file mode 100644
index b4b31bd1d..000000000
--- a/docs/guide/composables/use-external-checkout.md
+++ /dev/null
@@ -1,47 +0,0 @@
-# useExternalCheckout
-
-## Features
-`useExternalCheckout` composable is responsible for redirecting checkout process and depends on [Magento 2 External Checkout for Vue Storefront](https://github.com/Vendic/magento2-external-checkout) repository.
-
-## API
-The `useExternalCheckout` composable implements custom factory `useExternalCheckoutFactory` located in `packages/composables/src/factories/useExternalCheckoutFactory.ts` and returns `UseExternalCheckout` interface:
-```typescript
-export interface UseExternalCheckout {
- initializeCheckout: (baseUrl: string) => Promise;
- error: ComputedProperty;
- loading: ComputedProperty;
-}
-
-export interface UseExternalCheckoutErrors {
- initializeCheckout: Error;
-}
-```
-### `initializeCheckout`
-Function that takes `baseUrl`as search param.
-
-### `loading`
-Returns the current state of `search` as `computed` boolean property
-
-### `error`
-Reactive object containing the error message, if search failed for any reason.
-
-## Example
-
-```javascript
-import { useExternalCheckout } from '@vue-storefront/magento';
-
-export default {
- setup (props) {
- const { initializeCheckout } = useExternalCheckout();
-
- const goToCheckout = async () => {
- const redirectUrl = await initializeCheckout('/checkout/user-account');
- await router.push(redirectUrl);
- };
-
- return {
- goToCheckout,
- }
- }
-}
-```
diff --git a/docs/guide/composables/use-facet.md b/docs/guide/composables/use-facet.md
deleted file mode 100644
index 1ff36d2dc..000000000
--- a/docs/guide/composables/use-facet.md
+++ /dev/null
@@ -1,102 +0,0 @@
-# useFacet
-
-## Features
-`useFacet` composition function can be used to fetch data related to:
-* products,
-* categories,
-* breadcrumbs.
-
-What makes it powerful is the ability to accept multiple filters, allowing to narrow down the results to a specific category, search term, etc.
-
-## API
-```typescript
-interface UseFacet {
- result: ComputedProperty>;
- loading: ComputedProperty;
- search: (params?: AgnosticFacetSearchParams) => Promise;
- error: ComputedProperty;
-}
-```
-
-### `search`
-Function for searching and classifying records, allowing users to browse the catalog data. It accepts a single object as a parameter
-```typescript
-interface AgnosticFacetSearchParams {
- categorySlug?: string;
- rootCatSlug?: string;
- term?: string;
- page?: number;
- itemsPerPage?: number;
- sort?: string;
- filters?: Record;
- metadata?: any;
- [x: string]: any;
-}
-```
-
-### `result`
-Reactive data object containing the response from the backend.
-
-### `loading`
-Reactive object containing information about the loading state of search.
-
-### `error`
-Reactive object containing the error message, if search failed for any reason.
-
-
-## Getters
-````typescript
-interface FacetsGetters {
- getAll: (searchData: FacetSearchResult, criteria?: CRITERIA) => AgnosticFacet[];
- getGrouped: (searchData: FacetSearchResult, criteria?: CRITERIA) => AgnosticGroupedFacet[];
- getCategoryTree: (searchData: FacetSearchResult) => AgnosticCategoryTree;
- getSortOptions: (searchData: FacetSearchResult) => AgnosticSort;
- getProducts: (searchData: FacetSearchResult) => RESULTS;
- getPagination: (searchData: FacetSearchResult) => AgnosticPagination;
- getBreadcrumbs: (searchData: FacetSearchResult) => AgnosticBreadcrumb[];
-}
-````
-
-* `getAll` - returns all available facets.
-* `getGrouped` - returns grouped facets by facet name.
-* `getCategoryTree` - return the tree of nested categories.
-* `getSortOptions` - returns available and currently selected sorting options.
-* `getProducts` - returns products matching current filters.
-* `getPagination` - returns pagination information.
-* `getBreadcrumbs` - returns breadcrumbs information.
-
-## Example
-```javascript
-import { onSSR } from '@vue-storefront/core';
-import { useFacet, facetGetters } from '@vue-storefront/magento';
-
-export default {
- setup (props, context) {
- const { result, search, loading } = useFacet(`facetId:${path}`);
-
- const products = computed(() => facetGetters.getProducts(result.value));
- const breadcrumbs = computed(() => facetGetters.getBreadcrumbs(result.value));
- const sortBy = computed(() => facetGetters.getSortOptions(result.value));
- const facets = computed(() => facetGetters.getGrouped(result.value));
- const pagination = computed(() => facetGetters.getPagination(result.value));
-
- onSSR(async () => {
- await search({
- categorySlug: 'clothing',
- sort: 'latest',
- itemsPerPage: 10,
- term: 'some search query'
- });
- });
-
- return {
- produproducts,
- breadcrumbs,
- sortBy,
- facets,
- pagination,
- loading,
- };
- }
-}
-```
diff --git a/docs/guide/composables/use-forgot-password.md b/docs/guide/composables/use-forgot-password.md
deleted file mode 100644
index c356323f1..000000000
--- a/docs/guide/composables/use-forgot-password.md
+++ /dev/null
@@ -1,27 +0,0 @@
-# useForgotPassword
-
-`useForgotPassword`
-
-## API
-```typescript
-export interface UseForgotPassword {
- result: ComputedProperty;
- loading: ComputedProperty;
- error: ComputedProperty;
- setNew(params: ComposableFunctionArgs<{
- tokenValue: string,
- newPassword: string,
- email: string,
- }>): Promise;
- request(params: ComposableFunctionArgs<{
- email: string
- }>): Promise;
-}
-```
-
-* `` -
-
-## Example
-
-```javascript
-```
diff --git a/docs/guide/composables/use-get-shipping-methods.md b/docs/guide/composables/use-get-shipping-methods.md
deleted file mode 100644
index 5bcb6515a..000000000
--- a/docs/guide/composables/use-get-shipping-methods.md
+++ /dev/null
@@ -1,90 +0,0 @@
-# useGetShippingMethods
-
-## Features
-`useGetShippingMethods` composable is responsible for fetching a Shipping Method
-
-## API
-The `useGetShippingMethods` composable implements custom factory `useGetShippingMethodsFactory` located in `packages/composables/src/factories/useGetShippingMethodsFactory.ts` and returns `UseGetShippingMethods` interface:
-```typescript
-export interface UseGetShippingMethods {
- state: ComputedProperty;
- setState(state: ShippingMethod[]): void;
- load: (params: { cartId: string }) => Promise;
- result: ComputedProperty;
- error: ComputedProperty;
- loading: ComputedProperty;
-}
-
-export type ShippingMethod = AvailableShippingMethod;
-
-export interface AvailableShippingMethod {
- amount: Money;
- available: Scalars['Boolean'];
- /** @deprecated The field should not be used on the storefront */
- base_amount?: Maybe;
- carrier_code: Scalars['String'];
- carrier_title: Scalars['String'];
- error_message?: Maybe;
- /** Could be null if method is not available */
- method_code?: Maybe;
- /** Could be null if method is not available */
- method_title?: Maybe;
- price_excl_tax: Money;
- price_incl_tax: Money;
-}
-
-export interface Money {
- /** A three-letter currency code, such as USD or EUR */
- currency?: Maybe;
- /** A number expressing a monetary value */
- value?: Maybe;
-}
-```
-### `state`
-Get all `ShippingMethods` as array.
-
-### `setState`
-Set one or more `ShippingMethods` state.
-
-### `load`
-Function that takes `cartId` as param and gets the `result` array accordingly
-
-### `result`
-Returns a list of `ShippingMethods` fetched by `load` method as a `computed` property.
-
-### `loading`
-Returns the current state of `search` as `computed` boolean property
-
-### `error`
-Reactive object containing the error message, if search failed for any reason.
-
-## Example
-
-```javascript
-import { onSSR } from '@vue-storefront/core';
-import { useGetShippingMethods } from '@vue-storefront/magento';
-
-export default {
- setup (props) {
- const {
- load,
- result: shippingMethods,
- loading: loadingShippingMethods,
- error: errorUseGetShippingMethods,
- } = useGetShippingMethods('VsfShippingProvider');
-
-
- onSSR(async () => {
- await load({
- cartId: props.identifier,
- });
- });
-
- return {
- shippingMethods,
- loadingShippingMethods,
- errorUseGetShippingMethods,
- }
- }
-}
-```
diff --git a/docs/guide/composables/use-guest-user.md b/docs/guide/composables/use-guest-user.md
deleted file mode 100644
index 26a1e4e14..000000000
--- a/docs/guide/composables/use-guest-user.md
+++ /dev/null
@@ -1,69 +0,0 @@
-# useGuestUser
-
-## Features
-`useGuestUser` composable is responsible for fetching a Shipping Method
-
-## API
-The `useGuestUser` composable implements custom factory `useGuestUserFactory` located in `packages/composables/src/factories/useGuestUserFactory.ts` and returns `UseGuestUser` interface:
-```typescript
-export interface UseGuestUser {
- guestUser: ComputedProperty;
- setGuestUser: (user: any) => void;
- attachToCart: (params: { user: UseGuestUserRegisterParams }) => Promise;
- loading: ComputedProperty;
- error: ComputedProperty;
-}
-
-export interface UseGuestUserRegisterParams {
- email: string;
- password: string;
- firstName?: string;
- lastName?: string;
- [x: string]: any;
-}
-
-export interface UseGuestUserErrors {
- attachToCart: Error;
-}
-```
-### `guestUser`
-Returns a User as a computed property
-
-### `setGuestUser`
-Set the User
-
-### `attachToCart`
-Function that takes `user` as `UseGuestUserRegisterParams` param.
-
-### `loading`
-Returns the current state of `search` as `computed` boolean property
-
-### `error`
-Reactive object containing the error message, if search failed for any reason.
-
-## Example
-
-```javascript
-import { onSSR } from '@vue-storefront/core';
-import { useGuestUser } from '@vue-storefront/magento';
-
-export default {
- setup (props) {
- const {
- attachToCart,
- loading: loadingGuestUser,
- error: errorGuestUser,
- } = useGuestUser();
-
- const handleFormSubmit = () => async () => {
- await attachToCart({ user: props.user });
- };
-
- return {
- handleFormSubmit,
- loadingGuestUser,
- errorGuestUser,
- }
- }
-}
-```
diff --git a/docs/guide/composables/use-make-oder.md b/docs/guide/composables/use-make-oder.md
deleted file mode 100644
index 67b3762d1..000000000
--- a/docs/guide/composables/use-make-oder.md
+++ /dev/null
@@ -1,103 +0,0 @@
-# useMakeOrder
-`useMakeOrder` composable is responsible for making an order
-
-## API
-````typescript
-interface UseMakeOrder {
- order: Ref;
- make(params: { customQuery?: CustomQuery }): Promise;
- error: ComputedProperty;
- loading: ComputedProperty;
-}
-
-export interface Order extends OrderItem {
- /** @deprecated The order_id field is deprecated, use order_number instead. */
- order_id?: Maybe;
- /** The unique ID for a `Order` object. */
- order_number: Scalars['String'];
-}
-
-export interface OrderItem {
- /** The final discount information for the product */
- discounts?: Maybe>>;
- /** The entered option for the base product, such as a logo or image */
- entered_options?: Maybe>>;
- /** The unique ID for a `OrderItemInterface` object */
- id: Scalars['ID'];
- /** The name of the base product */
- product_name?: Maybe;
- /** The sale price of the base product, including selected options */
- product_sale_price: Money;
- /** The SKU of the base product */
- product_sku: Scalars['String'];
- /** The type of product, such as simple, configurable, etc. */
- product_type?: Maybe;
- /** URL key of the base product */
- product_url_key?: Maybe;
- /** The number of canceled items */
- quantity_canceled?: Maybe;
- /** The number of invoiced items */
- quantity_invoiced?: Maybe;
- /** The number of units ordered for this item */
- quantity_ordered?: Maybe;
- /** The number of refunded items */
- quantity_refunded?: Maybe;
- /** The number of returned items */
- quantity_returned?: Maybe;
- /** The number of shipped items */
- quantity_shipped?: Maybe;
- /** The selected options for the base product, such as color or size */
- selected_options?: Maybe>>;
- /** The status of the order item */
- status?: Maybe;
-}
-````
-### `make`
-function for making an order. This method accepts a single optional params object.
-
-### `order`
-a main data object that contains a made order.
-
-### `loading`
-a reactive object containing information about loading state of your make method.
-
-### `error`
-a reactive object containing the error message, if load or save failed for any reason.
-
-
-## Getters
-````typescript
-interface UserOrderGetters {
- getDate: (order: Order) => string;
- getId: (order: Order) => string;
- getStatus: (order: Order) => string;
- getPrice: (order: Order) => number;
- getItems: (order: Order) => OrderItem[];
- getItemSku: (item: OrderItem) => string;
- getItemName: (item: OrderItem) => string;
- getItemQty: (item: OrderItem) => number;
- getItemPrice: (item: OrderItem) => number;
- getFormattedPrice: (price: number) => string;
-}
-````
-
-## Example
-````javascript
-import { useMakeOrder } from '@vue-storefront/magento';
-export default {
- setup () {
- const { order, make, loading } = useMakeOrder();
-
- const processOrder = async () => {
- await make();
- router.push(`/checkout/thank-you?order=${order.value.order_number}`);
- };
-
- return {
- processOrder,
- order,
- loading,
- };
- }
-}
-````
diff --git a/docs/guide/composables/use-menu-category.md b/docs/guide/composables/use-menu-category.md
deleted file mode 100644
index 8df7a2006..000000000
--- a/docs/guide/composables/use-menu-category.md
+++ /dev/null
@@ -1,50 +0,0 @@
-# useMenuCategory
-
-## Features
-`useMenuCategory` composable is responsible for fetching a list of categories with a dedicated file structure for AppHeader Menu.
-
-## API
-```typescript
-export interface UseCategory {
- categories: ComputedProperty;
- search(params: ComposableFunctionArgs): Promise;
- loading: ComputedProperty;
- error: ComputedProperty