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

Fix multiple typos in medusa docs #5854

Merged
merged 2 commits into from
Dec 13, 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 www/apps/docs/content/create-medusa-app.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ In your terminal, run the following command:
<Details className="border-t-0">
<Summary>Example: Connect to a Supabase Database</Summary>

If you want to connect to a Supabase database, you must use the `--db-url` option with its value beign the connection URL to your Supabase database. For example:
If you want to connect to a Supabase database, you must use the `--db-url` option with its value being the connection URL to your Supabase database. For example:

```bash
npx create-medusa-app@latest --db-url postgresql://postgres:<password>@<host>.supabase.co:5432/postgres
Expand Down
12 changes: 6 additions & 6 deletions www/apps/docs/content/development/api-routes/create.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -546,13 +546,13 @@ After using `MedusaError`, the returned error in the response provides a clearer
- `MedusaError.Types.DB_ERROR`: Sets the response code to `500`.
- `MedusaError.Types.DUPLICATE_ERROR`: Sets the response code to `422`.
- `MedusaError.Types.INVALID_ARGUMENT`
- `MedusaError.Types.INVALID_DATA`: Sets the resposne code to `400`.
- `MedusaError.Types.UNAUTHORIZED`: Sets the resposne code to `401`.
- `MedusaError.Types.INVALID_DATA`: Sets the response code to `400`.
- `MedusaError.Types.UNAUTHORIZED`: Sets the response code to `401`.
- `MedusaError.Types.NOT_FOUND`: Sets the response code to `404`.
- `MedusaError.Types.NOT_ALLOWED`: Sets the resposne code to `400`.
- `MedusaError.Types.NOT_ALLOWED`: Sets the response code to `400`.
- `MedusaError.Types.UNEXPECTED_STATE`
- `MedusaError.Types.CONFLICT`: Sets the resposne code to `409`.
- `MedusaError.Types.PAYMENT_AUTHORIZATION_ERROR`: Sets the resposne code to `422`.
- `MedusaError.Types.CONFLICT`: Sets the response code to `409`.
- `MedusaError.Types.PAYMENT_AUTHORIZATION_ERROR`: Sets the response code to `422`.

</Details>

Expand Down Expand Up @@ -603,7 +603,7 @@ export const GET = wrapHandler(async (
req: MedusaRequest,
res: MedusaResponse
): Promise<void> => {
throw new Error("An error occured")
throw new Error("An error occurred")
})

```
Expand Down
2 changes: 1 addition & 1 deletion www/apps/docs/content/development/backend/install.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ If you run into any errors while installing the CLI tool, check out the [trouble
medusa new my-medusa-store # or npx @medusajs/medusa-cli new
```

You'll then be asked to specify your PostgreSQL database credentials. You can choose "Continue" to use the default credentials shown in the terminal, choose "Change credentials" to specify your PostgreSQL credentails, or choose "Skip database setup" to create the database later.
You'll then be asked to specify your PostgreSQL database credentials. You can choose "Continue" to use the default credentials shown in the terminal, choose "Change credentials" to specify your PostgreSQL credentials, or choose "Skip database setup" to create the database later.

:::warning

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ In this document, you'll learn what repositories are, how to use them within you

Repositories provide generic helper methods for entities. For example, you can use the `find` method to retrieve all entities with pagination, or `findOne` to retrieve a single entity record.

Repostories are [Typeorm repositories](https://typeorm.io/working-with-repository), so you can refer to Typeorm's documentation on all available methods.
Repositories are [Typeorm repositories](https://typeorm.io/working-with-repository), so you can refer to Typeorm's documentation on all available methods.

By default, you don't need to create a repository for your custom entities. You can retrieve the default repository of an entity using the Entity Manager. You should only create a repository if you want to implement custom methods in it.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ The exported configuration object of type `SubscriberConfig` must include the fo

### Subscriber Handler Function

The default-export of the subscriber file is a handler function that is executed when the events specified in the exported configuration is triggerd.
The default-export of the subscriber file is a handler function that is executed when the events specified in the exported configuration is triggered.

The function accepts a parameter of type `SubscriberArgs`, which has the following properties:

Expand Down Expand Up @@ -88,7 +88,7 @@ If you don't pass a subscriber ID to the subscriber configurations, the name of

## Caveats for Local Event Bus

If you use the `event-bus-local` as your event bus sevice, note the following:
If you use the `event-bus-local` as your event bus service, note the following:

- The `subscriberId` passed in the context is overwritten to a random ID when using `event-bus-local`. So, setting the subscriber ID in the context won't have any effect in this case.
- The `eventName` passed to the handler function will be `undefined` when using `event-bus-local` as it doesn't pass the event name properly.
Expand Down
4 changes: 2 additions & 2 deletions www/apps/docs/content/development/events/events-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ Object of the following format:
</td>
<td>

Triggered after the `preProcessBatchJob` of a batch job stategy is done executing.
Triggered after the `preProcessBatchJob` of a batch job strategy is done executing.

</td>
<td>
Expand Down Expand Up @@ -2012,7 +2012,7 @@ In addition, an error object is passed within the same object as the Payment Pro
//... other payment fields
error: {
name, //string
nessage, //string
message, //string
stack, //(optional) string
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ Every fulfillment provider is registered under two names:
</td>
<td>

By default, it's `SINGLETON` unless defined differently within the fulfillemnt provider service.
By default, it's `SINGLETON` unless defined differently within the fulfillment provider service.

</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion www/apps/docs/content/development/logging/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export default async (
await productService.count()
}`)
} catch (e) {
logger.failure(activityId, `An error occurrect: ${e}`)
logger.failure(activityId, `An error occurred: ${e}`)
}

logger.success(activityId, "Ending loader")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ You can retrieve a list of publishable API keys by sending a request to the [Lis
import { PublishableApiKey } from "@medusajs/medusa"
import { useAdminPublishableApiKeys } from "medusa-react"

const PublishabelApiKeys = () => {
const PublishableApiKeys = () => {
const { publishable_api_keys, isLoading } =
useAdminPublishableApiKeys()

Expand All @@ -106,7 +106,7 @@ You can retrieve a list of publishable API keys by sending a request to the [Lis
)
}

export default PublishabelApiKeys
export default PublishableApiKeys
```

</TabItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ You can see examples of scheduled job expression patterns on [crontab guru](http

### Scheduled Job Handler Function

The default-export of the scheduled job file is a handler function that is executed when the events specified in the exported configuration is triggerd.
The default-export of the scheduled job file is a handler function that is executed when the events specified in the exported configuration is triggered.

The function accepts a parameter of type `ScheduledJobArgs`, which has the following properties:

Expand Down
2 changes: 1 addition & 1 deletion www/apps/docs/content/js-client/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ medusa.admin.products.list({

### Selecting Multiple Fields

You can pass more than one field by seperating the field names in the `fields` query parameter with a comma.
You can pass more than one field by separating the field names in the `fields` query parameter with a comma.

For example, to select the `title` and `handle` of products:

Expand Down
4 changes: 2 additions & 2 deletions www/apps/docs/content/medusa-react/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ The hook accepts the following parameters:

1. `path`: (required) the first parameter is a string indicating the path of your API Route. For example, if you have custom API Routes that begin with `/admin/vendors`, the value of this parameter would be `vendors`. The `/admin` prefix will be added automatically.
2. `queryKey`: (required) the second parameter is a string used to generate query keys, which are used by Tanstack Query for caching. When the mutation succeeds, the key will be automatically invalidated.
3. `relatedDomains`: (optional) the third parameter is an object that can be used to specify domains related to this custom hook. This will ensure that Tanstack Query invalides the keys for those domains when your custom mutations succeed. For example, if your custom API Route is related to products, you can pass `["products"]` as the value of this parameter. Then, when you use your custom mutation and it succeeds, the product's key `adminProductKeys.all` will be invalidated automatically, and all products will be re-fetched.
3. `relatedDomains`: (optional) the third parameter is an object that can be used to specify domains related to this custom hook. This will ensure that Tanstack Query invalidates the keys for those domains when your custom mutations succeed. For example, if your custom API Route is related to products, you can pass `["products"]` as the value of this parameter. Then, when you use your custom mutation and it succeeds, the product's key `adminProductKeys.all` will be invalidated automatically, and all products will be re-fetched.
4. `options`: (optional) the fourth parameter is an object of [Mutation options](https://tanstack.com/query/v4/docs/react/reference/useMutation).

The request returns an object containing keys like `mutation` which is a function that can be used to send the `POST` request at a later point. You can learn more about the returned object's properties in [TanStack Query's documentation](https://tanstack.com/query/v4/docs/react/reference/useMutation).
Expand Down Expand Up @@ -431,7 +431,7 @@ The hook accepts the following parameters:

1. `path`: (required) the first parameter is a string indicating the path of your API Route. For example, if you have custom API Routes that begin with `/admin/vendors`, the value of this parameter would be `vendors`. The `/admin` prefix will be added automatically.
2. `queryKey`: (required) the second parameter is a string used to generate query keys, which are used by Tanstack Query for caching. When the mutation succeeds, the key will be automatically invalidated.
3. `relatedDomains`: (optional) the third parameter is an object that can be used to specify domains related to this custom hook. This will ensure that Tanstack Query invalides the keys for those domains when your custom mutations succeed. For example, if your custom API Route is related to products, you can pass `["products"]` as the value of this parameter. Then, when you use your custom mutation and it succeeds, the product's key `adminProductKeys.all` will be invalidated automatically, and all products will be re-fetched.
3. `relatedDomains`: (optional) the third parameter is an object that can be used to specify domains related to this custom hook. This will ensure that Tanstack Query invalidates the keys for those domains when your custom mutations succeed. For example, if your custom API Route is related to products, you can pass `["products"]` as the value of this parameter. Then, when you use your custom mutation and it succeeds, the product's key `adminProductKeys.all` will be invalidated automatically, and all products will be re-fetched.
4. `options`: (optional) the fourth parameter is an object of [Mutation options](https://tanstack.com/query/v4/docs/react/reference/useMutation).

The request returns an object containing keys like `mutation` which is a function that can be used to send the `DELETE` request at a later point. You can learn more about the returned object's properties in [TanStack Query's documentation](https://tanstack.com/query/v4/docs/react/reference/useMutation).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ You can create a cart with the following code snippet:
<TabItem value="fetch" label="Fetch API">

```ts
fetch(`<BACKEND_URLL>/store/carts`, {
fetch(`<BACKEND_URL>/store/carts`, {
method: "POST",
credentials: "include",
})
Expand Down Expand Up @@ -161,7 +161,7 @@ Otherwise, you can assign it a specific region during creation:
<TabItem value="fetch" label="Fetch API">

```jsx
fetch(`<BACKEND_URLL>/store/carts`, {
fetch(`<BACKEND_URL>/store/carts`, {
method: "POST",
credentials: "include",
headers: {
Expand Down Expand Up @@ -236,7 +236,7 @@ You can retrieve the cart at any given point using its ID with the following cod
const id = localStorage.getItem("cart_id")

if (id) {
fetch(`<BACKEND_URLL>/store/carts/${id}`, {
fetch(`<BACKEND_URL>/store/carts/${id}`, {
credentials: "include",
})
.then((response) => response.json())
Expand Down Expand Up @@ -302,7 +302,7 @@ You can use the following snippet to update any of the cart’s data:
<TabItem value="fetch" label="Fetch API">

```ts
fetch(`<BACKEND_URLL>/store/carts/${cartId}`, {
fetch(`<BACKEND_URL>/store/carts/${cartId}`, {
method: "POST",
credentials: "include",
headers: {
Expand Down Expand Up @@ -368,7 +368,7 @@ You can do that using the same update operation:
<TabItem value="fetch" label="Fetch API">

```ts
fetch(`<BACKEND_URLL>/store/carts/${cartId}`, {
fetch(`<BACKEND_URL>/store/carts/${cartId}`, {
method: "POST",
credentials: "include",
headers: {
Expand Down Expand Up @@ -430,7 +430,7 @@ You can do that using the same update operation:
<TabItem value="fetch" label="Fetch API">

```ts
fetch(`<BACKEND_URLL>/store/carts/${cartId}`, {
fetch(`<BACKEND_URL>/store/carts/${cartId}`, {
method: "POST",
credentials: "include",
headers: {
Expand Down Expand Up @@ -492,7 +492,7 @@ To create a line item of a product and add it to a cart, you can use the followi
<TabItem value="fetch" label="Fetch API">

```jsx
fetch(`<BACKEND_URLL>/store/carts/${cartId}/line-items`, {
fetch(`<BACKEND_URL>/store/carts/${cartId}/line-items`, {
method: "POST",
credentials: "include",
headers: {
Expand Down Expand Up @@ -568,7 +568,7 @@ To update a line item's quantity in the cart, you can use the following code sni
<!-- eslint-disable max-len -->

```ts
fetch(`<BACKEND_URLL>/store/carts/${cartId}/line-items/${lineItemId}`, {
fetch(`<BACKEND_URL>/store/carts/${cartId}/line-items/${lineItemId}`, {
method: "POST",
credentials: "include",
headers: {
Expand Down Expand Up @@ -632,7 +632,7 @@ To delete a line item from the cart, you can use the following code snippet:
<!-- eslint-disable max-len -->

```ts
fetch(`<BACKEND_URLL>/store/carts/${cartId}/line-items/${lineItemId}`, {
fetch(`<BACKEND_URL>/store/carts/${cartId}/line-items/${lineItemId}`, {
method: "DELETE",
credentials: "include",
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ To send an email or another type of notification method, you must have a notific

---

## Methed 1: Using a Subscriber
## Method 1: Using a Subscriber

To subscribe to and handle an event, you must create a [subscriber](../../../development/events/subscribers.mdx).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ You can create a fulfillment by sending a request to the [Create a Fulfillment A
```tsx
import { useAdminCreateFulfillment } from "medusa-react"

const CreateFuilfillment = () => {
const CreateFullfillment = () => {
const createFulfillment = useAdminCreateFulfillment(
orderId
)
Expand All @@ -752,7 +752,7 @@ You can create a fulfillment by sending a request to the [Create a Fulfillment A
// ...
}

export default CreateFuilfillment
export default CreateFullfillment
```

</TabItem>
Expand Down
2 changes: 1 addition & 1 deletion www/apps/docs/content/modules/taxes/inclusive-pricing.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ Each line item returned in any of the cart’s requests has total fields related
- `tax_total`: The total tax amount applied on the original price taking into account any applied discounts as well.
- `original_tax_total`: The total tax amount applied on the original price without taking into account any applied discounts.
- `subtotal`: The total of the line item’s price subtracting the amount in `original_tax_total`.
- `origial_total`: The `subtotal` including the `original_tax_total` amount.
- `original_total`: The `subtotal` including the `original_tax_total` amount.

If tax inclusivity is enabled for the line item, `unit_price` will include the tax amount. The tax amount, which will also be the value of `tax_total`, is calculated using [Medusa’s formula for tax inclusive pricing](#tax-amount-calculation-formula) based on the line item’s tax rates. The calculation takes into account any discounts applied on the item, which means the discount amount is deducted from the original price.

Expand Down
2 changes: 1 addition & 1 deletion www/apps/docs/content/plugins/fulfillment/manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ Then, you must enable the Manual Fulfillment Provider in at least one region to

After enabling the provider, you must add shipping options for that provider. You can also do that using either the [Medusa Admin](../../user-guide/regions/shipping-options.mdx) or the [Admin REST APIs](../../modules/regions-and-currencies/admin/manage-regions.mdx#add-a-shipping-option-to-a-region).

Finally, try to place an order using either a [storefront](../../starters/nextjs-medusa-starter.mdx) or the [Store APIs](https://docs.medusajs.com/api/store). You should be able to use the shipping options you created for the fullfilment provider.
Finally, try to place an order using either a [storefront](../../starters/nextjs-medusa-starter.mdx) or the [Store APIs](https://docs.medusajs.com/api/store). You should be able to use the shipping options you created for the fulfillment provider.
2 changes: 1 addition & 1 deletion www/apps/docs/content/plugins/fulfillment/webshipper.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ Then, you must enable the Webshipper Fulfillment Provider in at least one region

After enabling the provider, you must add shipping options for that provider. You can also do that using either the [Medusa Admin](../../user-guide/regions/shipping-options.mdx) or the [Admin REST APIs](../../modules/regions-and-currencies/admin/manage-regions.mdx#add-a-shipping-option-to-a-region).

Finally, try to place an order using either a [storefront](../../starters/nextjs-medusa-starter.mdx) or the [Store APIs](https://docs.medusajs.com/api/store). You should be able to use the shipping options you created for the fullfilment provider.
Finally, try to place an order using either a [storefront](../../starters/nextjs-medusa-starter.mdx) or the [Store APIs](https://docs.medusajs.com/api/store). You should be able to use the shipping options you created for the fulfillment provider.

---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ After you update the quantity, you can see the `restock-notification.restocked`

:::note

The SendGrid plugin already listens to and handles the `restock-notification.restocked` event. So, if you install it you don't need to manually create a subscriber that handles this event as explained here. This example is only provided for reference on how you can send a notification to the customer using a Notication plugin.
The SendGrid plugin already listens to and handles the `restock-notification.restocked` event. So, if you install it you don't need to manually create a subscriber that handles this event as explained here. This example is only provided for reference on how you can send a notification to the customer using a Notification plugin.

:::

Expand Down
4 changes: 2 additions & 2 deletions www/apps/docs/content/upgrade-guides/medusa-ui/2-0-0.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ npm install @medusajs/ui@2.0.0

The [Button](https://docs.medusajs.com/ui/components/button) component has been split into two components: `Button` and `IconButton`.

The `Button` no longer supports the `format` property that was periously used to specify if a button should be styled as a icon button.
The `Button` no longer supports the `format` property that was previously used to specify if a button should be styled as a icon button.

Instead, use the `IconButton` component for this purpose.

Expand Down Expand Up @@ -66,7 +66,7 @@ The [Tabs](https://docs.medusajs.com/ui/components/tabs) component allows you to

The [ProgressTabs](https://docs.medusajs.com/ui/components/progress-tabs) component is a new component that can be used to render a set of tab panels with a progress indicator. It is specifically designed to be used for implementing multi-step tasks.

### `CurrencyInpput` Component
### `CurrencyInput` Component

The [CurrencyInput](https://docs.medusajs.com/ui/components/currency-input) component is a new component that can be used to render a currency input field. It is specifically designed to be used for implementing currency inputs, such as money amounts.

Expand Down
Loading