@botonic/shared 2.26.0 → 2.28.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 (102) hide show
  1. package/CHANGELOG.md +25 -2
  2. package/README.md +9 -0
  3. package/package.json +1 -2
  4. package/src/lib/domain/botonic/index.d.ts +5 -4
  5. package/src/lib/domain/botonic/index.js +5 -4
  6. package/src/lib/domain/botonic/index.js.map +1 -1
  7. package/src/lib/domain/botonic/outputs.d.ts +11 -4
  8. package/src/lib/domain/botonic/outputs.js +7 -1
  9. package/src/lib/domain/botonic/outputs.js.map +1 -1
  10. package/src/lib/domain/botonic/session.d.ts +63 -0
  11. package/src/lib/domain/botonic/session.js +2 -0
  12. package/src/lib/domain/botonic/session.js.map +1 -0
  13. package/src/lib/domain/botonic/settings.d.ts +18 -0
  14. package/src/lib/domain/botonic/settings.js +2 -0
  15. package/src/lib/domain/botonic/settings.js.map +1 -0
  16. package/src/lib/domain/botonic/types.d.ts +8 -3
  17. package/src/lib/domain/botonic/types.js +8 -1
  18. package/src/lib/domain/botonic/types.js.map +1 -1
  19. package/src/lib/domain/botonic/webchat-client-settings.d.ts +22 -0
  20. package/src/lib/domain/botonic/webchat-client-settings.js +29 -0
  21. package/src/lib/domain/botonic/webchat-client-settings.js.map +1 -0
  22. package/src/lib/domain/botonic/webviews-session.d.ts +20 -0
  23. package/src/lib/domain/botonic/webviews-session.js +2 -0
  24. package/src/lib/domain/botonic/webviews-session.js.map +1 -0
  25. package/src/lib/domain/botonic/whatsapp-outputs/whatsapp-button-list/index.d.ts +1 -1
  26. package/src/lib/domain/index.d.ts +1 -2
  27. package/src/lib/domain/index.js +1 -4
  28. package/src/lib/domain/index.js.map +1 -1
  29. package/src/lib/hubtype-analytics-types.d.ts +2 -2
  30. package/src/lib/index.d.ts +3 -3
  31. package/src/lib/index.js +6 -6
  32. package/src/lib/index.js.map +1 -1
  33. package/src/lib/services/handoff.d.ts +18 -0
  34. package/src/lib/services/handoff.js +23 -0
  35. package/src/lib/services/handoff.js.map +1 -0
  36. package/src/lib/services/index.d.ts +2 -0
  37. package/src/lib/services/index.js +3 -0
  38. package/src/lib/services/index.js.map +1 -0
  39. package/src/lib/services/webchat-api.d.ts +8 -5
  40. package/src/lib/domain/botonic/legacy/index.d.ts +0 -2
  41. package/src/lib/domain/botonic/legacy/index.js +0 -3
  42. package/src/lib/domain/botonic/legacy/index.js.map +0 -1
  43. package/src/lib/domain/botonic/legacy/input-adapter.d.ts +0 -25
  44. package/src/lib/domain/botonic/legacy/input-adapter.js +0 -203
  45. package/src/lib/domain/botonic/legacy/input-adapter.js.map +0 -1
  46. package/src/lib/domain/botonic/legacy/types.d.ts +0 -32
  47. package/src/lib/domain/botonic/legacy/types.js +0 -2
  48. package/src/lib/domain/botonic/legacy/types.js.map +0 -1
  49. package/src/lib/domain/server/bot-server-message.d.ts +0 -65
  50. package/src/lib/domain/server/bot-server-message.js +0 -106
  51. package/src/lib/domain/server/bot-server-message.js.map +0 -1
  52. package/src/lib/domain/server/botonic-context/botonic-context-input.d.ts +0 -99
  53. package/src/lib/domain/server/botonic-context/botonic-context-input.js +0 -124
  54. package/src/lib/domain/server/botonic-context/botonic-context-input.js.map +0 -1
  55. package/src/lib/domain/server/botonic-context/botonic-context-session.d.ts +0 -146
  56. package/src/lib/domain/server/botonic-context/botonic-context-session.js +0 -209
  57. package/src/lib/domain/server/botonic-context/botonic-context-session.js.map +0 -1
  58. package/src/lib/domain/server/botonic-context/botonic-context.d.ts +0 -56
  59. package/src/lib/domain/server/botonic-context/botonic-context.js +0 -23
  60. package/src/lib/domain/server/botonic-context/botonic-context.js.map +0 -1
  61. package/src/lib/domain/server/botonic-context/factory.d.ts +0 -23
  62. package/src/lib/domain/server/botonic-context/factory.js +0 -31
  63. package/src/lib/domain/server/botonic-context/factory.js.map +0 -1
  64. package/src/lib/domain/server/botonic-context/index.d.ts +0 -5
  65. package/src/lib/domain/server/botonic-context/index.js +0 -6
  66. package/src/lib/domain/server/botonic-context/index.js.map +0 -1
  67. package/src/lib/domain/server/botonic-context/types.d.ts +0 -20
  68. package/src/lib/domain/server/botonic-context/types.js +0 -6
  69. package/src/lib/domain/server/botonic-context/types.js.map +0 -1
  70. package/src/lib/domain/server/factory.d.ts +0 -166
  71. package/src/lib/domain/server/factory.js +0 -166
  72. package/src/lib/domain/server/factory.js.map +0 -1
  73. package/src/lib/domain/server/index.d.ts +0 -3
  74. package/src/lib/domain/server/index.js +0 -4
  75. package/src/lib/domain/server/index.js.map +0 -1
  76. package/src/lib/domain/webchat/factory.d.ts +0 -81
  77. package/src/lib/domain/webchat/factory.js +0 -73
  78. package/src/lib/domain/webchat/factory.js.map +0 -1
  79. package/src/lib/domain/webchat/index.d.ts +0 -4
  80. package/src/lib/domain/webchat/index.js +0 -5
  81. package/src/lib/domain/webchat/index.js.map +0 -1
  82. package/src/lib/domain/webchat/realtime/factory.d.ts +0 -52
  83. package/src/lib/domain/webchat/realtime/factory.js +0 -66
  84. package/src/lib/domain/webchat/realtime/factory.js.map +0 -1
  85. package/src/lib/domain/webchat/realtime/index.d.ts +0 -2
  86. package/src/lib/domain/webchat/realtime/index.js +0 -3
  87. package/src/lib/domain/webchat/realtime/index.js.map +0 -1
  88. package/src/lib/domain/webchat/realtime/realtime-response-message.d.ts +0 -47
  89. package/src/lib/domain/webchat/realtime/realtime-response-message.js +0 -68
  90. package/src/lib/domain/webchat/realtime/realtime-response-message.js.map +0 -1
  91. package/src/lib/domain/webchat/user/factory.d.ts +0 -52
  92. package/src/lib/domain/webchat/user/factory.js +0 -59
  93. package/src/lib/domain/webchat/user/factory.js.map +0 -1
  94. package/src/lib/domain/webchat/user/index.d.ts +0 -2
  95. package/src/lib/domain/webchat/user/index.js +0 -3
  96. package/src/lib/domain/webchat/user/index.js.map +0 -1
  97. package/src/lib/domain/webchat/user/user-input-message.d.ts +0 -34
  98. package/src/lib/domain/webchat/user/user-input-message.js +0 -59
  99. package/src/lib/domain/webchat/user/user-input-message.js.map +0 -1
  100. package/src/lib/domain/webchat/webchat-message.d.ts +0 -55
  101. package/src/lib/domain/webchat/webchat-message.js +0 -69
  102. package/src/lib/domain/webchat/webchat-message.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,26 @@
1
+ ## 2.28.0 (2026-05-06)
2
+
3
+ This was a version bump only for @botonic/shared to align it with other projects, there were no code changes.
4
+
5
+ ## 2.27.0 (2026-04-29)
6
+
7
+ ### 🚀 Features
8
+
9
+ - typing to work again and improve it with few modes when sending messages ([#831](https://github.com/metis-ai/hubtype-product/pull/831))
10
+ - receiving db_id, bot_interaction_id and working capture_user_input_id and first_interaction updatable ([#822](https://github.com/metis-ai/hubtype-product/pull/822))
11
+ - **BLT-2291:** wire file attachment through domain model and XState machines ([#816](https://github.com/metis-ai/hubtype-product/pull/816))
12
+ - supporting isFirstInteraction editable by bot, with snapshot logic ([#815](https://github.com/metis-ai/hubtype-product/pull/815))
13
+ - adapting botonic webviews ([#799](https://github.com/metis-ai/hubtype-product/pull/799))
14
+ - **botonic:** session and Hubtype API adaptations (non-webviews) ([#810](https://github.com/metis-ai/hubtype-product/pull/810))
15
+ - **BLT-2293:** send audio messages ([#804](https://github.com/metis-ai/hubtype-product/pull/804))
16
+ - introduce new domain models ([#807](https://github.com/metis-ai/hubtype-product/pull/807))
17
+ - set basis for webchat client settings ([#791](https://github.com/metis-ai/hubtype-product/pull/791))
18
+
19
+ ### ❤️ Thank You
20
+
21
+ - David Hidalgo @Davidhidalgo
22
+ - Marc Rabat @vanbasten17
23
+
1
24
  ## 2.26.0 (2026-03-31)
2
25
 
3
26
  This was a version bump only for @botonic/shared to align it with other projects, there were no code changes.
@@ -57,7 +80,7 @@ This was a version bump only for @botonic/shared to align it with other projects
57
80
  ### 🚀 Features
58
81
 
59
82
  - add legacy input to v2 input adapter and missing defs ([#680](https://github.com/metis-ai/hubtype-product/pull/680))
60
- - add BotonicContext (will substitute BotContext) ([#677](https://github.com/metis-ai/hubtype-product/pull/677))
83
+ - add BotonicContext (will substitute BotonicContext) ([#677](https://github.com/metis-ai/hubtype-product/pull/677))
61
84
 
62
85
  ### ❤️ Thank You
63
86
 
@@ -253,4 +276,4 @@ This was a version bump only for @botonic/shared to align it with other projects
253
276
 
254
277
  ## 2.0.1-alpha.0 (2025-11-27)
255
278
 
256
- This was a version bump only for @botonic/shared to align it with other projects, there were no code changes.
279
+ This was a version bump only for @botonic/shared to align it with other projects, there were no code changes.
package/README.md CHANGED
@@ -11,6 +11,15 @@ Shared types, helpers, and building blocks used by `@botonic/core`, plugins, and
11
11
 
12
12
  Match the **major version** of `@botonic/shared` to `@botonic/core` and other `@botonic/*` packages in your project.
13
13
 
14
+ ## Package boundaries (2.x)
15
+
16
+ - **`@botonic/shared`** — Protocol types, enums, request API types, and shared utilities. Not the home for server/webchat/webview **runtime** classes.
17
+ - **`@botonic/core`** — Server runtime: `BotonicContext`, plugins, `BotServerMessage` factories, routing helpers (`CoreBot`, routes, session helpers — same package entry).
18
+ - **`@botonic/webchat-core`** — Webchat message runtime (`WebchatMessage`, factories, realtime wrappers).
19
+ - **`@botonic/webviews`** — Webview session context (`BotonicContextWebviews`, factory).
20
+
21
+ Import server runtime (`BotonicContext`, `BotServerMessageFactory`, plugins) from **`@botonic/core`**, webchat message classes from **`@botonic/webchat-core`**, and webview context from **`@botonic/webviews`** — not from `@botonic/shared`.
22
+
14
23
  ## Installation
15
24
 
16
25
  ```bash
package/package.json CHANGED
@@ -1,12 +1,11 @@
1
1
  {
2
2
  "name": "@botonic/shared",
3
- "version": "2.26.0",
3
+ "version": "2.28.0",
4
4
  "type": "module",
5
5
  "module": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
7
7
  "dependencies": {
8
8
  "tslib": "^2.3.0",
9
- "uuid": "^11.1.0",
10
9
  "vite": "7.1.9"
11
10
  },
12
11
  "publishConfig": {
@@ -1,9 +1,10 @@
1
- export * from '../server/botonic-context';
2
- export * from '../server/botonic-context/botonic-context-input';
3
- export * from '../server/botonic-context/botonic-context-session';
1
+ export * from './exceptions';
4
2
  export * from './inputs';
5
- export * from './legacy';
6
3
  export * from './metadata';
7
4
  export * from './outputs';
5
+ export * from './session';
6
+ export * from './settings';
8
7
  export * from './types';
8
+ export * from './webchat-client-settings';
9
+ export * from './webviews-session';
9
10
  export * from './whatsapp-outputs';
@@ -1,10 +1,11 @@
1
- export * from '../server/botonic-context';
2
- export * from '../server/botonic-context/botonic-context-input';
3
- export * from '../server/botonic-context/botonic-context-session';
1
+ export * from './exceptions';
4
2
  export * from './inputs';
5
- export * from './legacy';
6
3
  export * from './metadata';
7
4
  export * from './outputs';
5
+ export * from './session';
6
+ export * from './settings';
8
7
  export * from './types';
8
+ export * from './webchat-client-settings';
9
+ export * from './webviews-session';
9
10
  export * from './whatsapp-outputs';
10
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../libs/botonic/shared/src/lib/domain/botonic/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAA;AACzC,cAAc,iDAAiD,CAAA;AAC/D,cAAc,mDAAmD,CAAA;AACjE,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,SAAS,CAAA;AACvB,cAAc,oBAAoB,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../libs/botonic/shared/src/lib/domain/botonic/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA;AACvB,cAAc,2BAA2B,CAAA;AACzC,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA"}
@@ -1,6 +1,9 @@
1
- import { BotonicAttachmentData, BotonicButtonMessageData, BotonicCarouselData, BotonicCustomData, BotonicLocationData, BotonicTextData, BotonicTypingEventData, MessageType } from './types';
2
- import { BotonicWhatsappButtonListData, BotonicWhatsappCatalogData, BotonicWhatsappCTAUrlButtonData, BotonicWhatsappMediaCarouselData, BotonicWhatsappProductCarouselData, BotonicWhatsappProductData, BotonicWhatsappProductListData, BotonicWhatsappTemplateData } from './whatsapp-outputs';
3
- export type OutputMessageType = MessageType.Text | MessageType.Audio | MessageType.Image | MessageType.Video | MessageType.Document | MessageType.Location | MessageType.ButtonMessage | MessageType.Carousel | MessageType.Custom | MessageType.TypingEvent | MessageType.WhatsappTemplate | MessageType.WhatsappButtonList | MessageType.WhatsappCTAUrlButton | MessageType.WhatsappCatalog | MessageType.WhatsappProduct | MessageType.WhatsappProductList | MessageType.WhatsappProductCarousel | MessageType.WhatsappMediaCarousel;
1
+ import type { BotonicButtonMessageData, BotonicCarouselData, BotonicCustomData, BotonicLocationData, BotonicTextData, BotonicTypingEventData } from './types';
2
+ import { BotonicAttachmentData } from './types';
3
+ import { MessageType } from './types';
4
+ import type { WebchatClientSettings } from './webchat-client-settings';
5
+ import type { BotonicWhatsappButtonListData, BotonicWhatsappCatalogData, BotonicWhatsappCTAUrlButtonData, BotonicWhatsappMediaCarouselData, BotonicWhatsappProductCarouselData, BotonicWhatsappProductData, BotonicWhatsappProductListData, BotonicWhatsappTemplateData } from './whatsapp-outputs';
6
+ export type OutputMessageType = MessageType.Text | MessageType.Audio | MessageType.Image | MessageType.Video | MessageType.Document | MessageType.Location | MessageType.ButtonMessage | MessageType.Carousel | MessageType.Custom | MessageType.TypingEvent | MessageType.WhatsappTemplate | MessageType.WhatsappButtonList | MessageType.WhatsappCTAUrlButton | MessageType.WhatsappCatalog | MessageType.WhatsappProduct | MessageType.WhatsappProductList | MessageType.WhatsappProductCarousel | MessageType.WhatsappMediaCarousel | MessageType.WebchatClientSettings;
4
7
  export type BotonicOutputAttachmentExtraFields = {
5
8
  file_info?: Record<string, unknown>;
6
9
  caption?: string;
@@ -38,6 +41,7 @@ export type OutputMessageTypeMap = {
38
41
  [MessageType.WhatsappProductList]: BotonicWhatsappProductListData;
39
42
  [MessageType.WhatsappProductCarousel]: BotonicWhatsappProductCarouselData;
40
43
  [MessageType.WhatsappMediaCarousel]: BotonicWhatsappMediaCarouselData;
44
+ [MessageType.WebchatClientSettings]: WebchatClientSettings;
41
45
  };
42
46
  export declare abstract class BotonicOutput<T extends keyof OutputMessageTypeMap = keyof OutputMessageTypeMap> {
43
47
  readonly type: T;
@@ -98,4 +102,7 @@ export declare class BotonicOutputWhatsappProductCarousel extends BotonicOutput<
98
102
  export declare class BotonicOutputWhatsappMediaCarousel extends BotonicOutput<MessageType.WhatsappMediaCarousel> {
99
103
  constructor(data: BotonicWhatsappMediaCarouselData);
100
104
  }
101
- export type BotonicOutputType = BotonicOutputText | BotonicOutputAudio | BotonicOutputImage | BotonicOutputVideo | BotonicOutputDocument | BotonicOutputLocation | BotonicOutputButtonMessage | BotonicOutputCarousel | BotonicOutputCustom | BotonicOutputTypingEvent | BotonicOutputWhatsappTemplate | BotonicOutputWhatsappButtonList | BotonicOutputWhatsappCTAUrlButton | BotonicOutputWhatsappCatalog | BotonicOutputWhatsappProduct | BotonicOutputWhatsappProductList | BotonicOutputWhatsappProductCarousel | BotonicOutputWhatsappMediaCarousel;
105
+ export declare class BotonicOutputWebchatClientSettings extends BotonicOutput<MessageType.WebchatClientSettings> {
106
+ constructor(data: WebchatClientSettings);
107
+ }
108
+ export type BotonicOutputType = BotonicOutputText | BotonicOutputAudio | BotonicOutputImage | BotonicOutputVideo | BotonicOutputDocument | BotonicOutputLocation | BotonicOutputButtonMessage | BotonicOutputCarousel | BotonicOutputCustom | BotonicOutputTypingEvent | BotonicOutputWhatsappTemplate | BotonicOutputWhatsappButtonList | BotonicOutputWhatsappCTAUrlButton | BotonicOutputWhatsappCatalog | BotonicOutputWhatsappProduct | BotonicOutputWhatsappProductList | BotonicOutputWhatsappProductCarousel | BotonicOutputWhatsappMediaCarousel | BotonicOutputWebchatClientSettings;
@@ -1,4 +1,5 @@
1
- import { BotonicAttachmentData, MessageType, } from './types';
1
+ import { BotonicAttachmentData } from './types';
2
+ import { MessageType } from './types';
2
3
  export class BotonicOutputAttachmentData extends BotonicAttachmentData {
3
4
  constructor(data) {
4
5
  super(data.attachment_url, data.attachment_content);
@@ -116,4 +117,9 @@ export class BotonicOutputWhatsappMediaCarousel extends BotonicOutput {
116
117
  super(MessageType.WhatsappMediaCarousel, data);
117
118
  }
118
119
  }
120
+ export class BotonicOutputWebchatClientSettings extends BotonicOutput {
121
+ constructor(data) {
122
+ super(MessageType.WebchatClientSettings, data);
123
+ }
124
+ }
119
125
  //# sourceMappingURL=outputs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"outputs.js","sourceRoot":"","sources":["../../../../../../../../libs/botonic/shared/src/lib/domain/botonic/outputs.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EAOrB,WAAW,GACZ,MAAM,SAAS,CAAA;AAyDhB,MAAM,OAAO,2BAA4B,SAAQ,qBAAqB;IAIpE,YAAY,IAAmC;QAC7C,KAAK,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,kBAAkB,CAAC,CAAA;QACnD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAA;QAC/B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAA;IAC7B,CAAC;CACF;AAED,MAAM,OAAO,sBAAuB,SAAQ,2BAA2B;CAAG;AAC1E,MAAM,OAAO,sBAAuB,SAAQ,2BAA2B;CAAG;AAC1E,MAAM,OAAO,sBAAuB,SAAQ,2BAA2B;CAAG;AAC1E,MAAM,OAAO,yBAA0B,SAAQ,2BAA2B;CAAG;AA4B7E,+EAA+E;AAC/E,6DAA6D;AAC7D,+EAA+E;AAE/E,gDAAgD;AAChD,MAAM,OAAgB,aAAa;IAGjC,YACkB,IAAO,EACP,IAA6B;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agingChannel } from '../../shared-types';
2
+ import type { WebchatClientSettings } from './webchat-client-settings';
3
+ export type UserExtraData = Record<string, any>;
4
+ interface BotonicSessionBasicEntity {
5
+ id: string;
6
+ name: string;
7
+ }
8
+ export type BotonicSessionOrganization = BotonicSessionBasicEntity;
9
+ export type BotonicSessionBot = BotonicSessionBasicEntity;
10
+ export interface BotonicSessionChannel {
11
+ provider: MessagingChannel;
12
+ imp_id: string;
13
+ unformatted_phone_number: string;
14
+ }
15
+ export interface BotonicSessionHubtypeCaseContactReason {
16
+ id: string;
17
+ name: string;
18
+ category?: string;
19
+ project_id?: string;
20
+ }
21
+ export interface BotonicSessionUserContactInfoItem {
22
+ name: string;
23
+ type: string;
24
+ value: string;
25
+ description?: string;
26
+ }
27
+ export interface BotonicSessionHubtypeCase {
28
+ id: string;
29
+ after_hubtype_handoff_payload?: string;
30
+ case_resolution?: string;
31
+ contact_reasons?: BotonicSessionHubtypeCaseContactReason[];
32
+ }
33
+ export interface BotonicSessionUser<TExtraData extends UserExtraData = UserExtraData> {
34
+ id: string;
35
+ provider_id: string;
36
+ username?: string;
37
+ name?: string;
38
+ override_name?: string;
39
+ extra_data?: TExtraData;
40
+ contact_info?: BotonicSessionUserContactInfoItem[];
41
+ locale: string;
42
+ country: string;
43
+ system_locale: string;
44
+ }
45
+ export interface BotonicSession<TExtraData extends UserExtraData = UserExtraData> {
46
+ organization: BotonicSessionOrganization;
47
+ bot: BotonicSessionBot;
48
+ channel: BotonicSessionChannel;
49
+ user: BotonicSessionUser<TExtraData>;
50
+ is_test_integration: boolean;
51
+ is_first_interaction: boolean;
52
+ shadowing?: boolean;
53
+ flow_thread_id?: string;
54
+ had_hubtype_handoff?: boolean;
55
+ hubtype_case?: BotonicSessionHubtypeCase;
56
+ custom?: Record<string, any>;
57
+ external?: Record<string, any>;
58
+ webviews_custom?: Record<string, any>;
59
+ webchat_client_settings?: WebchatClientSettings;
60
+ /** Flow Builder: node id capturing user input (snake_case in API JSON). `null` clears. */
61
+ capture_user_input_node_id?: string | null;
62
+ }
63
+ export {};
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=session.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session.js","sourceRoot":"","sources":["../../../../../../../../libs/botonic/shared/src/lib/domain/botonic/session.ts"],"names":[],"mappings":""}
@@ -0,0 +1,18 @@
1
+ /** Lambda `settings` object shape (subset), aligned with backend `BotonicSettings.model_dump`. */
2
+ export interface BotonicSettings {
3
+ HUBTYPE_API_URL: string;
4
+ FLOW_BUILDER_API_URL?: string;
5
+ STATIC_URL?: string;
6
+ LITELLM_API_URL?: string;
7
+ AZURE_OPENAI_API_BASE?: string;
8
+ AZURE_OPENAI_API_VERSION?: string;
9
+ CUSTOM_SHORT_URL_HOST?: string;
10
+ custom?: Record<string, any>;
11
+ }
12
+ /** Lambda `secrets` object shape (subset), aligned with backend `BotonicSecrets.model_dump`. */
13
+ export interface BotonicSecrets {
14
+ HUBTYPE_ACCESS_TOKEN: string;
15
+ LITELLM_API_KEY?: string;
16
+ AZURE_OPENAI_API_KEY?: string;
17
+ custom?: Record<string, any>;
18
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=settings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../../../../../../libs/botonic/shared/src/lib/domain/botonic/settings.ts"],"names":[],"mappings":""}
@@ -1,3 +1,4 @@
1
+ import { WebchatClientSettings } from './webchat-client-settings';
1
2
  import { BotonicWhatsappButtonListData, BotonicWhatsappCatalogData, BotonicWhatsappCTAUrlButtonData, BotonicWhatsappMediaCarouselData, BotonicWhatsappProductCarouselData, BotonicWhatsappProductData, BotonicWhatsappProductListData, BotonicWhatsappTemplateData } from './whatsapp-outputs';
2
3
  export declare enum MessageType {
3
4
  Text = "text",
@@ -19,7 +20,8 @@ export declare enum MessageType {
19
20
  WhatsappProduct = "whatsapp_product",
20
21
  WhatsappProductList = "whatsapp_product_list",
21
22
  WhatsappProductCarousel = "whatsapp_product_carousel",
22
- WhatsappMediaCarousel = "whatsapp_media_carousel"
23
+ WhatsappMediaCarousel = "whatsapp_media_carousel",
24
+ WebchatClientSettings = "webchat_client_settings"
23
25
  }
24
26
  export declare class BotonicTextData {
25
27
  text: string;
@@ -35,7 +37,10 @@ export declare abstract class BotonicAttachmentData {
35
37
  attachment_url?: string | undefined;
36
38
  attachment_content?: string | undefined;
37
39
  caption?: string | undefined;
38
- constructor(attachment_url?: string | undefined, attachment_content?: string | undefined, caption?: string | undefined);
40
+ mime_type?: string | undefined;
41
+ filename?: string | undefined;
42
+ constructor(attachment_url?: string | undefined, attachment_content?: string | undefined, caption?: string | undefined, mime_type?: string | undefined, filename?: string | undefined);
43
+ getMediaSrc(): string;
39
44
  }
40
45
  export declare class BotonicAudioData extends BotonicAttachmentData {
41
46
  }
@@ -106,4 +111,4 @@ export declare class BotonicContactData {
106
111
  vcard?: string | undefined;
107
112
  constructor(first_name: string, last_name?: string | undefined, phone_number?: string | undefined, vcard?: string | undefined);
108
113
  }
109
- export type BotonicData = BotonicTextData | BotonicPostbackData | BotonicAudioData | BotonicImageData | BotonicVideoData | BotonicDocumentData | BotonicLocationData | BotonicContactData | BotonicTypingEventData | BotonicButtonMessageData | BotonicCarouselData | BotonicCustomData | BotonicContactData | BotonicWhatsappButtonListData | BotonicWhatsappCatalogData | BotonicWhatsappCTAUrlButtonData | BotonicWhatsappMediaCarouselData | BotonicWhatsappProductCarouselData | BotonicWhatsappProductData | BotonicWhatsappProductListData | BotonicWhatsappTemplateData;
114
+ export type BotonicData = BotonicTextData | BotonicPostbackData | BotonicAudioData | BotonicImageData | BotonicVideoData | BotonicDocumentData | BotonicLocationData | BotonicContactData | BotonicTypingEventData | BotonicButtonMessageData | BotonicCarouselData | BotonicCustomData | BotonicContactData | BotonicWhatsappButtonListData | BotonicWhatsappCatalogData | BotonicWhatsappCTAUrlButtonData | BotonicWhatsappMediaCarouselData | BotonicWhatsappProductCarouselData | BotonicWhatsappProductData | BotonicWhatsappProductListData | BotonicWhatsappTemplateData | WebchatClientSettings;
@@ -25,6 +25,7 @@ export var MessageType;
25
25
  MessageType["WhatsappProductList"] = "whatsapp_product_list";
26
26
  MessageType["WhatsappProductCarousel"] = "whatsapp_product_carousel";
27
27
  MessageType["WhatsappMediaCarousel"] = "whatsapp_media_carousel";
28
+ MessageType["WebchatClientSettings"] = "webchat_client_settings";
28
29
  })(MessageType || (MessageType = {}));
29
30
  // ============================================================================
30
31
  // BOTONIC DATA UNITS
@@ -42,14 +43,20 @@ export class BotonicPostbackData {
42
43
  }
43
44
  }
44
45
  export class BotonicAttachmentData {
45
- constructor(attachment_url, attachment_content, caption) {
46
+ constructor(attachment_url, attachment_content, caption, mime_type, filename) {
46
47
  this.attachment_url = attachment_url;
47
48
  this.attachment_content = attachment_content;
48
49
  this.caption = caption;
50
+ this.mime_type = mime_type;
51
+ this.filename = filename;
49
52
  if (!attachment_url && !attachment_content) {
50
53
  throw new BotonicMissingAttachmentUrlOrContentException();
51
54
  }
52
55
  }
56
+ getMediaSrc() {
57
+ var _a, _b;
58
+ return (_b = (_a = this.attachment_url) !== null && _a !== void 0 ? _a : this.attachment_content) !== null && _b !== void 0 ? _b : '';
59
+ }
53
60
  }
54
61
  export class BotonicAudioData extends BotonicAttachmentData {
55
62
  }
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../../../libs/botonic/shared/src/lib/domain/botonic/types.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,qBAAqB;AACrB,+EAA+E;AAE/E,OAAO,EAAE,6CAA6C,EAAE,MAAM,cAAc,CAAA;AAY5E,6BAA6B;AAC7B,MAAM,CAAN,IAAY,WAqBX;AArBD,WAAY,WAAW;IACrB,4BAAa,CAAA;IACb,oCAAqB,CAAA;IACrB,8BAAe,CAAA;IACf,8BAAe,CAAA;IACf,8BAAe,CAAA;IACf,oCAAqB,CAAA;IACrB,oCAAqB,CAAA;IACr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AS,GAAT,SAAS,CAAS;QAClB,iBAAY,GAAZ,YAAY,CAAS;QACrB,UAAK,GAAL,KAAK,CAAS;IACpB,CAAC;CACL"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../../../libs/botonic/shared/src/lib/domain/botonic/types.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,qBAAqB;AACrB,+EAA+E;AAE/E,OAAO,EAAE,6CAA6C,EAAE,MAAM,cAAc,CAAA;AAa5E,6BAA6B;AAC7B,MAAM,CAAN,IAAY,WAsBX;AAtBD,WAAY,WAAW;IACrB,4BAAa,CAAA;IACb,oCAAqB,CAAA;IACrB,8BAAe,CAAA;IACf,8BAAe,CAAA;IACf,8BAAe,CAAA;IACf,oCAAqB,CAAA;IACrB,oCAAqB,CAAA;IACrB,kCAAmB,CAAA;IACnB,+CAAgC,CAAA;IAChC,oCAAqB,CAAA;IACrB,gCAAiB,CAAA;IACjB,2CAA4B,CAAA;IAC5B,qDAAsC,CAAA;IACtC,0DAA2C,CAAA;IAC3C,+DAAgD,CAAA;IAChD,mDAAoC,CAAA;IACpC,mDAAoC,CAAA;IACpC,4DAA6C,CAAA;IAC7C,oEAAqD,CAAA;IACrD,gEAAiD,CAAA;IACjD,gEAAiD,CAAA;AACnD,CAAC,EAtBW,WAAW,KAAX,WAAW,QAsBtB;AAED,+EAA+E;AAC/E,qBAAqB;AACrB,+EAA+E;AAE/E,MAAM,OAAO,eAAe;IAC1B,YACS,IAAY,EACZ,OAAgB;QADhB,SAAI,GAAJ,IAAI,CAAQ;QACZ,YAAO,GAAP,OAAO,CAAS;IACtB,CAAC;CACL;AAED,MAAM,OAAO,mBAAmB;IAC9B,YACS,OAAe,EACf,QAAiB;QADjB,YAAO,GAAP,OAAO,CAAQ;QACf,aAAQ,GAAR,QAAQ,CAAS;IACvB,CAAC;CACL;AAED,MAAM,OAAgB,qBAAqB;IACzC,YACS,cAAuB,EACvB,kBAA2B,EAC3B,OAAgB,EAChB,SAAkB,E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aAAa,KAAb,aAAa,QAIxB;AAED,MAAM,CAAN,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,uCAAkB,CAAA;IAClB,0CAAqB,CAAA;AACvB,CAAC,EAHW,iBAAiB,KAAjB,iBAAiB,QAG5B;AAiBD,MAAM,OAAO,wBAAwB;IACnC,YACS,IAAY,EACZ,OAA+B;QAD/B,SAAI,GAAJ,IAAI,CAAQ;QACZ,YAAO,GAAP,OAAO,CAAwB;IACrC,CAAC;CACL;AAED,MAAM,OAAO,mBAAmB;IAC9B,YACS,QAAkC,EAClC,IAAa;QADb,aAAQ,GAAR,QAAQ,CAA0B;QAClC,SAAI,GAAJ,IAAI,CAAS;IACnB,CAAC;CACL;AAED,MAAM,OAAO,iBAAiB;IAC5B,YACS,IAAY,EACZ,KAA8B;QAD9B,SAAI,GAAJ,IAAI,CAAQ;QACZ,UAAK,GAAL,KAAK,CAAyB;IACpC,CAAC;CACL;AAED,6FAA6F;AAC7F,MAAM,OAAO,kBAAkB;IAC7B,YACS,UAAkB,EAClB,SAAkB,EAClB,YAAqB,EACrB,KAAc;QAHd,eAAU,GAAV,UAAU,CAAQ;QAClB,cAAS,GAAT,SAAS,CAAS;QAClB,iBAAY,GAAZ,YAAY,CAAS;QACrB,UAAK,GAAL,KAAK,CAAS;IACpB,CAAC;CACL"}
@@ -0,0 +1,22 @@
1
+ export interface WebchatClientSettingsBlockInput {
2
+ message?: string;
3
+ regex?: string;
4
+ }
5
+ export declare class WebchatClientSettings {
6
+ readonly block_inputs: WebchatClientSettingsBlockInput[];
7
+ readonly user_input_enabled: boolean;
8
+ readonly attachments_enabled: boolean;
9
+ readonly emoji_picker_enabled: boolean;
10
+ readonly custom: Record<string, unknown>;
11
+ constructor(data?: Partial<WebchatClientSettings>);
12
+ }
13
+ export declare const DEFAULT_WEBCHAT_CLIENT_SETTINGS: WebchatClientSettings;
14
+ export declare const UPDATE_WEBCHAT_CLIENT_SETTINGS_PAYLOAD = "update-webchat-client-settings";
15
+ export interface UpdateWebchatClientSettingsPayload {
16
+ settings: Partial<WebchatClientSettings>;
17
+ }
18
+ export declare function isUpdateWebchatClientSettingsPayload(payload?: string): boolean;
19
+ export declare function createUpdateWebchatClientSettingsPayload(settings: Partial<WebchatClientSettings>): string;
20
+ export declare function parseUpdateWebchatClientSettingsPayload(payload: string): UpdateWebchatClientSettingsPayload;
21
+ /** Merges two settings into a new instance; `custom` keys are deep-merged. */
22
+ export declare function mergeWebchatClientSettings(current: WebchatClientSettings, incoming: WebchatClientSettings): WebchatClientSettings;
@@ -0,0 +1,29 @@
1
+ export class WebchatClientSettings {
2
+ constructor(data = {}) {
3
+ var _a, _b, _c, _d, _e;
4
+ this.block_inputs = (_a = data.block_inputs) !== null && _a !== void 0 ? _a : [];
5
+ this.user_input_enabled = (_b = data.user_input_enabled) !== null && _b !== void 0 ? _b : true;
6
+ this.attachments_enabled = (_c = data.attachments_enabled) !== null && _c !== void 0 ? _c : true;
7
+ this.emoji_picker_enabled = (_d = data.emoji_picker_enabled) !== null && _d !== void 0 ? _d : true;
8
+ this.custom = (_e = data.custom) !== null && _e !== void 0 ? _e : {};
9
+ }
10
+ }
11
+ export const DEFAULT_WEBCHAT_CLIENT_SETTINGS = new WebchatClientSettings();
12
+ export const UPDATE_WEBCHAT_CLIENT_SETTINGS_PAYLOAD = 'update-webchat-client-settings';
13
+ const PAYLOAD_PARAMS_SEPARATOR = '|';
14
+ export function isUpdateWebchatClientSettingsPayload(payload) {
15
+ return Boolean(payload === null || payload === void 0 ? void 0 : payload.startsWith(`${UPDATE_WEBCHAT_CLIENT_SETTINGS_PAYLOAD}${PAYLOAD_PARAMS_SEPARATOR}`));
16
+ }
17
+ export function createUpdateWebchatClientSettingsPayload(settings) {
18
+ const payloadParams = { settings };
19
+ return `${UPDATE_WEBCHAT_CLIENT_SETTINGS_PAYLOAD}${PAYLOAD_PARAMS_SEPARATOR}${JSON.stringify(payloadParams)}`;
20
+ }
21
+ export function parseUpdateWebchatClientSettingsPayload(payload) {
22
+ const rawPayloadParams = payload.split(PAYLOAD_PARAMS_SEPARATOR)[1] || '{}';
23
+ return JSON.parse(rawPayloadParams);
24
+ }
25
+ /** Merges two settings into a new instance; `custom` keys are deep-merged. */
26
+ export function mergeWebchatClientSettings(current, incoming) {
27
+ return new WebchatClientSettings(Object.assign(Object.assign(Object.assign({}, current), incoming), { custom: Object.assign(Object.assign({}, current.custom), incoming.custom) }));
28
+ }
29
+ //# sourceMappingURL=webchat-client-settings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webchat-client-settings.js","sourceRoot":"","sources":["../../../../../../../../libs/botonic/shared/src/lib/domain/botonic/webchat-client-settings.ts"],"names":[],"mappings":"AAKA,MAAM,OAAO,qBAAqB;IAOhC,YAAY,OAAuC,EAAE;;QACnD,IAAI,CAAC,YAAY,GAAG,MAAA,IAAI,CAAC,YAAY,mCAAI,EAAE,CAAA;QAC3C,IAAI,CAAC,kBAAkB,GAAG,MAAA,IAAI,CAAC,kBAAkB,mCAAI,IAAI,CAAA;QACzD,IAAI,CAAC,mBAAmB,GAAG,MAAA,IAAI,CAAC,mBAAmB,mCAAI,IAAI,CAAA;QAC3D,IAAI,CAAC,oBAAoB,GAAG,MAAA,IAAI,CAAC,oBAAoB,mCAAI,IAAI,CAAA;QAC7D,IAAI,CAAC,MAAM,GAAG,MAAA,IAAI,CAAC,MAAM,mCAAI,EAAE,CAAA;IACjC,CAAC;CACF;AAED,MAAM,CAAC,MAAM,+BAA+B,GAAG,IAAI,qBAAqB,EAAE,CAAA;AAE1E,MAAM,CAAC,MAAM,sCAAsC,GACjD,gCAAgC,CAAA;AAElC,MAAM,wBAAwB,GAAG,GAAG,CAAA;AAMpC,MAAM,UAAU,oCAAoC,CAClD,OAAgB;IAEhB,OAAO,OAAO,CACZ,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,UAAU,CACjB,GAAG,sCAAsC,GAAG,wBAAwB,EAAE,CACvE,CACF,CAAA;AACH,CAAC;AAED,MAAM,UAAU,wCAAwC,CACtD,QAAwC;IAExC,MAAM,aAAa,GAAuC,EAAE,QAAQ,EAAE,CAAA;IACtE,OAAO,GAAG,sCAAsC,GAAG,wBAAwB,GAAG,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,EAAE,CAAA;AAC/G,CAAC;AAED,MAAM,UAAU,uCAAuC,CACrD,OAAe;IAEf,MAAM,gBAAgB,GAAG,OAAO,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAA;IAC3E,OAAO,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAuC,CAAA;AAC3E,CAAC;AAED,8EAA8E;AAC9E,MAAM,UAAU,0BAA0B,CACxC,OAA8B,EAC9B,QAA+B;IAE/B,OAAO,IAAI,qBAAqB,+CAC3B,OAAO,GACP,QAAQ,KACX,MAAM,kCACD,OAAO,CAAC,MAAM,GACd,QAAQ,CAAC,MAAM,KAEpB,CAAA;AACJ,CAAC"}
@@ -0,0 +1,20 @@
1
+ import type { BotonicSessionBot, BotonicSessionChannel } from './session';
2
+ /**
3
+ * GET …/session/webviews/ JSON from the backend.
4
+ * Channel and user are top-level fields (not nested under `session`).
5
+ * Use `BotonicContextWebviewsFactory.from` to normalize into a context with a nested `session`.
6
+ */
7
+ export type BotonicWebviewsSessionChannel = BotonicSessionChannel;
8
+ export type BotonicWebviewsSessionBot = BotonicSessionBot;
9
+ export interface BotonicWebviewsSessionUser {
10
+ id: string;
11
+ locale: string;
12
+ country: string;
13
+ system_locale: string;
14
+ }
15
+ export interface BotonicWebviewsSession {
16
+ custom: Record<string, any>;
17
+ channel: BotonicWebviewsSessionChannel;
18
+ bot: BotonicWebviewsSessionBot;
19
+ user: BotonicWebviewsSessionUser;
20
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=webviews-session.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webviews-session.js","sourceRoot":"","sources":["../../../../../../../../libs/botonic/shared/src/lib/domain/botonic/webviews-session.ts"],"names":[],"mappings":""}
@@ -14,4 +14,4 @@ export declare class BotonicWhatsappButtonListData {
14
14
  sections: WhatsappButtonListSection[];
15
15
  constructor(args: BotonicWhatsappButtonListDataArgs);
16
16
  }
17
- export { WhatsappButtonListRow, WhatsappButtonListSection };
17
+ export type { WhatsappButtonListRow, WhatsappButtonListSection };
@@ -1,3 +1,2 @@
1
1
  export * from './botonic';
2
- export * from './server';
3
- export * from './webchat';
2
+ export * from './utils';
@@ -1,7 +1,4 @@
1
1
  // Botonic protocol exports (base types, inputs, outputs)
2
2
  export * from './botonic';
3
- // Server exports (bot server messages)
4
- export * from './server';
5
- // Webchat exports (user inputs, realtime response messages, webchat messages)
6
- export * from './webchat';
3
+ export * from './utils';
7
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../libs/botonic/shared/src/lib/domain/index.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,cAAc,WAAW,CAAA;AAEzB,uCAAuC;AACvC,cAAc,UAAU,CAAA;AAExB,8EAA8E;AAC9E,cAAc,WAAW,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../libs/botonic/shared/src/lib/domain/index.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,cAAc,WAAW,CAAA;AACzB,cAAc,SAAS,CAAA"}
@@ -119,7 +119,7 @@ export interface EventHandoffOption extends HtBaseEventProps {
119
119
  }
120
120
  export interface EventKeyword extends HtBaseEventProps {
121
121
  action: EventAction.Keyword;
122
- flowThreadId: string;
122
+ flowThreadId?: string;
123
123
  flowId: string;
124
124
  flowName: string;
125
125
  flowNodeId: string;
@@ -131,7 +131,7 @@ export interface EventKeyword extends HtBaseEventProps {
131
131
  }
132
132
  export interface EventIntentSmart extends HtBaseEventProps {
133
133
  action: EventAction.IntentSmart;
134
- flowThreadId: string;
134
+ flowThreadId?: string;
135
135
  flowId: string;
136
136
  flowName: string;
137
137
  flowNodeId: string;
@@ -1,6 +1,6 @@
1
- export { MessagingChannel } from './shared-types';
2
- export * from './services/webchat-api';
1
+ export { HelpdeskEvent, InputType, MessagingChannel } from './shared-types';
2
+ export * from './domain';
3
+ export * from './services';
3
4
  export * from './ai-agents-types';
4
5
  export * from './hubtype-analytics-types';
5
- export * from './domain';
6
6
  export * from './utils';
package/src/lib/index.js CHANGED
@@ -1,13 +1,13 @@
1
- // Export base types first
2
- export { MessagingChannel } from './shared-types'; // InputType, HelpdeskEvent already exported in domain
3
- // Export services
4
- export * from './services/webchat-api';
1
+ // Channel / input / helpdesk enums shared across protocol and plugins
2
+ export { HelpdeskEvent, InputType, MessagingChannel } from './shared-types';
3
+ // Domain (protocol types only — no re-exports of `@botonic/core` / webchat / webviews runtime)
4
+ export * from './domain';
5
+ // Export services (depend on domain + optional `@botonic/core`)
6
+ export * from './services';
5
7
  // Export AI agents types
6
8
  export * from './ai-agents-types';
7
9
  // Export Hubtype analytics types
8
10
  export * from './hubtype-analytics-types';
9
- // Export domain types
10
- export * from './domain';
11
11
  // Export utils
12
12
  export * from './utils';
13
13
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../libs/botonic/shared/src/lib/index.ts"],"names":[],"mappings":"AAAA,0BAA0B;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA,CAAC,sDAAsD;AAExG,kBAAkB;AAClB,cAAc,wBAAwB,CAAA;AAEtC,yBAAyB;AACzB,cAAc,mBAAmB,CAAA;AAEjC,iCAAiC;AACjC,cAAc,2BAA2B,CAAA;AAEzC,sBAAsB;AACtB,cAAc,UAAU,CAAA;AAExB,eAAe;AACf,cAAc,SAAS,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../libs/botonic/shared/src/lib/index.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAE3E,+FAA+F;AAC/F,cAAc,UAAU,CAAA;AAExB,gEAAgE;AAChE,cAAc,YAAY,CAAA;AAE1B,yBAAyB;AACzB,cAAc,mBAAmB,CAAA;AAEjC,iCAAiC;AACjC,cAAc,2BAA2B,CAAA;AAEzC,eAAe;AACf,cAAc,SAAS,CAAA"}
@@ -0,0 +1,18 @@
1
+ /** Narrow context shape for this helper (avoids `@botonic/shared` → `@botonic/core` package cycle). */
2
+ export interface StoreCaseRatingContext {
3
+ session: {
4
+ isTestIntegration: boolean;
5
+ user: {
6
+ id: string;
7
+ };
8
+ };
9
+ settings: {
10
+ hubtypeApiUrl: string;
11
+ };
12
+ secrets: {
13
+ hubtypeAccessToken: string;
14
+ };
15
+ }
16
+ export declare function storeCaseRating(botonicContext: StoreCaseRatingContext, rating: number, _context?: Record<string, unknown>): Promise<{
17
+ status: string;
18
+ }>;
@@ -0,0 +1,23 @@
1
+ import { __awaiter } from "tslib";
2
+ // TODO: Create endpoint in backend into external and move this into hubtype-external-api-client.ts
3
+ export function storeCaseRating(botonicContext_1, rating_1) {
4
+ return __awaiter(this, arguments, void 0, function* (botonicContext, rating, _context = {}) {
5
+ if (botonicContext.session.isTestIntegration) {
6
+ return Promise.resolve({ status: 'ok' });
7
+ }
8
+ const chatId = botonicContext.session.user.id;
9
+ const response = yield fetch(`${botonicContext.settings.hubtypeApiUrl}/v1/chats/${chatId}/store_case_rating/`, {
10
+ method: 'POST',
11
+ headers: {
12
+ Authorization: `Bearer ${botonicContext.secrets.hubtypeAccessToken}`,
13
+ 'Content-Type': 'application/json',
14
+ },
15
+ body: JSON.stringify({ chat_id: chatId, rating }),
16
+ });
17
+ if (!response.ok) {
18
+ throw new Error(`HTTP error! status: ${response.status}`);
19
+ }
20
+ return yield response.json();
21
+ });
22
+ }
23
+ //# sourceMappingURL=handoff.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handoff.js","sourceRoot":"","sources":["../../../../../../../libs/botonic/shared/src/lib/services/handoff.ts"],"names":[],"mappings":";AAUA,mGAAmG;AACnG,MAAM,UAAgB,eAAe;yDACnC,cAAsC,EACtC,MAAc,EACd,WAAoC,EAAE;QAEtC,IAAI,cAAc,CAAC,OAAO,CAAC,iBAAiB,EAAE,CAAC;YAC7C,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAA;QAC1C,CAAC;QAED,MAAM,MAAM,GAAG,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAA;QAC7C,MAAM,QAAQ,GAAG,MAAM,KAAK,CAC1B,GAAG,cAAc,CAAC,QAAQ,CAAC,aAAa,aAAa,MAAM,qBAAqB,EAChF;YACE,MAAM,EAAE,MAAM;YACd,OAAO,EAAE;gBACP,aAAa,EAAE,UAAU,cAAc,CAAC,OAAO,CAAC,kBAAkB,EAAE;gBACpE,cAAc,EAAE,kBAAkB;aACnC;YACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;SAClD,CACF,CAAA;QAED,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;YACjB,MAAM,IAAI,KAAK,CAAC,uBAAuB,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAA;QAC3D,CAAC;QAED,OAAO,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAA;IAC9B,CAAC;CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './handoff';
2
+ export * from './webchat-api';
@@ -0,0 +1,3 @@
1
+ export * from './handoff';
2
+ export * from './webchat-api';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../libs/botonic/shared/src/lib/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,eAAe,CAAA"}
@@ -1,8 +1,7 @@
1
- import { UserInputMessage } from '../domain/webchat';
2
1
  export type HubtypeUserLocale = {
3
- locale?: string;
4
- country?: string;
5
- system_locale?: string;
2
+ locale: string;
3
+ country: string;
4
+ system_locale: string;
6
5
  };
7
6
  export type HubtypeUser = {
8
7
  id: string;
@@ -10,7 +9,11 @@ export type HubtypeUser = {
10
9
  name?: string;
11
10
  extra_data?: Record<string, any>;
12
11
  } & HubtypeUserLocale;
12
+ /**
13
+ * Webchat message payload at the Hubtype API boundary.
14
+ * Runtime class lives in `@botonic/webchat-core`; keep `unknown` here so `@botonic/shared` stays dependency-free.
15
+ */
13
16
  export interface HubtypeMessage {
14
17
  sender: HubtypeUser;
15
- message: UserInputMessage;
18
+ message: unknown;
16
19
  }