@seamly/web-ui 20.7.0 → 20.8.0-beta.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.
- package/build/dist/lib/hooks.js +1 -1
- package/build/dist/lib/hooks.min.js +1 -1
- package/build/dist/lib/index.debug.js +945 -790
- package/build/dist/lib/index.debug.min.js +1 -1
- package/build/dist/lib/index.debug.min.js.LICENSE.txt +187 -131
- package/build/dist/lib/index.js +24800 -19606
- package/build/dist/lib/index.min.js +1 -1
- package/build/dist/lib/index.min.js.LICENSE.txt +38 -4
- package/build/dist/lib/standalone.js +32920 -26742
- package/build/dist/lib/standalone.min.js +1 -1
- package/build/dist/lib/standalone.min.js.LICENSE.txt +39 -0
- package/build/dist/lib/storage.js +2 -2
- package/build/dist/lib/storage.min.js +1 -1
- package/build/dist/lib/style-guide.js +8780 -7907
- package/build/dist/lib/style-guide.min.js +2 -1
- package/build/dist/lib/style-guide.min.js.LICENSE.txt +38 -0
- package/build/dist/lib/styles.css +1 -1
- package/build/dist/lib/utils.js +1 -2
- package/build/dist/lib/utils.min.js +1 -1
- package/package.json +19 -9
- package/src/icons/avatar_agent-32.svg +7 -0
- package/src/icons/avatar_bot-32.svg +6 -1
- package/src/javascripts/api/index.js +1 -1
- package/src/javascripts/{config.js → config.ts} +3 -1
- package/src/javascripts/config.types.ts +96 -0
- package/src/javascripts/domains/app/actions.ts +83 -0
- package/src/javascripts/domains/app/app.types.ts +3 -0
- package/src/javascripts/domains/app/hooks.js +3 -5
- package/src/javascripts/domains/app/selectors.ts +6 -0
- package/src/javascripts/domains/app/slice.ts +30 -0
- package/src/javascripts/domains/config/actions.ts +45 -0
- package/src/javascripts/domains/config/hooks.ts +19 -0
- package/src/javascripts/domains/config/selectors.ts +24 -0
- package/src/javascripts/domains/config/slice.ts +113 -0
- package/src/javascripts/domains/errors/index.js +13 -9
- package/src/javascripts/domains/forms/context.ts +14 -0
- package/src/javascripts/domains/forms/forms.types.ts +24 -0
- package/src/javascripts/domains/forms/{hooks.js → hooks.ts} +23 -26
- package/src/javascripts/domains/forms/{provider.js → provider.tsx} +20 -14
- package/src/javascripts/domains/forms/{selectors.js → selectors.ts} +7 -8
- package/src/javascripts/domains/forms/slice.ts +84 -0
- package/src/javascripts/domains/forms/utils.ts +15 -0
- package/src/javascripts/domains/i18n/actions.ts +24 -0
- package/src/javascripts/domains/i18n/{hooks.js → hooks.ts} +2 -2
- package/src/javascripts/domains/i18n/i18n.types.ts +6 -0
- package/src/javascripts/domains/i18n/selectors.ts +16 -0
- package/src/javascripts/domains/i18n/{reducer.js → slice.ts} +40 -37
- package/src/javascripts/domains/interrupt/{hooks.js → hooks.ts} +2 -2
- package/src/javascripts/domains/interrupt/{middleware.js → middleware.ts} +11 -8
- package/src/javascripts/domains/interrupt/selectors.ts +6 -0
- package/src/javascripts/domains/interrupt/slice.ts +40 -0
- package/src/javascripts/domains/options/middleware.js +9 -6
- package/src/javascripts/domains/redux/redux.types.ts +11 -0
- package/src/javascripts/domains/store/index.ts +53 -0
- package/src/javascripts/domains/store/slice.ts +642 -0
- package/src/javascripts/domains/store/store.types.ts +146 -0
- package/src/javascripts/domains/translations/components/chat-status.js +2 -2
- package/src/javascripts/domains/translations/components/options-button.js +1 -1
- package/src/javascripts/domains/translations/components/options-dialog/form.js +5 -5
- package/src/javascripts/domains/translations/components/options-dialog/index.js +2 -2
- package/src/javascripts/domains/translations/hooks.ts +114 -0
- package/src/javascripts/domains/translations/middleware.js +29 -27
- package/src/javascripts/domains/translations/selectors.ts +12 -0
- package/src/javascripts/domains/translations/slice.ts +120 -0
- package/src/javascripts/domains/translations/translations.types.ts +19 -0
- package/src/javascripts/domains/visibility/{actions.js → actions.ts} +25 -19
- package/src/javascripts/domains/visibility/{hooks.js → hooks.ts} +13 -10
- package/src/javascripts/domains/visibility/{selectors.js → selectors.ts} +3 -6
- package/src/javascripts/domains/visibility/slice.ts +38 -0
- package/src/javascripts/domains/visibility/utils.js +0 -9
- package/src/javascripts/domains/visibility/visibility.types.ts +6 -0
- package/src/javascripts/index.ts +92 -0
- package/src/javascripts/lib/engine/index.js +15 -11
- package/src/javascripts/lib/external-api/initialize-api.js +1 -1
- package/src/javascripts/lib/id.js +5 -8
- package/src/javascripts/lib/mutex.js +3 -1
- package/src/javascripts/lib/store/providers/cookie-storage.js +1 -1
- package/src/javascripts/lib/store/providers/session-storage.js +1 -1
- package/src/javascripts/package/hooks.js +2 -2
- package/src/javascripts/package/utils.js +0 -1
- package/src/javascripts/schema.ts +1448 -0
- package/src/javascripts/style-guide/components/app.js +6 -6
- package/src/javascripts/style-guide/components/static-core.js +87 -65
- package/src/javascripts/style-guide/components/view.js +4 -4
- package/src/javascripts/style-guide/state-helpers/index.js +5 -5
- package/src/javascripts/style-guide/states.js +67 -7
- package/src/javascripts/style-guide.ts +5 -0
- package/src/javascripts/ui/components/app-options/index.js +2 -4
- package/src/javascripts/ui/components/conversation/component-filter.js +1 -1
- package/src/javascripts/ui/components/conversation/conversation.js +11 -7
- package/src/javascripts/ui/components/conversation/event/card-message.js +2 -2
- package/src/javascripts/ui/components/conversation/event/carousel-component/components/controls.js +1 -1
- package/src/javascripts/ui/components/conversation/event/carousel-message/components/slide.js +1 -1
- package/src/javascripts/ui/components/conversation/event/carousel-message/index.js +2 -2
- package/src/javascripts/ui/components/conversation/event/choice-prompt.js +3 -3
- package/src/javascripts/ui/components/conversation/event/conversation-suggestions.js +19 -15
- package/src/javascripts/ui/components/conversation/event/cta.js +2 -2
- package/src/javascripts/ui/components/conversation/event/divider/variants/default.js +1 -1
- package/src/javascripts/ui/components/conversation/event/divider/variants/new-translation.js +44 -5
- package/src/javascripts/ui/components/conversation/event/event-participant.js +2 -2
- package/src/javascripts/ui/components/conversation/event/hooks/use-formatted-date.js +2 -2
- package/src/javascripts/ui/components/conversation/event/image-lightbox.js +1 -1
- package/src/javascripts/ui/components/conversation/event/image.js +6 -8
- package/src/javascripts/ui/components/conversation/event/participant.js +2 -2
- package/src/javascripts/ui/components/conversation/event/splash.js +4 -4
- package/src/javascripts/ui/components/conversation/event/text.js +2 -2
- package/src/javascripts/ui/components/conversation/event/translation.js +3 -3
- package/src/javascripts/ui/components/conversation/event/upload.js +3 -3
- package/src/javascripts/ui/components/conversation/event/video.js +2 -2
- package/src/javascripts/ui/components/conversation/message-container.js +4 -26
- package/src/javascripts/ui/components/core/seamly-api-context.js +1 -1
- package/src/javascripts/ui/components/core/seamly-core.js +15 -14
- package/src/javascripts/ui/components/core/seamly-event-subscriber.js +98 -92
- package/src/javascripts/ui/components/core/seamly-file-upload.js +20 -24
- package/src/javascripts/ui/components/core/seamly-initializer.js +1 -1
- package/src/javascripts/ui/components/core/seamly-instance-functions-loader.js +5 -4
- package/src/javascripts/ui/components/core/seamly-new-notifications.js +2 -2
- package/src/javascripts/ui/components/core/seamly-read-state.js +10 -17
- package/src/javascripts/ui/components/entry/deprecated-toggle-button.js +3 -3
- package/src/javascripts/ui/components/entry/entry-container.js +4 -6
- package/src/javascripts/ui/components/entry/text-entry/hooks.js +3 -3
- package/src/javascripts/ui/components/entry/text-entry/index.js +3 -2
- package/src/javascripts/ui/components/entry/text-entry/text-entry-form.js +6 -10
- package/src/javascripts/ui/components/entry/upload/file-upload-form.js +2 -2
- package/src/javascripts/ui/components/entry/upload/index.js +10 -9
- package/src/javascripts/ui/components/entry/upload-toggle.js +2 -2
- package/src/javascripts/ui/components/faq/faq.js +9 -7
- package/src/javascripts/ui/components/form-controls/file-input.js +1 -1
- package/src/javascripts/ui/components/form-controls/form.js +1 -1
- package/src/javascripts/ui/components/form-controls/input.js +1 -1
- package/src/javascripts/ui/components/form-controls/select.js +1 -1
- package/src/javascripts/ui/components/layout/agent-info.js +4 -4
- package/src/javascripts/ui/components/layout/chat-frame.js +3 -3
- package/src/javascripts/ui/components/layout/chat.js +11 -12
- package/src/javascripts/ui/components/layout/deprecated-app-frame.js +10 -9
- package/src/javascripts/ui/components/layout/header.js +1 -1
- package/src/javascripts/ui/components/layout/interrupt.js +23 -24
- package/src/javascripts/ui/components/layout/pre-chat-messages.js +11 -11
- package/src/javascripts/ui/components/layout/privacy-disclaimer.js +2 -2
- package/src/javascripts/ui/components/options/options-button.js +14 -10
- package/src/javascripts/ui/components/options/transcript/index.js +2 -2
- package/src/javascripts/ui/components/options/transcript/transcript-form.js +1 -1
- package/src/javascripts/ui/components/suggestions/index.js +14 -10
- package/src/javascripts/ui/components/view/deprecated-view.js +19 -16
- package/src/javascripts/ui/components/view/index.js +12 -12
- package/src/javascripts/ui/components/view/inline-view.js +2 -2
- package/src/javascripts/ui/components/view/window-view/collapse-button.js +3 -3
- package/src/javascripts/ui/components/view/window-view/index.js +13 -13
- package/src/javascripts/ui/components/view/window-view/window-open-button.js +13 -13
- package/src/javascripts/ui/components/warnings/idle-detach-warning.js +1 -1
- package/src/javascripts/ui/components/warnings/resume-conversation-prompt.js +1 -1
- package/src/javascripts/ui/components/widgets/lightbox.js +2 -2
- package/src/javascripts/ui/components/widgets/upload-progress.js +1 -1
- package/src/javascripts/ui/hooks/component-helper-hooks.js +1 -1
- package/src/javascripts/ui/hooks/file-upload-hooks.js +4 -6
- package/src/javascripts/ui/hooks/focus-helper-hooks.js +14 -12
- package/src/javascripts/ui/hooks/live-region-hooks.js +2 -0
- package/src/javascripts/ui/hooks/seamly-api-hooks.js +8 -3
- package/src/javascripts/ui/hooks/seamly-entry-hooks.js +28 -25
- package/src/javascripts/ui/hooks/seamly-hooks.js +25 -25
- package/src/javascripts/ui/hooks/seamly-option-hooks.js +17 -19
- package/src/javascripts/ui/hooks/seamly-state-hooks.js +20 -13
- package/src/javascripts/ui/hooks/use-seamly-chat.js +15 -25
- package/src/javascripts/ui/hooks/use-seamly-commands.js +46 -46
- package/src/javascripts/ui/hooks/use-seamly-idle-detach-countdown.js +22 -24
- package/src/javascripts/ui/hooks/use-seamly-resume-conversation-prompt.js +8 -9
- package/src/javascripts/ui/hooks/use-single-file-upload.js +4 -6
- package/src/javascripts/ui/hooks/utility-hooks.js +4 -4
- package/src/javascripts/ui/utils/form-utils.js +0 -145
- package/src/javascripts/ui/utils/general-utils.js +3 -4
- package/src/javascripts/ui/utils/seamly-utils.ts +73 -0
- package/src/stylesheets/5-components/_message-carousel.scss +10 -8
- package/webpack/config.common.js +16 -0
- package/webpack/config.dev.js +1 -0
- package/webpack/config.package.js +26 -5
- package/webpack/defaults.js +7 -2
- package/webpack/parts/babel-loader-browser-plugins.js +1 -0
- package/webpack/parts/dev-server.js +4 -3
- package/CHANGELOG.md +0 -791
- package/src/javascripts/domains/app/actions.js +0 -112
- package/src/javascripts/domains/app/index.js +0 -7
- package/src/javascripts/domains/app/reducer.js +0 -16
- package/src/javascripts/domains/app/selectors.js +0 -8
- package/src/javascripts/domains/app/utils.js +0 -4
- package/src/javascripts/domains/config/actions.js +0 -7
- package/src/javascripts/domains/config/hooks.js +0 -23
- package/src/javascripts/domains/config/index.js +0 -7
- package/src/javascripts/domains/config/reducer.js +0 -79
- package/src/javascripts/domains/config/selectors.js +0 -23
- package/src/javascripts/domains/config/utils.js +0 -4
- package/src/javascripts/domains/forms/actions.js +0 -21
- package/src/javascripts/domains/forms/context.js +0 -6
- package/src/javascripts/domains/forms/index.js +0 -8
- package/src/javascripts/domains/forms/reducer.js +0 -84
- package/src/javascripts/domains/forms/utils.js +0 -20
- package/src/javascripts/domains/i18n/actions.js +0 -20
- package/src/javascripts/domains/i18n/index.js +0 -7
- package/src/javascripts/domains/i18n/selectors.js +0 -15
- package/src/javascripts/domains/i18n/utils.js +0 -4
- package/src/javascripts/domains/interrupt/actions.js +0 -4
- package/src/javascripts/domains/interrupt/index.js +0 -9
- package/src/javascripts/domains/interrupt/reducer.js +0 -22
- package/src/javascripts/domains/interrupt/selectors.js +0 -6
- package/src/javascripts/domains/interrupt/utils.js +0 -4
- package/src/javascripts/domains/options/index.js +0 -1
- package/src/javascripts/domains/redux/context.js +0 -6
- package/src/javascripts/domains/redux/create-redux-store.js +0 -21
- package/src/javascripts/domains/redux/hooks.js +0 -80
- package/src/javascripts/domains/redux/index.js +0 -19
- package/src/javascripts/domains/redux/provider.js +0 -5
- package/src/javascripts/domains/redux/utils.js +0 -12
- package/src/javascripts/domains/store/index.js +0 -46
- package/src/javascripts/domains/store/state-reducer.js +0 -56
- package/src/javascripts/domains/translations/actions.js +0 -11
- package/src/javascripts/domains/translations/hooks.js +0 -103
- package/src/javascripts/domains/translations/index.js +0 -10
- package/src/javascripts/domains/translations/reducer.js +0 -69
- package/src/javascripts/domains/translations/selectors.js +0 -16
- package/src/javascripts/domains/translations/utils.js +0 -4
- package/src/javascripts/domains/visibility/index.js +0 -8
- package/src/javascripts/domains/visibility/reducer.js +0 -24
- package/src/javascripts/index.js +0 -153
- package/src/javascripts/lib/redux-helpers/index.js +0 -99
- package/src/javascripts/style-guide.js +0 -5
- package/src/javascripts/ui/hooks/use-seamly-dispatch.js +0 -3
- package/src/javascripts/ui/utils/seamly-utils.js +0 -832
|
@@ -0,0 +1,1448 @@
|
|
|
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
|
+
service?: components['schemas']['Service']
|
|
410
|
+
transactionId?: components['schemas']['TransactionId']
|
|
411
|
+
/** @description In case a translations was active when this message originated, this object will contain the translated message in the translationLocale locale. */
|
|
412
|
+
translatedBody?: {
|
|
413
|
+
data?: components['schemas']['ServiceDataBodySuggestion']
|
|
414
|
+
direction?: components['schemas']['Direction']
|
|
415
|
+
locale?: components['schemas']['Locale']
|
|
416
|
+
} | null
|
|
417
|
+
/**
|
|
418
|
+
* @description Type of the message body
|
|
419
|
+
* @example text
|
|
420
|
+
* @enum {string}
|
|
421
|
+
*/
|
|
422
|
+
type?: 'suggestion'
|
|
423
|
+
}
|
|
424
|
+
MessageParticipant: {
|
|
425
|
+
fromClient?: components['schemas']['FromClient']
|
|
426
|
+
fromHistory?: components['schemas']['FromHistory']
|
|
427
|
+
id?: components['schemas']['MessageId']
|
|
428
|
+
messageStatus?: components['schemas']['MessageStatus']
|
|
429
|
+
occurredAt?: components['schemas']['OccurredAt']
|
|
430
|
+
participant?: components['schemas']['Participant']
|
|
431
|
+
transactionId?: components['schemas']['TransactionId']
|
|
432
|
+
}
|
|
433
|
+
/** @description A divider when a new topic has started */
|
|
434
|
+
InfoBodyDividerNewTopic: {
|
|
435
|
+
/**
|
|
436
|
+
* @description The type of divider
|
|
437
|
+
* @example new_topic
|
|
438
|
+
* @enum {string}
|
|
439
|
+
*/
|
|
440
|
+
subtype?: 'new_topic'
|
|
441
|
+
}
|
|
442
|
+
/** @description A divider when translations was started or stopped */
|
|
443
|
+
InfoBodyDividerNewTranslation: {
|
|
444
|
+
/**
|
|
445
|
+
* @description The type of divider
|
|
446
|
+
* @example new_translation
|
|
447
|
+
* @enum {string}
|
|
448
|
+
*/
|
|
449
|
+
subtype?: 'new_translation'
|
|
450
|
+
/**
|
|
451
|
+
* @description Whether translations was turn on (true) or turned off (false)
|
|
452
|
+
* @example true
|
|
453
|
+
*/
|
|
454
|
+
translationEnabled?: boolean
|
|
455
|
+
/**
|
|
456
|
+
* @description The locale the user wants to speak.
|
|
457
|
+
* @example nl-informal
|
|
458
|
+
*/
|
|
459
|
+
translationLocale?: string | null
|
|
460
|
+
/**
|
|
461
|
+
* @description The native language name of the translation locale
|
|
462
|
+
* @example Deutsch
|
|
463
|
+
*/
|
|
464
|
+
language?: string
|
|
465
|
+
/**
|
|
466
|
+
* @description Title of the divider
|
|
467
|
+
* @example Übersetzen in Deutsch
|
|
468
|
+
*/
|
|
469
|
+
title?: string
|
|
470
|
+
/**
|
|
471
|
+
* @description Optional text for the divider
|
|
472
|
+
* @example Automatische Übersetzung nach Deutsch gestartet. Bitte beachten Sie, dass automatische Übersetzungen Fehler enthalten können. Die Übersetzungen werden von DeepL bereitgestellt.
|
|
473
|
+
*/
|
|
474
|
+
text?: string | null
|
|
475
|
+
/**
|
|
476
|
+
* @description Optional button text to re-start translations after the user has stopped translating.
|
|
477
|
+
* @example Neu beginnen
|
|
478
|
+
*/
|
|
479
|
+
restartButtonText?: string | null
|
|
480
|
+
}
|
|
481
|
+
/** @description An info text message */
|
|
482
|
+
InfoBodyText: {
|
|
483
|
+
/**
|
|
484
|
+
* @description Text of the info message
|
|
485
|
+
* @example The agent has left the building
|
|
486
|
+
*/
|
|
487
|
+
text?: string
|
|
488
|
+
}
|
|
489
|
+
/** @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. */
|
|
490
|
+
InfoBodyTranslation: {
|
|
491
|
+
/**
|
|
492
|
+
* @description The key of the translation to lookup in the translation file.
|
|
493
|
+
* @example [
|
|
494
|
+
* "info",
|
|
495
|
+
* "sendTranscript",
|
|
496
|
+
* "accepted"
|
|
497
|
+
* ]
|
|
498
|
+
*/
|
|
499
|
+
key?: string[]
|
|
500
|
+
/** @description Arbitrary variables to be used when rendering the ICU translation. */
|
|
501
|
+
variables?: { [key: string]: unknown }
|
|
502
|
+
}
|
|
503
|
+
/** @description A text message */
|
|
504
|
+
MessageBodyCard: {
|
|
505
|
+
action?:
|
|
506
|
+
| {
|
|
507
|
+
/** @description When the user clicks on this card this value will be submitted as if the user has typed it himself. */
|
|
508
|
+
ask?: string
|
|
509
|
+
/**
|
|
510
|
+
* @example ask
|
|
511
|
+
* @enum {string}
|
|
512
|
+
*/
|
|
513
|
+
type?: 'ask'
|
|
514
|
+
}
|
|
515
|
+
| {
|
|
516
|
+
/**
|
|
517
|
+
* @description To URL to navigate to when the user clicks on the card.
|
|
518
|
+
* @example https://www.google.com
|
|
519
|
+
*/
|
|
520
|
+
link?: string
|
|
521
|
+
/**
|
|
522
|
+
* @description Whether or not the link should be opened in a new window/tab.
|
|
523
|
+
* @example true
|
|
524
|
+
*/
|
|
525
|
+
newTab?: boolean
|
|
526
|
+
/**
|
|
527
|
+
* @example navigate
|
|
528
|
+
* @enum {string}
|
|
529
|
+
*/
|
|
530
|
+
type?: 'navigate'
|
|
531
|
+
}
|
|
532
|
+
| {
|
|
533
|
+
/**
|
|
534
|
+
* @description The new topic to start when the user clicks on the card.
|
|
535
|
+
* @example login
|
|
536
|
+
*/
|
|
537
|
+
topic?: string
|
|
538
|
+
/**
|
|
539
|
+
* @description Text displayed if, for whatever reason, starting the new topic fails.
|
|
540
|
+
* @example Sorry, I can help you right now
|
|
541
|
+
*/
|
|
542
|
+
fallbackMessage?: string
|
|
543
|
+
/**
|
|
544
|
+
* @example topic
|
|
545
|
+
* @enum {string}
|
|
546
|
+
*/
|
|
547
|
+
type?: 'topic'
|
|
548
|
+
}
|
|
549
|
+
/**
|
|
550
|
+
* @description Text to display on the button of the card
|
|
551
|
+
* @example Order now!
|
|
552
|
+
*/
|
|
553
|
+
buttonText?: string
|
|
554
|
+
/**
|
|
555
|
+
* @description Some more information to display on the card
|
|
556
|
+
* @example Pizza Margherita is a typical Neapolitan pizza.
|
|
557
|
+
*/
|
|
558
|
+
description?: string | null
|
|
559
|
+
/**
|
|
560
|
+
* @description Image to display on the card
|
|
561
|
+
* @example https://via.placeholder.com/150/003A5D/FFFFFF?text=Margherita
|
|
562
|
+
*/
|
|
563
|
+
image?: string
|
|
564
|
+
/**
|
|
565
|
+
* @description Title to display on the card
|
|
566
|
+
* @example Pizza Margherita
|
|
567
|
+
*/
|
|
568
|
+
title?: string | null
|
|
569
|
+
}
|
|
570
|
+
/** @description A carousel message */
|
|
571
|
+
MessageBodyCarousel: {
|
|
572
|
+
cards?: components['schemas']['MessageBodyCard'][]
|
|
573
|
+
}
|
|
574
|
+
/** @description A choice prompt message */
|
|
575
|
+
MessageBodyChoicePrompt: {
|
|
576
|
+
/** @description Choices to show to the user */
|
|
577
|
+
choices?: {
|
|
578
|
+
/**
|
|
579
|
+
* @description Optional category this choice belongs to. Allows the client to apply custom styling for example.
|
|
580
|
+
* @example invoice
|
|
581
|
+
*/
|
|
582
|
+
category?: string | null
|
|
583
|
+
/**
|
|
584
|
+
* @description Choice identifier. Required value to submit once the user selects this choice.
|
|
585
|
+
* @example 17b6b250-7299-41dd-8d23-09749197d792
|
|
586
|
+
*/
|
|
587
|
+
id?: string
|
|
588
|
+
/**
|
|
589
|
+
* @description The text of the choice
|
|
590
|
+
* @example My invoice
|
|
591
|
+
*/
|
|
592
|
+
text?: string
|
|
593
|
+
}[]
|
|
594
|
+
/**
|
|
595
|
+
* @description Whether or not the user is able to select a different choice later on.
|
|
596
|
+
* @example true
|
|
597
|
+
*/
|
|
598
|
+
chooseAgain?: boolean
|
|
599
|
+
prompt?: Partial<{
|
|
600
|
+
/**
|
|
601
|
+
* @description The prompt text
|
|
602
|
+
* @example What can I help you with?
|
|
603
|
+
*/
|
|
604
|
+
text?: string
|
|
605
|
+
/**
|
|
606
|
+
* @example text
|
|
607
|
+
* @enum {string}
|
|
608
|
+
*/
|
|
609
|
+
type?: 'text'
|
|
610
|
+
}> &
|
|
611
|
+
Partial<{
|
|
612
|
+
/**
|
|
613
|
+
* @description The prompt image
|
|
614
|
+
* @example https://via.placeholder.com/150/003A5D/FFFFFF?text=How can I help you?
|
|
615
|
+
*/
|
|
616
|
+
url?: string
|
|
617
|
+
/** @description Image description */
|
|
618
|
+
description?: string | null
|
|
619
|
+
/**
|
|
620
|
+
* @description Whether the image should be zoomable for the user
|
|
621
|
+
* @example true
|
|
622
|
+
*/
|
|
623
|
+
isZoomable?: boolean
|
|
624
|
+
/**
|
|
625
|
+
* @example image
|
|
626
|
+
* @enum {string}
|
|
627
|
+
*/
|
|
628
|
+
type?: 'image'
|
|
629
|
+
}>
|
|
630
|
+
}
|
|
631
|
+
/** @description A Call To Action (CTA) message */
|
|
632
|
+
MessageBodyCTA: {
|
|
633
|
+
/**
|
|
634
|
+
* @description URL of the CTA
|
|
635
|
+
* @example https://seamly.ai
|
|
636
|
+
*/
|
|
637
|
+
buttonLink?: string
|
|
638
|
+
/**
|
|
639
|
+
* @description Whether or not the link should be opened in a new window/tab
|
|
640
|
+
* @example true
|
|
641
|
+
*/
|
|
642
|
+
newTab?: boolean
|
|
643
|
+
/**
|
|
644
|
+
* @description Text on the CTA button
|
|
645
|
+
* @example Buy now!
|
|
646
|
+
*/
|
|
647
|
+
buttonText?: string
|
|
648
|
+
/**
|
|
649
|
+
* @description Text shown above the CTA button
|
|
650
|
+
* @example Would you like to order a pizza? Click on the button below!
|
|
651
|
+
*/
|
|
652
|
+
description?: string
|
|
653
|
+
}
|
|
654
|
+
/** @description A custom message to be used and designed for specific accounts */
|
|
655
|
+
MessageBodyCustom: {
|
|
656
|
+
/**
|
|
657
|
+
* @description String indicating the what type of custom message this is. Can be any string.
|
|
658
|
+
* @example alarm
|
|
659
|
+
*/
|
|
660
|
+
type?: string
|
|
661
|
+
/**
|
|
662
|
+
* @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.
|
|
663
|
+
* @example Attention! This is an emergency!
|
|
664
|
+
*/
|
|
665
|
+
text?: string
|
|
666
|
+
/**
|
|
667
|
+
* @description Arbitrary data of the custom message
|
|
668
|
+
* @example {
|
|
669
|
+
* "type": "emergency"
|
|
670
|
+
* }
|
|
671
|
+
*/
|
|
672
|
+
data?: { [key: string]: unknown }
|
|
673
|
+
}
|
|
674
|
+
/** @description An image message */
|
|
675
|
+
MessageBodyImage: {
|
|
676
|
+
/**
|
|
677
|
+
* @description The prompt image
|
|
678
|
+
* @example https://via.placeholder.com/150/003A5D/FFFFFF?text=How can I help you?
|
|
679
|
+
*/
|
|
680
|
+
url?: string
|
|
681
|
+
/** @description Image description */
|
|
682
|
+
description?: string | null
|
|
683
|
+
/**
|
|
684
|
+
* @description Whether the image should be zoomable for the user
|
|
685
|
+
* @example true
|
|
686
|
+
*/
|
|
687
|
+
isZoomable?: boolean
|
|
688
|
+
}
|
|
689
|
+
/** @description A text message that can be displayed highlighted for example */
|
|
690
|
+
MessageBodySplash: {
|
|
691
|
+
/**
|
|
692
|
+
* @description Text of the message
|
|
693
|
+
* @example Hi, how may I help?
|
|
694
|
+
*/
|
|
695
|
+
text?: string
|
|
696
|
+
}
|
|
697
|
+
/** @description A text message */
|
|
698
|
+
MessageBodyText: {
|
|
699
|
+
/**
|
|
700
|
+
* @description Text of the message
|
|
701
|
+
* @example Hi, how may I help?
|
|
702
|
+
*/
|
|
703
|
+
text?: string
|
|
704
|
+
}
|
|
705
|
+
/** @description An upload message */
|
|
706
|
+
MessageBodyUpload: {
|
|
707
|
+
/**
|
|
708
|
+
* @description Content type of the upload
|
|
709
|
+
* @example image/jpeg
|
|
710
|
+
*/
|
|
711
|
+
contentType?: string
|
|
712
|
+
/**
|
|
713
|
+
* @description Filename of the upload
|
|
714
|
+
* @example dog.jpg
|
|
715
|
+
*/
|
|
716
|
+
filename?: string
|
|
717
|
+
/**
|
|
718
|
+
* @description Filesize of the upload in bytes
|
|
719
|
+
* @example 7131
|
|
720
|
+
*/
|
|
721
|
+
filesize?: number
|
|
722
|
+
/**
|
|
723
|
+
* @description Internal identifier of the upload
|
|
724
|
+
* @example 9557ec25-ba9b-402f-a8cf-2ecf73477d50
|
|
725
|
+
*/
|
|
726
|
+
id?: string
|
|
727
|
+
}
|
|
728
|
+
/** @description A video message */
|
|
729
|
+
MessageBodyVideo: {
|
|
730
|
+
/**
|
|
731
|
+
* @description The url to the video
|
|
732
|
+
* @example https://www.youtube.com/embed/dQw4w9WgXcQ
|
|
733
|
+
*/
|
|
734
|
+
url?: string
|
|
735
|
+
/**
|
|
736
|
+
* @description Source of the video
|
|
737
|
+
* @example YouTube
|
|
738
|
+
*/
|
|
739
|
+
source?: string | null
|
|
740
|
+
/**
|
|
741
|
+
* @description Optional description to show alongside the video
|
|
742
|
+
* @example Rick Astley - Never Gonna Give You Up (Official Music Video)
|
|
743
|
+
*/
|
|
744
|
+
description?: string | null
|
|
745
|
+
}
|
|
746
|
+
/** @description A suggestion service data message */
|
|
747
|
+
ServiceDataBodySuggestion: {
|
|
748
|
+
/** @description Any categories the suggestion belongs to. May be used to style the suggestion for example. */
|
|
749
|
+
categories?: (number | string)[]
|
|
750
|
+
id?: number | string
|
|
751
|
+
/**
|
|
752
|
+
* @description The suggestion / question
|
|
753
|
+
* @example What are your opening hours?
|
|
754
|
+
*/
|
|
755
|
+
question?: string
|
|
756
|
+
}[]
|
|
757
|
+
/** @description Information about the current translation state */
|
|
758
|
+
Translation: {
|
|
759
|
+
/**
|
|
760
|
+
* @description Whether translation is turned on
|
|
761
|
+
* @example true
|
|
762
|
+
*/
|
|
763
|
+
enabled?: boolean
|
|
764
|
+
/**
|
|
765
|
+
* @description When enabled equals true, this property will contain the translation locale.
|
|
766
|
+
* @example nl-informal
|
|
767
|
+
*/
|
|
768
|
+
locale?: string
|
|
769
|
+
}
|
|
770
|
+
/**
|
|
771
|
+
* @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.
|
|
772
|
+
* @example to_translation_locale
|
|
773
|
+
* @enum {string}
|
|
774
|
+
*/
|
|
775
|
+
Direction: 'to_translation_locale' | 'from_translation_locale'
|
|
776
|
+
/**
|
|
777
|
+
* @description A string representation of a locale
|
|
778
|
+
* @example nl-informal
|
|
779
|
+
*/
|
|
780
|
+
Locale: string
|
|
781
|
+
/**
|
|
782
|
+
* @description Whether this message is sent by the user (true) or is received from a bot or agent (false).
|
|
783
|
+
* @example false
|
|
784
|
+
*/
|
|
785
|
+
FromClient: boolean
|
|
786
|
+
/**
|
|
787
|
+
* @description Whether this message was sent in the history request.
|
|
788
|
+
* @example false
|
|
789
|
+
*/
|
|
790
|
+
FromHistory: boolean
|
|
791
|
+
/**
|
|
792
|
+
* @description Unique identifier of the message
|
|
793
|
+
* @example 851c9e59-caf0-4f7f-9c69-39eac5617c36
|
|
794
|
+
*/
|
|
795
|
+
MessageId: string
|
|
796
|
+
/**
|
|
797
|
+
* @description Status of the message: "received" or "read".
|
|
798
|
+
* @example received
|
|
799
|
+
*/
|
|
800
|
+
MessageStatus: string
|
|
801
|
+
/**
|
|
802
|
+
* @description Timestamp of the message in microseconds
|
|
803
|
+
* @example 1660281438713581
|
|
804
|
+
*/
|
|
805
|
+
OccurredAt: number
|
|
806
|
+
/** @description Information about the participant */
|
|
807
|
+
Participant: {
|
|
808
|
+
/**
|
|
809
|
+
* @description The icon of the participant
|
|
810
|
+
* @example data:image/svg+xml;base64,.....
|
|
811
|
+
*/
|
|
812
|
+
avatar?: string
|
|
813
|
+
/**
|
|
814
|
+
* @description Reference to the participant of the message
|
|
815
|
+
* @example 07371d91-c95a-43b7-853b-fa870e3f789c
|
|
816
|
+
*/
|
|
817
|
+
id?: string
|
|
818
|
+
/**
|
|
819
|
+
* @description Introduction message of the participant
|
|
820
|
+
* @example Your digital assistant
|
|
821
|
+
*/
|
|
822
|
+
introduction?: string | null
|
|
823
|
+
/**
|
|
824
|
+
* @description The name of the participant
|
|
825
|
+
* @example ACME bot
|
|
826
|
+
*/
|
|
827
|
+
name?: string
|
|
828
|
+
service?: components['schemas']['Service']
|
|
829
|
+
/** @description In case a translations was active when this message originated, this object will contain the translated introduction in the translationLocale locale. */
|
|
830
|
+
translatedIntroduction?: {
|
|
831
|
+
/**
|
|
832
|
+
* @description The translated introduction
|
|
833
|
+
* @example Jouw digitale assistent
|
|
834
|
+
*/
|
|
835
|
+
data?: string
|
|
836
|
+
direction?: components['schemas']['Direction']
|
|
837
|
+
locale?: components['schemas']['Locale']
|
|
838
|
+
} | null
|
|
839
|
+
/** @description Arbitrary variables of this participant. */
|
|
840
|
+
variables?: { [key: string]: unknown }
|
|
841
|
+
}
|
|
842
|
+
/** @description Information the attached service exposes to the client */
|
|
843
|
+
Service: {
|
|
844
|
+
/**
|
|
845
|
+
* @description May include any information
|
|
846
|
+
* @example {
|
|
847
|
+
* "additions": {
|
|
848
|
+
* "displayChoices": "horizontal"
|
|
849
|
+
* }
|
|
850
|
+
* }
|
|
851
|
+
*/
|
|
852
|
+
meta?: { [key: string]: unknown }
|
|
853
|
+
/**
|
|
854
|
+
* @description Name of the attached service
|
|
855
|
+
* @example livechat
|
|
856
|
+
*/
|
|
857
|
+
name?: string
|
|
858
|
+
/**
|
|
859
|
+
* @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.
|
|
860
|
+
* @example c18c86f3-a31f-4a61-a4f3-f805b5b71883
|
|
861
|
+
*/
|
|
862
|
+
serviceSessionId?: string
|
|
863
|
+
}
|
|
864
|
+
/**
|
|
865
|
+
* @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.
|
|
866
|
+
* @example ddff6efa-619a-497d-854c-f6a111f19196
|
|
867
|
+
*/
|
|
868
|
+
TransactionId: string
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
export interface operations {
|
|
873
|
+
/** Get account settings and conversation defaults */
|
|
874
|
+
getAccountConfig: {
|
|
875
|
+
parameters: {
|
|
876
|
+
path: {
|
|
877
|
+
/** Seamly account API key */
|
|
878
|
+
apiKey: string
|
|
879
|
+
}
|
|
880
|
+
query: {
|
|
881
|
+
/** Seamly API Version to use */
|
|
882
|
+
v: number
|
|
883
|
+
}
|
|
884
|
+
}
|
|
885
|
+
responses: {
|
|
886
|
+
/** Success response */
|
|
887
|
+
201: {
|
|
888
|
+
content: {
|
|
889
|
+
'application/json': {
|
|
890
|
+
config?: {
|
|
891
|
+
agentParticipant?: {
|
|
892
|
+
/**
|
|
893
|
+
* @description The default avatar of the agent participant. This can be used until an actual participant is received over the websocket.
|
|
894
|
+
* @example data:image/svg+xml;base64,.....
|
|
895
|
+
*/
|
|
896
|
+
avatar?: string
|
|
897
|
+
/**
|
|
898
|
+
* @description The default name of the agent participant. This can be used until an actual participant is received over the websocket.
|
|
899
|
+
* @example ACME Assistant
|
|
900
|
+
*/
|
|
901
|
+
name?: string
|
|
902
|
+
}
|
|
903
|
+
/**
|
|
904
|
+
* @description The default locale as configured in the Seamly account.
|
|
905
|
+
* @example nl-informal
|
|
906
|
+
*/
|
|
907
|
+
defaultLocale?: string
|
|
908
|
+
features?: {
|
|
909
|
+
sendTranscript?: {
|
|
910
|
+
/**
|
|
911
|
+
* @description Whether the Send Transcript feature is available to allow users to receive a transcript of their conversation history by mail.
|
|
912
|
+
* @example true
|
|
913
|
+
*/
|
|
914
|
+
enabled?: boolean
|
|
915
|
+
/**
|
|
916
|
+
* @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".
|
|
917
|
+
* @example 86400000
|
|
918
|
+
*/
|
|
919
|
+
period?: number
|
|
920
|
+
}
|
|
921
|
+
translation?: {
|
|
922
|
+
/** @description Whether the Translation feature is available to allow users to chat in a different language. */
|
|
923
|
+
enabled?: boolean
|
|
924
|
+
/** @description The list of languages the user is allowed to type in. */
|
|
925
|
+
languages?: {
|
|
926
|
+
/**
|
|
927
|
+
* @description The locale of the language
|
|
928
|
+
* @example de-informal
|
|
929
|
+
*/
|
|
930
|
+
locale?: string
|
|
931
|
+
/**
|
|
932
|
+
* @description The name of the language in the language itself
|
|
933
|
+
* @example Deutsch
|
|
934
|
+
*/
|
|
935
|
+
nativeName?: string
|
|
936
|
+
}[]
|
|
937
|
+
}
|
|
938
|
+
typingPeekahead?: {
|
|
939
|
+
/** @description Whether the Typing Peekahead feature is available and the client should send typed in text to Seamly, while the user is typing. */
|
|
940
|
+
enabled?: boolean
|
|
941
|
+
}
|
|
942
|
+
uploads?: {
|
|
943
|
+
/**
|
|
944
|
+
* @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.
|
|
945
|
+
* @example false
|
|
946
|
+
*/
|
|
947
|
+
enabled?: boolean
|
|
948
|
+
}
|
|
949
|
+
}
|
|
950
|
+
/** @description A list of messages to show to the user (before the conversation is started) to trigger the user to open up the chat. */
|
|
951
|
+
preChat?: {
|
|
952
|
+
body?: {
|
|
953
|
+
/**
|
|
954
|
+
* @description Text of the pre chat message
|
|
955
|
+
* @example Hi, how can I help?
|
|
956
|
+
*/
|
|
957
|
+
text?: string
|
|
958
|
+
}
|
|
959
|
+
/**
|
|
960
|
+
* @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.
|
|
961
|
+
* @example false
|
|
962
|
+
*/
|
|
963
|
+
fromClient?: boolean
|
|
964
|
+
/** @description In case a translationLocale was passed this object will contain the translated message in the translationLocale locale. */
|
|
965
|
+
translatedBody?: {
|
|
966
|
+
/**
|
|
967
|
+
* @description Text of the pre chat message
|
|
968
|
+
* @example Hoi, hoe kan ik je helpen?
|
|
969
|
+
*/
|
|
970
|
+
text?: string
|
|
971
|
+
}
|
|
972
|
+
/**
|
|
973
|
+
* @description The type of the message. Will always be "splash" for pre chat messages.
|
|
974
|
+
* @example splash
|
|
975
|
+
*/
|
|
976
|
+
type?: string
|
|
977
|
+
}[]
|
|
978
|
+
/**
|
|
979
|
+
* @description The icon that can be used as a (hovering / sticky) button on the website to trigger users to open the chat.
|
|
980
|
+
* @example data:image/svg+xml;base64,.....
|
|
981
|
+
*/
|
|
982
|
+
startChatIcon?: string
|
|
983
|
+
/** @description Visual information about how to render the user participant. */
|
|
984
|
+
userParticipant?: {
|
|
985
|
+
/**
|
|
986
|
+
* @description Avatar of the user
|
|
987
|
+
* @example data:image/svg+xml;base64,.....
|
|
988
|
+
*/
|
|
989
|
+
avatar?: string
|
|
990
|
+
}
|
|
991
|
+
}
|
|
992
|
+
_links?: {
|
|
993
|
+
conversations?: {
|
|
994
|
+
/**
|
|
995
|
+
* @description The endpoint to create a new conversation
|
|
996
|
+
* @example /client/f38c06f4-283b-4011-8672-4923cbdc8f26/conversations?srv_id=3010109
|
|
997
|
+
*/
|
|
998
|
+
href?: string
|
|
999
|
+
}
|
|
1000
|
+
self?: {
|
|
1001
|
+
/**
|
|
1002
|
+
* @description The endpoint of the current request
|
|
1003
|
+
* @example /client/f38c06f4-283b-4011-8672-4923cbdc8f26/configs?v=2
|
|
1004
|
+
*/
|
|
1005
|
+
href?: string
|
|
1006
|
+
}
|
|
1007
|
+
socket?: {
|
|
1008
|
+
/**
|
|
1009
|
+
* @description The endpoint of the conversation websocket
|
|
1010
|
+
* @example /client/f38c06f4-283b-4011-8672-4923cbdc8f26/socket/websocket?srv_id=3010109
|
|
1011
|
+
*/
|
|
1012
|
+
href?: string
|
|
1013
|
+
}
|
|
1014
|
+
translations?: {
|
|
1015
|
+
/**
|
|
1016
|
+
* @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').
|
|
1017
|
+
* @example /client/f38c06f4-283b-4011-8672-4923cbdc8f26/translations/{version}/{locale}
|
|
1018
|
+
*/
|
|
1019
|
+
href?: string
|
|
1020
|
+
/**
|
|
1021
|
+
* @description Indicating whether the URI provided in the href property has keywords that must be replaced.
|
|
1022
|
+
* @example true
|
|
1023
|
+
*/
|
|
1024
|
+
templated?: boolean
|
|
1025
|
+
}
|
|
1026
|
+
}
|
|
1027
|
+
}
|
|
1028
|
+
}
|
|
1029
|
+
}
|
|
1030
|
+
/** Error when parsing the request failed */
|
|
1031
|
+
400: {
|
|
1032
|
+
content: {
|
|
1033
|
+
'application/json': {
|
|
1034
|
+
/**
|
|
1035
|
+
* @description The error message
|
|
1036
|
+
* @example server_error
|
|
1037
|
+
*/
|
|
1038
|
+
error?: string
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1042
|
+
/** Error when no valid api key was passed */
|
|
1043
|
+
404: {
|
|
1044
|
+
content: {
|
|
1045
|
+
'application/json': {
|
|
1046
|
+
/**
|
|
1047
|
+
* @description The error message
|
|
1048
|
+
* @example not_found
|
|
1049
|
+
*/
|
|
1050
|
+
error?: string
|
|
1051
|
+
}
|
|
1052
|
+
}
|
|
1053
|
+
}
|
|
1054
|
+
}
|
|
1055
|
+
/** Payload */
|
|
1056
|
+
requestBody: {
|
|
1057
|
+
content: {
|
|
1058
|
+
'application/json': {
|
|
1059
|
+
context: {
|
|
1060
|
+
/**
|
|
1061
|
+
* @description The name of the channel to use, as configured in your Seamly account.
|
|
1062
|
+
* @example web
|
|
1063
|
+
*/
|
|
1064
|
+
channelName: string
|
|
1065
|
+
/** @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. */
|
|
1066
|
+
environment?: {
|
|
1067
|
+
/**
|
|
1068
|
+
* @description The name of the client application.
|
|
1069
|
+
* @example @seamly/web-ui
|
|
1070
|
+
*/
|
|
1071
|
+
clientName?: string
|
|
1072
|
+
/**
|
|
1073
|
+
* @description The variant of the client application, to distinguish between different use cases of the client. For example 'inline' versus 'popup'.
|
|
1074
|
+
* @example inline
|
|
1075
|
+
*/
|
|
1076
|
+
clientVariant?: string
|
|
1077
|
+
/**
|
|
1078
|
+
* @description The version of the client application.
|
|
1079
|
+
* @example 20.3.0
|
|
1080
|
+
*/
|
|
1081
|
+
clientVersion?: string
|
|
1082
|
+
/**
|
|
1083
|
+
* @description The URL the user currently is on.
|
|
1084
|
+
* @example https://seamly.ai/en/contact-us/
|
|
1085
|
+
*/
|
|
1086
|
+
currentUrl?: string
|
|
1087
|
+
/**
|
|
1088
|
+
* @description The screen resolution of the user.
|
|
1089
|
+
* @example 2560x1440
|
|
1090
|
+
*/
|
|
1091
|
+
screenResolution?: string
|
|
1092
|
+
/**
|
|
1093
|
+
* @description The timezone of the user.
|
|
1094
|
+
* @example Europe/Amsterdam
|
|
1095
|
+
*/
|
|
1096
|
+
timezone?: string
|
|
1097
|
+
/**
|
|
1098
|
+
* @description The user agent of the user.
|
|
1099
|
+
* @example Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36
|
|
1100
|
+
*/
|
|
1101
|
+
userAgent?: string
|
|
1102
|
+
}
|
|
1103
|
+
/**
|
|
1104
|
+
* @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.
|
|
1105
|
+
* @example nl-informal
|
|
1106
|
+
*/
|
|
1107
|
+
locale: string
|
|
1108
|
+
/**
|
|
1109
|
+
* @description Optional translation locale; the locale the user immediately starts translating to.
|
|
1110
|
+
* @example null
|
|
1111
|
+
*/
|
|
1112
|
+
translationLocale?: string
|
|
1113
|
+
/** @description Arbitrary variables used to customize the returned configuration. The sent variables are not stored and are not used in a potentially upcoming conversation. */
|
|
1114
|
+
variables?: { [key: string]: unknown }
|
|
1115
|
+
}
|
|
1116
|
+
}
|
|
1117
|
+
}
|
|
1118
|
+
}
|
|
1119
|
+
}
|
|
1120
|
+
getAccountTranslations: {
|
|
1121
|
+
parameters: {
|
|
1122
|
+
path: {
|
|
1123
|
+
/** Seamly account API key */
|
|
1124
|
+
apiKey: string
|
|
1125
|
+
/** Translation file version */
|
|
1126
|
+
version: number
|
|
1127
|
+
/** Locale to get translations for */
|
|
1128
|
+
locale: string
|
|
1129
|
+
}
|
|
1130
|
+
}
|
|
1131
|
+
responses: {
|
|
1132
|
+
/** Success response */
|
|
1133
|
+
200: {
|
|
1134
|
+
content: {
|
|
1135
|
+
'application/json': {
|
|
1136
|
+
/**
|
|
1137
|
+
* @description Key value pairs of labels and ICU texts.
|
|
1138
|
+
* @example {
|
|
1139
|
+
* "account.preChatText": "Hallo! Kan ik je ergens mee helpen?",
|
|
1140
|
+
* "carousel.controls.next": "Volgende",
|
|
1141
|
+
* "carousel.controls.previous": "Vorige"
|
|
1142
|
+
* }
|
|
1143
|
+
*/
|
|
1144
|
+
translations?: { [key: string]: unknown }
|
|
1145
|
+
}
|
|
1146
|
+
}
|
|
1147
|
+
}
|
|
1148
|
+
/** Error when parsing the request failed, for example due to an invalid locale. */
|
|
1149
|
+
400: {
|
|
1150
|
+
content: {
|
|
1151
|
+
'plain/text': string
|
|
1152
|
+
}
|
|
1153
|
+
}
|
|
1154
|
+
/** Error when no valid api key was passed, or when the requested locale is not available for the account. */
|
|
1155
|
+
404: {
|
|
1156
|
+
content: {
|
|
1157
|
+
'application/json': {
|
|
1158
|
+
/**
|
|
1159
|
+
* @description The error message
|
|
1160
|
+
* @example not_found
|
|
1161
|
+
*/
|
|
1162
|
+
error?: string
|
|
1163
|
+
}
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
1167
|
+
}
|
|
1168
|
+
/** Create a new conversation. The full URL should be obtained from the HAL links as returned by the configs endpoint. */
|
|
1169
|
+
createConversation: {
|
|
1170
|
+
parameters: {
|
|
1171
|
+
path: {
|
|
1172
|
+
/** Seamly account API key */
|
|
1173
|
+
apiKey: string
|
|
1174
|
+
}
|
|
1175
|
+
query: {
|
|
1176
|
+
/** Required reference to a Seamly server. Must be obtained from the HAL links as returned by the configs endpoint. */
|
|
1177
|
+
srv_id: string
|
|
1178
|
+
/** Seamly API Version to use */
|
|
1179
|
+
v: number
|
|
1180
|
+
}
|
|
1181
|
+
}
|
|
1182
|
+
responses: {
|
|
1183
|
+
/** Success response */
|
|
1184
|
+
201: {
|
|
1185
|
+
content: {
|
|
1186
|
+
'application/json': components['schemas']['ConversationResponse']
|
|
1187
|
+
}
|
|
1188
|
+
}
|
|
1189
|
+
/** Error when parsing the request failed */
|
|
1190
|
+
400: {
|
|
1191
|
+
content: {
|
|
1192
|
+
'plain/text': string
|
|
1193
|
+
}
|
|
1194
|
+
}
|
|
1195
|
+
/** Error when creating the conversation failed */
|
|
1196
|
+
404: {
|
|
1197
|
+
content: {
|
|
1198
|
+
'application/json': {
|
|
1199
|
+
/**
|
|
1200
|
+
* @description The error message
|
|
1201
|
+
* @example not_found
|
|
1202
|
+
*/
|
|
1203
|
+
error?: string
|
|
1204
|
+
}
|
|
1205
|
+
}
|
|
1206
|
+
}
|
|
1207
|
+
}
|
|
1208
|
+
/** Payload */
|
|
1209
|
+
requestBody: {
|
|
1210
|
+
content: {
|
|
1211
|
+
'application/json': {
|
|
1212
|
+
/**
|
|
1213
|
+
* @description Optional external id to identify the conversation
|
|
1214
|
+
* @example hjlbh5e5vek0p7gd8d9g9st28d6kowrk
|
|
1215
|
+
*/
|
|
1216
|
+
externalId?: string | null
|
|
1217
|
+
} | null
|
|
1218
|
+
}
|
|
1219
|
+
}
|
|
1220
|
+
}
|
|
1221
|
+
/** Get conversation to be resumed. The full URL should be obtained from the HAL links as returned by the POST conversations endpoint. */
|
|
1222
|
+
getConversation: {
|
|
1223
|
+
parameters: {
|
|
1224
|
+
path: {
|
|
1225
|
+
/** Seamly account API key */
|
|
1226
|
+
apiKey: string
|
|
1227
|
+
/** Id of the conversation */
|
|
1228
|
+
conversationId: string
|
|
1229
|
+
}
|
|
1230
|
+
query: {
|
|
1231
|
+
/** Required reference to a Seamly server. Must be obtained from the HAL links as returned by the configs endpoint. */
|
|
1232
|
+
srv_id: string
|
|
1233
|
+
/** Seamly API Version to use */
|
|
1234
|
+
v: number
|
|
1235
|
+
}
|
|
1236
|
+
}
|
|
1237
|
+
responses: {
|
|
1238
|
+
/** Success response */
|
|
1239
|
+
200: {
|
|
1240
|
+
content: {
|
|
1241
|
+
'application/json': components['schemas']['ConversationResponse']
|
|
1242
|
+
}
|
|
1243
|
+
}
|
|
1244
|
+
/** Invalid access token provided */
|
|
1245
|
+
401: {
|
|
1246
|
+
content: {
|
|
1247
|
+
'application/json': {
|
|
1248
|
+
/**
|
|
1249
|
+
* @description The error message
|
|
1250
|
+
* @example unauthorized
|
|
1251
|
+
*/
|
|
1252
|
+
error?: string
|
|
1253
|
+
}
|
|
1254
|
+
}
|
|
1255
|
+
}
|
|
1256
|
+
/** Error when no valid api key was passed or when the conversation does not exist (anymore) */
|
|
1257
|
+
404: {
|
|
1258
|
+
content: {
|
|
1259
|
+
'application/json': {
|
|
1260
|
+
/**
|
|
1261
|
+
* @description The error message
|
|
1262
|
+
* @example not_found
|
|
1263
|
+
*/
|
|
1264
|
+
error?: string
|
|
1265
|
+
}
|
|
1266
|
+
}
|
|
1267
|
+
}
|
|
1268
|
+
/** Something went wrong internally */
|
|
1269
|
+
500: {
|
|
1270
|
+
content: {
|
|
1271
|
+
'application/json': {
|
|
1272
|
+
/**
|
|
1273
|
+
* @description The error message
|
|
1274
|
+
* @example timeout
|
|
1275
|
+
*/
|
|
1276
|
+
error?: string
|
|
1277
|
+
}
|
|
1278
|
+
}
|
|
1279
|
+
}
|
|
1280
|
+
}
|
|
1281
|
+
}
|
|
1282
|
+
/** 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. */
|
|
1283
|
+
getConversationHistory: {
|
|
1284
|
+
parameters: {
|
|
1285
|
+
path: {
|
|
1286
|
+
/** Seamly account API key */
|
|
1287
|
+
apiKey: string
|
|
1288
|
+
/** Id of the conversation */
|
|
1289
|
+
conversationId: string
|
|
1290
|
+
}
|
|
1291
|
+
query: {
|
|
1292
|
+
/** Required reference to a Seamly server. Must be obtained from the HAL links as returned by the configs endpoint. */
|
|
1293
|
+
srv_id: string
|
|
1294
|
+
/** Seamly API Version to use */
|
|
1295
|
+
v: number
|
|
1296
|
+
}
|
|
1297
|
+
}
|
|
1298
|
+
responses: {
|
|
1299
|
+
/** Success response */
|
|
1300
|
+
200: {
|
|
1301
|
+
content: {
|
|
1302
|
+
'application/json': components['schemas']['ConversationHistoryResponse']
|
|
1303
|
+
}
|
|
1304
|
+
}
|
|
1305
|
+
/** Invalid access token provided */
|
|
1306
|
+
401: {
|
|
1307
|
+
content: {
|
|
1308
|
+
'application/json': {
|
|
1309
|
+
/**
|
|
1310
|
+
* @description The error message
|
|
1311
|
+
* @example unauthorized
|
|
1312
|
+
*/
|
|
1313
|
+
error?: string
|
|
1314
|
+
}
|
|
1315
|
+
}
|
|
1316
|
+
}
|
|
1317
|
+
/** Error when no valid api key was passed or when the conversation does not exist (anymore) */
|
|
1318
|
+
404: {
|
|
1319
|
+
content: {
|
|
1320
|
+
'application/json': {
|
|
1321
|
+
/**
|
|
1322
|
+
* @description The error message
|
|
1323
|
+
* @example not_found
|
|
1324
|
+
*/
|
|
1325
|
+
error?: string
|
|
1326
|
+
}
|
|
1327
|
+
}
|
|
1328
|
+
}
|
|
1329
|
+
/** Something went wrong internally */
|
|
1330
|
+
500: {
|
|
1331
|
+
content: {
|
|
1332
|
+
'application/json': {
|
|
1333
|
+
/**
|
|
1334
|
+
* @description The error message
|
|
1335
|
+
* @example timeout
|
|
1336
|
+
*/
|
|
1337
|
+
error?: string
|
|
1338
|
+
}
|
|
1339
|
+
}
|
|
1340
|
+
}
|
|
1341
|
+
}
|
|
1342
|
+
}
|
|
1343
|
+
/** 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. */
|
|
1344
|
+
createConversationUpload: {
|
|
1345
|
+
parameters: {
|
|
1346
|
+
path: {
|
|
1347
|
+
/** Seamly account API key */
|
|
1348
|
+
apiKey: string
|
|
1349
|
+
/** Id of the conversation */
|
|
1350
|
+
conversationId: string
|
|
1351
|
+
}
|
|
1352
|
+
query: {
|
|
1353
|
+
/** Required reference to a Seamly server. Must be obtained from the HAL links as returned by the configs endpoint. */
|
|
1354
|
+
srv_id: string
|
|
1355
|
+
}
|
|
1356
|
+
}
|
|
1357
|
+
responses: {
|
|
1358
|
+
/** Success response. Will contain a message with type "upload". */
|
|
1359
|
+
201: {
|
|
1360
|
+
content: {
|
|
1361
|
+
'application/json': components['schemas']['MessageMessage']
|
|
1362
|
+
}
|
|
1363
|
+
}
|
|
1364
|
+
/** Failed to process the upload */
|
|
1365
|
+
400: {
|
|
1366
|
+
content: {
|
|
1367
|
+
'application/json': {
|
|
1368
|
+
/**
|
|
1369
|
+
* @description The error message
|
|
1370
|
+
* @example file_uploads_are_disabled
|
|
1371
|
+
*/
|
|
1372
|
+
error?: string
|
|
1373
|
+
}
|
|
1374
|
+
}
|
|
1375
|
+
}
|
|
1376
|
+
/** Invalid access token provided */
|
|
1377
|
+
401: {
|
|
1378
|
+
content: {
|
|
1379
|
+
'application/json': {
|
|
1380
|
+
/**
|
|
1381
|
+
* @description The error message
|
|
1382
|
+
* @example unauthorized
|
|
1383
|
+
*/
|
|
1384
|
+
error?: string
|
|
1385
|
+
}
|
|
1386
|
+
}
|
|
1387
|
+
}
|
|
1388
|
+
/** Error when no valid api key was passed or when the conversation does not exist (anymore) */
|
|
1389
|
+
404: {
|
|
1390
|
+
content: {
|
|
1391
|
+
'application/json': {
|
|
1392
|
+
/**
|
|
1393
|
+
* @description The error message
|
|
1394
|
+
* @example not_found
|
|
1395
|
+
*/
|
|
1396
|
+
error?: string
|
|
1397
|
+
}
|
|
1398
|
+
}
|
|
1399
|
+
}
|
|
1400
|
+
/** Uploaded file is too large */
|
|
1401
|
+
413: {
|
|
1402
|
+
content: {
|
|
1403
|
+
'application/json': {
|
|
1404
|
+
/**
|
|
1405
|
+
* @description The error message
|
|
1406
|
+
* @example request_entity_too_large
|
|
1407
|
+
*/
|
|
1408
|
+
error?: string
|
|
1409
|
+
}
|
|
1410
|
+
}
|
|
1411
|
+
}
|
|
1412
|
+
/** Uploaded file has an unsupprted mime type */
|
|
1413
|
+
415: {
|
|
1414
|
+
content: {
|
|
1415
|
+
'application/json': {
|
|
1416
|
+
/**
|
|
1417
|
+
* @description The error message
|
|
1418
|
+
* @example file_has_invalid_mime_type
|
|
1419
|
+
*/
|
|
1420
|
+
error?: string
|
|
1421
|
+
}
|
|
1422
|
+
}
|
|
1423
|
+
}
|
|
1424
|
+
/** Something went wrong internally */
|
|
1425
|
+
500: {
|
|
1426
|
+
content: {
|
|
1427
|
+
'application/json': {
|
|
1428
|
+
/**
|
|
1429
|
+
* @description The error message
|
|
1430
|
+
* @example timeout
|
|
1431
|
+
*/
|
|
1432
|
+
error?: string
|
|
1433
|
+
}
|
|
1434
|
+
}
|
|
1435
|
+
}
|
|
1436
|
+
}
|
|
1437
|
+
requestBody: {
|
|
1438
|
+
content: {
|
|
1439
|
+
'multipart/form-data': {
|
|
1440
|
+
/** Format: binary */
|
|
1441
|
+
upload?: string
|
|
1442
|
+
}
|
|
1443
|
+
}
|
|
1444
|
+
}
|
|
1445
|
+
}
|
|
1446
|
+
}
|
|
1447
|
+
|
|
1448
|
+
export interface external {}
|