publishEntities
is used to publish a set of entities as an atomic operation. unpublishEntities
is used to unpublish a set of entities as an atomic operation.
interface DossierClient {
publishEntities(
references: EntityVersionReference[],
): PromiseResult<
EntityPublishPayload[],
"BadRequest" | "NotFound" | "NotAuthorized" | "Generic"
>;
unpublishEntities(
references: EntityReference[],
): PromiseResult<
EntityUnpublishPayload[],
"BadRequest" | "NotFound" | "NotAuthorized" | "Generic"
>;
}
interface EntityReference {
id: string;
}
interface EntityVersionReference {
id: string;
version: number;
}
interface EntityPublishPayload {
id: string;
status: EntityStatus;
effect: "published" | "none";
updatedAt: Date;
}
interface EntityUnpublishPayload {
id: string;
status: EntityStatus;
effect: "unpublished" | "none";
updatedAt: Date;
}
Publishing entities generates a publishEntities
event. Unpublishing entities generates an unpublishEntities
event.