Skip to content

SudoSOS Back-end API / internal/files/pdf / IPdfAble

Interface: IPdfAble<S> ​

Entities that persist a Pdf file should implement IPdfAble.

Extends ​

Type Parameters ​

Type ParameterDefault type
S extends PdfPdf

Properties ​

createdAt ​

ts
readonly createdAt: Date;

The creation date of the object.

Inherited from ​

BaseEntity.createdAt


id ​

ts
readonly id: number;

Inherited from ​

BaseEntity.id


pdf? ​

ts
optional pdf: S;

pdfService ​

ts
pdfService: IStoredPdfService<IPdfAble<S>, S>;

updatedAt ​

ts
readonly updatedAt: Date;

The last update date of the object.

Inherited from ​

BaseEntity.updatedAt


version ​

ts
readonly version: number;

The current version of the object.

Inherited from ​

BaseEntity.version

Methods ​

createPdf() ​

ts
createPdf(): Promise<S>;

Create and persist the Pdf file and return the Pdf entity. Implementations expect the configured pdfService to implement createPdfWithEntity. If the configured service does not, calling this will throw.

Returns ​

Promise<S>


getOwner() ​

ts
getOwner(): Promise<User>;

Returns ​

Promise<User>


getPdfParamHash() ​

ts
getPdfParamHash(): Promise<string>;

Returns ​

Promise<string>