@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.
Files changed (157) hide show
  1. package/dist/chat/main.d.ts +6 -3
  2. package/dist/go-chat.es.js +1 -1
  3. package/dist/go-chat.umd.js +13 -13
  4. package/dist/test/chat/main.js +6 -0
  5. package/dist/test/types/chat/global.js +1 -0
  6. package/dist/test/types/chat/promise.js +1 -0
  7. package/dist/test/types/chat/user.js +1 -0
  8. package/dist/test/types/conversation.js +1 -0
  9. package/dist/test/types/global.js +15 -0
  10. package/dist/test/types/message.js +1 -0
  11. package/dist/types/call.d.ts +4 -0
  12. package/dist/types/chat/auth.d.ts +37 -0
  13. package/dist/types/chat/global.d.ts +7 -0
  14. package/dist/types/chat/promise.d.ts +17 -0
  15. package/dist/types/global.d.ts +11 -0
  16. package/dist/types/message.d.ts +43 -0
  17. package/package.json +1 -1
  18. package/dist/chat/main.js +0 -2
  19. /package/dist/{assets → test/assets}/icons/IconArrowLeft.vue.js +0 -0
  20. /package/dist/{assets → test/assets}/icons/IconPhone.vue.js +0 -0
  21. /package/dist/{assets → test/assets}/icons/IconPlan.vue.js +0 -0
  22. /package/dist/{assets → test/assets}/icons/IconPlus.vue.js +0 -0
  23. /package/dist/{assets → test/assets}/icons/IconSearch.vue.js +0 -0
  24. /package/dist/{assets → test/assets}/icons/call/IconMic.vue.js +0 -0
  25. /package/dist/{assets → test/assets}/icons/call/IconPhone.vue.js +0 -0
  26. /package/dist/{assets → test/assets}/icons/call/IconPhoneCancel.vue.js +0 -0
  27. /package/dist/{assets → test/assets}/icons/call/IconSpeaker.vue.js +0 -0
  28. /package/dist/{assets → test/assets}/icons/customer-appointment/IconFilter.vue.js +0 -0
  29. /package/dist/{assets → test/assets}/icons/customer-detail/IconArrow.vue.js +0 -0
  30. /package/dist/{assets → test/assets}/icons/customer-detail/IconCheck.vue.js +0 -0
  31. /package/dist/{assets → test/assets}/icons/customer-detail/IconDate.vue.js +0 -0
  32. /package/dist/{assets → test/assets}/icons/customer-detail/IconGroup.vue.js +0 -0
  33. /package/dist/{assets → test/assets}/icons/customer-detail/IconMessage.vue.js +0 -0
  34. /package/dist/{assets → test/assets}/icons/customer-detail/IconNote.vue.js +0 -0
  35. /package/dist/{assets → test/assets}/icons/customer-detail/IconPhone.vue.js +0 -0
  36. /package/dist/{assets → test/assets}/icons/customer-detail/IconPin.vue.js +0 -0
  37. /package/dist/{assets → test/assets}/icons/customer-detail/IconSearch.vue.js +0 -0
  38. /package/dist/{chat → test/chat}/App.vue.js +0 -0
  39. /package/dist/{chat → test/chat}/page/customer-appointment/CustomerAppointment.vue.js +0 -0
  40. /package/dist/{chat → test/chat}/page/customer-check-in/CollapseCheckIn.vue.js +0 -0
  41. /package/dist/{chat → test/chat}/page/customer-check-in/CustomerCheckIn.vue.js +0 -0
  42. /package/dist/{chat → test/chat}/page/customer-detail/CustomerDetail.vue.js +0 -0
  43. /package/dist/{chat → test/chat}/page/customer-detail/SubInformation.vue.js +0 -0
  44. /package/dist/{chat → test/chat}/page/error/Error.vue.js +0 -0
  45. /package/dist/{chat → test/chat}/page/home/ChatList.vue.js +0 -0
  46. /package/dist/{chat → test/chat}/page/home/ChatMessage.vue.js +0 -0
  47. /package/dist/{chat → test/chat}/page/home/Home.vue.js +0 -0
  48. /package/dist/{chat → test/chat}/page/home/HomeHeader.vue.js +0 -0
  49. /package/dist/{chat → test/chat}/page/home/InputChat.vue.js +0 -0
  50. /package/dist/{chat → test/chat}/page/home/NewCustomer.vue.js +0 -0
  51. /package/dist/{components → test/components}/ListenEvent.vue.js +0 -0
  52. /package/dist/{components → test/components}/chat/ScrollEvent/ScrollEvent.vue.js +0 -0
  53. /package/dist/{components → test/components}/chat/call/Calling.vue.js +0 -0
  54. /package/dist/{components → test/components}/chat/card/CardCustomerDetail.vue.js +0 -0
  55. /package/dist/{components → test/components}/chat/common/collapse/CollapseBase.vue.js +0 -0
  56. /package/dist/{components → test/components}/chat/common/input/InputSearch.vue.js +0 -0
  57. /package/dist/{components → test/components}/chat/common/popover/PopoverBase.vue.js +0 -0
  58. /package/dist/{components → test/components}/chat/common/spin/BaseSpin.vue.js +0 -0
  59. /package/dist/{components → test/components}/chat/customer/Avatar.vue.js +0 -0
  60. /package/dist/{components → test/components}/chat/layout/mobile/Footer.vue.js +0 -0
  61. /package/dist/{components → test/components}/common/CustomLoading.vue.js +0 -0
  62. /package/dist/{components → test/components}/common/Notification/NotificationDescription.vue.js +0 -0
  63. /package/dist/{components → test/components}/common/button/ButtonBase.vue.js +0 -0
  64. /package/dist/{components → test/components}/common/button/ButtonToggle.vue.js +0 -0
  65. /package/dist/{components → test/components}/common/checkbox/CCheckboxNumber.vue.js +0 -0
  66. /package/dist/{components → test/components}/common/collapse/BaseCollapse.vue.js +0 -0
  67. /package/dist/{components → test/components}/common/collapse/BaseCollapseItem.vue.js +0 -0
  68. /package/dist/{components → test/components}/common/drawer/DrawerBase.vue.js +0 -0
  69. /package/dist/{components → test/components}/common/dropdown/DropdownBase.vue.js +0 -0
  70. /package/dist/{components → test/components}/common/input/CInputSearch.vue.js +0 -0
  71. /package/dist/{components → test/components}/common/modal/ModalBase.vue.js +0 -0
  72. /package/dist/{components → test/components}/common/popover/PopoverBase.vue.js +0 -0
  73. /package/dist/{components → test/components}/common/slider/BaseSlider.vue.js +0 -0
  74. /package/dist/{components → test/components}/common/spin/CSpin.vue.js +0 -0
  75. /package/dist/{components → test/components}/common/tooltip/TooltipBase.vue.js +0 -0
  76. /package/dist/{components → test/components}/layout/Blank.vue.js +0 -0
  77. /package/dist/{components → test/components}/layout/Default.vue.js +0 -0
  78. /package/dist/{components → test/components}/modal/Confirm.vue.js +0 -0
  79. /package/dist/{components → test/components}/ui/button/CButton.vue.js +0 -0
  80. /package/dist/{components → test/components}/ui/button/c-button.js +0 -0
  81. /package/dist/{components → test/components}/ui/checkbox/Checkbox.vue.js +0 -0
  82. /package/dist/{components → test/components}/ui/checkbox/index.js +0 -0
  83. /package/dist/{components → test/components}/ui/collapsible/Collapsible.vue.js +0 -0
  84. /package/dist/{components → test/components}/ui/collapsible/CollapsibleContent.vue.js +0 -0
  85. /package/dist/{components → test/components}/ui/collapsible/CollapsibleTrigger.vue.js +0 -0
  86. /package/dist/{components → test/components}/ui/collapsible/index.js +0 -0
  87. /package/dist/{components → test/components}/ui/dialog/Dialog.vue.js +0 -0
  88. /package/dist/{components → test/components}/ui/dialog/DialogClose.vue.js +0 -0
  89. /package/dist/{components → test/components}/ui/dialog/DialogContent.vue.js +0 -0
  90. /package/dist/{components → test/components}/ui/dialog/DialogDescription.vue.js +0 -0
  91. /package/dist/{components → test/components}/ui/dialog/DialogFooter.vue.js +0 -0
  92. /package/dist/{components → test/components}/ui/dialog/DialogHeader.vue.js +0 -0
  93. /package/dist/{components → test/components}/ui/dialog/DialogScrollContent.vue.js +0 -0
  94. /package/dist/{components → test/components}/ui/dialog/DialogTitle.vue.js +0 -0
  95. /package/dist/{components → test/components}/ui/dialog/DialogTrigger.vue.js +0 -0
  96. /package/dist/{components → test/components}/ui/dialog/index.js +0 -0
  97. /package/dist/{components → test/components}/ui/drawer/Drawer.vue.js +0 -0
  98. /package/dist/{components → test/components}/ui/drawer/DrawerContent.vue.js +0 -0
  99. /package/dist/{components → test/components}/ui/drawer/DrawerDescription.vue.js +0 -0
  100. /package/dist/{components → test/components}/ui/drawer/DrawerFooter.vue.js +0 -0
  101. /package/dist/{components → test/components}/ui/drawer/DrawerHeader.vue.js +0 -0
  102. /package/dist/{components → test/components}/ui/drawer/DrawerOverlay.vue.js +0 -0
  103. /package/dist/{components → test/components}/ui/drawer/DrawerTitle.vue.js +0 -0
  104. /package/dist/{components → test/components}/ui/drawer/index.js +0 -0
  105. /package/dist/{components → test/components}/ui/dropdown-menu/DropdownMenu.vue.js +0 -0
  106. /package/dist/{components → test/components}/ui/dropdown-menu/DropdownMenuCheckboxItem.vue.js +0 -0
  107. /package/dist/{components → test/components}/ui/dropdown-menu/DropdownMenuContent.vue.js +0 -0
  108. /package/dist/{components → test/components}/ui/dropdown-menu/DropdownMenuGroup.vue.js +0 -0
  109. /package/dist/{components → test/components}/ui/dropdown-menu/DropdownMenuItem.vue.js +0 -0
  110. /package/dist/{components → test/components}/ui/dropdown-menu/DropdownMenuLabel.vue.js +0 -0
  111. /package/dist/{components → test/components}/ui/dropdown-menu/DropdownMenuRadioGroup.vue.js +0 -0
  112. /package/dist/{components → test/components}/ui/dropdown-menu/DropdownMenuRadioItem.vue.js +0 -0
  113. /package/dist/{components → test/components}/ui/dropdown-menu/DropdownMenuSeparator.vue.js +0 -0
  114. /package/dist/{components → test/components}/ui/dropdown-menu/DropdownMenuShortcut.vue.js +0 -0
  115. /package/dist/{components → test/components}/ui/dropdown-menu/DropdownMenuSub.vue.js +0 -0
  116. /package/dist/{components → test/components}/ui/dropdown-menu/DropdownMenuSubContent.vue.js +0 -0
  117. /package/dist/{components → test/components}/ui/dropdown-menu/DropdownMenuSubTrigger.vue.js +0 -0
  118. /package/dist/{components → test/components}/ui/dropdown-menu/DropdownMenuTrigger.vue.js +0 -0
  119. /package/dist/{components → test/components}/ui/dropdown-menu/index.js +0 -0
  120. /package/dist/{components → test/components}/ui/popover/Popover.vue.js +0 -0
  121. /package/dist/{components → test/components}/ui/popover/PopoverContent.vue.js +0 -0
  122. /package/dist/{components → test/components}/ui/popover/PopoverTrigger.vue.js +0 -0
  123. /package/dist/{components → test/components}/ui/popover/index.js +0 -0
  124. /package/dist/{components → test/components}/ui/radio-group/RadioGroup.vue.js +0 -0
  125. /package/dist/{components → test/components}/ui/radio-group/RadioGroupItem.vue.js +0 -0
  126. /package/dist/{components → test/components}/ui/radio-group/index.js +0 -0
  127. /package/dist/{components → test/components}/ui/slider/Slider.vue.js +0 -0
  128. /package/dist/{components → test/components}/ui/slider/index.js +0 -0
  129. /package/dist/{components → test/components}/ui/switch/Switch.vue.js +0 -0
  130. /package/dist/{components → test/components}/ui/switch/index.js +0 -0
  131. /package/dist/{composable → test/composable}/useCallHelper.js +0 -0
  132. /package/dist/{composable → test/composable}/useInitData.js +0 -0
  133. /package/dist/{composable → test/composable}/useModalConfirm.js +0 -0
  134. /package/dist/{constant → test/constant}/color.js +0 -0
  135. /package/dist/{constant → test/constant}/datetime.js +0 -0
  136. /package/dist/{constant → test/constant}/general.js +0 -0
  137. /package/dist/{constant → test/constant}/message.js +0 -0
  138. /package/dist/{constant → test/constant}/mqtt.js +0 -0
  139. /package/dist/{constant → test/constant}/user.js +0 -0
  140. /package/dist/{lib → test/lib}/utils.js +0 -0
  141. /package/dist/{plugins → test/plugins}/axios-gci.js +0 -0
  142. /package/dist/{plugins → test/plugins}/axios.js +0 -0
  143. /package/dist/{plugins → test/plugins}/mqtt.js +0 -0
  144. /package/dist/{plugins → test/plugins}/sdk.js +0 -0
  145. /package/dist/{plugins → test/plugins}/websocket.js +0 -0
  146. /package/dist/{types/chat/user.js → test/types/call.js} +0 -0
  147. /package/dist/{types/conversation.js → test/types/chat/auth.js} +0 -0
  148. /package/dist/{utils → test/utils}/chat/auth.js +0 -0
  149. /package/dist/{utils → test/utils}/chat/call.js +0 -0
  150. /package/dist/{utils → test/utils}/chat/chat-router.js +0 -0
  151. /package/dist/{utils → test/utils}/chat/conversation.js +0 -0
  152. /package/dist/{utils → test/utils}/chat/message.js +0 -0
  153. /package/dist/{utils → test/utils}/chat/user.js +0 -0
  154. /package/dist/{utils → test/utils}/debounce.js +0 -0
  155. /package/dist/{utils → test/utils}/json.js +0 -0
  156. /package/dist/{utils → test/utils}/logger.js +0 -0
  157. /package/dist/{utils → test/utils}/string-helper.js +0 -0
@@ -0,0 +1,6 @@
1
+ import AppComponent from './App.vue';
2
+ export default AppComponent;
3
+ export * from '../types/chat/global';
4
+ export * from '../types/chat/auth';
5
+ export * from '../types/chat/user';
6
+ export * from '../types/chat/promise';
@@ -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,4 @@
1
+ export type IResCall = {
2
+ from: string;
3
+ to: string;
4
+ };
@@ -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,7 @@
1
+ export type GoChatProps = {
2
+ token?: string;
3
+ id?: string;
4
+ domain?: string;
5
+ response?: PAGE_RESPONSE;
6
+ };
7
+ export type PAGE_RESPONSE = 'mobile' | 'tablet';
@@ -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,11 @@
1
+ export {};
2
+ export type DataWithMetaResponse<T> = {
3
+ items: T;
4
+ _meta: MetaResponse;
5
+ };
6
+ export type MetaResponse = {
7
+ totalCount: number;
8
+ pageCount: number;
9
+ currentPage: number;
10
+ perPage: number;
11
+ };
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phonghq/go-chat",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist"
package/dist/chat/main.js DELETED
@@ -1,2 +0,0 @@
1
- import AppComponent from "./App.vue";
2
- export { AppComponent };
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