Skip to content

SudoSOS Back-end API / internal/pdf/seller-payout-pdf-service / SellerPayoutPdfService

Class: SellerPayoutPdfService ​

A PdfService whose output is a record we send to people. Once stored, the PDF is frozen (#141): it is returned as-is, and only re-rendered when force is set or its hash was cleared to mark it stale.

Extends ​

Constructors ​

Constructor ​

ts
new SellerPayoutPdfService(manager?): SellerPayoutPdfService;

Parameters ​

ParameterType
manager?EntityManager

Returns ​

SellerPayoutPdfService

Inherited from ​

StoredPdfService.constructor

Properties ​

PropertyModifierTypeDefault valueOverridesInherited from
locationreadonly"./data/seller_payouts"SELLER_PAYOUT_PDF_LOCATIONStoredPdfService.location-
managerprotectedEntityManagerundefined-StoredPdfService.manager
pdfConstructorreadonlytypeof SellerPayoutPdfSellerPayoutPdfStoredPdfService.pdfConstructor-
renderpublic(options) => stringcreateSellerPayoutPdfStoredPdfService.render-

Methods ​

compile() ​

ts
protected compile(params): Promise<Buffer<ArrayBufferLike>>;

Parameters ​

ParameterType
paramsISellerPayoutPdf

Returns ​

Promise<Buffer<ArrayBufferLike>>

Inherited from ​

StoredPdfService.compile


configureLogger() ​

ts
protected configureLogger(logger): void;

Parameters ​

ParameterType
loggerLogger

Returns ​

void

Inherited from ​

StoredPdfService.configureLogger


getOrCreate() ​

ts
getOrCreate(entity, force?): Promise<SellerPayoutPdf>;

Parameters ​

ParameterTypeDefault value
entitySellerPayoutundefined
forcebooleanfalse

Returns ​

Promise<SellerPayoutPdf>

Inherited from ​

StoredPdfService.getOrCreate


getOwner() ​

ts
getOwner(entity): User;

Parameters ​

ParameterType
entitySellerPayout

Returns ​

User

Overrides ​

StoredPdfService.getOwner


getParameters() ​

ts
getParameters(entity): Promise<ISellerPayoutPdf>;

Parameters ​

ParameterType
entitySellerPayout

Returns ​

Promise<ISellerPayoutPdf>

Overrides ​

StoredPdfService.getParameters


html() ​

ts
html(entity): Promise<Buffer<ArrayBufferLike>>;

Parameters ​

ParameterType
entitySellerPayout

Returns ​

Promise<Buffer<ArrayBufferLike>>

Inherited from ​

StoredPdfService.html


output() ​

ts
output(entity, fileType): Promise<Buffer<ArrayBufferLike>>;

Parameters ​

ParameterType
entitySellerPayout
fileTypeReturnFileType

Returns ​

Promise<Buffer<ArrayBufferLike>>

Inherited from ​

StoredPdfService.output


pdf() ​

ts
pdf(entity): Promise<Buffer<ArrayBufferLike>>;

Parameters ​

ParameterType
entitySellerPayout

Returns ​

Promise<Buffer<ArrayBufferLike>>

Inherited from ​

StoredPdfService.pdf