react-native-altibbi 0.1.9 → 0.3.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 +8 -8
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/altibbi/OTPublisherLayout.java +2 -1
- package/android/src/main/java/com/altibbi/OTPublisherViewManager.java +2 -1
- package/android/src/main/java/com/altibbi/OTRN.java +2 -1
- package/android/src/main/java/com/altibbi/OTScreenCapturer.java +1 -0
- package/android/src/main/java/com/altibbi/OTSessionManager.java +91 -33
- package/android/src/main/java/com/altibbi/OTSubscriberLayout.java +0 -1
- package/android/src/main/java/com/altibbi/OTSubscriberViewManager.java +2 -1
- package/android/src/main/java/com/altibbi/utils/EventUtils.java +1 -1
- package/android/src/main/java/com/altibbi/utils/Utils.java +8 -11
- package/ios/OTSessionManager.m +7 -4
- package/ios/OTSessionManager.swift +156 -80
- package/ios/Utils/EventUtils.swift +51 -12
- package/ios/Utils/Utils.swift +21 -12
- package/lib/commonjs/connection.js +101 -6
- package/lib/commonjs/connection.js.map +1 -1
- package/lib/commonjs/index.js +12 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/scoket.js.map +1 -1
- package/lib/commonjs/video/OT.d.js +3 -0
- package/lib/commonjs/video/OT.d.js.map +1 -1
- package/lib/commonjs/video/OT.js +3 -2
- package/lib/commonjs/video/OT.js.map +1 -1
- package/lib/commonjs/video/OTError.js.map +1 -1
- package/lib/commonjs/video/OTPublisher.d.js +2 -2
- package/lib/commonjs/video/OTPublisher.d.js.map +1 -1
- package/lib/commonjs/video/OTPublisher.js +27 -7
- package/lib/commonjs/video/OTPublisher.js.map +1 -1
- package/lib/commonjs/video/OTSession.d.js +2 -1
- package/lib/commonjs/video/OTSession.d.js.map +1 -1
- package/lib/commonjs/video/OTSession.js +25 -5
- package/lib/commonjs/video/OTSession.js.map +1 -1
- package/lib/commonjs/video/OTSubscriber.d.js +2 -2
- package/lib/commonjs/video/OTSubscriber.d.js.map +1 -1
- package/lib/commonjs/video/OTSubscriber.js +20 -4
- package/lib/commonjs/video/OTSubscriber.js.map +1 -1
- package/lib/commonjs/video/contexts/OTContext.js +1 -1
- package/lib/commonjs/video/contexts/OTContext.js.map +1 -1
- package/lib/commonjs/video/helpers/OTHelper.js +2 -2
- package/lib/commonjs/video/helpers/OTHelper.js.map +1 -1
- package/lib/commonjs/video/helpers/OTPublisherHelper.js +47 -8
- package/lib/commonjs/video/helpers/OTPublisherHelper.js.map +1 -1
- package/lib/commonjs/video/helpers/OTSessionHelper.js +7 -1
- package/lib/commonjs/video/helpers/OTSessionHelper.js.map +1 -1
- package/lib/commonjs/video/helpers/OTSubscriberHelper.js +1 -1
- package/lib/commonjs/video/index.d.js +1 -1
- package/lib/commonjs/video/index.d.js.map +1 -1
- package/lib/commonjs/video/index.js +1 -1
- package/lib/commonjs/video/index.js.map +1 -1
- package/lib/module/connection.js +92 -4
- package/lib/module/connection.js.map +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/scoket.js.map +1 -1
- package/lib/module/video/OT.d.js +2 -1
- package/lib/module/video/OT.d.js.map +1 -1
- package/lib/module/video/OT.js +3 -2
- package/lib/module/video/OT.js.map +1 -1
- package/lib/module/video/OTError.js.map +1 -1
- package/lib/module/video/OTPublisher.d.js +1 -1
- package/lib/module/video/OTPublisher.d.js.map +1 -1
- package/lib/module/video/OTPublisher.js +26 -6
- package/lib/module/video/OTPublisher.js.map +1 -1
- package/lib/module/video/OTSession.d.js +1 -1
- package/lib/module/video/OTSession.d.js.map +1 -1
- package/lib/module/video/OTSession.js +25 -5
- package/lib/module/video/OTSession.js.map +1 -1
- package/lib/module/video/OTSubscriber.d.js +1 -1
- package/lib/module/video/OTSubscriber.d.js.map +1 -1
- package/lib/module/video/OTSubscriber.js +19 -3
- package/lib/module/video/OTSubscriber.js.map +1 -1
- package/lib/module/video/helpers/OTHelper.js +1 -1
- package/lib/module/video/helpers/OTHelper.js.map +1 -1
- package/lib/module/video/helpers/OTPublisherHelper.js +47 -8
- package/lib/module/video/helpers/OTPublisherHelper.js.map +1 -1
- package/lib/module/video/helpers/OTSessionHelper.js +6 -1
- package/lib/module/video/helpers/OTSessionHelper.js.map +1 -1
- package/lib/module/video/helpers/OTSubscriberHelper.js +1 -1
- package/lib/typescript/src/connection.d.ts +11 -3
- package/lib/typescript/src/connection.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +1 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +73 -13
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/lib/typescript/src/video/OT.d.ts +1 -1
- package/lib/typescript/src/video/OT.d.ts.map +1 -1
- package/lib/typescript/src/video/OTPublisher.d.ts +7 -1
- package/lib/typescript/src/video/OTPublisher.d.ts.map +1 -1
- package/lib/typescript/src/video/OTSession.d.ts +3 -1
- package/lib/typescript/src/video/OTSession.d.ts.map +1 -1
- package/lib/typescript/src/video/OTSubscriber.d.ts +7 -1
- package/lib/typescript/src/video/OTSubscriber.d.ts.map +1 -1
- package/lib/typescript/src/video/helpers/OTPublisherHelper.d.ts +2 -1
- package/lib/typescript/src/video/helpers/OTPublisherHelper.d.ts.map +1 -1
- package/lib/typescript/src/video/helpers/OTSessionHelper.d.ts +1 -0
- package/lib/typescript/src/video/helpers/OTSessionHelper.d.ts.map +1 -1
- package/lib/typescript/src/video/views/OTPublisherView.d.ts.map +1 -1
- package/lib/typescript/src/video/views/OTSubscriberView.d.ts.map +1 -1
- package/package.json +1 -1
- package/react-native-altibbi.podspec +2 -2
- package/src/connection.ts +123 -6
- package/src/index.tsx +2 -0
- package/src/types.ts +77 -11
- package/src/video/OT.d.ts +5 -14
- package/src/video/OT.js +6 -4
- package/src/video/OTPublisher.d.ts +16 -10
- package/src/video/OTPublisher.js +37 -5
- package/src/video/OTSession.d.ts +42 -41
- package/src/video/OTSession.js +23 -4
- package/src/video/OTSubscriber.d.ts +12 -6
- package/src/video/OTSubscriber.js +25 -3
- package/src/video/helpers/OTHelper.js +1 -1
- package/src/video/helpers/OTPublisherHelper.js +56 -6
- package/src/video/helpers/OTSessionHelper.js +7 -0
- package/src/video/helpers/OTSubscriberHelper.js +1 -1
- package/android/src/main/java/com/altibbi/OTCustomAudioDevice.java +0 -1146
|
@@ -14,6 +14,7 @@ interface UserType {
|
|
|
14
14
|
insurance_id?: string;
|
|
15
15
|
policy_number?: string;
|
|
16
16
|
nationality_number?: string;
|
|
17
|
+
avatar_media_id?: string;
|
|
17
18
|
height?: string;
|
|
18
19
|
weight?: string;
|
|
19
20
|
blood_type?: BloodType;
|
|
@@ -66,9 +67,11 @@ interface ChatConfig {
|
|
|
66
67
|
interface VoipConfig {
|
|
67
68
|
id?: number;
|
|
68
69
|
consultation_id?: number;
|
|
69
|
-
|
|
70
|
-
|
|
70
|
+
api_key?: string;
|
|
71
|
+
call_id?: string;
|
|
71
72
|
token?: string;
|
|
73
|
+
created_at?: string;
|
|
74
|
+
updated_at?: string;
|
|
72
75
|
}
|
|
73
76
|
interface Recommendation {
|
|
74
77
|
id?: number;
|
|
@@ -110,6 +113,7 @@ interface RecommendationFdaDrug {
|
|
|
110
113
|
relationWithFood?: string;
|
|
111
114
|
specialInstructions?: string;
|
|
112
115
|
routeOfAdministration?: string;
|
|
116
|
+
registrationNumber?: string;
|
|
113
117
|
}
|
|
114
118
|
interface RecommendationICD10 {
|
|
115
119
|
symptom?: RecommendationSymptom[] | null;
|
|
@@ -135,16 +139,18 @@ interface RecommendationPostCallAnswer {
|
|
|
135
139
|
}
|
|
136
140
|
interface ConsultationType {
|
|
137
141
|
id?: number;
|
|
138
|
-
|
|
142
|
+
user_id?: number;
|
|
139
143
|
question?: string;
|
|
140
|
-
|
|
141
|
-
|
|
144
|
+
doctor_name?: string;
|
|
145
|
+
doctor_avatar?: string;
|
|
142
146
|
medium?: string;
|
|
143
147
|
status?: string;
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
+
is_fulfilled?: number;
|
|
149
|
+
parent_consultation_id?: number;
|
|
150
|
+
created_at?: string;
|
|
151
|
+
updated_at?: string;
|
|
152
|
+
closed_at?: string;
|
|
153
|
+
accepted_at?: string;
|
|
148
154
|
user?: UserType;
|
|
149
155
|
parentConsultation?: ConsultationType;
|
|
150
156
|
media?: MediaType[];
|
|
@@ -154,10 +160,64 @@ interface ConsultationType {
|
|
|
154
160
|
chatConfig?: ChatConfig;
|
|
155
161
|
voipConfig?: VoipConfig;
|
|
156
162
|
videoConfig?: VoipConfig;
|
|
157
|
-
chatHistory
|
|
163
|
+
chatHistory?: ChatHistory;
|
|
158
164
|
recommendation?: Recommendation;
|
|
159
165
|
socketParams?: SocketParams;
|
|
160
|
-
|
|
161
|
-
}
|
|
162
|
-
|
|
166
|
+
doctor_average_rating?: number;
|
|
167
|
+
}
|
|
168
|
+
interface Transcription {
|
|
169
|
+
transcript: string;
|
|
170
|
+
}
|
|
171
|
+
interface SubCategory {
|
|
172
|
+
sub_category_id: number;
|
|
173
|
+
name_en: string;
|
|
174
|
+
name_ar: string;
|
|
175
|
+
}
|
|
176
|
+
interface PredictSpecialty {
|
|
177
|
+
specialty_id: number;
|
|
178
|
+
subCategories: SubCategory[];
|
|
179
|
+
}
|
|
180
|
+
interface PredictSummary {
|
|
181
|
+
summary: string;
|
|
182
|
+
}
|
|
183
|
+
interface Soap {
|
|
184
|
+
summary: {
|
|
185
|
+
subjective: {
|
|
186
|
+
symptoms?: string;
|
|
187
|
+
concerns?: string;
|
|
188
|
+
};
|
|
189
|
+
objective: {
|
|
190
|
+
laboratory_results?: string;
|
|
191
|
+
physical_examination_findings?: string;
|
|
192
|
+
};
|
|
193
|
+
assessment: {
|
|
194
|
+
diagnosis?: string;
|
|
195
|
+
differential_diagnosis?: string;
|
|
196
|
+
};
|
|
197
|
+
plan: {
|
|
198
|
+
non_pharmacological_intervention?: string;
|
|
199
|
+
medications?: string;
|
|
200
|
+
referrals?: string;
|
|
201
|
+
follow_up_instructions?: string;
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
interface Article {
|
|
206
|
+
article_id: number;
|
|
207
|
+
slug: string;
|
|
208
|
+
sub_category_id: number;
|
|
209
|
+
title: string;
|
|
210
|
+
body: string;
|
|
211
|
+
article_references: string;
|
|
212
|
+
activation_date: string;
|
|
213
|
+
publish_status: string;
|
|
214
|
+
adult_content: boolean;
|
|
215
|
+
featured: boolean;
|
|
216
|
+
date_added: string;
|
|
217
|
+
date_modified: string;
|
|
218
|
+
body_clean: string;
|
|
219
|
+
image_url: string;
|
|
220
|
+
url: string;
|
|
221
|
+
}
|
|
222
|
+
export type { ResponseType, MediumType, BloodType, MaritalStatus, BoolString, GenderType, RelationType, UserType, MediaType, ChatData, ChatHistory, ChatConfig, VoipConfig, Recommendation, RecommendationData, RecommendationLab, RecommendationLabItem, RecommendationDrug, RecommendationFdaDrug, RecommendationICD10, RecommendationSymptom, RecommendationDiagnosis, RecommendationFollowUp, RecommendationDoctorReferral, RecommendationPostCallAnswer, ConsultationType, Transcription, PredictSpecialty, PredictSummary, Soap, Article, };
|
|
163
223
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAAA,KAAK,UAAU,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,CAAC;AACpD,KAAK,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,IAAI,CAAC;AACzE,KAAK,aAAa,GAAG,QAAQ,GAAG,SAAS,GAAG,UAAU,GAAG,OAAO,CAAC;AACjE,KAAK,UAAU,GAAG,KAAK,GAAG,IAAI,CAAC;AAC/B,KAAK,UAAU,GAAG,MAAM,GAAG,QAAQ,CAAC;AACpC,KAAK,YAAY,GACb,UAAU,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,kBAAkB,EAAE,MAAM,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,OAAO,CAAC;IACvB,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;CACb;AACD,YAAY,EACV,YAAY,EACZ,UAAU,EACV,SAAS,EACT,aAAa,EACb,UAAU,EACV,UAAU,EACV,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,WAAW,EACX,UAAU,EACV,UAAU,EACV,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,EAClB,qBAAqB,EACrB,mBAAmB,EACnB,qBAAqB,EACrB,uBAAuB,EACvB,sBAAsB,EACtB,4BAA4B,EAC5B,4BAA4B,EAC5B,gBAAgB,EAChB,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,IAAI,EACJ,OAAO,GACR,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export const OT: any;
|
|
2
2
|
export const nativeEvents: NativeEventEmitter;
|
|
3
|
-
export function checkAndroidPermissions(): Promise<any>;
|
|
3
|
+
export function checkAndroidPermissions(audioTrack: any, videoTrack: any, isScreenSharing: any): Promise<any>;
|
|
4
4
|
export function setNativeEvents(events: any): void;
|
|
5
5
|
export function removeNativeEvents(events: any): void;
|
|
6
6
|
import { NativeEventEmitter } from 'react-native';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OT.d.ts","sourceRoot":"","sources":["../../../../src/video/OT.js"],"names":[],"mappings":"AAGA,qBAA0C;AAC1C,8CAAgD;AAEhD,
|
|
1
|
+
{"version":3,"file":"OT.d.ts","sourceRoot":"","sources":["../../../../src/video/OT.js"],"names":[],"mappings":"AAGA,qBAA0C;AAC1C,8CAAgD;AAEhD,8GAyBE;AAEF,mDAiBC;AAED,sDAMC;mCA1DqE,cAAc"}
|
|
@@ -8,20 +8,26 @@ declare class OTPublisher extends React.Component<any, any, any> {
|
|
|
8
8
|
};
|
|
9
9
|
initComponent: () => void;
|
|
10
10
|
componentEvents: {
|
|
11
|
+
publisherStreamCreated: string;
|
|
12
|
+
publisherStreamDestroyed: string;
|
|
11
13
|
sessionConnected: string;
|
|
12
14
|
} | undefined;
|
|
13
15
|
componentEventsArray: string[] | undefined;
|
|
14
16
|
otrnEventHandler: ((event: any) => void) | undefined;
|
|
15
17
|
publisherEvents: {} | undefined;
|
|
18
|
+
publisherStreamCreated: import("react-native").EmitterSubscription | undefined;
|
|
19
|
+
publisherStreamDestroyed: import("react-native").EmitterSubscription | undefined;
|
|
16
20
|
sessionConnected: import("react-native").EmitterSubscription | undefined;
|
|
17
21
|
componentDidMount(): void;
|
|
18
22
|
componentDidUpdate(previousProps: any): void;
|
|
19
23
|
componentWillUnmount(): void;
|
|
20
24
|
sessionConnectedHandler: () => void;
|
|
21
25
|
createPublisher(): void;
|
|
22
|
-
initPublisher(): void;
|
|
26
|
+
initPublisher(publisherProperties: any): void;
|
|
23
27
|
publish(): void;
|
|
24
28
|
getRtcStatsReport(): void;
|
|
29
|
+
publisherStreamCreatedHandler: (stream: any) => void;
|
|
30
|
+
publisherStreamDestroyedHandler: (stream: any) => void;
|
|
25
31
|
setVideoTransformers(videoTransformers: any): void;
|
|
26
32
|
render(): JSX.Element;
|
|
27
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OTPublisher.d.ts","sourceRoot":"","sources":["../../../../src/video/OTPublisher.js"],"names":[],"mappings":";AAqBA;IACE,sCAQC;IANC;;;;MAIC;IAGH,
|
|
1
|
+
{"version":3,"file":"OTPublisher.d.ts","sourceRoot":"","sources":["../../../../src/video/OTPublisher.js"],"names":[],"mappings":";AAqBA;IACE,sCAQC;IANC;;;;MAIC;IAGH,0BA+BE;IA9BA;;;;kBAOC;IACD,2CAA+D;IAC/D,qDAA0E;IAC1E,gCAGC;IAGD,+EAGC;IACD,iFAGC;IAEC,yEAGC;IAGL,0BAEC;IACD,6CA2BC;IACD,6BAUC;IACD,oCAIE;IACF,wBAeC;IACD,8CAyBC;IACD,gBAcC;IACD,0BAEC;IAED,qDAQC;IAED,uDAQC;IAED,mDAEC;IAED,sBAaC;CACF;;;;;;;;;;kBAjNgC,OAAO;sBAkBlB,sBAAsB"}
|
|
@@ -9,7 +9,7 @@ declare class OTSession extends React.Component<any, any, any> {
|
|
|
9
9
|
componentDidMount(): void;
|
|
10
10
|
componentDidUpdate(previousProps: any): void;
|
|
11
11
|
componentWillUnmount(): void;
|
|
12
|
-
createSession(credentials: any, sessionOptions: any): void;
|
|
12
|
+
createSession(credentials: any, sessionOptions: any, encryptionSecret: any): void;
|
|
13
13
|
disconnectSession(): void;
|
|
14
14
|
getSessionInfo(): null;
|
|
15
15
|
getCapabilities(): Promise<any>;
|
|
@@ -18,6 +18,7 @@ declare class OTSession extends React.Component<any, any, any> {
|
|
|
18
18
|
forceMuteAll(excludedStreamIds: any): any;
|
|
19
19
|
forceMuteStream(streamId: any): any;
|
|
20
20
|
disableForceMute(): any;
|
|
21
|
+
setEncryptionSecret(secret: any): void;
|
|
21
22
|
render(): JSX.Element;
|
|
22
23
|
}
|
|
23
24
|
declare namespace OTSession {
|
|
@@ -30,6 +31,7 @@ declare namespace OTSession {
|
|
|
30
31
|
let eventHandlers: PropTypes.Requireable<object>;
|
|
31
32
|
let options: PropTypes.Requireable<object>;
|
|
32
33
|
let signal: PropTypes.Requireable<object>;
|
|
34
|
+
let encryptionSecret: PropTypes.Requireable<string>;
|
|
33
35
|
}
|
|
34
36
|
namespace defaultProps {
|
|
35
37
|
let eventHandlers_1: {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OTSession.d.ts","sourceRoot":"","sources":["../../../../src/video/OTSession.js"],"names":[],"mappings":"AAYA;IACE,wBAOC;IALC;;MAEC;IACD,uCAA0E;IAG5E,0BAOC;IALC,qCAA4D;IAM9D,
|
|
1
|
+
{"version":3,"file":"OTSession.d.ts","sourceRoot":"","sources":["../../../../src/video/OTSession.js"],"names":[],"mappings":"AAYA;IACE,wBAOC;IALC;;MAEC;IACD,uCAA0E;IAG5E,0BAOC;IALC,qCAA4D;IAM9D,0BAUC;IACD,6CAsBC;IACD,6BAEC;IACD,kFAyBC;IACD,0BASC;IACD,uBAEC;IACD,gCAUC;IACD,4BAUC;IACD,0BAGC;IACD,0CAEC;IACD,oCAEC;IACD,wBAEC;IACD,uCAOC;IACD,sBAaC;CACF;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAlKwD,OAAO;sBAG1C,YAAY"}
|
|
@@ -8,17 +8,23 @@ declare class OTSubscriber extends React.Component<any, any, any> {
|
|
|
8
8
|
streamDestroyed: string;
|
|
9
9
|
streamCreated: string;
|
|
10
10
|
captionReceived: string;
|
|
11
|
+
publisherStreamCreated: string;
|
|
12
|
+
publisherStreamDestroyed: string;
|
|
11
13
|
};
|
|
12
14
|
componentEventsArray: string[];
|
|
13
15
|
otrnEventHandler: (event: any) => void;
|
|
14
16
|
initComponent: () => void;
|
|
15
17
|
streamCreated: import("react-native").EmitterSubscription | undefined;
|
|
16
18
|
streamDestroyed: import("react-native").EmitterSubscription | undefined;
|
|
19
|
+
publisherStreamCreated: import("react-native").EmitterSubscription | undefined;
|
|
20
|
+
publisherStreamDestroyed: import("react-native").EmitterSubscription | undefined;
|
|
17
21
|
componentDidUpdate(): void;
|
|
18
22
|
componentWillUnmount(): void;
|
|
19
23
|
streamCreatedHandler: (stream: any) => void;
|
|
20
24
|
streamDestroyedHandler: (stream: any) => void;
|
|
21
|
-
|
|
25
|
+
publisherStreamCreatedHandler: (stream: any) => void;
|
|
26
|
+
publisherStreamDestroyedHandler: (stream: any) => void;
|
|
27
|
+
getRtcStatsReport(): void;
|
|
22
28
|
render(): any;
|
|
23
29
|
}
|
|
24
30
|
declare namespace OTSubscriber {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OTSubscriber.d.ts","sourceRoot":"","sources":["../../../../src/video/OTSubscriber.js"],"names":[],"mappings":"AAUA;IACE,
|
|
1
|
+
{"version":3,"file":"OTSubscriber.d.ts","sourceRoot":"","sources":["../../../../src/video/OTSubscriber.js"],"names":[],"mappings":"AAUA;IACE,sCAgBC;IAdC;;;MAGC;IACD;;;;;;MAMC;IACD,+BAA+D;IAC/D,uCAA0E;IAG5E,0BAoBC;IAhBG,sEAC8C;IAC9C,wEACgD;IAKlD,+EAGC;IACD,iFAGC;IAEH,2BA0BC;IACD,6BAQC;IACD,4CAoBC;IACD,8CAaC;IACD,qDAIC;IACD,uDAIC;IACD,0BAEC;IACD,cAWC;CACF;;;;;;;;;;;;;;;kBAjJgC,OAAO;sBAQlB,sBAAsB"}
|
|
@@ -6,7 +6,8 @@ export function sanitizeProperties(properties: any): {
|
|
|
6
6
|
publishCaptions: any;
|
|
7
7
|
name: any;
|
|
8
8
|
cameraPosition: string;
|
|
9
|
-
|
|
9
|
+
publisherAudioFallback: boolean;
|
|
10
|
+
subscriberAudioFallback: boolean;
|
|
10
11
|
audioBitrate: number;
|
|
11
12
|
enableDtx: any;
|
|
12
13
|
frameRate: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OTPublisherHelper.d.ts","sourceRoot":"","sources":["../../../../../src/video/helpers/OTPublisherHelper.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OTPublisherHelper.d.ts","sourceRoot":"","sources":["../../../../../src/video/helpers/OTPublisherHelper.js"],"names":[],"mappings":"AA2EA;;;;;;;;;;;;;;;;;EAsDC;AAED,2EAmCC"}
|
|
@@ -26,6 +26,7 @@ export function sanitizeSignalData(signal: any): {
|
|
|
26
26
|
};
|
|
27
27
|
errorHandler: any;
|
|
28
28
|
};
|
|
29
|
+
export function sanitizeEncryptionSecret(secret: any): string | undefined;
|
|
29
30
|
export function sanitizeCredentials(credentials: any): {};
|
|
30
31
|
export function getConnectionStatus(connectionStatus: any): "failed" | "connected" | "connecting" | "not connected" | "reconnecting" | "disconnecting" | undefined;
|
|
31
32
|
export function isConnected(connectionStatus: any): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OTSessionHelper.d.ts","sourceRoot":"","sources":["../../../../../src/video/helpers/OTSessionHelper.js"],"names":[],"mappings":"AAqBA,uEAuCC;AAkCD;;;;;;;;;;;;;;;;;;EAyEC;AAED;;;;;;;EAsBC;AAED,0DAUC;AAED,mKAeC;AAED,4DACuD"}
|
|
1
|
+
{"version":3,"file":"OTSessionHelper.d.ts","sourceRoot":"","sources":["../../../../../src/video/helpers/OTSessionHelper.js"],"names":[],"mappings":"AAqBA,uEAuCC;AAkCD;;;;;;;;;;;;;;;;;;EAyEC;AAED;;;;;;;EAsBC;AAED,0EAIC;AAED,0DAUC;AAED,mKAeC;AAED,4DACuD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OTPublisherView.d.ts","sourceRoot":"","sources":["../../../../../src/video/views/OTPublisherView.js"],"names":[],"mappings":";AAIA
|
|
1
|
+
{"version":3,"file":"OTPublisherView.d.ts","sourceRoot":"","sources":["../../../../../src/video/views/OTPublisherView.js"],"names":[],"mappings":";AAIA;;;IACE,sBAEC;CACF;;;;kBARgC,OAAO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OTSubscriberView.d.ts","sourceRoot":"","sources":["../../../../../src/video/views/OTSubscriberView.js"],"names":[],"mappings":";AAIA
|
|
1
|
+
{"version":3,"file":"OTSubscriberView.d.ts","sourceRoot":"","sources":["../../../../../src/video/views/OTSubscriberView.js"],"names":[],"mappings":";AAIA;;;IACE,sBAEC;CACF;;;;kBARgC,OAAO"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-altibbi",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "React native SDK provides integration for the Altibbi services, including video consultation, text consultation, push Welcome to the React Native SDK for Altibbi services, your comprehensive solution for integrating health consultation services into your React Native applications. This SDK enables video and text consultations, push notifications, and many other features to provide a seamless healthcare experience. project.",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -16,7 +16,7 @@ Pod::Spec.new do |s|
|
|
|
16
16
|
s.source = { :git => "https://bitbucket.org/altibbi/react-native-altibbi-sdk/src/master/.git", :tag => "#{s.version}" }
|
|
17
17
|
s.dependency 'React'
|
|
18
18
|
s.dependency 'PusherSwift', '~> 10.1.1'
|
|
19
|
-
s.dependency 'OTXCFramework','2.
|
|
19
|
+
s.dependency 'OTXCFramework','2.28.0'
|
|
20
20
|
|
|
21
21
|
s.source_files = "ios/**/*.{h,m,mm,swift}"
|
|
22
22
|
|
|
@@ -25,7 +25,7 @@ Pod::Spec.new do |s|
|
|
|
25
25
|
if respond_to?(:install_modules_dependencies, true)
|
|
26
26
|
install_modules_dependencies(s)
|
|
27
27
|
else
|
|
28
|
-
|
|
28
|
+
#s.dependency "React-Core"
|
|
29
29
|
|
|
30
30
|
# Don't install the dependencies when we run `pod install` in the old architecture.
|
|
31
31
|
if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
|
package/src/connection.ts
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { TBIConstants } from './service';
|
|
2
2
|
import type {
|
|
3
|
+
Article,
|
|
3
4
|
ConsultationType,
|
|
4
5
|
MediaType,
|
|
6
|
+
PredictSpecialty,
|
|
7
|
+
PredictSummary,
|
|
5
8
|
ResponseType,
|
|
9
|
+
Soap,
|
|
10
|
+
Transcription,
|
|
6
11
|
UserType,
|
|
7
12
|
} from './types';
|
|
8
13
|
|
|
@@ -18,7 +23,8 @@ interface ConsultationObject {
|
|
|
18
23
|
medium: string;
|
|
19
24
|
user_id: number;
|
|
20
25
|
mediaIds?: string[];
|
|
21
|
-
|
|
26
|
+
parent_consultation_id?: number | null;
|
|
27
|
+
forceWhiteLabelingPartnerName?: string | null;
|
|
22
28
|
}
|
|
23
29
|
|
|
24
30
|
interface RequestParamsInterface {
|
|
@@ -81,7 +87,9 @@ export const request = async ({
|
|
|
81
87
|
'accept-language': TBIConstants.language,
|
|
82
88
|
};
|
|
83
89
|
|
|
84
|
-
let url =
|
|
90
|
+
let url = endPoint.includes('rest-api')
|
|
91
|
+
? endPoint
|
|
92
|
+
: `${TBIConstants.baseURL}/v1/${endPoint}`;
|
|
85
93
|
let body;
|
|
86
94
|
if (method === Methods.get) {
|
|
87
95
|
url = url + '?' + new URLSearchParams(data).toString();
|
|
@@ -197,13 +205,13 @@ export const createConsultation = async ({
|
|
|
197
205
|
medium,
|
|
198
206
|
user_id,
|
|
199
207
|
mediaIds,
|
|
200
|
-
|
|
208
|
+
parent_consultation_id = null,
|
|
209
|
+
forceWhiteLabelingPartnerName = null,
|
|
201
210
|
}: ConsultationObject): Promise<ResponseType<ConsultationType>> => {
|
|
202
211
|
if (!question || !medium || !user_id) {
|
|
203
212
|
throw Error('missing field');
|
|
204
213
|
}
|
|
205
|
-
|
|
206
|
-
const data = {
|
|
214
|
+
let data = {
|
|
207
215
|
question,
|
|
208
216
|
medium,
|
|
209
217
|
user_id,
|
|
@@ -211,8 +219,14 @@ export const createConsultation = async ({
|
|
|
211
219
|
expand:
|
|
212
220
|
'pusherAppKey,parentConsultation,consultations,user,media,pusherChannel,' +
|
|
213
221
|
'chatConfig,chatHistory,voipConfig,videoConfig,recommendation',
|
|
214
|
-
|
|
222
|
+
parent_consultation_id,
|
|
215
223
|
};
|
|
224
|
+
if (
|
|
225
|
+
forceWhiteLabelingPartnerName &&
|
|
226
|
+
forceWhiteLabelingPartnerName?.length > 3
|
|
227
|
+
) {
|
|
228
|
+
data.question = `${data.question} ~${forceWhiteLabelingPartnerName}~`;
|
|
229
|
+
}
|
|
216
230
|
const response: ResponseType<ConsultationType> = await request({
|
|
217
231
|
method: Methods.post,
|
|
218
232
|
data,
|
|
@@ -379,6 +393,109 @@ export const rateConsultation = async (
|
|
|
379
393
|
data: { score },
|
|
380
394
|
endPoint: `consultations/${consultation_id}/rate`,
|
|
381
395
|
});
|
|
396
|
+
if (response.status === 200) {
|
|
397
|
+
return response;
|
|
398
|
+
}
|
|
399
|
+
throw Error(JSON.stringify(response));
|
|
400
|
+
};
|
|
401
|
+
export const getPredictSummary = async (
|
|
402
|
+
consultation_id: number
|
|
403
|
+
): Promise<ResponseType<PredictSummary>> => {
|
|
404
|
+
const response: ResponseType<PredictSummary> = await request({
|
|
405
|
+
method: Methods.get,
|
|
406
|
+
data: {},
|
|
407
|
+
endPoint: `consultations/${consultation_id}/predict-summary`,
|
|
408
|
+
});
|
|
409
|
+
if (response.status === 200) {
|
|
410
|
+
return response;
|
|
411
|
+
}
|
|
412
|
+
throw Error(JSON.stringify(response));
|
|
413
|
+
};
|
|
414
|
+
|
|
415
|
+
export const getSoapSummary = async (
|
|
416
|
+
consultation_id: number
|
|
417
|
+
): Promise<ResponseType<Soap>> => {
|
|
418
|
+
const response: ResponseType<Soap> = await request({
|
|
419
|
+
method: Methods.get,
|
|
420
|
+
data: {},
|
|
421
|
+
endPoint: `consultations/${consultation_id}/soap-summary`,
|
|
422
|
+
});
|
|
423
|
+
if (response.status === 200) {
|
|
424
|
+
return response;
|
|
425
|
+
}
|
|
426
|
+
throw Error(JSON.stringify(response));
|
|
427
|
+
};
|
|
428
|
+
export const getTranscription = async (
|
|
429
|
+
consultation_id: number
|
|
430
|
+
): Promise<ResponseType<Transcription>> => {
|
|
431
|
+
const response: ResponseType<Transcription> = await request({
|
|
432
|
+
method: Methods.get,
|
|
433
|
+
data: {},
|
|
434
|
+
endPoint: `consultations/${consultation_id}/transcription`,
|
|
435
|
+
});
|
|
436
|
+
if (response.status === 200) {
|
|
437
|
+
return response;
|
|
438
|
+
}
|
|
439
|
+
throw Error(JSON.stringify(response));
|
|
440
|
+
};
|
|
441
|
+
export const getPredictSpecialty = async (
|
|
442
|
+
consultation_id: number
|
|
443
|
+
): Promise<ResponseType<PredictSpecialty[]>> => {
|
|
444
|
+
const response: ResponseType<PredictSpecialty[]> = await request({
|
|
445
|
+
method: Methods.get,
|
|
446
|
+
data: {},
|
|
447
|
+
endPoint: `consultations/${consultation_id}/predict-specialty`,
|
|
448
|
+
});
|
|
449
|
+
if (response.status === 200) {
|
|
450
|
+
return response;
|
|
451
|
+
}
|
|
452
|
+
throw Error(JSON.stringify(response));
|
|
453
|
+
};
|
|
454
|
+
|
|
455
|
+
export const getMediaList = async (
|
|
456
|
+
page: number = 1,
|
|
457
|
+
perPage = 20
|
|
458
|
+
): Promise<ResponseType<ConsultationType[]>> => {
|
|
459
|
+
const response = await request({
|
|
460
|
+
method: Methods.get,
|
|
461
|
+
data: {
|
|
462
|
+
page,
|
|
463
|
+
'sort': '-id',
|
|
464
|
+
'per-page': perPage,
|
|
465
|
+
},
|
|
466
|
+
endPoint: `media`,
|
|
467
|
+
});
|
|
468
|
+
if (response.status === 200) {
|
|
469
|
+
return response;
|
|
470
|
+
}
|
|
471
|
+
throw Error(JSON.stringify(response));
|
|
472
|
+
};
|
|
473
|
+
|
|
474
|
+
export const deleteMedia = async (
|
|
475
|
+
mediaId: string
|
|
476
|
+
): Promise<ResponseType<string>> => {
|
|
477
|
+
const response: ResponseType<string> = await request({
|
|
478
|
+
method: Methods.delete,
|
|
479
|
+
data: {},
|
|
480
|
+
endPoint: `media/${mediaId}`,
|
|
481
|
+
});
|
|
482
|
+
if (response.status === 204) {
|
|
483
|
+
return response;
|
|
484
|
+
}
|
|
485
|
+
throw Error(JSON.stringify(response));
|
|
486
|
+
};
|
|
487
|
+
|
|
488
|
+
export const getArticlesList = async (
|
|
489
|
+
subcategoryIds: string[]
|
|
490
|
+
): Promise<ResponseType<Article[]>> => {
|
|
491
|
+
const response: ResponseType<Article[]> = await request({
|
|
492
|
+
method: Methods.get,
|
|
493
|
+
data: {
|
|
494
|
+
'filter[sub_category_id][in]': subcategoryIds.join(','),
|
|
495
|
+
'sort': '-article_id',
|
|
496
|
+
},
|
|
497
|
+
endPoint: `https://rest-api.altibbi.com/active/v1/articles`,
|
|
498
|
+
});
|
|
382
499
|
if (response.status === 204) {
|
|
383
500
|
return response;
|
|
384
501
|
}
|
package/src/index.tsx
CHANGED
package/src/types.ts
CHANGED
|
@@ -24,6 +24,7 @@ interface UserType {
|
|
|
24
24
|
insurance_id?: string;
|
|
25
25
|
policy_number?: string;
|
|
26
26
|
nationality_number?: string;
|
|
27
|
+
avatar_media_id?: string;
|
|
27
28
|
height?: string;
|
|
28
29
|
weight?: string;
|
|
29
30
|
blood_type?: BloodType;
|
|
@@ -76,9 +77,11 @@ interface ChatConfig {
|
|
|
76
77
|
interface VoipConfig {
|
|
77
78
|
id?: number;
|
|
78
79
|
consultation_id?: number;
|
|
79
|
-
|
|
80
|
-
|
|
80
|
+
api_key?: string;
|
|
81
|
+
call_id?: string;
|
|
81
82
|
token?: string;
|
|
83
|
+
created_at?: string;
|
|
84
|
+
updated_at?: string;
|
|
82
85
|
}
|
|
83
86
|
interface Recommendation {
|
|
84
87
|
id?: number;
|
|
@@ -120,6 +123,7 @@ interface RecommendationFdaDrug {
|
|
|
120
123
|
relationWithFood?: string;
|
|
121
124
|
specialInstructions?: string;
|
|
122
125
|
routeOfAdministration?: string;
|
|
126
|
+
registrationNumber?: string;
|
|
123
127
|
}
|
|
124
128
|
interface RecommendationICD10 {
|
|
125
129
|
symptom?: RecommendationSymptom[] | null;
|
|
@@ -145,16 +149,18 @@ interface RecommendationPostCallAnswer {
|
|
|
145
149
|
}
|
|
146
150
|
interface ConsultationType {
|
|
147
151
|
id?: number;
|
|
148
|
-
|
|
152
|
+
user_id?: number;
|
|
149
153
|
question?: string;
|
|
150
|
-
|
|
151
|
-
|
|
154
|
+
doctor_name?: string;
|
|
155
|
+
doctor_avatar?: string;
|
|
152
156
|
medium?: string;
|
|
153
157
|
status?: string;
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
+
is_fulfilled?: number;
|
|
159
|
+
parent_consultation_id?: number;
|
|
160
|
+
created_at?: string;
|
|
161
|
+
updated_at?: string;
|
|
162
|
+
closed_at?: string;
|
|
163
|
+
accepted_at?: string;
|
|
158
164
|
user?: UserType;
|
|
159
165
|
parentConsultation?: ConsultationType;
|
|
160
166
|
media?: MediaType[];
|
|
@@ -164,10 +170,65 @@ interface ConsultationType {
|
|
|
164
170
|
chatConfig?: ChatConfig;
|
|
165
171
|
voipConfig?: VoipConfig;
|
|
166
172
|
videoConfig?: VoipConfig;
|
|
167
|
-
chatHistory
|
|
173
|
+
chatHistory?: ChatHistory;
|
|
168
174
|
recommendation?: Recommendation;
|
|
169
175
|
socketParams?: SocketParams;
|
|
170
|
-
|
|
176
|
+
doctor_average_rating?: number;
|
|
177
|
+
}
|
|
178
|
+
interface Transcription {
|
|
179
|
+
transcript: string;
|
|
180
|
+
}
|
|
181
|
+
interface SubCategory {
|
|
182
|
+
sub_category_id: number;
|
|
183
|
+
name_en: string;
|
|
184
|
+
name_ar: string;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
interface PredictSpecialty {
|
|
188
|
+
specialty_id: number;
|
|
189
|
+
subCategories: SubCategory[];
|
|
190
|
+
}
|
|
191
|
+
interface PredictSummary {
|
|
192
|
+
summary: string;
|
|
193
|
+
}
|
|
194
|
+
interface Soap {
|
|
195
|
+
summary: {
|
|
196
|
+
subjective: {
|
|
197
|
+
symptoms?: string;
|
|
198
|
+
concerns?: string;
|
|
199
|
+
};
|
|
200
|
+
objective: {
|
|
201
|
+
laboratory_results?: string;
|
|
202
|
+
physical_examination_findings?: string;
|
|
203
|
+
};
|
|
204
|
+
assessment: {
|
|
205
|
+
diagnosis?: string;
|
|
206
|
+
differential_diagnosis?: string;
|
|
207
|
+
};
|
|
208
|
+
plan: {
|
|
209
|
+
non_pharmacological_intervention?: string;
|
|
210
|
+
medications?: string;
|
|
211
|
+
referrals?: string;
|
|
212
|
+
follow_up_instructions?: string;
|
|
213
|
+
};
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
interface Article {
|
|
217
|
+
article_id: number;
|
|
218
|
+
slug: string;
|
|
219
|
+
sub_category_id: number;
|
|
220
|
+
title: string;
|
|
221
|
+
body: string;
|
|
222
|
+
article_references: string;
|
|
223
|
+
activation_date: string;
|
|
224
|
+
publish_status: string;
|
|
225
|
+
adult_content: boolean;
|
|
226
|
+
featured: boolean;
|
|
227
|
+
date_added: string;
|
|
228
|
+
date_modified: string;
|
|
229
|
+
body_clean: string;
|
|
230
|
+
image_url: string;
|
|
231
|
+
url: string;
|
|
171
232
|
}
|
|
172
233
|
export type {
|
|
173
234
|
ResponseType,
|
|
@@ -196,4 +257,9 @@ export type {
|
|
|
196
257
|
RecommendationDoctorReferral,
|
|
197
258
|
RecommendationPostCallAnswer,
|
|
198
259
|
ConsultationType,
|
|
260
|
+
Transcription,
|
|
261
|
+
PredictSpecialty,
|
|
262
|
+
PredictSummary,
|
|
263
|
+
Soap,
|
|
264
|
+
Article,
|
|
199
265
|
};
|