Github packages API

Hi,

I'm using github-script in github actions to access packages api github.packages.getPackageVersionForOrganization but getting the following error

Cannot read property 'getPackageVersionForOrganization' of undefined

Is it possible to access the packages api via github-script or am I doing something wrong ?

Kind Regards.