diff --git a/vtex/actions/orders/cancel.ts b/vtex/actions/orders/cancel.ts index 6f1982370..78401327b 100644 --- a/vtex/actions/orders/cancel.ts +++ b/vtex/actions/orders/cancel.ts @@ -5,6 +5,7 @@ import { CanceledOrder } from "../../utils/types.ts"; interface Props { orderId: string; reason: string; + requestedByUser: boolean; } async function action( @@ -19,13 +20,13 @@ async function action( return null; } - const { orderId, reason } = props; + const { orderId, reason, requestedByUser } = props; const response = await vcsDeprecated ["POST /api/oms/pvt/orders/:orderId/cancel"]( { orderId }, { - body: { reason }, + body: { reason, requestedByUser }, headers: { cookie, }, diff --git a/vtex/utils/client.ts b/vtex/utils/client.ts index f2546079e..9866e4b8f 100644 --- a/vtex/utils/client.ts +++ b/vtex/utils/client.ts @@ -257,6 +257,7 @@ export interface VTEXCommerceStable { response: CanceledOrder; body: { reason: string; + requestedByUser: boolean; }; }; }