tas-uell-sdk 0.1.0 → 0.1.1
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 +3 -1
- package/esm2020/lib/components/tas-btn/tas-btn.component.mjs +33 -31
- package/esm2020/lib/components/tas-incoming-appointment/tas-incoming-appointment.component.mjs +4 -4
- package/esm2020/lib/interfaces/tas.interfaces.mjs +2 -1
- package/esm2020/lib/services/tas-utility.service.mjs +60 -0
- package/esm2020/lib/services/tas.service.mjs +13 -13
- package/esm2020/public-api.mjs +2 -1
- package/fesm2015/tas-uell-sdk.mjs +105 -46
- package/fesm2015/tas-uell-sdk.mjs.map +1 -1
- package/fesm2020/tas-uell-sdk.mjs +103 -44
- package/fesm2020/tas-uell-sdk.mjs.map +1 -1
- package/lib/components/tas-btn/tas-btn.component.d.ts +4 -1
- package/lib/interfaces/tas.interfaces.d.ts +5 -1
- package/lib/services/tas-utility.service.d.ts +26 -0
- package/lib/services/tas.service.d.ts +3 -5
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -2,10 +2,12 @@ import { OnInit, OnDestroy } from '@angular/core';
|
|
|
2
2
|
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
|
|
3
3
|
import { TasCurrentUser, TasRoomType, TasBusinessRole } from '../../interfaces/tas.interfaces';
|
|
4
4
|
import { TasService } from '../../services/tas.service';
|
|
5
|
+
import { TasUtilityService } from '../../services/tas-utility.service';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
export declare class TasButtonComponent implements OnInit, OnDestroy {
|
|
7
8
|
private modalService;
|
|
8
9
|
private tasService;
|
|
10
|
+
private tasUtilityService;
|
|
9
11
|
roomType: TasRoomType;
|
|
10
12
|
entityId: number;
|
|
11
13
|
tenant: string;
|
|
@@ -18,6 +20,7 @@ export declare class TasButtonComponent implements OnInit, OnDestroy {
|
|
|
18
20
|
isStatusError: boolean;
|
|
19
21
|
statusErrorMessage: string;
|
|
20
22
|
isJoinable: boolean;
|
|
23
|
+
shouldShowButton: boolean;
|
|
21
24
|
private subscriptions;
|
|
22
25
|
private currentModalRef;
|
|
23
26
|
private videoCallModalRef;
|
|
@@ -29,7 +32,7 @@ export declare class TasButtonComponent implements OnInit, OnDestroy {
|
|
|
29
32
|
get isDisabled(): boolean;
|
|
30
33
|
/** Reason why the button is disabled (for tooltip) */
|
|
31
34
|
get disabledReason(): string;
|
|
32
|
-
constructor(modalService: NgbModal, tasService: TasService);
|
|
35
|
+
constructor(modalService: NgbModal, tasService: TasService, tasUtilityService: TasUtilityService);
|
|
33
36
|
ngOnInit(): void;
|
|
34
37
|
ngOnDestroy(): void;
|
|
35
38
|
/**
|
|
@@ -139,7 +139,8 @@ export interface WaitingRoomUser {
|
|
|
139
139
|
}
|
|
140
140
|
export declare enum AppointmentStatus {
|
|
141
141
|
CONFIRMED = "CONFIRMED",
|
|
142
|
-
CANCELLED = "CANCELLED"
|
|
142
|
+
CANCELLED = "CANCELLED",
|
|
143
|
+
RESCHEDULED = "RESCHEDULED"
|
|
143
144
|
}
|
|
144
145
|
export interface TasAppointment {
|
|
145
146
|
id: number;
|
|
@@ -151,8 +152,11 @@ export interface TasAppointment {
|
|
|
151
152
|
status: AppointmentStatus;
|
|
152
153
|
title: string;
|
|
153
154
|
notes: string;
|
|
155
|
+
entityId: number;
|
|
156
|
+
roomType: TasRoomType;
|
|
154
157
|
}
|
|
155
158
|
export interface GetAppointmentsRequest {
|
|
156
159
|
fromDate: string;
|
|
157
160
|
toDate: string;
|
|
161
|
+
entityId?: number;
|
|
158
162
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class TasUtilityService {
|
|
3
|
+
/**
|
|
4
|
+
* Determines if the button should be shown based on the error message.
|
|
5
|
+
* Returns false if the error message matches any of the patterns that indicate
|
|
6
|
+
* the button should be hidden (but polling should continue).
|
|
7
|
+
*
|
|
8
|
+
* @param errorMessage The error message from the status call
|
|
9
|
+
* @returns true if button should be shown, false if it should be hidden
|
|
10
|
+
*/
|
|
11
|
+
shouldShowButton(errorMessage: string | null | undefined): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Check if at least one OWNER has joined the call.
|
|
14
|
+
*/
|
|
15
|
+
checkIfOwnerJoined(users: {
|
|
16
|
+
userId: number;
|
|
17
|
+
rol: string;
|
|
18
|
+
status: string;
|
|
19
|
+
}[]): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Extract error message from various error structures.
|
|
22
|
+
*/
|
|
23
|
+
extractErrorMessage(err: any, fallback?: string): string;
|
|
24
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TasUtilityService, never>;
|
|
25
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<TasUtilityService>;
|
|
26
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TasUtilityService } from './tas-utility.service';
|
|
1
2
|
import { Observable } from 'rxjs';
|
|
2
3
|
import * as OT from '@opentok/client';
|
|
3
4
|
import { GenerateTokenResponse, StartSessionRequest, FinishSessionResponse, ProxyVideoStatusRequest, ProxyVideoStatusResponse, ProxyVideoFinishRequest, ProxyVideoUserModifyRequest, UserCallAction, RoomUserStatus, TasBusinessRole, CallState, ViewMode, WaitingRoomUser, TasAppointment, GetAppointmentsRequest } from '../interfaces/tas.interfaces';
|
|
@@ -7,6 +8,7 @@ export { CallState, ViewMode, TasBusinessRole, UserCallAction, RoomUserStatus };
|
|
|
7
8
|
export declare class TasService {
|
|
8
9
|
private httpClient;
|
|
9
10
|
private config;
|
|
11
|
+
private tasUtilityService;
|
|
10
12
|
private session;
|
|
11
13
|
private publisher;
|
|
12
14
|
private subscribers;
|
|
@@ -44,7 +46,7 @@ export declare class TasService {
|
|
|
44
46
|
private currentAppointmentId;
|
|
45
47
|
private currentVideoCallId;
|
|
46
48
|
private currentTenant;
|
|
47
|
-
constructor(httpClient: TasHttpClient, config: TasConfig);
|
|
49
|
+
constructor(httpClient: TasHttpClient, config: TasConfig, tasUtilityService: TasUtilityService);
|
|
48
50
|
/**
|
|
49
51
|
* Start automatic status polling for the current session.
|
|
50
52
|
* Status is polled every intervalMs (default 30s).
|
|
@@ -114,10 +116,6 @@ export declare class TasService {
|
|
|
114
116
|
* Process status response to update waiting room users and owner join status.
|
|
115
117
|
*/
|
|
116
118
|
private processStatusResponse;
|
|
117
|
-
/**
|
|
118
|
-
* Check if at least one OWNER has joined the call.
|
|
119
|
-
*/
|
|
120
|
-
private checkIfOwnerJoined;
|
|
121
119
|
/**
|
|
122
120
|
* Admit a user from the waiting room by changing their status.
|
|
123
121
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tas-uell-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "TAS (Telemedicine Assistance Service) SDK for Angular applications - Video call functionality using TokBox/Vonage",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": "^13.0.0 || ^14.0.0 || ^15.0.0 || ^16.0.0",
|
package/public-api.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export * from './lib/config/tas.config';
|
|
|
2
2
|
export * from './lib/interfaces/tas.interfaces';
|
|
3
3
|
export * from './lib/services/tas.service';
|
|
4
4
|
export * from './lib/services/geolocation.service';
|
|
5
|
+
export * from './lib/services/tas-utility.service';
|
|
5
6
|
export * from './lib/components/tas-btn/tas-btn.component';
|
|
6
7
|
export * from './lib/components/tas-waiting-room/tas-waiting-room.component';
|
|
7
8
|
export * from './lib/components/tas-videocall/tas-videocall.component';
|