Hello Team,
I replicate this project GitHub - cuba-platform/sample-session-planner: This is the project that is used in the Quick Start video for CUBA Platfrom framework. with React frontend module.
My goal is to call a Middleware Service from new (React) UI.
I followed this link CUBA Platform: TypeScript SDK and REST API - Java Code Geeks - 2023
I generated the entities from Intellij Cuba/Advanced/Managed Modules / Create Portal and also I used
npm install -g
@cuba
-platform/front-generator
And then
gen-cuba-front sdk:all
Seems that both made the same thing. Is there any difference between these two approaches?
On the other hand I expected to have in services.ts this code snippet:
export var restServices = {
sessionplanner_SessionService: {
rescheduleSession: (cubaApp: CubaApp, fetchOpts?: FetchOptions) => (params: sessionplanner_SessionService_rescheduleSession_params) => {
return cubaApp.invokeService("sessionplanner_SessionService", "rescheduleSession", params, fetchOpts);
}
}
};
but I have only
import { CubaApp, FetchOptions } from "@cuba-platform/rest";
export var restServices = {};
What I did wrong?
What means
if we expose the Session Service using REST API? How can I do that?
Regards,
-n