docs: correct typos in documentation (#4413)
* Correct typos in documentation * Remove changes to References directory --------- Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
@@ -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';
|
||||
@@ -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.
|
||||
|
||||
---
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user