hi, a few things
- if you are working in a monorepo you can create a dev dependency in the frontend module on the strapi module and then import the
contentTypes.d.ts. no need to copy the file. - I found some errors in the
types.tsfile. for example:
intype MediaValueit should beAPIResponseand notAPIResponseData
type MediaValue<TAttribute extends Attribute.Attribute> = TAttribute extends Attribute.Media<
infer _TKind,
infer TMultiple
>
? Utils.Expression.If<TMultiple, APIResponse<'plugin::upload.file'>[], APIResponse<'plugin::upload.file'>>
: never;
and APIResponseCollectionMetadata is missing the pagination level and should be
export interface APIResponseCollectionMetadata {
pagination: {
page: number;
pageSize: number;
pageCount: number;
total: number;
};
}
it would be very nice if this was part of the Strapi project so that it would be maintained along with the actual types