veryfront 0.0.55 → 0.0.57
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 +15 -10
- 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 +1 -5
- package/dist/index.js.map +2 -2
- package/dist/integrations/_base/files/app/api/integrations/status/route.ts +1 -1
- package/dist/integrations/_base/files/lib/token-store-examples.ts +1 -1
- package/dist/integrations/airtable/files/app/api/auth/airtable/callback/route.ts +23 -3
- package/dist/integrations/asana/files/app/api/auth/asana/callback/route.ts +23 -3
- package/dist/integrations/bitbucket/files/app/api/auth/bitbucket/callback/route.ts +23 -3
- package/dist/integrations/box/files/app/api/auth/box/callback/route.ts +23 -3
- package/dist/integrations/calendar/files/app/api/auth/calendar/callback/route.ts +23 -3
- package/dist/integrations/clickup/files/app/api/auth/clickup/callback/route.ts +23 -3
- package/dist/integrations/confluence/files/app/api/auth/confluence/callback/route.ts +23 -3
- package/dist/integrations/discord/files/app/api/auth/discord/callback/route.ts +23 -3
- package/dist/integrations/docs-google/files/app/api/auth/docs-google/callback/route.ts +24 -4
- package/dist/integrations/drive/files/app/api/auth/drive/callback/route.ts +24 -4
- package/dist/integrations/dropbox/files/app/api/auth/dropbox/callback/route.ts +23 -3
- package/dist/integrations/figma/files/app/api/auth/figma/callback/route.ts +23 -3
- package/dist/integrations/freshdesk/files/app/api/auth/freshdesk/callback/route.ts +24 -4
- package/dist/integrations/github/files/app/api/auth/github/callback/route.ts +23 -3
- package/dist/integrations/gitlab/files/app/api/auth/gitlab/callback/route.ts +23 -3
- package/dist/integrations/gmail/files/app/api/auth/gmail/callback/route.ts +22 -4
- package/dist/integrations/gmail/files/lib/gmail-client.ts +21 -3
- package/dist/integrations/hubspot/files/app/api/auth/hubspot/callback/route.ts +23 -3
- package/dist/integrations/intercom/files/app/api/auth/intercom/callback/route.ts +24 -4
- package/dist/integrations/jira/files/app/api/auth/jira/callback/route.ts +23 -3
- package/dist/integrations/linear/files/app/api/auth/linear/callback/route.ts +23 -3
- package/dist/integrations/mailchimp/files/app/api/auth/mailchimp/callback/route.ts +23 -3
- package/dist/integrations/monday/files/app/api/auth/monday/callback/route.ts +24 -4
- package/dist/integrations/neon/files/app/api/auth/neon/route.ts +1 -1
- package/dist/integrations/notion/files/app/api/auth/notion/callback/route.ts +23 -3
- package/dist/integrations/onedrive/files/app/api/auth/onedrive/callback/route.ts +23 -3
- package/dist/integrations/outlook/files/app/api/auth/outlook/callback/route.ts +23 -3
- package/dist/integrations/pipedrive/files/app/api/auth/pipedrive/callback/route.ts +24 -4
- package/dist/integrations/quickbooks/files/app/api/auth/quickbooks/callback/route.ts +24 -4
- package/dist/integrations/salesforce/files/app/api/auth/salesforce/callback/route.ts +23 -3
- package/dist/integrations/sharepoint/files/app/api/auth/sharepoint/callback/route.ts +23 -3
- package/dist/integrations/sheets/files/app/api/auth/sheets/callback/route.ts +23 -3
- package/dist/integrations/shopify/files/app/api/auth/shopify/callback/route.ts +24 -4
- package/dist/integrations/slack/files/app/api/auth/slack/callback/route.ts +23 -3
- package/dist/integrations/teams/files/app/api/auth/teams/callback/route.ts +23 -3
- package/dist/integrations/trello/files/app/api/auth/trello/callback/route.ts +24 -4
- package/dist/integrations/twitter/files/app/api/auth/twitter/callback/route.ts +23 -3
- package/dist/integrations/webex/files/app/api/auth/webex/callback/route.ts +23 -3
- package/dist/integrations/xero/files/app/api/auth/xero/callback/route.ts +24 -4
- package/dist/integrations/zoom/files/app/api/auth/zoom/callback/route.ts +24 -4
- package/package.json +1 -1
|
@@ -1,11 +1,31 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Twitter OAuth Callback
|
|
3
|
+
*
|
|
4
|
+
* Handles the OAuth callback from Twitter and stores the tokens.
|
|
3
5
|
*/
|
|
4
6
|
|
|
5
7
|
import { createOAuthCallbackHandler, memoryTokenStore, twitterConfig } from "veryfront/oauth";
|
|
8
|
+
import { tokenStore } from "../../../../../lib/token-store.ts";
|
|
9
|
+
|
|
10
|
+
// Hybrid adapter: uses framework's memoryTokenStore for state (PKCE),
|
|
11
|
+
// but user's tokenStore for actual token storage
|
|
12
|
+
const hybridTokenStore = {
|
|
13
|
+
// Token methods - delegate to user's tokenStore
|
|
14
|
+
async getTokens(serviceId: string) {
|
|
15
|
+
return tokenStore.getToken("current-user", serviceId);
|
|
16
|
+
},
|
|
17
|
+
async setTokens(serviceId: string, tokens: { accessToken: string; refreshToken?: string; expiresAt?: number }) {
|
|
18
|
+
await tokenStore.setToken("current-user", serviceId, tokens);
|
|
19
|
+
},
|
|
20
|
+
async clearTokens(serviceId: string) {
|
|
21
|
+
await tokenStore.revokeToken("current-user", serviceId);
|
|
22
|
+
},
|
|
23
|
+
// State methods - delegate to framework's memoryTokenStore (shared with init route)
|
|
24
|
+
getState: (state: string) => memoryTokenStore.getState(state),
|
|
25
|
+
setState: (state: { state: string; codeVerifier?: string; createdAt: number }) => memoryTokenStore.setState(state),
|
|
26
|
+
clearState: (state: string) => memoryTokenStore.clearState(state),
|
|
27
|
+
};
|
|
6
28
|
|
|
7
29
|
export const GET = createOAuthCallbackHandler(twitterConfig, {
|
|
8
|
-
tokenStore:
|
|
9
|
-
onSuccess: () => "/",
|
|
10
|
-
onError: () => "/",
|
|
30
|
+
tokenStore: hybridTokenStore,
|
|
11
31
|
});
|
|
@@ -1,11 +1,31 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Webex OAuth Callback
|
|
3
|
+
*
|
|
4
|
+
* Handles the OAuth callback from Webex and stores the tokens.
|
|
3
5
|
*/
|
|
4
6
|
|
|
5
7
|
import { createOAuthCallbackHandler, memoryTokenStore, webexConfig } from "veryfront/oauth";
|
|
8
|
+
import { tokenStore } from "../../../../../lib/token-store.ts";
|
|
9
|
+
|
|
10
|
+
// Hybrid adapter: uses framework's memoryTokenStore for state (PKCE),
|
|
11
|
+
// but user's tokenStore for actual token storage
|
|
12
|
+
const hybridTokenStore = {
|
|
13
|
+
// Token methods - delegate to user's tokenStore
|
|
14
|
+
async getTokens(serviceId: string) {
|
|
15
|
+
return tokenStore.getToken("current-user", serviceId);
|
|
16
|
+
},
|
|
17
|
+
async setTokens(serviceId: string, tokens: { accessToken: string; refreshToken?: string; expiresAt?: number }) {
|
|
18
|
+
await tokenStore.setToken("current-user", serviceId, tokens);
|
|
19
|
+
},
|
|
20
|
+
async clearTokens(serviceId: string) {
|
|
21
|
+
await tokenStore.revokeToken("current-user", serviceId);
|
|
22
|
+
},
|
|
23
|
+
// State methods - delegate to framework's memoryTokenStore (shared with init route)
|
|
24
|
+
getState: (state: string) => memoryTokenStore.getState(state),
|
|
25
|
+
setState: (state: { state: string; codeVerifier?: string; createdAt: number }) => memoryTokenStore.setState(state),
|
|
26
|
+
clearState: (state: string) => memoryTokenStore.clearState(state),
|
|
27
|
+
};
|
|
6
28
|
|
|
7
29
|
export const GET = createOAuthCallbackHandler(webexConfig, {
|
|
8
|
-
tokenStore:
|
|
9
|
-
onSuccess: () => "/",
|
|
10
|
-
onError: () => "/",
|
|
30
|
+
tokenStore: hybridTokenStore,
|
|
11
31
|
});
|
|
@@ -1,11 +1,31 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Xero OAuth Callback
|
|
3
|
+
*
|
|
4
|
+
* Handles the OAuth callback from Xero and stores the tokens.
|
|
3
5
|
*/
|
|
4
6
|
|
|
5
|
-
import {
|
|
7
|
+
import { createOAuthCallbackHandler, memoryTokenStore, xeroConfig } from "veryfront/oauth";
|
|
8
|
+
import { tokenStore } from "../../../../../lib/token-store.ts";
|
|
9
|
+
|
|
10
|
+
// Hybrid adapter: uses framework's memoryTokenStore for state (PKCE),
|
|
11
|
+
// but user's tokenStore for actual token storage
|
|
12
|
+
const hybridTokenStore = {
|
|
13
|
+
// Token methods - delegate to user's tokenStore
|
|
14
|
+
async getTokens(serviceId: string) {
|
|
15
|
+
return tokenStore.getToken("current-user", serviceId);
|
|
16
|
+
},
|
|
17
|
+
async setTokens(serviceId: string, tokens: { accessToken: string; refreshToken?: string; expiresAt?: number }) {
|
|
18
|
+
await tokenStore.setToken("current-user", serviceId, tokens);
|
|
19
|
+
},
|
|
20
|
+
async clearTokens(serviceId: string) {
|
|
21
|
+
await tokenStore.revokeToken("current-user", serviceId);
|
|
22
|
+
},
|
|
23
|
+
// State methods - delegate to framework's memoryTokenStore (shared with init route)
|
|
24
|
+
getState: (state: string) => memoryTokenStore.getState(state),
|
|
25
|
+
setState: (state: { state: string; codeVerifier?: string; createdAt: number }) => memoryTokenStore.setState(state),
|
|
26
|
+
clearState: (state: string) => memoryTokenStore.clearState(state),
|
|
27
|
+
};
|
|
6
28
|
|
|
7
29
|
export const GET = createOAuthCallbackHandler(xeroConfig, {
|
|
8
|
-
tokenStore:
|
|
9
|
-
onSuccess: () => "/",
|
|
10
|
-
onError: () => "/",
|
|
30
|
+
tokenStore: hybridTokenStore,
|
|
11
31
|
});
|
|
@@ -1,11 +1,31 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Zoom OAuth Callback
|
|
3
|
+
*
|
|
4
|
+
* Handles the OAuth callback from Zoom and stores the tokens.
|
|
3
5
|
*/
|
|
4
6
|
|
|
5
|
-
import {
|
|
7
|
+
import { createOAuthCallbackHandler, memoryTokenStore, zoomConfig } from "veryfront/oauth";
|
|
8
|
+
import { tokenStore } from "../../../../../lib/token-store.ts";
|
|
9
|
+
|
|
10
|
+
// Hybrid adapter: uses framework's memoryTokenStore for state (PKCE),
|
|
11
|
+
// but user's tokenStore for actual token storage
|
|
12
|
+
const hybridTokenStore = {
|
|
13
|
+
// Token methods - delegate to user's tokenStore
|
|
14
|
+
async getTokens(serviceId: string) {
|
|
15
|
+
return tokenStore.getToken("current-user", serviceId);
|
|
16
|
+
},
|
|
17
|
+
async setTokens(serviceId: string, tokens: { accessToken: string; refreshToken?: string; expiresAt?: number }) {
|
|
18
|
+
await tokenStore.setToken("current-user", serviceId, tokens);
|
|
19
|
+
},
|
|
20
|
+
async clearTokens(serviceId: string) {
|
|
21
|
+
await tokenStore.revokeToken("current-user", serviceId);
|
|
22
|
+
},
|
|
23
|
+
// State methods - delegate to framework's memoryTokenStore (shared with init route)
|
|
24
|
+
getState: (state: string) => memoryTokenStore.getState(state),
|
|
25
|
+
setState: (state: { state: string; codeVerifier?: string; createdAt: number }) => memoryTokenStore.setState(state),
|
|
26
|
+
clearState: (state: string) => memoryTokenStore.clearState(state),
|
|
27
|
+
};
|
|
6
28
|
|
|
7
29
|
export const GET = createOAuthCallbackHandler(zoomConfig, {
|
|
8
|
-
tokenStore:
|
|
9
|
-
onSuccess: () => "/",
|
|
10
|
-
onError: () => "/",
|
|
30
|
+
tokenStore: hybridTokenStore,
|
|
11
31
|
});
|