feat(v2.6.0): authentic 4-courier cancellation, 3-column docs and AI connector fixes

This commit is contained in:
Amirul Islam Redwan
2026-11-10 19:34:24 +00:00
parent 07d43dfae2
commit 40b56b21ec
27 changed files with 4221 additions and 2523 deletions
+40
View File
@@ -137,4 +137,44 @@ export class RedxAdapter {
hint: "Use RedX merchant portal",
};
}
/**
* Authentic Upstream RedX Cancellation
* Endpoint: PATCH /parcels
*/
async cancelParcel(trackingId, reason) {
if (!this.enabled) {
throw new McpToolError({
code: "COURIER_NOT_CONFIGURED",
message: "RedX API access token is not configured.",
courier: "redx",
});
}
try {
const response = await this.client.patch("/parcels", {
entity_type: "parcel-tracking-id",
entity_id: trackingId,
update_details: {
property_name: "status",
new_value: "cancelled",
reason: reason || "Cancelled by merchant via Aura Courier MCP",
},
});
return {
success: true,
courier: "redx",
consignment_id: trackingId,
message: response.data?.message || "Parcel successfully cancelled in RedX Delivery.",
raw_response: response.data,
};
}
catch (err) {
const msg = err.response?.data?.message || err.message;
throw new McpToolError({
code: "COURIER_UPSTREAM_ERROR",
message: `RedX cancellation failed: ${msg}`,
courier: "redx",
retryable: false,
});
}
}
}