tas-uell-sdk
v1.0.12
Published
TAS (Telemedicine Assistance Service) SDK for Angular applications - Video call functionality using TokBox/Vonage
Readme
TAS UELL SDK
Angular library para videollamada TAS (TokBox/Vonage), waiting room, feedback post-llamada y modo PiP.
Documentacion completa
Para documentacion funcional y tecnica completa, usar el portal:
- Portal de documentacion
- Componentes y responsabilidades
- Flow, estados y validaciones
- Flags y sincronismo
- Integracion fe-qa
- Integracion colaborador-qa
Instalacion
npm install tas-uell-sdk
npm install @ng-bootstrap/ng-bootstrap @opentok/client interactjsSetup rapido
1) Implementar TasHttpClient
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';
import { TasHttpClient } from 'tas-uell-sdk';
@Injectable({ providedIn: 'root' })
export class TasHttpAdapterService implements TasHttpClient {
constructor(private http: HttpClient) {}
get<T>(url: string, options: { headers?: Record<string, string> }): Observable<T> {
return this.http.get<T>(`https://your-api.com/${url}`, { headers: options.headers });
}
post<T>(url: string, options: { body: any; headers?: Record<string, string> }): Observable<T> {
return this.http.post<T>(`https://your-api.com/${url}`, options.body, { headers: options.headers });
}
patch<T>(url: string, options: { body: any; headers?: Record<string, string> }): Observable<T> {
return this.http.patch<T>(`https://your-api.com/${url}`, options.body, { headers: options.headers });
}
}2) Configurar modulo
import { TasUellSdkModule } from 'tas-uell-sdk';
import { TasHttpAdapterService } from './adapters/tas-http-adapter.service';
@NgModule({
imports: [
TasUellSdkModule.forRoot({
config: { tokBoxApiKey: 'YOUR_TOKBOX_API_KEY' },
httpClient: TasHttpAdapterService,
}),
],
})
export class AppModule {}3) Agregar PiP global
<router-outlet></router-outlet>
<tas-floating-call></tas-floating-call>4) Renderizar boton TAS
<tas-btn
[roomType]="'TAS'"
[entityId]="appointment.entityId"
[tenant]="tenantId"
[businessRole]="'BACKOFFICE'"
[currentUser]="currentUser"
></tas-btn>Superficie publica real (exportada)
Modulo
TasUellSdkModule
Configuracion
TasConfigTasHttpClientTAS_CONFIGTAS_HTTP_CLIENT
Servicios
TasServiceGeolocationServiceTasUtilityService
Componentes
TasButtonComponent(<tas-btn>)TasWaitingRoomComponent(<tas-waiting-room>)TasVideocallComponent(<tas-videocall>)TasFloatingCallComponent(<tas-floating-call>)TasAvatarComponent(<tas-avatar>)TasFeedbackModalComponent(<tas-feedback-modal>)TasLoadingOverlayComponent(<tas-loading-overlay>)
Interfaces y enums
Disponibles desde tas.interfaces.ts (ejemplos):
TasCurrentUser,TasCallConfig,TasAppointment,ProxyVideoStatusResponseTasUserRole,TasBusinessRole,TasRoomType,CallState,ViewMode,GeoStatus
Endpoints esperados por el SDK
POST v2/proxy/video/statusPOST v2/proxy/video/startPOST v2/proxy/video/finishPATCH v2/proxy/video/user/modifyPOST v2/proxy/video/save/feedbackGET v2/proxy/video/motivesGET v2/proxy/appointment/agendas/user/appointments?...
Notas
- El SDK inyecta estilos TAS scoped (
.tas-*) para modales/backdrop/tooltip. - No requiere importar CSS global de Bootstrap solo para TAS.
- Para detalle de validaciones, flags y sincronismo usar el portal en
docs/.
License
MIT
