chore(docs): Generated References (#5881)
Generated the following references: - `EventBusTypes` - `IPricingModuleService` - `ModulesSdkTypes` - `PriceListWorkflow` - `fulfillment` - `js_client` - `medusa` - `modules` - `pricing` - `services` - `types` - `workflows` Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
This commit is contained in:
co-authored by
Shahed Nasser
parent
fde1e23995
commit
2d127a4c67
@@ -221,9 +221,14 @@ module.exports = {
|
||||
"https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records",
|
||||
},
|
||||
},
|
||||
"^medusa/classes/medusa\\.(Store*|Admin*)": {
|
||||
reflectionGroups: {
|
||||
Constructors: false,
|
||||
},
|
||||
},
|
||||
|
||||
// PRICING CONFIG
|
||||
"^pricing": {
|
||||
"^(pricing|IPricingModuleService)": {
|
||||
...modulesOptions,
|
||||
frontmatterData: {
|
||||
displayed_sidebar: "pricingReference",
|
||||
|
||||
@@ -91,7 +91,7 @@ export function registerHelpers(theme: MarkdownTheme) {
|
||||
ifShowBreadcrumbsHelper(theme)
|
||||
ifShowNamedAnchorsHelper(theme)
|
||||
ifShowPageTitleHelper(theme)
|
||||
ifShowReturnsHelper()
|
||||
ifShowReturnsHelper(theme)
|
||||
ifShowTypeHierarchyHelper()
|
||||
indexSignatureTitleHelper()
|
||||
parameterTableHelper()
|
||||
@@ -126,6 +126,6 @@ export function registerHelpers(theme: MarkdownTheme) {
|
||||
featureFlagHelper()
|
||||
decrementCurrentTitleLevelHelper(theme)
|
||||
incrementCurrentTitleLevelHelper(theme)
|
||||
hasMoreThanOneSignatureHelper()
|
||||
hasMoreThanOneSignatureHelper(theme)
|
||||
ifCanShowConstructorsTitleHelper()
|
||||
}
|
||||
|
||||
+4
-1
@@ -1,10 +1,13 @@
|
||||
import { DeclarationReflection } from "typedoc"
|
||||
import * as Handlebars from "handlebars"
|
||||
import getCorrectDeclarationReflection from "../../utils/get-correct-declaration-reflection"
|
||||
import { MarkdownTheme } from "../../theme"
|
||||
|
||||
export default function () {
|
||||
export default function (theme: MarkdownTheme) {
|
||||
Handlebars.registerHelper(
|
||||
"hasMoreThanOneSignature",
|
||||
function (model: DeclarationReflection) {
|
||||
model = getCorrectDeclarationReflection(model, theme) || model
|
||||
return (model?.signatures?.length || 0) > 1
|
||||
}
|
||||
)
|
||||
|
||||
+5
-1
@@ -1,10 +1,14 @@
|
||||
import * as Handlebars from "handlebars"
|
||||
import { ReflectionKind, SignatureReflection } from "typedoc"
|
||||
import getCorrectDeclarationReflection from "../../utils/get-correct-declaration-reflection"
|
||||
import { MarkdownTheme } from "../../theme"
|
||||
|
||||
export default function () {
|
||||
export default function (theme: MarkdownTheme) {
|
||||
Handlebars.registerHelper(
|
||||
"ifShowReturns",
|
||||
function (this: SignatureReflection, options: Handlebars.HelperOptions) {
|
||||
this.parent =
|
||||
getCorrectDeclarationReflection(this.parent, theme) || this.parent
|
||||
return this.type && !this.parent?.kindOf(ReflectionKind.Constructor)
|
||||
? options.fn(this)
|
||||
: options.inverse(this)
|
||||
|
||||
+4
@@ -7,6 +7,7 @@ import {
|
||||
import { memberSymbol } from "../../utils"
|
||||
import { MarkdownTheme } from "../../theme"
|
||||
import { getHTMLChar } from "utils"
|
||||
import getCorrectDeclarationReflection from "../../utils/get-correct-declaration-reflection"
|
||||
|
||||
export default function (theme: MarkdownTheme) {
|
||||
Handlebars.registerHelper(
|
||||
@@ -14,6 +15,8 @@ export default function (theme: MarkdownTheme) {
|
||||
function (this: SignatureReflection, accessor?: string, standalone = true) {
|
||||
const { sections, expandMembers = false } =
|
||||
theme.getFormattingOptionsForLocation()
|
||||
this.parent =
|
||||
getCorrectDeclarationReflection(this.parent, theme) || this.parent
|
||||
const parentHasMoreThanOneSignature =
|
||||
Handlebars.helpers.hasMoreThanOneSignature(this.parent)
|
||||
if (
|
||||
@@ -24,6 +27,7 @@ export default function (theme: MarkdownTheme) {
|
||||
// only show title if there are more than one signatures
|
||||
return ""
|
||||
}
|
||||
|
||||
const md: string[] = []
|
||||
|
||||
if (!expandMembers) {
|
||||
|
||||
+1
-1
@@ -70,7 +70,7 @@
|
||||
|
||||
{{incrementCurrentTitleLevel}}
|
||||
|
||||
{{> member.signature showSources=false }}
|
||||
{{> member.signature showSources=false parent=../type.declaration }}
|
||||
|
||||
{{decrementCurrentTitleLevel}}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
{{#each signatures}}
|
||||
|
||||
{{> member.signature showSources=true }}
|
||||
{{> member.signature showSources=true parent=.. }}
|
||||
|
||||
{{/each}}
|
||||
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
{{{signatureTitle accessor}}}
|
||||
{{{signatureTitle accessor parent}}}
|
||||
|
||||
{{#if (getFormattingOption "expandMembers")}}
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
|
||||
{{#each declaration.signatures}}
|
||||
|
||||
{{> member.signature showSources=false }}
|
||||
{{> member.signature showSources=false parent=../declaration }}
|
||||
|
||||
{{/each}}
|
||||
|
||||
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
import { DeclarationReflection } from "typedoc"
|
||||
import { MarkdownTheme } from "../theme"
|
||||
|
||||
/**
|
||||
* Some reflections are loaded as objects rather than instances
|
||||
* of DeclarationReflection. This tries to reload the declaration reflection
|
||||
* if that's the case.
|
||||
*/
|
||||
export default function getCorrectDeclarationReflection(
|
||||
refl: unknown,
|
||||
theme: MarkdownTheme
|
||||
): DeclarationReflection | undefined {
|
||||
if (
|
||||
refl &&
|
||||
!(refl instanceof DeclarationReflection) &&
|
||||
typeof refl === "object" &&
|
||||
"id" in refl &&
|
||||
refl.id
|
||||
) {
|
||||
if (theme.reflection?.id === refl.id) {
|
||||
refl = theme.reflection!
|
||||
} else {
|
||||
refl =
|
||||
(theme.project?.getReflectionById(
|
||||
refl.id as number
|
||||
) as DeclarationReflection) || refl
|
||||
}
|
||||
} else if (!refl && theme.reflection) {
|
||||
refl = theme.reflection
|
||||
}
|
||||
|
||||
return refl as DeclarationReflection | undefined
|
||||
}
|
||||
Reference in New Issue
Block a user