fix(types,order,medusa): Create credit lines + hooks (#11569)

what:

- api/workflows to create credit lines
- hooks to enable extending credit lines
This commit is contained in:
Riqwan Thamir authored and GitHub committed 2025-03-17 15:20:59 +00:00
1 parent 0625f76cd4
commit cb6249320e
31 files changed
+630 -111

No files matched your search

+18
View File
@@ -1,5 +1,6 @@
import {
AdminOrderChangesResponse,
CreateOrderCreditLineDTO,
FindParams,
HttpTypes,
PaginatedResponse,
@@ -499,4 +500,21 @@ export class Order {
}
)
}
async createCreditLine(
orderId: string,
body: Omit<CreateOrderCreditLineDTO, "order_id">,
query?: SelectParams,
headers?: ClientHeaders
) {
return await this.client.fetch<HttpTypes.AdminOrderResponse>(
`/admin/orders/${orderId}/credit-lines`,
{
method: "POST",
headers,
body,
query,
}
)
}
}