@livechat/platform-workflows 0.0.13 → 0.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -1
- package/dist/index.mjs +6 -2
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -2,7 +2,7 @@ import { ConfigBase, Config } from '@livechat/developer-studio-ui-react';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { IntegrationNames, GithubClientAuthorization, NetlifyClientAuthorization, VercelClientAuthorization, NeonClientAuthorization, MailchimpClientAuthorization, ShopifyClientAuthorization, HubspotClientAuthorization, BigCommerceClientAuthorization, TextClientAuthorization } from '@livechat/developer-studio-api';
|
|
4
4
|
|
|
5
|
-
interface WorkflowsConfigBase extends ConfigBase {
|
|
5
|
+
interface WorkflowsConfigBase extends Omit<ConfigBase, "accountsClientId"> {
|
|
6
6
|
publicUrl: string;
|
|
7
7
|
isHeadless?: boolean;
|
|
8
8
|
}
|
|
@@ -26,7 +26,7 @@ type WorkflowsConfig = WorkflowsConfigBase & Config & {
|
|
|
26
26
|
};
|
|
27
27
|
declare function setWorkflowsConfig(newConfig: Partial<WorkflowsConfigBase>): void;
|
|
28
28
|
declare function getWorkflowsConfig(): WorkflowsConfig;
|
|
29
|
-
declare const getWorkflowEnv: <T extends "
|
|
29
|
+
declare const getWorkflowEnv: <T extends "accountsClientId" | "env" | "publicUrl" | "isHeadless" | "bigcommerceClientId" | "githubAppClientId" | "githubOauthClientId" | "hubpotClientId" | "mailchimpClientId" | "neonClientId" | "netlifyClientId" | "shopifyClientId" | "vercelClientId" | "textClientId" | "workflowsAppId" | "workflowsWebhooksAppId" | "aiAgentId" | "pusherKey" | "amplitudeKey" | "accountsUrl" | "platformUrl" | "adapterUrl" | "workflowsApiUr" | "dpsApiUrl" | "billingApiUrl" | "adapterApiUrl" | "livechatApiUrl" | "textApiUrl">(key: T) => WorkflowsConfig[T];
|
|
30
30
|
|
|
31
31
|
type AuthSource = IntegrationNames.Accounts | IntegrationNames.GitHub | IntegrationNames.Vercel | IntegrationNames.Netlify | IntegrationNames.Neon | IntegrationNames.Mailchimp | IntegrationNames.Shopify | IntegrationNames.HubSpot | IntegrationNames.BigCommerce | IntegrationNames.Text;
|
|
32
32
|
interface AuthState {
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { ConfigBase, Config } from '@livechat/developer-studio-ui-react';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { IntegrationNames, GithubClientAuthorization, NetlifyClientAuthorization, VercelClientAuthorization, NeonClientAuthorization, MailchimpClientAuthorization, ShopifyClientAuthorization, HubspotClientAuthorization, BigCommerceClientAuthorization, TextClientAuthorization } from '@livechat/developer-studio-api';
|
|
4
4
|
|
|
5
|
-
interface WorkflowsConfigBase extends ConfigBase {
|
|
5
|
+
interface WorkflowsConfigBase extends Omit<ConfigBase, "accountsClientId"> {
|
|
6
6
|
publicUrl: string;
|
|
7
7
|
isHeadless?: boolean;
|
|
8
8
|
}
|
|
@@ -26,7 +26,7 @@ type WorkflowsConfig = WorkflowsConfigBase & Config & {
|
|
|
26
26
|
};
|
|
27
27
|
declare function setWorkflowsConfig(newConfig: Partial<WorkflowsConfigBase>): void;
|
|
28
28
|
declare function getWorkflowsConfig(): WorkflowsConfig;
|
|
29
|
-
declare const getWorkflowEnv: <T extends "
|
|
29
|
+
declare const getWorkflowEnv: <T extends "accountsClientId" | "env" | "publicUrl" | "isHeadless" | "bigcommerceClientId" | "githubAppClientId" | "githubOauthClientId" | "hubpotClientId" | "mailchimpClientId" | "neonClientId" | "netlifyClientId" | "shopifyClientId" | "vercelClientId" | "textClientId" | "workflowsAppId" | "workflowsWebhooksAppId" | "aiAgentId" | "pusherKey" | "amplitudeKey" | "accountsUrl" | "platformUrl" | "adapterUrl" | "workflowsApiUr" | "dpsApiUrl" | "billingApiUrl" | "adapterApiUrl" | "livechatApiUrl" | "textApiUrl">(key: T) => WorkflowsConfig[T];
|
|
30
30
|
|
|
31
31
|
type AuthSource = IntegrationNames.Accounts | IntegrationNames.GitHub | IntegrationNames.Vercel | IntegrationNames.Netlify | IntegrationNames.Neon | IntegrationNames.Mailchimp | IntegrationNames.Shopify | IntegrationNames.HubSpot | IntegrationNames.BigCommerce | IntegrationNames.Text;
|
|
32
32
|
interface AuthState {
|
package/dist/index.js
CHANGED
|
@@ -492,11 +492,14 @@ var config = {
|
|
|
492
492
|
};
|
|
493
493
|
function setWorkflowsConfig(newConfig) {
|
|
494
494
|
config = __spreadValues(__spreadValues({}, config), newConfig);
|
|
495
|
+
(0, import_developer_studio_ui_react.setConfig)({
|
|
496
|
+
env: newConfig.env
|
|
497
|
+
});
|
|
495
498
|
}
|
|
496
499
|
function getWorkflowsConfig() {
|
|
497
500
|
const isProd = config.env === "prod";
|
|
498
501
|
const coreConfig = (0, import_developer_studio_ui_react.getConfig)();
|
|
499
|
-
return __spreadProps(__spreadValues(__spreadValues({},
|
|
502
|
+
return __spreadProps(__spreadValues(__spreadValues({}, coreConfig), config), {
|
|
500
503
|
// Authorization
|
|
501
504
|
accountsClientId: isProd ? "381b682538d896b6a25f54caf1805650" : "bc52b2c51dc4a5c2491ca49eaa7354d0",
|
|
502
505
|
bigcommerceClientId: isProd ? "af8s9yyeub656rb4iavnpi73l9doy5u" : "epcwshxqf6azf8hr6mvif4gaqyoa4y0",
|
package/dist/index.mjs
CHANGED
|
@@ -466,7 +466,8 @@ var require_extends = __commonJS({
|
|
|
466
466
|
|
|
467
467
|
// src/config.ts
|
|
468
468
|
import {
|
|
469
|
-
getConfig
|
|
469
|
+
getConfig,
|
|
470
|
+
setConfig
|
|
470
471
|
} from "@livechat/developer-studio-ui-react";
|
|
471
472
|
var config = {
|
|
472
473
|
env: "labs",
|
|
@@ -474,11 +475,14 @@ var config = {
|
|
|
474
475
|
};
|
|
475
476
|
function setWorkflowsConfig(newConfig) {
|
|
476
477
|
config = __spreadValues(__spreadValues({}, config), newConfig);
|
|
478
|
+
setConfig({
|
|
479
|
+
env: newConfig.env
|
|
480
|
+
});
|
|
477
481
|
}
|
|
478
482
|
function getWorkflowsConfig() {
|
|
479
483
|
const isProd = config.env === "prod";
|
|
480
484
|
const coreConfig = getConfig();
|
|
481
|
-
return __spreadProps(__spreadValues(__spreadValues({},
|
|
485
|
+
return __spreadProps(__spreadValues(__spreadValues({}, coreConfig), config), {
|
|
482
486
|
// Authorization
|
|
483
487
|
accountsClientId: isProd ? "381b682538d896b6a25f54caf1805650" : "bc52b2c51dc4a5c2491ca49eaa7354d0",
|
|
484
488
|
bigcommerceClientId: isProd ? "af8s9yyeub656rb4iavnpi73l9doy5u" : "epcwshxqf6azf8hr6mvif4gaqyoa4y0",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@livechat/platform-workflows",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.15",
|
|
4
4
|
"description": "Text Platform | Workflows",
|
|
5
5
|
"author": "Wojciech Dudek",
|
|
6
6
|
"license": "MIT",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"postcss-modules": "^6.0.0",
|
|
41
41
|
"tsup": "^8.0.0",
|
|
42
42
|
"typescript": "^5.1.6",
|
|
43
|
-
"
|
|
44
|
-
"
|
|
43
|
+
"eslint-config-custom": "0.0.10",
|
|
44
|
+
"tsconfig": "0.0.1"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@lexical/react": "^0.19.0",
|
|
@@ -77,8 +77,8 @@
|
|
|
77
77
|
"uuid": "^9.0.1",
|
|
78
78
|
"validator": "^13.12.0",
|
|
79
79
|
"web-worker": "^1.3.0",
|
|
80
|
-
"@livechat/developer-studio-
|
|
81
|
-
"@livechat/developer-studio-
|
|
80
|
+
"@livechat/developer-studio-ui-react": "0.0.55",
|
|
81
|
+
"@livechat/developer-studio-api": "3.3.7"
|
|
82
82
|
},
|
|
83
83
|
"peerDependencies": {
|
|
84
84
|
"@tanstack/react-query": "4.36.1",
|