fix(medusa): List Users return type (#6204)

This commit is contained in:
Kasper Fabricius Kristensen
2024-01-24 13:57:05 +01:00
committed by GitHub
parent 489b7effb0
commit 6404b9abd1
3 changed files with 31 additions and 1 deletions
@@ -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">[]
}