feat(medusa,types,core-flows): apply created_by values - claims, exchanges, returns, fulfillment (#8712)

what:

- Applies created_by values - claims, exchanges, returns, fulfillment

RESOLVES CC-96
This commit is contained in:
Riqwan Thamir
2024-08-21 18:15:55 +00:00
committed by GitHub
parent f00889fe4e
commit 335061d8cd
26 changed files with 121 additions and 17 deletions
@@ -45,6 +45,7 @@ export const beginClaimOrderWorkflow = createWorkflow(
type: input.type,
order_id: input.order_id,
metadata: input.metadata,
created_by: input.created_by,
},
])
@@ -44,6 +44,7 @@ export const beginExchangeOrderWorkflow = createWorkflow(
{
order_id: input.order_id,
metadata: input.metadata,
created_by: input.created_by,
},
])
@@ -44,6 +44,7 @@ export const beginReturnOrderWorkflow = createWorkflow(
order_id: input.order_id,
location_id: input.location_id,
metadata: input.metadata,
created_by: input.created_by,
},
])
@@ -1,9 +1,9 @@
import { ShippingOptionDTO } from "./shipping-option"
import { FulfillmentProviderDTO } from "./fulfillment-provider"
import { BaseFilterable, OperatorMap } from "../../dal"
import { FulfillmentAddressDTO } from "./address"
import { FulfillmentItemDTO } from "./fulfillment-item"
import { FulfillmentLabelDTO } from "./fulfillment-label"
import { BaseFilterable, OperatorMap } from "../../dal"
import { FulfillmentProviderDTO } from "./fulfillment-provider"
import { ShippingOptionDTO } from "./shipping-option"
/**
* The fulfillment details.
@@ -39,6 +39,16 @@ export interface FulfillmentDTO {
*/
canceled_at: Date | null
/**
* The id of the user that marked fulfillment as shipped
*/
marked_shipped_by?: string | null
/**
* The id of the user that created the fulfillment
*/
created_by?: string | null
/**
* The data necessary for the fulfillment provider to process
* the fulfillment.
@@ -22,6 +22,11 @@ export interface CreateFulfillmentDTO {
*/
shipped_at?: Date | null
/**
* The id of the user that created the fulfillment
*/
created_by?: string | null
/**
* The date the fulfillment was delivered.
*/
+10
View File
@@ -1584,6 +1584,11 @@ export interface OrderClaimDTO
* The refund amount of the claim.
*/
refund_amount?: BigNumberValue
/**
* The id of the user that creates the order claim
*/
created_by?: string | null
}
/**
@@ -1630,6 +1635,11 @@ export interface OrderExchangeDTO
* The associated return's ID.
*/
return_id?: string
/**
* The id of the user that creates the order exchange
*/
created_by?: string | null
}
/**
+16 -1
View File
@@ -890,7 +890,7 @@ export interface CreateOrderChangeDTO {
/**
* The user that created the order change.
*/
created_by?: string
created_by?: string | null
/**
* Holds custom data in key-value pairs.
@@ -1537,6 +1537,11 @@ export interface CreateOrderReturnDTO extends BaseOrderBundledActionsDTO {
* The associated exchange's ID.
*/
exchange_id?: string
/**
* The id of the user that creates the fulfillment
*/
created_by?: string | null
}
/**
@@ -1967,6 +1972,11 @@ export interface CreateOrderClaimDTO extends BaseOrderBundledActionsDTO {
* on the claim.
*/
no_notification?: boolean
/**
* The id of the user that creates the order claim
*/
created_by?: string | null
}
export interface CancelOrderClaimDTO extends BaseOrderBundledActionsDTO {
@@ -2012,6 +2022,11 @@ export interface CreateOrderExchangeDTO extends BaseOrderBundledActionsDTO {
* updates on the exchange.
*/
no_notification?: boolean
/**
* The id of the user that creates the order exchange
*/
created_by?: string | null
}
export interface CancelOrderExchangeDTO extends BaseOrderBundledActionsDTO {
@@ -131,6 +131,11 @@ export type CreateFulfillmentWorkflowInput = {
*/
shipped_at?: Date | null
/**
* The id of the user that creates the fulfillment
*/
created_by?: string | null
/**
* The date the fulfillment was delivered.
*/
@@ -13,4 +13,9 @@ export interface CreateShipmentWorkflowInput {
* The labels associated with the fulfillment.
*/
labels: CreateFulfillmentLabelWorkflowDTO[]
/**
* The id of the user that marked fulfillment as shipped
*/
marked_shipped_by?: string | null
}
@@ -22,6 +22,16 @@ export interface UpdateFulfillmentWorkflowInput {
*/
shipped_at?: Date | null
/**
* The id of the user that marked fulfillment as shipped
*/
marked_shipped_by?: string | null
/**
* The id of the user that created the fulfillment
*/
created_by?: string | null
/**
* The date the fulfillment was delivered.
*/
@@ -3,7 +3,10 @@ import { OrderClaimType } from "../../order/mutations"
export interface BeginOrderClaimWorkflowInput {
type: OrderClaimType
order_id: string
created_by?: string
/**
* The id of the user that creates the order claim
*/
created_by?: string | null
internal_note?: string
description?: string
metadata?: Record<string, unknown> | null
@@ -1,6 +1,9 @@
export interface BeginOrderExchangeWorkflowInput {
order_id: string
created_by?: string
/**
* The id of the user that creates the order exchange
*/
created_by?: string | null
internal_note?: string
description?: string
metadata?: Record<string, unknown> | null
@@ -1,7 +1,10 @@
export interface BeginOrderReturnWorkflowInput {
order_id: string
location_id?: string
created_by?: string
/**
* The id of the user that creates the return
*/
created_by?: string | null
internal_note?: string
description?: string
metadata?: Record<string, unknown> | null