Skip to main content

service/domain/document/document_validated

Api Code Documentation / Exports / service/domain/document/document_validated

Table of contents#

Interfaces#

Variables#

Functions#

Variables#

schema#

• Const schema: ObjectSchema

Defined in#

src/service/domain/document/document_validated.ts:24

Functions#

createEvent#

â–¸ createEvent(isDocumentValid, documentId, source, publisher, projectId, subprojectId, workflowitemId, time?): Type<Event>

Parameters#

NameType
isDocumentValidboolean
documentIdstring
sourcestring
publisherstring
projectIdstring
subprojectIdstring
workflowitemIdstring
timestring

Returns#

Type<Event>

Defined in#

src/service/domain/document/document_validated.ts:36


mutate#

â–¸ mutate(_workflowitem, event): Type<void>

Applies the event to the given workflowitem, or returns an error.

When an error is returned (or thrown), any already applied modifications are discarded.

This function is not expected to validate its changes; instead, the modified workflowitem is automatically validated when obtained using workflowitem_eventsourcing.ts:newWorkflowitemFromEvent.

Parameters#

NameType
_workflowitemWorkflowitem
eventEvent

Returns#

Type<void>

Defined in#

src/service/domain/document/document_validated.ts:79


validate#

â–¸ validate(input): Type<Event>

Parameters#

NameType
inputany

Returns#

Type<Event>

Defined in#

src/service/domain/document/document_validated.ts:64