Skip to content

Commit

Permalink
chore(docs): Generated References (#9187)
Browse files Browse the repository at this point in the history
Generated the following references:
- `modules`
  • Loading branch information
github-actions[bot] committed Sep 19, 2024
1 parent 61fd483 commit a00c2dd
Show file tree
Hide file tree
Showing 14 changed files with 21,386 additions and 20,646 deletions.
8 changes: 5 additions & 3 deletions www/apps/resources/generated/edit-dates.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ export const generatedEditDates = {
"references/medusa_config/interfaces/medusa_config.ConfigModule/page.mdx": "2024-09-03T00:11:20.891Z",
"references/medusa_config/interfaces/medusa_config.ProjectConfigOptions/page.mdx": "2024-08-28T00:11:31.266Z",
"references/modules/auth/page.mdx": "2024-08-28T00:11:06.310Z",
"references/modules/modules_sdk/page.mdx": "2024-09-17T00:11:24.783Z",
"references/modules/modules_sdk/page.mdx": "2024-09-19T00:12:25.760Z",
"references/modules_sdk/classes/modules_sdk.RemoteLink/page.mdx": "2024-09-17T00:11:24.823Z",
"references/modules_sdk/classes/modules_sdk.RemoteQuery/page.mdx": "2024-09-18T00:11:33.763Z",
"references/modules_sdk/types/modules_sdk.LinkModuleBootstrapOptions/page.mdx": "2024-09-17T00:11:24.803Z",
Expand Down Expand Up @@ -762,7 +762,7 @@ export const generatedEditDates = {
"references/core_flows/types/core_flows.UpdateOrderTaxLinesWorkflowInput/page.mdx": "2024-08-30T00:11:25.754Z",
"references/core_flows/types/core_flows.UpdateTaxLinesWorkflowInput/page.mdx": "2024-09-03T00:11:19.047Z",
"references/helper_steps/functions/helper_steps.useRemoteQueryStep/page.mdx": "2024-08-30T00:11:27.218Z",
"references/modules/types/page.mdx": "2024-09-17T00:10:57.795Z",
"references/modules/types/page.mdx": "2024-09-19T00:11:56.800Z",
"references/order/IOrderModuleService/methods/order.IOrderModuleService.cancelReturn/page.mdx": "2024-09-17T00:11:26.515Z",
"references/order/interfaces/order.CancelOrderClaimDTO/page.mdx": "2024-08-30T00:11:28.474Z",
"references/order/interfaces/order.CancelOrderExchangeDTO/page.mdx": "2024-08-30T00:11:28.478Z",
Expand Down Expand Up @@ -1743,5 +1743,7 @@ export const generatedEditDates = {
"references/workflows/types/workflows.CompensateFn/page.mdx": "2024-09-17T00:11:28.827Z",
"references/workflows/types/workflows.CreateWorkflowComposerContext/page.mdx": "2024-09-17T00:11:28.859Z",
"references/workflows/types/workflows.InvokeFn/page.mdx": "2024-09-17T00:11:28.827Z",
"references/workflows/types/workflows.StepFunctionResult/page.mdx": "2024-09-17T00:11:28.847Z"
"references/workflows/types/workflows.StepFunctionResult/page.mdx": "2024-09-17T00:11:28.847Z",
"references/types/IndexTypes/interfaces/types.IndexTypes.IIndexService/page.mdx": "2024-09-19T00:11:57.874Z",
"references/types/types.IndexTypes/page.mdx": "2024-09-19T00:11:57.871Z"
}
8 changes: 8 additions & 0 deletions www/apps/resources/generated/files-map.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15363,6 +15363,10 @@ export const filesMap = [
"filePath": "/www/apps/resources/references/types/HttpTypes/types/types.HttpTypes.TransactionStepStatus/page.mdx",
"pathname": "/references/types/HttpTypes/types/types.HttpTypes.TransactionStepStatus"
},
{
"filePath": "/www/apps/resources/references/types/IndexTypes/interfaces/types.IndexTypes.IIndexService/page.mdx",
"pathname": "/references/types/IndexTypes/interfaces/types.IndexTypes.IIndexService"
},
{
"filePath": "/www/apps/resources/references/types/InventoryTypes/interfaces/types.InventoryTypes.BulkUpdateInventoryLevelInput/page.mdx",
"pathname": "/references/types/InventoryTypes/interfaces/types.InventoryTypes.BulkUpdateInventoryLevelInput"
Expand Down Expand Up @@ -16575,6 +16579,10 @@ export const filesMap = [
"filePath": "/www/apps/resources/references/types/types.HttpTypes/page.mdx",
"pathname": "/references/types/types.HttpTypes"
},
{
"filePath": "/www/apps/resources/references/types/types.IndexTypes/page.mdx",
"pathname": "/references/types/types.IndexTypes"
},
{
"filePath": "/www/apps/resources/references/types/types.InventoryTypes/page.mdx",
"pathname": "/references/types/types.InventoryTypes"
Expand Down
91 changes: 90 additions & 1 deletion www/apps/resources/references/modules/modules_sdk/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ import { TypeList } from "docs-ui"
- [MedusaAppMigrateGenerate](page.mdx#medusaappmigrategenerate)
- [MedusaAppGetLinksExecutionPlanner](page.mdx#medusaappgetlinksexecutionplanner)
- [createQuery](page.mdx#createquery)
- [cleanGraphQLSchema](page.mdx#cleangraphqlschema)
- [gqlGetFieldsAndRelations](page.mdx#gqlgetfieldsandrelations)
- [gqlSchemaToTypes](page.mdx#gqlschematotypes)
- [graphqlSchemaToFields](page.mdx#graphqlschematofields)

___

Expand All @@ -63,7 +66,7 @@ ___

#### Properties

<TypeList types={[{"name":"Auth","type":"`string`","description":"","optional":false,"defaultValue":"\"@medusajs/auth\"","expandable":false,"children":[]},{"name":"Cache","type":"`string`","description":"","optional":false,"defaultValue":"\"@medusajs/cache-inmemory\"","expandable":false,"children":[]},{"name":"Cart","type":"`string`","description":"","optional":false,"defaultValue":"\"@medusajs/cart\"","expandable":false,"children":[]},{"name":"Customer","type":"`string`","description":"","optional":false,"defaultValue":"\"@medusajs/customer\"","expandable":false,"children":[]},{"name":"EventBus","type":"`string`","description":"","optional":false,"defaultValue":"\"@medusajs/event-bus-local\"","expandable":false,"children":[]},{"name":"Inventory","type":"`string`","description":"","optional":false,"defaultValue":"\"@medusajs/inventory-next\"","expandable":false,"children":[]},{"name":"LinkModules","type":"`string`","description":"","optional":false,"defaultValue":"\"@medusajs/link-modules\"","expandable":false,"children":[]},{"name":"Payment","type":"`string`","description":"","optional":false,"defaultValue":"\"@medusajs/payment\"","expandable":false,"children":[]},{"name":"Pricing","type":"`string`","description":"","optional":false,"defaultValue":"\"@medusajs/pricing\"","expandable":false,"children":[]},{"name":"Product","type":"`string`","description":"","optional":false,"defaultValue":"\"@medusajs/product\"","expandable":false,"children":[]},{"name":"Promotion","type":"`string`","description":"","optional":false,"defaultValue":"\"@medusajs/promotion\"","expandable":false,"children":[]},{"name":"SalesChannel","type":"`string`","description":"","optional":false,"defaultValue":"\"@medusajs/sales-channel\"","expandable":false,"children":[]},{"name":"Fulfillment","type":"`string`","description":"","optional":false,"defaultValue":"\"@medusajs/fulfillment\"","expandable":false,"children":[]},{"name":"StockLocation","type":"`string`","description":"","optional":false,"defaultValue":"\"@medusajs/stock-location-next\"","expandable":false,"children":[]},{"name":"Tax","type":"`string`","description":"","optional":false,"defaultValue":"\"@medusajs/tax\"","expandable":false,"children":[]},{"name":"User","type":"`string`","description":"","optional":false,"defaultValue":"\"@medusajs/user\"","expandable":false,"children":[]},{"name":"Workflows","type":"`string`","description":"","optional":false,"defaultValue":"\"@medusajs/workflow-engine-inmemory\"","expandable":false,"children":[]},{"name":"Region","type":"`string`","description":"","optional":false,"defaultValue":"\"@medusajs/region\"","expandable":false,"children":[]},{"name":"Order","type":"`string`","description":"","optional":false,"defaultValue":"\"@medusajs/order\"","expandable":false,"children":[]},{"name":"ApiKey","type":"`string`","description":"","optional":false,"defaultValue":"\"@medusajs/api-key\"","expandable":false,"children":[]},{"name":"Store","type":"`string`","description":"","optional":false,"defaultValue":"\"@medusajs/store\"","expandable":false,"children":[]},{"name":"Currency","type":"`string`","description":"","optional":false,"defaultValue":"\"@medusajs/currency\"","expandable":false,"children":[]},{"name":"File","type":"`string`","description":"","optional":false,"defaultValue":"\"@medusajs/file\"","expandable":false,"children":[]},{"name":"Notification","type":"`string`","description":"","optional":false,"defaultValue":"\"@medusajs/notification\"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="MODULE_PACKAGE_NAMES"/>
<TypeList types={[{"name":"Auth","type":"`string`","description":"","optional":false,"defaultValue":"\"@medusajs/auth\"","expandable":false,"children":[]},{"name":"Cache","type":"`string`","description":"","optional":false,"defaultValue":"\"@medusajs/cache-inmemory\"","expandable":false,"children":[]},{"name":"Cart","type":"`string`","description":"","optional":false,"defaultValue":"\"@medusajs/cart\"","expandable":false,"children":[]},{"name":"Customer","type":"`string`","description":"","optional":false,"defaultValue":"\"@medusajs/customer\"","expandable":false,"children":[]},{"name":"EventBus","type":"`string`","description":"","optional":false,"defaultValue":"\"@medusajs/event-bus-local\"","expandable":false,"children":[]},{"name":"Inventory","type":"`string`","description":"","optional":false,"defaultValue":"\"@medusajs/inventory-next\"","expandable":false,"children":[]},{"name":"LinkModules","type":"`string`","description":"","optional":false,"defaultValue":"\"@medusajs/link-modules\"","expandable":false,"children":[]},{"name":"Payment","type":"`string`","description":"","optional":false,"defaultValue":"\"@medusajs/payment\"","expandable":false,"children":[]},{"name":"Pricing","type":"`string`","description":"","optional":false,"defaultValue":"\"@medusajs/pricing\"","expandable":false,"children":[]},{"name":"Product","type":"`string`","description":"","optional":false,"defaultValue":"\"@medusajs/product\"","expandable":false,"children":[]},{"name":"Promotion","type":"`string`","description":"","optional":false,"defaultValue":"\"@medusajs/promotion\"","expandable":false,"children":[]},{"name":"SalesChannel","type":"`string`","description":"","optional":false,"defaultValue":"\"@medusajs/sales-channel\"","expandable":false,"children":[]},{"name":"Fulfillment","type":"`string`","description":"","optional":false,"defaultValue":"\"@medusajs/fulfillment\"","expandable":false,"children":[]},{"name":"StockLocation","type":"`string`","description":"","optional":false,"defaultValue":"\"@medusajs/stock-location-next\"","expandable":false,"children":[]},{"name":"Tax","type":"`string`","description":"","optional":false,"defaultValue":"\"@medusajs/tax\"","expandable":false,"children":[]},{"name":"User","type":"`string`","description":"","optional":false,"defaultValue":"\"@medusajs/user\"","expandable":false,"children":[]},{"name":"Workflows","type":"`string`","description":"","optional":false,"defaultValue":"\"@medusajs/workflow-engine-inmemory\"","expandable":false,"children":[]},{"name":"Region","type":"`string`","description":"","optional":false,"defaultValue":"\"@medusajs/region\"","expandable":false,"children":[]},{"name":"Order","type":"`string`","description":"","optional":false,"defaultValue":"\"@medusajs/order\"","expandable":false,"children":[]},{"name":"ApiKey","type":"`string`","description":"","optional":false,"defaultValue":"\"@medusajs/api-key\"","expandable":false,"children":[]},{"name":"Store","type":"`string`","description":"","optional":false,"defaultValue":"\"@medusajs/store\"","expandable":false,"children":[]},{"name":"Currency","type":"`string`","description":"","optional":false,"defaultValue":"\"@medusajs/currency\"","expandable":false,"children":[]},{"name":"File","type":"`string`","description":"","optional":false,"defaultValue":"\"@medusajs/file\"","expandable":false,"children":[]},{"name":"Notification","type":"`string`","description":"","optional":false,"defaultValue":"\"@medusajs/notification\"","expandable":false,"children":[]},{"name":"Index","type":"`string`","description":"","optional":false,"defaultValue":"\"@medusajs/index\"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="MODULE_PACKAGE_NAMES"/>

### ModulesDefinition

Expand Down Expand Up @@ -203,6 +206,30 @@ API wrapper around the remoteQuery with backward compatibility support

<TypeList types={[{"name":"Omit","type":"Omit&#60;[RemoteQueryFunction](../../types/ModulesSdkTypes/types/types.ModulesSdkTypes.RemoteQueryFunction/page.mdx), symbol&#62;","optional":false,"defaultValue":"","description":"API wrapper around the remoteQuery with backward compatibility support","expandable":false,"children":[{"name":"RemoteQueryFunction","type":"[RemoteQueryFunction](../../types/ModulesSdkTypes/types/types.ModulesSdkTypes.RemoteQueryFunction/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"graph","type":"[QueryGraphFunction](../../types/ModulesSdkTypes/types/types.ModulesSdkTypes.QueryGraphFunction/page.mdx)","description":"Graph function uses the remoteQuery under the hood and\nreturns a result set","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"gql","type":"(`query`: `string`, `variables?`: `Record<string, unknown>`, `options?`: [RemoteJoinerOptions](../../types/interfaces/types.RemoteJoinerOptions/page.mdx)) => Promise&#60;any&#62;","description":"Query wrapper to provide specific GraphQL like API around remoteQuery.query","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"symbol","type":"`symbol`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createQuery"/>

### cleanGraphQLSchema

#### Parameters

<TypeList types={[{"name":"schema","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="cleanGraphQLSchema"/>

#### Returns

<TypeList types={[{"name":"schema","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"notFound","type":"`Record<string, Record&#60;string, string&#62;>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="cleanGraphQLSchema"/>

<TypeList types={[{"name":"schema","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"notFound","type":"`Record<string, Record&#60;string, string&#62;>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="cleanGraphQLSchema"/>

### gqlGetFieldsAndRelations

Generate a list of fields and fields relations for a given type with the requested relations

#### Parameters

<TypeList types={[{"name":"schemaTypeMap","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"typeName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"","optional":false,"defaultValue":"[]","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="gqlGetFieldsAndRelations"/>

#### Returns

<TypeList types={[{"name":"string[]","type":"`string`[]","optional":false,"defaultValue":"","description":"Generate a list of fields and fields relations for a given type with the requested relations","expandable":false,"children":[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="gqlGetFieldsAndRelations"/>

### gqlSchemaToTypes

#### Parameters
Expand All @@ -212,3 +239,65 @@ API wrapper around the remoteQuery with backward compatibility support
#### Returns

<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="gqlSchemaToTypes"/>

### graphqlSchemaToFields

From graphql schema get all the fields for the requested type and relations

#### Example

```ts
const userModule = `
type User {
id: ID!
name: String!
blabla: WHATEVER
}
type Post {
author: User!
}
`

const postModule = `
type Post {
id: ID!
title: String!
date: String
}
type User {
posts: [Post!]!
}
type WHATEVER {
random_field: String
post: Post
}
`

const mergedSchema = mergeTypeDefs([userModule, postModule])
const schema = makeExecutableSchema({
typeDefs: mergedSchema,
})

const fields = graphqlSchemaToFields(types, "User", ["posts"])

console.log(fields)

// [
// "id",
// "name",
// "posts.id",
// "posts.title",
// "posts.date",
// ]
```

#### Parameters

<TypeList types={[{"name":"schemaTypeMap","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"typeName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"","optional":false,"defaultValue":"[]","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="graphqlSchemaToFields"/>

#### Returns

<TypeList types={[{"name":"string[]","type":"`string`[]","optional":false,"defaultValue":"","description":"From graphql schema get all the fields for the requested type and relations","expandable":false,"children":[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="graphqlSchemaToFields"/>
1 change: 1 addition & 0 deletions www/apps/resources/references/modules/types/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { TypeList } from "docs-ui"
- [FeatureFlagTypes](../../types/types.FeatureFlagTypes/page.mdx)
- [FileTypes](../../types/types.FileTypes/page.mdx)
- [HttpTypes](../../types/types.HttpTypes/page.mdx)
- [IndexTypes](../../types/types.IndexTypes/page.mdx)
- [InventoryTypes](../../types/types.InventoryTypes/page.mdx)
- [LoggerTypes](../../types/types.LoggerTypes/page.mdx)
- [ModulesSdkTypes](../../types/types.ModulesSdkTypes/page.mdx)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { TypeList } from "docs-ui"

# IIndexService

## Methods

### query

#### Parameters

<TypeList types={[{"name":"args","type":"`any`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="query"/>

#### Returns

<TypeList types={[{"name":"Promise","type":"Promise&#60;any&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"any","type":"`any`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="query"/>

### queryAndCount

#### Parameters

<TypeList types={[{"name":"args","type":"`any`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="queryAndCount"/>

#### Returns

<TypeList types={[{"name":"Promise","type":"Promise&#60;any&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"any","type":"`any`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="queryAndCount"/>
7 changes: 7 additions & 0 deletions www/apps/resources/references/types/types.IndexTypes/page.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { TypeList } from "docs-ui"

# IndexTypes

## Interfaces

- [IIndexService](../IndexTypes/interfaces/types.IndexTypes.IIndexService/page.mdx)
Loading

0 comments on commit a00c2dd

Please sign in to comment.