integrate-sdk 0.7.56 → 0.7.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/README.md +1 -1
- package/dist/adapters/index.js +29 -18
- package/dist/adapters/solid-start.js +29 -18
- package/dist/adapters/svelte-kit.js +29 -18
- package/dist/index.js +29 -18
- package/dist/server.js +29 -18
- package/dist/src/client.d.ts +10 -7
- package/dist/src/client.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -246,7 +246,7 @@ The SDK implements OAuth 2.0 Authorization Code Flow with PKCE for secure author
|
|
|
246
246
|
|
|
247
247
|
```typescript
|
|
248
248
|
// Check authorization
|
|
249
|
-
if (!
|
|
249
|
+
if (!client.isAuthorized("github")) {
|
|
250
250
|
await client.authorize("github"); // Opens popup or redirects
|
|
251
251
|
}
|
|
252
252
|
|
package/dist/adapters/index.js
CHANGED
|
@@ -1903,10 +1903,6 @@ class MCPClientBase {
|
|
|
1903
1903
|
getProviderToken: config.getProviderToken,
|
|
1904
1904
|
setProviderToken: config.setProviderToken
|
|
1905
1905
|
});
|
|
1906
|
-
const providers = this.integrations.filter((p) => p.oauth).map((p) => p.oauth.provider);
|
|
1907
|
-
this.oauthManager.loadAllProviderTokens(providers).catch((error) => {
|
|
1908
|
-
console.error("Failed to load provider tokens:", error);
|
|
1909
|
-
});
|
|
1910
1906
|
for (const integration of this.integrations) {
|
|
1911
1907
|
for (const toolName of integration.tools) {
|
|
1912
1908
|
this.enabledToolNames.add(toolName);
|
|
@@ -1914,15 +1910,31 @@ class MCPClientBase {
|
|
|
1914
1910
|
if (integration.oauth) {
|
|
1915
1911
|
const provider = integration.oauth.provider;
|
|
1916
1912
|
this.authState.set(provider, { authenticated: false });
|
|
1917
|
-
this.oauthManager.getProviderToken(provider).then((tokenData) => {
|
|
1918
|
-
if (tokenData) {
|
|
1919
|
-
this.authState.set(provider, { authenticated: true });
|
|
1920
|
-
}
|
|
1921
|
-
}).catch((error) => {
|
|
1922
|
-
console.error(`Failed to check token for ${provider}:`, error);
|
|
1923
|
-
});
|
|
1924
1913
|
}
|
|
1925
1914
|
}
|
|
1915
|
+
const providers = this.integrations.filter((p) => p.oauth).map((p) => p.oauth.provider);
|
|
1916
|
+
this.oauthManager.loadAllProviderTokens(providers).then(async () => {
|
|
1917
|
+
for (const integration of this.integrations) {
|
|
1918
|
+
if (integration.oauth) {
|
|
1919
|
+
const provider = integration.oauth.provider;
|
|
1920
|
+
try {
|
|
1921
|
+
const tokenData = await this.oauthManager.getProviderToken(provider);
|
|
1922
|
+
const currentState = this.authState.get(provider);
|
|
1923
|
+
if (currentState && !currentState.authenticated && !currentState.lastError) {
|
|
1924
|
+
this.authState.set(provider, { authenticated: !!tokenData });
|
|
1925
|
+
}
|
|
1926
|
+
} catch (error) {
|
|
1927
|
+
console.error(`Failed to check token for ${provider}:`, error);
|
|
1928
|
+
const currentState = this.authState.get(provider);
|
|
1929
|
+
if (currentState && !currentState.authenticated && !currentState.lastError) {
|
|
1930
|
+
this.authState.set(provider, { authenticated: false });
|
|
1931
|
+
}
|
|
1932
|
+
}
|
|
1933
|
+
}
|
|
1934
|
+
}
|
|
1935
|
+
}).catch((error) => {
|
|
1936
|
+
console.error("Failed to load provider tokens:", error);
|
|
1937
|
+
});
|
|
1926
1938
|
const integrationIds = this.integrations.map((i) => i.id);
|
|
1927
1939
|
if (integrationIds.includes("github")) {
|
|
1928
1940
|
this.github = this.createIntegrationProxy("github");
|
|
@@ -2230,17 +2242,16 @@ class MCPClientBase {
|
|
|
2230
2242
|
isProviderAuthenticated(provider) {
|
|
2231
2243
|
return this.authState.get(provider)?.authenticated ?? false;
|
|
2232
2244
|
}
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
return status.authorized;
|
|
2245
|
+
isAuthorized(provider) {
|
|
2246
|
+
return this.authState.get(provider)?.authenticated ?? false;
|
|
2236
2247
|
}
|
|
2237
|
-
|
|
2248
|
+
authorizedProviders() {
|
|
2238
2249
|
const authorized = [];
|
|
2239
2250
|
for (const integration of this.integrations) {
|
|
2240
2251
|
if (integration.oauth) {
|
|
2241
|
-
const
|
|
2242
|
-
if (
|
|
2243
|
-
authorized.push(
|
|
2252
|
+
const provider = integration.oauth.provider;
|
|
2253
|
+
if (this.authState.get(provider)?.authenticated) {
|
|
2254
|
+
authorized.push(provider);
|
|
2244
2255
|
}
|
|
2245
2256
|
}
|
|
2246
2257
|
}
|
|
@@ -1762,10 +1762,6 @@ class MCPClientBase {
|
|
|
1762
1762
|
getProviderToken: config.getProviderToken,
|
|
1763
1763
|
setProviderToken: config.setProviderToken
|
|
1764
1764
|
});
|
|
1765
|
-
const providers = this.integrations.filter((p) => p.oauth).map((p) => p.oauth.provider);
|
|
1766
|
-
this.oauthManager.loadAllProviderTokens(providers).catch((error) => {
|
|
1767
|
-
console.error("Failed to load provider tokens:", error);
|
|
1768
|
-
});
|
|
1769
1765
|
for (const integration of this.integrations) {
|
|
1770
1766
|
for (const toolName of integration.tools) {
|
|
1771
1767
|
this.enabledToolNames.add(toolName);
|
|
@@ -1773,15 +1769,31 @@ class MCPClientBase {
|
|
|
1773
1769
|
if (integration.oauth) {
|
|
1774
1770
|
const provider = integration.oauth.provider;
|
|
1775
1771
|
this.authState.set(provider, { authenticated: false });
|
|
1776
|
-
this.oauthManager.getProviderToken(provider).then((tokenData) => {
|
|
1777
|
-
if (tokenData) {
|
|
1778
|
-
this.authState.set(provider, { authenticated: true });
|
|
1779
|
-
}
|
|
1780
|
-
}).catch((error) => {
|
|
1781
|
-
console.error(`Failed to check token for ${provider}:`, error);
|
|
1782
|
-
});
|
|
1783
1772
|
}
|
|
1784
1773
|
}
|
|
1774
|
+
const providers = this.integrations.filter((p) => p.oauth).map((p) => p.oauth.provider);
|
|
1775
|
+
this.oauthManager.loadAllProviderTokens(providers).then(async () => {
|
|
1776
|
+
for (const integration of this.integrations) {
|
|
1777
|
+
if (integration.oauth) {
|
|
1778
|
+
const provider = integration.oauth.provider;
|
|
1779
|
+
try {
|
|
1780
|
+
const tokenData = await this.oauthManager.getProviderToken(provider);
|
|
1781
|
+
const currentState = this.authState.get(provider);
|
|
1782
|
+
if (currentState && !currentState.authenticated && !currentState.lastError) {
|
|
1783
|
+
this.authState.set(provider, { authenticated: !!tokenData });
|
|
1784
|
+
}
|
|
1785
|
+
} catch (error) {
|
|
1786
|
+
console.error(`Failed to check token for ${provider}:`, error);
|
|
1787
|
+
const currentState = this.authState.get(provider);
|
|
1788
|
+
if (currentState && !currentState.authenticated && !currentState.lastError) {
|
|
1789
|
+
this.authState.set(provider, { authenticated: false });
|
|
1790
|
+
}
|
|
1791
|
+
}
|
|
1792
|
+
}
|
|
1793
|
+
}
|
|
1794
|
+
}).catch((error) => {
|
|
1795
|
+
console.error("Failed to load provider tokens:", error);
|
|
1796
|
+
});
|
|
1785
1797
|
const integrationIds = this.integrations.map((i) => i.id);
|
|
1786
1798
|
if (integrationIds.includes("github")) {
|
|
1787
1799
|
this.github = this.createIntegrationProxy("github");
|
|
@@ -2089,17 +2101,16 @@ class MCPClientBase {
|
|
|
2089
2101
|
isProviderAuthenticated(provider) {
|
|
2090
2102
|
return this.authState.get(provider)?.authenticated ?? false;
|
|
2091
2103
|
}
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
return status.authorized;
|
|
2104
|
+
isAuthorized(provider) {
|
|
2105
|
+
return this.authState.get(provider)?.authenticated ?? false;
|
|
2095
2106
|
}
|
|
2096
|
-
|
|
2107
|
+
authorizedProviders() {
|
|
2097
2108
|
const authorized = [];
|
|
2098
2109
|
for (const integration of this.integrations) {
|
|
2099
2110
|
if (integration.oauth) {
|
|
2100
|
-
const
|
|
2101
|
-
if (
|
|
2102
|
-
authorized.push(
|
|
2111
|
+
const provider = integration.oauth.provider;
|
|
2112
|
+
if (this.authState.get(provider)?.authenticated) {
|
|
2113
|
+
authorized.push(provider);
|
|
2103
2114
|
}
|
|
2104
2115
|
}
|
|
2105
2116
|
}
|
|
@@ -1762,10 +1762,6 @@ class MCPClientBase {
|
|
|
1762
1762
|
getProviderToken: config.getProviderToken,
|
|
1763
1763
|
setProviderToken: config.setProviderToken
|
|
1764
1764
|
});
|
|
1765
|
-
const providers = this.integrations.filter((p) => p.oauth).map((p) => p.oauth.provider);
|
|
1766
|
-
this.oauthManager.loadAllProviderTokens(providers).catch((error) => {
|
|
1767
|
-
console.error("Failed to load provider tokens:", error);
|
|
1768
|
-
});
|
|
1769
1765
|
for (const integration of this.integrations) {
|
|
1770
1766
|
for (const toolName of integration.tools) {
|
|
1771
1767
|
this.enabledToolNames.add(toolName);
|
|
@@ -1773,15 +1769,31 @@ class MCPClientBase {
|
|
|
1773
1769
|
if (integration.oauth) {
|
|
1774
1770
|
const provider = integration.oauth.provider;
|
|
1775
1771
|
this.authState.set(provider, { authenticated: false });
|
|
1776
|
-
this.oauthManager.getProviderToken(provider).then((tokenData) => {
|
|
1777
|
-
if (tokenData) {
|
|
1778
|
-
this.authState.set(provider, { authenticated: true });
|
|
1779
|
-
}
|
|
1780
|
-
}).catch((error) => {
|
|
1781
|
-
console.error(`Failed to check token for ${provider}:`, error);
|
|
1782
|
-
});
|
|
1783
1772
|
}
|
|
1784
1773
|
}
|
|
1774
|
+
const providers = this.integrations.filter((p) => p.oauth).map((p) => p.oauth.provider);
|
|
1775
|
+
this.oauthManager.loadAllProviderTokens(providers).then(async () => {
|
|
1776
|
+
for (const integration of this.integrations) {
|
|
1777
|
+
if (integration.oauth) {
|
|
1778
|
+
const provider = integration.oauth.provider;
|
|
1779
|
+
try {
|
|
1780
|
+
const tokenData = await this.oauthManager.getProviderToken(provider);
|
|
1781
|
+
const currentState = this.authState.get(provider);
|
|
1782
|
+
if (currentState && !currentState.authenticated && !currentState.lastError) {
|
|
1783
|
+
this.authState.set(provider, { authenticated: !!tokenData });
|
|
1784
|
+
}
|
|
1785
|
+
} catch (error) {
|
|
1786
|
+
console.error(`Failed to check token for ${provider}:`, error);
|
|
1787
|
+
const currentState = this.authState.get(provider);
|
|
1788
|
+
if (currentState && !currentState.authenticated && !currentState.lastError) {
|
|
1789
|
+
this.authState.set(provider, { authenticated: false });
|
|
1790
|
+
}
|
|
1791
|
+
}
|
|
1792
|
+
}
|
|
1793
|
+
}
|
|
1794
|
+
}).catch((error) => {
|
|
1795
|
+
console.error("Failed to load provider tokens:", error);
|
|
1796
|
+
});
|
|
1785
1797
|
const integrationIds = this.integrations.map((i) => i.id);
|
|
1786
1798
|
if (integrationIds.includes("github")) {
|
|
1787
1799
|
this.github = this.createIntegrationProxy("github");
|
|
@@ -2089,17 +2101,16 @@ class MCPClientBase {
|
|
|
2089
2101
|
isProviderAuthenticated(provider) {
|
|
2090
2102
|
return this.authState.get(provider)?.authenticated ?? false;
|
|
2091
2103
|
}
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
return status.authorized;
|
|
2104
|
+
isAuthorized(provider) {
|
|
2105
|
+
return this.authState.get(provider)?.authenticated ?? false;
|
|
2095
2106
|
}
|
|
2096
|
-
|
|
2107
|
+
authorizedProviders() {
|
|
2097
2108
|
const authorized = [];
|
|
2098
2109
|
for (const integration of this.integrations) {
|
|
2099
2110
|
if (integration.oauth) {
|
|
2100
|
-
const
|
|
2101
|
-
if (
|
|
2102
|
-
authorized.push(
|
|
2111
|
+
const provider = integration.oauth.provider;
|
|
2112
|
+
if (this.authState.get(provider)?.authenticated) {
|
|
2113
|
+
authorized.push(provider);
|
|
2103
2114
|
}
|
|
2104
2115
|
}
|
|
2105
2116
|
}
|
package/dist/index.js
CHANGED
|
@@ -1605,10 +1605,6 @@ class MCPClientBase {
|
|
|
1605
1605
|
getProviderToken: config.getProviderToken,
|
|
1606
1606
|
setProviderToken: config.setProviderToken
|
|
1607
1607
|
});
|
|
1608
|
-
const providers = this.integrations.filter((p) => p.oauth).map((p) => p.oauth.provider);
|
|
1609
|
-
this.oauthManager.loadAllProviderTokens(providers).catch((error) => {
|
|
1610
|
-
console.error("Failed to load provider tokens:", error);
|
|
1611
|
-
});
|
|
1612
1608
|
for (const integration of this.integrations) {
|
|
1613
1609
|
for (const toolName of integration.tools) {
|
|
1614
1610
|
this.enabledToolNames.add(toolName);
|
|
@@ -1616,15 +1612,31 @@ class MCPClientBase {
|
|
|
1616
1612
|
if (integration.oauth) {
|
|
1617
1613
|
const provider = integration.oauth.provider;
|
|
1618
1614
|
this.authState.set(provider, { authenticated: false });
|
|
1619
|
-
this.oauthManager.getProviderToken(provider).then((tokenData) => {
|
|
1620
|
-
if (tokenData) {
|
|
1621
|
-
this.authState.set(provider, { authenticated: true });
|
|
1622
|
-
}
|
|
1623
|
-
}).catch((error) => {
|
|
1624
|
-
console.error(`Failed to check token for ${provider}:`, error);
|
|
1625
|
-
});
|
|
1626
1615
|
}
|
|
1627
1616
|
}
|
|
1617
|
+
const providers = this.integrations.filter((p) => p.oauth).map((p) => p.oauth.provider);
|
|
1618
|
+
this.oauthManager.loadAllProviderTokens(providers).then(async () => {
|
|
1619
|
+
for (const integration of this.integrations) {
|
|
1620
|
+
if (integration.oauth) {
|
|
1621
|
+
const provider = integration.oauth.provider;
|
|
1622
|
+
try {
|
|
1623
|
+
const tokenData = await this.oauthManager.getProviderToken(provider);
|
|
1624
|
+
const currentState = this.authState.get(provider);
|
|
1625
|
+
if (currentState && !currentState.authenticated && !currentState.lastError) {
|
|
1626
|
+
this.authState.set(provider, { authenticated: !!tokenData });
|
|
1627
|
+
}
|
|
1628
|
+
} catch (error) {
|
|
1629
|
+
console.error(`Failed to check token for ${provider}:`, error);
|
|
1630
|
+
const currentState = this.authState.get(provider);
|
|
1631
|
+
if (currentState && !currentState.authenticated && !currentState.lastError) {
|
|
1632
|
+
this.authState.set(provider, { authenticated: false });
|
|
1633
|
+
}
|
|
1634
|
+
}
|
|
1635
|
+
}
|
|
1636
|
+
}
|
|
1637
|
+
}).catch((error) => {
|
|
1638
|
+
console.error("Failed to load provider tokens:", error);
|
|
1639
|
+
});
|
|
1628
1640
|
const integrationIds = this.integrations.map((i) => i.id);
|
|
1629
1641
|
if (integrationIds.includes("github")) {
|
|
1630
1642
|
this.github = this.createIntegrationProxy("github");
|
|
@@ -1932,17 +1944,16 @@ class MCPClientBase {
|
|
|
1932
1944
|
isProviderAuthenticated(provider) {
|
|
1933
1945
|
return this.authState.get(provider)?.authenticated ?? false;
|
|
1934
1946
|
}
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
return status.authorized;
|
|
1947
|
+
isAuthorized(provider) {
|
|
1948
|
+
return this.authState.get(provider)?.authenticated ?? false;
|
|
1938
1949
|
}
|
|
1939
|
-
|
|
1950
|
+
authorizedProviders() {
|
|
1940
1951
|
const authorized = [];
|
|
1941
1952
|
for (const integration of this.integrations) {
|
|
1942
1953
|
if (integration.oauth) {
|
|
1943
|
-
const
|
|
1944
|
-
if (
|
|
1945
|
-
authorized.push(
|
|
1954
|
+
const provider = integration.oauth.provider;
|
|
1955
|
+
if (this.authState.get(provider)?.authenticated) {
|
|
1956
|
+
authorized.push(provider);
|
|
1946
1957
|
}
|
|
1947
1958
|
}
|
|
1948
1959
|
}
|
package/dist/server.js
CHANGED
|
@@ -1596,10 +1596,6 @@ class MCPClientBase {
|
|
|
1596
1596
|
getProviderToken: config.getProviderToken,
|
|
1597
1597
|
setProviderToken: config.setProviderToken
|
|
1598
1598
|
});
|
|
1599
|
-
const providers = this.integrations.filter((p) => p.oauth).map((p) => p.oauth.provider);
|
|
1600
|
-
this.oauthManager.loadAllProviderTokens(providers).catch((error) => {
|
|
1601
|
-
console.error("Failed to load provider tokens:", error);
|
|
1602
|
-
});
|
|
1603
1599
|
for (const integration of this.integrations) {
|
|
1604
1600
|
for (const toolName of integration.tools) {
|
|
1605
1601
|
this.enabledToolNames.add(toolName);
|
|
@@ -1607,15 +1603,31 @@ class MCPClientBase {
|
|
|
1607
1603
|
if (integration.oauth) {
|
|
1608
1604
|
const provider = integration.oauth.provider;
|
|
1609
1605
|
this.authState.set(provider, { authenticated: false });
|
|
1610
|
-
this.oauthManager.getProviderToken(provider).then((tokenData) => {
|
|
1611
|
-
if (tokenData) {
|
|
1612
|
-
this.authState.set(provider, { authenticated: true });
|
|
1613
|
-
}
|
|
1614
|
-
}).catch((error) => {
|
|
1615
|
-
console.error(`Failed to check token for ${provider}:`, error);
|
|
1616
|
-
});
|
|
1617
1606
|
}
|
|
1618
1607
|
}
|
|
1608
|
+
const providers = this.integrations.filter((p) => p.oauth).map((p) => p.oauth.provider);
|
|
1609
|
+
this.oauthManager.loadAllProviderTokens(providers).then(async () => {
|
|
1610
|
+
for (const integration of this.integrations) {
|
|
1611
|
+
if (integration.oauth) {
|
|
1612
|
+
const provider = integration.oauth.provider;
|
|
1613
|
+
try {
|
|
1614
|
+
const tokenData = await this.oauthManager.getProviderToken(provider);
|
|
1615
|
+
const currentState = this.authState.get(provider);
|
|
1616
|
+
if (currentState && !currentState.authenticated && !currentState.lastError) {
|
|
1617
|
+
this.authState.set(provider, { authenticated: !!tokenData });
|
|
1618
|
+
}
|
|
1619
|
+
} catch (error) {
|
|
1620
|
+
console.error(`Failed to check token for ${provider}:`, error);
|
|
1621
|
+
const currentState = this.authState.get(provider);
|
|
1622
|
+
if (currentState && !currentState.authenticated && !currentState.lastError) {
|
|
1623
|
+
this.authState.set(provider, { authenticated: false });
|
|
1624
|
+
}
|
|
1625
|
+
}
|
|
1626
|
+
}
|
|
1627
|
+
}
|
|
1628
|
+
}).catch((error) => {
|
|
1629
|
+
console.error("Failed to load provider tokens:", error);
|
|
1630
|
+
});
|
|
1619
1631
|
const integrationIds = this.integrations.map((i) => i.id);
|
|
1620
1632
|
if (integrationIds.includes("github")) {
|
|
1621
1633
|
this.github = this.createIntegrationProxy("github");
|
|
@@ -1923,17 +1935,16 @@ class MCPClientBase {
|
|
|
1923
1935
|
isProviderAuthenticated(provider) {
|
|
1924
1936
|
return this.authState.get(provider)?.authenticated ?? false;
|
|
1925
1937
|
}
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
return status.authorized;
|
|
1938
|
+
isAuthorized(provider) {
|
|
1939
|
+
return this.authState.get(provider)?.authenticated ?? false;
|
|
1929
1940
|
}
|
|
1930
|
-
|
|
1941
|
+
authorizedProviders() {
|
|
1931
1942
|
const authorized = [];
|
|
1932
1943
|
for (const integration of this.integrations) {
|
|
1933
1944
|
if (integration.oauth) {
|
|
1934
|
-
const
|
|
1935
|
-
if (
|
|
1936
|
-
authorized.push(
|
|
1945
|
+
const provider = integration.oauth.provider;
|
|
1946
|
+
if (this.authState.get(provider)?.authenticated) {
|
|
1947
|
+
authorized.push(provider);
|
|
1937
1948
|
}
|
|
1938
1949
|
}
|
|
1939
1950
|
}
|
package/dist/src/client.d.ts
CHANGED
|
@@ -263,29 +263,32 @@ export declare class MCPClientBase<TIntegrations extends readonly MCPIntegration
|
|
|
263
263
|
isProviderAuthenticated(provider: string): boolean;
|
|
264
264
|
/**
|
|
265
265
|
* Check if a provider is authorized via OAuth
|
|
266
|
-
*
|
|
266
|
+
* Returns the cached authorization status that is automatically updated when
|
|
267
|
+
* authorize() or disconnectProvider() are called
|
|
267
268
|
*
|
|
268
269
|
* @param provider - Provider name (github, gmail, etc.)
|
|
269
|
-
* @returns Authorization status
|
|
270
|
+
* @returns Authorization status from cache
|
|
270
271
|
*
|
|
271
272
|
* @example
|
|
272
273
|
* ```typescript
|
|
273
|
-
* const isAuthorized =
|
|
274
|
+
* const isAuthorized = client.isAuthorized('github');
|
|
274
275
|
* if (!isAuthorized) {
|
|
275
276
|
* await client.authorize('github');
|
|
277
|
+
* // isAuthorized is now automatically true
|
|
278
|
+
* console.log(client.isAuthorized('github')); // true
|
|
276
279
|
* }
|
|
277
280
|
* ```
|
|
278
281
|
*/
|
|
279
|
-
isAuthorized(provider: string):
|
|
282
|
+
isAuthorized(provider: string): boolean;
|
|
280
283
|
/**
|
|
281
284
|
* Get list of all authorized providers
|
|
282
|
-
*
|
|
285
|
+
* Returns cached authorization status for all configured OAuth providers
|
|
283
286
|
*
|
|
284
287
|
* @returns Array of authorized provider names
|
|
285
288
|
*
|
|
286
289
|
* @example
|
|
287
290
|
* ```typescript
|
|
288
|
-
* const authorized =
|
|
291
|
+
* const authorized = client.authorizedProviders();
|
|
289
292
|
* console.log('Authorized services:', authorized); // ['github', 'gmail']
|
|
290
293
|
*
|
|
291
294
|
* // Check if specific service is in the list
|
|
@@ -294,7 +297,7 @@ export declare class MCPClientBase<TIntegrations extends readonly MCPIntegration
|
|
|
294
297
|
* }
|
|
295
298
|
* ```
|
|
296
299
|
*/
|
|
297
|
-
authorizedProviders():
|
|
300
|
+
authorizedProviders(): string[];
|
|
298
301
|
/**
|
|
299
302
|
* Get detailed authorization status for a provider
|
|
300
303
|
*
|
package/dist/src/client.d.ts.map
CHANGED
|
@@ -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,eAAe,EAAiB,eAAe,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACrG,OAAO,EAGL,KAAK,mBAAmB,EACzB,MAAM,aAAa,CAAC;AAErB,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC/E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAC7E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC/E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAE/E,OAAO,KAAK,EACV,UAAU,EACV,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,mBAAmB,EACpB,MAAM,kBAAkB,CAAC;AAgE1B;;GAEG;AACH,MAAM,WAA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