@phonghq/go-chat 1.0.2 → 1.0.3
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/chat/main.d.ts +6 -3
- package/dist/go-chat.es.js +1 -1
- package/dist/go-chat.umd.js +13 -13
- package/dist/test/chat/main.js +6 -0
- package/dist/test/types/chat/global.js +1 -0
- package/dist/test/types/chat/promise.js +1 -0
- package/dist/test/types/chat/user.js +1 -0
- package/dist/test/types/conversation.js +1 -0
- package/dist/test/types/global.js +15 -0
- package/dist/test/types/message.js +1 -0
- package/dist/types/call.d.ts +4 -0
- package/dist/types/chat/auth.d.ts +37 -0
- package/dist/types/chat/global.d.ts +7 -0
- package/dist/types/chat/promise.d.ts +17 -0
- package/dist/types/global.d.ts +11 -0
- package/dist/types/message.d.ts +43 -0
- package/package.json +1 -1
- package/dist/chat/main.js +0 -2
- /package/dist/{assets → test/assets}/icons/IconArrowLeft.vue.js +0 -0
- /package/dist/{assets → test/assets}/icons/IconPhone.vue.js +0 -0
- /package/dist/{assets → test/assets}/icons/IconPlan.vue.js +0 -0
- /package/dist/{assets → test/assets}/icons/IconPlus.vue.js +0 -0
- /package/dist/{assets → test/assets}/icons/IconSearch.vue.js +0 -0
- /package/dist/{assets → test/assets}/icons/call/IconMic.vue.js +0 -0
- /package/dist/{assets → test/assets}/icons/call/IconPhone.vue.js +0 -0
- /package/dist/{assets → test/assets}/icons/call/IconPhoneCancel.vue.js +0 -0
- /package/dist/{assets → test/assets}/icons/call/IconSpeaker.vue.js +0 -0
- /package/dist/{assets → test/assets}/icons/customer-appointment/IconFilter.vue.js +0 -0
- /package/dist/{assets → test/assets}/icons/customer-detail/IconArrow.vue.js +0 -0
- /package/dist/{assets → test/assets}/icons/customer-detail/IconCheck.vue.js +0 -0
- /package/dist/{assets → test/assets}/icons/customer-detail/IconDate.vue.js +0 -0
- /package/dist/{assets → test/assets}/icons/customer-detail/IconGroup.vue.js +0 -0
- /package/dist/{assets → test/assets}/icons/customer-detail/IconMessage.vue.js +0 -0
- /package/dist/{assets → test/assets}/icons/customer-detail/IconNote.vue.js +0 -0
- /package/dist/{assets → test/assets}/icons/customer-detail/IconPhone.vue.js +0 -0
- /package/dist/{assets → test/assets}/icons/customer-detail/IconPin.vue.js +0 -0
- /package/dist/{assets → test/assets}/icons/customer-detail/IconSearch.vue.js +0 -0
- /package/dist/{chat → test/chat}/App.vue.js +0 -0
- /package/dist/{chat → test/chat}/page/customer-appointment/CustomerAppointment.vue.js +0 -0
- /package/dist/{chat → test/chat}/page/customer-check-in/CollapseCheckIn.vue.js +0 -0
- /package/dist/{chat → test/chat}/page/customer-check-in/CustomerCheckIn.vue.js +0 -0
- /package/dist/{chat → test/chat}/page/customer-detail/CustomerDetail.vue.js +0 -0
- /package/dist/{chat → test/chat}/page/customer-detail/SubInformation.vue.js +0 -0
- /package/dist/{chat → test/chat}/page/error/Error.vue.js +0 -0
- /package/dist/{chat → test/chat}/page/home/ChatList.vue.js +0 -0
- /package/dist/{chat → test/chat}/page/home/ChatMessage.vue.js +0 -0
- /package/dist/{chat → test/chat}/page/home/Home.vue.js +0 -0
- /package/dist/{chat → test/chat}/page/home/HomeHeader.vue.js +0 -0
- /package/dist/{chat → test/chat}/page/home/InputChat.vue.js +0 -0
- /package/dist/{chat → test/chat}/page/home/NewCustomer.vue.js +0 -0
- /package/dist/{components → test/components}/ListenEvent.vue.js +0 -0
- /package/dist/{components → test/components}/chat/ScrollEvent/ScrollEvent.vue.js +0 -0
- /package/dist/{components → test/components}/chat/call/Calling.vue.js +0 -0
- /package/dist/{components → test/components}/chat/card/CardCustomerDetail.vue.js +0 -0
- /package/dist/{components → test/components}/chat/common/collapse/CollapseBase.vue.js +0 -0
- /package/dist/{components → test/components}/chat/common/input/InputSearch.vue.js +0 -0
- /package/dist/{components → test/components}/chat/common/popover/PopoverBase.vue.js +0 -0
- /package/dist/{components → test/components}/chat/common/spin/BaseSpin.vue.js +0 -0
- /package/dist/{components → test/components}/chat/customer/Avatar.vue.js +0 -0
- /package/dist/{components → test/components}/chat/layout/mobile/Footer.vue.js +0 -0
- /package/dist/{components → test/components}/common/CustomLoading.vue.js +0 -0
- /package/dist/{components → test/components}/common/Notification/NotificationDescription.vue.js +0 -0
- /package/dist/{components → test/components}/common/button/ButtonBase.vue.js +0 -0
- /package/dist/{components → test/components}/common/button/ButtonToggle.vue.js +0 -0
- /package/dist/{components → test/components}/common/checkbox/CCheckboxNumber.vue.js +0 -0
- /package/dist/{components → test/components}/common/collapse/BaseCollapse.vue.js +0 -0
- /package/dist/{components → test/components}/common/collapse/BaseCollapseItem.vue.js +0 -0
- /package/dist/{components → test/components}/common/drawer/DrawerBase.vue.js +0 -0
- /package/dist/{components → test/components}/common/dropdown/DropdownBase.vue.js +0 -0
- /package/dist/{components → test/components}/common/input/CInputSearch.vue.js +0 -0
- /package/dist/{components → test/components}/common/modal/ModalBase.vue.js +0 -0
- /package/dist/{components → test/components}/common/popover/PopoverBase.vue.js +0 -0
- /package/dist/{components → test/components}/common/slider/BaseSlider.vue.js +0 -0
- /package/dist/{components → test/components}/common/spin/CSpin.vue.js +0 -0
- /package/dist/{components → test/components}/common/tooltip/TooltipBase.vue.js +0 -0
- /package/dist/{components → test/components}/layout/Blank.vue.js +0 -0
- /package/dist/{components → test/components}/layout/Default.vue.js +0 -0
- /package/dist/{components → test/components}/modal/Confirm.vue.js +0 -0
- /package/dist/{components → test/components}/ui/button/CButton.vue.js +0 -0
- /package/dist/{components → test/components}/ui/button/c-button.js +0 -0
- /package/dist/{components → test/components}/ui/checkbox/Checkbox.vue.js +0 -0
- /package/dist/{components → test/components}/ui/checkbox/index.js +0 -0
- /package/dist/{components → test/components}/ui/collapsible/Collapsible.vue.js +0 -0
- /package/dist/{components → test/components}/ui/collapsible/CollapsibleContent.vue.js +0 -0
- /package/dist/{components → test/components}/ui/collapsible/CollapsibleTrigger.vue.js +0 -0
- /package/dist/{components → test/components}/ui/collapsible/index.js +0 -0
- /package/dist/{components → test/components}/ui/dialog/Dialog.vue.js +0 -0
- /package/dist/{components → test/components}/ui/dialog/DialogClose.vue.js +0 -0
- /package/dist/{components → test/components}/ui/dialog/DialogContent.vue.js +0 -0
- /package/dist/{components → test/components}/ui/dialog/DialogDescription.vue.js +0 -0
- /package/dist/{components → test/components}/ui/dialog/DialogFooter.vue.js +0 -0
- /package/dist/{components → test/components}/ui/dialog/DialogHeader.vue.js +0 -0
- /package/dist/{components → test/components}/ui/dialog/DialogScrollContent.vue.js +0 -0
- /package/dist/{components → test/components}/ui/dialog/DialogTitle.vue.js +0 -0
- /package/dist/{components → test/components}/ui/dialog/DialogTrigger.vue.js +0 -0
- /package/dist/{components → test/components}/ui/dialog/index.js +0 -0
- /package/dist/{components → test/components}/ui/drawer/Drawer.vue.js +0 -0
- /package/dist/{components → test/components}/ui/drawer/DrawerContent.vue.js +0 -0
- /package/dist/{components → test/components}/ui/drawer/DrawerDescription.vue.js +0 -0
- /package/dist/{components → test/components}/ui/drawer/DrawerFooter.vue.js +0 -0
- /package/dist/{components → test/components}/ui/drawer/DrawerHeader.vue.js +0 -0
- /package/dist/{components → test/components}/ui/drawer/DrawerOverlay.vue.js +0 -0
- /package/dist/{components → test/components}/ui/drawer/DrawerTitle.vue.js +0 -0
- /package/dist/{components → test/components}/ui/drawer/index.js +0 -0
- /package/dist/{components → test/components}/ui/dropdown-menu/DropdownMenu.vue.js +0 -0
- /package/dist/{components → test/components}/ui/dropdown-menu/DropdownMenuCheckboxItem.vue.js +0 -0
- /package/dist/{components → test/components}/ui/dropdown-menu/DropdownMenuContent.vue.js +0 -0
- /package/dist/{components → test/components}/ui/dropdown-menu/DropdownMenuGroup.vue.js +0 -0
- /package/dist/{components → test/components}/ui/dropdown-menu/DropdownMenuItem.vue.js +0 -0
- /package/dist/{components → test/components}/ui/dropdown-menu/DropdownMenuLabel.vue.js +0 -0
- /package/dist/{components → test/components}/ui/dropdown-menu/DropdownMenuRadioGroup.vue.js +0 -0
- /package/dist/{components → test/components}/ui/dropdown-menu/DropdownMenuRadioItem.vue.js +0 -0
- /package/dist/{components → test/components}/ui/dropdown-menu/DropdownMenuSeparator.vue.js +0 -0
- /package/dist/{components → test/components}/ui/dropdown-menu/DropdownMenuShortcut.vue.js +0 -0
- /package/dist/{components → test/components}/ui/dropdown-menu/DropdownMenuSub.vue.js +0 -0
- /package/dist/{components → test/components}/ui/dropdown-menu/DropdownMenuSubContent.vue.js +0 -0
- /package/dist/{components → test/components}/ui/dropdown-menu/DropdownMenuSubTrigger.vue.js +0 -0
- /package/dist/{components → test/components}/ui/dropdown-menu/DropdownMenuTrigger.vue.js +0 -0
- /package/dist/{components → test/components}/ui/dropdown-menu/index.js +0 -0
- /package/dist/{components → test/components}/ui/popover/Popover.vue.js +0 -0
- /package/dist/{components → test/components}/ui/popover/PopoverContent.vue.js +0 -0
- /package/dist/{components → test/components}/ui/popover/PopoverTrigger.vue.js +0 -0
- /package/dist/{components → test/components}/ui/popover/index.js +0 -0
- /package/dist/{components → test/components}/ui/radio-group/RadioGroup.vue.js +0 -0
- /package/dist/{components → test/components}/ui/radio-group/RadioGroupItem.vue.js +0 -0
- /package/dist/{components → test/components}/ui/radio-group/index.js +0 -0
- /package/dist/{components → test/components}/ui/slider/Slider.vue.js +0 -0
- /package/dist/{components → test/components}/ui/slider/index.js +0 -0
- /package/dist/{components → test/components}/ui/switch/Switch.vue.js +0 -0
- /package/dist/{components → test/components}/ui/switch/index.js +0 -0
- /package/dist/{composable → test/composable}/useCallHelper.js +0 -0
- /package/dist/{composable → test/composable}/useInitData.js +0 -0
- /package/dist/{composable → test/composable}/useModalConfirm.js +0 -0
- /package/dist/{constant → test/constant}/color.js +0 -0
- /package/dist/{constant → test/constant}/datetime.js +0 -0
- /package/dist/{constant → test/constant}/general.js +0 -0
- /package/dist/{constant → test/constant}/message.js +0 -0
- /package/dist/{constant → test/constant}/mqtt.js +0 -0
- /package/dist/{constant → test/constant}/user.js +0 -0
- /package/dist/{lib → test/lib}/utils.js +0 -0
- /package/dist/{plugins → test/plugins}/axios-gci.js +0 -0
- /package/dist/{plugins → test/plugins}/axios.js +0 -0
- /package/dist/{plugins → test/plugins}/mqtt.js +0 -0
- /package/dist/{plugins → test/plugins}/sdk.js +0 -0
- /package/dist/{plugins → test/plugins}/websocket.js +0 -0
- /package/dist/{types/chat/user.js → test/types/call.js} +0 -0
- /package/dist/{types/conversation.js → test/types/chat/auth.js} +0 -0
- /package/dist/{utils → test/utils}/chat/auth.js +0 -0
- /package/dist/{utils → test/utils}/chat/call.js +0 -0
- /package/dist/{utils → test/utils}/chat/chat-router.js +0 -0
- /package/dist/{utils → test/utils}/chat/conversation.js +0 -0
- /package/dist/{utils → test/utils}/chat/message.js +0 -0
- /package/dist/{utils → test/utils}/chat/user.js +0 -0
- /package/dist/{utils → test/utils}/debounce.js +0 -0
- /package/dist/{utils → test/utils}/json.js +0 -0
- /package/dist/{utils → test/utils}/logger.js +0 -0
- /package/dist/{utils → test/utils}/string-helper.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export {};
|
|
2
|
+
// declare global {
|
|
3
|
+
// /**
|
|
4
|
+
// * Now declare things that go in the global namespace,
|
|
5
|
+
// * or augment existing declarations in the global namespace.
|
|
6
|
+
// */
|
|
7
|
+
// type AddPromise<T = unknown> = T & {
|
|
8
|
+
// resolve: Resolve
|
|
9
|
+
// reject?: Reject
|
|
10
|
+
// }
|
|
11
|
+
//
|
|
12
|
+
// // PROMISE
|
|
13
|
+
// declare type Resolve = typeof ReturnType<Promise.resolve>
|
|
14
|
+
// declare type Reject = typeof ReturnType<Promise.reject>
|
|
15
|
+
// }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
interface IBodyLoginTenant {
|
|
2
|
+
tenant_id: string;
|
|
3
|
+
}
|
|
4
|
+
interface IResLoginLink {
|
|
5
|
+
token: string;
|
|
6
|
+
refresh_token: string;
|
|
7
|
+
conversation_id: number;
|
|
8
|
+
receiver_id: number;
|
|
9
|
+
}
|
|
10
|
+
interface IBodyLoginCustomer {
|
|
11
|
+
phone: string;
|
|
12
|
+
}
|
|
13
|
+
interface IBodyVerifyOTP {
|
|
14
|
+
session_uuid: string;
|
|
15
|
+
phone: string;
|
|
16
|
+
otp: string;
|
|
17
|
+
}
|
|
18
|
+
interface IResProfile {
|
|
19
|
+
id: number;
|
|
20
|
+
username: string;
|
|
21
|
+
tenant_id: string | null;
|
|
22
|
+
phone: string;
|
|
23
|
+
avatar: string | null;
|
|
24
|
+
user_type: 'customer' | 'tenant';
|
|
25
|
+
color: string;
|
|
26
|
+
}
|
|
27
|
+
interface IPramsLoginLink {
|
|
28
|
+
tenant_id: string;
|
|
29
|
+
phone: string;
|
|
30
|
+
message: string;
|
|
31
|
+
customer_name: string;
|
|
32
|
+
business_name: string;
|
|
33
|
+
}
|
|
34
|
+
interface IRefreshToken {
|
|
35
|
+
refresh_token: string;
|
|
36
|
+
}
|
|
37
|
+
export type { IBodyLoginTenant, IBodyLoginCustomer, IBodyVerifyOTP, IResProfile, IPramsLoginLink, IRefreshToken, IResLoginLink };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type ConfirmPayload = {
|
|
2
|
+
headerTitle?: string;
|
|
3
|
+
bodyTitle?: string;
|
|
4
|
+
bodyImage?: string;
|
|
5
|
+
bodyMessage?: string;
|
|
6
|
+
confirmButtonText?: string;
|
|
7
|
+
cancelButtonText?: string;
|
|
8
|
+
timeOut?: number;
|
|
9
|
+
type?: 'confirm' | 'information';
|
|
10
|
+
};
|
|
11
|
+
export type ConfirmPayloadPromise = AddPromise<ConfirmPayload>;
|
|
12
|
+
export type AddPromise<T = unknown> = T & {
|
|
13
|
+
resolve: Resolve;
|
|
14
|
+
reject?: Reject;
|
|
15
|
+
};
|
|
16
|
+
export type Resolve = any;
|
|
17
|
+
export type Reject = any;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { MessageState } from '../constant/message';
|
|
2
|
+
export type IResUser = {
|
|
3
|
+
id: string;
|
|
4
|
+
username: string;
|
|
5
|
+
phone: string;
|
|
6
|
+
avatar: string | null;
|
|
7
|
+
tenant_id: string | null;
|
|
8
|
+
conversation_id: number;
|
|
9
|
+
color: string;
|
|
10
|
+
status: number;
|
|
11
|
+
last_offline_at: string;
|
|
12
|
+
};
|
|
13
|
+
export type IResMessage = {
|
|
14
|
+
id: number | string;
|
|
15
|
+
conversation_id: number;
|
|
16
|
+
sender_id: number;
|
|
17
|
+
receiver_id: number;
|
|
18
|
+
message: string | null;
|
|
19
|
+
created_at: string;
|
|
20
|
+
attachments: IAttachment[];
|
|
21
|
+
state?: MessageStateType;
|
|
22
|
+
error?: string;
|
|
23
|
+
};
|
|
24
|
+
export interface IAttachment {
|
|
25
|
+
file_name: string;
|
|
26
|
+
file_path: string;
|
|
27
|
+
file_local?: Blob;
|
|
28
|
+
mime?: string;
|
|
29
|
+
size?: number;
|
|
30
|
+
}
|
|
31
|
+
export type IResUploadImage = {
|
|
32
|
+
files: IUploadFile[];
|
|
33
|
+
};
|
|
34
|
+
export type IUploadFile = {
|
|
35
|
+
name: string;
|
|
36
|
+
type: string;
|
|
37
|
+
size: number;
|
|
38
|
+
base_url: string;
|
|
39
|
+
path: string;
|
|
40
|
+
url: string;
|
|
41
|
+
delete_url: string;
|
|
42
|
+
};
|
|
43
|
+
export type MessageStateType = typeof MessageState[keyof typeof MessageState];
|
package/package.json
CHANGED
package/dist/chat/main.js
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/{components → test/components}/common/Notification/NotificationDescription.vue.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/{components → test/components}/ui/dropdown-menu/DropdownMenuCheckboxItem.vue.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|