@phonghq/go-chat 1.0.10 → 1.0.13
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/dist/assets/icons/IconAiCheck.vue.d.ts +2 -0
- package/dist/assets/icons/call/IconClose.vue.d.ts +2 -0
- package/dist/assets/icons/call/IconSoundDownload.vue.d.ts +2 -0
- package/dist/chat/App.vue.d.ts +7 -2
- package/dist/chat/page/customer-detail/CustomerDetail.vue.d.ts +1 -1
- package/dist/chat/page/home/ChatList.vue.d.ts +29 -1
- package/dist/chat/page/home/ChatMessage.vue.d.ts +1 -1
- package/dist/chat/page/home/Home.vue.d.ts +1 -1
- package/dist/components/chat/ScrollEvent/ScrollEvent.vue.d.ts +1 -0
- package/dist/components/chat/call/Calling.vue.d.ts +8 -2
- package/dist/components/chat/common/input/InputSearch.vue.d.ts +1 -1
- package/dist/components/chat/select/SelectBase.vue.d.ts +22 -0
- package/dist/composable/useCallHelper.d.ts +6 -2
- package/dist/composable/useInitData.d.ts +2 -4
- package/dist/go-chat.es.js +24960 -23685
- package/dist/go-chat.umd.js +42 -16
- package/dist/plugins/websocket.d.ts +12 -2
- package/dist/router/index.d.ts +2 -0
- package/dist/style.css +1 -1
- package/dist/test/assets/icons/IconAiCheck.vue.js +28 -0
- package/dist/test/assets/icons/call/IconClose.vue.js +26 -0
- package/dist/test/assets/icons/call/IconSoundDownload.vue.js +50 -0
- package/dist/test/chat/App.vue.js +145 -90
- package/dist/test/chat/page/customer-detail/CustomerDetail.vue.js +6 -5
- package/dist/test/chat/page/home/ChatList.vue.js +30 -9
- package/dist/test/chat/page/home/ChatMessage.vue.js +17 -9
- package/dist/test/chat/page/home/Home.vue.js +3 -3
- package/dist/test/chat/page/home/NewCustomer.vue.js +0 -12
- package/dist/test/components/chat/ScrollEvent/ScrollEvent.vue.js +7 -1
- package/dist/test/components/chat/call/Calling.vue.js +198 -76
- package/dist/test/components/chat/common/input/InputSearch.vue.js +2 -2
- package/dist/test/components/chat/select/SelectBase.vue.js +98 -0
- package/dist/test/components/common/drawer/DrawerBaseCustom.vue.js +0 -1
- package/dist/test/composable/data.json +32 -0
- package/dist/test/composable/useCallHelper.js +143 -33
- package/dist/test/composable/useDigibot.js +1 -1
- package/dist/test/composable/useInitData.js +17 -12
- package/dist/test/constant/color.js +1 -1
- package/dist/test/plugins/axios.js +2 -1
- package/dist/test/plugins/mqtt.js +11 -5
- package/dist/test/plugins/websocket.js +84 -4
- package/dist/test/router/index.js +39 -0
- package/dist/test/utils/chat/auth.js +10 -2
- package/dist/test/utils/chat/call.js +32 -5
- package/dist/test/utils/chat/phone-string.js +4 -0
- package/dist/test/utils/chat/user.js +7 -2
- package/dist/test/views/NotFound.vue.js +47 -0
- package/dist/test/views/TenantPhone.vue.js +270 -0
- package/dist/types/chat/global.d.ts +4 -0
- package/dist/utils/chat/auth.d.ts +5 -1
- package/dist/utils/chat/call.d.ts +5 -2
- package/dist/utils/chat/phone-string.d.ts +1 -0
- package/dist/utils/chat/user.d.ts +4 -0
- package/dist/views/NotFound.vue.d.ts +2 -0
- package/dist/views/TenantPhone.vue.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import { ref } from 'vue';
|
|
2
|
-
import
|
|
2
|
+
import axios_gci from '../../plugins/axios-gci';
|
|
3
|
+
import axios from '../../plugins/axios';
|
|
3
4
|
import dayjs from 'dayjs';
|
|
4
5
|
export const user = ref(null);
|
|
5
6
|
export const userHistory = ref(null);
|
|
6
7
|
export const getUserHistory = async (phone) => {
|
|
7
|
-
const res = await
|
|
8
|
+
const res = await axios_gci.get(`/v1/pos/customer/site/history?phone=${phone}`);
|
|
9
|
+
return res;
|
|
10
|
+
};
|
|
11
|
+
export const getUserDetailChat = async (params) => {
|
|
12
|
+
const res = await axios.get('/api/v1/message/customer/info', { params });
|
|
8
13
|
return res;
|
|
9
14
|
};
|
|
10
15
|
export function getItemsByYear(data, key = 'created_at') {
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/// <reference types="C:/phonghq/go-chat-v2/node_modules/.vue-global-types/vue_3.5_0.d.ts" />
|
|
2
|
+
const goToHome = () => {
|
|
3
|
+
window.location.href = '/'; // Replace with your desired home page URL
|
|
4
|
+
};
|
|
5
|
+
debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
|
|
6
|
+
const __VLS_ctx = {
|
|
7
|
+
...{},
|
|
8
|
+
...{},
|
|
9
|
+
};
|
|
10
|
+
let __VLS_elements;
|
|
11
|
+
let __VLS_components;
|
|
12
|
+
let __VLS_directives;
|
|
13
|
+
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
14
|
+
...{ class: "py-10 grow place-content-center" },
|
|
15
|
+
});
|
|
16
|
+
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
17
|
+
...{ class: "text-center font-semibold" },
|
|
18
|
+
});
|
|
19
|
+
__VLS_asFunctionalElement(__VLS_elements.h1, __VLS_elements.h1)({
|
|
20
|
+
...{ class: "text-primary text-6xl md:text-8xl mb-2" },
|
|
21
|
+
});
|
|
22
|
+
__VLS_asFunctionalElement(__VLS_elements.h2, __VLS_elements.h2)({
|
|
23
|
+
...{ class: "text-2xl mb-3" },
|
|
24
|
+
});
|
|
25
|
+
__VLS_asFunctionalElement(__VLS_elements.button, __VLS_elements.button)({
|
|
26
|
+
...{ onClick: (...[$event]) => {
|
|
27
|
+
__VLS_ctx.$router.push({ name: 'home' });
|
|
28
|
+
// @ts-ignore
|
|
29
|
+
[$router,];
|
|
30
|
+
} },
|
|
31
|
+
...{ class: "btn btn-primary" },
|
|
32
|
+
});
|
|
33
|
+
/** @type {__VLS_StyleScopedClasses['py-10']} */ ;
|
|
34
|
+
/** @type {__VLS_StyleScopedClasses['grow']} */ ;
|
|
35
|
+
/** @type {__VLS_StyleScopedClasses['place-content-center']} */ ;
|
|
36
|
+
/** @type {__VLS_StyleScopedClasses['text-center']} */ ;
|
|
37
|
+
/** @type {__VLS_StyleScopedClasses['font-semibold']} */ ;
|
|
38
|
+
/** @type {__VLS_StyleScopedClasses['text-primary']} */ ;
|
|
39
|
+
/** @type {__VLS_StyleScopedClasses['text-6xl']} */ ;
|
|
40
|
+
/** @type {__VLS_StyleScopedClasses['md:text-8xl']} */ ;
|
|
41
|
+
/** @type {__VLS_StyleScopedClasses['mb-2']} */ ;
|
|
42
|
+
/** @type {__VLS_StyleScopedClasses['text-2xl']} */ ;
|
|
43
|
+
/** @type {__VLS_StyleScopedClasses['mb-3']} */ ;
|
|
44
|
+
/** @type {__VLS_StyleScopedClasses['btn']} */ ;
|
|
45
|
+
/** @type {__VLS_StyleScopedClasses['btn-primary']} */ ;
|
|
46
|
+
const __VLS_export = (await import('vue')).defineComponent({});
|
|
47
|
+
export default {};
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
/// <reference types="C:/phonghq/go-chat-v2/node_modules/.vue-global-types/vue_3.5_0.d.ts" />
|
|
2
|
+
import { ref } from 'vue';
|
|
3
|
+
import CSpin from '../components/common/spin/CSpin.vue';
|
|
4
|
+
import { dataProfile, submitTenantPhone } from '../utils/chat/auth';
|
|
5
|
+
import router from '../router';
|
|
6
|
+
const open = ref(false);
|
|
7
|
+
const phoneValue = ref('');
|
|
8
|
+
const countries = [
|
|
9
|
+
// { code: 'VN', name: 'Vietnam', dial: 84, flag: '🇻🇳' },
|
|
10
|
+
{ code: 'US', name: 'United States', dial: 1, flag: '🇺🇸' }
|
|
11
|
+
// { code: 'KR', name: 'Korea', dial: 82, flag: '🇰🇷' },
|
|
12
|
+
// { code: 'JP', name: 'Japan', dial: 81, flag: '🇯🇵' },
|
|
13
|
+
// { code: 'TH', name: 'Thailand', dial: 66, flag: '🇹🇭' },
|
|
14
|
+
];
|
|
15
|
+
const selected = ref(countries[0]);
|
|
16
|
+
const error = ref('');
|
|
17
|
+
const loading = ref(false);
|
|
18
|
+
const select = (c) => {
|
|
19
|
+
selected.value = c;
|
|
20
|
+
open.value = false;
|
|
21
|
+
};
|
|
22
|
+
const isPhoneMatchDial = (countryDial, phone) => {
|
|
23
|
+
const dial = phone.replace('+', '');
|
|
24
|
+
return phone.startsWith(countryDial.toString());
|
|
25
|
+
};
|
|
26
|
+
const keepOnlyNumbers = (str) => {
|
|
27
|
+
return str.replace(/\D/g, '');
|
|
28
|
+
};
|
|
29
|
+
const handleInput = () => {
|
|
30
|
+
error.value = '';
|
|
31
|
+
phoneValue.value = keepOnlyNumbers(phoneValue.value);
|
|
32
|
+
};
|
|
33
|
+
const onSubmit = async () => {
|
|
34
|
+
try {
|
|
35
|
+
if (isPhoneMatchDial(selected.value.dial, phoneValue.value)) {
|
|
36
|
+
error.value = `Phone number does not match country code ${selected.value.name}`;
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
loading.value = true;
|
|
40
|
+
const param = {
|
|
41
|
+
phone: selected.value.dial + phoneValue.value,
|
|
42
|
+
tenant_id: dataProfile.value?.tenant_id ?? ''
|
|
43
|
+
};
|
|
44
|
+
await submitTenantPhone(param);
|
|
45
|
+
router.push({ name: 'home' });
|
|
46
|
+
}
|
|
47
|
+
catch (e) {
|
|
48
|
+
console.log(e);
|
|
49
|
+
}
|
|
50
|
+
loading.value = false;
|
|
51
|
+
};
|
|
52
|
+
debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
|
|
53
|
+
const __VLS_ctx = {
|
|
54
|
+
...{},
|
|
55
|
+
...{},
|
|
56
|
+
};
|
|
57
|
+
let __VLS_elements;
|
|
58
|
+
let __VLS_components;
|
|
59
|
+
let __VLS_directives;
|
|
60
|
+
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
61
|
+
...{ class: "flex flex-col w-[700px] h-full mx-auto justify-center pb-40" },
|
|
62
|
+
});
|
|
63
|
+
__VLS_asFunctionalElement(__VLS_elements.label, __VLS_elements.label)({
|
|
64
|
+
...{ class: "text-[28px] font-medium text-chat-haze-700 mb-1 block mb-2" },
|
|
65
|
+
});
|
|
66
|
+
__VLS_asFunctionalElement(__VLS_elements.p, __VLS_elements.p)({
|
|
67
|
+
...{ class: "text-xl text-chat-haze-600 mb-4" },
|
|
68
|
+
});
|
|
69
|
+
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
70
|
+
...{ class: "flex items-center gap-2 chat-input border border-chat-haze-200 p-2 bg-white shadow-md" },
|
|
71
|
+
});
|
|
72
|
+
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
73
|
+
...{ class: "relative" },
|
|
74
|
+
});
|
|
75
|
+
__VLS_asFunctionalElement(__VLS_elements.button, __VLS_elements.button)({
|
|
76
|
+
...{ onClick: (...[$event]) => {
|
|
77
|
+
__VLS_ctx.open = !__VLS_ctx.open;
|
|
78
|
+
// @ts-ignore
|
|
79
|
+
[open, open,];
|
|
80
|
+
} },
|
|
81
|
+
...{ class: "flex items-center gap-1 px-2 py-1 rounded-lg hover:bg-gray-100" },
|
|
82
|
+
});
|
|
83
|
+
__VLS_asFunctionalElement(__VLS_elements.span, __VLS_elements.span)({});
|
|
84
|
+
(__VLS_ctx.selected.flag);
|
|
85
|
+
// @ts-ignore
|
|
86
|
+
[selected,];
|
|
87
|
+
__VLS_asFunctionalElement(__VLS_elements.span, __VLS_elements.span)({
|
|
88
|
+
...{ class: "text-sm text-chat-haze-700" },
|
|
89
|
+
});
|
|
90
|
+
(__VLS_ctx.selected.dial);
|
|
91
|
+
// @ts-ignore
|
|
92
|
+
[selected,];
|
|
93
|
+
__VLS_asFunctionalElement(__VLS_elements.svg, __VLS_elements.svg)({
|
|
94
|
+
...{ class: "w-4 h-4 text-chat-haze-500" },
|
|
95
|
+
fill: "none",
|
|
96
|
+
stroke: "currentColor",
|
|
97
|
+
viewBox: "0 0 20 20",
|
|
98
|
+
});
|
|
99
|
+
__VLS_asFunctionalElement(__VLS_elements.path)({
|
|
100
|
+
'stroke-linecap': "round",
|
|
101
|
+
'stroke-linejoin': "round",
|
|
102
|
+
'stroke-width': "2",
|
|
103
|
+
d: "M5 7l5 5 5-5",
|
|
104
|
+
});
|
|
105
|
+
if (__VLS_ctx.open) {
|
|
106
|
+
// @ts-ignore
|
|
107
|
+
[open,];
|
|
108
|
+
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
109
|
+
...{ class: "absolute z-10 bg-white border shadow-lg rounded-xl mt-4 w-40 max-h-52 overflow-auto border border-chat-haze-200" },
|
|
110
|
+
});
|
|
111
|
+
for (const [c] of __VLS_getVForSourceType((__VLS_ctx.countries))) {
|
|
112
|
+
// @ts-ignore
|
|
113
|
+
[countries,];
|
|
114
|
+
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
115
|
+
...{ onClick: (...[$event]) => {
|
|
116
|
+
if (!(__VLS_ctx.open))
|
|
117
|
+
return;
|
|
118
|
+
__VLS_ctx.select(c);
|
|
119
|
+
// @ts-ignore
|
|
120
|
+
[select,];
|
|
121
|
+
} },
|
|
122
|
+
key: (c.code),
|
|
123
|
+
...{ class: "flex items-center gap-2 px-3 py-2 hover:bg-gray-100 cursor-pointer" },
|
|
124
|
+
});
|
|
125
|
+
__VLS_asFunctionalElement(__VLS_elements.span, __VLS_elements.span)({});
|
|
126
|
+
(c.flag);
|
|
127
|
+
__VLS_asFunctionalElement(__VLS_elements.span, __VLS_elements.span)({
|
|
128
|
+
...{ class: "text-sm" },
|
|
129
|
+
});
|
|
130
|
+
(c.dial);
|
|
131
|
+
__VLS_asFunctionalElement(__VLS_elements.span, __VLS_elements.span)({
|
|
132
|
+
...{ class: "text-xs text-chat-haze-500 ml-auto" },
|
|
133
|
+
});
|
|
134
|
+
(c.code);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
__VLS_asFunctionalElement(__VLS_elements.input)({
|
|
138
|
+
...{ onInput: (__VLS_ctx.handleInput) },
|
|
139
|
+
...{ onKeyup: (__VLS_ctx.onSubmit) },
|
|
140
|
+
...{ class: "!outline-none" },
|
|
141
|
+
type: "tel",
|
|
142
|
+
maxlength: (10),
|
|
143
|
+
placeholder: "Enter phone number",
|
|
144
|
+
});
|
|
145
|
+
(__VLS_ctx.phoneValue);
|
|
146
|
+
// @ts-ignore
|
|
147
|
+
[handleInput, onSubmit, phoneValue,];
|
|
148
|
+
if (__VLS_ctx.error) {
|
|
149
|
+
// @ts-ignore
|
|
150
|
+
[error,];
|
|
151
|
+
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
152
|
+
...{ class: "mt-2 ml-1 text-sm text-chat-error flex items-center gap-1" },
|
|
153
|
+
});
|
|
154
|
+
__VLS_asFunctionalElement(__VLS_elements.svg, __VLS_elements.svg)({
|
|
155
|
+
...{ class: "w-4 h-4" },
|
|
156
|
+
fill: "none",
|
|
157
|
+
stroke: "currentColor",
|
|
158
|
+
viewBox: "0 0 24 24",
|
|
159
|
+
});
|
|
160
|
+
__VLS_asFunctionalElement(__VLS_elements.path)({
|
|
161
|
+
'stroke-linecap': "round",
|
|
162
|
+
'stroke-linejoin': "round",
|
|
163
|
+
'stroke-width': "2",
|
|
164
|
+
d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.662 1.732-3L13.732 4c-.77-1.338-2.694-1.338-3.464 0L4.34 16c-.77 1.338.192 3 1.732 3z",
|
|
165
|
+
});
|
|
166
|
+
(__VLS_ctx.error);
|
|
167
|
+
// @ts-ignore
|
|
168
|
+
[error,];
|
|
169
|
+
}
|
|
170
|
+
__VLS_asFunctionalElement(__VLS_elements.button, __VLS_elements.button)({
|
|
171
|
+
...{ onClick: (__VLS_ctx.onSubmit) },
|
|
172
|
+
...{ class: "mt-4 w-full bg-chat-primary text-white p-2 rounded-lg hover:bg-blue-700" },
|
|
173
|
+
});
|
|
174
|
+
// @ts-ignore
|
|
175
|
+
[onSubmit,];
|
|
176
|
+
if (__VLS_ctx.loading) {
|
|
177
|
+
// @ts-ignore
|
|
178
|
+
[loading,];
|
|
179
|
+
/** @type {[typeof CSpin, typeof CSpin, ]} */ ;
|
|
180
|
+
// @ts-ignore
|
|
181
|
+
const __VLS_0 = __VLS_asFunctionalComponent(CSpin, new CSpin({
|
|
182
|
+
size: (30),
|
|
183
|
+
}));
|
|
184
|
+
const __VLS_1 = __VLS_0({
|
|
185
|
+
size: (30),
|
|
186
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_0));
|
|
187
|
+
}
|
|
188
|
+
else {
|
|
189
|
+
__VLS_asFunctionalElement(__VLS_elements.span, __VLS_elements.span)({});
|
|
190
|
+
}
|
|
191
|
+
/** @type {__VLS_StyleScopedClasses['flex']} */ ;
|
|
192
|
+
/** @type {__VLS_StyleScopedClasses['flex-col']} */ ;
|
|
193
|
+
/** @type {__VLS_StyleScopedClasses['w-[700px]']} */ ;
|
|
194
|
+
/** @type {__VLS_StyleScopedClasses['h-full']} */ ;
|
|
195
|
+
/** @type {__VLS_StyleScopedClasses['mx-auto']} */ ;
|
|
196
|
+
/** @type {__VLS_StyleScopedClasses['justify-center']} */ ;
|
|
197
|
+
/** @type {__VLS_StyleScopedClasses['pb-40']} */ ;
|
|
198
|
+
/** @type {__VLS_StyleScopedClasses['text-[28px]']} */ ;
|
|
199
|
+
/** @type {__VLS_StyleScopedClasses['font-medium']} */ ;
|
|
200
|
+
/** @type {__VLS_StyleScopedClasses['text-chat-haze-700']} */ ;
|
|
201
|
+
/** @type {__VLS_StyleScopedClasses['mb-1']} */ ;
|
|
202
|
+
/** @type {__VLS_StyleScopedClasses['block']} */ ;
|
|
203
|
+
/** @type {__VLS_StyleScopedClasses['mb-2']} */ ;
|
|
204
|
+
/** @type {__VLS_StyleScopedClasses['text-xl']} */ ;
|
|
205
|
+
/** @type {__VLS_StyleScopedClasses['text-chat-haze-600']} */ ;
|
|
206
|
+
/** @type {__VLS_StyleScopedClasses['mb-4']} */ ;
|
|
207
|
+
/** @type {__VLS_StyleScopedClasses['flex']} */ ;
|
|
208
|
+
/** @type {__VLS_StyleScopedClasses['items-center']} */ ;
|
|
209
|
+
/** @type {__VLS_StyleScopedClasses['gap-2']} */ ;
|
|
210
|
+
/** @type {__VLS_StyleScopedClasses['chat-input']} */ ;
|
|
211
|
+
/** @type {__VLS_StyleScopedClasses['border']} */ ;
|
|
212
|
+
/** @type {__VLS_StyleScopedClasses['border-chat-haze-200']} */ ;
|
|
213
|
+
/** @type {__VLS_StyleScopedClasses['p-2']} */ ;
|
|
214
|
+
/** @type {__VLS_StyleScopedClasses['bg-white']} */ ;
|
|
215
|
+
/** @type {__VLS_StyleScopedClasses['shadow-md']} */ ;
|
|
216
|
+
/** @type {__VLS_StyleScopedClasses['relative']} */ ;
|
|
217
|
+
/** @type {__VLS_StyleScopedClasses['flex']} */ ;
|
|
218
|
+
/** @type {__VLS_StyleScopedClasses['items-center']} */ ;
|
|
219
|
+
/** @type {__VLS_StyleScopedClasses['gap-1']} */ ;
|
|
220
|
+
/** @type {__VLS_StyleScopedClasses['px-2']} */ ;
|
|
221
|
+
/** @type {__VLS_StyleScopedClasses['py-1']} */ ;
|
|
222
|
+
/** @type {__VLS_StyleScopedClasses['rounded-lg']} */ ;
|
|
223
|
+
/** @type {__VLS_StyleScopedClasses['hover:bg-gray-100']} */ ;
|
|
224
|
+
/** @type {__VLS_StyleScopedClasses['text-sm']} */ ;
|
|
225
|
+
/** @type {__VLS_StyleScopedClasses['text-chat-haze-700']} */ ;
|
|
226
|
+
/** @type {__VLS_StyleScopedClasses['w-4']} */ ;
|
|
227
|
+
/** @type {__VLS_StyleScopedClasses['h-4']} */ ;
|
|
228
|
+
/** @type {__VLS_StyleScopedClasses['text-chat-haze-500']} */ ;
|
|
229
|
+
/** @type {__VLS_StyleScopedClasses['absolute']} */ ;
|
|
230
|
+
/** @type {__VLS_StyleScopedClasses['z-10']} */ ;
|
|
231
|
+
/** @type {__VLS_StyleScopedClasses['bg-white']} */ ;
|
|
232
|
+
/** @type {__VLS_StyleScopedClasses['border']} */ ;
|
|
233
|
+
/** @type {__VLS_StyleScopedClasses['shadow-lg']} */ ;
|
|
234
|
+
/** @type {__VLS_StyleScopedClasses['rounded-xl']} */ ;
|
|
235
|
+
/** @type {__VLS_StyleScopedClasses['mt-4']} */ ;
|
|
236
|
+
/** @type {__VLS_StyleScopedClasses['w-40']} */ ;
|
|
237
|
+
/** @type {__VLS_StyleScopedClasses['max-h-52']} */ ;
|
|
238
|
+
/** @type {__VLS_StyleScopedClasses['overflow-auto']} */ ;
|
|
239
|
+
/** @type {__VLS_StyleScopedClasses['border']} */ ;
|
|
240
|
+
/** @type {__VLS_StyleScopedClasses['border-chat-haze-200']} */ ;
|
|
241
|
+
/** @type {__VLS_StyleScopedClasses['flex']} */ ;
|
|
242
|
+
/** @type {__VLS_StyleScopedClasses['items-center']} */ ;
|
|
243
|
+
/** @type {__VLS_StyleScopedClasses['gap-2']} */ ;
|
|
244
|
+
/** @type {__VLS_StyleScopedClasses['px-3']} */ ;
|
|
245
|
+
/** @type {__VLS_StyleScopedClasses['py-2']} */ ;
|
|
246
|
+
/** @type {__VLS_StyleScopedClasses['hover:bg-gray-100']} */ ;
|
|
247
|
+
/** @type {__VLS_StyleScopedClasses['cursor-pointer']} */ ;
|
|
248
|
+
/** @type {__VLS_StyleScopedClasses['text-sm']} */ ;
|
|
249
|
+
/** @type {__VLS_StyleScopedClasses['text-xs']} */ ;
|
|
250
|
+
/** @type {__VLS_StyleScopedClasses['text-chat-haze-500']} */ ;
|
|
251
|
+
/** @type {__VLS_StyleScopedClasses['ml-auto']} */ ;
|
|
252
|
+
/** @type {__VLS_StyleScopedClasses['!outline-none']} */ ;
|
|
253
|
+
/** @type {__VLS_StyleScopedClasses['mt-2']} */ ;
|
|
254
|
+
/** @type {__VLS_StyleScopedClasses['ml-1']} */ ;
|
|
255
|
+
/** @type {__VLS_StyleScopedClasses['text-sm']} */ ;
|
|
256
|
+
/** @type {__VLS_StyleScopedClasses['text-chat-error']} */ ;
|
|
257
|
+
/** @type {__VLS_StyleScopedClasses['flex']} */ ;
|
|
258
|
+
/** @type {__VLS_StyleScopedClasses['items-center']} */ ;
|
|
259
|
+
/** @type {__VLS_StyleScopedClasses['gap-1']} */ ;
|
|
260
|
+
/** @type {__VLS_StyleScopedClasses['w-4']} */ ;
|
|
261
|
+
/** @type {__VLS_StyleScopedClasses['h-4']} */ ;
|
|
262
|
+
/** @type {__VLS_StyleScopedClasses['mt-4']} */ ;
|
|
263
|
+
/** @type {__VLS_StyleScopedClasses['w-full']} */ ;
|
|
264
|
+
/** @type {__VLS_StyleScopedClasses['bg-chat-primary']} */ ;
|
|
265
|
+
/** @type {__VLS_StyleScopedClasses['text-white']} */ ;
|
|
266
|
+
/** @type {__VLS_StyleScopedClasses['p-2']} */ ;
|
|
267
|
+
/** @type {__VLS_StyleScopedClasses['rounded-lg']} */ ;
|
|
268
|
+
/** @type {__VLS_StyleScopedClasses['hover:bg-blue-700']} */ ;
|
|
269
|
+
const __VLS_export = (await import('vue')).defineComponent({});
|
|
270
|
+
export default {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ComputedRef } from 'vue';
|
|
1
2
|
export type GoChatProps = {
|
|
2
3
|
token?: string;
|
|
3
4
|
id?: string;
|
|
@@ -5,4 +6,7 @@ export type GoChatProps = {
|
|
|
5
6
|
response?: PAGE_RESPONSE;
|
|
6
7
|
isLib?: boolean;
|
|
7
8
|
};
|
|
9
|
+
export interface GoChatInstance {
|
|
10
|
+
unreadCount: ComputedRef<number>;
|
|
11
|
+
}
|
|
8
12
|
export type PAGE_RESPONSE = 'mobile' | 'tablet';
|
|
@@ -40,6 +40,10 @@ export declare const dataLoginLink: import("vue").Ref<{
|
|
|
40
40
|
export declare const setDataLogin: (id: string, token: string, domain: string) => void;
|
|
41
41
|
export declare const loginTenant: (body: IBodyLoginTenant) => Promise<any>;
|
|
42
42
|
export declare const loginLink: (params: IPramsLoginLink) => Promise<any>;
|
|
43
|
-
export declare const getProfile: () => Promise<
|
|
43
|
+
export declare const getProfile: () => Promise<IResProfile>;
|
|
44
|
+
export declare const submitTenantPhone: (body: {
|
|
45
|
+
phone: string;
|
|
46
|
+
tenant_id: string;
|
|
47
|
+
}) => Promise<any>;
|
|
44
48
|
export declare const logout: () => Promise<void>;
|
|
45
49
|
export {};
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import type { IResUser } from '../../types/message';
|
|
2
|
-
import type { IResCall } from '../../types/call';
|
|
3
2
|
export declare const getIceService: () => Promise<import("axios").AxiosResponse<any, any>>;
|
|
4
|
-
export declare const callClient: (
|
|
3
|
+
export declare const callClient: (data: {
|
|
4
|
+
call_uuid: string;
|
|
5
|
+
clientId: string;
|
|
6
|
+
}) => Promise<void>;
|
|
5
7
|
export declare const callOutBound: (user: IResUser) => Promise<void>;
|
|
6
8
|
export declare const plivoCall: (user: IResUser) => Promise<any>;
|
|
7
9
|
export declare const plivoEndCall: (uuid: string) => Promise<void>;
|
|
10
|
+
export declare const downloadRecord: (url_pub: string) => Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const formatPhone10number: (phone: string, dial: string) => string;
|
|
@@ -187,6 +187,10 @@ export declare const userHistory: import("vue").Ref<{
|
|
|
187
187
|
visit_count: number;
|
|
188
188
|
} | null>;
|
|
189
189
|
export declare const getUserHistory: (phone: string) => Promise<GetCustomerHistoryResponse>;
|
|
190
|
+
export declare const getUserDetailChat: (params: {
|
|
191
|
+
phone: string;
|
|
192
|
+
client_id: string;
|
|
193
|
+
}) => Promise<any>;
|
|
190
194
|
export declare function getItemsByYear<T = any>(data: any, key?: string): {
|
|
191
195
|
year: string;
|
|
192
196
|
items: T[];
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|