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: add integrations page #7421

Merged
merged 3 commits into from
May 28, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ By default, Medusa uses the In-Memory Cache Module. This module uses a plain Jav

This is useful for development. However, for production, it's highly recommended to use other Cache Modules, such as the Redis Cache Module.

<ChildDocs type="item" filters={["Guides"]} onlyTopLevel={true} />
<ChildDocs type="item" hideItems={["Guides"]} onlyTopLevel={true} />

---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ By default, Medusa uses the Local Event Module. This module uses Node’s EventE

This is useful for development. However, for production, it’s highly recommended to use other Event Modules, Redis Event Module.

<ChildDocs type="item" filters={["Guides"]} onlyTopLevel={true} />
<ChildDocs type="item" hideItems={["Guides"]} onlyTopLevel={true} />

---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ By default, Medusa uses the Local File Module. This module uploads files to the

This is useful for development. However, for production, it’s highly recommended to use other File Modules, such as the S3 Module.

<ChildDocs type="item" filters={["Guides"]} onlyTopLevel={true} />
<ChildDocs type="item" hideItems={["Guides"]} onlyTopLevel={true} />

---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ By default, Medusa uses the Local Notification Module which only simulates sendi

Medusa provides other Notification Modules that actually send notifications, such as the SendGrid Notification Provider Module.

<ChildDocs type="item" filters={["Guides"]} onlyTopLevel={true} />
<ChildDocs type="item" hideItems={["Guides"]} onlyTopLevel={true} />

---

Expand Down
2 changes: 1 addition & 1 deletion www/apps/resources/app/architectural-modules/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ export const metadata = {

This section includes documentation for official Medusa architectural modules.

<ChildDocs filters={["Guides"]} />
<ChildDocs hideItems={["Guides"]} />
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ Workflow engine modules handle tracking and recording the transactions and statu

Medusa uses the In-Memory Workflow Engine Module by default. For production purposes, it's recommended to use the Redis Engine Module instead.

<ChildDocs type="item" filters={["Guides"]} onlyTopLevel={true} />
<ChildDocs type="item" hideItems={["Guides"]} onlyTopLevel={true} />
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
import { ChildDocs } from "docs-ui"

export const metadata = {
title: `Payment Provider`,
title: `Payment Provider Module`,
}

# {metadata.title}

In this document, you’ll learn what a payment provider is.
In this document, you’ll learn what a payment provider module is.

## What's a Payment Provider?
## What's a Payment Provider Module?

A payment provider handles payment processing. It can integrate third-party payment providers, such as Stripe or PayPal.
A payment provider module registers a payment provider that handles payment processing. It can integrate third-party payment providers, such as Stripe.

To authorize a payment amount with a payment provider, a payment session is created and associated with that payment provider. The payment provider is then used to handle the authorization.

After the payment session is authorized, the payment provider is associated with the resulting payment and handles its payment processing, such as to capture or refund payment.

### List of Payment Provider Modules

<ChildDocs type="item" />

---

## System Payment Provider
Expand All @@ -24,7 +30,7 @@ The Payment Module provides a `system` payment provider that acts as a placehold

## How are Payment Providers Created?

A payment provider is a TypeScript or JavaScript class that extends the `AbstractPaymentProvider` imported from `@medusajs/utils`. It can then be used in a payment plugin or exported in a provider module.
A payment provider is a TypeScript or JavaScript class that extends the `AbstractPaymentProvider` imported from `@medusajs/utils`. It can then be exported as the main service of a module.

<Note title="Tip">

Expand Down
31 changes: 31 additions & 0 deletions www/apps/resources/app/integrations/page.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { ChildDocs } from "docs-ui"

export const metadata = {
title: `Integrations`,
}

# {metadata.title}

Find in this document Medusa's modules that integrate third-party services and systems.

## Payment

Learn how to create a payment provider in [this guide](/references/payment/provider).

<ChildDocs showItems={["Payment"]} hideTitle />

---

## Notification

Learn how to create a payment provider in [this guide](/references/notification-provider-module).

<ChildDocs showItems={["Notification"]} hideTitle />

---

## File

Learn how to create a payment provider in [this guide](/references/file-provider-module).

<ChildDocs showItems={["File"]} hideTitle />
35 changes: 20 additions & 15 deletions www/apps/resources/app/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
UsersSolid,
PuzzleSolid,
EnvelopeSolid,
MagnifyingGlass,
ArrowDownTray,
ChartBar,
Text,
Expand All @@ -17,7 +16,9 @@ import {
NextJs,
BuildingStorefront,
CreditCardSolid,
ClockSolid
ClockSolid,
DocumentTextSolid,
Stripe
} from "@medusajs/icons"

# Medusa Learning Resources
Expand Down Expand Up @@ -69,34 +70,38 @@ Follow the [Medusa Book](https://medusa-docs-v2-git-docs-v2-medusajs.vercel.app)
}
]} />

{/* ## Plugins
---

## Integrations

<CardList items={[
{
startIcon: <EnvelopeSolid />,
title: "SendGrid",
href: "/plugins/notifications/sendgrid",
startIcon: <Stripe className="[&>path]:fill-medusa-fg-subtle" />,
title: "Stripe",
href: "/commerce-modules/payment/payment-provider/stripe",
showLinkIcon: false
},
{
startIcon: <MagnifyingGlass />,
title: "MeiliSearch",
href: "/plugins/search/meilisearch",
startIcon: <EnvelopeSolid />,
title: "SendGrid",
href: "/architectural-modules/notification/sendgrid",
showLinkIcon: false
},
{
startIcon: <ChartBar />,
title: "Segment",
href: "/plugins/analytics/segment",
startIcon: <DocumentTextSolid />,
title: "S3",
href: "/architectural-modules/file/s3",
showLinkIcon: false
},
{
startIcon: <SquaresPlusSolid />,
title: "More Plugins",
href: "/plugins",
title: "More Integrations",
href: "/integrations",
showLinkIcon: false
}
]} /> */}
]} />

---

## SDKs and Tools

Expand Down
4 changes: 4 additions & 0 deletions www/apps/resources/generated/files-map.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -807,6 +807,10 @@ export const filesMap = [
"filePath": "/www/apps/resources/app/globals.css",
"pathname": "/"
},
{
"filePath": "/www/apps/resources/app/integrations/page.mdx",
"pathname": "/integrations"
},
{
"filePath": "/www/apps/resources/app/js-client/page.mdx",
"pathname": "/js-client"
Expand Down
67 changes: 65 additions & 2 deletions www/apps/resources/generated/sidebar.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2892,8 +2892,16 @@ export const generatedSidebar = [
"loaded": true,
"isPathHref": true,
"path": "/commerce-modules/payment/payment-provider",
"title": "Payment Provider",
"children": []
"title": "Payment Provider Module",
"children": [
{
"loaded": true,
"isPathHref": true,
"path": "/commerce-modules/payment/payment-provider/stripe",
"title": "Stripe",
"children": []
}
]
},
{
"loaded": true,
Expand Down Expand Up @@ -5672,6 +5680,61 @@ export const generatedSidebar = [
}
]
},
{
"loaded": true,
"isPathHref": true,
"path": "/integrations",
"title": "Integrations",
"isChildSidebar": true,
"hasTitleStyling": true,
"children": [
{
"loaded": true,
"isPathHref": true,
"title": "File",
"hasTitleStyling": true,
"children": [
{
"loaded": true,
"isPathHref": true,
"path": "/architectural-modules/file/s3",
"title": "AWS S3 (and Compatible APIs)",
"children": []
}
]
},
{
"loaded": true,
"isPathHref": true,
"title": "Notification",
"hasTitleStyling": true,
"children": [
{
"loaded": true,
"isPathHref": true,
"path": "/architectural-modules/notification/sendgrid",
"title": "SendGrid",
"children": []
}
]
},
{
"loaded": true,
"isPathHref": true,
"title": "Payment",
"hasTitleStyling": true,
"children": [
{
"loaded": true,
"isPathHref": true,
"path": "/commerce-modules/payment/payment-provider/stripe",
"title": "Stripe",
"children": []
}
]
}
]
},
{
"loaded": true,
"isPathHref": true,
Expand Down
46 changes: 45 additions & 1 deletion www/apps/resources/sidebar.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,13 @@ export const sidebar = sidebarAttachHrefCommonOptions([
},
{
path: "/commerce-modules/payment/payment-provider",
title: "Payment Provider",
title: "Payment Provider Module",
children: [
{
path: "/commerce-modules/payment/payment-provider/stripe",
title: "Stripe",
},
],
},
{
path: "/commerce-modules/payment/payment-flow",
Expand Down Expand Up @@ -1169,6 +1175,44 @@ export const sidebar = sidebarAttachHrefCommonOptions([
},
],
},
{
path: "/integrations",
title: "Integrations",
isChildSidebar: true,
hasTitleStyling: true,
children: [
{
title: "File",
hasTitleStyling: true,
children: [
{
path: "/architectural-modules/file/s3",
title: "AWS S3 (and Compatible APIs)",
},
],
},
{
title: "Notification",
hasTitleStyling: true,
children: [
{
path: "/architectural-modules/notification/sendgrid",
title: "SendGrid",
},
],
},
{
title: "Payment",
hasTitleStyling: true,
children: [
{
path: "/commerce-modules/payment/payment-provider/stripe",
title: "Stripe",
},
],
},
],
},
{
title: "SDKs and Tools",
hasTitleStyling: true,
Expand Down
Loading
Loading