feat: update return request (#8302)

This commit is contained in:
Oli Juhl
2024-07-26 19:41:21 +02:00
committed by GitHub
parent a4eab3f37a
commit feabe0e6c0
13 changed files with 216 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
import { FindParams, HttpTypes, SelectParams } from "@medusajs/types"
import { HttpTypes, SelectParams } from "@medusajs/types"
import { Client } from "../client"
import { ClientHeaders } from "../types"
@@ -178,4 +178,21 @@ export class Return {
}
)
}
async updateRequest(
id: string,
body: HttpTypes.AdminUpdateReturnRequest,
query?: HttpTypes.SelectParams,
headers?: ClientHeaders
) {
return await this.client.fetch<HttpTypes.AdminReturnResponse>(
`/admin/returns/${id}`,
{
method: "POST",
headers,
body,
query,
}
)
}
}