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