fix(medusa): List Users return type (#6204)
This commit is contained in:
committed by
GitHub
parent
489b7effb0
commit
6404b9abd1
5
.changeset/olive-bags-glow.md
Normal file
5
.changeset/olive-bags-glow.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@medusajs/medusa": patch
|
||||
---
|
||||
|
||||
fix(medusa): Update list return type of `GET /admin/users`.
|
||||
@@ -13,4 +13,16 @@ export interface AdminUsersListRes {
|
||||
* An array of users details.
|
||||
*/
|
||||
users: Array<User>
|
||||
/**
|
||||
* The total number of items available
|
||||
*/
|
||||
count: number
|
||||
/**
|
||||
* The number of users skipped when retrieving the users.
|
||||
*/
|
||||
offset: number
|
||||
/**
|
||||
* The number of items per page
|
||||
*/
|
||||
limit: number
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { PaginatedResponse } from "@medusajs/types"
|
||||
import { Router } from "express"
|
||||
import { User } from "../../../../models/user"
|
||||
import { DeleteResponse } from "../../../../types/common"
|
||||
@@ -77,14 +78,26 @@ export type AdminUserRes = {
|
||||
* description: "The list of users."
|
||||
* required:
|
||||
* - users
|
||||
* - count
|
||||
* - offset
|
||||
* - limit
|
||||
* properties:
|
||||
* users:
|
||||
* type: array
|
||||
* description: "An array of users details."
|
||||
* items:
|
||||
* $ref: "#/components/schemas/User"
|
||||
* count:
|
||||
* type: integer
|
||||
* description: The total number of items available
|
||||
* offset:
|
||||
* type: integer
|
||||
* description: The number of users skipped when retrieving the users.
|
||||
* limit:
|
||||
* type: integer
|
||||
* description: The number of items per page
|
||||
*/
|
||||
export type AdminUsersListRes = {
|
||||
export type AdminUsersListRes = PaginatedResponse & {
|
||||
users: Omit<User, "password_hash">[]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user