docs: generate references manually for 2.1.1 (#10534)
* docs: generate references manually for 2.1.1 * re-generate for core-flows * Revert "re-generate for core-flows" This reverts commit ff785c80214dc6125e2da4c6e8a674a87b03e9dd.
This commit is contained in:
1 parent
482929f74d
commit
ab1bfb966d
1109 files changed
+348717
-331421
No files matched your search
@@ -6,12 +6,58 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
- [ProductStatus](../ProductUtils/enums/utils.ProductUtils.ProductStatus/page.mdx)
|
||||
|
||||
## Functions
|
||||
|
||||
- [getTotalVariantAvailability](page.mdx#gettotalvariantavailability)
|
||||
- [getVariantAvailability](page.mdx#getvariantavailability)
|
||||
|
||||
## Variables
|
||||
|
||||
- [ProductEvents](page.mdx#productevents)
|
||||
|
||||
___
|
||||
|
||||
## Functions
|
||||
|
||||
### getTotalVariantAvailability
|
||||
|
||||
Computes the total availability for a list of variants across all stock locations
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"query","type":"Omit<[RemoteQueryFunction](../../types/ModulesSdkTypes/types/types.ModulesSdkTypes.RemoteQueryFunction/page.mdx), symbol>","description":"The Query function","optional":false,"defaultValue":"","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<any>","description":"Query wrapper to provide specific GraphQL like API around remoteQuery.query","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"data","type":"[TotalVariantAvailabilityData](../types/utils.TotalVariantAvailabilityData/page.mdx)","description":"An object containing the variant ids to compute the availability for","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"variant_ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="getTotalVariantAvailability"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<object>","optional":false,"defaultValue":"","description":"the total availability for the given variants","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="getTotalVariantAvailability"/>
|
||||
|
||||
### getVariantAvailability
|
||||
|
||||
Computes the varaint availability for a list of variants in a given sales channel
|
||||
|
||||
The availability algorithm works as follows:
|
||||
1. For each variant, we retrieve its inventory items.
|
||||
2. We calculate the available quantity for each inventory item, considering only the stock locations associated with the given sales channel.
|
||||
3. For each inventory item, we calculate the maximum deliverable quantity by dividing the available quantity by the quantity required for the variant.
|
||||
4. We take the minimum of these maximum deliverable quantities across all inventory items for the variant.
|
||||
5. This minimum value represents the overall availability of the variant in the given sales channel.
|
||||
|
||||
The algorithm takes into account:
|
||||
- Variant inventory items: The inventory records associated with each variant.
|
||||
- Required quantities: The quantity of each inventory item required to fulfill one unit of the variant.
|
||||
- Sales channels: The specific sales channel for which we're calculating availability.
|
||||
- Stock locations: The inventory locations associated with the sales channel.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"query","type":"Omit<[RemoteQueryFunction](../../types/ModulesSdkTypes/types/types.ModulesSdkTypes.RemoteQueryFunction/page.mdx), symbol>","description":"The Query function","optional":false,"defaultValue":"","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<any>","description":"Query wrapper to provide specific GraphQL like API around remoteQuery.query","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"data","type":"[VariantAvailabilityData](../types/utils.VariantAvailabilityData/page.mdx)","description":"An object containing the variant ids and the sales channel id to compute the availability for","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"variant_ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="getVariantAvailability"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<object>","optional":false,"defaultValue":"","description":"an object containing the variant ids and their availability","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="getVariantAvailability"/>
|
||||
|
||||
___
|
||||
|
||||
## Variables
|
||||
|
||||
### ProductEvents
|
||||
|
||||
Reference in new issue
Block a user