veryfront 0.0.54 → 0.0.55

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.
@@ -25,10 +25,15 @@ export function ServiceConnections({ services, className = "" }: ServiceConnecti
25
25
  useEffect(() => {
26
26
  async function checkStatus() {
27
27
  try {
28
- const res = await fetch("/api/auth/status");
28
+ const res = await fetch("/api/integrations/status");
29
29
  if (res.ok) {
30
30
  const data = await res.json();
31
- setStatus(data.services || {});
31
+ // Convert array to Record<id, boolean> for status lookup
32
+ const statusMap: Record<string, boolean> = {};
33
+ for (const integration of data.integrations || []) {
34
+ statusMap[integration.id] = integration.connected;
35
+ }
36
+ setStatus(statusMap);
32
37
  }
33
38
  } catch (err) {
34
39
  console.error("Failed to check service status:", err);
@@ -103,10 +108,15 @@ export function ServiceConnectionsCard({ services, className = "" }: ServiceConn
103
108
  useEffect(() => {
104
109
  async function checkStatus() {
105
110
  try {
106
- const res = await fetch("/api/auth/status");
111
+ const res = await fetch("/api/integrations/status");
107
112
  if (res.ok) {
108
113
  const data = await res.json();
109
- setStatus(data.services || {});
114
+ // Convert array to Record<id, boolean> for status lookup
115
+ const statusMap: Record<string, boolean> = {};
116
+ for (const integration of data.integrations || []) {
117
+ statusMap[integration.id] = integration.connected;
118
+ }
119
+ setStatus(statusMap);
110
120
  }
111
121
  } catch (err) {
112
122
  console.error("Failed to check service status:", err);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "veryfront",
3
- "version": "0.0.54",
3
+ "version": "0.0.55",
4
4
  "description": "Zero-config React meta-framework for building agentic AI applications",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,30 +0,0 @@
1
- import { tokenStore } from "../../../../lib/token-store.ts";
2
-
3
- // Services to check - add/remove based on your integrations
4
- // Gmail and Calendar share OAuth credentials, so we check both separately
5
- const SERVICES = [
6
- { id: "gmail", name: "Gmail" },
7
- { id: "calendar", name: "Calendar" },
8
- // { id: 'slack', name: 'Slack' },
9
- // { id: 'github', name: 'GitHub' },
10
- ];
11
-
12
- export async function GET() {
13
- // In production, get userId from session/cookie
14
- // For development, we use a default user
15
- const userId = "current-user";
16
-
17
- const services: Record<string, boolean> = {};
18
-
19
- for (const service of SERVICES) {
20
- try {
21
- services[service.id] = await tokenStore.isConnected(userId, service.id);
22
- } catch {
23
- services[service.id] = false;
24
- }
25
- }
26
-
27
- return new Response(JSON.stringify({ services }), {
28
- headers: { "Content-Type": "application/json" },
29
- });
30
- }