chore(medusa,types): [8] Add request types to API routes (#8565)

This commit is contained in:
Shahed Nasser
2024-08-13 10:10:10 +03:00
committed by GitHub
parent 571a3d1671
commit fc439a32f1
20 changed files with 84 additions and 43 deletions
@@ -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
}