Skip to content

Commit

Permalink
Merge branch 'main' into unified-prerelease
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrzej Kurek committed Apr 4, 2024
2 parents c43d937 + 0636236 commit 216282b
Show file tree
Hide file tree
Showing 79 changed files with 4,982 additions and 3,592 deletions.
5 changes: 5 additions & 0 deletions .changeset/random-name-tg.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@vue-storefront/magento-api": patch
---

[CHANGED] `Context` from type to interface to allow declaration merging.
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16
18
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<div align="center">
<img src="https://user-images.githubusercontent.com/1626923/137092657-fb398d20-b592-4661-a1f9-4135db0b61d5.png" height="80px"/>  <img src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/55/Magento_Logo.svg/2560px-Magento_Logo.svg.png" height="80px"/>
<img src="https://res.cloudinary.com/vue-storefront/image/upload/v1710754524/Logo_green_2x_z4vmhz.png" height="80px"/>
<br>
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/55/Magento_Logo.svg/2560px-Magento_Logo.svg.png" height="80px"/>
</div>


Expand All @@ -12,25 +14,25 @@



**This repository contains integration for Magento 2 and Vue Storefront Middleware.**
**This repository contains integration for Magento 2 and Alokai Middleware.**
This integration is framework-agnostic and may be consumed in the framework of your choice.

## Magento 2 integration for Vue Storefront
## Magento 2 integration for Alokai

This project is a Magento 2 integration for Vue Storefront.
This project is a Magento 2 integration for Alokai.

### Check out [the docs](https://docs.vuestorefront.io/sdk-magento2/)

# Quick start

Your Vue Storefront application has two parts:
Your Alokai application has two parts:

1. **Server Middleware** - an Express.js application that can connect to your various third-party services (like Magento).


2. **Front-end application** - any application using JavaScript or TypeScript that can connect to the server middleware. Popular choices include [Nuxt](https://nuxt.com/) and [Next.js](https://nextjs.org/).

In this section, we will explain in a step-by-step guide how to use Magento 2 integration in each part of your Vue Storefront application.
In this section, we will explain in a step-by-step guide how to use Magento 2 integration in each part of your Alokai application.


## Prerequisites
Expand Down Expand Up @@ -271,12 +273,12 @@ Find more information about the module [GraphQl Custom Config](https://github.co
## Resources
- [Magento 2 integration Documentation](https://docs.vuestorefront.io/sdk-magento2/)
- [Vue Storefront Documentation](https://docs.vuestorefront.io/v2/)
- [Alokai Documentation](https://docs.vuestorefront.io/v2/)
- [Community Chat](http://discord.vuestorefront.io)
## Support
If you have any questions about this integration we will be happy to answer them on `magento2-vsf2` channel on [our Discord](http://discord.vuestorefront.io).
If you have any questions about this integration we will be happy to answer them on `magento2-alokai` channel on [our Discord](http://discord.vuestorefront.io).
## Contributors ✨
Expand Down
14 changes: 6 additions & 8 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
# Vue Storefront Docs Starter
# Alokai Magento SDK

Welcome to the Vue Storefront Docs Boilerplate! If you're creating a new Vue Storefront integration, this is the place to start.
Welcome to Alokai Magento SDK Docs

This Nuxt project can help you preview your content locally and get it ready to be merged into the Vue Storefront docs.
This project extends our [Base Layer](https://docs.alokai.com/community/contributing/docs/base-layer) to give you all the modules, components, and features available in the deployed Alokai docs.

It extends our [Base Layer](https://docs.vuestorefront.io/community/contributing/docs/base-layer) to give you all of the modules, components, and features available in the deployed Vue Storefront docs.

Then, when you're ready to publish your content, we'll work with you to get add the `content` folder of this project as a remote Git source for the Vue Storefront docs.
Then, when you're ready to publish your content, we'll work with you to get add the `content` folder of this project as a remote Git source for the Alokai docs.

## Tips

You can use the rest of this project to preview your content locally, but any components/layouts/composables/etc. will not be available to the published docs.

If you need additional functionality, reach out to us on [Discord](https://discord.vuestorefront.io) and we'll work with you to get it added to the docs base layer and make it available to all of our docs projects.
If you need additional functionality, reach out to us on [Discord](https://discord.alokai.com) and we'll work with you to get it added to the docs base layer and make it available to all of our docs projects.

But remember - if you're publishing through the VSF docs, only your `content` folder will be pulled into the docs.
But remember - if you're publishing through the Alokai docs, only your `content` folder will be pulled into the docs.

### Place images directly in the `content` folder

Expand Down
16 changes: 8 additions & 8 deletions docs/content/1.index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ navigation.title: Overview

# Magento 2 SDK

Quickly build your storefront with the Vue Storefront SDK for Magento. Connect your Magento 2 backend to any frontend framework with type-safe SDK methods
Quickly build your storefront with the Alokai SDK for Magento. Connect your Magento 2 backend to any frontend framework with type-safe SDK methods

## Getting Started

Quickly install, configure, and start using the Magento Integration with the Vue Storefront SDK.
Quickly install, configure, and start using the Magento Integration with the Alokai SDK.

::grid{:columns='3'}
#section-1
:card{to="/general" title="What is Vue Storefront?" description="New here? Learn about all the different ways Vue Storefront can help you build with performant websites." icon="ri:book-2-fill"}
:card{to="/general" title="What is Alokai?" description="New here? Learn about all the different ways Alokai can help you build with performant websites." icon="ri:book-2-fill"}

#section-2
:card{to="$base/getting-started/magento" title="Local Development" description="Use our CLI to setup a local Magento instance in minutes." icon="ri:terminal-box-fill"}
Expand All @@ -29,7 +29,7 @@ Learn how to use the Magento 2 SDK with our guides.

::grid{:columns='3'}
#section-1
:card{to="/general" title="What is Vue Storefront?" description="New here? Learn about all the different ways Vue Storefront can help you build with performant websites." icon="ri:book-2-fill"}
:card{to="/general" title="What is Alokai?" description="New here? Learn about all the different ways Alokai can help you build with performant websites." icon="ri:book-2-fill"}

#section-2
:card{to="/integrations" title="Integrations" description="Connect to the third-party services you need to run your storefront, all through one consistent pattern." icon="ri:terminal-box-fill"}
Expand All @@ -38,10 +38,10 @@ Learn how to use the Magento 2 SDK with our guides.
:card{to="https://docs.storefrontui.io" title="Storefront UI" description="Implement your design system with our ready to customize UI elements - built with TailwindCSS and Vue/React." icon="IconStorefrontUi" }

#section-4
:card{to="/cloud" title="Cloud" description="Deploy with confidence with production-grade cloud hosting for your Vue Storefront applications" icon="ri:cloud-fill"}
:card{to="/cloud" title="Cloud" description="Deploy with confidence with production-grade cloud hosting for your Alokai applications" icon="ri:cloud-fill"}

#section-5
:card{to="/contributing" title="Contributing" description="Contribute to Vue Storefront, ask questions, and get support from the community." icon="ri:community-line"}
:card{to="/contributing" title="Contributing" description="Contribute to Alokai, ask questions, and get support from the community." icon="ri:community-line"}

#section-6
:card{to="/enterprise" title="Enterprise" description="Ready to take your storefront next to the next level? Reach out to sales to see how we can help you." icon="ri:store-3-fill"}
Expand All @@ -54,8 +54,8 @@ Learn how to use the Magento 2 SDK with our guides.

## Want to see other our SDK modules?

The Magento 2 module is just one of many SDK modules that allow you to integrate with the various services needed to run your application. Add payment providers, CMS integrations, search engines and more to your storefront with Vue Storefront SDKs.
The Magento 2 module is just one of many SDK modules that allow you to integrate with the various services needed to run your application. Add payment providers, CMS integrations, search engines and more to your storefront with Alokai SDKs.


This integration is developed and maintained by the Vue Storefront team.
This integration is developed and maintained by the Alokai team.

6 changes: 3 additions & 3 deletions docs/content/2.getting-started/1.quick-start.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Quick start

Your Vue Storefront application has two parts:
Your Alokai application has two parts:

1. **Server Middleware** - an Express.js application that can connect to your various third-party services (like Magento).


2. **Front-end application** - any application using JavaScript or TypeScript that can connect to the server middleware. Popular choices include [Nuxt](https://nuxt.com/) and [Next.js](https://nextjs.org/).

In this section, we will explain in a step-by-step guide how to use Magento 2 integration in each part of your Vue Storefront application.
In this section, we will explain in a step-by-step guide how to use Magento 2 integration in each part of your Alokai application.

:::read-more
Learn more about the Vue Storefront middleware layer in our [Key concepts: Middleware](/middleware) docs.
Learn more about the Alokai middleware layer in our [Key concepts: Middleware](/middleware) docs.
:::

:::read-more
Expand Down
20 changes: 12 additions & 8 deletions docs/content/2.getting-started/2.magento.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ This is a beta version of the CLI. If you encounter any issues, please report th
## Installation steps

**Supported OS:** MacOS, Linux, Windows (using WSL2)
If you are using Windows, please proceed with the [Manual Installation](https://docs.vuestorefront.io/magento/installation-setup/installation.html#manual-installation) guide.
If you are using Windows, please proceed with the [Manual Installation](https://docs.alokai.com/magento/installation-setup/installation.html#manual-installation) guide.

**Installation using CLI** is a quick and easy way to get your project up and running. It will install Vue Storefront and Magento 2 instance locally using Docker. It will also generate sample data for your store *(optional)*.
**Installation using CLI** is a quick and easy way to get your project up and running. It will install Alokai and Magento 2 instance locally using Docker. It will also generate sample data for your store *(optional)*.

The **CLI** will guide you through the installation process and ask you to provide the required information.

Expand Down Expand Up @@ -67,15 +67,19 @@ Avoid using special characters and spaces in the project name.
#step-3
### Provide Magento 2 API credentials

When prompted, provide your Magento 2 API credentials. You can find/create your API credentials by following the [Adobe Merchant Center - Magento 2 Access Keys](https://marketplace.magento.com/customer/accessKeys/) guide.
When prompted, provide your Magento 2 API credentials. You can create them by following the [Get your authentication keys](https://experienceleague.adobe.com/en/docs/commerce-operations/installation-guide/prerequisites/authentication-keys) guide.

If you're logged in to your Adobe marketplace account, go to [Adobe Merchant Center - Magento 2 Access Keys](https://marketplace.magento.com/customer/accessKeys/) page, to generate the access keys.

When you see following prompt, enter your public and private key information.

```bash
◆ 🔐 Please provide your Magento access keys
|
◆ 🔑 Magento access key:
| <YOUR_MAGENTO_ACCESS_KEY>
| <YOUR_MAGENTO_PUBLIC_KEY>
◆ 🔒 Magento secret key
| <YOUR_MAGENTO_SECRET_KEY>
| <YOUR_MAGENTO_PRIVATE_KEY>
```

#step-4
Expand All @@ -88,7 +92,7 @@ When prompted, provide the URL of your Magento 2 instance:
| <YOUR_MAGENTO_DOMAIN_NAME>
```

This URL will be used to connect Vue Storefront to your Magento 2 instance - by default, the URL of the local Magento instance is `magento.test`. Meaning that your Vue Storefront application can use the `https://magento.test/graphql` endpoint to communicate with Magento 2.
This URL will be used to connect Alokai to your Magento 2 instance - by default, the URL of the local Magento instance is `magento.test`. Meaning that your Alokai application can use the `https://magento.test/graphql` endpoint to communicate with Magento 2.

The CLI will start installing Magento 2 instance locally using Docker. It will take a few minutes.

Expand All @@ -111,7 +115,7 @@ When prompted, select the option to generate sample data:
#step-6
### Congratulations! 🎉

You have successfully installed Magento 2 instance locally. You can now access connect your VSF application using your instance's base URL and GraphQL URL. 🚀
You have successfully installed Magento 2 instance locally. You can now access connect your Alokai application using your instance's base URL and GraphQL URL. 🚀


::
::
37 changes: 31 additions & 6 deletions docs/content/5.api/magento-api.api.json
Original file line number Diff line number Diff line change
Expand Up @@ -3037,7 +3037,16 @@
},
{
"kind": "Content",
"text": ", params: {\n email: string;\n password: string;\n recaptchaToken: string;\n}, customHeaders?: "
"text": ", params: {\n email: string;\n password: string;\n recaptchaToken: string;\n}, customQuery?: "
},
{
"kind": "Reference",
"text": "CustomQuery",
"canonicalReference": "@vue-storefront/magento-types!CustomQuery:type"
},
{
"kind": "Content",
"text": ", customHeaders?: "
},
{
"kind": "Reference",
Expand Down Expand Up @@ -3080,7 +3089,7 @@
"name": "generateCustomerToken",
"variableTypeTokenRange": {
"startIndex": 1,
"endIndex": 12
"endIndex": 14
}
},
{
Expand Down Expand Up @@ -4872,7 +4881,7 @@
{
"kind": "Function",
"canonicalReference": "@vue-storefront/magento-api!route:function(1)",
"docComment": "/**\n * Returns the canonical URL for a specified product, category, or CMS page\n *\n * @param context - VSF Context\n *\n * @param url - the URL to be resolved\n *\n * @param customHeaders - (optional) - custom headers that extends the default headers\n */\n",
"docComment": "/**\n * Returns the canonical URL for a specified product, category, or CMS page\n *\n * @param context - VSF Context\n *\n * @param url - the URL to be resolved\n *\n * @param customQuery - (optional) - custom GraphQL query that extends the default one\n *\n * @param customHeaders - (optional) - custom headers that extends the default headers\n */\n",
"excerptTokens": [
{
"kind": "Content",
Expand All @@ -4891,6 +4900,15 @@
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": ", customQuery?: "
},
{
"kind": "Reference",
"text": "CustomQuery",
"canonicalReference": "@vue-storefront/magento-types!CustomQuery:type"
},
{
"kind": "Content",
"text": ", customHeaders?: "
Expand Down Expand Up @@ -4946,8 +4964,8 @@
}
],
"returnTypeTokenRange": {
"startIndex": 7,
"endIndex": 15
"startIndex": 9,
"endIndex": 17
},
"releaseTag": "Public",
"overloadIndex": 1,
Expand All @@ -4967,11 +4985,18 @@
}
},
{
"parameterName": "customHeaders",
"parameterName": "customQuery",
"parameterTypeTokenRange": {
"startIndex": 5,
"endIndex": 6
}
},
{
"parameterName": "customHeaders",
"parameterTypeTokenRange": {
"startIndex": 7,
"endIndex": 8
}
}
],
"name": "route"
Expand Down
Loading

0 comments on commit 216282b

Please sign in to comment.