veryfront 0.0.50 → 0.0.51
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/ai/index.js +1 -1
- package/dist/ai/index.js.map +1 -1
- package/dist/ai/workflow.js +1 -1
- package/dist/ai/workflow.js.map +1 -1
- package/dist/cli.js +11 -5
- package/dist/components.js +1 -1
- package/dist/components.js.map +1 -1
- package/dist/config.js +1 -1
- package/dist/config.js.map +1 -1
- package/dist/data.js +1 -1
- package/dist/data.js.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +2 -2
- package/dist/integrations/_base/files/app/api/integrations/status/route.ts +3 -3
- package/dist/integrations/_base/files/app/api/integrations/token-storage/route.ts +18 -6
- package/dist/integrations/_base/files/app/setup/page.tsx +11 -1
- package/package.json +1 -1
- package/dist/integrations/airtable/files/lib/token-store.ts +0 -5
- package/dist/integrations/asana/files/lib/token-store.ts +0 -11
- package/dist/integrations/bitbucket/files/lib/token-store.ts +0 -5
- package/dist/integrations/box/files/lib/token-store.ts +0 -11
- package/dist/integrations/calendar/files/lib/token-store.ts +0 -5
- package/dist/integrations/clickup/files/lib/token-store.ts +0 -11
- package/dist/integrations/confluence/files/lib/token-store.ts +0 -5
- package/dist/integrations/discord/files/lib/token-store.ts +0 -5
- package/dist/integrations/docs-google/files/lib/token-store.ts +0 -5
- package/dist/integrations/drive/files/lib/token-store.ts +0 -113
- package/dist/integrations/dropbox/files/lib/token-store.ts +0 -5
- package/dist/integrations/figma/files/lib/token-store.ts +0 -5
- package/dist/integrations/freshdesk/files/lib/token-store.ts +0 -11
- package/dist/integrations/github/files/lib/token-store.ts +0 -5
- package/dist/integrations/gitlab/files/lib/token-store.ts +0 -5
- package/dist/integrations/gmail/files/lib/token-store.ts +0 -8
- package/dist/integrations/hubspot/files/lib/token-store.ts +0 -5
- package/dist/integrations/intercom/files/lib/token-store.ts +0 -11
- package/dist/integrations/jira/files/lib/token-store.ts +0 -5
- package/dist/integrations/linear/files/lib/token-store.ts +0 -5
- package/dist/integrations/mailchimp/files/lib/token-store.ts +0 -11
- package/dist/integrations/mixpanel/files/lib/token-store.ts +0 -43
- package/dist/integrations/monday/files/lib/token-store.ts +0 -11
- package/dist/integrations/neon/files/lib/token-store.ts +0 -29
- package/dist/integrations/notion/files/lib/token-store.ts +0 -5
- package/dist/integrations/onedrive/files/lib/token-store.ts +0 -5
- package/dist/integrations/outlook/files/lib/token-store.ts +0 -5
- package/dist/integrations/pipedrive/files/lib/token-store.ts +0 -11
- package/dist/integrations/posthog/files/lib/token-store.ts +0 -21
- package/dist/integrations/quickbooks/files/lib/token-store.ts +0 -11
- package/dist/integrations/salesforce/files/lib/token-store.ts +0 -5
- package/dist/integrations/sentry/files/lib/token-store.ts +0 -29
- package/dist/integrations/servicenow/files/lib/token-store.ts +0 -42
- package/dist/integrations/sharepoint/files/lib/token-store.ts +0 -5
- package/dist/integrations/sheets/files/lib/token-store.ts +0 -5
- package/dist/integrations/shopify/files/lib/token-store.ts +0 -11
- package/dist/integrations/slack/files/lib/token-store.ts +0 -5
- package/dist/integrations/snowflake/files/lib/token-store.ts +0 -77
- package/dist/integrations/stripe/files/lib/token-store.ts +0 -21
- package/dist/integrations/supabase/files/lib/token-store.ts +0 -47
- package/dist/integrations/teams/files/lib/token-store.ts +0 -5
- package/dist/integrations/trello/files/lib/token-store.ts +0 -11
- package/dist/integrations/twilio/files/lib/token-store.ts +0 -60
- package/dist/integrations/twitter/files/lib/token-store.ts +0 -5
- package/dist/integrations/webex/files/lib/token-store.ts +0 -11
- package/dist/integrations/xero/files/lib/token-store.ts +0 -11
- package/dist/integrations/zendesk/files/lib/token-store.ts +0 -47
- package/dist/integrations/zoom/files/lib/token-store.ts +0 -11
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
// In-memory configuration store for development
|
|
2
|
-
// For production, replace with a secure database-backed implementation
|
|
3
|
-
|
|
4
|
-
interface SnowflakeConfig {
|
|
5
|
-
account: string;
|
|
6
|
-
username: string;
|
|
7
|
-
password: string;
|
|
8
|
-
warehouse: string;
|
|
9
|
-
database?: string;
|
|
10
|
-
schema?: string;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
let configStore: SnowflakeConfig | null = null;
|
|
14
|
-
|
|
15
|
-
export function setSnowflakeConfig(config: SnowflakeConfig): void {
|
|
16
|
-
configStore = config;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export function getSnowflakeAccount(): string {
|
|
20
|
-
if (!configStore?.account) {
|
|
21
|
-
throw new Error(
|
|
22
|
-
"Snowflake account not configured. Please set SNOWFLAKE_ACCOUNT environment variable.",
|
|
23
|
-
);
|
|
24
|
-
}
|
|
25
|
-
return configStore.account;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export function getSnowflakeUsername(): string {
|
|
29
|
-
if (!configStore?.username) {
|
|
30
|
-
throw new Error(
|
|
31
|
-
"Snowflake username not configured. Please set SNOWFLAKE_USERNAME environment variable.",
|
|
32
|
-
);
|
|
33
|
-
}
|
|
34
|
-
return configStore.username;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export function getSnowflakePassword(): string {
|
|
38
|
-
if (!configStore?.password) {
|
|
39
|
-
throw new Error(
|
|
40
|
-
"Snowflake password not configured. Please set SNOWFLAKE_PASSWORD environment variable.",
|
|
41
|
-
);
|
|
42
|
-
}
|
|
43
|
-
return configStore.password;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export function getSnowflakeWarehouse(): string {
|
|
47
|
-
if (!configStore?.warehouse) {
|
|
48
|
-
throw new Error(
|
|
49
|
-
"Snowflake warehouse not configured. Please set SNOWFLAKE_WAREHOUSE environment variable.",
|
|
50
|
-
);
|
|
51
|
-
}
|
|
52
|
-
return configStore.warehouse;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export function getSnowflakeDatabase(): string | undefined {
|
|
56
|
-
return configStore?.database;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export function getSnowflakeSchema(): string {
|
|
60
|
-
return configStore?.schema || "PUBLIC";
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
export function clearConfig(): void {
|
|
64
|
-
configStore = null;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export function isConfigured(): boolean {
|
|
68
|
-
return configStore !== null &&
|
|
69
|
-
!!configStore.account &&
|
|
70
|
-
!!configStore.username &&
|
|
71
|
-
!!configStore.password &&
|
|
72
|
-
!!configStore.warehouse;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
export function getConfig(): SnowflakeConfig | null {
|
|
76
|
-
return configStore;
|
|
77
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
// In-memory API key store for development
|
|
2
|
-
// For production, replace with a secure database-backed implementation
|
|
3
|
-
|
|
4
|
-
let apiKey: string | null = null;
|
|
5
|
-
|
|
6
|
-
export function setApiKey(key: string): void {
|
|
7
|
-
apiKey = key;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export function getApiKey(): string | null {
|
|
11
|
-
// Try environment variable first, then in-memory store
|
|
12
|
-
return process.env.STRIPE_SECRET_KEY || apiKey;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export function clearApiKey(): void {
|
|
16
|
-
apiKey = null;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export function isAuthenticated(): boolean {
|
|
20
|
-
return getApiKey() !== null;
|
|
21
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
// In-memory API key store for development
|
|
2
|
-
// For production, replace with a database-backed implementation
|
|
3
|
-
|
|
4
|
-
interface SupabaseConfig {
|
|
5
|
-
url: string;
|
|
6
|
-
anonKey: string;
|
|
7
|
-
serviceKey: string;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
let configStore: SupabaseConfig | null = null;
|
|
11
|
-
|
|
12
|
-
export function setSupabaseConfig(config: SupabaseConfig): void {
|
|
13
|
-
configStore = config;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export function getSupabaseUrl(): string {
|
|
17
|
-
if (!configStore?.url) {
|
|
18
|
-
throw new Error("Supabase URL not configured. Please set SUPABASE_URL environment variable.");
|
|
19
|
-
}
|
|
20
|
-
return configStore.url;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export function getAnonKey(): string {
|
|
24
|
-
if (!configStore?.anonKey) {
|
|
25
|
-
throw new Error(
|
|
26
|
-
"Supabase anon key not configured. Please set SUPABASE_ANON_KEY environment variable.",
|
|
27
|
-
);
|
|
28
|
-
}
|
|
29
|
-
return configStore.anonKey;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export function getServiceKey(): string {
|
|
33
|
-
if (!configStore?.serviceKey) {
|
|
34
|
-
throw new Error(
|
|
35
|
-
"Supabase service key not configured. Please set SUPABASE_SERVICE_KEY environment variable.",
|
|
36
|
-
);
|
|
37
|
-
}
|
|
38
|
-
return configStore.serviceKey;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export function clearConfig(): void {
|
|
42
|
-
configStore = null;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export function isConfigured(): boolean {
|
|
46
|
-
return configStore !== null;
|
|
47
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Trello Token Store
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
export { memoryTokenStore as tokenStore, type OAuthTokens, type TokenStore } from "veryfront/oauth";
|
|
6
|
-
|
|
7
|
-
export async function getAccessToken(): Promise<string | null> {
|
|
8
|
-
const { tokenStore } = await import("./token-store.ts");
|
|
9
|
-
const tokens = await tokenStore.get("trello");
|
|
10
|
-
return tokens?.accessToken ?? null;
|
|
11
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
// Helper for Cross-Platform environment access
|
|
2
|
-
function getEnv(key: string): string | undefined {
|
|
3
|
-
// @ts-ignore - Deno global
|
|
4
|
-
if (typeof Deno !== "undefined") {
|
|
5
|
-
// @ts-ignore - Deno global
|
|
6
|
-
return Deno.env.get(key);
|
|
7
|
-
} // @ts-ignore - process global
|
|
8
|
-
else if (typeof process !== "undefined" && process.env) {
|
|
9
|
-
// @ts-ignore - process global
|
|
10
|
-
return process.env[key];
|
|
11
|
-
}
|
|
12
|
-
return undefined;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Get Twilio credentials from environment variables
|
|
17
|
-
*/
|
|
18
|
-
export function getTwilioCredentials(): {
|
|
19
|
-
accountSid: string;
|
|
20
|
-
authToken: string;
|
|
21
|
-
phoneNumber: string;
|
|
22
|
-
} | null {
|
|
23
|
-
const accountSid = getEnv("TWILIO_ACCOUNT_SID");
|
|
24
|
-
const authToken = getEnv("TWILIO_AUTH_TOKEN");
|
|
25
|
-
const phoneNumber = getEnv("TWILIO_PHONE_NUMBER");
|
|
26
|
-
|
|
27
|
-
if (!accountSid || !authToken || !phoneNumber) {
|
|
28
|
-
return null;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
return { accountSid, authToken, phoneNumber };
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Check if Twilio is authenticated
|
|
36
|
-
*/
|
|
37
|
-
export function isAuthenticated(): boolean {
|
|
38
|
-
return getTwilioCredentials() !== null;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Get Twilio Account SID
|
|
43
|
-
*/
|
|
44
|
-
export function getAccountSid(): string | null {
|
|
45
|
-
return getEnv("TWILIO_ACCOUNT_SID") || null;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Get Twilio Auth Token
|
|
50
|
-
*/
|
|
51
|
-
export function getAuthToken(): string | null {
|
|
52
|
-
return getEnv("TWILIO_AUTH_TOKEN") || null;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Get Twilio Phone Number
|
|
57
|
-
*/
|
|
58
|
-
export function getPhoneNumber(): string | null {
|
|
59
|
-
return getEnv("TWILIO_PHONE_NUMBER") || null;
|
|
60
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Webex Token Store
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
export { memoryTokenStore as tokenStore, type OAuthTokens, type TokenStore } from "veryfront/oauth";
|
|
6
|
-
|
|
7
|
-
export async function getAccessToken(): Promise<string | null> {
|
|
8
|
-
const { tokenStore } = await import("./token-store.ts");
|
|
9
|
-
const tokens = await tokenStore.get("webex");
|
|
10
|
-
return tokens?.accessToken ?? null;
|
|
11
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Xero Token Store
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
export { memoryTokenStore as tokenStore, type OAuthTokens, type TokenStore } from "veryfront/oauth";
|
|
6
|
-
|
|
7
|
-
export async function getAccessToken(): Promise<string | null> {
|
|
8
|
-
const { tokenStore } = await import("./token-store.ts");
|
|
9
|
-
const tokens = await tokenStore.get("xero");
|
|
10
|
-
return tokens?.accessToken ?? null;
|
|
11
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Zendesk Token Store
|
|
3
|
-
*
|
|
4
|
-
* Simple in-memory token storage for development.
|
|
5
|
-
* In production, use a persistent store like Redis or a database.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
export interface ZendeskTokens {
|
|
9
|
-
accessToken: string;
|
|
10
|
-
refreshToken?: string;
|
|
11
|
-
expiresAt?: number;
|
|
12
|
-
subdomain?: string;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
// In-memory storage (replace with persistent storage in production)
|
|
16
|
-
let tokens: ZendeskTokens | null = null;
|
|
17
|
-
|
|
18
|
-
export function getZendeskTokens(): Promise<ZendeskTokens | null> {
|
|
19
|
-
return Promise.resolve(tokens);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export function setZendeskTokens(newTokens: ZendeskTokens): Promise<void> {
|
|
23
|
-
tokens = newTokens;
|
|
24
|
-
return Promise.resolve();
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export function clearZendeskTokens(): Promise<void> {
|
|
28
|
-
tokens = null;
|
|
29
|
-
return Promise.resolve();
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export async function isZendeskConnected(): Promise<boolean> {
|
|
33
|
-
const t = await getZendeskTokens();
|
|
34
|
-
if (!t) return false;
|
|
35
|
-
|
|
36
|
-
// Check if token is expired (with 5 minute buffer)
|
|
37
|
-
if (t.expiresAt && Date.now() > t.expiresAt - 5 * 60 * 1000) {
|
|
38
|
-
return false;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
return true;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export async function getSubdomain(): Promise<string | null> {
|
|
45
|
-
const t = await getZendeskTokens();
|
|
46
|
-
return t?.subdomain || null;
|
|
47
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Zoom Token Store
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
export { memoryTokenStore as tokenStore, type OAuthTokens, type TokenStore } from "veryfront/oauth";
|
|
6
|
-
|
|
7
|
-
export async function getAccessToken(): Promise<string | null> {
|
|
8
|
-
const { tokenStore } = await import("./token-store.ts");
|
|
9
|
-
const tokens = await tokenStore.get("zoom");
|
|
10
|
-
return tokens?.accessToken ?? null;
|
|
11
|
-
}
|