Chamar API para POUI dentro do protheus

eu cheguei a desenvolver uma, mas utilizado rest ADVPL, no caso tiver que fazer umas configurações na aplicação do PO-UI.


um import { ProAppConfigService, ProJsToAdvplService } from '@totvs/protheus-lib-core';  
É faz passar no construtor para fazer injectable.
constructor(
 private readonly router: Router,
 private proAppConfigService: ProAppConfigService,
  private proJsToAdvplService: ProJsToAdvplService,
  private poNotification: PoNotificationService,
  private http: HttpClient
 ) {

     if (!this.proAppConfigService.insideProtheus()) {
      this.proAppConfigService.loadAppConfig();
    }

  async loadAppConfig(): Promise<string> {
    try {
      const response = await firstValueFrom(this.http.get<any>('assets/data/appConfig.json'));

      this.endPointProt = response.api_baseUrl;
      this.endPointProt = response.api_baseUrl
      this.poNotification.information('Endpoint Rest [JsonConfig] : ' + this.endPointProt);
      return response.api_baseUrl
    } catch (error) {
      //console.error('Error loading app config', error);
      throw error; // You might want to handle the error appropriately in your application
    }

/*configuração do arquivo appConfig.json
{
    "name": "My Protheus App",
    "version": "1.0.0",
    "api_baseUrl": "/",
    "productLine": "Protheus"
}
*/
  }

Tudo isso foi feito com base nesse artigo do Daniel Mendes https://medium.com/totvsdevelopers/apps-no-protheus-10db4f47f9fc , tem um github com exemplo.