Closed yuriassuncx closed 4 weeks ago
requestedByUser
Props
Reference: https://developers.vtex.com/docs/guides/order-canceling-improvements
```typescript interface Props { orderId: string; reason: string; requestedByUser: boolean; // New property added }
Action Function Update: Updated the action function to include the requestedByUser in the request body.
async function action(props: Props) { const { orderId, reason, requestedByUser } = props; const response = await vcsDeprecated ["POST /api/oms/pvt/orders/:orderId/cancel"]( { orderId }, { body: { reason, requestedByUser }, // New property included headers: { cookie }, } ); }
VTEXCommerceStable Interface: Added requestedByUser to the VTEXCommerceStable interface.
VTEXCommerceStable
export interface VTEXCommerceStable { response: CanceledOrder; body: { reason: string; requestedByUser: boolean; // New property added }; }
The addition of the requestedByUser property helps track who is requesting the order cancellation, improving user action monitoring.
Should a new tag be published when this PR is merged?
What is this Contribution About?
requestedByUser
property to theProps
interface.Reference: https://developers.vtex.com/docs/guides/order-canceling-improvements
Action Function Update: Updated the action function to include the
requestedByUser
in the request body.VTEXCommerceStable Interface: Added
requestedByUser
to theVTEXCommerceStable
interface.Reason
The addition of the
requestedByUser
property helps track who is requesting the order cancellation, improving user action monitoring.