Skip to content
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
8 changes: 8 additions & 0 deletions packages/cli/oas/medusa-oas-cli/redocly/redocly-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,14 @@ decorators:
- Order
AdminProductVariantInventoryItemLink:
- AdminProductVariant
AdminGiftCardInvitation:
- AdminGiftCard
AdminTransactionGroup:
- AdminStoreCreditAccount
StoreGiftCard:
- StoreGiftCardInvitation
StoreTransactionGroup:
- StoreStoreCreditAccount
theme:
openapi:
theme:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,15 @@ import dynamic from "next/dynamic"
import TagsOperationDescriptionSectionParameters from "./Parameters"
import MDXContentClient from "@/components/MDXContent/Client"
import { useArea } from "../../../../providers/area"
import { Feedback, Badge, Link, FeatureFlagNotice, H2, Tooltip } from "docs-ui"
import {
Feedback,
Badge,
Link,
FeatureFlagNotice,
H2,
Tooltip,
MarkdownContent,
} from "docs-ui"
import { usePathname } from "next/navigation"
import { TagsOperationDescriptionSectionWorkflowBadgeProps } from "./WorkflowBadge"
import { TagsOperationDescriptionSectionEventsProps } from "./Events"
Expand Down Expand Up @@ -79,6 +87,24 @@ const TagsOperationDescriptionSection = ({
</Badge>
</Tooltip>
)}
{operation["x-badges"]?.map((badge, index) => (
<Tooltip
key={index}
tooltipChildren={
<MarkdownContent
allowedElements={["a", "strong", "em", "br"]}
unwrapDisallowed={true}
>
{badge.description}
</MarkdownContent>
}
clickable={true}
>
<Badge variant={badge.variant || "neutral"} className="ml-0.5">
{badge.text}
</Badge>
</Tooltip>
))}
</H2>
<div className="my-1">
<MDXContentClient content={operation.description} />
Expand Down
54 changes: 54 additions & 0 deletions www/apps/api-reference/generated/generated-admin-sidebar.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,24 @@ const generatedgeneratedAdminSidebarSidebar = {
"loaded": false,
"showLoadingIfEmpty": true
},
{
"type": "category",
"title": "Gift Cards",
"children": [
{
"type": "link",
"path": "gift-cards_giftcard_schema",
"title": "GiftCard Object",
"loaded": true,
"badge": {
"variant": "neutral",
"text": "Schema"
}
}
],
"loaded": false,
"showLoadingIfEmpty": true
},
{
"type": "category",
"title": "Inventory Items",
Expand Down Expand Up @@ -709,6 +727,24 @@ const generatedgeneratedAdminSidebarSidebar = {
"loaded": false,
"showLoadingIfEmpty": true
},
{
"type": "category",
"title": "Store Credit Accounts",
"children": [
{
"type": "link",
"path": "store-credit-accounts_storecreditaccount_schema",
"title": "StoreCreditAccount Object",
"loaded": true,
"badge": {
"variant": "neutral",
"text": "Schema"
}
}
],
"loaded": false,
"showLoadingIfEmpty": true
},
{
"type": "category",
"title": "Stores",
Expand Down Expand Up @@ -781,6 +817,24 @@ const generatedgeneratedAdminSidebarSidebar = {
"loaded": false,
"showLoadingIfEmpty": true
},
{
"type": "category",
"title": "Transaction Groups",
"children": [
{
"type": "link",
"path": "transaction-groups_transactiongroup_schema",
"title": "TransactionGroup Object",
"loaded": true,
"badge": {
"variant": "neutral",
"text": "Schema"
}
}
],
"loaded": false,
"showLoadingIfEmpty": true
},
{
"type": "category",
"title": "Uploads",
Expand Down
66 changes: 60 additions & 6 deletions www/apps/api-reference/generated/generated-store-sidebar.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,42 @@ const generatedgeneratedStoreSidebarSidebar = {
"loaded": false,
"showLoadingIfEmpty": true
},
{
"type": "category",
"title": "Gift Card Invitations",
"children": [
{
"type": "link",
"path": "gift-card-invitations_giftcardinvitation_schema",
"title": "GiftCardInvitation Object",
"loaded": true,
"badge": {
"variant": "neutral",
"text": "Schema"
}
}
],
"loaded": false,
"showLoadingIfEmpty": true
},
{
"type": "category",
"title": "Gift Cards",
"children": [
{
"type": "link",
"path": "gift-cards_giftcard_schema",
"title": "GiftCard Object",
"loaded": true,
"badge": {
"variant": "neutral",
"text": "Schema"
}
}
],
"loaded": false,
"showLoadingIfEmpty": true
},
{
"type": "category",
"title": "Orders",
Expand Down Expand Up @@ -278,12 +314,12 @@ const generatedgeneratedStoreSidebarSidebar = {
},
{
"type": "category",
"title": "Returns",
"title": "Return Reasons",
"children": [
{
"type": "link",
"path": "returns_return_schema",
"title": "Return Object",
"path": "return-reasons_returnreason_schema",
"title": "ReturnReason Object",
"loaded": true,
"badge": {
"variant": "neutral",
Expand All @@ -296,12 +332,12 @@ const generatedgeneratedStoreSidebarSidebar = {
},
{
"type": "category",
"title": "Return Reasons",
"title": "Returns",
"children": [
{
"type": "link",
"path": "return-reasons_returnreason_schema",
"title": "ReturnReason Object",
"path": "returns_return_schema",
"title": "Return Object",
"loaded": true,
"badge": {
"variant": "neutral",
Expand Down Expand Up @@ -329,6 +365,24 @@ const generatedgeneratedStoreSidebarSidebar = {
],
"loaded": false,
"showLoadingIfEmpty": true
},
{
"type": "category",
"title": "Store Credit Accounts",
"children": [
{
"type": "link",
"path": "store-credit-accounts_storecreditaccount_schema",
"title": "StoreCreditAccount Object",
"loaded": true,
"badge": {
"variant": "neutral",
"text": "Schema"
}
}
],
"loaded": false,
"showLoadingIfEmpty": true
}
],
"custom_autogenerate": "api-ref"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
curl '{backend_url}/admin/gift-cards' \
-H 'Authorization: Bearer {access_token}'
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
curl -X POST '{backend_url}/admin/gift-cards' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"code": "{value}",
"value": 19,
"currency_code": "bwp",
"expires_at": "2025-07-20T15:47:23.951Z",
"reference_id": "{value}",
"reference": "{value}",
"line_item_id": "{value}",
"customer_id": "{value}",
"metadata": {}
}'
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
curl '{backend_url}/admin/gift-cards/{id}' \
-H 'Authorization: Bearer {access_token}'
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
curl -X POST '{backend_url}/admin/gift-cards/{id}' \
-H 'Authorization: Bearer {access_token}'
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
curl -X POST '{backend_url}/admin/gift-cards/{id}/redeem' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"customer_id": "{value}"
}'
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
curl -X POST '{backend_url}/admin/gift-cards/{id}/transfer' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"customer_id": "{value}"
}'
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
curl '{backend_url}/admin/store-credit-accounts' \
-H 'Authorization: Bearer {access_token}'
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
curl -X POST '{backend_url}/admin/store-credit-accounts' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"currency_code": "nzd",
"customer_id": "{value}"
}'
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
curl '{backend_url}/admin/store-credit-accounts/{id}' \
-H 'Authorization: Bearer {access_token}'
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
curl '{backend_url}/admin/store-credit-accounts/{id}/transactions' \
-H 'Authorization: Bearer {access_token}'
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
curl '{backend_url}/admin/transaction-groups' \
-H 'Authorization: Bearer {access_token}'
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
type: object
description: The details of the gift card to create.
x-schemaName: AdminCreateGiftCardParams
required:
- code
- value
- currency_code
- expires_at
- reference_id
- reference
- line_item_id
- customer_id
- metadata
properties:
code:
type: string
title: code
description: The gift card's code.
value:
type: number
title: value
description: The gift card's amount.
example: 20
currency_code:
type: string
title: currency_code
description: The gift card's currency code.
example: usd
expires_at:
type: string
title: expires_at
description: The date the gift card expires at.
reference_id:
type: string
title: reference_id
description: The gift card's reference ID.
reference:
type: string
title: reference
description: The gift card's reference.
line_item_id:
type: string
title: line_item_id
description: The ID of the line item associated with the gift card.
customer_id:
type: string
title: customer_id
description: The ID of the customer associated with the gift card.
metadata:
type: object
description: The gift card's metadata, can hold custom key-value pairs.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
type: object
description: The details of the store credit account to create.
x-schemaName: AdminCreateStoreCreditAccount
required:
- currency_code
- customer_id
properties:
currency_code:
type: string
title: currency_code
description: The store credit account's currency code.
example: usd
customer_id:
type: string
title: customer_id
description: The ID of the customer that the store credit account belongs to.
metadata:
type: object
description: The store credit account's metadata, can hold custom key-value pairs.
Loading
Loading