@phonghq/go-chat 1.0.16 → 1.0.18

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.
@@ -144,15 +144,22 @@ const getResponsiveObserver = useDebounce(() => {
144
144
  }
145
145
  }
146
146
  }, 50);
147
+ const getUserRemote = () => {
148
+ return callingRef.value?.userRemoter ?? null;
149
+ };
150
+ const startCall = () => {
151
+ return callingRef.value?.answer ?? undefined;
152
+ };
153
+ const endCall = () => {
154
+ return callingRef.value?.endCall;
155
+ };
147
156
  initPage({ props: props, response: props.response });
148
157
  let __VLS_exposed;
149
158
  defineExpose({
150
159
  unreadCount,
151
- userRemoter: callingRef.value?.userRemoter ?? null,
152
- callStatus: callingRef.value?.callStatus ?? null,
153
- callLabel: callingRef.value?.label ?? '',
154
- startCall: callingRef.value?.answer,
155
- endCall: callingRef.value?.endCall,
160
+ getUserRemote,
161
+ startCall,
162
+ endCall,
156
163
  });
157
164
  debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
158
165
  const __VLS_defaults = {
@@ -209,8 +209,8 @@ const handleAfterClose = () => {
209
209
  record_link.value = '';
210
210
  uuidEnd = '';
211
211
  };
212
- const __VLS_exposed = { startCall, endCall, userRemoter, callStatus, answer, label };
213
- defineExpose(__VLS_exposed);
212
+ let __VLS_exposed;
213
+ defineExpose({ startCall, endCall, userRemoter, callStatus, answer, label });
214
214
  debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
215
215
  const __VLS_defaults = {};
216
216
  const __VLS_ctx = {
@@ -1,4 +1,4 @@
1
- import type { ComputedRef } from 'vue';
1
+ import type { ComputedRef, Ref } from 'vue';
2
2
  import type { IResUser } from '../../types/message';
3
3
  import type { PLIVO_CALL_STATUS } from '../../types/call';
4
4
  export type GoChatProps = {
@@ -10,10 +10,16 @@ export type GoChatProps = {
10
10
  };
11
11
  export interface GoChatInstance {
12
12
  unreadCount: ComputedRef<number>;
13
- userRemoter: IResUser | null;
14
- callStatus: PLIVO_CALL_STATUS | null;
15
- startCall: (() => Promise<void>) | undefined;
13
+ getUserRemote: () => (IResUser | null);
14
+ startCall: any;
16
15
  endCall: (() => void) | undefined;
17
- callLabel: string;
16
+ }
17
+ export interface CallInstance {
18
+ userRemoter: Ref<IResUser | null>;
19
+ callStatus: Ref<PLIVO_CALL_STATUS | null>;
20
+ startCall: ((data: IResUser) => Promise<void>);
21
+ endCall: (() => void);
22
+ answer: (() => Promise<void>);
23
+ label: ComputedRef<any>;
18
24
  }
19
25
  export type PAGE_RESPONSE = 'mobile' | 'tablet';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phonghq/go-chat",
3
- "version": "1.0.16",
3
+ "version": "1.0.18",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist"