Simone e3a5416487
[Bugfix] Bulk publish/unpublish for non-default locale entities (#17941)
* pass the locale to the publish and draft relations calls

* fix the problem for entities without internationalization and add unit tests
2023-09-12 10:40:51 +02:00

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;