tas-uell-sdk 0.0.5 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +161 -51
- package/esm2020/lib/components/tas-avatar/tas-avatar.component.mjs +75 -0
- package/esm2020/lib/components/tas-btn/tas-btn.component.mjs +146 -61
- package/esm2020/lib/components/tas-floating-call/tas-floating-call.component.mjs +48 -23
- package/esm2020/lib/components/tas-incoming-appointment/tas-incoming-appointment.component.mjs +109 -0
- package/esm2020/lib/components/tas-videocall/tas-videocall.component.mjs +217 -20
- package/esm2020/lib/components/tas-waiting-room/tas-waiting-room.component.mjs +226 -160
- package/esm2020/lib/config/tas.config.mjs +1 -1
- package/esm2020/lib/interfaces/tas.interfaces.mjs +45 -2
- package/esm2020/lib/services/geolocation.service.mjs +56 -0
- package/esm2020/lib/services/tas.service.mjs +400 -34
- package/esm2020/lib/tas-uell-sdk.module.mjs +25 -21
- package/esm2020/public-api.mjs +4 -1
- package/fesm2015/tas-uell-sdk.mjs +1323 -302
- package/fesm2015/tas-uell-sdk.mjs.map +1 -1
- package/fesm2020/tas-uell-sdk.mjs +1307 -300
- package/fesm2020/tas-uell-sdk.mjs.map +1 -1
- package/lib/components/tas-avatar/tas-avatar.component.d.ts +9 -0
- package/lib/components/tas-btn/tas-btn.component.d.ts +35 -15
- package/lib/components/tas-floating-call/tas-floating-call.component.d.ts +5 -1
- package/lib/components/tas-incoming-appointment/tas-incoming-appointment.component.d.ts +33 -0
- package/lib/components/tas-videocall/tas-videocall.component.d.ts +49 -3
- package/lib/components/tas-waiting-room/tas-waiting-room.component.d.ts +50 -35
- package/lib/config/tas.config.d.ts +7 -0
- package/lib/interfaces/tas.interfaces.d.ts +127 -35
- package/lib/services/geolocation.service.d.ts +24 -0
- package/lib/services/tas.service.d.ts +98 -9
- package/lib/tas-uell-sdk.module.d.ts +6 -3
- package/package.json +1 -1
- package/public-api.d.ts +3 -0
- package/src/lib/styles/tas-global.scss +27 -28
- package/INSTALL_AND_TEST.md +0 -427
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class TasAvatarComponent {
|
|
3
|
+
name: string;
|
|
4
|
+
size: number;
|
|
5
|
+
get initials(): string;
|
|
6
|
+
get fontSize(): number;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TasAvatarComponent, never>;
|
|
8
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TasAvatarComponent, "tas-avatar", never, { "name": "name"; "size": "size"; }, {}, never, never>;
|
|
9
|
+
}
|
|
@@ -1,32 +1,52 @@
|
|
|
1
|
-
import { OnInit, OnDestroy } from
|
|
2
|
-
import { NgbModal } from
|
|
3
|
-
import { TasCurrentUser } from
|
|
4
|
-
import { TasService } from
|
|
1
|
+
import { OnInit, OnDestroy } from '@angular/core';
|
|
2
|
+
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
|
|
3
|
+
import { TasCurrentUser, TasRoomType, TasBusinessRole } from '../../interfaces/tas.interfaces';
|
|
4
|
+
import { TasService } from '../../services/tas.service';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class TasButtonComponent implements OnInit, OnDestroy {
|
|
7
7
|
private modalService;
|
|
8
8
|
private tasService;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
roomType: TasRoomType;
|
|
10
|
+
entityId: number;
|
|
11
|
+
tenant: string;
|
|
12
|
+
businessRole: TasBusinessRole;
|
|
12
13
|
currentUser: TasCurrentUser;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
moderatorUserIds: number[];
|
|
16
|
-
/** Optional: If provided, skips room creation and goes directly to getting a token */
|
|
17
|
-
existingSessionId: string;
|
|
18
|
-
/** Optional: Custom button text */
|
|
19
|
-
buttonText: string;
|
|
14
|
+
variant: 'default' | 'teal';
|
|
15
|
+
buttonLabel: string;
|
|
20
16
|
isLoading: boolean;
|
|
17
|
+
isCheckingStatus: boolean;
|
|
18
|
+
isStatusError: boolean;
|
|
19
|
+
statusErrorMessage: string;
|
|
20
|
+
isJoinable: boolean;
|
|
21
21
|
private subscriptions;
|
|
22
22
|
private currentModalRef;
|
|
23
23
|
private videoCallModalRef;
|
|
24
|
+
private statusPollingInterval;
|
|
25
|
+
private readonly STATUS_POLL_INTERVAL_MS;
|
|
26
|
+
/** Whether user is backoffice (or admin/manager) */
|
|
27
|
+
get isBackoffice(): boolean;
|
|
28
|
+
/** Whether the button should be disabled */
|
|
29
|
+
get isDisabled(): boolean;
|
|
30
|
+
/** Reason why the button is disabled (for tooltip) */
|
|
31
|
+
get disabledReason(): string;
|
|
24
32
|
constructor(modalService: NgbModal, tasService: TasService);
|
|
25
33
|
ngOnInit(): void;
|
|
26
34
|
ngOnDestroy(): void;
|
|
35
|
+
/**
|
|
36
|
+
* Start polling status every 30 seconds
|
|
37
|
+
*/
|
|
38
|
+
private startStatusPolling;
|
|
39
|
+
/**
|
|
40
|
+
* Stop status polling
|
|
41
|
+
*/
|
|
42
|
+
private stopStatusPolling;
|
|
43
|
+
/**
|
|
44
|
+
* Check status endpoint to determine if button should be enabled
|
|
45
|
+
*/
|
|
46
|
+
private checkStatus;
|
|
27
47
|
onClick(): void;
|
|
28
48
|
private openWaitingRoomModal;
|
|
29
49
|
private openVideoCallModal;
|
|
30
50
|
static ɵfac: i0.ɵɵFactoryDeclaration<TasButtonComponent, never>;
|
|
31
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TasButtonComponent, "tas-btn", never, { "
|
|
51
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TasButtonComponent, "tas-btn", never, { "roomType": "roomType"; "entityId": "entityId"; "tenant": "tenant"; "businessRole": "businessRole"; "currentUser": "currentUser"; "variant": "variant"; "buttonLabel": "buttonLabel"; }, {}, never, never>;
|
|
32
52
|
}
|
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
import { OnInit, OnDestroy } from '@angular/core';
|
|
2
|
+
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
|
|
2
3
|
import { TasService } from '../../services/tas.service';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
export declare class TasFloatingCallComponent implements OnInit, OnDestroy {
|
|
5
6
|
private tasService;
|
|
7
|
+
private modalService;
|
|
6
8
|
isVisible: boolean;
|
|
7
9
|
isMuted: boolean;
|
|
8
10
|
private subscriptions;
|
|
9
|
-
|
|
11
|
+
private videoCallModalRef;
|
|
12
|
+
constructor(tasService: TasService, modalService: NgbModal);
|
|
10
13
|
ngOnInit(): void;
|
|
11
14
|
ngOnDestroy(): void;
|
|
12
15
|
onExpand(): void;
|
|
13
16
|
onHangUp(): void;
|
|
14
17
|
toggleMute(): void;
|
|
15
18
|
private setupSubscriptions;
|
|
19
|
+
private openVideoCallModal;
|
|
16
20
|
private readonly PIP_MARGIN;
|
|
17
21
|
private initInteract;
|
|
18
22
|
static ɵfac: i0.ɵɵFactoryDeclaration<TasFloatingCallComponent, never>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { OnInit, OnDestroy, EventEmitter } from '@angular/core';
|
|
2
|
+
import { TasService } from '../../services/tas.service';
|
|
3
|
+
import { TasAppointment, TasRoomType, TasBusinessRole, TasCurrentUser } from '../../interfaces/tas.interfaces';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class TasIncomingAppointmentComponent implements OnInit, OnDestroy {
|
|
6
|
+
private tasService;
|
|
7
|
+
roomType: TasRoomType;
|
|
8
|
+
entityId: number;
|
|
9
|
+
tenant: string;
|
|
10
|
+
businessRole: TasBusinessRole;
|
|
11
|
+
currentUser: TasCurrentUser;
|
|
12
|
+
enterCall: EventEmitter<TasAppointment>;
|
|
13
|
+
appointment: TasAppointment | null;
|
|
14
|
+
isLoading: boolean;
|
|
15
|
+
hasError: boolean;
|
|
16
|
+
private subscriptions;
|
|
17
|
+
constructor(tasService: TasService);
|
|
18
|
+
ngOnInit(): void;
|
|
19
|
+
ngOnDestroy(): void;
|
|
20
|
+
private loadAppointments;
|
|
21
|
+
onEnterCall(): void;
|
|
22
|
+
/**
|
|
23
|
+
* Format date to Spanish format: "Lunes 8 de diciembre"
|
|
24
|
+
*/
|
|
25
|
+
get formattedDate(): string;
|
|
26
|
+
/**
|
|
27
|
+
* Format time range: "9:00 - 9:30"
|
|
28
|
+
*/
|
|
29
|
+
get formattedTimeRange(): string;
|
|
30
|
+
private formatDate;
|
|
31
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TasIncomingAppointmentComponent, never>;
|
|
32
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TasIncomingAppointmentComponent, "tas-incoming-appointment", never, { "roomType": "roomType"; "entityId": "entityId"; "tenant": "tenant"; "businessRole": "businessRole"; "currentUser": "currentUser"; }, { "enterCall": "enterCall"; }, never, never>;
|
|
33
|
+
}
|
|
@@ -1,21 +1,38 @@
|
|
|
1
1
|
import { OnInit, OnDestroy, ElementRef, AfterViewInit } from '@angular/core';
|
|
2
2
|
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
|
|
3
3
|
import { TasService } from '../../services/tas.service';
|
|
4
|
-
import {
|
|
4
|
+
import { GeolocationService } from '../../services/geolocation.service';
|
|
5
|
+
import { CallState, TasBusinessRole, WaitingRoomUser } from '../../interfaces/tas.interfaces';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
export declare class TasVideocallComponent implements OnInit, OnDestroy, AfterViewInit {
|
|
7
8
|
activeModal: NgbActiveModal;
|
|
8
9
|
private tasService;
|
|
10
|
+
private geolocationService;
|
|
9
11
|
sessionId: string;
|
|
10
12
|
token: string;
|
|
13
|
+
appointmentId?: number;
|
|
14
|
+
videoCallId?: number;
|
|
15
|
+
userId?: number;
|
|
16
|
+
participantName: string;
|
|
17
|
+
tenant: string;
|
|
18
|
+
businessRole: TasBusinessRole;
|
|
11
19
|
isReturningFromPip: boolean;
|
|
12
20
|
publisherContainer: ElementRef;
|
|
13
21
|
subscriberContainer: ElementRef;
|
|
14
22
|
isPublisherSmall: boolean;
|
|
15
23
|
callState: CallState;
|
|
16
24
|
isMuted: boolean;
|
|
25
|
+
waitingRoomUsers: WaitingRoomUser[];
|
|
26
|
+
ownerHasJoined: boolean;
|
|
27
|
+
hasVideoStream: boolean;
|
|
28
|
+
dismissedUsers: number[];
|
|
29
|
+
showLocationPanel: boolean;
|
|
30
|
+
userHasLocation: boolean;
|
|
31
|
+
geoLocationStatus: 'unknown' | 'active' | 'denied';
|
|
32
|
+
geoRequestActive: boolean;
|
|
33
|
+
allGeoGranted: boolean;
|
|
17
34
|
private subscriptions;
|
|
18
|
-
constructor(activeModal: NgbActiveModal, tasService: TasService);
|
|
35
|
+
constructor(activeModal: NgbActiveModal, tasService: TasService, geolocationService: GeolocationService);
|
|
19
36
|
ngOnInit(): void;
|
|
20
37
|
ngAfterViewInit(): void;
|
|
21
38
|
ngOnDestroy(): void;
|
|
@@ -24,10 +41,39 @@ export declare class TasVideocallComponent implements OnInit, OnDestroy, AfterVi
|
|
|
24
41
|
minimize(): void;
|
|
25
42
|
toggleSwap(): void;
|
|
26
43
|
onDoubleClick(): void;
|
|
44
|
+
/**
|
|
45
|
+
* Check if current user can admit others (OWNER, BACKOFFICE, or MODERATOR)
|
|
46
|
+
*/
|
|
47
|
+
get canAdmitUsers(): boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Admit a user from the waiting room
|
|
50
|
+
*/
|
|
51
|
+
admitUser(userId: number): void;
|
|
52
|
+
/**
|
|
53
|
+
* Dismiss the waiting room notification for a user
|
|
54
|
+
*/
|
|
55
|
+
dismissWaitingNotification(userId: number): void;
|
|
56
|
+
/**
|
|
57
|
+
* Close the location panel
|
|
58
|
+
*/
|
|
59
|
+
closeLocationPanel(): void;
|
|
60
|
+
/**
|
|
61
|
+
* Request the user to share their location
|
|
62
|
+
*/
|
|
63
|
+
requestUserLocation(): void;
|
|
27
64
|
private setupSubscriptions;
|
|
65
|
+
/**
|
|
66
|
+
* Handle activateGeo request from backend (for non-owner users).
|
|
67
|
+
* If geo is already active, report it. If not, prompt user.
|
|
68
|
+
*/
|
|
69
|
+
private handleActivateGeo;
|
|
70
|
+
/**
|
|
71
|
+
* Report geolocation status to backend.
|
|
72
|
+
*/
|
|
73
|
+
private reportGeoStatus;
|
|
28
74
|
private initializeCall;
|
|
29
75
|
private resetVideoPositions;
|
|
30
76
|
private initInteract;
|
|
31
77
|
static ɵfac: i0.ɵɵFactoryDeclaration<TasVideocallComponent, never>;
|
|
32
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TasVideocallComponent, "tas-videocall", never, { "sessionId": "sessionId"; "token": "token"; "isReturningFromPip": "isReturningFromPip"; }, {}, never, never>;
|
|
78
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TasVideocallComponent, "tas-videocall", never, { "sessionId": "sessionId"; "token": "token"; "appointmentId": "appointmentId"; "videoCallId": "videoCallId"; "userId": "userId"; "participantName": "participantName"; "tenant": "tenant"; "businessRole": "businessRole"; "isReturningFromPip": "isReturningFromPip"; }, {}, never, never>;
|
|
33
79
|
}
|
|
@@ -1,63 +1,80 @@
|
|
|
1
|
-
import { OnInit, OnDestroy } from '@angular/core';
|
|
1
|
+
import { OnInit, OnDestroy, ChangeDetectorRef } from '@angular/core';
|
|
2
2
|
import { NgbActiveModal, NgbModal } from '@ng-bootstrap/ng-bootstrap';
|
|
3
3
|
import { TasService } from '../../services/tas.service';
|
|
4
|
-
import {
|
|
4
|
+
import { GeolocationService } from '../../services/geolocation.service';
|
|
5
|
+
import { TasCurrentUser, TasRoomType, TasBusinessRole } from '../../interfaces/tas.interfaces';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
export declare enum WaitingRoomState {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
GETTING_TOKEN = "GETTING_TOKEN",
|
|
8
|
+
CHECKING_STATUS = "CHECKING_STATUS",
|
|
9
|
+
WAITING_FOR_JOINABLE = "WAITING_FOR_JOINABLE",
|
|
10
10
|
READY = "READY",
|
|
11
|
+
GETTING_TOKEN = "GETTING_TOKEN",
|
|
12
|
+
JOINING = "JOINING",
|
|
11
13
|
ERROR = "ERROR"
|
|
12
14
|
}
|
|
13
15
|
export declare class TasWaitingRoomComponent implements OnInit, OnDestroy {
|
|
14
16
|
activeModal: NgbActiveModal;
|
|
15
17
|
private tasService;
|
|
18
|
+
private geolocationService;
|
|
16
19
|
private modalService;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
+
private cdr;
|
|
21
|
+
roomType: TasRoomType;
|
|
22
|
+
entityId: number;
|
|
23
|
+
tenant: string;
|
|
24
|
+
businessRole: TasBusinessRole;
|
|
20
25
|
currentUser: TasCurrentUser;
|
|
21
|
-
ownerUserIds: number[];
|
|
22
|
-
regularUserIds: number[];
|
|
23
|
-
moderatorUserIds: number[];
|
|
24
|
-
/** Optional: If provided, skips room creation and goes directly to getting a token */
|
|
25
|
-
existingSessionId: string;
|
|
26
26
|
state: WaitingRoomState;
|
|
27
27
|
WaitingRoomState: typeof WaitingRoomState;
|
|
28
28
|
errorMessage: string;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
showJoinExistingUI: boolean;
|
|
33
|
-
/** Manual session ID input by user */
|
|
34
|
-
manualSessionId: string;
|
|
35
|
-
/** Track if we're joining an existing session (for UI display) */
|
|
36
|
-
isJoiningExisting: boolean;
|
|
37
|
-
private sessionId;
|
|
29
|
+
isJoinable: boolean;
|
|
30
|
+
private resolvedSessionId;
|
|
31
|
+
private resolvedAppointmentId;
|
|
38
32
|
private token;
|
|
39
|
-
private
|
|
33
|
+
private videoCallId;
|
|
40
34
|
private subscriptions;
|
|
41
35
|
private videoCallModalRef;
|
|
42
|
-
|
|
36
|
+
private geoPosition;
|
|
37
|
+
/** Whether current user is an owner */
|
|
38
|
+
get isOwner(): boolean;
|
|
39
|
+
constructor(activeModal: NgbActiveModal, tasService: TasService, geolocationService: GeolocationService, modalService: NgbModal, cdr: ChangeDetectorRef);
|
|
43
40
|
ngOnInit(): void;
|
|
44
|
-
ngOnDestroy(): void;
|
|
45
41
|
/**
|
|
46
|
-
*
|
|
42
|
+
* Request camera and microphone permissions.
|
|
43
|
+
*/
|
|
44
|
+
private requestMediaPermissions;
|
|
45
|
+
/**
|
|
46
|
+
* Request geolocation immediately on init.
|
|
47
|
+
* Only for regular users (not owners/backoffice).
|
|
48
|
+
* If user allows, store position and send to backend.
|
|
49
|
+
*/
|
|
50
|
+
private requestGeolocation;
|
|
51
|
+
/**
|
|
52
|
+
* Send geolocation to backend via modify user endpoint.
|
|
53
|
+
* NOTE: Endpoint call is prepared but may not be active yet.
|
|
47
54
|
*/
|
|
48
|
-
|
|
55
|
+
private sendGeolocationToBackend;
|
|
56
|
+
ngOnDestroy(): void;
|
|
49
57
|
/**
|
|
50
|
-
*
|
|
58
|
+
* Check status to get session info
|
|
51
59
|
*/
|
|
52
|
-
|
|
60
|
+
private checkStatus;
|
|
53
61
|
/**
|
|
54
|
-
*
|
|
62
|
+
* Handle changes to joinable status
|
|
55
63
|
*/
|
|
56
|
-
|
|
64
|
+
private handleJoinableChange;
|
|
57
65
|
/**
|
|
58
|
-
*
|
|
66
|
+
* Called when user clicks the join button.
|
|
67
|
+
* Calls /start to get token then auto-joins.
|
|
59
68
|
*/
|
|
60
69
|
joinSession(): void;
|
|
70
|
+
/**
|
|
71
|
+
* Check if user has owner/backoffice role
|
|
72
|
+
*/
|
|
73
|
+
private get isBackoffice();
|
|
74
|
+
/**
|
|
75
|
+
* Start session and join - called when user clicks join button
|
|
76
|
+
*/
|
|
77
|
+
private startSessionAndJoin;
|
|
61
78
|
/**
|
|
62
79
|
* Closes the waiting room
|
|
63
80
|
*/
|
|
@@ -66,9 +83,7 @@ export declare class TasWaitingRoomComponent implements OnInit, OnDestroy {
|
|
|
66
83
|
* Retry after an error
|
|
67
84
|
*/
|
|
68
85
|
retry(): void;
|
|
69
|
-
private buildUsersArray;
|
|
70
|
-
private setupViewModeSubscription;
|
|
71
86
|
private openVideoCallModal;
|
|
72
87
|
static ɵfac: i0.ɵɵFactoryDeclaration<TasWaitingRoomComponent, never>;
|
|
73
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TasWaitingRoomComponent, "tas-waiting-room", never, { "
|
|
88
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TasWaitingRoomComponent, "tas-waiting-room", never, { "roomType": "roomType"; "entityId": "entityId"; "tenant": "tenant"; "businessRole": "businessRole"; "currentUser": "currentUser"; }, {}, never, never>;
|
|
74
89
|
}
|
|
@@ -13,10 +13,17 @@ export interface TasConfig {
|
|
|
13
13
|
* HTTP client interface that consuming apps must implement
|
|
14
14
|
*/
|
|
15
15
|
export interface TasHttpClient {
|
|
16
|
+
get<T>(url: string, options: {
|
|
17
|
+
headers?: Record<string, string>;
|
|
18
|
+
}): Observable<T>;
|
|
16
19
|
post<T>(url: string, options: {
|
|
17
20
|
body: any;
|
|
18
21
|
headers?: Record<string, string>;
|
|
19
22
|
}): Observable<T>;
|
|
23
|
+
patch<T>(url: string, options: {
|
|
24
|
+
body: any;
|
|
25
|
+
headers?: Record<string, string>;
|
|
26
|
+
}): Observable<T>;
|
|
20
27
|
}
|
|
21
28
|
/**
|
|
22
29
|
* Injection token for TAS configuration
|
|
@@ -1,32 +1,8 @@
|
|
|
1
|
-
export interface CreateRoomUser {
|
|
2
|
-
userExternalId: number;
|
|
3
|
-
rol: TasUserRole;
|
|
4
|
-
}
|
|
5
|
-
export interface CreateRoomRequest {
|
|
6
|
-
roomType: TasRoomType;
|
|
7
|
-
type: TasSessionType;
|
|
8
|
-
utcScheduled?: string;
|
|
9
|
-
product: string;
|
|
10
|
-
tenant: string;
|
|
11
|
-
appointmentId: number;
|
|
12
|
-
users: CreateRoomUser[];
|
|
13
|
-
}
|
|
14
|
-
export interface CreateRoomResponse {
|
|
15
|
-
content: {
|
|
16
|
-
roomType: string | null;
|
|
17
|
-
tenant: string | null;
|
|
18
|
-
user_id: string | null;
|
|
19
|
-
product: string | null;
|
|
20
|
-
record: boolean | null;
|
|
21
|
-
sessionId: string;
|
|
22
|
-
roomId: number;
|
|
23
|
-
status: TasSessionType;
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
1
|
export declare enum TasRoomType {
|
|
27
2
|
TAS = "TAS",
|
|
28
3
|
JM = "JM",
|
|
29
|
-
WEBINAR = "WEBINAR"
|
|
4
|
+
WEBINAR = "WEBINAR",
|
|
5
|
+
WELLNESS_MANAGER = "WELLNESS_MANAGER"
|
|
30
6
|
}
|
|
31
7
|
export declare enum TasSessionType {
|
|
32
8
|
SPONTANEOUS = "SPONTANEOUS",
|
|
@@ -37,11 +13,69 @@ export declare enum TasUserRole {
|
|
|
37
13
|
USER = "USER",
|
|
38
14
|
MODERATOR = "MODERATOR"
|
|
39
15
|
}
|
|
16
|
+
export declare enum TasBusinessRole {
|
|
17
|
+
ADMIN_MANAGER = "ADMIN_MANAGER",
|
|
18
|
+
MANAGER = "MANAGER",
|
|
19
|
+
BACKOFFICE = "BACKOFFICE",
|
|
20
|
+
USER = "USER"
|
|
21
|
+
}
|
|
22
|
+
export declare enum VideoSessionStatus {
|
|
23
|
+
ACTIVE = "ACTIVE",
|
|
24
|
+
INACTIVE = "INACTIVE",
|
|
25
|
+
PENDING = "PENDING",
|
|
26
|
+
SCHEDULED = "SCHEDULED"
|
|
27
|
+
}
|
|
28
|
+
export declare enum UserStatus {
|
|
29
|
+
ACTIVE = "ACTIVE",
|
|
30
|
+
INACTIVE = "INACTIVE",
|
|
31
|
+
ASSIGNED = "ASSIGNED"
|
|
32
|
+
}
|
|
33
|
+
export declare enum UserCallAction {
|
|
34
|
+
WAITING_ROOM_ENTER = "WAITING_ROOM_ENTER",
|
|
35
|
+
WAITING_ROOM_LEAVE = "WAITING_ROOM_LEAVE",
|
|
36
|
+
BAN = "BAN",
|
|
37
|
+
CHANGE_STATUS = "CHANGE_STATUS",
|
|
38
|
+
REQUEST_GEOLOCALIZATION = "REQUEST_GEOLOCALIZATION",
|
|
39
|
+
ACTIVATE_GEOLOCATION = "ACTIVATE_GEOLOCATION"
|
|
40
|
+
}
|
|
41
|
+
export declare enum RoomUserStatus {
|
|
42
|
+
ASSIGNED = "ASSIGNED",
|
|
43
|
+
WAITING = "WAITING",
|
|
44
|
+
JOINED = "JOINED",
|
|
45
|
+
FINISHED = "FINISHED"
|
|
46
|
+
}
|
|
47
|
+
export declare enum CallState {
|
|
48
|
+
IDLE = "IDLE",
|
|
49
|
+
CONNECTING = "CONNECTING",
|
|
50
|
+
CONNECTED = "CONNECTED",
|
|
51
|
+
DISCONNECTED = "DISCONNECTED",
|
|
52
|
+
ERROR = "ERROR"
|
|
53
|
+
}
|
|
54
|
+
export declare enum ViewMode {
|
|
55
|
+
FULLSCREEN = "FULLSCREEN",
|
|
56
|
+
PIP = "PIP"
|
|
57
|
+
}
|
|
40
58
|
export interface TasCurrentUser {
|
|
59
|
+
id: number;
|
|
41
60
|
name: string;
|
|
42
61
|
lastname: string;
|
|
43
62
|
role: TasUserRole;
|
|
44
63
|
}
|
|
64
|
+
/** Input configuration for the TAS video call library */
|
|
65
|
+
export interface TasCallConfig {
|
|
66
|
+
appointmentId?: number;
|
|
67
|
+
sessionId?: string;
|
|
68
|
+
roomType: TasRoomType;
|
|
69
|
+
entityId: number;
|
|
70
|
+
tenant: string;
|
|
71
|
+
businessRole: TasBusinessRole;
|
|
72
|
+
currentUser: TasCurrentUser;
|
|
73
|
+
}
|
|
74
|
+
export interface StartSessionRequest {
|
|
75
|
+
sessionId: string;
|
|
76
|
+
name: string;
|
|
77
|
+
lastname: string;
|
|
78
|
+
}
|
|
45
79
|
export interface GenerateTokenRequest {
|
|
46
80
|
sessionId: string;
|
|
47
81
|
name: string;
|
|
@@ -53,14 +87,72 @@ export interface GenerateTokenResponse {
|
|
|
53
87
|
token: string;
|
|
54
88
|
};
|
|
55
89
|
}
|
|
56
|
-
export
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
90
|
+
export interface ProxyVideoStatusRequest {
|
|
91
|
+
appointmentId?: number;
|
|
92
|
+
businessRole?: TasBusinessRole;
|
|
93
|
+
tenant?: string;
|
|
94
|
+
sessionId?: string;
|
|
95
|
+
roomType?: TasRoomType;
|
|
96
|
+
entityId?: number;
|
|
62
97
|
}
|
|
63
|
-
export
|
|
64
|
-
|
|
65
|
-
|
|
98
|
+
export interface ProxyVideoStatusUser {
|
|
99
|
+
userId: number;
|
|
100
|
+
rol: TasUserRole;
|
|
101
|
+
status: UserStatus;
|
|
102
|
+
}
|
|
103
|
+
export interface ProxyVideoStatusResponse {
|
|
104
|
+
content: {
|
|
105
|
+
videoCallId: number;
|
|
106
|
+
sessionId: string;
|
|
107
|
+
statusVL: VideoSessionStatus;
|
|
108
|
+
joinable: boolean;
|
|
109
|
+
waitingRoomAvailable: boolean;
|
|
110
|
+
appointmentId: number;
|
|
111
|
+
activateGeo: boolean;
|
|
112
|
+
geoRequestActive?: boolean;
|
|
113
|
+
allGeoGranted?: boolean;
|
|
114
|
+
users: ProxyVideoStatusUser[];
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
export interface ProxyVideoFinishRequest {
|
|
118
|
+
sessionId: string;
|
|
119
|
+
businessRole: TasBusinessRole;
|
|
120
|
+
}
|
|
121
|
+
export interface FinishSessionResponse {
|
|
122
|
+
content: {
|
|
123
|
+
message: string;
|
|
124
|
+
callStatus: string;
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
export interface ProxyVideoUserModifyRequest {
|
|
128
|
+
userId?: number;
|
|
129
|
+
videoCallId: number;
|
|
130
|
+
action?: UserCallAction;
|
|
131
|
+
newStatus?: RoomUserStatus;
|
|
132
|
+
latitude?: number;
|
|
133
|
+
longitude?: number;
|
|
134
|
+
}
|
|
135
|
+
export interface WaitingRoomUser {
|
|
136
|
+
userId: number;
|
|
137
|
+
name: string;
|
|
138
|
+
status: RoomUserStatus;
|
|
139
|
+
}
|
|
140
|
+
export declare enum AppointmentStatus {
|
|
141
|
+
CONFIRMED = "CONFIRMED",
|
|
142
|
+
CANCELLED = "CANCELLED"
|
|
143
|
+
}
|
|
144
|
+
export interface TasAppointment {
|
|
145
|
+
id: number;
|
|
146
|
+
agendaId: number;
|
|
147
|
+
date: string;
|
|
148
|
+
startTime: string;
|
|
149
|
+
endTime: string;
|
|
150
|
+
bookingType: string;
|
|
151
|
+
status: AppointmentStatus;
|
|
152
|
+
title: string;
|
|
153
|
+
notes: string;
|
|
154
|
+
}
|
|
155
|
+
export interface GetAppointmentsRequest {
|
|
156
|
+
fromDate: string;
|
|
157
|
+
toDate: string;
|
|
66
158
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export interface GeoPosition {
|
|
3
|
+
latitude: number;
|
|
4
|
+
longitude: number;
|
|
5
|
+
}
|
|
6
|
+
export declare class GeolocationService {
|
|
7
|
+
private cachedPosition;
|
|
8
|
+
/**
|
|
9
|
+
* Request current geolocation position using Web Geolocation API.
|
|
10
|
+
* Works in both browser and Capacitor environments.
|
|
11
|
+
* @returns Promise with {latitude, longitude} or null if denied/unavailable
|
|
12
|
+
*/
|
|
13
|
+
getCurrentPosition(): Promise<GeoPosition | null>;
|
|
14
|
+
/**
|
|
15
|
+
* Get the cached position from the last successful request.
|
|
16
|
+
*/
|
|
17
|
+
getCachedPosition(): GeoPosition | null;
|
|
18
|
+
/**
|
|
19
|
+
* Clear the cached position.
|
|
20
|
+
*/
|
|
21
|
+
clearCache(): void;
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GeolocationService, never>;
|
|
23
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<GeolocationService>;
|
|
24
|
+
}
|