@seamly/web-ui 20.7.0 → 20.8.0-alpha.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 (222) hide show
  1. package/CHANGELOG.md +212 -16
  2. package/build/dist/lib/hooks.js +1 -1
  3. package/build/dist/lib/hooks.min.js +1 -1
  4. package/build/dist/lib/index.debug.js +939 -784
  5. package/build/dist/lib/index.debug.min.js +1 -1
  6. package/build/dist/lib/index.debug.min.js.LICENSE.txt +186 -130
  7. package/build/dist/lib/index.js +24806 -19703
  8. package/build/dist/lib/index.min.js +1 -1
  9. package/build/dist/lib/index.min.js.LICENSE.txt +38 -4
  10. package/build/dist/lib/standalone.js +32726 -26838
  11. package/build/dist/lib/standalone.min.js +1 -1
  12. package/build/dist/lib/standalone.min.js.LICENSE.txt +39 -0
  13. package/build/dist/lib/storage.js +2 -2
  14. package/build/dist/lib/storage.min.js +1 -1
  15. package/build/dist/lib/style-guide.js +8649 -7863
  16. package/build/dist/lib/style-guide.min.js +2 -1
  17. package/build/dist/lib/style-guide.min.js.LICENSE.txt +38 -0
  18. package/build/dist/lib/utils.js +1 -2
  19. package/build/dist/lib/utils.min.js +1 -1
  20. package/package.json +19 -9
  21. package/src/icons/avatar_agent-32.svg +7 -0
  22. package/src/icons/avatar_bot-32.svg +6 -1
  23. package/src/javascripts/api/index.js +1 -1
  24. package/src/javascripts/{config.js → config.ts} +3 -1
  25. package/src/javascripts/config.types.ts +95 -0
  26. package/src/javascripts/domains/app/actions.ts +83 -0
  27. package/src/javascripts/domains/app/app.types.ts +3 -0
  28. package/src/javascripts/domains/app/hooks.js +3 -5
  29. package/src/javascripts/domains/app/selectors.ts +6 -0
  30. package/src/javascripts/domains/app/slice.ts +30 -0
  31. package/src/javascripts/domains/config/actions.ts +45 -0
  32. package/src/javascripts/domains/config/hooks.ts +19 -0
  33. package/src/javascripts/domains/config/selectors.ts +24 -0
  34. package/src/javascripts/domains/config/slice.ts +111 -0
  35. package/src/javascripts/domains/errors/index.js +13 -9
  36. package/src/javascripts/domains/forms/context.ts +14 -0
  37. package/src/javascripts/domains/forms/forms.types.ts +24 -0
  38. package/src/javascripts/domains/forms/{hooks.js → hooks.ts} +23 -26
  39. package/src/javascripts/domains/forms/{provider.js → provider.tsx} +20 -14
  40. package/src/javascripts/domains/forms/{selectors.js → selectors.ts} +7 -8
  41. package/src/javascripts/domains/forms/slice.ts +84 -0
  42. package/src/javascripts/domains/forms/utils.ts +15 -0
  43. package/src/javascripts/domains/i18n/actions.ts +24 -0
  44. package/src/javascripts/domains/i18n/{hooks.js → hooks.ts} +2 -2
  45. package/src/javascripts/domains/i18n/i18n.types.ts +6 -0
  46. package/src/javascripts/domains/i18n/selectors.ts +16 -0
  47. package/src/javascripts/domains/i18n/{reducer.js → slice.ts} +43 -37
  48. package/src/javascripts/domains/interrupt/{hooks.js → hooks.ts} +2 -2
  49. package/src/javascripts/domains/interrupt/{middleware.js → middleware.ts} +11 -8
  50. package/src/javascripts/domains/interrupt/selectors.ts +6 -0
  51. package/src/javascripts/domains/interrupt/slice.ts +40 -0
  52. package/src/javascripts/domains/options/middleware.js +9 -6
  53. package/src/javascripts/domains/redux/redux.types.ts +11 -0
  54. package/src/javascripts/domains/store/index.ts +53 -0
  55. package/src/javascripts/domains/store/slice.ts +639 -0
  56. package/src/javascripts/domains/store/store.types.ts +135 -0
  57. package/src/javascripts/domains/translations/components/chat-status.js +2 -2
  58. package/src/javascripts/domains/translations/components/options-button.js +1 -1
  59. package/src/javascripts/domains/translations/components/options-dialog/form.js +5 -5
  60. package/src/javascripts/domains/translations/components/options-dialog/index.js +2 -2
  61. package/src/javascripts/domains/translations/{hooks.js → hooks.ts} +28 -23
  62. package/src/javascripts/domains/translations/middleware.js +29 -27
  63. package/src/javascripts/domains/translations/selectors.js +4 -9
  64. package/src/javascripts/domains/translations/slice.ts +67 -0
  65. package/src/javascripts/domains/translations/translations.types.ts +12 -0
  66. package/src/javascripts/domains/visibility/{actions.js → actions.ts} +25 -19
  67. package/src/javascripts/domains/visibility/{hooks.js → hooks.ts} +13 -10
  68. package/src/javascripts/domains/visibility/{selectors.js → selectors.ts} +3 -6
  69. package/src/javascripts/domains/visibility/slice.ts +38 -0
  70. package/src/javascripts/domains/visibility/utils.js +0 -9
  71. package/src/javascripts/domains/visibility/visibility.types.ts +6 -0
  72. package/src/javascripts/index.ts +92 -0
  73. package/src/javascripts/lib/engine/index.js +15 -11
  74. package/src/javascripts/lib/external-api/initialize-api.js +1 -1
  75. package/src/javascripts/lib/id.js +5 -8
  76. package/src/javascripts/lib/mutex.js +3 -1
  77. package/src/javascripts/lib/store/providers/cookie-storage.js +1 -1
  78. package/src/javascripts/lib/store/providers/session-storage.js +1 -1
  79. package/src/javascripts/package/hooks.js +2 -2
  80. package/src/javascripts/package/utils.js +0 -1
  81. package/src/javascripts/schema.ts +1455 -0
  82. package/src/javascripts/style-guide/components/app.js +4 -4
  83. package/src/javascripts/style-guide/components/static-core.js +87 -65
  84. package/src/javascripts/style-guide/components/view.js +4 -4
  85. package/src/javascripts/style-guide/state-helpers/index.js +5 -5
  86. package/src/javascripts/style-guide/states.js +6 -4
  87. package/src/javascripts/style-guide.ts +5 -0
  88. package/src/javascripts/ui/components/app-options/index.js +2 -4
  89. package/src/javascripts/ui/components/conversation/component-filter.js +1 -1
  90. package/src/javascripts/ui/components/conversation/conversation.js +5 -5
  91. package/src/javascripts/ui/components/conversation/event/card-message.js +1 -1
  92. package/src/javascripts/ui/components/conversation/event/carousel-component/components/controls.js +1 -1
  93. package/src/javascripts/ui/components/conversation/event/carousel-message/components/slide.js +1 -1
  94. package/src/javascripts/ui/components/conversation/event/carousel-message/index.js +1 -1
  95. package/src/javascripts/ui/components/conversation/event/choice-prompt.js +2 -2
  96. package/src/javascripts/ui/components/conversation/event/conversation-suggestions.js +11 -14
  97. package/src/javascripts/ui/components/conversation/event/cta.js +1 -1
  98. package/src/javascripts/ui/components/conversation/event/divider/variants/default.js +1 -1
  99. package/src/javascripts/ui/components/conversation/event/divider/variants/new-translation.js +5 -2
  100. package/src/javascripts/ui/components/conversation/event/event-participant.js +2 -2
  101. package/src/javascripts/ui/components/conversation/event/hooks/use-formatted-date.js +2 -2
  102. package/src/javascripts/ui/components/conversation/event/image-lightbox.js +1 -1
  103. package/src/javascripts/ui/components/conversation/event/image.js +5 -7
  104. package/src/javascripts/ui/components/conversation/event/participant.js +1 -1
  105. package/src/javascripts/ui/components/conversation/event/splash.js +3 -3
  106. package/src/javascripts/ui/components/conversation/event/text.js +1 -1
  107. package/src/javascripts/ui/components/conversation/event/translation.js +2 -2
  108. package/src/javascripts/ui/components/conversation/event/upload.js +2 -2
  109. package/src/javascripts/ui/components/conversation/event/video.js +1 -1
  110. package/src/javascripts/ui/components/conversation/message-container.js +4 -4
  111. package/src/javascripts/ui/components/core/seamly-api-context.js +1 -1
  112. package/src/javascripts/ui/components/core/seamly-core.js +15 -14
  113. package/src/javascripts/ui/components/core/seamly-event-subscriber.js +96 -91
  114. package/src/javascripts/ui/components/core/seamly-file-upload.js +20 -24
  115. package/src/javascripts/ui/components/core/seamly-initializer.js +1 -1
  116. package/src/javascripts/ui/components/core/seamly-instance-functions-loader.js +5 -4
  117. package/src/javascripts/ui/components/core/seamly-new-notifications.js +2 -2
  118. package/src/javascripts/ui/components/core/seamly-read-state.js +10 -17
  119. package/src/javascripts/ui/components/entry/deprecated-toggle-button.js +3 -3
  120. package/src/javascripts/ui/components/entry/entry-container.js +4 -6
  121. package/src/javascripts/ui/components/entry/text-entry/hooks.js +3 -3
  122. package/src/javascripts/ui/components/entry/text-entry/index.js +3 -2
  123. package/src/javascripts/ui/components/entry/text-entry/text-entry-form.js +6 -10
  124. package/src/javascripts/ui/components/entry/upload/file-upload-form.js +2 -2
  125. package/src/javascripts/ui/components/entry/upload/index.js +10 -9
  126. package/src/javascripts/ui/components/entry/upload-toggle.js +2 -2
  127. package/src/javascripts/ui/components/faq/faq.js +6 -6
  128. package/src/javascripts/ui/components/form-controls/file-input.js +1 -1
  129. package/src/javascripts/ui/components/form-controls/form.js +1 -1
  130. package/src/javascripts/ui/components/form-controls/input.js +1 -1
  131. package/src/javascripts/ui/components/form-controls/select.js +1 -1
  132. package/src/javascripts/ui/components/layout/agent-info.js +4 -4
  133. package/src/javascripts/ui/components/layout/chat-frame.js +3 -3
  134. package/src/javascripts/ui/components/layout/chat.js +11 -12
  135. package/src/javascripts/ui/components/layout/deprecated-app-frame.js +10 -9
  136. package/src/javascripts/ui/components/layout/header.js +1 -1
  137. package/src/javascripts/ui/components/layout/interrupt.js +23 -24
  138. package/src/javascripts/ui/components/layout/pre-chat-messages.js +11 -11
  139. package/src/javascripts/ui/components/layout/privacy-disclaimer.js +2 -2
  140. package/src/javascripts/ui/components/options/options-button.js +12 -10
  141. package/src/javascripts/ui/components/options/transcript/index.js +2 -2
  142. package/src/javascripts/ui/components/options/transcript/transcript-form.js +1 -1
  143. package/src/javascripts/ui/components/suggestions/index.js +9 -8
  144. package/src/javascripts/ui/components/view/deprecated-view.js +19 -16
  145. package/src/javascripts/ui/components/view/index.js +12 -12
  146. package/src/javascripts/ui/components/view/inline-view.js +2 -2
  147. package/src/javascripts/ui/components/view/window-view/collapse-button.js +3 -3
  148. package/src/javascripts/ui/components/view/window-view/index.js +13 -13
  149. package/src/javascripts/ui/components/view/window-view/window-open-button.js +13 -13
  150. package/src/javascripts/ui/components/warnings/idle-detach-warning.js +1 -1
  151. package/src/javascripts/ui/components/warnings/resume-conversation-prompt.js +1 -1
  152. package/src/javascripts/ui/components/widgets/lightbox.js +2 -2
  153. package/src/javascripts/ui/components/widgets/upload-progress.js +1 -1
  154. package/src/javascripts/ui/hooks/component-helper-hooks.js +1 -1
  155. package/src/javascripts/ui/hooks/file-upload-hooks.js +4 -6
  156. package/src/javascripts/ui/hooks/focus-helper-hooks.js +14 -12
  157. package/src/javascripts/ui/hooks/live-region-hooks.js +2 -0
  158. package/src/javascripts/ui/hooks/seamly-api-hooks.js +8 -3
  159. package/src/javascripts/ui/hooks/seamly-entry-hooks.js +28 -25
  160. package/src/javascripts/ui/hooks/seamly-hooks.js +25 -25
  161. package/src/javascripts/ui/hooks/seamly-option-hooks.js +17 -19
  162. package/src/javascripts/ui/hooks/seamly-state-hooks.js +14 -13
  163. package/src/javascripts/ui/hooks/use-seamly-chat.js +15 -25
  164. package/src/javascripts/ui/hooks/use-seamly-commands.js +46 -46
  165. package/src/javascripts/ui/hooks/use-seamly-idle-detach-countdown.js +22 -24
  166. package/src/javascripts/ui/hooks/use-seamly-resume-conversation-prompt.js +8 -9
  167. package/src/javascripts/ui/hooks/use-single-file-upload.js +4 -6
  168. package/src/javascripts/ui/hooks/utility-hooks.js +4 -4
  169. package/src/javascripts/ui/utils/form-utils.js +0 -145
  170. package/src/javascripts/ui/utils/general-utils.js +3 -4
  171. package/src/javascripts/ui/utils/seamly-utils.ts +73 -0
  172. package/webpack/config.common.js +16 -0
  173. package/webpack/config.dev.js +1 -0
  174. package/webpack/config.package.js +26 -5
  175. package/webpack/defaults.js +7 -2
  176. package/webpack/parts/babel-loader-browser-plugins.js +1 -0
  177. package/webpack/parts/dev-server.js +4 -3
  178. package/src/javascripts/domains/app/actions.js +0 -112
  179. package/src/javascripts/domains/app/index.js +0 -7
  180. package/src/javascripts/domains/app/reducer.js +0 -16
  181. package/src/javascripts/domains/app/selectors.js +0 -8
  182. package/src/javascripts/domains/app/utils.js +0 -4
  183. package/src/javascripts/domains/config/actions.js +0 -7
  184. package/src/javascripts/domains/config/hooks.js +0 -23
  185. package/src/javascripts/domains/config/index.js +0 -7
  186. package/src/javascripts/domains/config/reducer.js +0 -79
  187. package/src/javascripts/domains/config/selectors.js +0 -23
  188. package/src/javascripts/domains/config/utils.js +0 -4
  189. package/src/javascripts/domains/forms/actions.js +0 -21
  190. package/src/javascripts/domains/forms/context.js +0 -6
  191. package/src/javascripts/domains/forms/index.js +0 -8
  192. package/src/javascripts/domains/forms/reducer.js +0 -84
  193. package/src/javascripts/domains/forms/utils.js +0 -20
  194. package/src/javascripts/domains/i18n/actions.js +0 -20
  195. package/src/javascripts/domains/i18n/index.js +0 -7
  196. package/src/javascripts/domains/i18n/selectors.js +0 -15
  197. package/src/javascripts/domains/i18n/utils.js +0 -4
  198. package/src/javascripts/domains/interrupt/actions.js +0 -4
  199. package/src/javascripts/domains/interrupt/index.js +0 -9
  200. package/src/javascripts/domains/interrupt/reducer.js +0 -22
  201. package/src/javascripts/domains/interrupt/selectors.js +0 -6
  202. package/src/javascripts/domains/interrupt/utils.js +0 -4
  203. package/src/javascripts/domains/options/index.js +0 -1
  204. package/src/javascripts/domains/redux/context.js +0 -6
  205. package/src/javascripts/domains/redux/create-redux-store.js +0 -21
  206. package/src/javascripts/domains/redux/hooks.js +0 -80
  207. package/src/javascripts/domains/redux/index.js +0 -19
  208. package/src/javascripts/domains/redux/provider.js +0 -5
  209. package/src/javascripts/domains/redux/utils.js +0 -12
  210. package/src/javascripts/domains/store/index.js +0 -46
  211. package/src/javascripts/domains/store/state-reducer.js +0 -56
  212. package/src/javascripts/domains/translations/actions.js +0 -11
  213. package/src/javascripts/domains/translations/index.js +0 -10
  214. package/src/javascripts/domains/translations/reducer.js +0 -69
  215. package/src/javascripts/domains/translations/utils.js +0 -4
  216. package/src/javascripts/domains/visibility/index.js +0 -8
  217. package/src/javascripts/domains/visibility/reducer.js +0 -24
  218. package/src/javascripts/index.js +0 -153
  219. package/src/javascripts/lib/redux-helpers/index.js +0 -99
  220. package/src/javascripts/style-guide.js +0 -5
  221. package/src/javascripts/ui/hooks/use-seamly-dispatch.js +0 -3
  222. package/src/javascripts/ui/utils/seamly-utils.js +0 -832
@@ -0,0 +1,1455 @@
1
+ /**
2
+ * This file was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ */
5
+
6
+ export interface paths {
7
+ '/client/{apiKey}/configs': {
8
+ /** Get account settings and conversation defaults */
9
+ post: operations['getAccountConfig']
10
+ }
11
+ '/client/{apiKey}/translations/{version}/{locale}.json': {
12
+ get: operations['getAccountTranslations']
13
+ }
14
+ '/client/{apiKey}/conversations': {
15
+ /** Create a new conversation. The full URL should be obtained from the HAL links as returned by the configs endpoint. */
16
+ post: operations['createConversation']
17
+ }
18
+ '/client/{apiKey}/conversations/{conversationId}': {
19
+ /** Get conversation to be resumed. The full URL should be obtained from the HAL links as returned by the POST conversations endpoint. */
20
+ get: operations['getConversation']
21
+ }
22
+ '/client/{apiKey}/conversations/{conversationId}/history': {
23
+ /** Get message history of a conversation. The full URL should be obtained from the HAL links as returned by the POST conversations endpoint. Pass the conversation's access token (as obtained by the initial POST to create the conversation) as a Bearer token. */
24
+ get: operations['getConversationHistory']
25
+ }
26
+ '/client/{apiKey}/conversations/{conversationId}/uploads': {
27
+ /** Upload a file of a conversation. The full URL should be obtained from the HAL links as returned by the POST conversations endpoint. Pass the conversation's access token (as obtained by the initial POST to create the conversation) as a Bearer token. */
28
+ post: operations['createConversationUpload']
29
+ }
30
+ }
31
+
32
+ export interface components {
33
+ schemas: {
34
+ ConversationResponse: {
35
+ /** @description Information about the conversation. */
36
+ conversation?: {
37
+ /** @description Token required to fetch the history and to establish a websocket connection. */
38
+ accessToken?: string
39
+ /**
40
+ * @description Phoenix websocket channel topic
41
+ * @example conversations:e096b036-ac9c-4e8b-b42c-9e0bcd74a5fd
42
+ */
43
+ channelTopic?: string
44
+ translation?: components['schemas']['Translation']
45
+ /**
46
+ * @description The amount of unread messages.
47
+ * @example 2
48
+ */
49
+ unreadMessageCount?: number
50
+ /**
51
+ * @description Whether or not the user has already interacted with / responded to the conversation.
52
+ * @example true
53
+ */
54
+ userResponded?: boolean
55
+ }
56
+ _links?: {
57
+ conversation?: {
58
+ /**
59
+ * @description The endpoint retrieve the conversation later on to resume it
60
+ * @example /client/f38c06f4-283b-4011-8672-4923cbdc8f26/conversations/4eb31272-ed89-4d0d-92c1-bc258bd7ac9c?srv_id=3010109
61
+ */
62
+ href?: string
63
+ }
64
+ history?: {
65
+ /**
66
+ * @description The endpoint retrieve the conversation's history
67
+ * @example /client/f38c06f4-283b-4011-8672-4923cbdc8f26/conversations/4eb31272-ed89-4d0d-92c1-bc258bd7ac9c/history?srv_id=3010109
68
+ */
69
+ href?: string
70
+ }
71
+ self?: {
72
+ /**
73
+ * @description The endpoint retrieve the conversation later on to resume it
74
+ * @example /client/f38c06f4-283b-4011-8672-4923cbdc8f26/conversations/4eb31272-ed89-4d0d-92c1-bc258bd7ac9c?srv_id=3010109
75
+ */
76
+ href?: string
77
+ }
78
+ socket?: {
79
+ /**
80
+ * @description The endpoint of the conversation websocket
81
+ * @example /client/f38c06f4-283b-4011-8672-4923cbdc8f26/socket/websocket?srv_id=3010109
82
+ */
83
+ href?: string
84
+ }
85
+ uploads?: {
86
+ /**
87
+ * @description The endpoint to send uploaded files to
88
+ * @example /client/f38c06f4-283b-4011-8672-4923cbdc8f26/conversations/4eb31272-ed89-4d0d-92c1-bc258bd7ac9c/uploads?srv_id=3010109
89
+ */
90
+ href?: string
91
+ }
92
+ }
93
+ }
94
+ ConversationHistoryResponse: {
95
+ /** @description History information of a conversation. */
96
+ history?: {
97
+ /**
98
+ * @description Internal identifier of the current service session. Can be used to determine which messages from the history are from the current service, and, for example, might have the choose-again functionality available.
99
+ * @example c18c86f3-a31f-4a61-a4f3-f805b5b71883
100
+ */
101
+ activeServiceSessionId?: string
102
+ /** @description Settings of the current service. */
103
+ activeServiceSettings?: {
104
+ /** @description Settings related to the input field */
105
+ entry?: {
106
+ /**
107
+ * @description The default type of input field.
108
+ * @example text
109
+ * @enum {string}
110
+ */
111
+ default?: 'text' | 'postal_code' | 'upload'
112
+ /** @description Specific options of the various entry types */
113
+ options?: {
114
+ /** @description Settings of the text entry */
115
+ text?: {
116
+ /**
117
+ * @description Maximum number of characters the use may enter
118
+ * @example 100
119
+ */
120
+ limit?: number
121
+ }
122
+ /** @description Settings of the upload entry */
123
+ upload?: {
124
+ /**
125
+ * @description List of allowed mime types of any uploaded file
126
+ * @example [
127
+ * "application/msword",
128
+ * "application/pdf",
129
+ * "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
130
+ * "image/*",
131
+ * "text/*"
132
+ * ]
133
+ */
134
+ allowedMimeTypes?: string[]
135
+ /**
136
+ * @description Whether file uploads are possible. When true the client might for instance show a file upload button.
137
+ * @example true
138
+ */
139
+ enabled?: boolean
140
+ /**
141
+ * @description Maximum filesize in bytes
142
+ * @example 10485760
143
+ */
144
+ maxSize?: number
145
+ }
146
+ }
147
+ }
148
+ /** @description Exists for backward compatibility. Please ignore. */
149
+ uploads?: { [key: string]: unknown }
150
+ }
151
+ /**
152
+ * @description A list of all messages in the history of the conversation
153
+ * @example [
154
+ * [
155
+ * "message",
156
+ * {}
157
+ * ],
158
+ * [
159
+ * "message",
160
+ * {}
161
+ * ],
162
+ * [
163
+ * "participant",
164
+ * {}
165
+ * ]
166
+ * ]
167
+ */
168
+ messages?: (Partial<'info' | 'message' | 'participant'> &
169
+ Partial<components['schemas']['MessageInfo']> &
170
+ Partial<components['schemas']['MessageMessage']> &
171
+ Partial<components['schemas']['MessageParticipant']>)[][]
172
+ /** @description All participants that ever participated in the conversation. Only seamly-client-participant is specced, but all others will have their own entry by their own id. */
173
+ participants?: {
174
+ 'seamly-client-participant'?: components['schemas']['Participant']
175
+ }
176
+ /** @description Additional information related to the conversation, such as FAQs (suggestions) */
177
+ serviceData?: {
178
+ suggestion?: components['schemas']['ServiceDataMessage']
179
+ }
180
+ translation?: components['schemas']['Translation']
181
+ /** @description Information about user interface elements */
182
+ ui?: {
183
+ /**
184
+ * @description Whether or not the client should show a prompt asking the user to continue the conversation.
185
+ * @example false
186
+ */
187
+ resumeConversationPrompt?: boolean
188
+ }
189
+ }
190
+ _links?: {
191
+ conversation?: {
192
+ /**
193
+ * @description The endpoint retrieve the conversation later on to resume it
194
+ * @example /client/f38c06f4-283b-4011-8672-4923cbdc8f26/conversations/4eb31272-ed89-4d0d-92c1-bc258bd7ac9c?srv_id=3010109
195
+ */
196
+ href?: string
197
+ }
198
+ history?: {
199
+ /**
200
+ * @description The endpoint retrieve the conversation's history
201
+ * @example /client/f38c06f4-283b-4011-8672-4923cbdc8f26/conversations/4eb31272-ed89-4d0d-92c1-bc258bd7ac9c/history?srv_id=3010109
202
+ */
203
+ href?: string
204
+ }
205
+ self?: {
206
+ /**
207
+ * @description The endpoint retrieve the conversation later on to resume it
208
+ * @example /client/f38c06f4-283b-4011-8672-4923cbdc8f26/conversations/4eb31272-ed89-4d0d-92c1-bc258bd7ac9c?srv_id=3010109
209
+ */
210
+ href?: string
211
+ }
212
+ socket?: {
213
+ /**
214
+ * @description The endpoint of the conversation websocket
215
+ * @example /client/f38c06f4-283b-4011-8672-4923cbdc8f26/socket/websocket?srv_id=3010109
216
+ */
217
+ href?: string
218
+ }
219
+ uploads?: {
220
+ /**
221
+ * @description The endpoint to send uploaded files to
222
+ * @example /client/f38c06f4-283b-4011-8672-4923cbdc8f26/conversations/4eb31272-ed89-4d0d-92c1-bc258bd7ac9c/uploads?srv_id=3010109
223
+ */
224
+ href?: string
225
+ }
226
+ }
227
+ }
228
+ EntryText: {
229
+ /** @description Settings of the text entry */
230
+ options?: {
231
+ /**
232
+ * @description Whether or not the expected input is language neutral. A postal code or a last name for example are independent of language.
233
+ * @example false
234
+ */
235
+ languageNeutral?: boolean
236
+ /**
237
+ * @description Maximum number of characters the use may enter
238
+ * @example 100
239
+ */
240
+ limit?: number | null
241
+ }
242
+ /**
243
+ * @description Entry type
244
+ * @example text
245
+ */
246
+ type?: string
247
+ }
248
+ EntryPostalCode: {
249
+ /** @description Settings of the postal code entry */
250
+ options?: {
251
+ /**
252
+ * @description Country code (ISO 3166-1 alpha-2) of the expected postal code. Can be used for input hints and validation.
253
+ * @example nl
254
+ */
255
+ countryCode?: string | null
256
+ }
257
+ /**
258
+ * @description Entry type
259
+ * @example postal_code
260
+ */
261
+ type?: string
262
+ }
263
+ EntryUpload: {
264
+ /** @description Settings of the upload entry */
265
+ options?: {
266
+ /**
267
+ * @description List of allowed mime types of any uploaded file
268
+ * @example [
269
+ * "application/msword",
270
+ * "application/pdf",
271
+ * "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
272
+ * "image/*",
273
+ * "text/*"
274
+ * ]
275
+ */
276
+ allowedMimeTypes?: string[]
277
+ /**
278
+ * @description Whether file uploads are possible. When true the client might for instance show a file upload button.
279
+ * @example true
280
+ */
281
+ enabled?: boolean
282
+ /**
283
+ * @description Maximum filesize in bytes
284
+ * @example 10485760
285
+ */
286
+ maxSize?: number
287
+ }
288
+ /**
289
+ * @description Entry type
290
+ * @example upload
291
+ */
292
+ type?: string
293
+ }
294
+ MessageInfo: {
295
+ body?:
296
+ | components['schemas']['InfoBodyDividerNewTopic']
297
+ | components['schemas']['InfoBodyDividerNewTranslation']
298
+ | components['schemas']['InfoBodyText']
299
+ | components['schemas']['InfoBodyTranslation']
300
+ fromClient?: components['schemas']['FromClient']
301
+ fromHistory?: components['schemas']['FromHistory']
302
+ id?: components['schemas']['MessageId']
303
+ messageStatus?: components['schemas']['MessageStatus']
304
+ occurredAt?: components['schemas']['OccurredAt']
305
+ /**
306
+ * @description Reference to the participant of the message
307
+ * @example 07371d91-c95a-43b7-853b-fa870e3f789c
308
+ */
309
+ participant?: string
310
+ service?: components['schemas']['Service']
311
+ transactionId?: components['schemas']['TransactionId']
312
+ /** @description In case a translations was active when this message originated, this object will contain the translated message in the translationLocale locale. */
313
+ translatedBody?: {
314
+ data?:
315
+ | components['schemas']['InfoBodyDividerNewTopic']
316
+ | components['schemas']['InfoBodyDividerNewTranslation']
317
+ | components['schemas']['InfoBodyText']
318
+ | components['schemas']['InfoBodyTranslation']
319
+ direction?: components['schemas']['Direction']
320
+ locale?: components['schemas']['Locale']
321
+ } | null
322
+ /**
323
+ * @description Type of the message body
324
+ * @example text
325
+ * @enum {string}
326
+ */
327
+ type?: 'divider' | 'text' | 'translation'
328
+ }
329
+ MessageMessage: {
330
+ /** @description The body of the message. The type of the body is indicated by the "type" property. See below. */
331
+ body?:
332
+ | components['schemas']['MessageBodyCard']
333
+ | components['schemas']['MessageBodyCarousel']
334
+ | components['schemas']['MessageBodyChoicePrompt']
335
+ | components['schemas']['MessageBodyCTA']
336
+ | components['schemas']['MessageBodyCustom']
337
+ | components['schemas']['MessageBodyImage']
338
+ | components['schemas']['MessageBodySplash']
339
+ | components['schemas']['MessageBodyText']
340
+ | components['schemas']['MessageBodyUpload']
341
+ | components['schemas']['MessageBodyVideo']
342
+ /** @description The requested form of entry from the user */
343
+ entry?:
344
+ | (Partial<components['schemas']['EntryText']> &
345
+ Partial<components['schemas']['EntryPostalCode']> &
346
+ Partial<components['schemas']['EntryUpload']>)
347
+ | null
348
+ fromClient?: components['schemas']['FromClient']
349
+ fromHistory?: components['schemas']['FromHistory']
350
+ id?: components['schemas']['MessageId']
351
+ messageStatus?: components['schemas']['MessageStatus']
352
+ occurredAt?: components['schemas']['OccurredAt']
353
+ /**
354
+ * @description Reference to the participant of the message
355
+ * @example 07371d91-c95a-43b7-853b-fa870e3f789c
356
+ */
357
+ participant?: string
358
+ service?: components['schemas']['Service']
359
+ transactionId?: components['schemas']['TransactionId']
360
+ /**
361
+ * @description Whether or not this message is the last one in the transaction.
362
+ * @example true
363
+ */
364
+ transactionLast?: boolean
365
+ /** @description In case a translations was active when this message originated, this object will contain the translated message in the translationLocale locale. */
366
+ translatedBody?: {
367
+ data?:
368
+ | components['schemas']['MessageBodyCard']
369
+ | components['schemas']['MessageBodyCarousel']
370
+ | components['schemas']['MessageBodyChoicePrompt']
371
+ | components['schemas']['MessageBodyCTA']
372
+ | components['schemas']['MessageBodyCustom']
373
+ | components['schemas']['MessageBodyImage']
374
+ | components['schemas']['MessageBodySplash']
375
+ | components['schemas']['MessageBodyText']
376
+ | components['schemas']['MessageBodyUpload']
377
+ | components['schemas']['MessageBodyVideo']
378
+ direction?: components['schemas']['Direction']
379
+ locale?: components['schemas']['Locale']
380
+ } | null
381
+ /**
382
+ * @description Type of the message body
383
+ * @example text
384
+ * @enum {string}
385
+ */
386
+ type?:
387
+ | 'card'
388
+ | 'carousel'
389
+ | 'choice_prompt'
390
+ | 'cta'
391
+ | 'custom'
392
+ | 'image'
393
+ | 'splash'
394
+ | 'text'
395
+ | 'upload'
396
+ | 'video'
397
+ }
398
+ ServiceDataMessage: {
399
+ /** @description The body of the message. The type of the body is indicated by the "type" property. See below. */
400
+ body?: components['schemas']['ServiceDataBodySuggestion']
401
+ fromClient?: components['schemas']['FromClient']
402
+ id?: components['schemas']['MessageId']
403
+ occurredAt?: components['schemas']['OccurredAt']
404
+ /**
405
+ * @description Whether this service data message is a message in the history at a specific point in time (false) or whether this message should be persisted (kept visible for instance in the client) until an update is received (true).
406
+ * @example true
407
+ */
408
+ persist?: boolean
409
+ /**
410
+ * @description Name of the attached service
411
+ * @example bot
412
+ */
413
+ service?: string
414
+ transactionId?: components['schemas']['TransactionId']
415
+ /** @description In case a translations was active when this message originated, this object will contain the translated message in the translationLocale locale. */
416
+ translatedBody?: {
417
+ data?: components['schemas']['ServiceDataBodySuggestion']
418
+ direction?: components['schemas']['Direction']
419
+ locale?: components['schemas']['Locale']
420
+ } | null
421
+ /**
422
+ * @description Type of the message body
423
+ * @example text
424
+ * @enum {string}
425
+ */
426
+ type?: 'suggestion'
427
+ }
428
+ MessageParticipant: {
429
+ fromClient?: components['schemas']['FromClient']
430
+ fromHistory?: components['schemas']['FromHistory']
431
+ id?: components['schemas']['MessageId']
432
+ messageStatus?: components['schemas']['MessageStatus']
433
+ occurredAt?: components['schemas']['OccurredAt']
434
+ participant?: components['schemas']['Participant']
435
+ transactionId?: components['schemas']['TransactionId']
436
+ }
437
+ /** @description A divider when a new topic has started */
438
+ InfoBodyDividerNewTopic: {
439
+ /**
440
+ * @description The type of divider
441
+ * @example new_topic
442
+ * @enum {string}
443
+ */
444
+ subtype?: 'new_topic'
445
+ }
446
+ /** @description A divider when translations was started or stopped */
447
+ InfoBodyDividerNewTranslation: {
448
+ /**
449
+ * @description The type of divider
450
+ * @example new_translation
451
+ * @enum {string}
452
+ */
453
+ subtype?: 'new_translation'
454
+ /**
455
+ * @description Whether translations was turn on (true) or turned off (false)
456
+ * @example true
457
+ */
458
+ translationEnabled?: boolean
459
+ /**
460
+ * @description The locale the user wants to speak.
461
+ * @example nl-informal
462
+ */
463
+ translationLocale?: string | null
464
+ /**
465
+ * @description The native language name of the translation locale
466
+ * @example Deutsch
467
+ */
468
+ language?: string
469
+ /**
470
+ * @description Title of the divider
471
+ * @example Übersetzen in Deutsch
472
+ */
473
+ title?: string
474
+ /**
475
+ * @description Optional text for the divider
476
+ * @example Automatische Übersetzung nach Deutsch gestartet. Bitte beachten Sie, dass automatische Übersetzungen Fehler enthalten können. Die Übersetzungen werden von DeepL bereitgestellt.
477
+ */
478
+ text?: string | null
479
+ /**
480
+ * @description Optional button text to re-start translations after the user has stopped translating.
481
+ * @example Neu beginnen
482
+ */
483
+ restartButtonText?: string | null
484
+ }
485
+ /** @description An info text message */
486
+ InfoBodyText: {
487
+ /**
488
+ * @description Text of the info message
489
+ * @example The agent has left the building
490
+ */
491
+ text?: string
492
+ }
493
+ /** @description A message indicating the client to display a message from the translations file. Those kind of messages are deprecated and are being replaced with info text messages. */
494
+ InfoBodyTranslation: {
495
+ /**
496
+ * @description The key of the translation to lookup in the translation file.
497
+ * @example [
498
+ * "info",
499
+ * "sendTranscript",
500
+ * "accepted"
501
+ * ]
502
+ */
503
+ key?: string[]
504
+ /** @description Arbitrary variables to be used when rendering the ICU translation. */
505
+ variables?: { [key: string]: unknown }
506
+ }
507
+ /** @description A text message */
508
+ MessageBodyCard: {
509
+ action?:
510
+ | {
511
+ /** @description When the user clicks on this card this value will be submitted as if the user has typed it himself. */
512
+ ask?: string
513
+ /**
514
+ * @example ask
515
+ * @enum {string}
516
+ */
517
+ type?: 'ask'
518
+ }
519
+ | {
520
+ /**
521
+ * @description To URL to navigate to when the user clicks on the card.
522
+ * @example https://www.google.com
523
+ */
524
+ link?: string
525
+ /**
526
+ * @description Whether or not the link should be opened in a new window/tab.
527
+ * @example true
528
+ */
529
+ newTab?: boolean
530
+ /**
531
+ * @example navigate
532
+ * @enum {string}
533
+ */
534
+ type?: 'navigate'
535
+ }
536
+ | {
537
+ /**
538
+ * @description The new topic to start when the user clicks on the card.
539
+ * @example login
540
+ */
541
+ topic?: string
542
+ /**
543
+ * @description Text displayed if, for whatever reason, starting the new topic fails.
544
+ * @example Sorry, I can help you right now
545
+ */
546
+ fallbackMessage?: string
547
+ /**
548
+ * @example topic
549
+ * @enum {string}
550
+ */
551
+ type?: 'topic'
552
+ }
553
+ /**
554
+ * @description Text to display on the button of the card
555
+ * @example Order now!
556
+ */
557
+ buttonText?: string
558
+ /**
559
+ * @description Some more information to display on the card
560
+ * @example Pizza Margherita is a typical Neapolitan pizza.
561
+ */
562
+ description?: string | null
563
+ /**
564
+ * @description Image to display on the card
565
+ * @example https://via.placeholder.com/150/003A5D/FFFFFF?text=Margherita
566
+ */
567
+ image?: string
568
+ /**
569
+ * @description Title to display on the card
570
+ * @example Pizza Margherita
571
+ */
572
+ title?: string | null
573
+ }
574
+ /** @description A carousel message */
575
+ MessageBodyCarousel: {
576
+ cards?: components['schemas']['MessageBodyCard'][]
577
+ }
578
+ /** @description A choice prompt message */
579
+ MessageBodyChoicePrompt: {
580
+ /** @description Choices to show to the user */
581
+ choices?: {
582
+ /**
583
+ * @description Optional category this choice belongs to. Allows the client to apply custom styling for example.
584
+ * @example invoice
585
+ */
586
+ category?: string | null
587
+ /**
588
+ * @description Choice identifier. Required value to submit once the user selects this choice.
589
+ * @example 17b6b250-7299-41dd-8d23-09749197d792
590
+ */
591
+ id?: string
592
+ /**
593
+ * @description The text of the choice
594
+ * @example My invoice
595
+ */
596
+ text?: string
597
+ }[]
598
+ /**
599
+ * @description Whether or not the user is able to select a different choice later on.
600
+ * @example true
601
+ */
602
+ chooseAgain?: boolean
603
+ prompt?: Partial<{
604
+ /**
605
+ * @description The prompt text
606
+ * @example What can I help you with?
607
+ */
608
+ text?: string
609
+ /**
610
+ * @example text
611
+ * @enum {string}
612
+ */
613
+ type?: 'text'
614
+ }> &
615
+ Partial<{
616
+ /**
617
+ * @description The prompt image
618
+ * @example https://via.placeholder.com/150/003A5D/FFFFFF?text=How can I help you?
619
+ */
620
+ url?: string
621
+ /** @description Image description */
622
+ description?: string | null
623
+ /**
624
+ * @description Whether the image should be zoomable for the user
625
+ * @example true
626
+ */
627
+ isZoomable?: boolean
628
+ /**
629
+ * @example image
630
+ * @enum {string}
631
+ */
632
+ type?: 'image'
633
+ }>
634
+ }
635
+ /** @description A Call To Action (CTA) message */
636
+ MessageBodyCTA: {
637
+ /**
638
+ * @description URL of the CTA
639
+ * @example https://seamly.ai
640
+ */
641
+ buttonLink?: string
642
+ /**
643
+ * @description Whether or not the link should be opened in a new window/tab
644
+ * @example true
645
+ */
646
+ newTab?: boolean
647
+ /**
648
+ * @description Text on the CTA button
649
+ * @example Buy now!
650
+ */
651
+ buttonText?: string
652
+ /**
653
+ * @description Text shown above the CTA button
654
+ * @example Would you like to order a pizza? Click on the button below!
655
+ */
656
+ description?: string
657
+ }
658
+ /** @description A custom message to be used and designed for specific accounts */
659
+ MessageBodyCustom: {
660
+ /**
661
+ * @description String indicating the what type of custom message this is. Can be any string.
662
+ * @example alarm
663
+ */
664
+ type?: string
665
+ /**
666
+ * @description Text representation of this message. This should be used when the client does not know how to render this specific type of custom message.
667
+ * @example Attention! This is an emergency!
668
+ */
669
+ text?: string
670
+ /**
671
+ * @description Arbitrary data of the custom message
672
+ * @example {
673
+ * "type": "emergency"
674
+ * }
675
+ */
676
+ data?: { [key: string]: unknown }
677
+ }
678
+ /** @description An image message */
679
+ MessageBodyImage: {
680
+ /**
681
+ * @description The prompt image
682
+ * @example https://via.placeholder.com/150/003A5D/FFFFFF?text=How can I help you?
683
+ */
684
+ url?: string
685
+ /** @description Image description */
686
+ description?: string | null
687
+ /**
688
+ * @description Whether the image should be zoomable for the user
689
+ * @example true
690
+ */
691
+ isZoomable?: boolean
692
+ }
693
+ /** @description A text message that can be displayed highlighted for example */
694
+ MessageBodySplash: {
695
+ /**
696
+ * @description Text of the message
697
+ * @example Hi, how may I help?
698
+ */
699
+ text?: string
700
+ }
701
+ /** @description A text message */
702
+ MessageBodyText: {
703
+ /**
704
+ * @description Text of the message
705
+ * @example Hi, how may I help?
706
+ */
707
+ text?: string
708
+ }
709
+ /** @description An upload message */
710
+ MessageBodyUpload: {
711
+ /**
712
+ * @description Content type of the upload
713
+ * @example image/jpeg
714
+ */
715
+ contentType?: string
716
+ /**
717
+ * @description Timestamp until when the file is available for download (in microseconds).
718
+ * @example 1661165549122131
719
+ */
720
+ deleteAt?: number
721
+ /**
722
+ * @description Filename of the upload
723
+ * @example dog.jpg
724
+ */
725
+ filename?: string
726
+ /**
727
+ * @description Filesize of the upload in bytes
728
+ * @example 7131
729
+ */
730
+ filesize?: number
731
+ /**
732
+ * @description Internal identifier of the upload
733
+ * @example 9557ec25-ba9b-402f-a8cf-2ecf73477d50
734
+ */
735
+ id?: string
736
+ }
737
+ /** @description A video message */
738
+ MessageBodyVideo: {
739
+ /**
740
+ * @description The url to the video
741
+ * @example https://www.youtube.com/embed/dQw4w9WgXcQ
742
+ */
743
+ url?: string
744
+ /**
745
+ * @description Source of the video
746
+ * @example YouTube
747
+ */
748
+ source?: string | null
749
+ /**
750
+ * @description Optional description to show alongside the video
751
+ * @example Rick Astley - Never Gonna Give You Up (Official Music Video)
752
+ */
753
+ description?: string | null
754
+ }
755
+ /** @description A suggestion service data message */
756
+ ServiceDataBodySuggestion: {
757
+ /** @description Any categories the suggestion belongs to. May be used to style the suggestion for example. */
758
+ categories?: (number | string)[]
759
+ id?: number | string
760
+ /**
761
+ * @description The suggestion / question
762
+ * @example What are your opening hours?
763
+ */
764
+ question?: string
765
+ }[]
766
+ /** @description Information about the current translation state */
767
+ Translation: {
768
+ /**
769
+ * @description Whether translation is turned on
770
+ * @example true
771
+ */
772
+ enabled?: boolean
773
+ /**
774
+ * @description When enabled equals true, this property will contain the translation locale.
775
+ * @example nl-informal
776
+ */
777
+ locale?: string
778
+ }
779
+ /**
780
+ * @description Either "to_translation_locale" when the text was translated from the locale to the translationLocale, or "from_translation_locale" when it was translated from the translationLocale to the locale.
781
+ * @example to_translation_locale
782
+ * @enum {string}
783
+ */
784
+ Direction: 'to_translation_locale' | 'from_translation_locale'
785
+ /**
786
+ * @description A string representation of a locale
787
+ * @example nl-informal
788
+ */
789
+ Locale: string
790
+ /**
791
+ * @description Whether this message is sent by the user (true) or is received from a bot or agent (false).
792
+ * @example false
793
+ */
794
+ FromClient: boolean
795
+ /**
796
+ * @description Whether this message was sent in the history request.
797
+ * @example false
798
+ */
799
+ FromHistory: boolean
800
+ /**
801
+ * @description Unique identifier of the message
802
+ * @example 851c9e59-caf0-4f7f-9c69-39eac5617c36
803
+ */
804
+ MessageId: string
805
+ /**
806
+ * @description Status of the message: "received" or "read".
807
+ * @example received
808
+ */
809
+ MessageStatus: string
810
+ /**
811
+ * @description Timestamp of the message in microseconds
812
+ * @example 1660281438713581
813
+ */
814
+ OccurredAt: number
815
+ /** @description Information about the participant */
816
+ Participant: {
817
+ /**
818
+ * @description The icon of the participant
819
+ * @example data:image/svg+xml;base64,.....
820
+ */
821
+ avatar?: string
822
+ /**
823
+ * @description Reference to the participant of the message
824
+ * @example 07371d91-c95a-43b7-853b-fa870e3f789c
825
+ */
826
+ id?: string
827
+ /**
828
+ * @description Introduction message of the participant
829
+ * @example Your digital assistant
830
+ */
831
+ introduction?: string | null
832
+ /**
833
+ * @description The name of the participant
834
+ * @example ACME bot
835
+ */
836
+ name?: string
837
+ service?: components['schemas']['Service']
838
+ /** @description In case a translations was active when this message originated, this object will contain the translated introduction in the translationLocale locale. */
839
+ translatedIntroduction?: {
840
+ /**
841
+ * @description The translated introduction
842
+ * @example Jouw digitale assistent
843
+ */
844
+ data?: string
845
+ direction?: components['schemas']['Direction']
846
+ locale?: components['schemas']['Locale']
847
+ } | null
848
+ /** @description Arbitrary variables of this participant. */
849
+ variables?: { [key: string]: unknown }
850
+ }
851
+ /** @description Information the attached service exposes to the client */
852
+ Service: {
853
+ /**
854
+ * @description May include any information
855
+ * @example {
856
+ * "additions": {
857
+ * "displayChoices": "horizontal"
858
+ * }
859
+ * }
860
+ */
861
+ meta?: { [key: string]: unknown }
862
+ /**
863
+ * @description Name of the attached service
864
+ * @example livechat
865
+ */
866
+ name?: string
867
+ /**
868
+ * @description Internal identifier of the current service session. Can be used to determine which messages from the history are from the current service, and, for example, might have the choose-again functionality available.
869
+ * @example c18c86f3-a31f-4a61-a4f3-f805b5b71883
870
+ */
871
+ serviceSessionId?: string
872
+ }
873
+ /**
874
+ * @description Identifier of the transaction this message belongs to. Aids to group and link messages together. When a bot service for instance emits multiple messages at once they'll all have the same transctionId.
875
+ * @example ddff6efa-619a-497d-854c-f6a111f19196
876
+ */
877
+ TransactionId: string
878
+ }
879
+ }
880
+
881
+ export interface operations {
882
+ /** Get account settings and conversation defaults */
883
+ getAccountConfig: {
884
+ parameters: {
885
+ path: {
886
+ /** Seamly account API key */
887
+ apiKey: string
888
+ }
889
+ query: {
890
+ /** Seamly API Version to use */
891
+ v: number
892
+ }
893
+ }
894
+ responses: {
895
+ /** Success response */
896
+ 201: {
897
+ content: {
898
+ 'application/json': {
899
+ config?: {
900
+ agentParticipant?: {
901
+ /**
902
+ * @description The default avatar of the agent participant. This can be used until an actual participant is received over the websocket.
903
+ * @example data:image/svg+xml;base64,.....
904
+ */
905
+ avatar?: string
906
+ /**
907
+ * @description The default name of the agent participant. This can be used until an actual participant is received over the websocket.
908
+ * @example ACME Assistant
909
+ */
910
+ name?: string
911
+ }
912
+ /**
913
+ * @description The default locale as configured in the Seamly account.
914
+ * @example nl-informal
915
+ */
916
+ defaultLocale?: string
917
+ features?: {
918
+ sendTranscript?: {
919
+ /**
920
+ * @description Whether the Send Transcript feature is available to allow users to receive a transcript of their conversation history by mail.
921
+ * @example true
922
+ */
923
+ enabled?: boolean
924
+ /**
925
+ * @description The period (in milliseconds) for which messages will be included in the transcript. This value is available so you can for example add a button like "Send transcript of the last 24 hours".
926
+ * @example 86400000
927
+ */
928
+ period?: number
929
+ }
930
+ translation?: {
931
+ /** @description Whether the Translation feature is available to allow users to chat in a different language. */
932
+ enabled?: boolean
933
+ /** @description The list of languages the user is allowed to type in. */
934
+ languages?: {
935
+ /**
936
+ * @description The locale of the language
937
+ * @example de-informal
938
+ */
939
+ locale?: string
940
+ /**
941
+ * @description The name of the language in the language itself
942
+ * @example Deutsch
943
+ */
944
+ nativeName?: string
945
+ }[]
946
+ }
947
+ typingPeekahead?: {
948
+ /** @description Whether the Typing Peekahead feature is available and the client should send typed in text to Seamly, while the user is typing. */
949
+ enabled?: boolean
950
+ }
951
+ uploads?: {
952
+ /**
953
+ * @description Whether the Uploads feature is available to allow users to upload files. This feature might later on be switch on or off again depending on the attached service. A livechat service for example might actually accept files, whereas a bot service will not.
954
+ * @example false
955
+ */
956
+ enabled?: boolean
957
+ }
958
+ }
959
+ /** @description A list of messages to show to the user (before the conversation is started) to trigger the user to open up the chat. */
960
+ preChat?: {
961
+ body?: {
962
+ /**
963
+ * @description Text of the pre chat message
964
+ * @example Hi, how can I help?
965
+ */
966
+ text?: string
967
+ }
968
+ /**
969
+ * @description Whether this message is sent by the user (true) or is received from a bot or agent (false). For pre chat messages this value will always be false.
970
+ * @example false
971
+ */
972
+ fromClient?: boolean
973
+ /** @description In case a translationLocale was passed this object will contain the translated message in the translationLocale locale. */
974
+ translatedBody?: {
975
+ /**
976
+ * @description Text of the pre chat message
977
+ * @example Hoi, hoe kan ik je helpen?
978
+ */
979
+ text?: string
980
+ }
981
+ /**
982
+ * @description The type of the message. Will always be "splash" for pre chat messages.
983
+ * @example splash
984
+ */
985
+ type?: string
986
+ }[]
987
+ /**
988
+ * @description The icon that can be used as a (hovering / sticky) button on the website to trigger users to open the chat.
989
+ * @example data:image/svg+xml;base64,.....
990
+ */
991
+ startChatIcon?: string
992
+ /** @description Visual information about how to render the user participant. */
993
+ userParticipant?: {
994
+ /**
995
+ * @description Avatar of the user
996
+ * @example data:image/svg+xml;base64,.....
997
+ */
998
+ avatar?: string
999
+ }
1000
+ }
1001
+ _links?: {
1002
+ conversations?: {
1003
+ /**
1004
+ * @description The endpoint to create a new conversation
1005
+ * @example /client/f38c06f4-283b-4011-8672-4923cbdc8f26/conversations?srv_id=3010109
1006
+ */
1007
+ href?: string
1008
+ }
1009
+ self?: {
1010
+ /**
1011
+ * @description The endpoint of the current request
1012
+ * @example /client/f38c06f4-283b-4011-8672-4923cbdc8f26/configs?v=2
1013
+ */
1014
+ href?: string
1015
+ }
1016
+ socket?: {
1017
+ /**
1018
+ * @description The endpoint of the conversation websocket
1019
+ * @example /client/f38c06f4-283b-4011-8672-4923cbdc8f26/socket/websocket?srv_id=3010109
1020
+ */
1021
+ href?: string
1022
+ }
1023
+ translations?: {
1024
+ /**
1025
+ * @description The endpoint to fetch the translation labels to use in the interface of your client. You must replace {version} by the version of the translation set (currently: 1), and you must replace {locale} by the required locale (ie: 'nl-informal').
1026
+ * @example /client/f38c06f4-283b-4011-8672-4923cbdc8f26/translations/{version}/{locale}
1027
+ */
1028
+ href?: string
1029
+ /**
1030
+ * @description Indicating whether the URI provided in the href property has keywords that must be replaced.
1031
+ * @example true
1032
+ */
1033
+ templated?: boolean
1034
+ }
1035
+ }
1036
+ }
1037
+ }
1038
+ }
1039
+ /** Error when parsing the request failed */
1040
+ 400: {
1041
+ content: {
1042
+ 'application/json': {
1043
+ /**
1044
+ * @description The error message
1045
+ * @example server_error
1046
+ */
1047
+ error?: string
1048
+ }
1049
+ }
1050
+ }
1051
+ /** Error when no valid api key was passed */
1052
+ 404: {
1053
+ content: {
1054
+ 'application/json': {
1055
+ /**
1056
+ * @description The error message
1057
+ * @example not_found
1058
+ */
1059
+ error?: string
1060
+ }
1061
+ }
1062
+ }
1063
+ }
1064
+ /** Payload */
1065
+ requestBody: {
1066
+ content: {
1067
+ 'application/json': {
1068
+ context: {
1069
+ /**
1070
+ * @description The name of the channel to use, as configured in your Seamly account.
1071
+ * @example web
1072
+ */
1073
+ channelName: string
1074
+ /** @description Environment information about the user. The passed data can be used (in your Seamly account configuration) to customize the returned configuration. The sent information is not stored nor used in a potentially upcoming conversation. */
1075
+ environment?: {
1076
+ /**
1077
+ * @description The name of the client application.
1078
+ * @example @seamly/web-ui
1079
+ */
1080
+ clientName?: string
1081
+ /**
1082
+ * @description The variant of the client application, to distinguish between different use cases of the client. For example 'inline' versus 'popup'.
1083
+ * @example inline
1084
+ */
1085
+ clientVariant?: string
1086
+ /**
1087
+ * @description The version of the client application.
1088
+ * @example 20.3.0
1089
+ */
1090
+ clientVersion?: string
1091
+ /**
1092
+ * @description The URL the user currently is on.
1093
+ * @example https://seamly.ai/en/contact-us/
1094
+ */
1095
+ currentUrl?: string
1096
+ /**
1097
+ * @description The screen resolution of the user.
1098
+ * @example 2560x1440
1099
+ */
1100
+ screenResolution?: string
1101
+ /**
1102
+ * @description The timezone of the user.
1103
+ * @example Europe/Amsterdam
1104
+ */
1105
+ timezone?: string
1106
+ /**
1107
+ * @description The user agent of the user.
1108
+ * @example Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36
1109
+ */
1110
+ userAgent?: string
1111
+ }
1112
+ /**
1113
+ * @description The locale of the conversation. Any locales to be used must be specifically enabled in your Seamly Account. And of course your connected services must also support this locale.
1114
+ * @example nl-informal
1115
+ */
1116
+ locale: string
1117
+ /**
1118
+ * @description Optional translation locale; the locale the user immediately starts translating to.
1119
+ * @example null
1120
+ */
1121
+ translationLocale?: string
1122
+ /** @description Arbitrary variables used to customize the returned configuration. The sent variables are not stored and are not used in a potentially upcoming conversation. */
1123
+ variables?: { [key: string]: unknown }
1124
+ }
1125
+ }
1126
+ }
1127
+ }
1128
+ }
1129
+ getAccountTranslations: {
1130
+ parameters: {
1131
+ path: {
1132
+ /** Seamly account API key */
1133
+ apiKey: string
1134
+ /** Translation file version */
1135
+ version: number
1136
+ /** Locale to get translations for */
1137
+ locale: string
1138
+ }
1139
+ }
1140
+ responses: {
1141
+ /** Success response */
1142
+ 200: {
1143
+ content: {
1144
+ 'application/json': {
1145
+ /**
1146
+ * @description Key value pairs of labels and ICU texts.
1147
+ * @example {
1148
+ * "account.preChatText": "Hallo! Kan ik je ergens mee helpen?",
1149
+ * "carousel.controls.next": "Volgende",
1150
+ * "carousel.controls.previous": "Vorige"
1151
+ * }
1152
+ */
1153
+ translations?: { [key: string]: unknown }
1154
+ }
1155
+ }
1156
+ }
1157
+ /** Error when parsing the request failed, for example due to an invalid locale. */
1158
+ 400: {
1159
+ content: {
1160
+ 'plain/text': string
1161
+ }
1162
+ }
1163
+ /** Error when no valid api key was passed, or when the requested locale is not available for the account. */
1164
+ 404: {
1165
+ content: {
1166
+ 'application/json': {
1167
+ /**
1168
+ * @description The error message
1169
+ * @example not_found
1170
+ */
1171
+ error?: string
1172
+ }
1173
+ }
1174
+ }
1175
+ }
1176
+ }
1177
+ /** Create a new conversation. The full URL should be obtained from the HAL links as returned by the configs endpoint. */
1178
+ createConversation: {
1179
+ parameters: {
1180
+ path: {
1181
+ /** Seamly account API key */
1182
+ apiKey: string
1183
+ }
1184
+ query: {
1185
+ /** Required reference to a Seamly server. Must be obtained from the HAL links as returned by the configs endpoint. */
1186
+ srv_id: string
1187
+ /** Seamly API Version to use */
1188
+ v: number
1189
+ }
1190
+ }
1191
+ responses: {
1192
+ /** Success response */
1193
+ 201: {
1194
+ content: {
1195
+ 'application/json': components['schemas']['ConversationResponse']
1196
+ }
1197
+ }
1198
+ /** Error when parsing the request failed */
1199
+ 400: {
1200
+ content: {
1201
+ 'plain/text': string
1202
+ }
1203
+ }
1204
+ /** Error when creating the conversation failed */
1205
+ 404: {
1206
+ content: {
1207
+ 'application/json': {
1208
+ /**
1209
+ * @description The error message
1210
+ * @example not_found
1211
+ */
1212
+ error?: string
1213
+ }
1214
+ }
1215
+ }
1216
+ }
1217
+ /** Payload */
1218
+ requestBody: {
1219
+ content: {
1220
+ 'application/json': {
1221
+ /**
1222
+ * @description Optional external id to identify the conversation
1223
+ * @example hjlbh5e5vek0p7gd8d9g9st28d6kowrk
1224
+ */
1225
+ externalId?: string | null
1226
+ } | null
1227
+ }
1228
+ }
1229
+ }
1230
+ /** Get conversation to be resumed. The full URL should be obtained from the HAL links as returned by the POST conversations endpoint. */
1231
+ getConversation: {
1232
+ parameters: {
1233
+ path: {
1234
+ /** Seamly account API key */
1235
+ apiKey: string
1236
+ /** Id of the conversation */
1237
+ conversationId: string
1238
+ }
1239
+ query: {
1240
+ /** Required reference to a Seamly server. Must be obtained from the HAL links as returned by the configs endpoint. */
1241
+ srv_id: string
1242
+ /** Seamly API Version to use */
1243
+ v: number
1244
+ }
1245
+ }
1246
+ responses: {
1247
+ /** Success response */
1248
+ 200: {
1249
+ content: {
1250
+ 'application/json': components['schemas']['ConversationResponse']
1251
+ }
1252
+ }
1253
+ /** Invalid access token provided */
1254
+ 401: {
1255
+ content: {
1256
+ 'application/json': {
1257
+ /**
1258
+ * @description The error message
1259
+ * @example unauthorized
1260
+ */
1261
+ error?: string
1262
+ }
1263
+ }
1264
+ }
1265
+ /** Error when no valid api key was passed or when the conversation does not exist (anymore) */
1266
+ 404: {
1267
+ content: {
1268
+ 'application/json': {
1269
+ /**
1270
+ * @description The error message
1271
+ * @example not_found
1272
+ */
1273
+ error?: string
1274
+ }
1275
+ }
1276
+ }
1277
+ /** Something went wrong internally */
1278
+ 500: {
1279
+ content: {
1280
+ 'application/json': {
1281
+ /**
1282
+ * @description The error message
1283
+ * @example timeout
1284
+ */
1285
+ error?: string
1286
+ }
1287
+ }
1288
+ }
1289
+ }
1290
+ }
1291
+ /** Get message history of a conversation. The full URL should be obtained from the HAL links as returned by the POST conversations endpoint. Pass the conversation's access token (as obtained by the initial POST to create the conversation) as a Bearer token. */
1292
+ getConversationHistory: {
1293
+ parameters: {
1294
+ path: {
1295
+ /** Seamly account API key */
1296
+ apiKey: string
1297
+ /** Id of the conversation */
1298
+ conversationId: string
1299
+ }
1300
+ query: {
1301
+ /** Required reference to a Seamly server. Must be obtained from the HAL links as returned by the configs endpoint. */
1302
+ srv_id: string
1303
+ /** Seamly API Version to use */
1304
+ v: number
1305
+ }
1306
+ }
1307
+ responses: {
1308
+ /** Success response */
1309
+ 200: {
1310
+ content: {
1311
+ 'application/json': components['schemas']['ConversationHistoryResponse']
1312
+ }
1313
+ }
1314
+ /** Invalid access token provided */
1315
+ 401: {
1316
+ content: {
1317
+ 'application/json': {
1318
+ /**
1319
+ * @description The error message
1320
+ * @example unauthorized
1321
+ */
1322
+ error?: string
1323
+ }
1324
+ }
1325
+ }
1326
+ /** Error when no valid api key was passed or when the conversation does not exist (anymore) */
1327
+ 404: {
1328
+ content: {
1329
+ 'application/json': {
1330
+ /**
1331
+ * @description The error message
1332
+ * @example not_found
1333
+ */
1334
+ error?: string
1335
+ }
1336
+ }
1337
+ }
1338
+ /** Something went wrong internally */
1339
+ 500: {
1340
+ content: {
1341
+ 'application/json': {
1342
+ /**
1343
+ * @description The error message
1344
+ * @example timeout
1345
+ */
1346
+ error?: string
1347
+ }
1348
+ }
1349
+ }
1350
+ }
1351
+ }
1352
+ /** Upload a file of a conversation. The full URL should be obtained from the HAL links as returned by the POST conversations endpoint. Pass the conversation's access token (as obtained by the initial POST to create the conversation) as a Bearer token. */
1353
+ createConversationUpload: {
1354
+ parameters: {
1355
+ path: {
1356
+ /** Seamly account API key */
1357
+ apiKey: string
1358
+ /** Id of the conversation */
1359
+ conversationId: string
1360
+ }
1361
+ query: {
1362
+ /** Required reference to a Seamly server. Must be obtained from the HAL links as returned by the configs endpoint. */
1363
+ srv_id: string
1364
+ }
1365
+ }
1366
+ responses: {
1367
+ /** Success response. Will contain a message with type "upload". */
1368
+ 201: {
1369
+ content: {
1370
+ 'application/json': components['schemas']['MessageMessage']
1371
+ }
1372
+ }
1373
+ /** Failed to process the upload */
1374
+ 400: {
1375
+ content: {
1376
+ 'application/json': {
1377
+ /**
1378
+ * @description The error message
1379
+ * @example file_uploads_are_disabled
1380
+ */
1381
+ error?: string
1382
+ }
1383
+ }
1384
+ }
1385
+ /** Invalid access token provided */
1386
+ 401: {
1387
+ content: {
1388
+ 'application/json': {
1389
+ /**
1390
+ * @description The error message
1391
+ * @example unauthorized
1392
+ */
1393
+ error?: string
1394
+ }
1395
+ }
1396
+ }
1397
+ /** Error when no valid api key was passed or when the conversation does not exist (anymore) */
1398
+ 404: {
1399
+ content: {
1400
+ 'application/json': {
1401
+ /**
1402
+ * @description The error message
1403
+ * @example not_found
1404
+ */
1405
+ error?: string
1406
+ }
1407
+ }
1408
+ }
1409
+ /** Uploaded file is too large */
1410
+ 413: {
1411
+ content: {
1412
+ 'application/json': {
1413
+ /**
1414
+ * @description The error message
1415
+ * @example request_entity_too_large
1416
+ */
1417
+ error?: string
1418
+ }
1419
+ }
1420
+ }
1421
+ /** Uploaded file has an unsupprted mime type */
1422
+ 415: {
1423
+ content: {
1424
+ 'application/json': {
1425
+ /**
1426
+ * @description The error message
1427
+ * @example file_has_invalid_mime_type
1428
+ */
1429
+ error?: string
1430
+ }
1431
+ }
1432
+ }
1433
+ /** Something went wrong internally */
1434
+ 500: {
1435
+ content: {
1436
+ 'application/json': {
1437
+ /**
1438
+ * @description The error message
1439
+ * @example timeout
1440
+ */
1441
+ error?: string
1442
+ }
1443
+ }
1444
+ }
1445
+ }
1446
+ requestBody: {
1447
+ content: {
1448
+ 'multipart/form-data': {
1449
+ /** Format: binary */
1450
+ upload?: string
1451
+ }
1452
+ }
1453
+ }
1454
+ }
1455
+ }