Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: correct typos in documentation #4413

Merged
merged 4 commits into from
Jul 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/content/admin/onboarding.md
Original file line number Diff line number Diff line change
Expand Up @@ -1190,7 +1190,7 @@ npx typeorm migration:create src/migrations/CreateOnboarding

This will create a file in the `src/migrations` directory with the name formatted as `<TIMESTAMP>-CreateOnboarding.ts`.

In that file, import the `genereteEntityId` utility method at the top of the file:
In that file, import the `generateEntityId` utility method at the top of the file:

```ts
import { generateEntityId } from "@medusajs/utils"
Expand Down
2 changes: 1 addition & 1 deletion docs/content/admin/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ You can add the following options to the `medusa-admin build` command:
- `--backend` or `-b`: a string specifying the URL of the Medusa backend. This can be useful with the `--deployment` option. The default here is the value of the environment variable `MEDUSA_BACKEND_URL`. For example, `medusa-admin build --deployment --backend example.com`
- `--out-dir` or `-o`: a string specifying a custom path to output the build files to. By default, it will be the `build` directory. For example, `medusa-admin --deployment --out-dir public`.
- `--include` or `-i`: a list of strings of paths to files you want to include in the build output. It can be useful if you want to inject files that are relevant to your external hosting, such as adding a `200.html` file that is needed for redirects on Surge. For example, `medusa-admin --deployment --include 200.html`
- `--include-dist` or `-d`: a string specifying the path to copy the files specified in `--include` to. By default, the files are coopied to the root of the build directory. You can use this option to change that. For example, `medusa-admin --deployment --include 200.html --include-dist static`.
- `--include-dist` or `-d`: a string specifying the path to copy the files specified in `--include` to. By default, the files are copied to the root of the build directory. You can use this option to change that. For example, `medusa-admin --deployment --include 200.html --include-dist static`.

---

Expand Down
2 changes: 1 addition & 1 deletion docs/content/cli/reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ medusa user --email <email> [--password <password>]
| Name | Description |
| --- | --- |
| `-e <email>`, `--email <email>` | The email to create a user with. (required) |
| `-p <passowrd>`, `--password <password>` | The password to use with the user. If not included, the user will not have a password. |
| `-p <password>`, `--password <password>` | The password to use with the user. If not included, the user will not have a password. |
| `-i <id>`, `--id <id>` | The user’s ID. By default it is automatically generated. |
| `--invite` | Whether to create an invite instead of a user. When using this option, you don't need to specify a password. If ran successfully, you'll receive the invite token in the output. |

Expand Down
2 changes: 1 addition & 1 deletion docs/content/create-medusa-app.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ You’ll first be asked to enter the name of your project, which is used to crea

### (Optional) Step 2: Specify PostgreSQL credentials

By default, this command will try to use the default PostgreSQL credentials to connect to your PostgreSQL server. If they don't work, you'll be prompted to enter your PostgreSQL database and passowrd. If they work, you can move ahead to the next step.
By default, this command will try to use the default PostgreSQL credentials to connect to your PostgreSQL server. If they don't work, you'll be prompted to enter your PostgreSQL database and password. If they work, you can move ahead to the next step.

These credentials will be used to create a database during this setup and configure your Medusa backend to connect to that database.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ If you already have a Medusa backend repository that you want to deploy then you

### Step 2: Configure the Template

The second step provides customization posibilities by configuring environment variables.
The second step provides customization possibilities by configuring environment variables.

Add an application name and the admin credentials that will be used to create an initial admin user with which you can later sign in to your Medusa Admin.

Expand Down
2 changes: 1 addition & 1 deletion docs/content/development/endpoints/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ The `productService` has a `count` method that returns a Promise. This Promi

Custom endpoints must be transpiled and moved to the `dist` directory before you can start consuming them. When you run your backend using the `medusa develop` command, it watches the files under `src` for any changes, then triggers the `build` command and restarts the server.

The build isn't triggerd though when the backend first starts running. So, make sure to run the `build` command before starting the backend:
The build isn't triggered though when the backend first starts running. So, make sure to run the `build` command before starting the backend:

```bash npm2yarn
npm run build
Expand Down
2 changes: 1 addition & 1 deletion docs/content/development/entities/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Most entities in Medusa have a `metadata` attribute. This attribute is an object

Some example use cases for the `metadata` attribute include:

- Store an external ID of an entity related to a third-party integartion.
- Store an external ID of an entity related to a third-party integration.
- Store product customization such as personalization options.

### Add and Update Metadata
Expand Down
2 changes: 1 addition & 1 deletion docs/content/development/events/create-subscriber.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ In this document, you’ll learn how to create a [Subscriber](./subscribers.mdx)

## Implementation

A subscriber is a TypeScript or JavaScript file that is created under `src/subscribers`. Its file name, by convension, should be the class name of the subscriber without the word `Subscriber`. For example, if the subscriber is `HelloSubscriber`, the file name should be `hello.ts`.
A subscriber is a TypeScript or JavaScript file that is created under `src/subscribers`. Its file name, by convention, should be the class name of the subscriber without the word `Subscriber`. For example, if the subscriber is `HelloSubscriber`, the file name should be `hello.ts`.

After creating the file under `src/subscribers`, in the constructor of your subscriber, listen to events using `eventBusService.subscribe` , where `eventBusService` is a service injected into your subscriber’s constructor.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
description: 'Learn what the dependency container is and how to use it in Medusa. Learn also what dependency injection is, and what the resources regsitered and their names are.'
description: 'Learn what the dependency container is and how to use it in Medusa. Learn also what dependency injection is, and what the resources registered and their names are.'
---

# Dependency Container and Injection
Expand Down
2 changes: 1 addition & 1 deletion docs/content/development/idempotency-key/use-service.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ The method requires as a parameter an object having the following properties:

The method handles generating the idempotency key value and saving the idempotency key with its details in the database. It returns the full idempotency key object.

Alternativaly, you can use the `initializeRequest` method that allows you to retrieve an idempotency key based on the value passed in the `Idempotency-Key` header of the request if it exists, or create a new key otherwise. For example:
Alternatively, you can use the `initializeRequest` method that allows you to retrieve an idempotency key based on the value passed in the `Idempotency-Key` header of the request if it exists, or create a new key otherwise. For example:

```ts
router.post("/custom-route", async (req, res) => {
Expand Down
4 changes: 2 additions & 2 deletions docs/content/development/notification/overview.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
description: 'Learn about the Notificaiton architecture in Medusa and the automation flow. The Notification Architecture is made up of the Notification Provider and Notification.'
description: 'Learn about the Notification architecture in Medusa and the automation flow. The Notification Architecture is made up of the Notification Provider and Notification.'
---

import DocCard from '@theme/DocCard';
Expand Down Expand Up @@ -88,7 +88,7 @@ An example of a flow that can be implemented using Medusa's Notification API is

- A customer requests a return by sending a `POST` request to the `/store/returns` endpoint.
- The Notification Provider listens to the `order.return_requested` event and sends an email to the customer with a return invoice and return label generated by the Fulfillment Provider.
- The customer returns the items triggering the `return.recieved` event.
- The customer returns the items triggering the `return.received` event.
- The Notification Provider listens to the `return.received` event and sends an email to the customer with confirmation that their items have been received and that a refund has been issued.

---
Expand Down
2 changes: 1 addition & 1 deletion docs/content/development/plugins/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ In this document, you’ll get an overview of plugins in Medusa, where to find t

## Overview

Medusa was built with flexibility and extendibility in mind. All different components and functionalities in Medusa are built with an abstraction layer that gives developers the freedom to choose what services they want to use or how to implement a certain component in their ecommerce store.
Medusa was built with flexibility and extendability in mind. All different components and functionalities in Medusa are built with an abstraction layer that gives developers the freedom to choose what services they want to use or how to implement a certain component in their ecommerce store.

Developers can use plugins to take advantage of this abstraction, flexibility, and extendibility. Plugins allow developers to implement custom features or integrate third-party services into Medusa.

Expand Down
2 changes: 1 addition & 1 deletion docs/content/development/search/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Using the [dependency container and injection](../fundamentals/dependency-inject

Medusa provides official plugins that you can install and use in your Medusa backend. Check out available search plugins [here](../../plugins/search/index.mdx).

### Heirarchy of Search Services
### Hierarchy of Search Services

Medusa provides a default search service that doesn’t actually perform any indexing or searching, but acts like a placeholder search service. Only one search service is registered in the dependency container under the `searchService` name.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ In case the customer enters an invalid discount or the discount cannot be applie

## Display Discount Details

After the customer enters a discount code and it is applied to the cart, you can display the discount details to the customer. This shows the customer how much they benefitted from the discount.
After the customer enters a discount code and it is applied to the cart, you can display the discount details to the customer. This shows the customer how much they benefited from the discount.

The previous request returns the full cart object with different fields that can be used to display the discount details depending on the discount type.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The `StockLocation` entity represents a stock location. It has minimal attribute

## StockLocationAddress Entity

The `StockLocationAddress` is an entitiy that contains address-related fields, such as `city` or `country_code`.
The `StockLocationAddress` is an entity that contains address-related fields, such as `city` or `country_code`.

The `StockLocationAddress` entity belongs to the `StockLocation` entity. It is used to store the address details of a stock location.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ You want to add or use the following admin functionalities:

---

## Prerequisities
## Prerequisites

### Medusa Components

Expand Down
4 changes: 2 additions & 2 deletions docs/content/modules/orders/admin/manage-orders.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -565,13 +565,13 @@ medusa.admin.orders.capturePayment(orderId)
import { useAdminCapturePayment } from "medusa-react"

const CapturePayment = () => {
const capturePament = useAdminCapturePayment(
const capturePayment = useAdminCapturePayment(
orderId
)
// ...

const handleCapture = () => {
capturePament.mutate()
capturePayment.mutate()
}

// ...
Expand Down
2 changes: 1 addition & 1 deletion docs/content/modules/orders/orders.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ Medusa provides the necessary infrastructure and tooling that allows automating

The Medusa backend facilitates automating these flows by allowing the customer to submit a [return](https://docs.medusajs.com/api/store#tag/Returns/operation/PostReturns) or [swap](https://docs.medusajs.com/api/store#tag/Swaps/operation/PostSwaps) requests through the store APIs. The merchant can then review and handle these requests. This eliminates the need for the customer to perform the same action through customer support or other means.

You can also integrate these flows within bigger processes that trigger requesting or creating these flows. It can be done through core APIs, [custom endpoints](../../development/endpoints/overview.mdx), or [custom services](../../development/services/overview.mdx). You can also listen to events related to orders such as [Order](../../development/events/events-list.md#order-events) or [Swap](../../development/events/events-list.md#swap-events) events with [subscribers](../../development/events/subscribers.mdx) to perform asynchronus actions.
You can also integrate these flows within bigger processes that trigger requesting or creating these flows. It can be done through core APIs, [custom endpoints](../../development/endpoints/overview.mdx), or [custom services](../../development/services/overview.mdx). You can also listen to events related to orders such as [Order](../../development/events/events-list.md#order-events) or [Swap](../../development/events/events-list.md#swap-events) events with [subscribers](../../development/events/subscribers.mdx) to perform asynchronous actions.

---

Expand Down
4 changes: 2 additions & 2 deletions docs/content/modules/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ This section gives an overview of the features available in Medusa. You can lear

### Optimized Shopping and Fulfillment Experience

Medusa provides the necessary features to build a customizable shopping experience for your customers. Medusa also offers features optimized for business operations to manage their orders effeciently.
Medusa provides the necessary features to build a customizable shopping experience for your customers. Medusa also offers features optimized for business operations to manage their orders efficiently.

<LargeCardList colSize={6}>
<LargeCard
Expand Down Expand Up @@ -80,7 +80,7 @@ Medusa provides the necessary features to build a customizable shopping experien
}}
>

- Allow orders from both registered and unregisterd customers.
- Allow orders from both registered and unregistered customers.
- Allow customers to create return or exchange requests from the storefront for better customer experience.
- Assign customers different groups for segmentation and specify different pricing for customer groups.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
description: 'Learn how to implement price list functionalities for admins using the REST APIs. This includes how to create a price list, retriving price list details, managing prices in the price list, and more.'
description: 'Learn how to implement price list functionalities for admins using the REST APIs. This includes how to create a price list, retrieving price list details, managing prices in the price list, and more.'
addHowToData: true
---

Expand Down
2 changes: 1 addition & 1 deletion docs/content/modules/products/categories.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ The relation is implemented in the Product entity. You can access the product
The parent-child hierarchy is represented in the `ProductCategory` entity through the following relations:

- You can access the parent of a category by expanding the `parent_category` relation and accessing `category.parent_category`. You can also access the ID of the parent category by accessing `category.parent_category_id`. If a category doesn’t have a parent, the relation and the ID will be `null`.
- You can access the children of a category by expanding the `category_children` relation and accessing `category.category_children`. If a category doesn’t have children, the relation will be an empty array. By default, when expanding this relation in Product Category endpoints, only the immediate child categories are returned. If you want to get the entire heirarchy of child categories, you must pass the `include_descendants_tree` flag to the endpoint setting its value to `true`.
- You can access the children of a category by expanding the `category_children` relation and accessing `category.category_children`. If a category doesn’t have children, the relation will be an empty array. By default, when expanding this relation in Product Category endpoints, only the immediate child categories are returned. If you want to get the entire hierarchy of child categories, you must pass the `include_descendants_tree` flag to the endpoint setting its value to `true`.

Aside from these relations, the `mpath` attribute, which is a [Materialized Path](https://typeorm.io/tree-entities#materialized-path-aka-path-enumeration) that is automatically generated by Typeorm, can be used to query deep trees faster.

Expand Down
2 changes: 1 addition & 1 deletion docs/content/modules/users/admin/manage-profile.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
description: 'Learn how to implement user profile management features using the admin APIs. This includes user authentication, updating the profile, and reseting the password.'
description: 'Learn how to implement user profile management features using the admin APIs. This includes user authentication, updating the profile, and resetting the password.'
addHowToData: true
---

Expand Down
2 changes: 1 addition & 1 deletion docs/content/plugins/analytics/segment.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ The `SegmentService` also provides the method `identify` to tie a user to their

After adding the above subscriber, run your backend again if it isn’t running and create a customer using the REST APIs or one of the Medusa storefronts. If you check the Debugger in your Segment source, you should see a new event “Customer Created” tracked. If you click on it, you’ll see the data you passed to the `track` method.

![The customer created event is recoreded on the Segment source](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000759/Medusa%20Docs/Segment/4LD41xE_qungdw.png)
![The customer created event is recorded on the Segment source](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000759/Medusa%20Docs/Segment/4LD41xE_qungdw.png)

---

Expand Down
2 changes: 1 addition & 1 deletion docs/content/plugins/cms/contentful/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ Using the Medusa admin, you can add products to your Medusa backend. This will t

This section explains how you can establish a two-way sync between Medusa and Contentful. This would ensure that not only is the data updated from the Medusa backend to Contentful, but also ensure the updates are relayed from Contentful to the Medusa backend.

However, to perform this sync, it's required that you deploy your backend so that it can be publically accessible. You can learn how to do that through the [backend deployment](../../../deployments/server/index.mdx) guides.
However, to perform this sync, it's required that you deploy your backend so that it can be publicly accessible. You can learn how to do that through the [backend deployment](../../../deployments/server/index.mdx) guides.

Configuring two-way sync requires configuring Webhooks in Contentful. To do that:

Expand Down
2 changes: 1 addition & 1 deletion docs/content/plugins/notifications/slack.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The notification contains details about the order including:

The plugin registers a subscriber to the `order.placed` event. When an order is placed, the subscriber handler method uses the ID of the order to retrieve order details mentioned above.

Then, the order notificaiton is sent to Slack using Webhooks. So, you'll need to create a Slack App, add it into your workspace, and activate Incoming Webhooks.
Then, the order notification is sent to Slack using Webhooks. So, you'll need to create a Slack App, add it into your workspace, and activate Incoming Webhooks.

---

Expand Down
2 changes: 1 addition & 1 deletion docs/content/recipes/subscriptions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ There are different ways to implement subscriptions in your Medusa backend. This

Stripe provides a [subscription payments](https://stripe.com/docs/billing/subscriptions/overview) that allows you to authorize payment on a subscription basis within Stripe. Stripe then handles checking for recurring payments and capturing payment at the specified interval.

This approach allows you to deligate the complications of implementing the subscription logic to Stripe, but does not support using other payment providers.
This approach allows you to delegate the complications of implementing the subscription logic to Stripe, but does not support using other payment providers.

Medusa provides a Stripe plugin, however, it doesn't handle subscriptions. You can either use that plugin to add the subscription feature on top of it, or create a custom Stripe Subscription payment provider.

Expand Down
Loading
Loading