integrate-sdk 0.8.3 → 0.8.5

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.
@@ -1645,12 +1645,21 @@ class OAuthManager {
1645
1645
  })
1646
1646
  });
1647
1647
  if (!response.ok) {
1648
- const errorText = await response.text();
1649
- console.error(`Failed to disconnect ${provider} via API: ${response.status} ${errorText}`);
1648
+ if (response.status === 404) {
1649
+ console.warn(`[Integrate SDK] OAuth disconnect route not found at ${url}. ` + `The route may not be set up on your server. ` + `Local token will still be cleared. ` + `To enable server-side disconnect, set up the route handler at ${this.oauthApiBase}/disconnect`);
1650
+ } else {
1651
+ const errorText = await response.text();
1652
+ console.warn(`[Integrate SDK] Failed to disconnect ${provider} via API: ${response.status} ${errorText}. ` + `Local token will still be cleared.`);
1653
+ }
1650
1654
  }
1651
1655
  }
1652
1656
  } catch (error) {
1653
- console.error(`Failed to disconnect ${provider} via API:`, error);
1657
+ const url = this.apiBaseUrl ? `${this.apiBaseUrl}${this.oauthApiBase}/disconnect` : `${this.oauthApiBase}/disconnect`;
1658
+ if (error instanceof TypeError && error.message.includes("fetch")) {
1659
+ console.warn(`[Integrate SDK] Could not reach disconnect route at ${url}. ` + `The route may not be set up on your server. ` + `Local token will still be cleared. ` + `To enable server-side disconnect, set up the route handler at ${this.oauthApiBase}/disconnect`);
1660
+ } else {
1661
+ console.warn(`[Integrate SDK] Failed to disconnect ${provider} via API: ${error}. ` + `Local token will still be cleared.`);
1662
+ }
1654
1663
  }
1655
1664
  }
1656
1665
  this.providerTokens.delete(provider);
@@ -1994,7 +2003,7 @@ class MCPClientBase {
1994
2003
  timeout: config.timeout
1995
2004
  });
1996
2005
  const oauthApiBase = config.oauthApiBase || "/api/integrate/oauth";
1997
- const defaultRedirectUri = this.getDefaultRedirectUri(oauthApiBase);
2006
+ const defaultRedirectUri = this.getDefaultRedirectUri(oauthApiBase, config.apiBaseUrl);
1998
2007
  this.apiRouteBase = config.apiRouteBase || "/api/integrate";
1999
2008
  this.apiBaseUrl = config.apiBaseUrl;
2000
2009
  this.integrations = config.integrations.map((integration) => {
@@ -2080,13 +2089,18 @@ class MCPClientBase {
2080
2089
  this.server = this.createServerProxy();
2081
2090
  this.initializeIntegrations();
2082
2091
  }
2083
- getDefaultRedirectUri(oauthApiBase) {
2092
+ getDefaultRedirectUri(oauthApiBase, apiBaseUrl) {
2093
+ const normalizedPath = oauthApiBase.replace(/\/$/, "");
2094
+ const callbackPath = `${normalizedPath}/callback`;
2095
+ if (apiBaseUrl) {
2096
+ const normalizedApiBaseUrl = apiBaseUrl.replace(/\/$/, "");
2097
+ return `${normalizedApiBaseUrl}${callbackPath}`;
2098
+ }
2084
2099
  if (typeof window === "undefined" || !window.location) {
2085
2100
  return "http://localhost:3000/api/integrate/oauth/callback";
2086
2101
  }
2087
2102
  const origin = window.location.origin;
2088
- const normalizedPath = oauthApiBase.replace(/\/$/, "");
2089
- return `${origin}${normalizedPath}/callback`;
2103
+ return `${origin}${callbackPath}`;
2090
2104
  }
2091
2105
  createIntegrationProxy(integrationId) {
2092
2106
  const hasIntegration = this.integrations.some((integration) => integration.id === integrationId);
@@ -2327,6 +2341,12 @@ class MCPClientBase {
2327
2341
  }
2328
2342
  clearSessionToken() {
2329
2343
  this.oauthManager.clearAllProviderTokens();
2344
+ for (const integration of this.integrations) {
2345
+ if (integration.oauth) {
2346
+ const provider = integration.oauth.provider;
2347
+ this.authState.set(provider, { authenticated: false });
2348
+ }
2349
+ }
2330
2350
  }
2331
2351
  async disconnectProvider(provider, context) {
2332
2352
  const integration = this.integrations.find((p) => p.oauth?.provider === provider);
@@ -2485,7 +2505,11 @@ class MCPClientBase {
2485
2505
  }
2486
2506
  async setProviderToken(provider, tokenData, context) {
2487
2507
  await this.oauthManager.setProviderToken(provider, tokenData, context);
2488
- this.authState.set(provider, { authenticated: true });
2508
+ if (tokenData === null) {
2509
+ this.authState.set(provider, { authenticated: false });
2510
+ } else {
2511
+ this.authState.set(provider, { authenticated: true });
2512
+ }
2489
2513
  }
2490
2514
  getAllProviderTokens() {
2491
2515
  const tokens = {};
@@ -1504,12 +1504,21 @@ class OAuthManager {
1504
1504
  })
1505
1505
  });
1506
1506
  if (!response.ok) {
1507
- const errorText = await response.text();
1508
- console.error(`Failed to disconnect ${provider} via API: ${response.status} ${errorText}`);
1507
+ if (response.status === 404) {
1508
+ console.warn(`[Integrate SDK] OAuth disconnect route not found at ${url}. ` + `The route may not be set up on your server. ` + `Local token will still be cleared. ` + `To enable server-side disconnect, set up the route handler at ${this.oauthApiBase}/disconnect`);
1509
+ } else {
1510
+ const errorText = await response.text();
1511
+ console.warn(`[Integrate SDK] Failed to disconnect ${provider} via API: ${response.status} ${errorText}. ` + `Local token will still be cleared.`);
1512
+ }
1509
1513
  }
1510
1514
  }
1511
1515
  } catch (error) {
1512
- console.error(`Failed to disconnect ${provider} via API:`, error);
1516
+ const url = this.apiBaseUrl ? `${this.apiBaseUrl}${this.oauthApiBase}/disconnect` : `${this.oauthApiBase}/disconnect`;
1517
+ if (error instanceof TypeError && error.message.includes("fetch")) {
1518
+ console.warn(`[Integrate SDK] Could not reach disconnect route at ${url}. ` + `The route may not be set up on your server. ` + `Local token will still be cleared. ` + `To enable server-side disconnect, set up the route handler at ${this.oauthApiBase}/disconnect`);
1519
+ } else {
1520
+ console.warn(`[Integrate SDK] Failed to disconnect ${provider} via API: ${error}. ` + `Local token will still be cleared.`);
1521
+ }
1513
1522
  }
1514
1523
  }
1515
1524
  this.providerTokens.delete(provider);
@@ -1853,7 +1862,7 @@ class MCPClientBase {
1853
1862
  timeout: config.timeout
1854
1863
  });
1855
1864
  const oauthApiBase = config.oauthApiBase || "/api/integrate/oauth";
1856
- const defaultRedirectUri = this.getDefaultRedirectUri(oauthApiBase);
1865
+ const defaultRedirectUri = this.getDefaultRedirectUri(oauthApiBase, config.apiBaseUrl);
1857
1866
  this.apiRouteBase = config.apiRouteBase || "/api/integrate";
1858
1867
  this.apiBaseUrl = config.apiBaseUrl;
1859
1868
  this.integrations = config.integrations.map((integration) => {
@@ -1939,13 +1948,18 @@ class MCPClientBase {
1939
1948
  this.server = this.createServerProxy();
1940
1949
  this.initializeIntegrations();
1941
1950
  }
1942
- getDefaultRedirectUri(oauthApiBase) {
1951
+ getDefaultRedirectUri(oauthApiBase, apiBaseUrl) {
1952
+ const normalizedPath = oauthApiBase.replace(/\/$/, "");
1953
+ const callbackPath = `${normalizedPath}/callback`;
1954
+ if (apiBaseUrl) {
1955
+ const normalizedApiBaseUrl = apiBaseUrl.replace(/\/$/, "");
1956
+ return `${normalizedApiBaseUrl}${callbackPath}`;
1957
+ }
1943
1958
  if (typeof window === "undefined" || !window.location) {
1944
1959
  return "http://localhost:3000/api/integrate/oauth/callback";
1945
1960
  }
1946
1961
  const origin = window.location.origin;
1947
- const normalizedPath = oauthApiBase.replace(/\/$/, "");
1948
- return `${origin}${normalizedPath}/callback`;
1962
+ return `${origin}${callbackPath}`;
1949
1963
  }
1950
1964
  createIntegrationProxy(integrationId) {
1951
1965
  const hasIntegration = this.integrations.some((integration) => integration.id === integrationId);
@@ -2186,6 +2200,12 @@ class MCPClientBase {
2186
2200
  }
2187
2201
  clearSessionToken() {
2188
2202
  this.oauthManager.clearAllProviderTokens();
2203
+ for (const integration of this.integrations) {
2204
+ if (integration.oauth) {
2205
+ const provider = integration.oauth.provider;
2206
+ this.authState.set(provider, { authenticated: false });
2207
+ }
2208
+ }
2189
2209
  }
2190
2210
  async disconnectProvider(provider, context) {
2191
2211
  const integration = this.integrations.find((p) => p.oauth?.provider === provider);
@@ -2344,7 +2364,11 @@ class MCPClientBase {
2344
2364
  }
2345
2365
  async setProviderToken(provider, tokenData, context) {
2346
2366
  await this.oauthManager.setProviderToken(provider, tokenData, context);
2347
- this.authState.set(provider, { authenticated: true });
2367
+ if (tokenData === null) {
2368
+ this.authState.set(provider, { authenticated: false });
2369
+ } else {
2370
+ this.authState.set(provider, { authenticated: true });
2371
+ }
2348
2372
  }
2349
2373
  getAllProviderTokens() {
2350
2374
  const tokens = {};
@@ -1504,12 +1504,21 @@ class OAuthManager {
1504
1504
  })
1505
1505
  });
1506
1506
  if (!response.ok) {
1507
- const errorText = await response.text();
1508
- console.error(`Failed to disconnect ${provider} via API: ${response.status} ${errorText}`);
1507
+ if (response.status === 404) {
1508
+ console.warn(`[Integrate SDK] OAuth disconnect route not found at ${url}. ` + `The route may not be set up on your server. ` + `Local token will still be cleared. ` + `To enable server-side disconnect, set up the route handler at ${this.oauthApiBase}/disconnect`);
1509
+ } else {
1510
+ const errorText = await response.text();
1511
+ console.warn(`[Integrate SDK] Failed to disconnect ${provider} via API: ${response.status} ${errorText}. ` + `Local token will still be cleared.`);
1512
+ }
1509
1513
  }
1510
1514
  }
1511
1515
  } catch (error) {
1512
- console.error(`Failed to disconnect ${provider} via API:`, error);
1516
+ const url = this.apiBaseUrl ? `${this.apiBaseUrl}${this.oauthApiBase}/disconnect` : `${this.oauthApiBase}/disconnect`;
1517
+ if (error instanceof TypeError && error.message.includes("fetch")) {
1518
+ console.warn(`[Integrate SDK] Could not reach disconnect route at ${url}. ` + `The route may not be set up on your server. ` + `Local token will still be cleared. ` + `To enable server-side disconnect, set up the route handler at ${this.oauthApiBase}/disconnect`);
1519
+ } else {
1520
+ console.warn(`[Integrate SDK] Failed to disconnect ${provider} via API: ${error}. ` + `Local token will still be cleared.`);
1521
+ }
1513
1522
  }
1514
1523
  }
1515
1524
  this.providerTokens.delete(provider);
@@ -1853,7 +1862,7 @@ class MCPClientBase {
1853
1862
  timeout: config.timeout
1854
1863
  });
1855
1864
  const oauthApiBase = config.oauthApiBase || "/api/integrate/oauth";
1856
- const defaultRedirectUri = this.getDefaultRedirectUri(oauthApiBase);
1865
+ const defaultRedirectUri = this.getDefaultRedirectUri(oauthApiBase, config.apiBaseUrl);
1857
1866
  this.apiRouteBase = config.apiRouteBase || "/api/integrate";
1858
1867
  this.apiBaseUrl = config.apiBaseUrl;
1859
1868
  this.integrations = config.integrations.map((integration) => {
@@ -1939,13 +1948,18 @@ class MCPClientBase {
1939
1948
  this.server = this.createServerProxy();
1940
1949
  this.initializeIntegrations();
1941
1950
  }
1942
- getDefaultRedirectUri(oauthApiBase) {
1951
+ getDefaultRedirectUri(oauthApiBase, apiBaseUrl) {
1952
+ const normalizedPath = oauthApiBase.replace(/\/$/, "");
1953
+ const callbackPath = `${normalizedPath}/callback`;
1954
+ if (apiBaseUrl) {
1955
+ const normalizedApiBaseUrl = apiBaseUrl.replace(/\/$/, "");
1956
+ return `${normalizedApiBaseUrl}${callbackPath}`;
1957
+ }
1943
1958
  if (typeof window === "undefined" || !window.location) {
1944
1959
  return "http://localhost:3000/api/integrate/oauth/callback";
1945
1960
  }
1946
1961
  const origin = window.location.origin;
1947
- const normalizedPath = oauthApiBase.replace(/\/$/, "");
1948
- return `${origin}${normalizedPath}/callback`;
1962
+ return `${origin}${callbackPath}`;
1949
1963
  }
1950
1964
  createIntegrationProxy(integrationId) {
1951
1965
  const hasIntegration = this.integrations.some((integration) => integration.id === integrationId);
@@ -2186,6 +2200,12 @@ class MCPClientBase {
2186
2200
  }
2187
2201
  clearSessionToken() {
2188
2202
  this.oauthManager.clearAllProviderTokens();
2203
+ for (const integration of this.integrations) {
2204
+ if (integration.oauth) {
2205
+ const provider = integration.oauth.provider;
2206
+ this.authState.set(provider, { authenticated: false });
2207
+ }
2208
+ }
2189
2209
  }
2190
2210
  async disconnectProvider(provider, context) {
2191
2211
  const integration = this.integrations.find((p) => p.oauth?.provider === provider);
@@ -2344,7 +2364,11 @@ class MCPClientBase {
2344
2364
  }
2345
2365
  async setProviderToken(provider, tokenData, context) {
2346
2366
  await this.oauthManager.setProviderToken(provider, tokenData, context);
2347
- this.authState.set(provider, { authenticated: true });
2367
+ if (tokenData === null) {
2368
+ this.authState.set(provider, { authenticated: false });
2369
+ } else {
2370
+ this.authState.set(provider, { authenticated: true });
2371
+ }
2348
2372
  }
2349
2373
  getAllProviderTokens() {
2350
2374
  const tokens = {};
package/dist/index.js CHANGED
@@ -1345,12 +1345,21 @@ class OAuthManager {
1345
1345
  })
1346
1346
  });
1347
1347
  if (!response.ok) {
1348
- const errorText = await response.text();
1349
- console.error(`Failed to disconnect ${provider} via API: ${response.status} ${errorText}`);
1348
+ if (response.status === 404) {
1349
+ console.warn(`[Integrate SDK] OAuth disconnect route not found at ${url}. ` + `The route may not be set up on your server. ` + `Local token will still be cleared. ` + `To enable server-side disconnect, set up the route handler at ${this.oauthApiBase}/disconnect`);
1350
+ } else {
1351
+ const errorText = await response.text();
1352
+ console.warn(`[Integrate SDK] Failed to disconnect ${provider} via API: ${response.status} ${errorText}. ` + `Local token will still be cleared.`);
1353
+ }
1350
1354
  }
1351
1355
  }
1352
1356
  } catch (error) {
1353
- console.error(`Failed to disconnect ${provider} via API:`, error);
1357
+ const url = this.apiBaseUrl ? `${this.apiBaseUrl}${this.oauthApiBase}/disconnect` : `${this.oauthApiBase}/disconnect`;
1358
+ if (error instanceof TypeError && error.message.includes("fetch")) {
1359
+ console.warn(`[Integrate SDK] Could not reach disconnect route at ${url}. ` + `The route may not be set up on your server. ` + `Local token will still be cleared. ` + `To enable server-side disconnect, set up the route handler at ${this.oauthApiBase}/disconnect`);
1360
+ } else {
1361
+ console.warn(`[Integrate SDK] Failed to disconnect ${provider} via API: ${error}. ` + `Local token will still be cleared.`);
1362
+ }
1354
1363
  }
1355
1364
  }
1356
1365
  this.providerTokens.delete(provider);
@@ -1696,7 +1705,7 @@ class MCPClientBase {
1696
1705
  timeout: config.timeout
1697
1706
  });
1698
1707
  const oauthApiBase = config.oauthApiBase || "/api/integrate/oauth";
1699
- const defaultRedirectUri = this.getDefaultRedirectUri(oauthApiBase);
1708
+ const defaultRedirectUri = this.getDefaultRedirectUri(oauthApiBase, config.apiBaseUrl);
1700
1709
  this.apiRouteBase = config.apiRouteBase || "/api/integrate";
1701
1710
  this.apiBaseUrl = config.apiBaseUrl;
1702
1711
  this.integrations = config.integrations.map((integration) => {
@@ -1782,13 +1791,18 @@ class MCPClientBase {
1782
1791
  this.server = this.createServerProxy();
1783
1792
  this.initializeIntegrations();
1784
1793
  }
1785
- getDefaultRedirectUri(oauthApiBase) {
1794
+ getDefaultRedirectUri(oauthApiBase, apiBaseUrl) {
1795
+ const normalizedPath = oauthApiBase.replace(/\/$/, "");
1796
+ const callbackPath = `${normalizedPath}/callback`;
1797
+ if (apiBaseUrl) {
1798
+ const normalizedApiBaseUrl = apiBaseUrl.replace(/\/$/, "");
1799
+ return `${normalizedApiBaseUrl}${callbackPath}`;
1800
+ }
1786
1801
  if (typeof window === "undefined" || !window.location) {
1787
1802
  return "http://localhost:3000/api/integrate/oauth/callback";
1788
1803
  }
1789
1804
  const origin = window.location.origin;
1790
- const normalizedPath = oauthApiBase.replace(/\/$/, "");
1791
- return `${origin}${normalizedPath}/callback`;
1805
+ return `${origin}${callbackPath}`;
1792
1806
  }
1793
1807
  createIntegrationProxy(integrationId) {
1794
1808
  const hasIntegration = this.integrations.some((integration) => integration.id === integrationId);
@@ -2029,6 +2043,12 @@ class MCPClientBase {
2029
2043
  }
2030
2044
  clearSessionToken() {
2031
2045
  this.oauthManager.clearAllProviderTokens();
2046
+ for (const integration of this.integrations) {
2047
+ if (integration.oauth) {
2048
+ const provider = integration.oauth.provider;
2049
+ this.authState.set(provider, { authenticated: false });
2050
+ }
2051
+ }
2032
2052
  }
2033
2053
  async disconnectProvider(provider, context) {
2034
2054
  const integration = this.integrations.find((p) => p.oauth?.provider === provider);
@@ -2187,7 +2207,11 @@ class MCPClientBase {
2187
2207
  }
2188
2208
  async setProviderToken(provider, tokenData, context) {
2189
2209
  await this.oauthManager.setProviderToken(provider, tokenData, context);
2190
- this.authState.set(provider, { authenticated: true });
2210
+ if (tokenData === null) {
2211
+ this.authState.set(provider, { authenticated: false });
2212
+ } else {
2213
+ this.authState.set(provider, { authenticated: true });
2214
+ }
2191
2215
  }
2192
2216
  getAllProviderTokens() {
2193
2217
  const tokens = {};
package/dist/server.js CHANGED
@@ -1338,12 +1338,21 @@ class OAuthManager {
1338
1338
  })
1339
1339
  });
1340
1340
  if (!response.ok) {
1341
- const errorText = await response.text();
1342
- console.error(`Failed to disconnect ${provider} via API: ${response.status} ${errorText}`);
1341
+ if (response.status === 404) {
1342
+ console.warn(`[Integrate SDK] OAuth disconnect route not found at ${url}. ` + `The route may not be set up on your server. ` + `Local token will still be cleared. ` + `To enable server-side disconnect, set up the route handler at ${this.oauthApiBase}/disconnect`);
1343
+ } else {
1344
+ const errorText = await response.text();
1345
+ console.warn(`[Integrate SDK] Failed to disconnect ${provider} via API: ${response.status} ${errorText}. ` + `Local token will still be cleared.`);
1346
+ }
1343
1347
  }
1344
1348
  }
1345
1349
  } catch (error) {
1346
- console.error(`Failed to disconnect ${provider} via API:`, error);
1350
+ const url = this.apiBaseUrl ? `${this.apiBaseUrl}${this.oauthApiBase}/disconnect` : `${this.oauthApiBase}/disconnect`;
1351
+ if (error instanceof TypeError && error.message.includes("fetch")) {
1352
+ console.warn(`[Integrate SDK] Could not reach disconnect route at ${url}. ` + `The route may not be set up on your server. ` + `Local token will still be cleared. ` + `To enable server-side disconnect, set up the route handler at ${this.oauthApiBase}/disconnect`);
1353
+ } else {
1354
+ console.warn(`[Integrate SDK] Failed to disconnect ${provider} via API: ${error}. ` + `Local token will still be cleared.`);
1355
+ }
1347
1356
  }
1348
1357
  }
1349
1358
  this.providerTokens.delete(provider);
@@ -1687,7 +1696,7 @@ class MCPClientBase {
1687
1696
  timeout: config.timeout
1688
1697
  });
1689
1698
  const oauthApiBase = config.oauthApiBase || "/api/integrate/oauth";
1690
- const defaultRedirectUri = this.getDefaultRedirectUri(oauthApiBase);
1699
+ const defaultRedirectUri = this.getDefaultRedirectUri(oauthApiBase, config.apiBaseUrl);
1691
1700
  this.apiRouteBase = config.apiRouteBase || "/api/integrate";
1692
1701
  this.apiBaseUrl = config.apiBaseUrl;
1693
1702
  this.integrations = config.integrations.map((integration) => {
@@ -1773,13 +1782,18 @@ class MCPClientBase {
1773
1782
  this.server = this.createServerProxy();
1774
1783
  this.initializeIntegrations();
1775
1784
  }
1776
- getDefaultRedirectUri(oauthApiBase) {
1785
+ getDefaultRedirectUri(oauthApiBase, apiBaseUrl) {
1786
+ const normalizedPath = oauthApiBase.replace(/\/$/, "");
1787
+ const callbackPath = `${normalizedPath}/callback`;
1788
+ if (apiBaseUrl) {
1789
+ const normalizedApiBaseUrl = apiBaseUrl.replace(/\/$/, "");
1790
+ return `${normalizedApiBaseUrl}${callbackPath}`;
1791
+ }
1777
1792
  if (typeof window === "undefined" || !window.location) {
1778
1793
  return "http://localhost:3000/api/integrate/oauth/callback";
1779
1794
  }
1780
1795
  const origin = window.location.origin;
1781
- const normalizedPath = oauthApiBase.replace(/\/$/, "");
1782
- return `${origin}${normalizedPath}/callback`;
1796
+ return `${origin}${callbackPath}`;
1783
1797
  }
1784
1798
  createIntegrationProxy(integrationId) {
1785
1799
  const hasIntegration = this.integrations.some((integration) => integration.id === integrationId);
@@ -2020,6 +2034,12 @@ class MCPClientBase {
2020
2034
  }
2021
2035
  clearSessionToken() {
2022
2036
  this.oauthManager.clearAllProviderTokens();
2037
+ for (const integration of this.integrations) {
2038
+ if (integration.oauth) {
2039
+ const provider = integration.oauth.provider;
2040
+ this.authState.set(provider, { authenticated: false });
2041
+ }
2042
+ }
2023
2043
  }
2024
2044
  async disconnectProvider(provider, context) {
2025
2045
  const integration = this.integrations.find((p) => p.oauth?.provider === provider);
@@ -2178,7 +2198,11 @@ class MCPClientBase {
2178
2198
  }
2179
2199
  async setProviderToken(provider, tokenData, context) {
2180
2200
  await this.oauthManager.setProviderToken(provider, tokenData, context);
2181
- this.authState.set(provider, { authenticated: true });
2201
+ if (tokenData === null) {
2202
+ this.authState.set(provider, { authenticated: false });
2203
+ } else {
2204
+ this.authState.set(provider, { authenticated: true });
2205
+ }
2182
2206
  }
2183
2207
  getAllProviderTokens() {
2184
2208
  const tokens = {};
@@ -69,9 +69,10 @@ export declare class MCPClientBase<TIntegrations extends readonly MCPIntegration
69
69
  constructor(config: MCPClientConfig<TIntegrations>);
70
70
  /**
71
71
  * Get default redirect URI for OAuth flows
72
- * Uses window.location.origin + OAuth API base path
72
+ * Uses apiBaseUrl if provided, otherwise window.location.origin + OAuth API base path
73
73
  *
74
74
  * @param oauthApiBase - The OAuth API base path (e.g., '/api/integrate/oauth')
75
+ * @param apiBaseUrl - Optional base URL for API routes (e.g., 'http://localhost:8080')
75
76
  * @returns Default redirect URI
76
77
  */
77
78
  private getDefaultRedirectUri;
@@ -206,6 +207,7 @@ export declare class MCPClientBase<TIntegrations extends readonly MCPIntegration
206
207
  off(event: 'auth:logout', handler: OAuthEventHandler<AuthLogoutEvent>): void;
207
208
  /**
208
209
  * Clear all provider tokens from localStorage
210
+ * Also updates authState to reflect that all providers are disconnected
209
211
  */
210
212
  clearSessionToken(): void;
211
213
  /**
@@ -409,12 +411,13 @@ export declare class MCPClientBase<TIntegrations extends readonly MCPIntegration
409
411
  /**
410
412
  * Set provider token manually
411
413
  * Use this if you have an existing provider token
414
+ * Pass null to delete the token
412
415
  *
413
416
  * @param provider - Provider name
414
- * @param tokenData - Provider token data
417
+ * @param tokenData - Provider token data, or null to delete
415
418
  * @param context - Optional user context (userId, organizationId, etc.) for multi-tenant apps
416
419
  */
417
- setProviderToken(provider: string, tokenData: import('./oauth/types.js').ProviderTokenData, context?: MCPContext): Promise<void>;
420
+ setProviderToken(provider: string, tokenData: import('./oauth/types.js').ProviderTokenData | null, context?: MCPContext): Promise<void>;
418
421
  /**
419
422
  * Get all provider tokens
420
423
  * Returns a map of provider names to access tokens
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EACV,OAAO,EAEP,mBAAmB,EAGpB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,KAAK,EAAE,e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;IAa1C;;;;OAIG;IACH,sBAAsB,IAAI,IAAI;IAgB9B;;;OAGG;IACH,oBAAoB,IAAI,IAAI;IAwB5B;;;;;OAKG;YACW,iBAAiB;IAoC/B;;;OAGG;YACW,iBAAiB;IA0B/B;;OAEG;IACG,qBAAqB,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAS/D;;;;;OAKG;IACH,OAAO,CAAC,qBAAqB;IAqB7B;;;;OAIG;IACH,yBAAyB,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,IAAI;IAcpD;;;;;;;OAOG;IACH,OAAO,CAAC,wBAAwB;IAgBhC;;;;;OAKG;IACH,OAAO,CAAC,0BAA0B;IAoBlC;;;;OAIG;IACH,OAAO,CAAC,4BAA4B;IAgBpC;;;;;OAKG;IACH,OAAO,CAAC,0BAA0B;IAyClC;;;OAGG;YACW,mBAAmB;IAoCjC;;;OAGG;YACW,oBAAoB;IAkClC;;OAEG;IACH,KAAK,IAAI,IAAI;CAGd"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "integrate-sdk",
3
- "version": "0.8.3",
3
+ "version": "0.8.5",
4
4
  "description": "Type-safe 3rd party integration SDK for the Integrate MCP server",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",