-
Notifications
You must be signed in to change notification settings - Fork 15
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
Currently, when diving into a linked definition we can easily pick apart the 'entity' parts of the linked model, however the 'action' definition for operations are not available for import.
This issue seems to stem from the fact that when the declaration for the 'action' class type gets compiled over to the final cds-types.d.ts file, that the export identifier does not get added.
Example from cds-types.d.ts:
...
class action extends any_<'action' | 'function'> {}
...
Expected Behavior
It is expected that we can utilize the 'action' class type for proper type safe deconstruction of a linked model, just like we are with the 'entity' definition class.
Ideally the output for the declaration should be:
export class action extends any_<'action' | 'function'> {}
References
I cannot find any official documentation for this, however, seeing as the 'entity' definition is available, it would only make logical sense that the 'action' class type is also available.
When deconstructing a service's linked definitions, it would be ideal to also be able to pull out the operations data with type safety, rather than relying on custom definitions.
Versions
@cap-js/asyncapi: 1.0.3
@cap-js/cds-types: 0.11.0
@cap-js/openapi: 1.2.3
@gavdi/cap-mcp: 1.0.0
@sap/cds: 9.0.4
@sap/cds-compiler: 6.0.14
@sap/cds-dk (global): 9.0.5
@sap/cds-fiori: 2.0.1
@sap/cds-mtxs: 3.0.1
Node.js: v23.11.0
Anything else? Logs?
No response