@seamly/web-ui 24.5.0-beta.1 → 25.0.0

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 (152) hide show
  1. package/build/dist/lib/index.debug.js +2077 -1786
  2. package/build/dist/lib/index.debug.js.map +1 -1
  3. package/build/dist/lib/index.debug.min.js +1 -1
  4. package/build/dist/lib/index.debug.min.js.LICENSE.txt +49 -7
  5. package/build/dist/lib/index.debug.min.js.map +1 -1
  6. package/build/dist/lib/index.js +695 -384
  7. package/build/dist/lib/index.js.map +1 -1
  8. package/build/dist/lib/index.min.js +1 -1
  9. package/build/dist/lib/index.min.js.LICENSE.txt +16 -1
  10. package/build/dist/lib/index.min.js.map +1 -1
  11. package/build/dist/lib/style-guide.js +305 -93
  12. package/build/dist/lib/style-guide.js.map +1 -1
  13. package/build/dist/lib/style-guide.min.js +1 -1
  14. package/build/dist/lib/style-guide.min.js.map +1 -1
  15. package/build/dist/lib/styles-default-implementation.css +1 -1
  16. package/build/dist/lib/styles.css +1 -1
  17. package/package.json +27 -38
  18. package/src/javascripts/core/api/api.types.ts +3 -0
  19. package/src/javascripts/core/api/asyncapi.types.ts +292 -69
  20. package/src/javascripts/core/api/channel.types.ts +301 -69
  21. package/src/javascripts/core/api/conversation-connector.ts +1 -3
  22. package/src/javascripts/core/api/errors/seamly-api-error.ts +0 -1
  23. package/src/javascripts/core/api/errors/seamly-base-error.ts +1 -1
  24. package/src/javascripts/core/api/index.ts +7 -7
  25. package/src/javascripts/core/api/utils.ts +0 -1
  26. package/src/javascripts/core/domains/app/actions.ts +1 -1
  27. package/src/javascripts/core/domains/app/hooks.ts +1 -1
  28. package/src/javascripts/core/domains/config/hooks.ts +1 -1
  29. package/src/javascripts/core/domains/config/selectors.ts +1 -1
  30. package/src/javascripts/core/domains/config/slice.ts +2 -2
  31. package/src/javascripts/core/domains/forms/context.ts +1 -1
  32. package/src/javascripts/core/domains/forms/hooks.ts +12 -12
  33. package/src/javascripts/core/domains/forms/provider.tsx +9 -9
  34. package/src/javascripts/core/domains/i18n/actions.ts +1 -1
  35. package/src/javascripts/core/domains/i18n/hooks.ts +3 -3
  36. package/src/javascripts/core/domains/interrupt/hooks.ts +1 -1
  37. package/src/javascripts/core/domains/store/index.ts +2 -2
  38. package/src/javascripts/core/domains/store/slice.ts +46 -34
  39. package/src/javascripts/core/domains/store/store.types.ts +2 -7
  40. package/src/javascripts/core/domains/translations/components/options-button.tsx +2 -2
  41. package/src/javascripts/core/domains/translations/components/options-dialog/index.tsx +1 -1
  42. package/src/javascripts/core/domains/translations/components/options-dialog/translation-option.tsx +1 -1
  43. package/src/javascripts/core/domains/translations/components/options-dialog/translation-options.tsx +2 -2
  44. package/src/javascripts/core/domains/translations/components/translation-status.tsx +1 -1
  45. package/src/javascripts/core/domains/translations/hooks.ts +2 -2
  46. package/src/javascripts/core/domains/translations/middleware.ts +4 -2
  47. package/src/javascripts/core/domains/visibility/actions.ts +2 -2
  48. package/src/javascripts/core/domains/visibility/hooks.ts +5 -5
  49. package/src/javascripts/core/lib/debug.ts +1 -1
  50. package/src/javascripts/core/lib/engine/index.tsx +5 -5
  51. package/src/javascripts/core/lib/external-api/index.ts +6 -6
  52. package/src/javascripts/core/lib/mutex.ts +0 -1
  53. package/src/javascripts/core/lib/split-url-params.ts +1 -1
  54. package/src/javascripts/core/lib/store/index.ts +0 -1
  55. package/src/javascripts/core/lib/store/providers/app-storage.js +4 -7
  56. package/src/javascripts/core/lib/store/providers/app-storage.ts +4 -6
  57. package/src/javascripts/core/ui/components/app-options/index.tsx +1 -1
  58. package/src/javascripts/core/ui/components/chat-status/index.tsx +1 -1
  59. package/src/javascripts/core/ui/components/conversation/component-filter.tsx +1 -3
  60. package/src/javascripts/core/ui/components/conversation/event/card-component.tsx +3 -3
  61. package/src/javascripts/core/ui/components/conversation/event/carousel-component/components/pagination.tsx +1 -1
  62. package/src/javascripts/core/ui/components/conversation/event/carousel-component/index.tsx +1 -1
  63. package/src/javascripts/core/ui/components/conversation/event/chat-scroll/chat-scroll-provider.tsx +1 -1
  64. package/src/javascripts/core/ui/components/conversation/event/choice-prompt.tsx +4 -4
  65. package/src/javascripts/core/ui/components/conversation/event/conversation-suggestions.tsx +1 -1
  66. package/src/javascripts/core/ui/components/conversation/event/divider/variants/new-translation.tsx +3 -3
  67. package/src/javascripts/core/ui/components/conversation/event/divider/variants/time-indicator.tsx +1 -1
  68. package/src/javascripts/core/ui/components/conversation/event/event-participant.tsx +1 -1
  69. package/src/javascripts/core/ui/components/conversation/event/event.tsx +1 -1
  70. package/src/javascripts/core/ui/components/conversation/event/image-lightbox.tsx +1 -1
  71. package/src/javascripts/core/ui/components/conversation/event/image.tsx +2 -2
  72. package/src/javascripts/core/ui/components/conversation/event/participant.tsx +1 -1
  73. package/src/javascripts/core/ui/components/conversation/event/splash.tsx +0 -1
  74. package/src/javascripts/core/ui/components/conversation/event/text.tsx +2 -2
  75. package/src/javascripts/core/ui/components/conversation/event/upload.tsx +3 -3
  76. package/src/javascripts/core/ui/components/conversation/event/video.tsx +2 -2
  77. package/src/javascripts/core/ui/components/conversation/event-divider.tsx +1 -1
  78. package/src/javascripts/core/ui/components/conversation/message-container.tsx +2 -4
  79. package/src/javascripts/core/ui/components/conversation/use-chat-scroll.ts +3 -3
  80. package/src/javascripts/core/ui/components/core/seamly-activity-monitor.tsx +1 -1
  81. package/src/javascripts/core/ui/components/core/seamly-api-context.ts +1 -1
  82. package/src/javascripts/core/ui/components/core/seamly-core.tsx +3 -3
  83. package/src/javascripts/core/ui/components/core/seamly-event-subscriber.ts +9 -7
  84. package/src/javascripts/core/ui/components/core/seamly-file-upload.tsx +2 -3
  85. package/src/javascripts/core/ui/components/core/seamly-initializer.tsx +1 -1
  86. package/src/javascripts/core/ui/components/core/seamly-instance-functions-loader.ts +3 -3
  87. package/src/javascripts/core/ui/components/core/seamly-live-region.tsx +1 -1
  88. package/src/javascripts/core/ui/components/core/seamly-new-notifications.ts +1 -1
  89. package/src/javascripts/core/ui/components/core/seamly-read-state.ts +1 -1
  90. package/src/javascripts/core/ui/components/entry/entry-container.tsx +8 -3
  91. package/src/javascripts/core/ui/components/entry/text-entry/hooks.ts +21 -14
  92. package/src/javascripts/core/ui/components/entry/text-entry/index.tsx +1 -1
  93. package/src/javascripts/core/ui/components/entry/text-entry/text-entry-form.tsx +1 -1
  94. package/src/javascripts/core/ui/components/entry/upload/file-upload-form.tsx +1 -1
  95. package/src/javascripts/core/ui/components/entry/upload/index.tsx +1 -1
  96. package/src/javascripts/core/ui/components/entry/upload-toggle.tsx +1 -1
  97. package/src/javascripts/core/ui/components/form-controls/error.tsx +1 -1
  98. package/src/javascripts/core/ui/components/form-controls/file-input.tsx +1 -1
  99. package/src/javascripts/core/ui/components/form-controls/input.tsx +1 -1
  100. package/src/javascripts/core/ui/components/form-controls/wrapper.tsx +1 -1
  101. package/src/javascripts/core/ui/components/layout/agent-info.tsx +1 -1
  102. package/src/javascripts/core/ui/components/layout/chat-frame.tsx +1 -1
  103. package/src/javascripts/core/ui/components/layout/chat.tsx +2 -2
  104. package/src/javascripts/core/ui/components/layout/continue-chat-messages.tsx +1 -1
  105. package/src/javascripts/core/ui/components/layout/header.tsx +1 -1
  106. package/src/javascripts/core/ui/components/layout/interrupt.tsx +1 -1
  107. package/src/javascripts/core/ui/components/layout/pre-chat-messages.tsx +1 -1
  108. package/src/javascripts/core/ui/components/options/options-button.tsx +1 -3
  109. package/src/javascripts/core/ui/components/options/options-frame.tsx +1 -1
  110. package/src/javascripts/core/ui/components/options/transcript/index.tsx +1 -1
  111. package/src/javascripts/core/ui/components/suggestions/index.tsx +2 -2
  112. package/src/javascripts/core/ui/components/suggestions/suggestions-list.tsx +1 -1
  113. package/src/javascripts/core/ui/components/view/index.tsx +3 -3
  114. package/src/javascripts/core/ui/components/view/window-view/window-open-button.tsx +2 -2
  115. package/src/javascripts/core/ui/components/widgets/in-out-transition.tsx +2 -2
  116. package/src/javascripts/core/ui/components/widgets/lightbox.tsx +1 -1
  117. package/src/javascripts/core/ui/hooks/file-upload-hooks.ts +1 -1
  118. package/src/javascripts/core/ui/hooks/focus-helper-hooks.ts +1 -1
  119. package/src/javascripts/core/ui/hooks/seamly-entry-hooks.ts +1 -1
  120. package/src/javascripts/core/ui/hooks/seamly-option-hooks.ts +1 -1
  121. package/src/javascripts/core/ui/hooks/seamly-state-hooks.ts +9 -4
  122. package/src/javascripts/core/ui/hooks/use-debounce.ts +1 -1
  123. package/src/javascripts/core/ui/hooks/use-interval.ts +0 -1
  124. package/src/javascripts/core/ui/hooks/use-notifications.ts +2 -3
  125. package/src/javascripts/core/ui/hooks/use-seamly-chat.ts +2 -2
  126. package/src/javascripts/core/ui/hooks/use-seamly-commands.ts +2 -2
  127. package/src/javascripts/core/ui/hooks/use-seamly-conversation.ts +1 -1
  128. package/src/javascripts/core/ui/hooks/use-seamly-idle-detach-countdown.ts +15 -10
  129. package/src/javascripts/core/ui/hooks/use-session-expired-command.ts +1 -1
  130. package/src/javascripts/core/ui/hooks/use-single-file-upload.ts +1 -1
  131. package/src/javascripts/core/ui/hooks/utility-hooks.ts +1 -2
  132. package/src/javascripts/core/ui/utils/seamly-utils.ts +0 -2
  133. package/src/javascripts/core/ui/utils/validations.ts +1 -2
  134. package/src/javascripts/style-guide/components/app.tsx +2 -2
  135. package/src/javascripts/style-guide/components/static-core.tsx +2 -2
  136. package/src/javascripts/style-guide/components/view.tsx +1 -1
  137. package/src/javascripts/style-guide/state-helpers/index.ts +0 -2
  138. package/src/javascripts/style-guide/states.ts +5 -42
  139. package/src/javascripts/style-guide/style-guide-engine.tsx +1 -1
  140. package/src/stylesheets/5-components/_message-body.scss +0 -10
  141. package/src/stylesheets/6-default-implementation/_hover.scss +0 -7
  142. package/src/stylesheets/styles.scss +0 -1
  143. package/webpack/config.common.js +4 -11
  144. package/webpack/config.dev.js +0 -1
  145. package/webpack/config.package.js +5 -7
  146. package/webpack/config.site.js +2 -4
  147. package/webpack/config.test.js +1 -2
  148. package/webpack/defaults.js +0 -1
  149. package/webpack/parts/babel-loader-browser-plugins.js +0 -1
  150. package/webpack/parts/dev-server.js +0 -1
  151. package/src/javascripts/core/ui/components/conversation/event/cta.tsx +0 -54
  152. package/src/stylesheets/5-components/_message-cta.scss +0 -17
@@ -4,7 +4,6 @@
4
4
  */
5
5
 
6
6
  /** OneOf type helpers */
7
- // eslint-disable-next-line no-unused-vars
8
7
  type Without<T, U> = { [P in Exclude<keyof T, keyof U>]?: never }
9
8
  type XOR<T, U> = T | U extends object
10
9
  ? (Without<T, U> & U) | (Without<U, T> & T)
@@ -144,21 +143,21 @@ export interface components {
144
143
  conversations?: {
145
144
  /**
146
145
  * @description The endpoint to create a new conversation
147
- * @example /channels/api/v2/client/f38c06f4-283b-4011-8672-4923cbdc8f26/srv_id/3010109/conversations
146
+ * @example /channels/api/v3/client/f38c06f4-283b-4011-8672-4923cbdc8f26/srv_id/3010109/conversations
148
147
  */
149
148
  href: string
150
149
  }
151
150
  self?: {
152
151
  /**
153
152
  * @description The endpoint of the current request
154
- * @example /channels/api/v2/client/f38c06f4-283b-4011-8672-4923cbdc8f26/configs?v=2
153
+ * @example /channels/api/v3/client/f38c06f4-283b-4011-8672-4923cbdc8f26/configs?v=2
155
154
  */
156
155
  href: string
157
156
  }
158
157
  translations?: {
159
158
  /**
160
159
  * @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').
161
- * @example /channels/api/v2/client/f38c06f4-283b-4011-8672-4923cbdc8f26/translations/{version}/{locale}
160
+ * @example /channels/api/v3/client/f38c06f4-283b-4011-8672-4923cbdc8f26/translations/{version}/{locale}
162
161
  */
163
162
  href: string
164
163
  /**
@@ -223,22 +222,8 @@ export interface components {
223
222
  settings?: {
224
223
  /** @description Settings related to the input field */
225
224
  entry: {
226
- /**
227
- * @description The default type of input field.
228
- * @example text
229
- * @enum {string}
230
- */
231
- default: 'text' | 'postal_code' | 'upload'
232
225
  /** @description Specific options of the various entry types */
233
226
  options: {
234
- /** @description Settings of the text entry */
235
- text: {
236
- /**
237
- * @description Maximum number of characters the use may enter
238
- * @example 100
239
- */
240
- limit: number | null
241
- }
242
227
  /** @description Settings of the upload entry */
243
228
  upload: {
244
229
  /**
@@ -313,7 +298,7 @@ export interface components {
313
298
  } | null
314
299
  }
315
300
  /**
316
- * @description The amount of unread messages. Unread MessageMessage and MessageInfo (with type=text) messages are counted.
301
+ * @description The number of unread messages. Unread MessageMessage and MessageInfo (with type=text) messages are counted.
317
302
  * @example 2
318
303
  */
319
304
  unreadMessageCount: number
@@ -327,28 +312,28 @@ export interface components {
327
312
  conversation: {
328
313
  /**
329
314
  * @description The endpoint retrieve the conversation later on to resume it
330
- * @example /channels/api/v2/client/f38c06f4-283b-4011-8672-4923cbdc8f26/srv_id/3010109/conversations/4eb31272-ed89-4d0d-92c1-bc258bd7ac9c
315
+ * @example /channels/api/v3/client/f38c06f4-283b-4011-8672-4923cbdc8f26/srv_id/3010109/conversations/4eb31272-ed89-4d0d-92c1-bc258bd7ac9c
331
316
  */
332
317
  href: string
333
318
  }
334
319
  self: {
335
320
  /**
336
321
  * @description The endpoint retrieve the conversation later on to resume it
337
- * @example /channels/api/v2/client/f38c06f4-283b-4011-8672-4923cbdc8f26/srv_id/3010109/conversations/4eb31272-ed89-4d0d-92c1-bc258bd7ac9c
322
+ * @example /channels/api/v3/client/f38c06f4-283b-4011-8672-4923cbdc8f26/srv_id/3010109/conversations/4eb31272-ed89-4d0d-92c1-bc258bd7ac9c
338
323
  */
339
324
  href: string
340
325
  }
341
326
  socket: {
342
327
  /**
343
328
  * @description The endpoint of the conversation websocket
344
- * @example /channels/api/v2/client/f38c06f4-283b-4011-8672-4923cbdc8f26/srv_id/3010109/conversations/4eb31272-ed89-4d0d-92c1-bc258bd7ac9c/socket/websocket
329
+ * @example /channels/api/v3/client/f38c06f4-283b-4011-8672-4923cbdc8f26/srv_id/3010109/conversations/4eb31272-ed89-4d0d-92c1-bc258bd7ac9c/socket/websocket
345
330
  */
346
331
  href: string
347
332
  }
348
333
  uploads: {
349
334
  /**
350
335
  * @description The endpoint to send uploaded files to
351
- * @example /channels/api/v2/client/f38c06f4-283b-4011-8672-4923cbdc8f26/srv_id/3010109/conversations/4eb31272-ed89-4d0d-92c1-bc258bd7ac9c/uploads
336
+ * @example /channels/api/v3/client/f38c06f4-283b-4011-8672-4923cbdc8f26/srv_id/3010109/conversations/4eb31272-ed89-4d0d-92c1-bc258bd7ac9c/uploads
352
337
  */
353
338
  href: string
354
339
  }
@@ -407,16 +392,295 @@ export interface components {
407
392
  } | null
408
393
  } | null
409
394
  Entry:
395
+ | components['schemas']['EntryAlphanumeric']
396
+ | components['schemas']['EntryChoicePrompt']
397
+ | components['schemas']['EntryDateTime']
398
+ | components['schemas']['EntryIntent']
399
+ | components['schemas']['EntryMfa']
400
+ | components['schemas']['EntryNumeric']
401
+ | components['schemas']['EntryPhoneNumber']
402
+ | components['schemas']['EntryPostalCode']
410
403
  | components['schemas']['EntryText']
411
404
  | components['schemas']['EntryUpload']
412
- EntryText: {
413
- /** @description Settings of the text entry */
405
+ EntryAlphanumeric: {
406
+ /** @description Settings of the alphanumeric entry */
414
407
  options: {
415
408
  /**
416
- * @description Allow the user to also manually enter text as a response to a choice prompt message. By default this is set to true.
409
+ * @description A custom label to show above the input field
410
+ * @example Your name:
411
+ */
412
+ label: string | null
413
+ /**
414
+ * @description Maximum number of characters the user may enter
415
+ * @example 100
416
+ */
417
+ limit: number | null
418
+ /**
419
+ * @description A custom placeholder to show in the input field
420
+ * @example Your message (max. 100 characters)
421
+ */
422
+ placeholder: string | null
423
+ /**
424
+ * @description Seamly validates the processed input using this PCRE regular expression. The processed input will be used if it matches the pattern. In any other case, the original input is kept as-is.
425
+ * @example /[a-f0-9]{6}/i
426
+ */
427
+ validationPattern: string
428
+ }
429
+ /**
430
+ * @description Entry type
431
+ * @example alphanumeric
432
+ * @enum {string}
433
+ */
434
+ type: 'alphanumeric'
435
+ }
436
+ EntryChoicePrompt: {
437
+ /** @description Settings of the choice prompt entry */
438
+ options: {
439
+ /**
440
+ * @description Whether manual input is allowed. When set to `false`, the user must pick from one of the available options.
417
441
  * @example true
418
442
  */
419
- allowManualInput?: boolean
443
+ allowManualInput: boolean
444
+ /**
445
+ * @description A custom label to show above the input field
446
+ * @example Your name:
447
+ */
448
+ label: string | null
449
+ /**
450
+ * @description Maximum number of characters the user may enter
451
+ * @example 100
452
+ */
453
+ limit: number | null
454
+ /**
455
+ * @description A custom placeholder to show in the input field
456
+ * @example Your message (max. 100 characters)
457
+ */
458
+ placeholder: string | null
459
+ /** @description Entry for textual responses to a choice prompt. */
460
+ textualResponseEntry: components['schemas']['Entry'] | null
461
+ }
462
+ /**
463
+ * @description Entry type
464
+ * @example choice_prompt
465
+ * @enum {string}
466
+ */
467
+ type: 'choice_prompt'
468
+ }
469
+ EntryDateTime: {
470
+ /** @description Settings of the date time entry */
471
+ options: {
472
+ /**
473
+ * @description Indicates the kind of input expected and the output produced. If the input was recognised, `date` outputs will be in the form of `yyyy-mm-dd`, and `time` outputs will be in the form of `hh:mm`.
474
+ * @example date
475
+ * @enum {string}
476
+ */
477
+ format: 'date' | 'time'
478
+ /**
479
+ * @description A custom label to show above the input field
480
+ * @example Your name:
481
+ */
482
+ label: string | null
483
+ /**
484
+ * @description Maximum number of characters the user may enter
485
+ * @example 100
486
+ */
487
+ limit: number | null
488
+ /**
489
+ * @description A custom placeholder to show in the input field
490
+ * @example Your message (max. 100 characters)
491
+ */
492
+ placeholder: string | null
493
+ }
494
+ /**
495
+ * @description Entry type
496
+ * @example date_time
497
+ * @enum {string}
498
+ */
499
+ type: 'date_time'
500
+ }
501
+ EntryIntent: {
502
+ /** @description Settings of the intent entry */
503
+ options: {
504
+ /**
505
+ * @description Name of the intent to be matched
506
+ * @example wait
507
+ */
508
+ intentName: string
509
+ /**
510
+ * @description A custom label to show above the input field
511
+ * @example Your name:
512
+ */
513
+ label: string | null
514
+ /**
515
+ * @description Maximum number of characters the user may enter
516
+ * @example 100
517
+ */
518
+ limit: number | null
519
+ /**
520
+ * @description Model ID.
521
+ * @example 8f19cf20-d072-4432-a7be-70258aa40224
522
+ */
523
+ modelId: string
524
+ /**
525
+ * @description A custom placeholder to show in the input field
526
+ * @example Your message (max. 100 characters)
527
+ */
528
+ placeholder: string | null
529
+ }
530
+ /**
531
+ * @description Entry type
532
+ * @example intent
533
+ * @enum {string}
534
+ */
535
+ type: 'intent'
536
+ }
537
+ EntryMfa: {
538
+ /** @description Settings of the MFA entry */
539
+ options: {
540
+ /**
541
+ * @description The email addresses the MFA code has been sent to.
542
+ * @example [
543
+ * "john@acme.com",
544
+ * "john@acme.co.uk"
545
+ * ]
546
+ */
547
+ emailAddresses: string[]
548
+ /**
549
+ * @description Timestamp (in milliseconds) when the MFA code expires.
550
+ * @example 1750679434372
551
+ */
552
+ expiresAt: number
553
+ /**
554
+ * @description A custom label to show above the input field
555
+ * @example Your name:
556
+ */
557
+ label: string | null
558
+ /**
559
+ * @description Maximum number of characters the user may enter
560
+ * @example 100
561
+ */
562
+ limit: number | null
563
+ /**
564
+ * @description The phone numbers the MFA code has been sent to.
565
+ * @example [
566
+ * "+31612345678"
567
+ * ]
568
+ */
569
+ mobilePhoneNumbers: string[]
570
+ /**
571
+ * @description A custom placeholder to show in the input field
572
+ * @example Your message (max. 100 characters)
573
+ */
574
+ placeholder: string | null
575
+ }
576
+ /**
577
+ * @description Entry type
578
+ * @example mfa
579
+ * @enum {string}
580
+ */
581
+ type: 'mfa'
582
+ }
583
+ EntryNumeric: {
584
+ /** @description Settings of the numeric entry */
585
+ options: {
586
+ /**
587
+ * @description A custom label to show above the input field
588
+ * @example Your name:
589
+ */
590
+ label: string | null
591
+ /**
592
+ * @description Maximum number of characters the user may enter
593
+ * @example 7
594
+ */
595
+ limit: number | null
596
+ /**
597
+ * @description The maximum length of the processed input.
598
+ * @example 7
599
+ */
600
+ maxLength: number | null
601
+ /**
602
+ * @description The minimum length of the processed input.
603
+ * @example 1
604
+ */
605
+ minLength: number
606
+ /**
607
+ * @description A custom placeholder to show in the input field
608
+ * @example Your message (max. 100 characters)
609
+ */
610
+ placeholder: string | null
611
+ }
612
+ /**
613
+ * @description Entry type
614
+ * @example numeric
615
+ * @enum {string}
616
+ */
617
+ type: 'numeric'
618
+ }
619
+ EntryPhoneNumber: {
620
+ /** @description Settings of the phone number entry */
621
+ options: {
622
+ /**
623
+ * @description The country code will be used if Seamly cannot determine the correct country from the input. For instance, if the `country_code` is set to `"NL"` an input of `"+4912312421421"` will still be recognised as a German phone number. However, an input of `"06123456789"` with `country_code` `"NL"` will yield the phone number `"+316123456789"`, as the country cannot be determined from the number alone.
624
+ * @example NL
625
+ */
626
+ countryCode: string | null
627
+ /**
628
+ * @description A custom label to show above the input field
629
+ * @example Your name:
630
+ */
631
+ label: string | null
632
+ /**
633
+ * @description Maximum number of characters the user may enter
634
+ * @example 100
635
+ */
636
+ limit: number | null
637
+ /**
638
+ * @description A custom placeholder to show in the input field
639
+ * @example Your message (max. 100 characters)
640
+ */
641
+ placeholder: string | null
642
+ }
643
+ /**
644
+ * @description Entry type
645
+ * @example phone_number
646
+ * @enum {string}
647
+ */
648
+ type: 'phone_number'
649
+ }
650
+ EntryPostalCode: {
651
+ /** @description Settings of the postal code entry */
652
+ options: {
653
+ /**
654
+ * @description The country code (ISO 3166-1 alpha-2) of the expected postal code.
655
+ * @example NL
656
+ */
657
+ countryCode: string | null
658
+ /**
659
+ * @description A custom label to show above the input field
660
+ * @example Your name:
661
+ */
662
+ label: string | null
663
+ /**
664
+ * @description Maximum number of characters the user may enter
665
+ * @example 100
666
+ */
667
+ limit: number | null
668
+ /**
669
+ * @description A custom placeholder to show in the input field
670
+ * @example Your message (max. 100 characters)
671
+ */
672
+ placeholder: string | null
673
+ }
674
+ /**
675
+ * @description Entry type
676
+ * @example postal_code
677
+ * @enum {string}
678
+ */
679
+ type: 'postal_code'
680
+ }
681
+ EntryText: {
682
+ /** @description Settings of the text entry */
683
+ options: {
420
684
  /**
421
685
  * @description A custom label to show above the input field
422
686
  * @example Your name:
@@ -426,7 +690,7 @@ export interface components {
426
690
  * @description Whether or not the expected input is language neutral. A postal code or a last name for example are independent of language.
427
691
  * @example false
428
692
  */
429
- languageNeutral?: boolean
693
+ languageNeutral: boolean
430
694
  /**
431
695
  * @description Maximum number of characters the user may enter
432
696
  * @example 100
@@ -483,7 +747,7 @@ export interface components {
483
747
  * @description A reference to the upload as stored in the conversation context. When set, the upload can later on be used in hooks.
484
748
  * @example cv
485
749
  */
486
- reference: string
750
+ reference: string | null
487
751
  }
488
752
  /**
489
753
  * @description Entry type
@@ -528,7 +792,6 @@ export interface components {
528
792
  | components['schemas']['MessageBodyCard']
529
793
  | components['schemas']['MessageBodyCarousel']
530
794
  | components['schemas']['MessageBodyChoicePrompt']
531
- | components['schemas']['MessageBodyCTA']
532
795
  | components['schemas']['MessageBodyCustom']
533
796
  | components['schemas']['MessageBodyImage']
534
797
  | components['schemas']['MessageBodyText']
@@ -558,7 +821,6 @@ export interface components {
558
821
  | components['schemas']['MessageBodyCard']
559
822
  | components['schemas']['MessageBodyCarousel']
560
823
  | components['schemas']['MessageBodyChoicePrompt']
561
- | components['schemas']['MessageBodyCTA']
562
824
  | components['schemas']['MessageBodyCustom']
563
825
  | components['schemas']['MessageBodyImage']
564
826
  | components['schemas']['MessageBodyText']
@@ -577,7 +839,6 @@ export interface components {
577
839
  | 'card'
578
840
  | 'carousel'
579
841
  | 'choice_prompt'
580
- | 'cta'
581
842
  | 'custom'
582
843
  | 'image'
583
844
  | 'splash'
@@ -809,35 +1070,6 @@ export interface components {
809
1070
  type: 'image'
810
1071
  }
811
1072
  }
812
- /** @description A Call To Action (CTA) message */
813
- MessageBodyCTA: {
814
- /**
815
- * @description URL of the CTA
816
- * @example https://seamly.ai
817
- */
818
- buttonLink: string
819
- /**
820
- * @description Whether or not the link should be opened in a new window/tab
821
- * @example true
822
- */
823
- buttonNewTab: boolean
824
- /**
825
- * @description Text on the CTA button
826
- * @example Buy now!
827
- */
828
- buttonText: string
829
- /**
830
- * @description <p>Text shown above the CTA button<p>
831
- * @example Would you like to order a pizza? Click on the button below!
832
- */
833
- description: string
834
- /**
835
- * @description Textual representation of whole CTA message. Can be used in case the CTA cannot be rendered properly.
836
- * @example Text shown above the CTA button
837
- * Text on the CTA button : https://seamly.ai
838
- */
839
- text: string
840
- }
841
1073
  /** @description A custom message to be used and designed for specific accounts */
842
1074
  MessageBodyCustom: {
843
1075
  /**
@@ -1033,7 +1265,7 @@ export interface components {
1033
1265
  serviceSessionId: string | null
1034
1266
  }
1035
1267
  /**
1036
- * @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.
1268
+ * @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 transactionId.
1037
1269
  * @example ddff6efa-619a-497d-854c-f6a111f19196
1038
1270
  */
1039
1271
  TransactionId: string | null
@@ -1057,7 +1289,7 @@ export interface operations {
1057
1289
  /** @description Seamly account API key */
1058
1290
  api_key: string
1059
1291
  /** @description Seamly Channel API version */
1060
- channel_api_version: 'v2'
1292
+ channel_api_version: 'v3'
1061
1293
  }
1062
1294
  }
1063
1295
  /** @description Payload */
@@ -1162,7 +1394,7 @@ export interface operations {
1162
1394
  /** @description Seamly account API key */
1163
1395
  api_key: string
1164
1396
  /** @description Seamly Channel API version */
1165
- channel_api_version: 'v2'
1397
+ channel_api_version: 'v3'
1166
1398
  /**
1167
1399
  * @description Translation file version
1168
1400
  * @example 1
@@ -1203,7 +1435,7 @@ export interface operations {
1203
1435
  /** @description Seamly account API key */
1204
1436
  api_key: string
1205
1437
  /** @description Seamly Channel API version */
1206
- channel_api_version: 'v2'
1438
+ channel_api_version: 'v3'
1207
1439
  /** @description Required reference to a Seamly server. Must be obtained from the HAL links as returned by the configs endpoint. */
1208
1440
  srv_id: string
1209
1441
  }
@@ -1265,7 +1497,7 @@ export interface operations {
1265
1497
  /** @description Seamly account API key */
1266
1498
  api_key: string
1267
1499
  /** @description Seamly Channel API version */
1268
- channel_api_version: 'v2'
1500
+ channel_api_version: 'v3'
1269
1501
  /** @description Required reference to a Seamly server. Must be obtained from the HAL links as returned by the configs endpoint. */
1270
1502
  srv_id: string
1271
1503
  /** @description Id of the conversation */
@@ -1306,7 +1538,7 @@ export interface operations {
1306
1538
  /** @description Seamly account API key */
1307
1539
  api_key: string
1308
1540
  /** @description Seamly Channel API version */
1309
- channel_api_version: 'v2'
1541
+ channel_api_version: 'v3'
1310
1542
  /** @description Required reference to a Seamly server. Must be obtained from the HAL links as returned by the configs endpoint. */
1311
1543
  srv_id: string
1312
1544
  /** @description Id of the conversation */
@@ -1339,7 +1571,7 @@ export interface operations {
1339
1571
  /** @description Seamly account API key */
1340
1572
  api_key: string
1341
1573
  /** @description Seamly Channel API version */
1342
- channel_api_version: 'v2'
1574
+ channel_api_version: 'v3'
1343
1575
  /** @description Required reference to a Seamly server. Must be obtained from the HAL links as returned by the configs endpoint. */
1344
1576
  srv_id: string
1345
1577
  /** @description Id of the conversation */
@@ -1406,7 +1638,7 @@ export interface operations {
1406
1638
  /** @description Seamly account API key */
1407
1639
  api_key: string
1408
1640
  /** @description Seamly Channel API version */
1409
- channel_api_version: 'v2'
1641
+ channel_api_version: 'v3'
1410
1642
  /** @description Required reference to a Seamly server. Must be obtained from the HAL links as returned by the configs endpoint. */
1411
1643
  srv_id: string
1412
1644
  /** @description Id of the conversation */
@@ -1,5 +1,5 @@
1
- import ReconnectingWebSocket, { Event } from 'reconnecting-websocket'
2
1
  import splitUrlParams from 'lib/split-url-params'
2
+ import ReconnectingWebSocket, { Event } from 'reconnecting-websocket'
3
3
 
4
4
  type CurrentConnectionState =
5
5
  | 'socket_closed' // Socket is closed.
@@ -27,10 +27,8 @@ const emitChange = () => {
27
27
  export default class ConversationConnector {
28
28
  #connectionListeners: ((_payload: ConnectionState) => boolean | void)[] = []
29
29
 
30
- // eslint-disable-next-line no-undef
31
30
  #statusInterval: ReturnType<typeof setInterval> | null = null
32
31
 
33
- // eslint-disable-next-line no-unused-vars
34
32
  #openListener: ((this: ReconnectingWebSocket, ev: Event) => void) | null =
35
33
  null
36
34
 
@@ -1,4 +1,3 @@
1
- // eslint-disable-next-line no-undef
2
1
  interface ApiErrorOptions extends ErrorOptions {
3
2
  status?: number
4
3
  }
@@ -2,7 +2,7 @@ function parseOriginalErrMsg(str: string) {
2
2
  try {
3
3
  const json = JSON.parse(str)
4
4
  return json.error
5
- } catch (e) {
5
+ } catch (_e) {
6
6
  return str
7
7
  }
8
8
  }
@@ -9,11 +9,6 @@ import SeamlyConfigurationError from 'api/errors/seamly-configuration-error'
9
9
  import SeamlyGeneralError from 'api/errors/seamly-general-error'
10
10
  import SeamlySessionExpiredError from 'api/errors/seamly-session-expired-error'
11
11
  import SeamlyUnauthorizedError from 'api/errors/seamly-unauthorized-error'
12
- import debug from 'lib/debug'
13
- import { objectStore } from 'lib/store/index'
14
- import sessionStorageProvider from 'lib/store/providers/session-storage'
15
- import { sourceTypes } from 'ui/utils/seamly-utils'
16
- import { buildPayload, fetchApi, getTimeZone } from './utils'
17
12
  import type {
18
13
  AccountConfigContext,
19
14
  ApiConfig,
@@ -22,6 +17,11 @@ import type {
22
17
  LayoutMode,
23
18
  } from 'config.types'
24
19
  import type { MessageUpload } from 'domains/store/store.types'
20
+ import debug from 'lib/debug'
21
+ import { objectStore } from 'lib/store/index'
22
+ import sessionStorageProvider from 'lib/store/providers/session-storage'
23
+ import { sourceTypes } from 'ui/utils/seamly-utils'
24
+ import { buildPayload, fetchApi, getTimeZone } from './utils'
25
25
 
26
26
  declare let PACKAGE_NAME: string
27
27
  declare let PACKAGE_VERSION: string
@@ -114,11 +114,11 @@ export default class API {
114
114
 
115
115
  this.URLS = {
116
116
  translations: {
117
- href: `/channels/api/v2/client/${this.connectionInfo.apiKey}/translations/{version}/{locale}.json`,
117
+ href: `/channels/api/v3/client/${this.connectionInfo.apiKey}/translations/{version}/{locale}.json`,
118
118
  templated: true,
119
119
  },
120
120
  config: {
121
- href: `/channels/api/v2/client/${this.connectionInfo.apiKey}/configs`,
121
+ href: `/channels/api/v3/client/${this.connectionInfo.apiKey}/configs`,
122
122
  templated: true,
123
123
  },
124
124
  }
@@ -18,7 +18,6 @@ export function buildPayload(command, payload) {
18
18
 
19
19
  export const fetchApi = async (
20
20
  input: string,
21
- // eslint-disable-next-line no-undef
22
21
  init: RequestInit,
23
22
  ): Promise<Response> => {
24
23
  const url = new URL(input)
@@ -2,12 +2,12 @@ import { createAsyncThunk } from '@reduxjs/toolkit'
2
2
  import { ChannelConversation } from 'api/api.types'
3
3
  import SeamlySessionExpiredError from 'api/errors/seamly-session-expired-error'
4
4
  import SeamlyUnavailableError from 'api/errors/seamly-unavailable-error'
5
+ import type { Config } from 'config.types'
5
6
  import { initializeConfig, resetConfig } from 'domains/config/actions'
6
7
  import createDebouncedAsyncThunk from 'domains/redux/create-debounced-async-thunk'
7
8
  import { ThunkAPI } from 'domains/redux/redux.types'
8
9
  import { initializeVisibility } from 'domains/visibility/actions'
9
10
  import { actionTypes } from 'ui/utils/seamly-utils'
10
- import type { Config } from 'config.types'
11
11
 
12
12
  export const initializeApp = createAsyncThunk<
13
13
  {
@@ -1,4 +1,4 @@
1
- import { useSelector } from 'react-redux'
2
1
  import { selectUserHasResponded } from 'domains/app/selectors'
2
+ import { useSelector } from 'react-redux'
3
3
 
4
4
  export const useUserHasResponded = () => useSelector(selectUserHasResponded)
@@ -1,5 +1,5 @@
1
- import { useSelector } from 'react-redux'
2
1
  import { selectConfig } from 'domains/config/selectors'
2
+ import { useSelector } from 'react-redux'
3
3
 
4
4
  export const useConfig = () => useSelector(selectConfig)
5
5
 
@@ -1,7 +1,7 @@
1
1
  import { createSelector } from '@reduxjs/toolkit'
2
- import { visibilityStates } from 'domains/visibility/constants'
3
2
  import type { VisibilityOptions } from 'config.types'
4
3
  import type { RootState } from 'domains/store'
4
+ import { visibilityStates } from 'domains/visibility/constants'
5
5
 
6
6
  export const selectConfig = createSelector(
7
7
  ({ config }: RootState) => config,
@@ -1,9 +1,9 @@
1
1
  import { PayloadAction, createSlice } from '@reduxjs/toolkit'
2
2
  import { defaultConfig } from 'config'
3
- import { initializeConfig, resetConfig } from 'domains/config/actions'
4
- import { pick } from 'ui/utils/general-utils'
5
3
  import type { Config } from 'config.types'
4
+ import { initializeConfig, resetConfig } from 'domains/config/actions'
6
5
  import type { ChannelEvent } from 'domains/store/store.types'
6
+ import { pick } from 'ui/utils/general-utils'
7
7
 
8
8
  export const initialConfigState: Config = {
9
9
  ...defaultConfig,