Skip to content

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 ​

ts
documentService: object;

Defined in: application/services/records/active-record-contracts.ts:26

Document operations, addressed by workspace id and document id.

createDocument ​

ts
createDocument: (workspaceId, profileId, folderId?, initialData?) => Promise<any>;
Parameters ​
ParameterType
workspaceIdstring
profileIdstring
folderId?string
initialData?DocumentData
Returns ​

Promise<any>

deleteDocument ​

ts
deleteDocument: (workspaceId, documentId) => Promise<void>;
Parameters ​
ParameterType
workspaceIdstring
documentIdstring
Returns ​

Promise<void>

getDocument ​

ts
getDocument: (workspaceId, documentId) => Promise<any>;
Parameters ​
ParameterType
workspaceIdstring
documentIdstring
Returns ​

Promise<any>

getQAScore ​

ts
getQAScore: (workspaceId, documentId) => Promise<number>;
Parameters ​
ParameterType
workspaceIdstring
documentIdstring
Returns ​

Promise<number>

importDocument ​

ts
importDocument: (workspaceId, documentData, options?) => Promise<any>;
Parameters ​
ParameterType
workspaceIdstring
documentDataDocumentData
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 ​

ts
patchDocumentByPath: (workspaceId, documentId, path, value) => Promise<any>;
Parameters ​
ParameterType
workspaceIdstring
documentIdstring
path(string | number)[]
valueany
Returns ​

Promise<any>

updateDocumentField ​

ts
updateDocumentField: (workspaceId, documentId, fieldPath, value) => Promise<any>;
Parameters ​
ParameterType
workspaceIdstring
documentIdstring
fieldPathstring
valueFieldValue[]
Returns ​

Promise<any>


transformationService ​

ts
transformationService: object;

Defined in: application/services/records/active-record-contracts.ts:54

Export transformers used by the document record export methods.

defaultHtmlCss? ​

ts
defaultHtmlCss?: string;

Stylesheet passed as css by DocumentRecord.exportHtml; empty when omitted.

documentToHtml ​

ts
documentToHtml: (documentData, options?) => string;
Parameters ​
ParameterType
documentDataany
options?any
Returns ​

string

documentToJsonLd ​

ts
documentToJsonLd: (documentData, profileId?, options?) => object;
Parameters ​
ParameterType
documentDataany
profileId?string
options?any
Returns ​

object

documentToMarkdown ​

ts
documentToMarkdown: (documentData, options?) => string;
Parameters ​
ParameterType
documentDataany
options?any
Returns ​

string

htmlToPdfBlob ​

ts
htmlToPdfBlob: (html, options?) => Promise<Blob>;
Parameters ​
ParameterType
htmlstring
options?any
Returns ​

Promise<Blob>


validationService ​

ts
validationService: object;

Defined in: application/services/records/active-record-contracts.ts:45

Validates a document against its profile and the workspace type library.

validateDocument ​

ts
validateDocument: (workspaceId, documentId, profile, typeLibrary) => Promise<ValidationResult>;
Parameters ​
ParameterType
workspaceIdstring
documentIdstring
profileDocumentProfile
typeLibraryTypeLibrary
Returns ​

Promise<ValidationResult>


workspaceService ​

ts
workspaceService: object;

Defined in: application/services/records/active-record-contracts.ts:20

Creates, loads and saves the active workspace.

getWorkspace ​

ts
getWorkspace: () => Promise<any>;
Returns ​

Promise<any>

initialize ​

ts
initialize: (config) => Promise<any>;
Parameters ​
ParameterType
configany
Returns ​

Promise<any>

saveWorkspace ​

ts
saveWorkspace: (workspace) => Promise<any>;
Parameters ​
ParameterType
workspaceany
Returns ​

Promise<any>