Hi there,
I am trying writing an Angular application that uses the Alfresco JS-API to retrieve content attached to an APS workflow.
My development environment is IntelliJ
There is a Activiti-REST ContentApi that provides the methods I need to call to retrieve the content (getRawContent)
The problem is there's another ContentApi under content-custom-api.
In my typescript code, when I do import {ContentApi} from '@alfresco/js-api' it picks the wrong ContentApi
Any idea what the import should be to target the correct ContentApi? The suggestion in the docs import ContentApi from 'ContentApi' does not work. Intellij complains it can't find a module called ContentApi.
I'm actually not sure the second ContentApi should be there - possibly a bug? It appears in the code, but not the docs.
Thanks
Paul
As ever, 2minutes after posting, I find a solution....just target the source directly.
import {ContentApi} from '@alfresco/js-api/src/api/activiti-rest-api/api/content.api';
However, i'm still not sure that the other ContentApi should be there?
Paul
Ah....spoke too soon.
Importing as above doesn't work - the source will not compile...
So, I've managed to get it building by adding the following to tsconfig.app.json in the "includes" section
"node_modules/@alfresco/js-api/src/api/activiti-rest-api/api/*.ts",
"node_modules/@alfresco/js-api/src/api/activiti-rest-api/model/*.ts",
"node_modules/@alfresco/js-api/src/*.ts",
"node_modules/@alfresco/js-api/src/api/content-custom-api/model/dateAlfresco.ts"
This is obviously NOT how it's supposed to work, but at least my app is building now.
Discussions, help and advice about the Alfresco Development Framework.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.