@giosg/types 6.5.0 → 7.0.1

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 (253) hide show
  1. package/CHANGELOG.md +38 -5
  2. package/lib/GiosgTCApi.d.ts +113 -0
  3. package/lib/GiosgTCApi.d.ts.map +1 -0
  4. package/lib/GiosgTCApi.js +17 -0
  5. package/lib/apps.js +0 -1
  6. package/lib/assets.js +0 -1
  7. package/lib/brands.js +0 -1
  8. package/lib/call.js +0 -1
  9. package/lib/canned_answers.js +0 -1
  10. package/lib/chat.js +0 -1
  11. package/lib/cjs/GiosgTCApi.d.ts +118 -0
  12. package/lib/cjs/GiosgTCApi.d.ts.map +1 -0
  13. package/lib/cjs/GiosgTCApi.js +25 -0
  14. package/lib/cjs/actions.d.ts +72 -0
  15. package/lib/cjs/actions.d.ts.map +1 -0
  16. package/lib/cjs/actions.js +63 -0
  17. package/lib/cjs/apps.d.ts +99 -0
  18. package/lib/cjs/apps.d.ts.map +1 -0
  19. package/lib/cjs/apps.js +2 -0
  20. package/lib/cjs/assets.d.ts +144 -0
  21. package/lib/cjs/assets.d.ts.map +1 -0
  22. package/lib/cjs/assets.js +2 -0
  23. package/lib/cjs/brands.d.ts +41 -0
  24. package/lib/cjs/brands.d.ts.map +1 -0
  25. package/lib/cjs/brands.js +2 -0
  26. package/lib/cjs/call.d.ts +41 -0
  27. package/lib/cjs/call.d.ts.map +1 -0
  28. package/lib/cjs/call.js +2 -0
  29. package/lib/cjs/canned_answers.d.ts +26 -0
  30. package/lib/cjs/canned_answers.d.ts.map +1 -0
  31. package/lib/cjs/canned_answers.js +2 -0
  32. package/lib/cjs/chat.d.ts +1071 -0
  33. package/lib/cjs/chat.d.ts.map +1 -0
  34. package/lib/cjs/chat.js +2 -0
  35. package/lib/cjs/common.d.ts +7 -0
  36. package/lib/cjs/common.d.ts.map +1 -0
  37. package/lib/cjs/common.js +628 -0
  38. package/lib/cjs/conditions.d.ts +98 -0
  39. package/lib/cjs/conditions.d.ts.map +1 -0
  40. package/lib/cjs/conditions.js +80 -0
  41. package/lib/cjs/customer.d.ts +519 -0
  42. package/lib/cjs/customer.d.ts.map +1 -0
  43. package/lib/cjs/customer.js +2 -0
  44. package/lib/cjs/customership.d.ts +79 -0
  45. package/lib/cjs/customership.d.ts.map +1 -0
  46. package/lib/cjs/customership.js +2 -0
  47. package/lib/cjs/email.d.ts +47 -0
  48. package/lib/cjs/email.d.ts.map +1 -0
  49. package/lib/cjs/email.js +2 -0
  50. package/lib/cjs/experiments.d.ts +168 -0
  51. package/lib/cjs/experiments.d.ts.map +1 -0
  52. package/lib/cjs/experiments.js +2 -0
  53. package/lib/cjs/goals.d.ts +126 -0
  54. package/lib/cjs/goals.d.ts.map +1 -0
  55. package/lib/cjs/goals.js +2 -0
  56. package/lib/cjs/index.d.ts +36 -0
  57. package/lib/cjs/index.d.ts.map +1 -0
  58. package/lib/cjs/index.js +32 -0
  59. package/lib/cjs/leadforms.d.ts +30 -0
  60. package/lib/cjs/leadforms.d.ts.map +1 -0
  61. package/lib/cjs/leadforms.js +2 -0
  62. package/lib/cjs/linkpreview.d.ts +16 -0
  63. package/lib/cjs/linkpreview.d.ts.map +1 -0
  64. package/lib/cjs/linkpreview.js +2 -0
  65. package/lib/cjs/oath.d.ts +75 -0
  66. package/lib/cjs/oath.d.ts.map +1 -0
  67. package/lib/cjs/oath.js +25 -0
  68. package/lib/cjs/partnerships.d.ts +54 -0
  69. package/lib/cjs/partnerships.d.ts.map +1 -0
  70. package/lib/cjs/partnerships.js +2 -0
  71. package/lib/cjs/permissions.d.ts +26 -0
  72. package/lib/cjs/permissions.d.ts.map +1 -0
  73. package/lib/cjs/permissions.js +2 -0
  74. package/lib/cjs/public.d.ts +418 -0
  75. package/lib/cjs/public.d.ts.map +1 -0
  76. package/lib/cjs/public.js +12 -0
  77. package/lib/cjs/rooms.d.ts +205 -0
  78. package/lib/cjs/rooms.d.ts.map +1 -0
  79. package/lib/cjs/rooms.js +2 -0
  80. package/lib/cjs/routers.d.ts +76 -0
  81. package/lib/cjs/routers.d.ts.map +1 -0
  82. package/lib/cjs/routers.js +2 -0
  83. package/lib/cjs/rules.d.ts +229 -0
  84. package/lib/cjs/rules.d.ts.map +1 -0
  85. package/lib/cjs/rules.js +2 -0
  86. package/lib/cjs/sharing.d.ts +111 -0
  87. package/lib/cjs/sharing.d.ts.map +1 -0
  88. package/lib/cjs/sharing.js +2 -0
  89. package/lib/cjs/shoppingcarts.d.ts +33 -0
  90. package/lib/cjs/shoppingcarts.d.ts.map +1 -0
  91. package/lib/cjs/shoppingcarts.js +2 -0
  92. package/lib/cjs/system.d.ts +21 -0
  93. package/lib/cjs/system.d.ts.map +1 -0
  94. package/lib/cjs/system.js +2 -0
  95. package/lib/cjs/target.d.ts +105 -0
  96. package/lib/cjs/target.d.ts.map +1 -0
  97. package/lib/cjs/target.js +2 -0
  98. package/lib/cjs/teams.d.ts +78 -0
  99. package/lib/cjs/teams.d.ts.map +1 -0
  100. package/lib/cjs/teams.js +2 -0
  101. package/lib/cjs/types.d.ts +226 -0
  102. package/lib/cjs/types.d.ts.map +1 -0
  103. package/lib/cjs/types.js +29 -0
  104. package/lib/cjs/uploads.d.ts +55 -0
  105. package/lib/cjs/uploads.d.ts.map +1 -0
  106. package/lib/cjs/uploads.js +2 -0
  107. package/lib/cjs/userclients.d.ts +79 -0
  108. package/lib/cjs/userclients.d.ts.map +1 -0
  109. package/lib/cjs/userclients.js +2 -0
  110. package/lib/cjs/variables.d.ts +41 -0
  111. package/lib/cjs/variables.d.ts.map +1 -0
  112. package/lib/cjs/variables.js +2 -0
  113. package/lib/cjs/visitor.d.ts +210 -0
  114. package/lib/cjs/visitor.d.ts.map +1 -0
  115. package/lib/cjs/visitor.js +2 -0
  116. package/lib/cjs/webhooks.d.ts +61 -0
  117. package/lib/cjs/webhooks.d.ts.map +1 -0
  118. package/lib/cjs/webhooks.js +2 -0
  119. package/lib/customer.js +0 -1
  120. package/lib/customership.js +0 -1
  121. package/lib/email.js +0 -1
  122. package/lib/experiments.js +0 -1
  123. package/lib/goals.js +0 -1
  124. package/lib/index.d.ts +1 -0
  125. package/lib/index.d.ts.map +1 -1
  126. package/lib/index.js +1 -0
  127. package/lib/leadforms.js +0 -1
  128. package/lib/linkpreview.js +0 -1
  129. package/lib/mjs/GiosgTCApi.d.ts +118 -0
  130. package/lib/mjs/GiosgTCApi.d.ts.map +1 -0
  131. package/lib/mjs/GiosgTCApi.js +22 -0
  132. package/lib/mjs/actions.d.ts +72 -0
  133. package/lib/mjs/actions.d.ts.map +1 -0
  134. package/lib/mjs/actions.js +60 -0
  135. package/lib/mjs/apps.d.ts +99 -0
  136. package/lib/mjs/apps.d.ts.map +1 -0
  137. package/lib/mjs/apps.js +0 -0
  138. package/lib/mjs/assets.d.ts +144 -0
  139. package/lib/mjs/assets.d.ts.map +1 -0
  140. package/lib/mjs/assets.js +0 -0
  141. package/lib/mjs/brands.d.ts +41 -0
  142. package/lib/mjs/brands.d.ts.map +1 -0
  143. package/lib/mjs/brands.js +0 -0
  144. package/lib/mjs/call.d.ts +41 -0
  145. package/lib/mjs/call.d.ts.map +1 -0
  146. package/lib/mjs/call.js +0 -0
  147. package/lib/mjs/canned_answers.d.ts +26 -0
  148. package/lib/mjs/canned_answers.d.ts.map +1 -0
  149. package/lib/mjs/canned_answers.js +0 -0
  150. package/lib/mjs/chat.d.ts +1071 -0
  151. package/lib/mjs/chat.d.ts.map +1 -0
  152. package/lib/mjs/chat.js +0 -0
  153. package/lib/mjs/common.d.ts +7 -0
  154. package/lib/mjs/common.d.ts.map +1 -0
  155. package/lib/mjs/common.js +625 -0
  156. package/lib/mjs/conditions.d.ts +98 -0
  157. package/lib/mjs/conditions.d.ts.map +1 -0
  158. package/lib/mjs/conditions.js +77 -0
  159. package/lib/mjs/customer.d.ts +519 -0
  160. package/lib/mjs/customer.d.ts.map +1 -0
  161. package/lib/mjs/customer.js +0 -0
  162. package/lib/mjs/customership.d.ts +79 -0
  163. package/lib/mjs/customership.d.ts.map +1 -0
  164. package/lib/mjs/customership.js +0 -0
  165. package/lib/mjs/email.d.ts +47 -0
  166. package/lib/mjs/email.d.ts.map +1 -0
  167. package/lib/mjs/email.js +0 -0
  168. package/lib/mjs/experiments.d.ts +168 -0
  169. package/lib/mjs/experiments.d.ts.map +1 -0
  170. package/lib/mjs/experiments.js +0 -0
  171. package/lib/mjs/goals.d.ts +126 -0
  172. package/lib/mjs/goals.d.ts.map +1 -0
  173. package/lib/mjs/goals.js +0 -0
  174. package/lib/mjs/index.d.ts +36 -0
  175. package/lib/mjs/index.d.ts.map +1 -0
  176. package/lib/mjs/index.js +7 -0
  177. package/lib/mjs/leadforms.d.ts +30 -0
  178. package/lib/mjs/leadforms.d.ts.map +1 -0
  179. package/lib/mjs/leadforms.js +0 -0
  180. package/lib/mjs/linkpreview.d.ts +16 -0
  181. package/lib/mjs/linkpreview.d.ts.map +1 -0
  182. package/lib/mjs/linkpreview.js +0 -0
  183. package/lib/mjs/oath.d.ts +75 -0
  184. package/lib/mjs/oath.d.ts.map +1 -0
  185. package/lib/mjs/oath.js +22 -0
  186. package/lib/mjs/partnerships.d.ts +54 -0
  187. package/lib/mjs/partnerships.d.ts.map +1 -0
  188. package/lib/mjs/partnerships.js +0 -0
  189. package/lib/mjs/permissions.d.ts +26 -0
  190. package/lib/mjs/permissions.d.ts.map +1 -0
  191. package/lib/mjs/permissions.js +0 -0
  192. package/lib/mjs/public.d.ts +418 -0
  193. package/lib/mjs/public.d.ts.map +1 -0
  194. package/lib/mjs/public.js +9 -0
  195. package/lib/mjs/rooms.d.ts +205 -0
  196. package/lib/mjs/rooms.d.ts.map +1 -0
  197. package/lib/mjs/rooms.js +0 -0
  198. package/lib/mjs/routers.d.ts +76 -0
  199. package/lib/mjs/routers.d.ts.map +1 -0
  200. package/lib/mjs/routers.js +0 -0
  201. package/lib/mjs/rules.d.ts +229 -0
  202. package/lib/mjs/rules.d.ts.map +1 -0
  203. package/lib/mjs/rules.js +0 -0
  204. package/lib/mjs/sharing.d.ts +111 -0
  205. package/lib/mjs/sharing.d.ts.map +1 -0
  206. package/lib/mjs/sharing.js +0 -0
  207. package/lib/mjs/shoppingcarts.d.ts +33 -0
  208. package/lib/mjs/shoppingcarts.d.ts.map +1 -0
  209. package/lib/mjs/shoppingcarts.js +0 -0
  210. package/lib/mjs/system.d.ts +21 -0
  211. package/lib/mjs/system.d.ts.map +1 -0
  212. package/lib/mjs/system.js +0 -0
  213. package/lib/mjs/target.d.ts +105 -0
  214. package/lib/mjs/target.d.ts.map +1 -0
  215. package/lib/mjs/target.js +0 -0
  216. package/lib/mjs/teams.d.ts +78 -0
  217. package/lib/mjs/teams.d.ts.map +1 -0
  218. package/lib/mjs/teams.js +0 -0
  219. package/lib/mjs/types.d.ts +226 -0
  220. package/lib/mjs/types.d.ts.map +1 -0
  221. package/lib/mjs/types.js +26 -0
  222. package/lib/mjs/uploads.d.ts +55 -0
  223. package/lib/mjs/uploads.d.ts.map +1 -0
  224. package/lib/mjs/uploads.js +0 -0
  225. package/lib/mjs/userclients.d.ts +79 -0
  226. package/lib/mjs/userclients.d.ts.map +1 -0
  227. package/lib/mjs/userclients.js +0 -0
  228. package/lib/mjs/variables.d.ts +41 -0
  229. package/lib/mjs/variables.d.ts.map +1 -0
  230. package/lib/mjs/variables.js +0 -0
  231. package/lib/mjs/visitor.d.ts +210 -0
  232. package/lib/mjs/visitor.d.ts.map +1 -0
  233. package/lib/mjs/visitor.js +0 -0
  234. package/lib/mjs/webhooks.d.ts +61 -0
  235. package/lib/mjs/webhooks.d.ts.map +1 -0
  236. package/lib/mjs/webhooks.js +0 -0
  237. package/lib/partnerships.js +0 -1
  238. package/lib/permissions.js +0 -1
  239. package/lib/public.d.ts.map +1 -1
  240. package/lib/rooms.js +0 -1
  241. package/lib/routers.js +0 -1
  242. package/lib/rules.js +0 -1
  243. package/lib/sharing.js +0 -1
  244. package/lib/shoppingcarts.js +0 -1
  245. package/lib/system.js +0 -1
  246. package/lib/target.js +0 -1
  247. package/lib/teams.js +0 -1
  248. package/lib/uploads.js +0 -1
  249. package/lib/userclients.js +0 -1
  250. package/lib/variables.js +0 -1
  251. package/lib/visitor.js +0 -1
  252. package/lib/webhooks.js +0 -1
  253. package/package.json +12 -3
@@ -0,0 +1,1071 @@
1
+ import { NestedAvatar } from "./customer";
2
+ import { NestedUser } from "./customer";
3
+ import { UserUid, VisitorCid, RoomUid, ChatUid, UserLegacyId, OrganizationUid, ChatInvitationUid, TeamUid, ChatMessageUid, RuleUid, ChatReplySuggestionUid, ChatMessageAttachmentActionUid, ChatMessageAttachmentUid, RoomLegacyId, InteractionUid, ChatMessageType, ChatStatusMessageType, ChatDataMessageType, ChatSessionUid, ChatAssignmentUid } from "./types";
4
+ import { LanguageCode } from "./common";
5
+ import { ActionStyle } from "./actions";
6
+ export interface ChatInvitationAccept {
7
+ /** Unique identifier of the invitation */
8
+ id: ChatInvitationUid;
9
+ /** Defines whether the chat invitation has been accepted */
10
+ is_accepted: boolean;
11
+ /** Defines whether the chat invitation has been expired. Chat invitation will expire if it’s not accepted before chat ends */
12
+ is_expired: boolean;
13
+ /** Unique identifier of the user who made an invitation */
14
+ invited_by_user_id: UserUid;
15
+ /** User who made an invitation */
16
+ invited_by_user: NestedUser;
17
+ /** Unique identifier of the chat */
18
+ chat_id: ChatUid;
19
+ /** Unique identifier of the room in which the chat occurred */
20
+ room_id: RoomUid;
21
+ /** Unique identifier of the user who was invited */
22
+ invited_user_id?: UserUid;
23
+ /** Unique identifier of the team which was invited */
24
+ invited_team_id?: TeamUid;
25
+ /** Unique identifier of the organization which was invited */
26
+ invited_organization_id?: OrganizationUid;
27
+ /**
28
+ * Name of the invitee. This is either full name of the user, name of the team, or name of the organization
29
+ * depending on which party was invited
30
+ */
31
+ invitee_name: string;
32
+ /** Unique of the user who accepted the invitation */
33
+ accepted_by_user_id: UserUid | null;
34
+ /** User who accepted the invitation */
35
+ accepted_by_user: NestedUser | null;
36
+ /** Number of user members of the chat */
37
+ user_member_count: number;
38
+ /** Number of visitor members of the chat */
39
+ visitor_member_count: number;
40
+ /** Date when the chat invitation was sent */
41
+ created_at: string;
42
+ /** Date when the chat invitation was changed for the last time */
43
+ updated_at: string;
44
+ /** Date when the chat invitation was accepted */
45
+ accepted_at: string | null;
46
+ /** Date when the chat invitation was expired */
47
+ expired_at: string | null;
48
+ }
49
+ export interface ChatInvitationAcceptPayload {
50
+ /** Defines whether the chat invitation has been accepted */
51
+ is_accepted: boolean;
52
+ }
53
+ export declare type ChatInvitationCreate = {
54
+ /** Unique identifier of the user who was invited */
55
+ invited_user_id: UserUid;
56
+ } | {
57
+ /** Unique identifier of the team which was invited */
58
+ invited_team_id: TeamUid;
59
+ } | {
60
+ /** Unique identifier of the organization which was invited */
61
+ invited_organization_id: OrganizationUid;
62
+ };
63
+ export interface ChatInvitationExpire {
64
+ /** Unique identifier of the invitation */
65
+ id: ChatInvitationUid;
66
+ /** Defines whether the chat invitation has been accepted */
67
+ is_accepted: boolean;
68
+ /** Defines whether the chat invitation has been expired. Chat invitation will expire if it’s not accepted before chat ends */
69
+ is_expired: boolean;
70
+ /** Unique identifier of the user who made an invitation */
71
+ invited_by_user_id: UserUid;
72
+ /** User who made an invitation */
73
+ invited_by_user: NestedUser;
74
+ /** Unique identifier of the chat */
75
+ chat_id: ChatUid;
76
+ /** Unique identifier of the room in which the chat occurred */
77
+ room_id: RoomUid;
78
+ /** Unique identifier of the user who was invited */
79
+ invited_user_id?: UserUid;
80
+ /** Unique identifier of the team which was invited */
81
+ invited_team_id?: TeamUid;
82
+ /** Unique identifier of the organization which was invited */
83
+ invited_organization_id?: OrganizationUid;
84
+ /**
85
+ * Name of the invitee. This is either full name of the user, name of the team, or name of the organization
86
+ * depending on which party was invited
87
+ */
88
+ invitee_name: string;
89
+ /** Unique of the user who accepted the invitation */
90
+ accepted_by_user_id: UserUid | null;
91
+ /** User who accepted the invitation */
92
+ accepted_by_user: NestedUser | null;
93
+ /** Number of user members of the chat */
94
+ user_member_count: number;
95
+ /** Number of visitor members of the chat */
96
+ visitor_member_count: number;
97
+ /** Date when the chat invitation was sent */
98
+ created_at: string;
99
+ /** Date when the chat invitation was changed for the last time */
100
+ updated_at: string;
101
+ /** Date when the chat invitation was accepted */
102
+ accepted_at: string | null;
103
+ /** Date when the chat invitation was expired */
104
+ expired_at: string | null;
105
+ }
106
+ export interface ChatInvitationExpirePayload {
107
+ /** Defines whether the chat invitation has been expired. Chat invitation will expire if it’s not accepted before chat ends */
108
+ is_expired: boolean;
109
+ }
110
+ /**
111
+ * Only one of the invited_user_id, invited_team_id or invited_organization_id can be defined per chat invitation object.
112
+ * Other two attributes should be either null or omitted
113
+ */
114
+ export interface ChatInvitation {
115
+ /** Unique identifier of the invitation */
116
+ id: ChatInvitationUid;
117
+ /** Defines whether the chat invitation has been accepted */
118
+ is_accepted: boolean;
119
+ /** Defines whether the chat invitation has been expired. Chat invitation will expire if it’s not accepted before chat ends */
120
+ is_expired: boolean;
121
+ /** Unique identifier of the user who made an invitation */
122
+ invited_by_user_id: UserUid;
123
+ /** User who made an invitation */
124
+ invited_by_user: NestedUser;
125
+ /** Unique identifier of the chat */
126
+ chat_id: ChatUid;
127
+ /** Unique identifier of the room in which the chat occurred */
128
+ room_id: RoomUid;
129
+ /** Unique identifier of the user who was invited */
130
+ invited_user_id?: UserUid;
131
+ /** Unique identifier of the team which was invited */
132
+ invited_team_id?: TeamUid;
133
+ /** Unique identifier of the organization which was invited */
134
+ invited_organization_id?: OrganizationUid;
135
+ /**
136
+ * Name of the invitee. This is either full name of the user, name of the team, or name of the organization
137
+ * depending on which party was invited
138
+ */
139
+ invitee_name: string;
140
+ /** Unique of the user who accepted the invitation */
141
+ accepted_by_user_id: UserUid | null;
142
+ /** User who accepted the invitation */
143
+ accepted_by_user: NestedUser | null;
144
+ /** Number of user members of the chat */
145
+ user_member_count: number;
146
+ /** Number of visitor members of the chat */
147
+ visitor_member_count: number;
148
+ /** Date when the chat invitation was sent */
149
+ created_at: string;
150
+ /** Date when the chat invitation was changed for the last time */
151
+ updated_at: string;
152
+ /** Date when the chat invitation was accepted */
153
+ accepted_at: string | null;
154
+ /** Date when the chat invitation was expired */
155
+ expired_at: string | null;
156
+ }
157
+ export interface ChatConversationStarter {
158
+ /** Language of the message as a RFC 3066 code */
159
+ language_code: LanguageCode;
160
+ /** The conversation starter message */
161
+ message: string;
162
+ /** Date when the chat conversation starter was created */
163
+ created_at: string;
164
+ /** Date when the conversation starter was changed for the last time */
165
+ updated_at: string;
166
+ }
167
+ export interface ChatConversationStarterPayload {
168
+ /** Language of the message as a RFC 3066 code */
169
+ language_code: LanguageCode;
170
+ /** The conversation starter message */
171
+ message: string;
172
+ }
173
+ /**
174
+ * @deprecated
175
+ */
176
+ export interface ChatConversationStarterUpdate {
177
+ /** Language of the message as a RFC 3066 code */
178
+ language_code: LanguageCode;
179
+ /** The conversation starter message */
180
+ message: string;
181
+ /** Date when the chat conversation starter was created */
182
+ created_at: string;
183
+ /** Date when the conversation starter was changed for the last time */
184
+ updated_at: string;
185
+ }
186
+ export interface ChatConversationStarterUpdatePayload {
187
+ /** The conversation starter message */
188
+ message: string;
189
+ }
190
+ interface ChatMembershipCommon {
191
+ /**
192
+ * The name of the user/visitor as it would be displayed for the operator.
193
+ * For users this is the actual name. For visitors this is any custom name, or null
194
+ */
195
+ member_name: string | null;
196
+ /**
197
+ * The name of the user/visitor as it would be displayed for the visitor.
198
+ * This is user’s alias if they have one, otherwise it is their real name.
199
+ * For visitors, this is any custom username or null
200
+ */
201
+ member_public_name: string | null;
202
+ /** Avatar image of the user/visitor */
203
+ member_avatar: NestedAvatar | null;
204
+ /** Unique identifier of the room where the chat takes place */
205
+ room_id: RoomUid;
206
+ /** Unique identifier of the chat */
207
+ chat_id: ChatUid;
208
+ /** Date when the user/visitor was added as a chat member */
209
+ created_at: string;
210
+ /** Date when the chat membership was changed for the last time */
211
+ updated_at: string;
212
+ /**
213
+ * Defines whether the user/visitor has the chat “open”. In practice this reflects the state of the chat window.
214
+ * When the user/visitor closes the chat window, it is supposed that he is no more participating the chat
215
+ */
216
+ is_participating: boolean;
217
+ /** Defines whether the user/visitor is currently present */
218
+ is_present: boolean;
219
+ /** Defines whether the user/visitor is typing. "typed" status is changed to "idle" after 60 seconds */
220
+ composing_status: "idle" | "typing" | "typed";
221
+ /** Number of messages the user/visitor has sent to the chat */
222
+ message_count: number;
223
+ /** Unique identifier of the room’s organization where the chat takes place */
224
+ room_organization_id: OrganizationUid;
225
+ /** Unique identifier of the member’s organization */
226
+ member_organization_id: OrganizationUid;
227
+ /** Legacy Unique identifier of the user/visitor being present at the chat. Deprecated, use member_i whenever possible instead */
228
+ legacy_member_id: UserLegacyId;
229
+ /** Date until user read messages. Messages after this date are unread */
230
+ last_seen_at: string | null;
231
+ /** Unread message count */
232
+ unread_message_count: number;
233
+ }
234
+ export interface ChatMembershipUser extends ChatMembershipCommon {
235
+ /** Defines whether the user/visitor is present at the chat */
236
+ member_type: "user";
237
+ /** Unique identifier of the user/visitor being present at the chat */
238
+ member_id: UserUid;
239
+ /** Defines whether the user is bot user or not */
240
+ is_bot: boolean;
241
+ /** Defines wheter the user to whom the membership is related to is deleted */
242
+ is_user_deleted: boolean;
243
+ }
244
+ export interface ChatMembershipVisitor extends ChatMembershipCommon {
245
+ /** Defines whether the user/visitor is present at the chat */
246
+ member_type: "visitor";
247
+ /** Unique identifier of the user/visitor being present at the chat */
248
+ member_id: VisitorCid;
249
+ }
250
+ export declare type ChatMembership = ChatMembershipUser | ChatMembershipVisitor;
251
+ export interface ChatMembershipPayload {
252
+ /**
253
+ * Defines whether the user/visitor has the chat “open”. In practice this reflects the state of the chat window.
254
+ * When the user/visitor closes the chat window, it is supposed that he is no more participating the chat
255
+ */
256
+ is_participating: boolean;
257
+ /** Defines whether the user/visitor is typing. "typed" status is changed to "idle" after 60 seconds */
258
+ composing_status: "idle" | "typing" | "typed";
259
+ last_seen_at?: string;
260
+ }
261
+ interface ChatMessageCommon {
262
+ /** Unique identifier of the message */
263
+ id: ChatMessageUid;
264
+ /** Defines the type of the message. "msg" by default */
265
+ type: ChatMessageType;
266
+ /** Unique identifier of the chat */
267
+ chat_id: ChatUid;
268
+ /** Unique identifier of the room in which the chat occurred */
269
+ room_id: RoomUid;
270
+ /** Date when the message was sent */
271
+ created_at: string;
272
+ /** Display name of the sender as the visitor would see it */
273
+ sender_public_name: string;
274
+ /** Display name of the sender as an operator would see it */
275
+ sender_name: string;
276
+ /** Avatar image of the sender */
277
+ sender_avatar: NestedAvatar | null;
278
+ /**
279
+ * Content text of the message. The maximum length is 2000 characters.
280
+ * This will always be the decrypted if the decryption key is still being stored at the server
281
+ */
282
+ message: string | null;
283
+ /**
284
+ * Whether or not the message is stored encrypted. When true, the encrypted_message attribute contains
285
+ * the encrypted ciphertext of the message
286
+ */
287
+ is_encrypted: boolean;
288
+ /**
289
+ * The encrypted ciphertext of the message, if encryption is used for the chat.
290
+ * This attribute is only present if "is_encrypted" is true
291
+ */
292
+ encrypted_message?: string | undefined;
293
+ /**
294
+ * Date when the message’s sensitive data was purged. This means that the message and
295
+ * visitor’s "sender_name" and "sender_public_name" are set as null. It is null if the data was not purged
296
+ */
297
+ sensitive_data_purged_at: string | null;
298
+ /** Unique identifier of the chat reply suggestion that was selected as a basis for the message */
299
+ selected_reply_suggestion_id: ChatReplySuggestionUid | null;
300
+ /** Chat reply suggestion that was selected as a basis for the message */
301
+ selected_reply_suggestion: NestedChatReplySuggestion | null;
302
+ /**
303
+ * List of the chat message attachments for the chat message.
304
+ * No more than one if "attachment_template" is set to "interaction"
305
+ */
306
+ attachments: NestedChatMessageAttachment[] | null;
307
+ /** Type of the chat message attachment template */
308
+ attachment_template: "generic" | "interaction" | "external" | null;
309
+ /** Unique identifier of the message this message was a response to */
310
+ response_to_message_id: ChatMessageUid | null;
311
+ /** Unique identifier of the chosen attachment this was a response to */
312
+ response_to_attachment_id: ChatMessageAttachmentUid | null;
313
+ /** Chosen attachment this was a response to */
314
+ response_to_attachment: NestedChatMessageResponseAttachment | null;
315
+ /** Unique identifier of the chosen attachment action this was a response to */
316
+ response_to_action_id: ChatMessageAttachmentActionUid | null;
317
+ /** Chosen attachment action this was a response to */
318
+ response_to_action: NestedChatMessageAttachmentAction | null;
319
+ /** Response text of the attachment response. This field is required for interaction attachment response */
320
+ response_text: string | null;
321
+ /**
322
+ * Chosen attachment value of the response. If the chosen attachment was an action,
323
+ * then this is the value of the action. Otherwise this may be the attachment’s "title_link_url",
324
+ * "image_url", "image_link_url" or a link provided in text field
325
+ */
326
+ response_value: string | null;
327
+ }
328
+ interface ChatMessageUser extends ChatMessageCommon {
329
+ /** Defines the type of the sender. "user" by default */
330
+ sender_type: "user";
331
+ /** Unique identifier of the sender. Could be user, visitor or rule */
332
+ sender_id: UserUid;
333
+ }
334
+ interface ChatMessageVisitor extends ChatMessageCommon {
335
+ /** Defines the type of the sender. "user" by default */
336
+ sender_type: "visitor";
337
+ /** Unique identifier of the sender. Could be user, visitor or rule */
338
+ sender_id: VisitorCid;
339
+ }
340
+ interface ChatMessageRule extends ChatMessageCommon {
341
+ /** Defines the type of the sender. "user" by default */
342
+ sender_type: "rule";
343
+ /** Unique identifier of the sender. Could be user, visitor or rule */
344
+ sender_id: RuleUid;
345
+ }
346
+ interface ChatStatusMessageUser extends ChatMessageUser {
347
+ /** Defines the type of the message. "msg" by default */
348
+ type: ChatStatusMessageType;
349
+ }
350
+ interface ChatStatusMessageVisitor extends ChatMessageVisitor {
351
+ /** Defines the type of the message. "msg" by default */
352
+ type: ChatStatusMessageType;
353
+ }
354
+ interface ChatStatusMessageRule extends ChatMessageRule {
355
+ /** Defines the type of the message. "msg" by default */
356
+ type: ChatStatusMessageType;
357
+ }
358
+ interface ChatDataMessageUser extends ChatMessageUser {
359
+ /** Defines the type of the message. "msg" by default */
360
+ type: ChatDataMessageType;
361
+ }
362
+ interface ChatDataMessageVisitor extends ChatMessageVisitor {
363
+ /** Defines the type of the message. "msg" by default */
364
+ type: ChatDataMessageType;
365
+ }
366
+ interface ChatDataMessageRule extends ChatMessageRule {
367
+ /** Defines the type of the message. "msg" by default */
368
+ type: ChatDataMessageType;
369
+ }
370
+ export declare type ChatStatusMessage = ChatStatusMessageUser | ChatStatusMessageVisitor | ChatStatusMessageRule;
371
+ export declare type ChatDataMessage = ChatDataMessageUser | ChatDataMessageVisitor | ChatDataMessageRule;
372
+ export declare type ChatMessage = ChatStatusMessage | ChatDataMessage;
373
+ export interface ChatMessagePayload {
374
+ /**
375
+ * Content text of the message. The maximum length is 2000 characters.
376
+ * This will always be the decrypted if the decryption key is still being stored at the server
377
+ */
378
+ message: string | null;
379
+ /** Unique identifier of the chat reply suggestion that was selected as a basis for the message */
380
+ selected_reply_suggestion_id?: ChatReplySuggestionUid | null;
381
+ /**
382
+ * List of the chat message attachments for the chat message.
383
+ * No more than one if "attachment_template" is set to "interaction"
384
+ */
385
+ attachments?: NestedChatMessageAttachmentPayload[] | null;
386
+ /** Type of the chat message attachment template */
387
+ attachment_template?: "generic" | "interaction" | "external";
388
+ }
389
+ export interface ChatReplySuggestion {
390
+ /** Unique identifier of the reply suggestion */
391
+ id: ChatReplySuggestionUid;
392
+ /** Unique identifier of the user who created the reply suggestion */
393
+ created_by_user_id: UserUid;
394
+ /** User who created the reply suggestion */
395
+ created_by_user: NestedUser;
396
+ /** User who changed the reply suggestion for the last time */
397
+ updated_by_user_id: UserUid;
398
+ /** Unique identifier of the user who changed the reply suggestion for the last time */
399
+ updated_by_user: NestedUser;
400
+ /** Unique identifier of the chat */
401
+ chat_id: ChatUid;
402
+ /** Unique identifier of the chat message which the reply suggestion is tied to */
403
+ message_id: ChatMessageUid;
404
+ /** Unique identifier of the room where the chat takes place */
405
+ room_id: RoomUid;
406
+ /** Unique identifier of the user’s organization */
407
+ organization_id: OrganizationUid;
408
+ /** Date when the reply suggestion was created */
409
+ created_at: string;
410
+ /** Date when the reply suggestion was changed for the last time */
411
+ updated_at: string;
412
+ /** Message of the reply suggestion */
413
+ suggestion: string;
414
+ /** Defines appropriateness level of the reply suggestion for the message. The value range is [0 - 1] or null */
415
+ relevancy_score: number | null;
416
+ }
417
+ export interface ChatReplySuggestionPayload {
418
+ /** Message of the reply suggestion */
419
+ suggestion: string;
420
+ /** Defines appropriateness level of the reply suggestion for the message. The value range is [0 - 1] or null */
421
+ relevancy_score?: number | null;
422
+ }
423
+ export declare type ChatType = "operator" | "visitor" | "external" | "group" | "task";
424
+ export interface Chat {
425
+ /** Unique identifier of the chat */
426
+ id: ChatUid;
427
+ /**
428
+ * Defines the chat type. Chats with type operator are chat sessions between only users.
429
+ * Chats with type visitor are chat sessions that has a visitor membership. Chats with type external are chat
430
+ * sessions that are from external source (e.g. some integration). These chat’s do not close automatically
431
+ */
432
+ chat_type: ChatType;
433
+ /** Date when the chat was created */
434
+ created_at: string;
435
+ /** Date when the chat was changed for the last time */
436
+ updated_at: string;
437
+ /** Date when the chat conversation ended */
438
+ ended_at: string | null;
439
+ /** Date when the chat became waiting */
440
+ waiting_started_at: string;
441
+ /** Unique identifier of the room in which the chat occurred */
442
+ room_id: RoomUid;
443
+ /** Unique identifier of the organization which owns the room in which the chat occurred */
444
+ room_organization_id: OrganizationUid;
445
+ /** Name of the room in which the chat occurred */
446
+ room_name: string;
447
+ /** Number of tags associated with the chat */
448
+ tag_count: number;
449
+ /** Number of messages in the chat at the moment */
450
+ message_count: number;
451
+ /** Number of messages sent by operators in the chat */
452
+ user_message_count: number;
453
+ /** Number of messages sent by visitors in the chat */
454
+ visitor_message_count: number;
455
+ /** Defines whether there are any messages in chat */
456
+ has_messages: boolean;
457
+ /** Defines whether there are any user messages in chat */
458
+ has_user_messages: boolean;
459
+ /** Defines whether there are any visitor messages in chat */
460
+ has_visitor_messages: boolean;
461
+ /** Number of people (visitors and users) currently participating and present at the chat */
462
+ present_participant_count: number;
463
+ /** Number of users currently participating and present at the chat */
464
+ present_user_participant_count: number;
465
+ /** Number of visitors currently participating and present at the chat */
466
+ present_visitor_participant_count: number;
467
+ /** Number of people (visitors and users) attended or sent messages to the chat */
468
+ member_count: number;
469
+ /** Number of users sent at least one message to the chat */
470
+ user_member_count: number;
471
+ /** Number of visitors attended the chat */
472
+ visitor_member_count: number;
473
+ /** Defines whether the chat is marked as private for its operators */
474
+ is_private: boolean;
475
+ /** Defines whether the chat is an actual conversation */
476
+ is_real_conversation: boolean;
477
+ /** Defines whether the chat started with an automatic autosuggestion message */
478
+ is_autosuggested: boolean;
479
+ /** Defines whether the chats is new and was started by a visitor and response by a user is required */
480
+ is_waiting: boolean;
481
+ /** Defines whether the chat is waiting and the chat has no present user members */
482
+ is_pending: boolean;
483
+ /** Defines whether the chat has ended. Once ended the chat is locked and messages and members can't be altered */
484
+ is_ended: boolean;
485
+ /** Defines whether the messages of the chat are stored encrypted */
486
+ is_encrypted: boolean;
487
+ /**
488
+ * Encrypted symmetric key (AES) with which all the chat messages in the chat are encrypted.
489
+ * This attribute is available only if "is_encrypted" is true
490
+ */
491
+ encrypted_symmetric_key: string | null;
492
+ /** Full URL of the page that the visitor was on when they received an autosuggest */
493
+ autosuggest_url: string | null;
494
+ /** Title of the page that the visitor was on when they received an autosuggest */
495
+ autosuggest_url_title: string | null;
496
+ /** Full URL of the page that the visitor was on when they sent their first message to te chat */
497
+ first_visitor_message_url: string | null;
498
+ /** Title of the page that the visitor was on when they sent their first message */
499
+ first_visitor_message_url_title: string | null;
500
+ /**
501
+ * @deprecated
502
+ */
503
+ /** Legacy Giosg signed encoded unique string for the chat. Deprecated*/
504
+ token: string;
505
+ /**
506
+ * @deprecated
507
+ */
508
+ /** Legacy conversation state of the chat. Deprecated */
509
+ legacy_conversation_state: string;
510
+ /**
511
+ * @deprecated
512
+ */
513
+ /** Legacy ID of the chat’s room. Deprecated use "room_id" instead */
514
+ legacy_room_id: RoomLegacyId;
515
+ /** Number of seconds the visitor had to wait for an answer to the first sent message */
516
+ visitor_wait_time: number | null;
517
+ /** Duration of the chat in seconds. This value is null until the chat has ended */
518
+ duration: number | null;
519
+ /**
520
+ * Number of seconds of the chat duration was considered to be active time. This is calculated so
521
+ * that after each message chat is assumed to be active for 60 seconds and idle after that if no new messages
522
+ * are received. This value is null until the chat has ended
523
+ */
524
+ active_duration: number | null;
525
+ }
526
+ export interface ChatPayload {
527
+ /** Defines whether the chats is new and was started by a visitor and response by a user is required */
528
+ is_waiting?: boolean;
529
+ /** Defines whether the chat has ended. Once ended the chat is locked and messages and members can't be altered */
530
+ is_ended?: boolean;
531
+ }
532
+ export interface ChatSessionTag {
533
+ /** Name of the tag */
534
+ name: string;
535
+ /** Sha1 hash of the tag. This is the only information that the visitor and goals generated have about the tag */
536
+ hashed_name: string;
537
+ /** Date when the chat was tagged with this tag */
538
+ created_at: string;
539
+ }
540
+ export interface ChatSessionTagPayload {
541
+ /** Name of the tag */
542
+ name: string;
543
+ }
544
+ interface DecryptedChatMessageCommon {
545
+ /** Unique identifier of the message */
546
+ id: ChatMessageUid;
547
+ /** Unique identifier of the chat */
548
+ chat_id: ChatUid;
549
+ /** Unique identifier of the room in which the chat occurred */
550
+ room_id: RoomUid;
551
+ /** Date when the message was sent */
552
+ created_at: string;
553
+ /** Display name of the sender as the visitor would see it */
554
+ sender_public_name: string;
555
+ /** Display name of the sender as an operator would see it */
556
+ sender_name: string;
557
+ /** Avatar image of the sender */
558
+ sender_avatar: NestedAvatar | null;
559
+ /**
560
+ * Content text of the message. The maximum length is 2000 characters.
561
+ * This will always be the decrypted if the decryption key is still being stored at the server
562
+ */
563
+ message: string | null;
564
+ /**
565
+ * Whether or not the message is stored encrypted. When true, the "encrypted_message" attribute contains
566
+ * the encrypted ciphertext of the message
567
+ */
568
+ is_encrypted: boolean;
569
+ /**
570
+ * The encrypted ciphertext of the message, if encryption is used for the chat.
571
+ * This attribute is only present if "is_encrypted" is true
572
+ */
573
+ encrypted_message?: string | null;
574
+ /**
575
+ * Date when the message’s sensitive data was purged. This means that the message and
576
+ * visitor’s "sender_name" and "sender_public_name" are set as null. It is null if the data was not purged
577
+ */
578
+ sensitive_data_purged_at: string | null;
579
+ /** Unique identifier of the chat reply suggestion that was selected as a basis for the message */
580
+ selected_reply_suggestion_id: ChatReplySuggestionUid | null;
581
+ /** Chat reply suggestion that was selected as a basis for the message */
582
+ selected_reply_suggestion: NestedChatReplySuggestion | null;
583
+ /**
584
+ * List of the chat message attachments for the chat message.
585
+ * No more than one if "attachment_template" is set to "interaction"
586
+ */
587
+ attachments: NestedChatMessageAttachment[] | null;
588
+ /** Type of the chat message attachment template */
589
+ attachment_template: "generic" | "interaction" | "external" | null;
590
+ /** Unique identifier of the message this message was a response to */
591
+ response_to_message_id: ChatMessageUid | null;
592
+ /** Unique identifier of the chosen attachment this was a response to */
593
+ response_to_attachment_id: ChatMessageAttachmentUid | null;
594
+ /** Chosen attachment this was a response to */
595
+ response_to_attachment: NestedChatMessageResponseAttachment | null;
596
+ /** Unique identifier of the chosen attachment action this was a response to */
597
+ response_to_action_id: ChatMessageAttachmentActionUid | null;
598
+ /** Chosen attachment action this was a response to */
599
+ response_to_action: NestedChatMessageAttachmentAction | null;
600
+ /** Response text of the attachment response. This field is required for interaction attachment response */
601
+ response_text: string | null;
602
+ /**
603
+ * Chosen attachment value of the response. If the chosen attachment was an action,
604
+ * then this is the value of the action. Otherwise this may be the attachment’s "title_link_url",
605
+ * "image_url", "image_link_url" or a link provided in text field
606
+ */
607
+ response_value: string | null;
608
+ }
609
+ interface DecryptedChatMessageUser extends DecryptedChatMessageCommon {
610
+ /** Defines the type of the sender. "user" by default */
611
+ sender_type: "user";
612
+ /** Unique identifier of the sender. Could be user, visitor or rule */
613
+ sender_id: UserUid;
614
+ }
615
+ interface DecryptedChatMessageVisitor extends DecryptedChatMessageCommon {
616
+ /** Defines the type of the sender. "user" by default */
617
+ sender_type: "visitor";
618
+ /** Unique identifier of the sender. Could be user, visitor or rule */
619
+ sender_id: VisitorCid;
620
+ }
621
+ interface DecryptedChatMessageRule extends DecryptedChatMessageCommon {
622
+ /** Defines the type of the sender. "user" by default */
623
+ sender_type: "rule";
624
+ /** Unique identifier of the sender. Could be user, visitor or rule */
625
+ sender_id: RuleUid;
626
+ }
627
+ interface DecryptedChatStatusMessageUser extends DecryptedChatMessageUser {
628
+ /** Defines the type of the message. "msg" by default */
629
+ type: ChatStatusMessageType;
630
+ }
631
+ interface DecryptedChatStatusMessageVisitor extends DecryptedChatMessageVisitor {
632
+ /** Defines the type of the message. "msg" by default */
633
+ type: ChatStatusMessageType;
634
+ }
635
+ interface DecryptedChatStatusMessageRule extends DecryptedChatMessageRule {
636
+ /** Defines the type of the message. "msg" by default */
637
+ type: ChatStatusMessageType;
638
+ }
639
+ interface DecryptedChatDataMessageUser extends DecryptedChatMessageUser {
640
+ /** Defines the type of the message. "msg" by default */
641
+ type: ChatDataMessageType;
642
+ }
643
+ interface DecryptedChatDataMessageVisitor extends DecryptedChatMessageVisitor {
644
+ /** Defines the type of the message. "msg" by default */
645
+ type: ChatDataMessageType;
646
+ }
647
+ interface DecryptedChatDataMessageRule extends DecryptedChatMessageRule {
648
+ /** Defines the type of the message. "msg" by default */
649
+ type: ChatDataMessageType;
650
+ }
651
+ export declare type DecryptedChatDataMessage = DecryptedChatDataMessageUser | DecryptedChatDataMessageVisitor | DecryptedChatDataMessageRule;
652
+ export declare type DecryptedChatStatusMessage = DecryptedChatStatusMessageUser | DecryptedChatStatusMessageVisitor | DecryptedChatStatusMessageRule;
653
+ export declare type DecryptedChatMessage = DecryptedChatDataMessage | DecryptedChatStatusMessage;
654
+ export interface DecryptedChatMessagePayload {
655
+ /**
656
+ * Content text of the message. The maximum length is 2000 characters.
657
+ * This will always be the decrypted if the decryption key is still being stored at the server
658
+ */
659
+ message: string | null;
660
+ /** Unique identifier of the chat reply suggestion that was selected as a basis for the message */
661
+ selected_reply_suggestion_id?: ChatReplySuggestionUid | null;
662
+ /**
663
+ * List of the chat message attachments for the chat message.
664
+ * No more than one if "attachment_template" is set to "interaction"
665
+ */
666
+ attachments?: NestedChatMessageAttachment[] | null;
667
+ /** Type of the chat message attachment template */
668
+ attachment_template?: "generic" | "interaction" | "external";
669
+ }
670
+ export interface NestedChatMessageAttachmentAction {
671
+ /** Unique identifier of the action */
672
+ id: ChatMessageAttachmentActionUid;
673
+ /** Text of the action. This text will be shown inside the button when rendered to the user interface */
674
+ text: string;
675
+ /** Type of this action */
676
+ type: "button" | "link_button";
677
+ /** Target URL of the link_button */
678
+ link_target?: "_blank" | "_parent";
679
+ /** Value for this action. For link_button should be an url or anchor */
680
+ value: string;
681
+ /** Style of the action. This defines color of the button. If omitted, defaults to secondary */
682
+ style: ActionStyle;
683
+ /** Defines whether the actions are disabled after selection */
684
+ is_disabled_on_selection: boolean;
685
+ /** Defines whether the actions are disabled after visitor sends a new message to chat conversation */
686
+ is_disabled_on_visitor_message: boolean;
687
+ }
688
+ export interface NestedChatMessageAttachmentActionPayload {
689
+ /** Text of the action. This text will be shown inside the button when rendered to the user interface */
690
+ text: string;
691
+ /** Type of this action */
692
+ type: "button" | "link_button";
693
+ /** Target URL of the link_button */
694
+ link_target?: "_blank" | "_parent";
695
+ /** Value for this action. For link_button should be an url or anchor */
696
+ value: string;
697
+ /** Style of the action. This defines color of the button. If omitted, defaults to secondary */
698
+ style?: ActionStyle;
699
+ /** Defines whether the actions are disabled after selection */
700
+ is_disabled_on_selection: boolean;
701
+ /** Defines whether the actions are disabled after visitor sends a new message to chat conversation */
702
+ is_disabled_on_visitor_message: boolean;
703
+ }
704
+ export interface NestedChatMessageAttachment {
705
+ /** Unique identifier of the attachment */
706
+ id: ChatMessageAttachmentUid;
707
+ /** Title of the attachment */
708
+ title: string;
709
+ /** URL of the title. If provided, then title will show as clickable link which will open in the given URL */
710
+ title_link_url: string | null;
711
+ /** Text part of the attachment. This may serve as description. This can also be a Markdown */
712
+ text: string;
713
+ /** URL of the image */
714
+ image_url: string | null;
715
+ /** URL of the image link. If provided, then the image will be shown as clickable image which will open in the given URL */
716
+ image_link_url: string | null;
717
+ /** Defines whether the link is opened in a new tab or redirects current tab to a new URL */
718
+ link_target: "_blank" | "_parent";
719
+ /** List of possible actions for this attachment */
720
+ actions: NestedChatMessageAttachmentAction[];
721
+ /** URL of an external page to attach. If provided, then the page will be sent to chat conversation in an iframe*/
722
+ attachment_url: string | null;
723
+ /** Unique identifier of interaction to attach. If provided, then the interaction will be attached to chat conversation */
724
+ interaction_id: InteractionUid | null;
725
+ /** Free form JSON to be used as parameters for interaction attachment */
726
+ parameters: {
727
+ [key: string]: any;
728
+ };
729
+ }
730
+ export interface NestedChatMessageAttachmentPayload {
731
+ /** Title of the attachment */
732
+ title?: string;
733
+ /** URL of the title. If provided, then title will show as clickable link which will open in the given URL */
734
+ title_link_url?: string | null;
735
+ /** Text part of the attachment. This may serve as description. This can also be a Markdown */
736
+ text?: string;
737
+ /** URL of the image */
738
+ image_url?: string | null;
739
+ /** URL of the image link. If provided, then the image will be shown as clickable image which will open in the given URL */
740
+ image_link_url?: string | null;
741
+ /** Defines whether the link is opened in a new tab or redirects current tab to a new URL */
742
+ link_target?: "_blank" | "_parent";
743
+ /** List of possible actions for this attachment */
744
+ actions?: NestedChatMessageAttachmentAction[];
745
+ /** URL of an external page to attach. If provided, then the page will be sent to chat conversation in an iframe*/
746
+ attachment_url?: string | null;
747
+ /** Unique identifier of interaction to attach. If provided, then the interaction will be attached to chat conversation */
748
+ interaction_id?: InteractionUid | null;
749
+ /** Free form JSON to be used as parameters for interaction attachment */
750
+ parameters?: {
751
+ [key: string]: any;
752
+ };
753
+ }
754
+ export interface NestedChatMessageResponseAttachment {
755
+ /** Unique identifier of the attachment */
756
+ id: ChatMessageAttachmentUid;
757
+ /** Title of the attachment */
758
+ title: string;
759
+ /** URL of the title. If provided, then title will show as clickable link which will open in the given URL */
760
+ title_link_url: string | null;
761
+ /** Text part of the attachment. This may serve as description. This can also be a Markdown */
762
+ text: string;
763
+ /** URL of the image */
764
+ image_url: string | null;
765
+ /** URL of the image link. If provided, then the image will be shown as clickable image which will open in the given URL */
766
+ image_link_url: string | null;
767
+ /** Defines whether the link is opened in a new tab or redirects current tab to a new URL */
768
+ link_target: "_blank" | "_parent";
769
+ /** Unique identifier of interaction to attach. If provided, then the interaction will be attached to chat conversation */
770
+ interaction_id: InteractionUid | null;
771
+ /** Free form JSON to be used as parameters for interaction attachment */
772
+ parameters: {
773
+ [key: string]: any;
774
+ };
775
+ }
776
+ export interface NestedChatMessageResponseAttachmentPayload {
777
+ /** Title of the attachment */
778
+ title?: string;
779
+ /** URL of the title. If provided, then title will show as clickable link which will open in the given URL */
780
+ title_link_url?: string | null;
781
+ /** Text part of the attachment. This may serve as description. This can also be a Markdown */
782
+ text?: string;
783
+ /** URL of the image */
784
+ image_url?: string | null;
785
+ /** URL of the image link. If provided, then the image will be shown as clickable image which will open in the given URL */
786
+ image_link_url?: string | null;
787
+ /** Defines whether the link is opened in a new tab or redirects current tab to a new URL */
788
+ link_target?: "_blank" | "_parent";
789
+ /** Unique identifier of interaction to attach. If provided, then the interaction will be attached to chat conversation */
790
+ interaction_id?: InteractionUid | null;
791
+ /** Free form JSON to be used as parameters for interaction attachment */
792
+ parameters?: {
793
+ [key: string]: any;
794
+ };
795
+ }
796
+ export interface NestedChatReplySuggestion {
797
+ /** Unique identifier of the reply suggestion */
798
+ id: ChatReplySuggestionUid;
799
+ /** Message of the reply suggestion */
800
+ suggestion: string;
801
+ /** Defines appropriateness level of the reply suggestion for the message. The value range is [0 - 1] or null */
802
+ relevancy_score: number | null;
803
+ /** Unique identifier of the chat message which the reply suggestion is tied to */
804
+ message_id: ChatMessageUid;
805
+ }
806
+ interface OrganizationChatMembershipCommon {
807
+ /**
808
+ * The name of the user/visitor as it would be displayed for the operator.
809
+ * For users this is the actual name. For visitors this is any custom name, or null
810
+ */
811
+ member_name: string | null;
812
+ /**
813
+ * The name of the user/visitor as it would be displayed for the visitor.
814
+ * This is user’s alias if they have one, otherwise it is their real name.
815
+ * For visitors, this is any custom username or null
816
+ */
817
+ member_public_name: string | null;
818
+ /** Avatar image of the user/visitor */
819
+ member_avatar: NestedAvatar | null;
820
+ /** Unique identifier of the room where the chat takes place */
821
+ room_id: RoomUid;
822
+ /** Unique identifier of the chat */
823
+ chat_id: ChatUid;
824
+ /** Date when the user/visitor was added as a chat member */
825
+ created_at: string;
826
+ /** Date when the chat membership was changed for the last time */
827
+ updated_at: string;
828
+ /**
829
+ * Defines whether the user/visitor has the chat “open”. In practice this reflects the state of the chat window.
830
+ * When the user/visitor closes the chat window, it is supposed that he is no more participating the chat
831
+ */
832
+ is_participating: boolean;
833
+ /** Defines whether the user/visitor is currently present */
834
+ is_present: boolean;
835
+ /** Defines whether the user/visitor is typing. "typed" status is changed to "idle" after 60 seconds */
836
+ composing_status: "idle" | "typing" | "typed";
837
+ /** Number of messages the user/visitor has sent to the chat */
838
+ message_count: number;
839
+ /** Unique identifier of the room’s organization where the chat takes place */
840
+ room_organization_id: OrganizationUid;
841
+ /** Unique identifier of the member’s organization */
842
+ member_organization_id: OrganizationUid;
843
+ /** @deprecated Legacy Unique identifier of the user/visitor being present at the chat. Deprecated, use "member_id" whenever possible instead */
844
+ legacy_member_id: UserLegacyId;
845
+ }
846
+ interface OrganizationChatMembershipUser extends OrganizationChatMembershipCommon {
847
+ /** Unique identifier of the user/visitor being present at the chat */
848
+ member_id: UserUid;
849
+ /** Defines whether the user/visitor is present at the chat */
850
+ member_type: "user";
851
+ }
852
+ interface OrganizationChatMembershipVisitor extends OrganizationChatMembershipCommon {
853
+ /** Unique identifier of the user/visitor being present at the chat */
854
+ member_id: VisitorCid;
855
+ /** Defines whether the user/visitor is present at the chat */
856
+ member_type: "visitor";
857
+ }
858
+ export declare type OrganizationChatMembership = OrganizationChatMembershipUser | OrganizationChatMembershipVisitor;
859
+ export interface OrganizationChatMembershipPayload {
860
+ /** Unique identifier of the user/visitor being present at the chat */
861
+ member_id: UserUid | VisitorCid;
862
+ /**
863
+ * Defines whether the user/visitor has the chat “open”. In practice this reflects the state of the chat window.
864
+ * When the user/visitor closes the chat window, it is supposed that he is no more participating the chat
865
+ */
866
+ is_participating: boolean;
867
+ /** Defines whether the user/visitor is typing. "typed" status is changed to "idle" after 60 seconds */
868
+ composing_status: "idle" | "typing" | "typed";
869
+ }
870
+ export interface RoomChatTag {
871
+ /** Name of the tag */
872
+ name: string;
873
+ /** Sha1 hash of the tag. This is the only information that the visitor and goals generated have about the tag */
874
+ hashed_name: string;
875
+ /** Date when the chat was tagged with this tag */
876
+ created_at: string;
877
+ /** Unique identifier of the room to which this tag belongs to */
878
+ room_id: RoomUid;
879
+ }
880
+ export interface RoomChatTagPayload {
881
+ /** Name of the tag */
882
+ name: string;
883
+ }
884
+ /**
885
+ * Beta version
886
+ * Very limited subset of ChatMessage
887
+ * */
888
+ export interface NestedChatMessage {
889
+ /** Unique identifier of the message */
890
+ id: ChatMessageUid;
891
+ /** Defines the type of the message. "msg" by default */
892
+ type: ChatMessageType;
893
+ /** Date when the message was sent */
894
+ created_at: string;
895
+ /** TODO: Connect this type to sender_type */
896
+ sender_id: UserUid | RuleUid | VisitorCid;
897
+ /** Defines the type of the sender_id */
898
+ sender_type: "user" | "rule" | "visitor";
899
+ /** Display name of the sender as an operator would see it */
900
+ sender_name: string;
901
+ /** Display name of the sender as the visitor would see it */
902
+ sender_public_name: string;
903
+ /** Avatar image of the sender */
904
+ sender_avatar: NestedAvatar | null;
905
+ /**
906
+ * Content text of the message. The maximum length is 2000 characters.
907
+ * This will always be the decrypted if the decryption key is still being stored at the server
908
+ */
909
+ message: string | null;
910
+ /**
911
+ * Whether or not the message is stored encrypted. When true, the encrypted_message attribute contains
912
+ * the encrypted ciphertext of the message
913
+ */
914
+ is_encrypted: boolean;
915
+ /**
916
+ * The encrypted ciphertext of the message, if encryption is used for the chat.
917
+ * This attribute is only present if "is_encrypted" is true
918
+ */
919
+ encrypted_message?: string | null;
920
+ /**
921
+ * Date when the message’s sensitive data was purged. This means that the message and
922
+ * visitor’s "sender_name" and "sender_public_name" are set as null. It is null if the data was not purged
923
+ */
924
+ sensitive_data_purged_at: string | null;
925
+ /** Type of the chat message attachment template */
926
+ attachment_template: "generic" | "interaction" | "external" | null;
927
+ }
928
+ /**
929
+ * Beta version
930
+ * Mostly consists of Chat interface with some additional field
931
+ * It intentionally does not extends Chat interface because we might want to remove
932
+ * some fields from this interface
933
+ */
934
+ export interface BarChat {
935
+ /** Unique identifier of the chat */
936
+ id: ChatUid;
937
+ /**
938
+ * Defines the chat type. Chats with type operator are chat sessions between only users.
939
+ * Chats with type visitor are chat sessions that has a visitor membership. Chats with type external are chat
940
+ * sessions that are from external source (e.g. some integration). These chat’s do not close automatically
941
+ */
942
+ chat_type: ChatType;
943
+ /** Date when the chat was created */
944
+ created_at: string;
945
+ /** Date when the chat was changed for the last time */
946
+ updated_at: string;
947
+ /** Date when the chat conversation ended */
948
+ ended_at: string | null;
949
+ /** Date when the chat became waiting */
950
+ waiting_started_at: string;
951
+ /** Unique identifier of the room in which the chat occurred */
952
+ room_id: RoomUid;
953
+ /** Unique identifier of the organization which owns the room in which the chat occurred */
954
+ room_organization_id: OrganizationUid;
955
+ /** Name of the room in which the chat occurred */
956
+ room_name: string;
957
+ /** Number of tags associated with the chat */
958
+ tag_count: number;
959
+ /** Number of messages in the chat at the moment */
960
+ message_count: number;
961
+ /** Number of messages sent by operators in the chat */
962
+ user_message_count: number;
963
+ /** Number of messages sent by visitors in the chat */
964
+ visitor_message_count: number;
965
+ /** Defines whether there are any messages in chat */
966
+ has_messages: boolean;
967
+ /** Defines whether there are any user messages in chat */
968
+ has_user_messages: boolean;
969
+ /** Defines whether there are any visitor messages in chat */
970
+ has_visitor_messages: boolean;
971
+ /** Number of people (visitors and users) currently participating and present at the chat */
972
+ present_participant_count: number;
973
+ /** Number of users currently participating and present at the chat */
974
+ present_user_participant_count: number;
975
+ /** Number of visitors currently participating and present at the chat */
976
+ present_visitor_participant_count: number;
977
+ /** Number of people (visitors and users) attended or sent messages to the chat */
978
+ member_count: number;
979
+ /** Number of users sent at least one message to the chat */
980
+ user_member_count: number;
981
+ /** Number of visitors attended the chat */
982
+ visitor_member_count: number;
983
+ /** Defines whether the chat is marked as private for its operators */
984
+ is_private: boolean;
985
+ /** Defines whether the chat is an actual conversation */
986
+ is_real_conversation: boolean;
987
+ /** Defines whether the chat started with an automatic autosuggestion message */
988
+ is_autosuggested: boolean;
989
+ /** Defines whether the chats is new and was started by a visitor and response by a user is required */
990
+ is_waiting: boolean;
991
+ /** Defines whether the chat is waiting and the chat has no present user members */
992
+ is_pending: boolean;
993
+ /** Defines whether the chat has ended. Once ended the chat is locked and messages and members can't be altered */
994
+ is_ended: boolean;
995
+ /** Defines whether the messages of the chat are stored encrypted */
996
+ is_encrypted: boolean;
997
+ /** True if the message contents are available and False if they are encrypted and the encryption key is not available anymore */
998
+ is_available: boolean;
999
+ /** True if chat session was removed by manual request or by data retention policy */
1000
+ is_removed: boolean;
1001
+ /**
1002
+ * Encrypted symmetric key (AES) with which all the chat messages in the chat are encrypted.
1003
+ * This attribute is available only if "is_encrypted" is true
1004
+ */
1005
+ encrypted_symmetric_key: string | null;
1006
+ /** Full URL of the page that the visitor was on when they received an autosuggest */
1007
+ autosuggest_url: string | null;
1008
+ /** Title of the page that the visitor was on when they received an autosuggest */
1009
+ autosuggest_url_title: string | null;
1010
+ /** Full URL of the page that the visitor was on when they sent their first message to te chat */
1011
+ first_visitor_message_url: string | null;
1012
+ /** Title of the page that the visitor was on when they sent their first message */
1013
+ first_visitor_message_url_title: string | null;
1014
+ /** Number of seconds the visitor had to wait for an answer to the first sent message */
1015
+ visitor_wait_time: number | null;
1016
+ /** Duration of the chat in seconds. This value is null until the chat has ended */
1017
+ duration: number | null;
1018
+ /**
1019
+ * Number of seconds of the chat duration was considered to be active time. This is calculated so
1020
+ * that after each message chat is assumed to be active for 60 seconds and idle after that if no new messages
1021
+ * are received. This value is null until the chat has ended
1022
+ */
1023
+ active_duration: number | null;
1024
+ /** Chat session latest message if exists */
1025
+ chat_session_latest_message: ChatMessage | null;
1026
+ /**
1027
+ * Chat name
1028
+ * Can be visitor name or chat conversation name.
1029
+ *
1030
+ * Visitor name is set by visitor variables.
1031
+ * Further information is here https://developers.giosg.com/javascript_api.html#submit-visitor-variables
1032
+ */
1033
+ name: string | null;
1034
+ /**
1035
+ * Containts URL of visitor avatar.
1036
+ *
1037
+ * Visitor avatar url is set by visitor variables.
1038
+ * Further information is here https://developers.giosg.com/javascript_api.html#submit-visitor-variables
1039
+ */
1040
+ visitor_avatar: string | null;
1041
+ /**
1042
+ * Contains VisitorCid if chat type is "visitor"
1043
+ */
1044
+ visitor_id: VisitorCid | null;
1045
+ /** Team ID if this chat is team chat channel type, null otherwise */
1046
+ team_id: TeamUid | null;
1047
+ }
1048
+ /** TODO: Add jsdocs and check nullability of fields */
1049
+ export interface ChatAssignment {
1050
+ id: ChatAssignmentUid;
1051
+ is_accepted: boolean;
1052
+ is_expired: boolean;
1053
+ invited_by_user_id: UserUid;
1054
+ invited_by_user: NestedUser;
1055
+ chat_id: ChatSessionUid;
1056
+ room_id: RoomUid;
1057
+ invited_user_id: UserUid | null;
1058
+ invited_team_id: TeamUid | null;
1059
+ invited_organization_id: OrganizationUid | null;
1060
+ invitee_name: string;
1061
+ accepted_by_user_id: UserUid | null;
1062
+ accepted_by_user: NestedUser | null;
1063
+ user_member_count: number;
1064
+ visitor_member_count: number;
1065
+ created_at: string;
1066
+ updated_at: string;
1067
+ accepted_at: string | null;
1068
+ expired_at: string | null;
1069
+ }
1070
+ export {};
1071
+ //# sourceMappingURL=chat.d.ts.map