mirror of
https://github.com/strapi/strapi.git
synced 2025-07-19 23:16:47 +00:00

* feat: base files for static preview * feat: preview config * Update packages/core/content-manager/server/src/preview/routes/index.ts Co-authored-by: Rémi de Juvigny <8087692+remidej@users.noreply.github.com> * chore: empty handler * chore: comment controllers type * fix: remove is enabled check from load * feat: test preview config * chore: refactor type * feat: preview endpoint * feat: preview test * fix: tests * fix: api test * chore: comment --------- Co-authored-by: Rémi de Juvigny <8087692+remidej@users.noreply.github.com>
32 lines
705 B
TypeScript
32 lines
705 B
TypeScript
import type { Data, UID } from '@strapi/types';
|
|
import { type errors } from '@strapi/utils';
|
|
|
|
/**
|
|
* GET /content-manager/preview/url/:uid
|
|
*/
|
|
export declare namespace GetPreviewUrl {
|
|
export interface Request {
|
|
params: {
|
|
contentType: UID.ContentType;
|
|
};
|
|
query: {
|
|
documentId?: Data.DocumentID;
|
|
locale?: string;
|
|
status?: 'published' | 'draft';
|
|
};
|
|
}
|
|
|
|
// NOTE: Response status will be 204 if no URL is found
|
|
export type Response =
|
|
| {
|
|
data: {
|
|
url: string | undefined;
|
|
};
|
|
error?: never;
|
|
}
|
|
| {
|
|
data?: never;
|
|
error: errors.ApplicationError | errors.ValidationError | errors.NotFoundError;
|
|
};
|
|
}
|