@livechat/platform-workflows 0.0.20 → 0.0.21

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/README.md CHANGED
@@ -0,0 +1 @@
1
+ # @livechat/platform-workflows
package/dist/index.d.mts CHANGED
@@ -1,6 +1,5 @@
1
1
  import { ConfigBase, Config } from '@livechat/developer-studio-ui-react';
2
2
  import React$1 from 'react';
3
- import { IntegrationNames, GithubClientAuthorization, NetlifyClientAuthorization, VercelClientAuthorization, MailchimpClientAuthorization, ShopifyClientAuthorization, HubspotClientAuthorization, BigCommerceClientAuthorization, TextClientAuthorization } from '@livechat/developer-studio-api';
4
3
 
5
4
  interface WorkflowsConfigBase extends Omit<ConfigBase, "accountsClientId"> {
6
5
  publicUrl: string;
@@ -8,15 +7,6 @@ interface WorkflowsConfigBase extends Omit<ConfigBase, "accountsClientId"> {
8
7
  }
9
8
  type WorkflowsConfig = WorkflowsConfigBase & Config & {
10
9
  accountsClientId: string;
11
- bigcommerceClientId: string;
12
- githubAppClientId: string;
13
- githubOauthClientId: string;
14
- hubpotClientId: string;
15
- mailchimpClientId: string;
16
- netlifyClientId: string;
17
- shopifyClientId: string;
18
- vercelClientId: string;
19
- textClientId: string;
20
10
  workflowsAppId: string;
21
11
  workflowsWebhooksAppId: string;
22
12
  aiAgentId: string;
@@ -25,90 +15,18 @@ type WorkflowsConfig = WorkflowsConfigBase & Config & {
25
15
  };
26
16
  declare function setWorkflowsConfig(newConfig: Partial<WorkflowsConfigBase>): void;
27
17
  declare function getWorkflowsConfig(): WorkflowsConfig;
28
- declare const getWorkflowEnv: <T extends "accountsClientId" | "env" | "publicUrl" | "isHeadless" | "bigcommerceClientId" | "githubAppClientId" | "githubOauthClientId" | "hubpotClientId" | "mailchimpClientId" | "netlifyClientId" | "shopifyClientId" | "vercelClientId" | "textClientId" | "workflowsAppId" | "workflowsWebhooksAppId" | "aiAgentId" | "pusherKey" | "amplitudeKey" | "accountsUrl" | "platformUrl" | "adapterUrl" | "workflowsApiUr" | "dpsApiUrl" | "billingApiUrl" | "adapterApiUrl" | "livechatApiUrl" | "textApiUrl">(key: T) => WorkflowsConfig[T];
18
+ declare const getWorkflowsEnv: <T extends "accountsClientId" | "env" | "publicUrl" | "isHeadless" | "workflowsAppId" | "workflowsWebhooksAppId" | "aiAgentId" | "pusherKey" | "amplitudeKey" | "accountsUrl" | "platformUrl" | "adapterUrl" | "workflowsApiUr" | "dpsApiUrl" | "billingApiUrl" | "adapterApiUrl" | "livechatApiUrl" | "textApiUrl">(key: T) => WorkflowsConfig[T];
29
19
 
30
- type AuthSource = IntegrationNames.Accounts | IntegrationNames.GitHub | IntegrationNames.Vercel | IntegrationNames.Netlify | IntegrationNames.Mailchimp | IntegrationNames.Shopify | IntegrationNames.HubSpot | IntegrationNames.BigCommerce | IntegrationNames.Text;
31
- interface AuthState {
32
- github: {
33
- raw: GithubClientAuthorization;
34
- data: {
35
- isAuthorized?: boolean;
36
- };
37
- };
38
- netlify: {
39
- raw: NetlifyClientAuthorization;
40
- data: {
41
- isAuthorized?: boolean;
42
- };
43
- };
44
- vercel: {
45
- raw: VercelClientAuthorization;
46
- data: {
47
- isAuthorized?: boolean;
48
- };
49
- };
50
- mailchimp: {
51
- raw: MailchimpClientAuthorization;
52
- data: {
53
- isAuthorized?: boolean;
54
- };
55
- };
56
- shopify: {
57
- raw: ShopifyClientAuthorization;
58
- data: {
59
- isAuthorized?: boolean;
60
- };
61
- };
62
- hubspot: {
63
- raw: HubspotClientAuthorization;
64
- data: {
65
- isAuthorized?: boolean;
66
- };
67
- };
68
- bigcommerce: {
69
- raw: BigCommerceClientAuthorization;
70
- data: {
71
- isAuthorized?: boolean;
72
- };
73
- };
74
- text: {
75
- raw: TextClientAuthorization;
76
- data: {
77
- isAuthorized?: boolean;
78
- };
79
- };
80
- context: {
81
- appId?: string;
82
- };
83
- }
84
- type AuthStateActionParams = {
85
- [K in keyof Omit<AuthState, "context">]: {
86
- source: K;
87
- data: AuthState[K]["raw"];
88
- };
89
- }[keyof Omit<AuthState, "context">];
90
- interface IAuthContext {
91
- state: AuthState;
92
- login: ({ source, data }: AuthStateActionParams) => void;
93
- logout: (source: keyof Omit<AuthState, "context">) => void;
20
+ interface LoginErrorPageProps {
21
+ errorImage: React.ReactNode;
22
+ welcomeImage: React.ReactNode;
94
23
  }
95
- declare const AuthContext: React$1.Context<IAuthContext>;
96
- declare function AuthProvider({ children }: {
97
- children: React$1.ReactNode;
98
- }): JSX.Element;
24
+ declare function LoginErrorPage({ errorImage, welcomeImage, }: LoginErrorPageProps): JSX.Element;
99
25
 
100
26
  interface FlowsProps {
101
27
  waitlistImage: React$1.ReactNode;
102
28
  }
29
+ declare function FlowsRoute({ waitlistImage }: FlowsProps): JSX.Element;
103
30
  declare function Flows({ waitlistImage }: FlowsProps): JSX.Element;
104
31
 
105
- declare function SettingsSubNav(): JSX.Element;
106
- declare function Settings(): JSX.Element;
107
-
108
- interface LoginErrorPageProps {
109
- errorImage: React.ReactNode;
110
- welcomeImage: React.ReactNode;
111
- }
112
- declare function LoginErrorPage({ errorImage, welcomeImage, }: LoginErrorPageProps): JSX.Element;
113
-
114
- export { AuthContext, AuthProvider, type AuthSource, type AuthState, Flows, type IAuthContext, LoginErrorPage as LoginError, Settings, SettingsSubNav, type WorkflowsConfig, type WorkflowsConfigBase, getWorkflowEnv, getWorkflowsConfig, setWorkflowsConfig };
32
+ export { Flows, FlowsRoute, LoginErrorPage as LoginError, type WorkflowsConfig, type WorkflowsConfigBase, getWorkflowsConfig, getWorkflowsEnv, setWorkflowsConfig };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import { ConfigBase, Config } from '@livechat/developer-studio-ui-react';
2
2
  import React$1 from 'react';
3
- import { IntegrationNames, GithubClientAuthorization, NetlifyClientAuthorization, VercelClientAuthorization, MailchimpClientAuthorization, ShopifyClientAuthorization, HubspotClientAuthorization, BigCommerceClientAuthorization, TextClientAuthorization } from '@livechat/developer-studio-api';
4
3
 
5
4
  interface WorkflowsConfigBase extends Omit<ConfigBase, "accountsClientId"> {
6
5
  publicUrl: string;
@@ -8,15 +7,6 @@ interface WorkflowsConfigBase extends Omit<ConfigBase, "accountsClientId"> {
8
7
  }
9
8
  type WorkflowsConfig = WorkflowsConfigBase & Config & {
10
9
  accountsClientId: string;
11
- bigcommerceClientId: string;
12
- githubAppClientId: string;
13
- githubOauthClientId: string;
14
- hubpotClientId: string;
15
- mailchimpClientId: string;
16
- netlifyClientId: string;
17
- shopifyClientId: string;
18
- vercelClientId: string;
19
- textClientId: string;
20
10
  workflowsAppId: string;
21
11
  workflowsWebhooksAppId: string;
22
12
  aiAgentId: string;
@@ -25,90 +15,18 @@ type WorkflowsConfig = WorkflowsConfigBase & Config & {
25
15
  };
26
16
  declare function setWorkflowsConfig(newConfig: Partial<WorkflowsConfigBase>): void;
27
17
  declare function getWorkflowsConfig(): WorkflowsConfig;
28
- declare const getWorkflowEnv: <T extends "accountsClientId" | "env" | "publicUrl" | "isHeadless" | "bigcommerceClientId" | "githubAppClientId" | "githubOauthClientId" | "hubpotClientId" | "mailchimpClientId" | "netlifyClientId" | "shopifyClientId" | "vercelClientId" | "textClientId" | "workflowsAppId" | "workflowsWebhooksAppId" | "aiAgentId" | "pusherKey" | "amplitudeKey" | "accountsUrl" | "platformUrl" | "adapterUrl" | "workflowsApiUr" | "dpsApiUrl" | "billingApiUrl" | "adapterApiUrl" | "livechatApiUrl" | "textApiUrl">(key: T) => WorkflowsConfig[T];
18
+ declare const getWorkflowsEnv: <T extends "accountsClientId" | "env" | "publicUrl" | "isHeadless" | "workflowsAppId" | "workflowsWebhooksAppId" | "aiAgentId" | "pusherKey" | "amplitudeKey" | "accountsUrl" | "platformUrl" | "adapterUrl" | "workflowsApiUr" | "dpsApiUrl" | "billingApiUrl" | "adapterApiUrl" | "livechatApiUrl" | "textApiUrl">(key: T) => WorkflowsConfig[T];
29
19
 
30
- type AuthSource = IntegrationNames.Accounts | IntegrationNames.GitHub | IntegrationNames.Vercel | IntegrationNames.Netlify | IntegrationNames.Mailchimp | IntegrationNames.Shopify | IntegrationNames.HubSpot | IntegrationNames.BigCommerce | IntegrationNames.Text;
31
- interface AuthState {
32
- github: {
33
- raw: GithubClientAuthorization;
34
- data: {
35
- isAuthorized?: boolean;
36
- };
37
- };
38
- netlify: {
39
- raw: NetlifyClientAuthorization;
40
- data: {
41
- isAuthorized?: boolean;
42
- };
43
- };
44
- vercel: {
45
- raw: VercelClientAuthorization;
46
- data: {
47
- isAuthorized?: boolean;
48
- };
49
- };
50
- mailchimp: {
51
- raw: MailchimpClientAuthorization;
52
- data: {
53
- isAuthorized?: boolean;
54
- };
55
- };
56
- shopify: {
57
- raw: ShopifyClientAuthorization;
58
- data: {
59
- isAuthorized?: boolean;
60
- };
61
- };
62
- hubspot: {
63
- raw: HubspotClientAuthorization;
64
- data: {
65
- isAuthorized?: boolean;
66
- };
67
- };
68
- bigcommerce: {
69
- raw: BigCommerceClientAuthorization;
70
- data: {
71
- isAuthorized?: boolean;
72
- };
73
- };
74
- text: {
75
- raw: TextClientAuthorization;
76
- data: {
77
- isAuthorized?: boolean;
78
- };
79
- };
80
- context: {
81
- appId?: string;
82
- };
83
- }
84
- type AuthStateActionParams = {
85
- [K in keyof Omit<AuthState, "context">]: {
86
- source: K;
87
- data: AuthState[K]["raw"];
88
- };
89
- }[keyof Omit<AuthState, "context">];
90
- interface IAuthContext {
91
- state: AuthState;
92
- login: ({ source, data }: AuthStateActionParams) => void;
93
- logout: (source: keyof Omit<AuthState, "context">) => void;
20
+ interface LoginErrorPageProps {
21
+ errorImage: React.ReactNode;
22
+ welcomeImage: React.ReactNode;
94
23
  }
95
- declare const AuthContext: React$1.Context<IAuthContext>;
96
- declare function AuthProvider({ children }: {
97
- children: React$1.ReactNode;
98
- }): JSX.Element;
24
+ declare function LoginErrorPage({ errorImage, welcomeImage, }: LoginErrorPageProps): JSX.Element;
99
25
 
100
26
  interface FlowsProps {
101
27
  waitlistImage: React$1.ReactNode;
102
28
  }
29
+ declare function FlowsRoute({ waitlistImage }: FlowsProps): JSX.Element;
103
30
  declare function Flows({ waitlistImage }: FlowsProps): JSX.Element;
104
31
 
105
- declare function SettingsSubNav(): JSX.Element;
106
- declare function Settings(): JSX.Element;
107
-
108
- interface LoginErrorPageProps {
109
- errorImage: React.ReactNode;
110
- welcomeImage: React.ReactNode;
111
- }
112
- declare function LoginErrorPage({ errorImage, welcomeImage, }: LoginErrorPageProps): JSX.Element;
113
-
114
- export { AuthContext, AuthProvider, type AuthSource, type AuthState, Flows, type IAuthContext, LoginErrorPage as LoginError, Settings, SettingsSubNav, type WorkflowsConfig, type WorkflowsConfigBase, getWorkflowEnv, getWorkflowsConfig, setWorkflowsConfig };
32
+ export { Flows, FlowsRoute, LoginErrorPage as LoginError, type WorkflowsConfig, type WorkflowsConfigBase, getWorkflowsConfig, getWorkflowsEnv, setWorkflowsConfig };