npm @cap-js/cds-types 0.19.0
v0.19.0

2 hours ago

Added

  • Added types for req.req and req.res in cds.Request
  • cds.User now has an authInfo property typed against @sap/xssec's SecurityContext. @sap/xssec is an peer dependency.
  • cds.ql is now typed as a callable universal converter: tagged template, function accepting a CQN object, or plain string — all returning SELECT<unknown>
  • CXL helper functions (ref, val, expr, columns, expand, where, orderBy) are now exported from cds.ql and can be destructured from it
  • cds.parse.cql, cds.run, and cds.read now accept tagged template literals
  • Service.run(query) now proxies the entity type of the contained query through to the return type

Changed

  • Bound action handlers now keep req.subject typed as the bound action's instance type (__self) instead of a class/ref hybrid.
  • Subject-based query overloads (SELECT.from, SELECT.one.from, UPDATE, DELETE) now derive the entity class from the passed subject instance to preserve typed query results.

Deprecated

Removed

Fixed

  • Types for SELECT.one includes undefined

Security

Don't miss a new cds-types release

NewReleases is sending notifications on new releases.