mirror of
https://github.com/strapi/strapi.git
synced 2025-07-31 04:45:54 +00:00

* pass the locale to the publish and draft relations calls * fix the problem for entities without internationalization and add unit tests
18 lines
502 B
TypeScript
18 lines
502 B
TypeScript
interface EntityManager {
|
|
mapEntity<T = any>(entity: T): T;
|
|
mapEntitiesResponse<T = any>(entities: T[], uid: string): T[];
|
|
find(): any;
|
|
findPage(): any;
|
|
findOne(): any;
|
|
create(): any;
|
|
update(): any;
|
|
delete(): any;
|
|
deleteMany(): any;
|
|
publish(): any;
|
|
unpublish(): any;
|
|
countDraftRelations(id: string, uid: string): number;
|
|
countManyEntriesDraftRelations(ids: number[], uid: string, locale?: string): number;
|
|
}
|
|
|
|
export default function (opts: { strapi: Strapi }): EntityManager;
|