/
githubmirror
/
strapi
Обзор
Документация
Войти
/
githubmirror
/
strapi
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
packages/core/content-manager/shared/contracts/uid.ts
52 строки
1 KB
Convly
chore: move Public.UID and Internal.Struct to the root namespace
01 мар 2024, 17:56
01 мар 2024, 17:56
c425f82
Код
Авторство
О чём код?
import type { UID, Modules } from '@strapi/types'; import { errors } from '@strapi/utils'; type Entity = Modules.EntityService.Result<UID.Schema>; /** * POST /uid/generate */ export declare namespace GenerateUID { export interface Request { body: { contentTypeUID: string; data: Entity; field: string; }; query: { locale?: string | null; }; } export interface Response { data: string; error?: errors.ApplicationError | errors.YupValidationError; } } /** * POST /uid/check-availability */ export declare namespace CheckUIDAvailability { export interface Request { body: { contentTypeUID: string; field: string; value: string; }; query: { locale?: string | null; }; } export type Response = | { isAvailable: boolean; suggestion: string | null; error?: never; } | { isAvailable?: never; suggesiton?: never; error?: errors.ApplicationError | errors.YupValidationError; }; }