feat(dashboard): order edits in timeline (#8899)

**What**
- add order edit confirmed/created events in the timeline
- add order change endpoint clients
- panel for active edit and pending edit
- few fixes around the edit domain
This commit is contained in:
Frane Polić
2024-09-01 09:49:14 +02:00
committed by GitHub
parent 7e92aa412c
commit dbb10ff051
10 changed files with 213 additions and 12 deletions

View File

@@ -4,6 +4,8 @@ import {
PaginatedResponse,
SelectParams,
} from "@medusajs/types"
import { AdminOrderChangesResponse } from "@medusajs/types/src/http/order/admin/responses"
import { Client } from "../client"
import { ClientHeaders } from "../types"
@@ -109,4 +111,17 @@ export class Order {
}
)
}
async listChanges(
id: string,
queryParams?: FindParams & HttpTypes.AdminOrderChangesFilters,
headers?: ClientHeaders
) {
return await this.client.fetch<
PaginatedResponse<AdminOrderChangesResponse>
>(`/admin/orders/${id}/changes`, {
query: queryParams,
headers,
})
}
}