@phonghq/go-chat 1.0.20 → 1.0.22

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.
@@ -147,8 +147,12 @@ const getResponsiveObserver = useDebounce(() => {
147
147
  initPage({ props: props, response: props.response });
148
148
  let __VLS_exposed;
149
149
  defineExpose({
150
- unreadCount,
151
- callStatus,
150
+ get unreadCount() {
151
+ return unreadCount.value;
152
+ },
153
+ get callStatus() {
154
+ return callStatus.value;
155
+ },
152
156
  getUserRemote: () => {
153
157
  return callingRef.value?.userRemoter ?? null;
154
158
  },
@@ -4,3 +4,4 @@ export * from '../types/chat/global';
4
4
  export * from '../types/chat/auth';
5
5
  export * from '../types/chat/user';
6
6
  export * from '../types/chat/promise';
7
+ export * from '../types/chat/call';
@@ -12,7 +12,7 @@ import { formatPhone10number } from '../../../utils/chat/phone-string';
12
12
  import IconSoundDownload from '../../../assets/icons/call/IconSoundDownload.vue';
13
13
  import IconClose from '../../../assets/icons/call/IconClose.vue';
14
14
  import { usePlivo } from '../../../composable/usePlivo';
15
- import { PLIVO_CALL_STATUS } from '../../../types/call';
15
+ import { PLIVO_CALL_STATUS } from '../../../types/chat/call';
16
16
  import IconMic from '../../../assets/icons/call/IconMic.vue';
17
17
  const { call, end, handleMedia, startIncomingCall, handleCallAnswer, callAnswer, uuid, startPeerConnection } = useCallHelper();
18
18
  const handlePlivoCallBack = (status, data) => {
@@ -1,4 +1,4 @@
1
- import { PLIVO_CALL_STATUS } from '../types/call';
1
+ import { PLIVO_CALL_STATUS } from '../types/chat/call';
2
2
  export function usePlivo(callback) {
3
3
  var options = {
4
4
  debug: 'ALL',
@@ -16,4 +16,3 @@ export const PLIVO_CALL_STATUS = {
16
16
  CALL_END: 'completed',
17
17
  NO_ANSWER: 'no-answer'
18
18
  };
19
- // export type PlivoCallStatusType = typeof PLIVO_CALL_STATUS_LIST;
@@ -1,6 +1,6 @@
1
1
  import type { ComputedRef, Ref } from 'vue';
2
2
  import type { IResUser } from '../../types/message';
3
- import type { PlivoCallStatusType } from '../../types/call';
3
+ import type { PlivoCallStatusType } from './call';
4
4
  export type GoChatProps = {
5
5
  token?: string;
6
6
  id?: string;
@@ -9,9 +9,9 @@ export type GoChatProps = {
9
9
  isLib?: boolean;
10
10
  };
11
11
  export interface GoChatInstance {
12
- unreadCount: ComputedRef<number>;
12
+ unreadCount: number;
13
13
  getUserRemote: () => (IResUser | null);
14
- callStatus: ComputedRef<PlivoCallStatusType | null>;
14
+ callStatus: PlivoCallStatusType | null;
15
15
  startCall: (() => Promise<void>) | undefined;
16
16
  endCall: (() => void) | undefined;
17
17
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phonghq/go-chat",
3
- "version": "1.0.20",
3
+ "version": "1.0.22",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist"
File without changes