@livechat/platform-workflows 0.1.7 → 0.44.0-beta.v1

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.
@@ -0,0 +1,19 @@
1
+ // src/config.ts
2
+ var CONFIG_STORE_KEY = "__livechatPlatformWorkflowsConfig";
3
+ var store = globalThis;
4
+ var _a;
5
+ var config = (_a = store[CONFIG_STORE_KEY]) != null ? _a : store[CONFIG_STORE_KEY] = {
6
+ config: {}
7
+ };
8
+ function setWorkflowsConfig(newConfig) {
9
+ config.config = { ...config.config, ...newConfig };
10
+ }
11
+ var getWorkflowsEnv = (key) => {
12
+ return config.config[key];
13
+ };
14
+
15
+ export {
16
+ config,
17
+ setWorkflowsConfig,
18
+ getWorkflowsEnv
19
+ };
package/dist/config.d.mts CHANGED
@@ -3,10 +3,6 @@ import { Config } from '@livechat/developer-studio-ui-react';
3
3
  type WorkflowsConfig = Config & {
4
4
  subPath?: string;
5
5
  isHeadless: boolean;
6
- workflowsAppId: string;
7
- workflowsWebhooksAppId: string;
8
- workflowsFunctionsUrl: string;
9
- workflowAiAgentId: string;
10
6
  isLiveChatMode: boolean;
11
7
  isTextMode: boolean;
12
8
  pusherKey: string;
package/dist/config.d.ts CHANGED
@@ -3,10 +3,6 @@ import { Config } from '@livechat/developer-studio-ui-react';
3
3
  type WorkflowsConfig = Config & {
4
4
  subPath?: string;
5
5
  isHeadless: boolean;
6
- workflowsAppId: string;
7
- workflowsWebhooksAppId: string;
8
- workflowsFunctionsUrl: string;
9
- workflowAiAgentId: string;
10
6
  isLiveChatMode: boolean;
11
7
  isTextMode: boolean;
12
8
  pusherKey: string;
package/dist/config.js CHANGED
@@ -2,21 +2,7 @@
2
2
  var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
6
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
8
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9
- var __spreadValues = (a, b) => {
10
- for (var prop in b || (b = {}))
11
- if (__hasOwnProp.call(b, prop))
12
- __defNormalProp(a, prop, b[prop]);
13
- if (__getOwnPropSymbols)
14
- for (var prop of __getOwnPropSymbols(b)) {
15
- if (__propIsEnum.call(b, prop))
16
- __defNormalProp(a, prop, b[prop]);
17
- }
18
- return a;
19
- };
20
6
  var __export = (target, all) => {
21
7
  for (var name in all)
22
8
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -39,11 +25,14 @@ __export(config_exports, {
39
25
  setWorkflowsConfig: () => setWorkflowsConfig
40
26
  });
41
27
  module.exports = __toCommonJS(config_exports);
42
- var config = {
43
- config: void 0
28
+ var CONFIG_STORE_KEY = "__livechatPlatformWorkflowsConfig";
29
+ var store = globalThis;
30
+ var _a;
31
+ var config = (_a = store[CONFIG_STORE_KEY]) != null ? _a : store[CONFIG_STORE_KEY] = {
32
+ config: {}
44
33
  };
45
34
  function setWorkflowsConfig(newConfig) {
46
- config.config = __spreadValues(__spreadValues({}, config.config), newConfig);
35
+ config.config = { ...config.config, ...newConfig };
47
36
  }
48
37
  var getWorkflowsEnv = (key) => {
49
38
  return config.config[key];
package/dist/config.mjs CHANGED
@@ -2,8 +2,7 @@ import {
2
2
  config,
3
3
  getWorkflowsEnv,
4
4
  setWorkflowsConfig
5
- } from "./chunk-BW4GCPXP.mjs";
6
- import "./chunk-I4E63NIC.mjs";
5
+ } from "./chunk-OAUPCV3P.mjs";
7
6
  export {
8
7
  config,
9
8
  getWorkflowsEnv,