chore(medusa,types): [8] Add request types to API routes (#8565)
This commit is contained in:
@@ -1,20 +0,0 @@
|
||||
export type AdminAcceptInvite = {
|
||||
first_name: string
|
||||
last_name: string
|
||||
}
|
||||
|
||||
export type AdminCreateInvite = {
|
||||
email: string
|
||||
metadata?: Record<string, unknown>
|
||||
}
|
||||
|
||||
export type AdminInviteResponse = {
|
||||
id: string
|
||||
email: string
|
||||
accepted: boolean
|
||||
token: string
|
||||
expires_at?: Date
|
||||
metadata?: Record<string, unknown>
|
||||
created_at?: Date
|
||||
updated_at?: Date
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
export interface AdminInvite {
|
||||
id: string
|
||||
email: string
|
||||
accepted: boolean
|
||||
token: string
|
||||
expires_at?: Date
|
||||
metadata?: Record<string, unknown>
|
||||
created_at?: Date
|
||||
updated_at?: Date
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
export * from "./entities"
|
||||
export * from "./payloads"
|
||||
export * from "./responses"
|
||||
@@ -0,0 +1,9 @@
|
||||
export type AdminAcceptInvite = {
|
||||
first_name: string
|
||||
last_name: string
|
||||
}
|
||||
|
||||
export type AdminCreateInvite = {
|
||||
email: string
|
||||
metadata?: Record<string, unknown>
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import { PaginatedResponse } from "../../common";
|
||||
import { AdminUser } from "../../user";
|
||||
import { AdminInvite } from "./entities";
|
||||
|
||||
export interface AdminInviteResponse {
|
||||
invite: AdminInvite
|
||||
}
|
||||
|
||||
export type AdminInviteListResponse = PaginatedResponse<{
|
||||
invites: AdminInvite[]
|
||||
}>
|
||||
|
||||
export type AdminAcceptInviteResponse = {
|
||||
user: AdminUser
|
||||
} | {
|
||||
message: string
|
||||
}
|
||||
Reference in New Issue
Block a user