chore: update TSDocs for new release changes (#13317)
* chore: update TSDocs for new release changes * remove .medusa directory
This commit is contained in:
@@ -26,9 +26,21 @@ export interface GetVariantPriceSetsStepInput {
|
||||
context?: Record<string, unknown>
|
||||
}
|
||||
|
||||
/**
|
||||
* The details of the variants to get price sets for.
|
||||
*/
|
||||
export interface GetVariantPriceSetsStepBulkInput {
|
||||
/**
|
||||
* The variants to get price sets for.
|
||||
*/
|
||||
data: {
|
||||
/**
|
||||
* The ID of the variant to get the price set for.
|
||||
*/
|
||||
variantId: string
|
||||
/**
|
||||
* The context to use when calculating the price set.
|
||||
*/
|
||||
context?: Record<string, unknown>
|
||||
}[]
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ export const listShippingOptionsForOrderWorkflowId =
|
||||
"list-shipping-options-for-order"
|
||||
/**
|
||||
* This workflow lists the shipping options of an order. It's executed by the
|
||||
* [List Shipping Options Store API Route](https://docs.medusajs.com/api/store#shipping-options_getshippingoptions).
|
||||
* [List Shipping Options Store API Route](https://docs.medusajs.com/api/store#orders_getidshippingoptions).
|
||||
*
|
||||
* :::note
|
||||
*
|
||||
@@ -27,6 +27,8 @@ export const listShippingOptionsForOrderWorkflowId =
|
||||
*
|
||||
* You can use this workflow within your own customizations or custom workflows, allowing you to wrap custom logic around to retrieve the shipping options of an order
|
||||
* in your custom flows.
|
||||
*
|
||||
* @since 2.10.0
|
||||
*
|
||||
* @example
|
||||
* const { result } = await listShippingOptionsForOrderWorkflow(container)
|
||||
@@ -39,8 +41,7 @@ export const listShippingOptionsForOrderWorkflowId =
|
||||
* @summary
|
||||
*
|
||||
* List a order's shipping options.
|
||||
*
|
||||
* :::
|
||||
*
|
||||
*/
|
||||
export const listShippingOptionsForOrderWorkflow = createWorkflow(
|
||||
listShippingOptionsForOrderWorkflowId,
|
||||
|
||||
@@ -26,15 +26,72 @@ export interface RefreshOrderEditAdjustmentsWorkflowInput {
|
||||
* The order edit to refresh the adjustments for.
|
||||
*/
|
||||
order: {
|
||||
/**
|
||||
* The ID of the order.
|
||||
*/
|
||||
id: string
|
||||
/**
|
||||
* The status of the order.
|
||||
*/
|
||||
status: OrderStatus
|
||||
/**
|
||||
* The 2 character ISO code for the currency.
|
||||
*
|
||||
* @example
|
||||
* "usd"
|
||||
*/
|
||||
currency_code: string
|
||||
/**
|
||||
* The date the order was canceled at.
|
||||
*/
|
||||
canceled_at?: string | Date
|
||||
/**
|
||||
* The items in the order.
|
||||
*/
|
||||
items: ComputeActionItemLine[]
|
||||
/**
|
||||
* The promotions applied to the order.
|
||||
*/
|
||||
promotions: PromotionDTO[]
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This workflow refreshes the adjustments for an order edit. It's used by other workflows, such as
|
||||
* {@link beginOrderEditOrderWorkflow}.
|
||||
*
|
||||
* You can use this workflow within your own customizations or custom workflows, allowing you to wrap custom logic around refreshing adjustments for order edits
|
||||
* in your custom flows.
|
||||
*
|
||||
* @since 2.10.0
|
||||
*
|
||||
* @example
|
||||
* const { result } = await refreshOrderEditAdjustmentsWorkflow(container)
|
||||
* .run({
|
||||
* input: {
|
||||
* order: {
|
||||
* id: "order_123",
|
||||
* // Imported from @medusajs/framework/types
|
||||
* status: OrderStatus.PENDING,
|
||||
* currency_code: "usd",
|
||||
* items: [
|
||||
* {
|
||||
* id: "item_1",
|
||||
* quantity: 1,
|
||||
* subtotal: 10,
|
||||
* original_total: 10,
|
||||
* is_discountable: true
|
||||
* }
|
||||
* ],
|
||||
* promotions: [],
|
||||
* },
|
||||
* },
|
||||
* })
|
||||
*
|
||||
* @summary
|
||||
*
|
||||
* Refreshes adjustments for an order edit.
|
||||
*/
|
||||
export const refreshOrderEditAdjustmentsWorkflow = createWorkflow(
|
||||
refreshOrderEditAdjustmentsWorkflowId,
|
||||
function (input: WorkflowData<RefreshOrderEditAdjustmentsWorkflowInput>) {
|
||||
|
||||
@@ -8,6 +8,13 @@ export type CreateViewConfigurationStepInput = CreateViewConfigurationDTO
|
||||
|
||||
export const createViewConfigurationStepId = "create-view-configuration"
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*
|
||||
* @privateRemarks
|
||||
* Remove the `ignore` tag once the feature is ready. Otherwise,
|
||||
* it will be generated in the documentation.
|
||||
*/
|
||||
export const createViewConfigurationStep = createStep(
|
||||
createViewConfigurationStepId,
|
||||
async (data: CreateViewConfigurationStepInput, { container }) => {
|
||||
|
||||
@@ -9,6 +9,13 @@ export type SetActiveViewConfigurationStepInput = {
|
||||
|
||||
export const setActiveViewConfigurationStepId = "set-active-view-configuration"
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*
|
||||
* @privateRemarks
|
||||
* Remove the `ignore` tag once the feature is ready. Otherwise,
|
||||
* it will be generated in the documentation.
|
||||
*/
|
||||
export const setActiveViewConfigurationStep = createStep(
|
||||
setActiveViewConfigurationStepId,
|
||||
async (input: SetActiveViewConfigurationStepInput, { container }) => {
|
||||
|
||||
@@ -12,6 +12,13 @@ export type UpdateViewConfigurationStepInput = {
|
||||
|
||||
export const updateViewConfigurationStepId = "update-view-configuration"
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*
|
||||
* @privateRemarks
|
||||
* Remove the `ignore` tag once the feature is ready. Otherwise,
|
||||
* it will be generated in the documentation.
|
||||
*/
|
||||
export const updateViewConfigurationStep = createStep(
|
||||
updateViewConfigurationStepId,
|
||||
async (input: UpdateViewConfigurationStepInput, { container }) => {
|
||||
|
||||
@@ -20,6 +20,13 @@ export type CreateViewConfigurationWorkflowInput =
|
||||
|
||||
export const createViewConfigurationWorkflowId = "create-view-configuration"
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*
|
||||
* @privateRemarks
|
||||
* Remove the `ignore` tag once the feature is ready. Otherwise,
|
||||
* it will be generated in the documentation.
|
||||
*/
|
||||
export const createViewConfigurationWorkflow = createWorkflow(
|
||||
createViewConfigurationWorkflowId,
|
||||
(
|
||||
|
||||
@@ -21,6 +21,13 @@ export type UpdateViewConfigurationWorkflowInput = {
|
||||
|
||||
export const updateViewConfigurationWorkflowId = "update-view-configuration"
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*
|
||||
* @privateRemarks
|
||||
* Remove the `ignore` tag once the feature is ready. Otherwise,
|
||||
* it will be generated in the documentation.
|
||||
*/
|
||||
export const updateViewConfigurationWorkflow = createWorkflow(
|
||||
updateViewConfigurationWorkflowId,
|
||||
(
|
||||
|
||||
@@ -2,13 +2,29 @@ import { FulfillmentTypes, IFulfillmentModuleService, } from "@medusajs/framewor
|
||||
import { Modules } from "@medusajs/framework/utils"
|
||||
import { createStep, StepResponse } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
/**
|
||||
* The shipping option types to create.
|
||||
*/
|
||||
export type CreateShippingOptionTypesStepInput = FulfillmentTypes.CreateShippingOptionTypeDTO[]
|
||||
|
||||
export const createShippingOptionTypesStepId = "create-shipping-option-types"
|
||||
/**
|
||||
* This step creates one or more shipping option types.
|
||||
*
|
||||
* @since 2.10.0
|
||||
*
|
||||
* @example
|
||||
* const shippingOptionTypes = createShippingOptionTypesStep([
|
||||
* {
|
||||
* label: "Standard",
|
||||
* code: "standard",
|
||||
* description: "Ship in 2-3 days."
|
||||
* }
|
||||
* ])
|
||||
*/
|
||||
export const createShippingOptionTypesStep = createStep(
|
||||
createShippingOptionTypesStepId,
|
||||
async (data: FulfillmentTypes.CreateShippingOptionTypeDTO[], { container }) => {
|
||||
async (data: CreateShippingOptionTypesStepInput, { container }) => {
|
||||
const service = container.resolve<IFulfillmentModuleService>(Modules.FULFILLMENT)
|
||||
|
||||
const created = await service.createShippingOptionTypes(data)
|
||||
|
||||
@@ -10,6 +10,8 @@ export type DeleteShippingOptionTypesStepInput = string[]
|
||||
export const deleteShippingOptionTypesStepId = "delete-shipping-option-types"
|
||||
/**
|
||||
* This step deletes one or more shipping option types.
|
||||
*
|
||||
* @since 2.10.0
|
||||
*/
|
||||
export const deleteShippingOptionTypesStep = createStep(
|
||||
deleteShippingOptionTypesStepId,
|
||||
|
||||
@@ -19,6 +19,18 @@ export type UpdateShippingOptionTypesStepInput = {
|
||||
export const updateShippingOptionTypesStepId = "update-shipping-option-types"
|
||||
/**
|
||||
* This step updates shipping option types matching the specified filters.
|
||||
*
|
||||
* @since 2.10.0
|
||||
*
|
||||
* @example
|
||||
* const shippingOptionTypes = updateShippingOptionTypesStep({
|
||||
* selector: {
|
||||
* id: "sotype_123"
|
||||
* },
|
||||
* update: {
|
||||
* label: "Standard"
|
||||
* }
|
||||
* })
|
||||
*/
|
||||
export const updateShippingOptionTypesStep = createStep(
|
||||
updateShippingOptionTypesStepId,
|
||||
|
||||
@@ -23,20 +23,22 @@ export type CreateShippingOptionTypesWorkflowInput = {
|
||||
export const createShippingOptionTypesWorkflowId = "create-shipping-option-types"
|
||||
/**
|
||||
* This workflow creates one or more shipping option types. It's used by the
|
||||
* [Create Shipping Option Type Admin API Route](TODO HERE).
|
||||
* [Create Shipping Option Type Admin API Route](https://docs.medusajs.com/api/admin#shipping-option-types_postshippingoptiontypes).
|
||||
*
|
||||
* This workflow has a hook that allows you to perform custom actions on the created shipping option types. For example, you can pass under `additional_data` custom data that
|
||||
* allows you to create custom data models linked to the shipping option types.
|
||||
*
|
||||
* You can also use this workflow within your own custom workflows, allowing you to wrap custom logic around shipping option type creation.
|
||||
*
|
||||
* @since 2.10.0
|
||||
*
|
||||
* @example
|
||||
* const { result } = await createShippingOptionTypesWorkflow(container)
|
||||
* .run({
|
||||
* input: {
|
||||
* shipping_option_types: [
|
||||
* {
|
||||
* label: "Standard ",
|
||||
* label: "Standard",
|
||||
* code: "standard",
|
||||
* description: "Ship in 2-3 days."
|
||||
* }
|
||||
|
||||
@@ -45,12 +45,14 @@ export const deleteShippingOptionTypesWorkflowId =
|
||||
"delete-shipping-option-types"
|
||||
/**
|
||||
* This workflow deletes one or more shipping-option types. It's used by the
|
||||
* [Delete Shipping Option Types Admin API Route](TODO HERE).
|
||||
* [Delete Shipping Option Types Admin API Route](https://docs.medusajs.com/api/admin#shipping-option-types_deleteshippingoptiontypesid).
|
||||
*
|
||||
* This workflow has a hook that allows you to perform custom actions after the shipping-option types are deleted. For example,
|
||||
* you can delete custom records linked to the shipping-option types.
|
||||
*
|
||||
* You can also use this workflow within your own custom workflows, allowing you to wrap custom logic around shipping option type deletion.
|
||||
*
|
||||
* @since 2.10.0
|
||||
*
|
||||
* @example
|
||||
* const { result } = await deleteShippingOptionTypesWorkflow(container)
|
||||
@@ -62,7 +64,7 @@ export const deleteShippingOptionTypesWorkflowId =
|
||||
*
|
||||
* @summary
|
||||
*
|
||||
* Delete one or more shippingOption types.
|
||||
* Delete one or more shipping option types.
|
||||
*
|
||||
* @property hooks.shippingOptionTypesDeleted - This hook is executed after the types are deleted. You can consume this hook to perform custom actions on the deleted types.
|
||||
*/
|
||||
|
||||
@@ -13,7 +13,7 @@ import { updateShippingOptionTypesStep } from "../steps"
|
||||
/**
|
||||
* The data to update one or more shipping option types, along with custom data that's passed to the workflow's hooks.
|
||||
*/
|
||||
type UpdateShippingOptionTypesWorkflowInput = {
|
||||
export type UpdateShippingOptionTypesWorkflowInput = {
|
||||
/**
|
||||
* The filters to select the shipping option types to update.
|
||||
*/
|
||||
@@ -27,22 +27,24 @@ type UpdateShippingOptionTypesWorkflowInput = {
|
||||
export const updateShippingOptionTypesWorkflowId = "update-shipping-option-types"
|
||||
/**
|
||||
* This workflow updates one or more shipping option types. It's used by the
|
||||
* [Update Shipping Option Type Admin API Route](TODO HERE).
|
||||
* [Update Shipping Option Type Admin API Route](https://docs.medusajs.com/api/admin#shipping-option-types_postshippingoptiontypesid).
|
||||
*
|
||||
* This workflow has a hook that allows you to perform custom actions on the updated shipping option types. For example, you can pass under `additional_data` custom data that
|
||||
* allows you to update custom data models linked to the shipping option types.
|
||||
*
|
||||
* You can also use this workflow within your own custom workflows, allowing you to wrap custom logic around shipping option type updates.
|
||||
*
|
||||
* @since 2.10.0
|
||||
*
|
||||
* @example
|
||||
* const { result } = await updateShippingOptionTypesWorkflow(container)
|
||||
* .run({
|
||||
* input: {
|
||||
* selector: {
|
||||
* id: "ptyp_123"
|
||||
* id: "sotype_123"
|
||||
* },
|
||||
* update: {
|
||||
* value: "clothing"
|
||||
* label: "Standard"
|
||||
* },
|
||||
* additional_data: {
|
||||
* erp_id: "123"
|
||||
|
||||
@@ -399,7 +399,7 @@ export class Promotion {
|
||||
*
|
||||
* @param ruleType - The type of rules to retrieve the attributes for. Can be `rules`, `buy-rules`, or `target-rules`.
|
||||
* @param promotionType - The type of promotion to retrieve the attributes for. It can be `standard` or `buyget`.
|
||||
* @param applicationMethodTargetType - The type of application method to retrieve the attributes for. It can be `order`, `items` or `shipping_methods`.
|
||||
* @param applicationMethodTargetType - The type of application method to retrieve the attributes for. It can be `order`, `items` (default) or `shipping_methods`.
|
||||
* @param headers - Headers to pass in the request.
|
||||
* @returns The list of rule attributes.
|
||||
*
|
||||
|
||||
@@ -16,7 +16,7 @@ export class ShippingOptionType {
|
||||
|
||||
/**
|
||||
* This method creates a shipping option type. It sends a request to the
|
||||
* [Create Shipping Option Type](TODO HERE)
|
||||
* [Create Shipping Option Type](https://docs.medusajs.com/api/admin#shipping-option-types_postshippingoptiontypes)
|
||||
* API route.
|
||||
*
|
||||
* @param body - The shipping option type's details.
|
||||
@@ -52,7 +52,7 @@ export class ShippingOptionType {
|
||||
|
||||
/**
|
||||
* This method updates a shipping option type. It sends a request to the
|
||||
* [Update Shipping Option Type](TODO HERE)
|
||||
* [Update Shipping Option Type](https://docs.medusajs.com/api/admin#shipping-option-types_postshippingoptiontypesid)
|
||||
* API route.
|
||||
*
|
||||
* @param id - The shipping option type's ID.
|
||||
@@ -88,7 +88,7 @@ export class ShippingOptionType {
|
||||
|
||||
/**
|
||||
* This method retrieves a paginated list of shipping option types. It sends a request to the
|
||||
* [List Shipping Option Types](TODO HERE) API route.
|
||||
* [List Shipping Option Types](https://docs.medusajs.com/api/admin#shipping-option-types_getshippingoptiontypes) API route.
|
||||
*
|
||||
* @param query - Filters and pagination configurations.
|
||||
* @param headers - Headers to pass in the request.
|
||||
@@ -147,7 +147,7 @@ export class ShippingOptionType {
|
||||
|
||||
/**
|
||||
* This method retrieves a shipping option type by its ID. It sends a request to the
|
||||
* [Get Shipping Option Type](TODO HERE)
|
||||
* [Get Shipping Option Type](https://docs.medusajs.com/api/admin#shipping-option-types_getshippingoptiontypesid)
|
||||
* API route.
|
||||
*
|
||||
* @param id - The shipping option type's ID.
|
||||
@@ -194,7 +194,7 @@ export class ShippingOptionType {
|
||||
|
||||
/**
|
||||
* This method deletes a shipping option type. It sends a request to the
|
||||
* [Delete Shipping Option Type](TODO HERE)
|
||||
* [Delete Shipping Option Type](https://docs.medusajs.com/api/admin#shipping-option-types_deleteshippingoptiontypesid)
|
||||
* API route.
|
||||
*
|
||||
* @param id - The shipping option type's ID.
|
||||
|
||||
@@ -50,11 +50,4 @@ export interface AdminOrderItemsFilters extends FindParams {
|
||||
|
||||
export interface AdminOrderChangesFilters extends BaseOrderChangesFilters {}
|
||||
|
||||
export interface AdminOrderItemsFilters extends FindParams {
|
||||
id?: string[] | string
|
||||
item_id?: string[] | string
|
||||
order_id?: string[] | string
|
||||
version?: number[] | number
|
||||
}
|
||||
|
||||
export interface AdminGetOrderShippingOptionList {}
|
||||
|
||||
@@ -63,13 +63,28 @@ export interface AdminGetPromotionsParams
|
||||
}
|
||||
|
||||
export interface AdminGetPromotionRuleParams {
|
||||
/**
|
||||
* The type of promotion to retrieve the attributes for.
|
||||
*/
|
||||
promotion_type?: PromotionTypeValues
|
||||
/**
|
||||
* The type of application method to retrieve the attributes for.
|
||||
*/
|
||||
application_method_type?: ApplicationMethodTypeValues
|
||||
/**
|
||||
* The type of application method to retrieve the attributes for.
|
||||
*/
|
||||
application_method_target_type?: ApplicationMethodTargetTypeValues
|
||||
}
|
||||
|
||||
export interface AdminGetPromotionRuleTypeParams extends SelectParams {
|
||||
/**
|
||||
* The type of promotion to retrieve the attributes for.
|
||||
*/
|
||||
promotion_type?: PromotionTypeValues
|
||||
/**
|
||||
* The type of application method to retrieve the attributes for.
|
||||
*/
|
||||
application_method_type?: ApplicationMethodTypeValues
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user