@botonic/plugin-flow-builder 0.24.2 → 0.25.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/lib/cjs/action/index.js +8 -5
  2. package/lib/cjs/action/index.js.map +1 -1
  3. package/lib/cjs/action/knowledge-bases.js +1 -1
  4. package/lib/cjs/action/knowledge-bases.js.map +1 -1
  5. package/lib/cjs/api.js +8 -4
  6. package/lib/cjs/api.js.map +1 -1
  7. package/lib/cjs/content-fields/content-fields-base.js +4 -6
  8. package/lib/cjs/content-fields/content-fields-base.js.map +1 -1
  9. package/lib/cjs/content-fields/flow-button.d.ts +0 -1
  10. package/lib/cjs/content-fields/flow-button.js +8 -12
  11. package/lib/cjs/content-fields/flow-button.js.map +1 -1
  12. package/lib/cjs/content-fields/flow-carousel.d.ts +0 -1
  13. package/lib/cjs/content-fields/flow-carousel.js +4 -8
  14. package/lib/cjs/content-fields/flow-carousel.js.map +1 -1
  15. package/lib/cjs/content-fields/flow-element.d.ts +0 -1
  16. package/lib/cjs/content-fields/flow-element.js +7 -15
  17. package/lib/cjs/content-fields/flow-element.js.map +1 -1
  18. package/lib/cjs/content-fields/flow-handoff.d.ts +0 -1
  19. package/lib/cjs/content-fields/flow-handoff.js +8 -6
  20. package/lib/cjs/content-fields/flow-handoff.js.map +1 -1
  21. package/lib/cjs/content-fields/flow-image.d.ts +0 -1
  22. package/lib/cjs/content-fields/flow-image.js +4 -8
  23. package/lib/cjs/content-fields/flow-image.js.map +1 -1
  24. package/lib/cjs/content-fields/flow-text.d.ts +0 -1
  25. package/lib/cjs/content-fields/flow-text.js +7 -14
  26. package/lib/cjs/content-fields/flow-text.js.map +1 -1
  27. package/lib/cjs/content-fields/flow-video.d.ts +0 -1
  28. package/lib/cjs/content-fields/flow-video.js +4 -8
  29. package/lib/cjs/content-fields/flow-video.js.map +1 -1
  30. package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.js +4 -7
  31. package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.js.map +1 -1
  32. package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.js +2 -5
  33. package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.js.map +1 -1
  34. package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list.d.ts +0 -1
  35. package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list.js +6 -10
  36. package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list.js.map +1 -1
  37. package/lib/cjs/index.js +17 -8
  38. package/lib/cjs/index.js.map +1 -1
  39. package/lib/esm/action/index.js +28 -19
  40. package/lib/esm/action/index.js.map +1 -1
  41. package/lib/esm/action/intent.js +8 -4
  42. package/lib/esm/action/intent.js.map +1 -1
  43. package/lib/esm/action/keyword.js +7 -3
  44. package/lib/esm/action/keyword.js.map +1 -1
  45. package/lib/esm/action/knowledge-bases.js +14 -10
  46. package/lib/esm/action/knowledge-bases.js.map +1 -1
  47. package/lib/esm/action/tracking.js +9 -5
  48. package/lib/esm/action/tracking.js.map +1 -1
  49. package/lib/esm/action/user-input.js +9 -5
  50. package/lib/esm/action/user-input.js.map +1 -1
  51. package/lib/esm/api.js +25 -16
  52. package/lib/esm/api.js.map +1 -1
  53. package/lib/esm/constants.js +6 -3
  54. package/lib/esm/constants.js.map +1 -1
  55. package/lib/esm/content-fields/content-fields-base.js +9 -7
  56. package/lib/esm/content-fields/content-fields-base.js.map +1 -1
  57. package/lib/esm/content-fields/flow-button.d.ts +0 -1
  58. package/lib/esm/content-fields/flow-button.js +19 -18
  59. package/lib/esm/content-fields/flow-button.js.map +1 -1
  60. package/lib/esm/content-fields/flow-carousel.d.ts +0 -1
  61. package/lib/esm/content-fields/flow-carousel.js +13 -12
  62. package/lib/esm/content-fields/flow-carousel.js.map +1 -1
  63. package/lib/esm/content-fields/flow-element.d.ts +0 -1
  64. package/lib/esm/content-fields/flow-element.js +16 -19
  65. package/lib/esm/content-fields/flow-element.js.map +1 -1
  66. package/lib/esm/content-fields/flow-handoff.d.ts +0 -1
  67. package/lib/esm/content-fields/flow-handoff.js +21 -14
  68. package/lib/esm/content-fields/flow-handoff.js.map +1 -1
  69. package/lib/esm/content-fields/flow-image.d.ts +0 -1
  70. package/lib/esm/content-fields/flow-image.js +11 -10
  71. package/lib/esm/content-fields/flow-image.js.map +1 -1
  72. package/lib/esm/content-fields/flow-text.d.ts +0 -1
  73. package/lib/esm/content-fields/flow-text.js +20 -22
  74. package/lib/esm/content-fields/flow-text.js.map +1 -1
  75. package/lib/esm/content-fields/flow-video.d.ts +0 -1
  76. package/lib/esm/content-fields/flow-video.js +11 -10
  77. package/lib/esm/content-fields/flow-video.js.map +1 -1
  78. package/lib/esm/content-fields/hubtype-fields/bot-action.js +2 -1
  79. package/lib/esm/content-fields/hubtype-fields/button.js +2 -1
  80. package/lib/esm/content-fields/hubtype-fields/carousel.js +2 -1
  81. package/lib/esm/content-fields/hubtype-fields/common.js +2 -1
  82. package/lib/esm/content-fields/hubtype-fields/fallback.js +2 -1
  83. package/lib/esm/content-fields/hubtype-fields/function.js +5 -2
  84. package/lib/esm/content-fields/hubtype-fields/function.js.map +1 -1
  85. package/lib/esm/content-fields/hubtype-fields/go-to-flow.js +2 -1
  86. package/lib/esm/content-fields/hubtype-fields/handoff.js +2 -1
  87. package/lib/esm/content-fields/hubtype-fields/image.js +2 -1
  88. package/lib/esm/content-fields/hubtype-fields/index.js +21 -18
  89. package/lib/esm/content-fields/hubtype-fields/index.js.map +1 -1
  90. package/lib/esm/content-fields/hubtype-fields/intent.js +2 -1
  91. package/lib/esm/content-fields/hubtype-fields/keyword.js +2 -1
  92. package/lib/esm/content-fields/hubtype-fields/node-types.js +9 -6
  93. package/lib/esm/content-fields/hubtype-fields/node-types.js.map +1 -1
  94. package/lib/esm/content-fields/hubtype-fields/nodes.js +2 -1
  95. package/lib/esm/content-fields/hubtype-fields/payload.js +2 -1
  96. package/lib/esm/content-fields/hubtype-fields/text.js +2 -1
  97. package/lib/esm/content-fields/hubtype-fields/url.js +2 -1
  98. package/lib/esm/content-fields/hubtype-fields/video.js +2 -1
  99. package/lib/esm/content-fields/hubtype-fields/whatsapp-button-list.js +2 -1
  100. package/lib/esm/content-fields/index.js +21 -10
  101. package/lib/esm/content-fields/index.js.map +1 -1
  102. package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.js +12 -11
  103. package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.js.map +1 -1
  104. package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.js +10 -9
  105. package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.js.map +1 -1
  106. package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list.d.ts +0 -1
  107. package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list.js +15 -14
  108. package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list.js.map +1 -1
  109. package/lib/esm/functions/conditional-provider.js +5 -1
  110. package/lib/esm/functions/conditional-provider.js.map +1 -1
  111. package/lib/esm/functions/conditional-queue-status.js +10 -4
  112. package/lib/esm/functions/conditional-queue-status.js.map +1 -1
  113. package/lib/esm/functions/index.js +8 -5
  114. package/lib/esm/functions/index.js.map +1 -1
  115. package/lib/esm/helpers.js +5 -1
  116. package/lib/esm/helpers.js.map +1 -1
  117. package/lib/esm/index.js +48 -35
  118. package/lib/esm/index.js.map +1 -1
  119. package/lib/esm/types.js +5 -2
  120. package/lib/esm/types.js.map +1 -1
  121. package/lib/esm/utils.js +8 -4
  122. package/lib/esm/utils.js.map +1 -1
  123. package/package.json +6 -12
@@ -1,19 +1,22 @@
1
- export * from './bot-action';
2
- export * from './button';
3
- export * from './carousel';
4
- export * from './common';
5
- export * from './fallback';
6
- export * from './function';
7
- export * from './go-to-flow';
8
- export * from './handoff';
9
- export * from './image';
10
- export * from './intent';
11
- export * from './keyword';
12
- export * from './node-types';
13
- export * from './nodes';
14
- export * from './payload';
15
- export * from './text';
16
- export * from './url';
17
- export * from './video';
18
- export * from './whatsapp-button-list';
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./bot-action"), exports);
5
+ tslib_1.__exportStar(require("./button"), exports);
6
+ tslib_1.__exportStar(require("./carousel"), exports);
7
+ tslib_1.__exportStar(require("./common"), exports);
8
+ tslib_1.__exportStar(require("./fallback"), exports);
9
+ tslib_1.__exportStar(require("./function"), exports);
10
+ tslib_1.__exportStar(require("./go-to-flow"), exports);
11
+ tslib_1.__exportStar(require("./handoff"), exports);
12
+ tslib_1.__exportStar(require("./image"), exports);
13
+ tslib_1.__exportStar(require("./intent"), exports);
14
+ tslib_1.__exportStar(require("./keyword"), exports);
15
+ tslib_1.__exportStar(require("./node-types"), exports);
16
+ tslib_1.__exportStar(require("./nodes"), exports);
17
+ tslib_1.__exportStar(require("./payload"), exports);
18
+ tslib_1.__exportStar(require("./text"), exports);
19
+ tslib_1.__exportStar(require("./url"), exports);
20
+ tslib_1.__exportStar(require("./video"), exports);
21
+ tslib_1.__exportStar(require("./whatsapp-button-list"), exports);
19
22
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/content-fields/hubtype-fields/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA;AACzB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA;AACzB,cAAc,cAAc,CAAA;AAC5B,cAAc,SAAS,CAAA;AACvB,cAAc,WAAW,CAAA;AACzB,cAAc,QAAQ,CAAA;AACtB,cAAc,OAAO,CAAA;AACrB,cAAc,SAAS,CAAA;AACvB,cAAc,wBAAwB,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/content-fields/hubtype-fields/index.ts"],"names":[],"mappings":";;;AAAA,uDAA4B;AAC5B,mDAAwB;AACxB,qDAA0B;AAC1B,mDAAwB;AACxB,qDAA0B;AAC1B,qDAA0B;AAC1B,uDAA4B;AAC5B,oDAAyB;AACzB,kDAAuB;AACvB,mDAAwB;AACxB,oDAAyB;AACzB,uDAA4B;AAC5B,kDAAuB;AACvB,oDAAyB;AACzB,iDAAsB;AACtB,gDAAqB;AACrB,kDAAuB;AACvB,iEAAsC"}
@@ -1,2 +1,3 @@
1
- export {};
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
2
3
  //# sourceMappingURL=intent.js.map
@@ -1,2 +1,3 @@
1
- export {};
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
2
3
  //# sourceMappingURL=keyword.js.map
@@ -1,4 +1,7 @@
1
- export var HtNodeWithContentType;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HtButtonStyle = exports.HtNodeWithoutContentType = exports.HtNodeWithContentType = void 0;
4
+ var HtNodeWithContentType;
2
5
  (function (HtNodeWithContentType) {
3
6
  HtNodeWithContentType["CAROUSEL"] = "carousel";
4
7
  HtNodeWithContentType["HANDOFF"] = "handoff";
@@ -10,17 +13,17 @@ export var HtNodeWithContentType;
10
13
  HtNodeWithContentType["FALLBACK"] = "fallback";
11
14
  HtNodeWithContentType["VIDEO"] = "video";
12
15
  HtNodeWithContentType["WHATSAPP_BUTTON_LIST"] = "whatsapp-button-list";
13
- })(HtNodeWithContentType || (HtNodeWithContentType = {}));
14
- export var HtNodeWithoutContentType;
16
+ })(HtNodeWithContentType = exports.HtNodeWithContentType || (exports.HtNodeWithContentType = {}));
17
+ var HtNodeWithoutContentType;
15
18
  (function (HtNodeWithoutContentType) {
16
19
  HtNodeWithoutContentType["URL"] = "url";
17
20
  HtNodeWithoutContentType["PAYLOAD"] = "payload";
18
21
  HtNodeWithoutContentType["GO_TO_FLOW"] = "go-to-flow";
19
22
  HtNodeWithoutContentType["BOT_ACTION"] = "bot-action";
20
- })(HtNodeWithoutContentType || (HtNodeWithoutContentType = {}));
21
- export var HtButtonStyle;
23
+ })(HtNodeWithoutContentType = exports.HtNodeWithoutContentType || (exports.HtNodeWithoutContentType = {}));
24
+ var HtButtonStyle;
22
25
  (function (HtButtonStyle) {
23
26
  HtButtonStyle["BUTTON"] = "button";
24
27
  HtButtonStyle["QUICK_REPLY"] = "quick-reply";
25
- })(HtButtonStyle || (HtButtonStyle = {}));
28
+ })(HtButtonStyle = exports.HtButtonStyle || (exports.HtButtonStyle = {}));
26
29
  //# sourceMappingURL=node-types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"node-types.js","sourceRoot":"","sources":["../../../../src/content-fields/hubtype-fields/node-types.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,qBAWX;AAXD,WAAY,qBAAqB;IAC/B,8CAAqB,CAAA;IACrB,4CAAmB,CAAA;IACnB,wCAAe,CAAA;IACf,sCAAa,CAAA;IACb,4CAAmB,CAAA;IACnB,0CAAiB,CAAA;IACjB,8CAAqB,CAAA;IACrB,8CAAqB,CAAA;IACrB,wCAAe,CAAA;IACf,sEAA6C,CAAA;AAC/C,CAAC,EAXW,qBAAqB,KAArB,qBAAqB,QAWhC;AAED,MAAM,CAAN,IAAY,wBAKX;AALD,WAAY,wBAAwB;IAClC,uCAAW,CAAA;IACX,+CAAmB,CAAA;IACnB,qDAAyB,CAAA;IACzB,qDAAyB,CAAA;AAC3B,CAAC,EALW,wBAAwB,KAAxB,wBAAwB,QAKnC;AAED,MAAM,CAAN,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,kCAAiB,CAAA;IACjB,4CAA2B,CAAA;AAC7B,CAAC,EAHW,aAAa,KAAb,aAAa,QAGxB"}
1
+ {"version":3,"file":"node-types.js","sourceRoot":"","sources":["../../../../src/content-fields/hubtype-fields/node-types.ts"],"names":[],"mappings":";;;AAAA,IAAY,qBAWX;AAXD,WAAY,qBAAqB;IAC/B,8CAAqB,CAAA;IACrB,4CAAmB,CAAA;IACnB,wCAAe,CAAA;IACf,sCAAa,CAAA;IACb,4CAAmB,CAAA;IACnB,0CAAiB,CAAA;IACjB,8CAAqB,CAAA;IACrB,8CAAqB,CAAA;IACrB,wCAAe,CAAA;IACf,sEAA6C,CAAA;AAC/C,CAAC,EAXW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAWhC;AAED,IAAY,wBAKX;AALD,WAAY,wBAAwB;IAClC,uCAAW,CAAA;IACX,+CAAmB,CAAA;IACnB,qDAAyB,CAAA;IACzB,qDAAyB,CAAA;AAC3B,CAAC,EALW,wBAAwB,GAAxB,gCAAwB,KAAxB,gCAAwB,QAKnC;AAED,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,kCAAiB,CAAA;IACjB,4CAA2B,CAAA;AAC7B,CAAC,EAHW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAGxB"}
@@ -1,2 +1,3 @@
1
- export {};
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
2
3
  //# sourceMappingURL=nodes.js.map
@@ -1,2 +1,3 @@
1
- export {};
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
2
3
  //# sourceMappingURL=payload.js.map
@@ -1,2 +1,3 @@
1
- export {};
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
2
3
  //# sourceMappingURL=text.js.map
@@ -1,2 +1,3 @@
1
- export {};
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
2
3
  //# sourceMappingURL=url.js.map
@@ -1,2 +1,3 @@
1
- export {};
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
2
3
  //# sourceMappingURL=video.js.map
@@ -1,2 +1,3 @@
1
- export {};
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
2
3
  //# sourceMappingURL=whatsapp-button-list.js.map
@@ -1,11 +1,22 @@
1
- import { FlowCarousel } from './flow-carousel';
2
- import { FlowImage } from './flow-image';
3
- import { FlowText } from './flow-text';
4
- import { FlowVideo } from './flow-video';
5
- import { FlowWhatsappButtonList } from './whatsapp-button-list/flow-whatsapp-button-list';
6
- export { ContentFieldsBase } from './content-fields-base';
7
- export { FlowButton } from './flow-button';
8
- export { FlowElement } from './flow-element';
9
- export { FlowCarousel, FlowImage, FlowText, FlowVideo, FlowWhatsappButtonList };
10
- export { FlowHandoff } from './flow-handoff';
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FlowHandoff = exports.FlowWhatsappButtonList = exports.FlowVideo = exports.FlowText = exports.FlowImage = exports.FlowCarousel = exports.FlowElement = exports.FlowButton = exports.ContentFieldsBase = void 0;
4
+ const flow_carousel_1 = require("./flow-carousel");
5
+ Object.defineProperty(exports, "FlowCarousel", { enumerable: true, get: function () { return flow_carousel_1.FlowCarousel; } });
6
+ const flow_image_1 = require("./flow-image");
7
+ Object.defineProperty(exports, "FlowImage", { enumerable: true, get: function () { return flow_image_1.FlowImage; } });
8
+ const flow_text_1 = require("./flow-text");
9
+ Object.defineProperty(exports, "FlowText", { enumerable: true, get: function () { return flow_text_1.FlowText; } });
10
+ const flow_video_1 = require("./flow-video");
11
+ Object.defineProperty(exports, "FlowVideo", { enumerable: true, get: function () { return flow_video_1.FlowVideo; } });
12
+ const flow_whatsapp_button_list_1 = require("./whatsapp-button-list/flow-whatsapp-button-list");
13
+ Object.defineProperty(exports, "FlowWhatsappButtonList", { enumerable: true, get: function () { return flow_whatsapp_button_list_1.FlowWhatsappButtonList; } });
14
+ var content_fields_base_1 = require("./content-fields-base");
15
+ Object.defineProperty(exports, "ContentFieldsBase", { enumerable: true, get: function () { return content_fields_base_1.ContentFieldsBase; } });
16
+ var flow_button_1 = require("./flow-button");
17
+ Object.defineProperty(exports, "FlowButton", { enumerable: true, get: function () { return flow_button_1.FlowButton; } });
18
+ var flow_element_1 = require("./flow-element");
19
+ Object.defineProperty(exports, "FlowElement", { enumerable: true, get: function () { return flow_element_1.FlowElement; } });
20
+ var flow_handoff_1 = require("./flow-handoff");
21
+ Object.defineProperty(exports, "FlowHandoff", { enumerable: true, get: function () { return flow_handoff_1.FlowHandoff; } });
11
22
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/content-fields/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAE9C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAE,sBAAsB,EAAE,MAAM,kDAAkD,CAAA;AAEzF,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAC5C,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,sBAAsB,EAAE,CAAA;AAC/E,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/content-fields/index.ts"],"names":[],"mappings":";;;AAAA,mDAA8C;AAUrC,6FAVA,4BAAY,OAUA;AARrB,6CAAwC;AAQjB,0FARd,sBAAS,OAQc;AAPhC,2CAAsC;AAOJ,yFAPzB,oBAAQ,OAOyB;AAN1C,6CAAwC;AAMI,0FANnC,sBAAS,OAMmC;AALrD,gGAAyF;AAKlC,uGAL9C,kDAAsB,OAK8C;AAH7E,6DAAyD;AAAhD,wHAAA,iBAAiB,OAAA;AAC1B,6CAA0C;AAAjC,yGAAA,UAAU,OAAA;AACnB,+CAA4C;AAAnC,2GAAA,WAAW,OAAA;AAEpB,+CAA4C;AAAnC,2GAAA,WAAW,OAAA"}
@@ -1,17 +1,17 @@
1
- import { SOURCE_INFO_SEPARATOR } from '../../constants';
2
- import { ContentFieldsBase } from '../content-fields-base';
3
- export class FlowWhatsappButtonListRow extends ContentFieldsBase {
4
- constructor() {
5
- super(...arguments);
6
- this.title = '';
7
- this.description = '';
8
- }
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FlowWhatsappButtonListRow = void 0;
4
+ const constants_1 = require("../../constants");
5
+ const content_fields_base_1 = require("../content-fields-base");
6
+ class FlowWhatsappButtonListRow extends content_fields_base_1.ContentFieldsBase {
7
+ title = '';
8
+ description = '';
9
+ targetId;
9
10
  static fromHubtypeCMS(component, locale) {
10
- var _a;
11
11
  const newRow = new FlowWhatsappButtonListRow(component.id);
12
12
  newRow.title = this.getTextByLocale(locale, component.text);
13
13
  newRow.description = this.getTextByLocale(locale, component.description);
14
- newRow.targetId = (_a = component.target) === null || _a === void 0 ? void 0 : _a.id;
14
+ newRow.targetId = component.target?.id;
15
15
  return newRow;
16
16
  }
17
17
  toBotonic(rowIndex, sectionIndex) {
@@ -26,7 +26,8 @@ export class FlowWhatsappButtonListRow extends ContentFieldsBase {
26
26
  };
27
27
  }
28
28
  getRowId(rowIndex, sectionIndex) {
29
- return `${this.targetId}${SOURCE_INFO_SEPARATOR}${sectionIndex}.${rowIndex}`;
29
+ return `${this.targetId}${constants_1.SOURCE_INFO_SEPARATOR}${sectionIndex}.${rowIndex}`;
30
30
  }
31
31
  }
32
+ exports.FlowWhatsappButtonListRow = FlowWhatsappButtonListRow;
32
33
  //# sourceMappingURL=flow-whatsapp-button-list-row.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"flow-whatsapp-button-list-row.js","sourceRoot":"","sources":["../../../../src/content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAA;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAG1D,MAAM,OAAO,yBAA0B,SAAQ,iBAAiB;IAAhE;;QACS,UAAK,GAAG,EAAE,CAAA;QACV,gBAAW,GAAG,EAAE,CAAA;IAgCzB,CAAC;IA7BC,MAAM,CAAC,cAAc,CACnB,SAAkC,EAClC,MAAc;;QAEd,MAAM,MAAM,GAAG,IAAI,yBAAyB,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;QAC1D,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,EAAE,SAAS,CAAC,IAAI,CAAC,CAAA;QAC3D,MAAM,CAAC,WAAW,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,EAAE,SAAS,CAAC,WAAW,CAAC,CAAA;QACxE,MAAM,CAAC,QAAQ,GAAG,MAAA,SAAS,CAAC,MAAM,0CAAE,EAAE,CAAA;QACtC,OAAO,MAAM,CAAA;IACf,CAAC;IAED,SAAS,CACP,QAAgB,EAChB,YAAoB;QAEpB,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;YAClB,OAAO,CAAC,KAAK,CAAC,oBAAoB,IAAI,CAAC,KAAK,iBAAiB,CAAC,CAAA;YAC9D,OAAO,SAAS,CAAA;SACjB;QACD,OAAO;YACL,EAAE,EAAE,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;YACzC,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,WAAW,EAAE,IAAI,CAAC,WAAW;SAC9B,CAAA;IACH,CAAC;IAEO,QAAQ,CAAC,QAAgB,EAAE,YAAoB;QACrD,OAAO,GAAG,IAAI,CAAC,QAAQ,GAAG,qBAAqB,GAAG,YAAY,IAAI,QAAQ,EAAE,CAAA;IAC9E,CAAC;CACF"}
1
+ {"version":3,"file":"flow-whatsapp-button-list-row.js","sourceRoot":"","sources":["../../../../src/content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.tsx"],"names":[],"mappings":";;;AAEA,+CAAuD;AACvD,gEAA0D;AAG1D,MAAa,yBAA0B,SAAQ,uCAAiB;IACvD,KAAK,GAAG,EAAE,CAAA;IACV,WAAW,GAAG,EAAE,CAAA;IAChB,QAAQ,CAAS;IAExB,MAAM,CAAC,cAAc,CACnB,SAAkC,EAClC,MAAc;QAEd,MAAM,MAAM,GAAG,IAAI,yBAAyB,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;QAC1D,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,EAAE,SAAS,CAAC,IAAI,CAAC,CAAA;QAC3D,MAAM,CAAC,WAAW,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,EAAE,SAAS,CAAC,WAAW,CAAC,CAAA;QACxE,MAAM,CAAC,QAAQ,GAAG,SAAS,CAAC,MAAM,EAAE,EAAE,CAAA;QACtC,OAAO,MAAM,CAAA;IACf,CAAC;IAED,SAAS,CACP,QAAgB,EAChB,YAAoB;QAEpB,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;YAClB,OAAO,CAAC,KAAK,CAAC,oBAAoB,IAAI,CAAC,KAAK,iBAAiB,CAAC,CAAA;YAC9D,OAAO,SAAS,CAAA;SACjB;QACD,OAAO;YACL,EAAE,EAAE,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;YACzC,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,WAAW,EAAE,IAAI,CAAC,WAAW;SAC9B,CAAA;IACH,CAAC;IAEO,QAAQ,CAAC,QAAgB,EAAE,YAAoB;QACrD,OAAO,GAAG,IAAI,CAAC,QAAQ,GAAG,iCAAqB,GAAG,YAAY,IAAI,QAAQ,EAAE,CAAA;IAC9E,CAAC;CACF;AAlCD,8DAkCC"}
@@ -1,15 +1,15 @@
1
- import { ContentFieldsBase } from './../content-fields-base';
2
- import { FlowWhatsappButtonListRow } from './flow-whatsapp-button-list-row';
3
- export class FlowWhatsappButtonListSection extends ContentFieldsBase {
4
- constructor() {
5
- super(...arguments);
6
- this.title = '';
7
- this.rows = [];
8
- }
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FlowWhatsappButtonListSection = void 0;
4
+ const content_fields_base_1 = require("./../content-fields-base");
5
+ const flow_whatsapp_button_list_row_1 = require("./flow-whatsapp-button-list-row");
6
+ class FlowWhatsappButtonListSection extends content_fields_base_1.ContentFieldsBase {
7
+ title = '';
8
+ rows = [];
9
9
  static fromHubtypeCMS(component, locale) {
10
10
  const newButton = new FlowWhatsappButtonListSection(component.id);
11
11
  newButton.title = this.getTextByLocale(locale, component.title);
12
- newButton.rows = component.rows.map(row => FlowWhatsappButtonListRow.fromHubtypeCMS(row, locale));
12
+ newButton.rows = component.rows.map(row => flow_whatsapp_button_list_row_1.FlowWhatsappButtonListRow.fromHubtypeCMS(row, locale));
13
13
  return newButton;
14
14
  }
15
15
  toBotonic(sectionIndex) {
@@ -22,4 +22,5 @@ export class FlowWhatsappButtonListSection extends ContentFieldsBase {
22
22
  return { title: this.title, rows };
23
23
  }
24
24
  }
25
+ exports.FlowWhatsappButtonListSection = FlowWhatsappButtonListSection;
25
26
  //# sourceMappingURL=flow-whatsapp-button-list-section.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"flow-whatsapp-button-list-section.js","sourceRoot":"","sources":["../../../../src/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAA;AAE3E,MAAM,OAAO,6BAA8B,SAAQ,iBAAiB;IAApE;;QACS,UAAK,GAAG,EAAE,CAAA;QACV,SAAI,GAAgC,EAAE,CAAA;IA0B/C,CAAC;IAxBC,MAAM,CAAC,cAAc,CACnB,SAAsC,EACtC,MAAc;QAEd,MAAM,SAAS,GAAG,IAAI,6BAA6B,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;QACjE,SAAS,CAAC,KAAK,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,EAAE,SAAS,CAAC,KAAK,CAAC,CAAA;QAC/D,SAAS,CAAC,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CACxC,yBAAyB,CAAC,cAAc,CAAC,GAAG,EAAE,MAAM,CAAC,CACtD,CAAA;QACD,OAAO,SAAS,CAAA;IAClB,CAAC;IAED,SAAS,CAAC,YAAoB;QAC5B,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAC3B,CAAC,GAAiC,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE;YACnD,MAAM,UAAU,GAAG,GAAG,CAAC,SAAS,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAA;YACxD,IAAI,UAAU;gBAAE,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;YACpC,OAAO,GAAG,CAAA;QACZ,CAAC,EACD,EAAE,CACH,CAAA;QAED,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,CAAA;IACpC,CAAC;CACF"}
1
+ {"version":3,"file":"flow-whatsapp-button-list-section.js","sourceRoot":"","sources":["../../../../src/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.tsx"],"names":[],"mappings":";;;AAMA,kEAA4D;AAC5D,mFAA2E;AAE3E,MAAa,6BAA8B,SAAQ,uCAAiB;IAC3D,KAAK,GAAG,EAAE,CAAA;IACV,IAAI,GAAgC,EAAE,CAAA;IAE7C,MAAM,CAAC,cAAc,CACnB,SAAsC,EACtC,MAAc;QAEd,MAAM,SAAS,GAAG,IAAI,6BAA6B,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;QACjE,SAAS,CAAC,KAAK,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,EAAE,SAAS,CAAC,KAAK,CAAC,CAAA;QAC/D,SAAS,CAAC,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CACxC,yDAAyB,CAAC,cAAc,CAAC,GAAG,EAAE,MAAM,CAAC,CACtD,CAAA;QACD,OAAO,SAAS,CAAA;IAClB,CAAC;IAED,SAAS,CAAC,YAAoB;QAC5B,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAC3B,CAAC,GAAiC,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE;YACnD,MAAM,UAAU,GAAG,GAAG,CAAC,SAAS,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAA;YACxD,IAAI,UAAU;gBAAE,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;YACpC,OAAO,GAAG,CAAA;QACZ,CAAC,EACD,EAAE,CACH,CAAA;QAED,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,CAAA;IACpC,CAAC;CACF;AA5BD,sEA4BC"}
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { HtWhatsappButtonListNode } from '../hubtype-fields';
3
2
  import { ContentFieldsBase } from './../content-fields-base';
4
3
  import { FlowWhatsappButtonListSection } from './flow-whatsapp-button-list-section';
@@ -1,25 +1,26 @@
1
- import { WhatsappButtonList } from '@botonic/react';
2
- import React from 'react';
3
- import { ContentFieldsBase } from './../content-fields-base';
4
- import { FlowWhatsappButtonListSection } from './flow-whatsapp-button-list-section';
5
- export class FlowWhatsappButtonList extends ContentFieldsBase {
6
- constructor() {
7
- super(...arguments);
8
- this.code = '';
9
- this.text = '';
10
- this.listButtonText = '';
11
- this.sections = [];
12
- }
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FlowWhatsappButtonList = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("@botonic/react");
6
+ const content_fields_base_1 = require("./../content-fields-base");
7
+ const flow_whatsapp_button_list_section_1 = require("./flow-whatsapp-button-list-section");
8
+ class FlowWhatsappButtonList extends content_fields_base_1.ContentFieldsBase {
9
+ code = '';
10
+ text = '';
11
+ listButtonText = '';
12
+ sections = [];
13
13
  static fromHubtypeCMS(component, locale) {
14
14
  const newWhatsappButtonList = new FlowWhatsappButtonList(component.id);
15
15
  newWhatsappButtonList.code = component.code;
16
16
  newWhatsappButtonList.text = this.getTextByLocale(locale, component.content.text);
17
17
  newWhatsappButtonList.listButtonText = this.getTextByLocale(locale, component.content.button_text);
18
- newWhatsappButtonList.sections = component.content.sections.map(section => FlowWhatsappButtonListSection.fromHubtypeCMS(section, locale));
18
+ newWhatsappButtonList.sections = component.content.sections.map(section => flow_whatsapp_button_list_section_1.FlowWhatsappButtonListSection.fromHubtypeCMS(section, locale));
19
19
  return newWhatsappButtonList;
20
20
  }
21
21
  toBotonic(id) {
22
- return (React.createElement(WhatsappButtonList, { key: id, body: this.text, button: this.listButtonText, sections: this.sections.map((section, sectionIndex) => section.toBotonic(sectionIndex)) }));
22
+ return ((0, jsx_runtime_1.jsx)(react_1.WhatsappButtonList, { body: this.text, button: this.listButtonText, sections: this.sections.map((section, sectionIndex) => section.toBotonic(sectionIndex)) }, id));
23
23
  }
24
24
  }
25
+ exports.FlowWhatsappButtonList = FlowWhatsappButtonList;
25
26
  //# sourceMappingURL=flow-whatsapp-button-list.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"flow-whatsapp-button-list.js","sourceRoot":"","sources":["../../../../src/content-fields/whatsapp-button-list/flow-whatsapp-button-list.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AACnD,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,iBAAiB,EAA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button-list.js","sourceRoot":"","sources":["../../../../src/content-fields/whatsapp-button-list/flow-whatsapp-button-list.tsx"],"names":[],"mappings":";;;;AAAA,0CAAmD;AAInD,kEAA4D;AAC5D,2FAAmF;AAEnF,MAAa,sBAAuB,SAAQ,uCAAiB;IACpD,IAAI,GAAG,EAAE,CAAA;IACT,IAAI,GAAG,EAAE,CAAA;IACT,cAAc,GAAG,EAAE,CAAA;IACnB,QAAQ,GAAoC,EAAE,CAAA;IAErD,MAAM,CAAC,cAAc,CACnB,SAAmC,EACnC,MAAc;QAEd,MAAM,qBAAqB,GAAG,IAAI,sBAAsB,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;QACtE,qBAAqB,CAAC,IAAI,GAAG,SAAS,CAAC,IAAI,CAAA;QAC3C,qBAAqB,CAAC,IAAI,GAAG,IAAI,CAAC,eAAe,CAC/C,MAAM,EACN,SAAS,CAAC,OAAO,CAAC,IAAI,CACvB,CAAA;QACD,qBAAqB,CAAC,cAAc,GAAG,IAAI,CAAC,eAAe,CACzD,MAAM,EACN,SAAS,CAAC,OAAO,CAAC,WAAW,CAC9B,CAAA;QACD,qBAAqB,CAAC,QAAQ,GAAG,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CACxE,iEAA6B,CAAC,cAAc,CAAC,OAAO,EAAE,MAAM,CAAC,CAC9D,CAAA;QACD,OAAO,qBAAqB,CAAA;IAC9B,CAAC;IAED,SAAS,CAAC,EAAU;QAClB,OAAO,CACL,uBAAC,0BAAkB,IAEjB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,MAAM,EAAE,IAAI,CAAC,cAAc,EAC3B,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,CACpD,OAAO,CAAC,SAAS,CAAC,YAAY,CAAC,CAChC,IALI,EAAE,CAMa,CACvB,CAAA;IACH,CAAC;CACF;AAtCD,wDAsCC"}
@@ -1,7 +1,11 @@
1
- export function conditionalProvider({ request, results, }) {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.conditionalProvider = void 0;
4
+ function conditionalProvider({ request, results, }) {
2
5
  const provider = request.session.user.provider;
3
6
  if (results.includes(provider))
4
7
  return provider;
5
8
  return 'default';
6
9
  }
10
+ exports.conditionalProvider = conditionalProvider;
7
11
  //# sourceMappingURL=conditional-provider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"conditional-provider.js","sourceRoot":"","sources":["../../../src/functions/conditional-provider.ts"],"names":[],"mappings":"AAOA,MAAM,UAAU,mBAAmB,CAAC,EAClC,OAAO,EACP,OAAO,GACiB;IACxB,MAAM,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAA;IAC9C,IAAI,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC;QAAE,OAAO,QAAQ,CAAA;IAC/C,OAAO,SAAS,CAAA;AAClB,CAAC"}
1
+ {"version":3,"file":"conditional-provider.js","sourceRoot":"","sources":["../../../src/functions/conditional-provider.ts"],"names":[],"mappings":";;;AAOA,SAAgB,mBAAmB,CAAC,EAClC,OAAO,EACP,OAAO,GACiB;IACxB,MAAM,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAA;IAC9C,IAAI,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC;QAAE,OAAO,QAAQ,CAAA;IAC/C,OAAO,SAAS,CAAA;AAClB,CAAC;AAPD,kDAOC"}
@@ -1,12 +1,17 @@
1
- import axios from 'axios';
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getQueueAvailability = exports.conditionalQueueStatus = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const axios_1 = tslib_1.__importDefault(require("axios"));
2
6
  const HUBTYPE_API_URL = process.env.HUBTYPE_API_URL || 'https://api.hubtype.com';
3
- export async function conditionalQueueStatus({ queue_id, }) {
7
+ async function conditionalQueueStatus({ queue_id, }) {
4
8
  const data = await getQueueAvailability(queue_id);
5
9
  const isAvailable = data.available;
6
10
  return isAvailable ? 'open' : 'closed';
7
11
  }
8
- export async function getQueueAvailability(queueId) {
9
- const response = await axios.get(`${HUBTYPE_API_URL}/public/v1/queues/${queueId}/availability/`,
12
+ exports.conditionalQueueStatus = conditionalQueueStatus;
13
+ async function getQueueAvailability(queueId) {
14
+ const response = await axios_1.default.get(`${HUBTYPE_API_URL}/public/v1/queues/${queueId}/availability/`,
10
15
  // TODO: Make it configurable in the future
11
16
  {
12
17
  params: {
@@ -17,4 +22,5 @@ export async function getQueueAvailability(queueId) {
17
22
  });
18
23
  return response.data;
19
24
  }
25
+ exports.getQueueAvailability = getQueueAvailability;
20
26
  //# sourceMappingURL=conditional-queue-status.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"conditional-queue-status.js","sourceRoot":"","sources":["../../../src/functions/conditional-queue-status.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,MAAM,eAAe,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,yBAAyB,CAAA;AAQhF,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAAC,EAC3C,QAAQ,GACmB;IAC3B,MAAM,IAAI,GAAG,MAAM,oBAAoB,CAAC,QAAQ,CAAC,CAAA;IACjD,MAAM,WAAW,GAAG,IAAI,CAAC,SAAS,CAAA;IAClC,OAAO,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAA;AACxC,CAAC;AAWD,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,OAAe;IAEf,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,CAC9B,GAAG,eAAe,qBAAqB,OAAO,gBAAgB;IAC9D,2CAA2C;IAC3C;QACE,MAAM,EAAE;YACN,oBAAoB,EAAE,IAAI;YAC1B,mBAAmB,EAAE,KAAK;YAC1B,sBAAsB,EAAE,KAAK;SAC9B;KACF,CACF,CAAA;IACD,OAAO,QAAQ,CAAC,IAAI,CAAA;AACtB,CAAC"}
1
+ {"version":3,"file":"conditional-queue-status.js","sourceRoot":"","sources":["../../../src/functions/conditional-queue-status.ts"],"names":[],"mappings":";;;;AACA,0DAAyB;AAEzB,MAAM,eAAe,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,yBAAyB,CAAA;AAQzE,KAAK,UAAU,sBAAsB,CAAC,EAC3C,QAAQ,GACmB;IAC3B,MAAM,IAAI,GAAG,MAAM,oBAAoB,CAAC,QAAQ,CAAC,CAAA;IACjD,MAAM,WAAW,GAAG,IAAI,CAAC,SAAS,CAAA;IAClC,OAAO,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAA;AACxC,CAAC;AAND,wDAMC;AAWM,KAAK,UAAU,oBAAoB,CACxC,OAAe;IAEf,MAAM,QAAQ,GAAG,MAAM,eAAK,CAAC,GAAG,CAC9B,GAAG,eAAe,qBAAqB,OAAO,gBAAgB;IAC9D,2CAA2C;IAC3C;QACE,MAAM,EAAE;YACN,oBAAoB,EAAE,IAAI;YAC1B,mBAAmB,EAAE,KAAK;YAC1B,sBAAsB,EAAE,KAAK;SAC9B;KACF,CACF,CAAA;IACD,OAAO,QAAQ,CAAC,IAAI,CAAA;AACtB,CAAC;AAfD,oDAeC"}
@@ -1,8 +1,11 @@
1
- import { conditionalProvider } from './conditional-provider';
2
- import { conditionalQueueStatus } from './conditional-queue-status';
3
- export const DEFAULT_FUNCTIONS = {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DEFAULT_FUNCTIONS = void 0;
4
+ const conditional_provider_1 = require("./conditional-provider");
5
+ const conditional_queue_status_1 = require("./conditional-queue-status");
6
+ exports.DEFAULT_FUNCTIONS = {
4
7
  // TODO: Rename api action name
5
- 'check-queue-status': conditionalQueueStatus,
6
- 'get-channel-type': conditionalProvider,
8
+ 'check-queue-status': conditional_queue_status_1.conditionalQueueStatus,
9
+ 'get-channel-type': conditional_provider_1.conditionalProvider,
7
10
  };
8
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/functions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAA;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAA;AAEnE,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,+BAA+B;IAC/B,oBAAoB,EAAE,sBAAsB;IAC5C,kBAAkB,EAAE,mBAAmB;CACxC,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/functions/index.ts"],"names":[],"mappings":";;;AAAA,iEAA4D;AAC5D,yEAAmE;AAEtD,QAAA,iBAAiB,GAAG;IAC/B,+BAA+B;IAC/B,oBAAoB,EAAE,iDAAsB;IAC5C,kBAAkB,EAAE,0CAAmB;CACxC,CAAA"}
@@ -1,5 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getFlowBuilderPlugin = void 0;
1
4
  const FLOW_BUILDER_PLUGIN_NAME = 'BotonicPluginFlowBuilder';
2
- export function getFlowBuilderPlugin(plugins) {
5
+ function getFlowBuilderPlugin(plugins) {
3
6
  const flowBuilderPlugin = Object.values(plugins).find(
4
7
  // @ts-ignore
5
8
  plugin => plugin.name.includes(FLOW_BUILDER_PLUGIN_NAME));
@@ -7,4 +10,5 @@ export function getFlowBuilderPlugin(plugins) {
7
10
  throw new Error(`You must include '@botonic/plugin-flow-builder' in your plugins file.`);
8
11
  return flowBuilderPlugin;
9
12
  }
13
+ exports.getFlowBuilderPlugin = getFlowBuilderPlugin;
10
14
  //# sourceMappingURL=helpers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/helpers.ts"],"names":[],"mappings":"AAIA,MAAM,wBAAwB,GAAG,0BAA0B,CAAA;AAE3D,MAAM,UAAU,oBAAoB,CAAC,OAEpC;IACC,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI;IACnD,aAAa;IACb,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,wBAAwB,CAAC,CAC7B,CAAA;IAC7B,IAAI,CAAC,iBAAiB;QACpB,MAAM,IAAI,KAAK,CACb,uEAAuE,CACxE,CAAA;IACH,OAAO,iBAAiB,CAAA;AAC1B,CAAC"}
1
+ {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/helpers.ts"],"names":[],"mappings":";;;AAIA,MAAM,wBAAwB,GAAG,0BAA0B,CAAA;AAE3D,SAAgB,oBAAoB,CAAC,OAEpC;IACC,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI;IACnD,aAAa;IACb,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,wBAAwB,CAAC,CAC7B,CAAA;IAC7B,IAAI,CAAC,iBAAiB;QACpB,MAAM,IAAI,KAAK,CACb,uEAAuE,CACxE,CAAA;IACH,OAAO,iBAAiB,CAAA;AAC1B,CAAC;AAZD,oDAYC"}
package/lib/esm/index.js CHANGED
@@ -1,26 +1,38 @@
1
- import { getNodeByUserInput } from './action/user-input';
2
- import { FlowBuilderApi } from './api';
3
- import { SEPARATOR, SOURCE_INFO_SEPARATOR } from './constants';
4
- import { FlowCarousel, FlowHandoff, FlowImage, FlowText, FlowVideo, FlowWhatsappButtonList, } from './content-fields';
5
- import { HtNodeWithContentType, } from './content-fields/hubtype-fields';
6
- import { DEFAULT_FUNCTIONS } from './functions';
7
- import { resolveGetAccessToken } from './utils';
8
- export default class BotonicPluginFlowBuilder {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const user_input_1 = require("./action/user-input");
5
+ const api_1 = require("./api");
6
+ const constants_1 = require("./constants");
7
+ const content_fields_1 = require("./content-fields");
8
+ const hubtype_fields_1 = require("./content-fields/hubtype-fields");
9
+ const functions_1 = require("./functions");
10
+ const utils_1 = require("./utils");
11
+ class BotonicPluginFlowBuilder {
12
+ options;
13
+ cmsApi;
14
+ flowUrl;
15
+ flow;
16
+ functions;
17
+ currentRequest;
18
+ getAccessToken;
19
+ getLocale;
20
+ trackEvent;
21
+ getKnowledgeBaseResponse;
9
22
  constructor(options) {
10
23
  this.options = options;
11
24
  this.flowUrl = options.flowUrl;
12
25
  this.flow = options.flow;
13
26
  this.getLocale = options.getLocale;
14
- this.getAccessToken = resolveGetAccessToken(options);
27
+ this.getAccessToken = (0, utils_1.resolveGetAccessToken)(options);
15
28
  this.trackEvent = options.trackEvent;
16
29
  this.getKnowledgeBaseResponse = options.getKnowledgeBaseResponse;
17
30
  const customFunctions = options.customFunctions || {};
18
- this.functions = Object.assign(Object.assign({}, DEFAULT_FUNCTIONS), customFunctions);
31
+ this.functions = { ...functions_1.DEFAULT_FUNCTIONS, ...customFunctions };
19
32
  }
20
33
  async pre(request) {
21
- var _a;
22
34
  this.currentRequest = request;
23
- this.cmsApi = await FlowBuilderApi.create({
35
+ this.cmsApi = await api_1.FlowBuilderApi.create({
24
36
  url: this.flowUrl,
25
37
  flow: this.flow,
26
38
  accessToken: this.getAccessToken(request.session),
@@ -30,11 +42,11 @@ export default class BotonicPluginFlowBuilder {
30
42
  !request.input.payload &&
31
43
  !request.session.is_first_interaction;
32
44
  if (checkUserTextInput) {
33
- const nodeByUserInput = await getNodeByUserInput(this.cmsApi, this.getLocale(request.session), request);
34
- request.input.payload = this.cmsApi.getPayload(nodeByUserInput === null || nodeByUserInput === void 0 ? void 0 : nodeByUserInput.target);
45
+ const nodeByUserInput = await (0, user_input_1.getNodeByUserInput)(this.cmsApi, this.getLocale(request.session), request);
46
+ request.input.payload = this.cmsApi.getPayload(nodeByUserInput?.target);
35
47
  }
36
48
  if (request.input.payload) {
37
- request.input.payload = (_a = request.input.payload) === null || _a === void 0 ? void 0 : _a.split(SOURCE_INFO_SEPARATOR)[0];
49
+ request.input.payload = request.input.payload?.split(constants_1.SOURCE_INFO_SEPARATOR)[0];
38
50
  }
39
51
  }
40
52
  async getContentsByCode(code, locale, prevContents) {
@@ -52,7 +64,7 @@ export default class BotonicPluginFlowBuilder {
52
64
  async getContentsByNode(node, locale, prevContents) {
53
65
  const contents = prevContents || [];
54
66
  const content = this.getFlowContent(node, locale);
55
- if (node.type === HtNodeWithContentType.FUNCTION) {
67
+ if (node.type === hubtype_fields_1.HtNodeWithContentType.FUNCTION) {
56
68
  const targetId = await this.callFunction(node, locale);
57
69
  return this.getContentsById(targetId, locale, contents);
58
70
  }
@@ -67,27 +79,27 @@ export default class BotonicPluginFlowBuilder {
67
79
  }
68
80
  getFlowContent(hubtypeContent, locale) {
69
81
  switch (hubtypeContent.type) {
70
- case HtNodeWithContentType.TEXT:
71
- return FlowText.fromHubtypeCMS(hubtypeContent, locale, this.cmsApi);
72
- case HtNodeWithContentType.IMAGE:
73
- return FlowImage.fromHubtypeCMS(hubtypeContent, locale);
74
- case HtNodeWithContentType.CAROUSEL:
75
- return FlowCarousel.fromHubtypeCMS(hubtypeContent, locale, this.cmsApi);
76
- case HtNodeWithContentType.VIDEO:
77
- return FlowVideo.fromHubtypeCMS(hubtypeContent, locale);
78
- case HtNodeWithContentType.WHATSAPP_BUTTON_LIST:
79
- return FlowWhatsappButtonList.fromHubtypeCMS(hubtypeContent, locale);
80
- case HtNodeWithContentType.HANDOFF:
81
- return FlowHandoff.fromHubtypeCMS(hubtypeContent, locale, this.cmsApi);
82
+ case hubtype_fields_1.HtNodeWithContentType.TEXT:
83
+ return content_fields_1.FlowText.fromHubtypeCMS(hubtypeContent, locale, this.cmsApi);
84
+ case hubtype_fields_1.HtNodeWithContentType.IMAGE:
85
+ return content_fields_1.FlowImage.fromHubtypeCMS(hubtypeContent, locale);
86
+ case hubtype_fields_1.HtNodeWithContentType.CAROUSEL:
87
+ return content_fields_1.FlowCarousel.fromHubtypeCMS(hubtypeContent, locale, this.cmsApi);
88
+ case hubtype_fields_1.HtNodeWithContentType.VIDEO:
89
+ return content_fields_1.FlowVideo.fromHubtypeCMS(hubtypeContent, locale);
90
+ case hubtype_fields_1.HtNodeWithContentType.WHATSAPP_BUTTON_LIST:
91
+ return content_fields_1.FlowWhatsappButtonList.fromHubtypeCMS(hubtypeContent, locale);
92
+ case hubtype_fields_1.HtNodeWithContentType.HANDOFF:
93
+ return content_fields_1.FlowHandoff.fromHubtypeCMS(hubtypeContent, locale, this.cmsApi);
82
94
  default:
83
95
  return undefined;
84
96
  }
85
97
  }
86
98
  async callFunction(functionNode, locale) {
87
- var _a;
88
99
  const functionNodeId = functionNode.id;
89
- const nameValues = ((_a = functionNode.content.arguments
90
- .find(arg => arg.locale === locale)) === null || _a === void 0 ? void 0 : _a.values.map(value => ({ [value.name]: value.value }))) || [];
100
+ const nameValues = functionNode.content.arguments
101
+ .find(arg => arg.locale === locale)
102
+ ?.values.map(value => ({ [value.name]: value.value })) || [];
91
103
  const args = Object.assign({
92
104
  request: this.currentRequest,
93
105
  results: functionNode.content.result_mapping.map(r => r.result),
@@ -95,16 +107,17 @@ export default class BotonicPluginFlowBuilder {
95
107
  const functionResult = await this.functions[functionNode.content.action](args);
96
108
  // TODO define result_mapping per locale??
97
109
  const result = functionNode.content.result_mapping.find(r => r.result === functionResult);
98
- if (!(result === null || result === void 0 ? void 0 : result.target)) {
110
+ if (!result?.target) {
99
111
  throw new Error(`No result found for result_mapping for node with id: ${functionNodeId}`);
100
112
  }
101
113
  return result.target.id;
102
114
  }
103
115
  getPayloadParams(payload) {
104
- const payloadParams = JSON.parse(payload.split(SEPARATOR)[1] || '{}');
116
+ const payloadParams = JSON.parse(payload.split(constants_1.SEPARATOR)[1] || '{}');
105
117
  return payloadParams;
106
118
  }
107
119
  }
108
- export * from './action';
109
- export * from './content-fields';
120
+ exports.default = BotonicPluginFlowBuilder;
121
+ tslib_1.__exportStar(require("./action"), exports);
122
+ tslib_1.__exportStar(require("./content-fields"), exports);
110
123
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,EAAE,SAAS,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAC9D,OAAO,EACL,YAAY,EAEZ,WAAW,EACX,SAAS,EACT,QAAQ,EACR,SAAS,EACT,sBAAsB,GACvB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAKL,qBAAqB,GACtB,MAAM,iCAAiC,CAAA;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAM/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAE/C,MAAM,CAAC,OAAO,OAAO,wBAAwB;IAiB3C,YAAqB,OAAwC;QAAxC,YAAO,GAAP,OAAO,CAAiC;QAC3D,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAA;QAC9B,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAA;QACxB,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAA;QAClC,IAAI,CAAC,cAAc,GAAG,qBAAqB,CAAC,OAAO,CAAC,CAAA;QACpD,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAA;QACpC,IAAI,CAAC,wBAAwB,GAAG,OAAO,CAAC,wBAAwB,CAAA;QAChE,MAAM,eAAe,GAAG,OAAO,CAAC,eAAe,IAAI,EAAE,CAAA;QACrD,IAAI,CAAC,SAAS,mCAAQ,iBAAiB,GAAK,eAAe,CAAE,CAAA;IAC/D,CAAC;IAED,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