How can i use TypeScript SDK?

Hi team:

I wan use TypeScript SDK to generates entities. and i found @haulmont/jmix-front-generator - npm (npmjs.com) this npm lib.

I refer to this TypeScript SDK :: CUBA Frontend UI Manual (cuba-platform.com)

In command line:
gen-jmix-front sdk:model

That will always ask me which project I want to use.
Is there a parameter that can be specified?

Thanks.

This command can be work
gen-jmix-front sdk:model -m projectModel.json

But How can i generate projectModel.json file without Jmix studio?
Is it possible to use gradle script?

Hi Bruce,

projectModel.json can be generated only by Studio.
Now this option is available only in IntelliJ Ultimate. In the next Studio update (1.1.2) we are going to make it available also in IJ Community.

Please keep in mind that the frontend framework has two very different implementations:

  • Version 0.9 works with Jmix backend through generic REST API. This version is intended for use in projects migrated from CUBA if they have a frontend module. We’ll publish the documentation on the migration process as soon as we fix some issues in the next Studio update (1.1.2).
  • Version 1.0 is experimental and works with Jmix backend through the GraphQL API. It’s not supported yet and most probably will be stripped down to SDK-only, so use at your own risk.

Regards,
Konstantin

Hi @krivopustov,
Does the projectModel.json will be generated on the IntelliJ Community now…?

There is no such function in Studio UI, but it should interact with the command-line frontend generator as described at Migration from CUBA Platform :: Jmix Frontend UI Manual

1 Like

Hi team

Is there any way to directly export jmix entity model to typescript in the current version?

Hi Bruce,
We don’t provide this function anymore.