d-velop / dvelop-sdk-node

Official SDK to build Apps for d.velop cloud
Apache License 2.0
11 stars 14 forks source link

DMS: missing verbosity of extended attributes / document types / search #203

Closed GottZ closed 3 months ago

GottZ commented 3 months ago

Hello there.

I've come to notice extended attributes don't get resolved captions by itself, and I could not find a resolver within the sdk, so I assume I have to resolve them on my own. image

what's the best practice for doing so?

I already imagine querying kue_dokuart from dokuart_langtexte to get the doc type names and from fispe_titel_dokuart to retrive the repository_id of each field to then either join against repository_titles or field_repository to get all the field names, types and stuff. if you agree using sql queries is the right way, just let me know if I'm on the right track.

this makes me wonder how cloud customers handle such cases since they are unlikely able to directly access d3 via SQL.

so apparently there is a dms/r/repoid/sd/?objectdefinitionids=...&properties=...&storedValues=true call for that, judging from network inspecting d3 search.

now how do I acquire it using the SDK? there is nothing in here giving a clue about it.

It would be reasonable to have an endpoint like:

const adminContext = {
    systemBaseUri: baseUri,
    authSessionId: appSecret,
};
const repo = await getRepository(adminContext, {repositoryId: baseRepo});
const types = await getDocumentTypes(adminContext, repo, ["ABAU", "DPERS"]));
const dpersFields = types.DPERS.fields;
// or
const fields = getDocumentFields(adminContext, repo, "DPERS");

I guess.. But that's just my wishfull thinking.

Also image and image isn't exposed right?

LenKlose commented 3 months ago

Hi @GottZ ,

sadly i have bad news. You are right, names of properties are not resolved but referenced by ID. To resolve propertynames you'd have to call /dmsconfig in the cloud. On Premise you are supposed to "know" IDs for the system. There is no public API to get propertynames.

GottZ commented 3 months ago

Hi @GottZ ,

sadly i have bad news. You are right, names of properties are not resolved but referenced by ID. To resolve propertynames you'd have to call /dmsconfig in the cloud. On Premise you are supposed to "know" IDs for the system. There is no public API to get propertynames.

ok thanks. I'll just be querying the mssql database then.