@phonghq/go-chat 1.0.9 → 1.0.11

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 CHANGED
@@ -40,4 +40,4 @@ npm run lint
40
40
 
41
41
  ...build
42
42
  yarn vue-tsc -p tsconfig.build.json
43
- api/v1/message/tenant/gci-link?tenant_id=test1&phone=14152353319&message=Test message nè&customer_name=Loi v&business_name=Nail Spa New v
43
+ api/v1/message/tenant/gci-link?tenant_id=test1&phone=16013818811&message=Test message nè&customer_name=Loi v&business_name=Nail Spa New v
@@ -1,6 +1,6 @@
1
- import type { GoChatProps } from '../types/chat/global';
2
- import "../style/index.scss";
1
+ import type { GoChatProps, PAGE_RESPONSE } from '../types/chat/global';
2
+ import '../style/index.scss';
3
3
  declare const _default: import("vue").DefineComponent<GoChatProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<GoChatProps> & Readonly<{}>, {
4
- response: import("../types/chat/global").PAGE_RESPONSE;
4
+ response: PAGE_RESPONSE;
5
5
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
6
  export default _default;
@@ -1,7 +1,11 @@
1
1
  import type { IResUser } from '../../../types/message';
2
+ import type { PAGE_RESPONSE } from '../../../types/chat/global';
3
+ type __VLS_Props = {
4
+ responsive: PAGE_RESPONSE;
5
+ };
2
6
  declare function endCall(): void;
3
- declare const _default: import("vue").DefineComponent<{}, {
7
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {
4
8
  startCall: (data: IResUser) => Promise<void>;
5
9
  endCall: typeof endCall;
6
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
10
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
11
  export default _default;
@@ -0,0 +1,30 @@
1
+ import type { PAGE_RESPONSE } from '../../../types/chat/global';
2
+ type __VLS_Props = {
3
+ showTitle?: boolean;
4
+ position?: string;
5
+ width?: number;
6
+ responsive: PAGE_RESPONSE;
7
+ disabledClose?: boolean;
8
+ };
9
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<__VLS_Props, {
10
+ close: () => Promise<void>;
11
+ open: () => void;
12
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
13
+ "update:modelValue": (newService: any) => any;
14
+ afterClose: () => any;
15
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
16
+ "onUpdate:modelValue"?: ((newService: any) => any) | undefined;
17
+ onAfterClose?: (() => any) | undefined;
18
+ }>, {
19
+ width: number;
20
+ position: string;
21
+ showTitle: boolean;
22
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
23
+ content?: ((props: {}) => any) | undefined;
24
+ }>;
25
+ export default _default;
26
+ type __VLS_WithSlots<T, S> = T & {
27
+ new (): {
28
+ $slots: S;
29
+ };
30
+ };
@@ -0,0 +1,64 @@
1
+ export declare function useAudioStream(wsUrl: string): {
2
+ ws: import("vue").Ref<{
3
+ binaryType: BinaryType;
4
+ readonly bufferedAmount: number;
5
+ readonly extensions: string;
6
+ onclose: ((this: WebSocket, ev: CloseEvent) => any) | null;
7
+ onerror: ((this: WebSocket, ev: Event) => any) | null;
8
+ onmessage: ((this: WebSocket, ev: MessageEvent<any>) => any) | null;
9
+ onopen: ((this: WebSocket, ev: Event) => any) | null;
10
+ readonly protocol: string;
11
+ readonly readyState: number;
12
+ readonly url: string;
13
+ close: (code?: number | undefined, reason?: string | undefined) => void;
14
+ send: (data: string | ArrayBufferView | Blob | ArrayBufferLike) => void;
15
+ readonly CONNECTING: 0;
16
+ readonly OPEN: 1;
17
+ readonly CLOSING: 2;
18
+ readonly CLOSED: 3;
19
+ addEventListener: {
20
+ <K extends keyof WebSocketEventMap>(type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, options?: boolean | AddEventListenerOptions | undefined): void;
21
+ (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
22
+ };
23
+ removeEventListener: {
24
+ <K_1 extends keyof WebSocketEventMap>(type: K_1, listener: (this: WebSocket, ev: WebSocketEventMap[K_1]) => any, options?: boolean | EventListenerOptions | undefined): void;
25
+ (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions | undefined): void;
26
+ };
27
+ dispatchEvent: (event: Event) => boolean;
28
+ } | null, WebSocket | {
29
+ binaryType: BinaryType;
30
+ readonly bufferedAmount: number;
31
+ readonly extensions: string;
32
+ onclose: ((this: WebSocket, ev: CloseEvent) => any) | null;
33
+ onerror: ((this: WebSocket, ev: Event) => any) | null;
34
+ onmessage: ((this: WebSocket, ev: MessageEvent<any>) => any) | null;
35
+ onopen: ((this: WebSocket, ev: Event) => any) | null;
36
+ readonly protocol: string;
37
+ readonly readyState: number;
38
+ readonly url: string;
39
+ close: (code?: number | undefined, reason?: string | undefined) => void;
40
+ send: (data: string | ArrayBufferView | Blob | ArrayBufferLike) => void;
41
+ readonly CONNECTING: 0;
42
+ readonly OPEN: 1;
43
+ readonly CLOSING: 2;
44
+ readonly CLOSED: 3;
45
+ addEventListener: {
46
+ <K extends keyof WebSocketEventMap>(type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, options?: boolean | AddEventListenerOptions | undefined): void;
47
+ (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
48
+ };
49
+ removeEventListener: {
50
+ <K_1 extends keyof WebSocketEventMap>(type: K_1, listener: (this: WebSocket, ev: WebSocketEventMap[K_1]) => any, options?: boolean | EventListenerOptions | undefined): void;
51
+ (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions | undefined): void;
52
+ };
53
+ dispatchEvent: (event: Event) => boolean;
54
+ } | null>;
55
+ statusText: import("vue").Ref<string, string>;
56
+ micLevel: import("vue").Ref<number, number>;
57
+ recording: import("vue").Ref<boolean, boolean>;
58
+ connect: () => void;
59
+ disconnect: () => void;
60
+ resumeAudio: () => void;
61
+ enqueueSpeakerChunk: (arrayBuffer: ArrayBuffer) => Promise<void>;
62
+ processSpeakerQueue: () => void;
63
+ startRecording: () => Promise<void>;
64
+ };
@@ -7,17 +7,35 @@ type Offer = {
7
7
  };
8
8
  export declare function useCallHelper(): {
9
9
  call: (user: IResUser) => Promise<void>;
10
- end: (link: any) => void;
11
- endPc: (link: any) => void;
10
+ end: (link: any) => Promise<void>;
12
11
  handleOfferResponse: (data: {
13
12
  link: string;
14
13
  answer: any;
15
14
  }) => Promise<void>;
16
- handleOffer: (data: Offer) => Promise<boolean>;
17
- addIceCandidate: (data: {
18
- link: string;
19
- candidate: any;
20
- }) => Promise<void>;
21
- sendOfferOk: () => Promise<boolean | undefined>;
15
+ handleOffer: (data: Offer) => Promise<void>;
16
+ sendOfferOk: () => Promise<void>;
17
+ handleMedia: (message: any) => Promise<void>;
18
+ userRemoter: import("vue").Ref<{
19
+ id: string;
20
+ username: string;
21
+ phone: string;
22
+ avatar: string | null;
23
+ tenant_id: string | null;
24
+ conversation_id: number;
25
+ color: string;
26
+ status: number;
27
+ last_offline_at: string;
28
+ } | null, IResUser | {
29
+ id: string;
30
+ username: string;
31
+ phone: string;
32
+ avatar: string | null;
33
+ tenant_id: string | null;
34
+ conversation_id: number;
35
+ color: string;
36
+ status: number;
37
+ last_offline_at: string;
38
+ } | null>;
39
+ startIncomingCall: () => Promise<void>;
22
40
  };
23
41
  export {};
@@ -3,3 +3,4 @@ export declare const DATE_FORMATS: {
3
3
  readonly DATE_FORMAT_FULL: "YYYY-MM-DD HH:mm:ss";
4
4
  readonly TIME_12_FORMAT: "hh:mm A";
5
5
  };
6
+ export declare const TIME_ZONE_UTC = "Africa/Freetown";