Interface: ActiveRecordServices
Defined in: application/services/records/active-record-contracts.ts:18
Application services required by ActiveRecordSession, WorkspaceRecord and DocumentRecord. The concrete WorkspaceApplicationService, DocumentApplicationService, ValidationApplicationService and TransformationApplicationService satisfy these shapes.
Properties
documentService
documentService: object;Defined in: application/services/records/active-record-contracts.ts:26
Document operations, addressed by workspace id and document id.
createDocument
createDocument: (workspaceId, profileId, folderId?, initialData?) => Promise<any>;Parameters
| Parameter | Type |
|---|---|
workspaceId | string |
profileId | string |
folderId? | string |
initialData? | DocumentData |
Returns
Promise<any>
deleteDocument
deleteDocument: (workspaceId, documentId) => Promise<void>;Parameters
| Parameter | Type |
|---|---|
workspaceId | string |
documentId | string |
Returns
Promise<void>
getDocument
getDocument: (workspaceId, documentId) => Promise<any>;Parameters
| Parameter | Type |
|---|---|
workspaceId | string |
documentId | string |
Returns
Promise<any>
getQAScore
getQAScore: (workspaceId, documentId) => Promise<number>;Parameters
| Parameter | Type |
|---|---|
workspaceId | string |
documentId | string |
Returns
Promise<number>
importDocument
importDocument: (workspaceId, documentData, options?) => Promise<any>;Parameters
| Parameter | Type |
|---|---|
workspaceId | string |
documentData | DocumentData |
options? | { folderId?: string; profileId?: string; tags?: string[]; title?: string; } |
options.folderId? | string |
options.profileId? | string |
options.tags? | string[] |
options.title? | string |
Returns
Promise<any>
patchDocumentByPath
patchDocumentByPath: (workspaceId, documentId, path, value) => Promise<any>;Parameters
| Parameter | Type |
|---|---|
workspaceId | string |
documentId | string |
path | (string | number)[] |
value | any |
Returns
Promise<any>
updateDocumentField
updateDocumentField: (workspaceId, documentId, fieldPath, value) => Promise<any>;Parameters
| Parameter | Type |
|---|---|
workspaceId | string |
documentId | string |
fieldPath | string |
value | FieldValue[] |
Returns
Promise<any>
transformationService
transformationService: object;Defined in: application/services/records/active-record-contracts.ts:54
Export transformers used by the document record export methods.
defaultHtmlCss?
defaultHtmlCss?: string;Stylesheet passed as css by DocumentRecord.exportHtml; empty when omitted.
documentToHtml
documentToHtml: (documentData, options?) => string;Parameters
| Parameter | Type |
|---|---|
documentData | any |
options? | any |
Returns
string
documentToJsonLd
documentToJsonLd: (documentData, profileId?, options?) => object;Parameters
| Parameter | Type |
|---|---|
documentData | any |
profileId? | string |
options? | any |
Returns
object
documentToMarkdown
documentToMarkdown: (documentData, options?) => string;Parameters
| Parameter | Type |
|---|---|
documentData | any |
options? | any |
Returns
string
htmlToPdfBlob
htmlToPdfBlob: (html, options?) => Promise<Blob>;Parameters
| Parameter | Type |
|---|---|
html | string |
options? | any |
Returns
Promise<Blob>
validationService
validationService: object;Defined in: application/services/records/active-record-contracts.ts:45
Validates a document against its profile and the workspace type library.
validateDocument
validateDocument: (workspaceId, documentId, profile, typeLibrary) => Promise<ValidationResult>;Parameters
| Parameter | Type |
|---|---|
workspaceId | string |
documentId | string |
profile | DocumentProfile |
typeLibrary | TypeLibrary |
Returns
Promise<ValidationResult>
workspaceService
workspaceService: object;Defined in: application/services/records/active-record-contracts.ts:20
Creates, loads and saves the active workspace.
getWorkspace
getWorkspace: () => Promise<any>;Returns
Promise<any>
initialize
initialize: (config) => Promise<any>;Parameters
| Parameter | Type |
|---|---|
config | any |
Returns
Promise<any>
saveWorkspace
saveWorkspace: (workspace) => Promise<any>;Parameters
| Parameter | Type |
|---|---|
workspace | any |
Returns
Promise<any>