fix(js-sdk, types): fixes types and deprecate duplicate methods (#11975)

This commit is contained in:
Shahed Nasser
2025-03-25 16:37:30 +01:00
committed by GitHub
parent 80e320e094
commit 0cc306bf56
4 changed files with 11 additions and 3 deletions
+6
View File
@@ -0,0 +1,6 @@
---
"@medusajs/js-sdk": patch
"@medusajs/types": patch
---
fix(js-sdk, types): fixes types and deprecate duplicate methods
+1 -1
View File
@@ -397,7 +397,7 @@ export class Return {
async updateReturnShipping( async updateReturnShipping(
id: string, id: string,
actionId: string, actionId: string,
body: HttpTypes.AdminAddReturnShipping, body: HttpTypes.AdminUpdateReturnShipping,
query?: HttpTypes.SelectParams, query?: HttpTypes.SelectParams,
headers?: ClientHeaders headers?: ClientHeaders
) { ) {
@@ -239,6 +239,8 @@ export class SalesChannel {
* .then(({ sales_channel }) => { * .then(({ sales_channel }) => {
* console.log(sales_channel) * console.log(sales_channel)
* }) * })
*
* @deprecated Use {@link batchProducts} instead
*/ */
async updateProducts( async updateProducts(
id: string, id: string,
@@ -276,7 +278,7 @@ export class SalesChannel {
*/ */
async batchProducts( async batchProducts(
id: string, id: string,
body: HttpTypes.AdminBatchLink, body: HttpTypes.AdminUpdateSalesChannelProducts,
headers?: ClientHeaders headers?: ClientHeaders
) { ) {
return await this.client.fetch<HttpTypes.AdminSalesChannelResponse>( return await this.client.fetch<HttpTypes.AdminSalesChannelResponse>(
@@ -26,7 +26,7 @@ export type TransactionStepState =
| "skipped_failure" | "skipped_failure"
| "timeout" | "timeout"
interface AdminWorkflowExecutionExecution { export interface AdminWorkflowExecutionExecution {
/** /**
* The details of the workflow execution's steps. * The details of the workflow execution's steps.
* The key is the step's ID, and the value is the step's details. * The key is the step's ID, and the value is the step's details.