@composio/core 0.18.1 → 1.0.0-beta.1
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/{CustomTool-Bz0f52QR.mjs → CustomTool-CM-roKk7.mjs} +1 -1
- package/dist/{CustomTool-VRfWzMix.d.mts → CustomTool-yMQjEyMz.d.mts} +1 -1
- package/dist/{FileModifierErrors-CwB-Inm9.mjs → FileModifierErrors-CdGSABoq.mjs} +1 -1
- package/dist/{FileToolModifier.utils.neutral-D_YkHwZP.mjs → FileToolModifier.utils.neutral-DWFpnsj2.mjs} +4 -2
- package/dist/{SsrfErrors-xhdVE4yw.mjs → SsrfErrors-DiQldIdC.mjs} +32 -17
- package/dist/{Telemetry-Dw9W5RSp.mjs → Telemetry-JRJJYS4I.mjs} +2 -2
- package/dist/{cancellation-P5YUlcfz.mjs → cancellation-BEpFk2S8.mjs} +7 -5
- package/dist/{composio-Cb3d1jFe.d.mts → composio-BVNJTVYa.d.mts} +2449 -118
- package/dist/{customTool.types-B6ej_8XZ.d.mts → customTool.types-CY5SXFfF.d.mts} +118 -5
- package/dist/{errors-Ue9wMrPK.mjs → errors-CvZjP9CH.mjs} +39 -4
- package/dist/experimental/index.d.mts +2 -2
- package/dist/experimental/index.mjs +1 -1
- package/dist/{fileUtils.node-KE5Fa-af.mjs → fileUtils.node-HQsywtTj.mjs} +8 -6
- package/dist/index.d.mts +292 -140
- package/dist/index.mjs +1914 -160
- package/dist/models/Files.node.d.mts +2 -3
- package/dist/models/Files.node.mjs +2 -2
- package/dist/models/Files.workerd.d.mts +2 -3
- package/dist/platform/node.d.mts +2 -3
- package/dist/platform/workerd.d.mts +2 -3
- package/dist/{sensitiveFileUploadPaths-QN7w4n8v.mjs → sensitiveFileUploadPaths-BlLp-Yo2.mjs} +10 -7
- package/dist/{ssrfGuard.node-BLX6b-Rf.mjs → ssrfGuard.node-BK50mYTq.mjs} +94 -8
- package/dist/{types-CGdgK442.d.mts → types-CqGfjlZg.d.mts} +2 -2
- package/dist/utils/config-defaults/ConfigDefaults.node.d.mts +3 -4
- package/dist/utils/config-defaults/ConfigDefaults.workerd.d.mts +3 -4
- package/dist/utils/modifiers/FileToolModifier.node.d.mts +3 -4
- package/dist/utils/modifiers/FileToolModifier.node.mjs +6 -6
- package/dist/utils/modifiers/FileToolModifier.workerd.d.mts +3 -4
- package/dist/utils/modifiers/FileToolModifier.workerd.mjs +1 -1
- package/dist/utils/ssrfGuard.node.d.mts +7 -7
- package/dist/utils/ssrfGuard.node.mjs +1 -1
- package/dist/utils/ssrfGuard.workerd.d.mts +3 -4
- package/dist/utils/ssrfGuard.workerd.mjs +1 -1
- package/package.json +7 -7
- package/src/composio.ts +86 -2
- package/src/errors/ConnectedAccountsErrors.ts +47 -0
- package/src/index.ts +15 -0
- package/src/models/ConnectedAccounts.ts +118 -2
- package/src/models/CustomToolkits.ts +169 -0
- package/src/models/Experimental.ts +27 -0
- package/src/models/Keyring.ts +65 -0
- package/src/models/Logs.ts +101 -0
- package/src/models/ToolRouterSession.ts +51 -0
- package/src/models/Toolkits.ts +180 -0
- package/src/models/Tools.ts +3 -1
- package/src/models/Triggers.ts +2 -87
- package/src/models/Usage.ts +119 -0
- package/src/models/Webhooks.ts +520 -0
- package/src/types/authConfigs.types.ts +2 -0
- package/src/types/connectedAccounts.types.ts +54 -0
- package/src/types/customToolkits.types.ts +102 -0
- package/src/types/keyring.types.ts +32 -0
- package/src/types/logs.types.ts +108 -0
- package/src/types/toolRouter.types.ts +49 -1
- package/src/types/toolkit.types.ts +131 -0
- package/src/types/usage.types.ts +81 -0
- package/src/types/webhooks.types.ts +143 -0
- package/src/utils/constants.ts +1 -5
- package/src/utils/jsonSchema.ts +4 -1
- package/src/utils/logger.ts +39 -7
- package/src/utils/ssrfGuard.node.ts +98 -7
- package/src/utils/transformers/connectedAccounts.ts +37 -2
- package/src/utils/transformers/customToolkits.ts +98 -0
- package/src/utils/transformers/keyring.ts +24 -0
- package/src/utils/transformers/logs.ts +85 -0
- package/src/utils/transformers/toolkits.ts +100 -1
- package/src/utils/transformers/triggers.ts +2 -2
- package/src/utils/transformers/usage.ts +77 -0
- package/src/utils/transformers/webhooks.ts +139 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $
|
|
1
|
+
import { $ as ToolRouterSessionDeleteResponse, $r as ToolCallSession, An as CreateConnectedAccountLinkOptions, Br as McpServerGetResponse, D as Session, Gi as ExecuteToolModifiers, Gr as McpUrlResponse, Ji as SessionExecuteMetaModifiers, Jt as ConnectionRequest, Kn as BaseComposioProvider, M as SessionWithoutMcp, Pn as CreateConnectedAccountOptions, Sa as ToolRetrievalOptions, Un as UpdateConnectedAccountParams, Vn as UpdateConnectedAccountAclParams, Yr as ExecuteToolFnOptions, _n as ConnectedAccountRetrieveResponse, ba as ToolProxyParams, ca as Tool, da as ToolExecuteParams, f as CustomToolkit, fn as ConnectedAccountListResponse, ga as ToolListParams, ha as ToolList, hn as ConnectedAccountRefreshOptions, in as ConnectedAccountCompleteAuthResponse, ka as ToolkitVersionParam, la as ToolExecuteMetaParams, nn as ConnectedAccountCompleteAuthParams, o as CustomTool, pa as ToolExecuteResponse, qi as ProviderOptions, qn as BaseNonAgenticProvider, qt as ComposioRequestOptions, sa as SchemaModifierOptions, un as ConnectedAccountListParams, yn as ConnectedAccountRevokeResponse, z as ToolRouterCreateSessionConfig } from "./customTool.types-CY5SXFfF.mjs";
|
|
2
2
|
import ComposioClient, { Composio } from "@composio/client";
|
|
3
3
|
import z, { z as z$1 } from "zod/v3";
|
|
4
4
|
import { OpenAI } from "openai";
|
|
@@ -539,6 +539,31 @@ declare const ToolkitsListParamsSchema: z$1.ZodObject<{
|
|
|
539
539
|
type ToolkitMangedByEnum = z$1.infer<typeof ToolkitMangedByEnumSchema>;
|
|
540
540
|
type ToolkitSortByEnum = z$1.infer<typeof ToolkitSortByEnumSchema>;
|
|
541
541
|
type ToolkitListParams = z$1.infer<typeof ToolkitsListParamsSchema>;
|
|
542
|
+
/**
|
|
543
|
+
* Toolkit getMany params — the slugs to fetch plus the same filters `list`
|
|
544
|
+
* accepts.
|
|
545
|
+
*/
|
|
546
|
+
declare const ToolkitGetManySlugsSchema: z$1.ZodArray<z$1.ZodString, "many">;
|
|
547
|
+
declare const ToolkitsGetManyParamsSchema: z$1.ZodObject<{
|
|
548
|
+
category: z$1.ZodOptional<z$1.ZodString>;
|
|
549
|
+
managedBy: z$1.ZodOptional<z$1.ZodEnum<["all", "composio", "project"]>>;
|
|
550
|
+
sortBy: z$1.ZodOptional<z$1.ZodEnum<["usage", "alphabetically"]>>;
|
|
551
|
+
cursor: z$1.ZodOptional<z$1.ZodString>;
|
|
552
|
+
limit: z$1.ZodOptional<z$1.ZodNumber>;
|
|
553
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
554
|
+
limit?: number | undefined;
|
|
555
|
+
cursor?: string | undefined;
|
|
556
|
+
category?: string | undefined;
|
|
557
|
+
managedBy?: "all" | "composio" | "project" | undefined;
|
|
558
|
+
sortBy?: "usage" | "alphabetically" | undefined;
|
|
559
|
+
}, {
|
|
560
|
+
limit?: number | undefined;
|
|
561
|
+
cursor?: string | undefined;
|
|
562
|
+
category?: string | undefined;
|
|
563
|
+
managedBy?: "all" | "composio" | "project" | undefined;
|
|
564
|
+
sortBy?: "usage" | "alphabetically" | undefined;
|
|
565
|
+
}>;
|
|
566
|
+
type ToolkitGetManyParams = z$1.infer<typeof ToolkitsGetManyParamsSchema>;
|
|
542
567
|
/**
|
|
543
568
|
* Toolkits response
|
|
544
569
|
*/
|
|
@@ -1713,6 +1738,329 @@ declare const ToolkitRetrieveCategoriesResponseSchema: z$1.ZodObject<{
|
|
|
1713
1738
|
}>;
|
|
1714
1739
|
type ToolkitCategory = z$1.infer<typeof ToolkitCategorySchema>;
|
|
1715
1740
|
type ToolkitRetrieveCategoriesResponse = z$1.infer<typeof ToolkitRetrieveCategoriesResponseSchema>;
|
|
1741
|
+
/**
|
|
1742
|
+
* Toolkit changelog response
|
|
1743
|
+
*/
|
|
1744
|
+
declare const ToolkitVersionChangelogSchema: z$1.ZodObject<{
|
|
1745
|
+
version: z$1.ZodString;
|
|
1746
|
+
changelog: z$1.ZodString;
|
|
1747
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
1748
|
+
version: string;
|
|
1749
|
+
changelog: string;
|
|
1750
|
+
}, {
|
|
1751
|
+
version: string;
|
|
1752
|
+
changelog: string;
|
|
1753
|
+
}>;
|
|
1754
|
+
declare const ToolkitChangelogItemSchema: z$1.ZodObject<{
|
|
1755
|
+
slug: z$1.ZodString;
|
|
1756
|
+
name: z$1.ZodString;
|
|
1757
|
+
displayName: z$1.ZodString;
|
|
1758
|
+
/** Most recent versions first; the API returns up to the last 10 per toolkit. */
|
|
1759
|
+
versions: z$1.ZodArray<z$1.ZodObject<{
|
|
1760
|
+
version: z$1.ZodString;
|
|
1761
|
+
changelog: z$1.ZodString;
|
|
1762
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
1763
|
+
version: string;
|
|
1764
|
+
changelog: string;
|
|
1765
|
+
}, {
|
|
1766
|
+
version: string;
|
|
1767
|
+
changelog: string;
|
|
1768
|
+
}>, "many">;
|
|
1769
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
1770
|
+
slug: string;
|
|
1771
|
+
name: string;
|
|
1772
|
+
displayName: string;
|
|
1773
|
+
versions: {
|
|
1774
|
+
version: string;
|
|
1775
|
+
changelog: string;
|
|
1776
|
+
}[];
|
|
1777
|
+
}, {
|
|
1778
|
+
slug: string;
|
|
1779
|
+
name: string;
|
|
1780
|
+
displayName: string;
|
|
1781
|
+
versions: {
|
|
1782
|
+
version: string;
|
|
1783
|
+
changelog: string;
|
|
1784
|
+
}[];
|
|
1785
|
+
}>;
|
|
1786
|
+
declare const ToolkitChangelogResponseSchema: z$1.ZodObject<{
|
|
1787
|
+
items: z$1.ZodArray<z$1.ZodObject<{
|
|
1788
|
+
slug: z$1.ZodString;
|
|
1789
|
+
name: z$1.ZodString;
|
|
1790
|
+
displayName: z$1.ZodString;
|
|
1791
|
+
/** Most recent versions first; the API returns up to the last 10 per toolkit. */
|
|
1792
|
+
versions: z$1.ZodArray<z$1.ZodObject<{
|
|
1793
|
+
version: z$1.ZodString;
|
|
1794
|
+
changelog: z$1.ZodString;
|
|
1795
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
1796
|
+
version: string;
|
|
1797
|
+
changelog: string;
|
|
1798
|
+
}, {
|
|
1799
|
+
version: string;
|
|
1800
|
+
changelog: string;
|
|
1801
|
+
}>, "many">;
|
|
1802
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
1803
|
+
slug: string;
|
|
1804
|
+
name: string;
|
|
1805
|
+
displayName: string;
|
|
1806
|
+
versions: {
|
|
1807
|
+
version: string;
|
|
1808
|
+
changelog: string;
|
|
1809
|
+
}[];
|
|
1810
|
+
}, {
|
|
1811
|
+
slug: string;
|
|
1812
|
+
name: string;
|
|
1813
|
+
displayName: string;
|
|
1814
|
+
versions: {
|
|
1815
|
+
version: string;
|
|
1816
|
+
changelog: string;
|
|
1817
|
+
}[];
|
|
1818
|
+
}>, "many">;
|
|
1819
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
1820
|
+
items: {
|
|
1821
|
+
slug: string;
|
|
1822
|
+
name: string;
|
|
1823
|
+
displayName: string;
|
|
1824
|
+
versions: {
|
|
1825
|
+
version: string;
|
|
1826
|
+
changelog: string;
|
|
1827
|
+
}[];
|
|
1828
|
+
}[];
|
|
1829
|
+
}, {
|
|
1830
|
+
items: {
|
|
1831
|
+
slug: string;
|
|
1832
|
+
name: string;
|
|
1833
|
+
displayName: string;
|
|
1834
|
+
versions: {
|
|
1835
|
+
version: string;
|
|
1836
|
+
changelog: string;
|
|
1837
|
+
}[];
|
|
1838
|
+
}[];
|
|
1839
|
+
}>;
|
|
1840
|
+
type ToolkitVersionChangelog = z$1.infer<typeof ToolkitVersionChangelogSchema>;
|
|
1841
|
+
type ToolkitChangelogItem = z$1.infer<typeof ToolkitChangelogItemSchema>;
|
|
1842
|
+
type ToolkitChangelogResponse = z$1.infer<typeof ToolkitChangelogResponseSchema>;
|
|
1843
|
+
/**
|
|
1844
|
+
* Params for `composio.toolkits.recommendScopes()`.
|
|
1845
|
+
* **Experimental — shape may change in future releases.**
|
|
1846
|
+
*/
|
|
1847
|
+
declare const ToolkitRecommendScopesParamsSchema: z$1.ZodObject<{
|
|
1848
|
+
/** Tool slugs to cover. Pass `[]` to cover every tool in the toolkit. */
|
|
1849
|
+
tools: z$1.ZodArray<z$1.ZodString, "many">;
|
|
1850
|
+
/** Auth scheme the connection will use. The API defaults to `OAUTH2`. */
|
|
1851
|
+
authScheme: z$1.ZodOptional<z$1.ZodEnum<["OAUTH2", "OAUTH1", "API_KEY", "BASIC", "BILLCOM_AUTH", "BEARER_TOKEN", "GOOGLE_SERVICE_ACCOUNT", "NO_AUTH", "BASIC_WITH_JWT", "CALCOM_AUTH", "SERVICE_ACCOUNT", "SAML", "DCR_OAUTH", "CIMD_OAUTH", "S2S_OAUTH2"]>>;
|
|
1852
|
+
/** Toolkit version to compute from. The API defaults to the latest published version. */
|
|
1853
|
+
toolkitVersion: z$1.ZodOptional<z$1.ZodString>;
|
|
1854
|
+
/**
|
|
1855
|
+
* Context the scopes will be granted in, as dimension → selected value,
|
|
1856
|
+
* for example `{ account_type: 'Google Workspace' }`. Discover the
|
|
1857
|
+
* dimensions with `composio.toolkits.listGrantContexts()`.
|
|
1858
|
+
*/
|
|
1859
|
+
grantContext: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
|
|
1860
|
+
/** Scopes the recommendation must include, whether or not the tools need them. */
|
|
1861
|
+
include: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString, "many">>;
|
|
1862
|
+
/** Scopes the recommendation must not include; the API picks documented alternatives or fails. */
|
|
1863
|
+
exclude: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString, "many">>;
|
|
1864
|
+
/** Scopes your OAuth app can request. The recommendation never goes outside this list. */
|
|
1865
|
+
availableScopes: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString, "many">>;
|
|
1866
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
1867
|
+
tools: string[];
|
|
1868
|
+
authScheme?: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "CIMD_OAUTH" | "S2S_OAUTH2" | undefined;
|
|
1869
|
+
toolkitVersion?: string | undefined;
|
|
1870
|
+
grantContext?: Record<string, string> | undefined;
|
|
1871
|
+
include?: string[] | undefined;
|
|
1872
|
+
exclude?: string[] | undefined;
|
|
1873
|
+
availableScopes?: string[] | undefined;
|
|
1874
|
+
}, {
|
|
1875
|
+
tools: string[];
|
|
1876
|
+
authScheme?: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "CIMD_OAUTH" | "S2S_OAUTH2" | undefined;
|
|
1877
|
+
toolkitVersion?: string | undefined;
|
|
1878
|
+
grantContext?: Record<string, string> | undefined;
|
|
1879
|
+
include?: string[] | undefined;
|
|
1880
|
+
exclude?: string[] | undefined;
|
|
1881
|
+
availableScopes?: string[] | undefined;
|
|
1882
|
+
}>;
|
|
1883
|
+
type ToolkitRecommendScopesParams = z$1.infer<typeof ToolkitRecommendScopesParamsSchema>;
|
|
1884
|
+
declare const ToolkitConditionalScopeSchema: z$1.ZodObject<{
|
|
1885
|
+
/** The scope needed only when the `when` guard matches. */
|
|
1886
|
+
scope: z$1.ZodString;
|
|
1887
|
+
/** Input field name → qualifying values. Any value matches within a field; all fields must match. */
|
|
1888
|
+
when: z$1.ZodRecord<z$1.ZodString, z$1.ZodArray<z$1.ZodString, "many">>;
|
|
1889
|
+
/** Tool slugs that need this scope under the guard. */
|
|
1890
|
+
for: z$1.ZodArray<z$1.ZodString, "many">;
|
|
1891
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
1892
|
+
scope: string;
|
|
1893
|
+
when: Record<string, string[]>;
|
|
1894
|
+
for: string[];
|
|
1895
|
+
}, {
|
|
1896
|
+
scope: string;
|
|
1897
|
+
when: Record<string, string[]>;
|
|
1898
|
+
for: string[];
|
|
1899
|
+
}>;
|
|
1900
|
+
type ToolkitConditionalScope = z$1.infer<typeof ToolkitConditionalScopeSchema>;
|
|
1901
|
+
/**
|
|
1902
|
+
* Response of `composio.toolkits.recommendScopes()`.
|
|
1903
|
+
* **Experimental — shape may change in future releases.**
|
|
1904
|
+
*/
|
|
1905
|
+
declare const ToolkitRecommendScopesResponseSchema: z$1.ZodObject<{
|
|
1906
|
+
/** Auth scheme the recommendation was computed under. */
|
|
1907
|
+
authScheme: z$1.ZodString;
|
|
1908
|
+
/** Concrete toolkit version the answer was computed from; pass it back as `toolkitVersion` to pin. */
|
|
1909
|
+
toolkitVersion: z$1.ZodString;
|
|
1910
|
+
/** The effective grant context: the toolkit default overlaid with your overrides. */
|
|
1911
|
+
grantContext: z$1.ZodRecord<z$1.ZodString, z$1.ZodString>;
|
|
1912
|
+
scopes: z$1.ZodObject<{
|
|
1913
|
+
/** Narrowest documented option per requirement. */
|
|
1914
|
+
leastPrivilege: z$1.ZodArray<z$1.ZodString, "many">;
|
|
1915
|
+
/** Smallest scope set covering all requirements. */
|
|
1916
|
+
fewest: z$1.ZodArray<z$1.ZodString, "many">;
|
|
1917
|
+
/**
|
|
1918
|
+
* Scopes needed only for particular call-time inputs. Both lists above
|
|
1919
|
+
* already include them, so a caller that knows its inputs may drop the rest.
|
|
1920
|
+
*/
|
|
1921
|
+
conditional: z$1.ZodArray<z$1.ZodObject<{
|
|
1922
|
+
/** The scope needed only when the `when` guard matches. */
|
|
1923
|
+
scope: z$1.ZodString;
|
|
1924
|
+
/** Input field name → qualifying values. Any value matches within a field; all fields must match. */
|
|
1925
|
+
when: z$1.ZodRecord<z$1.ZodString, z$1.ZodArray<z$1.ZodString, "many">>;
|
|
1926
|
+
/** Tool slugs that need this scope under the guard. */
|
|
1927
|
+
for: z$1.ZodArray<z$1.ZodString, "many">;
|
|
1928
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
1929
|
+
scope: string;
|
|
1930
|
+
when: Record<string, string[]>;
|
|
1931
|
+
for: string[];
|
|
1932
|
+
}, {
|
|
1933
|
+
scope: string;
|
|
1934
|
+
when: Record<string, string[]>;
|
|
1935
|
+
for: string[];
|
|
1936
|
+
}>, "many">;
|
|
1937
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
1938
|
+
leastPrivilege: string[];
|
|
1939
|
+
fewest: string[];
|
|
1940
|
+
conditional: {
|
|
1941
|
+
scope: string;
|
|
1942
|
+
when: Record<string, string[]>;
|
|
1943
|
+
for: string[];
|
|
1944
|
+
}[];
|
|
1945
|
+
}, {
|
|
1946
|
+
leastPrivilege: string[];
|
|
1947
|
+
fewest: string[];
|
|
1948
|
+
conditional: {
|
|
1949
|
+
scope: string;
|
|
1950
|
+
when: Record<string, string[]>;
|
|
1951
|
+
for: string[];
|
|
1952
|
+
}[];
|
|
1953
|
+
}>;
|
|
1954
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
1955
|
+
scopes: {
|
|
1956
|
+
leastPrivilege: string[];
|
|
1957
|
+
fewest: string[];
|
|
1958
|
+
conditional: {
|
|
1959
|
+
scope: string;
|
|
1960
|
+
when: Record<string, string[]>;
|
|
1961
|
+
for: string[];
|
|
1962
|
+
}[];
|
|
1963
|
+
};
|
|
1964
|
+
authScheme: string;
|
|
1965
|
+
toolkitVersion: string;
|
|
1966
|
+
grantContext: Record<string, string>;
|
|
1967
|
+
}, {
|
|
1968
|
+
scopes: {
|
|
1969
|
+
leastPrivilege: string[];
|
|
1970
|
+
fewest: string[];
|
|
1971
|
+
conditional: {
|
|
1972
|
+
scope: string;
|
|
1973
|
+
when: Record<string, string[]>;
|
|
1974
|
+
for: string[];
|
|
1975
|
+
}[];
|
|
1976
|
+
};
|
|
1977
|
+
authScheme: string;
|
|
1978
|
+
toolkitVersion: string;
|
|
1979
|
+
grantContext: Record<string, string>;
|
|
1980
|
+
}>;
|
|
1981
|
+
type ToolkitRecommendScopesResponse = z$1.infer<typeof ToolkitRecommendScopesResponseSchema>;
|
|
1982
|
+
/**
|
|
1983
|
+
* Params for `composio.toolkits.listGrantContexts()`.
|
|
1984
|
+
* **Experimental — shape may change in future releases.**
|
|
1985
|
+
*/
|
|
1986
|
+
declare const ToolkitListGrantContextsParamsSchema: z$1.ZodObject<{
|
|
1987
|
+
/** Auth scheme the connection will use. The API defaults to `OAUTH2`. */
|
|
1988
|
+
authScheme: z$1.ZodOptional<z$1.ZodEnum<["OAUTH2", "OAUTH1", "API_KEY", "BASIC", "BILLCOM_AUTH", "BEARER_TOKEN", "GOOGLE_SERVICE_ACCOUNT", "NO_AUTH", "BASIC_WITH_JWT", "CALCOM_AUTH", "SERVICE_ACCOUNT", "SAML", "DCR_OAUTH", "CIMD_OAUTH", "S2S_OAUTH2"]>>;
|
|
1989
|
+
/** Toolkit version to read the scope catalog from. The API defaults to the latest published version. */
|
|
1990
|
+
toolkitVersion: z$1.ZodOptional<z$1.ZodString>;
|
|
1991
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
1992
|
+
authScheme?: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "CIMD_OAUTH" | "S2S_OAUTH2" | undefined;
|
|
1993
|
+
toolkitVersion?: string | undefined;
|
|
1994
|
+
}, {
|
|
1995
|
+
authScheme?: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "CIMD_OAUTH" | "S2S_OAUTH2" | undefined;
|
|
1996
|
+
toolkitVersion?: string | undefined;
|
|
1997
|
+
}>;
|
|
1998
|
+
type ToolkitListGrantContextsParams = z$1.infer<typeof ToolkitListGrantContextsParamsSchema>;
|
|
1999
|
+
declare const ToolkitGrantContextDimensionSchema: z$1.ZodObject<{
|
|
2000
|
+
/** Dimension name to use as a `grantContext` key. */
|
|
2001
|
+
dimension: z$1.ZodString;
|
|
2002
|
+
/** What the dimension means and when to pass it. */
|
|
2003
|
+
description: z$1.ZodString;
|
|
2004
|
+
/** Values the dimension can take. */
|
|
2005
|
+
values: z$1.ZodArray<z$1.ZodString, "many">;
|
|
2006
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
2007
|
+
values: string[];
|
|
2008
|
+
description: string;
|
|
2009
|
+
dimension: string;
|
|
2010
|
+
}, {
|
|
2011
|
+
values: string[];
|
|
2012
|
+
description: string;
|
|
2013
|
+
dimension: string;
|
|
2014
|
+
}>;
|
|
2015
|
+
type ToolkitGrantContextDimension = z$1.infer<typeof ToolkitGrantContextDimensionSchema>;
|
|
2016
|
+
/**
|
|
2017
|
+
* Response of `composio.toolkits.listGrantContexts()`.
|
|
2018
|
+
* **Experimental — shape may change in future releases.**
|
|
2019
|
+
*/
|
|
2020
|
+
declare const ToolkitListGrantContextsResponseSchema: z$1.ZodObject<{
|
|
2021
|
+
/** Auth scheme whose scope catalog the dimensions were read from. */
|
|
2022
|
+
authScheme: z$1.ZodString;
|
|
2023
|
+
/** Concrete toolkit version the answer was computed from. */
|
|
2024
|
+
toolkitVersion: z$1.ZodString;
|
|
2025
|
+
/** Dimensions the toolkit accepts in `grantContext`; empty when no scope depends on one. */
|
|
2026
|
+
grantContextDimensions: z$1.ZodArray<z$1.ZodObject<{
|
|
2027
|
+
/** Dimension name to use as a `grantContext` key. */
|
|
2028
|
+
dimension: z$1.ZodString;
|
|
2029
|
+
/** What the dimension means and when to pass it. */
|
|
2030
|
+
description: z$1.ZodString;
|
|
2031
|
+
/** Values the dimension can take. */
|
|
2032
|
+
values: z$1.ZodArray<z$1.ZodString, "many">;
|
|
2033
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
2034
|
+
values: string[];
|
|
2035
|
+
description: string;
|
|
2036
|
+
dimension: string;
|
|
2037
|
+
}, {
|
|
2038
|
+
values: string[];
|
|
2039
|
+
description: string;
|
|
2040
|
+
dimension: string;
|
|
2041
|
+
}>, "many">;
|
|
2042
|
+
/** The grant context assumed when you pass none. */
|
|
2043
|
+
defaultGrantContext: z$1.ZodRecord<z$1.ZodString, z$1.ZodString>;
|
|
2044
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
2045
|
+
authScheme: string;
|
|
2046
|
+
toolkitVersion: string;
|
|
2047
|
+
grantContextDimensions: {
|
|
2048
|
+
values: string[];
|
|
2049
|
+
description: string;
|
|
2050
|
+
dimension: string;
|
|
2051
|
+
}[];
|
|
2052
|
+
defaultGrantContext: Record<string, string>;
|
|
2053
|
+
}, {
|
|
2054
|
+
authScheme: string;
|
|
2055
|
+
toolkitVersion: string;
|
|
2056
|
+
grantContextDimensions: {
|
|
2057
|
+
values: string[];
|
|
2058
|
+
description: string;
|
|
2059
|
+
dimension: string;
|
|
2060
|
+
}[];
|
|
2061
|
+
defaultGrantContext: Record<string, string>;
|
|
2062
|
+
}>;
|
|
2063
|
+
type ToolkitListGrantContextsResponse = z$1.infer<typeof ToolkitListGrantContextsResponseSchema>;
|
|
1716
2064
|
declare const ToolkitAuthFieldsResponseSchema: z$1.ZodArray<z$1.ZodObject<{
|
|
1717
2065
|
description: z$1.ZodString;
|
|
1718
2066
|
displayName: z$1.ZodString;
|
|
@@ -1758,6 +2106,7 @@ declare const AuthSchemeTypes: {
|
|
|
1758
2106
|
readonly SERVICE_ACCOUNT: "SERVICE_ACCOUNT";
|
|
1759
2107
|
readonly SAML: "SAML";
|
|
1760
2108
|
readonly DCR_OAUTH: "DCR_OAUTH";
|
|
2109
|
+
readonly CIMD_OAUTH: "CIMD_OAUTH";
|
|
1761
2110
|
readonly S2S_OAUTH2: "S2S_OAUTH2";
|
|
1762
2111
|
};
|
|
1763
2112
|
type AuthSchemeType = (typeof AuthSchemeTypes)[keyof typeof AuthSchemeTypes];
|
|
@@ -1778,12 +2127,12 @@ declare const AuthConfigToolAccessConfigSchema: z$1.ZodObject<{
|
|
|
1778
2127
|
toolsForConnectedAccountCreation?: string[] | undefined;
|
|
1779
2128
|
toolsAvailableForExecution?: string[] | undefined;
|
|
1780
2129
|
}>;
|
|
1781
|
-
declare const AuthSchemeEnum: z$1.ZodEnum<["OAUTH2", "OAUTH1", "API_KEY", "BASIC", "BILLCOM_AUTH", "BEARER_TOKEN", "GOOGLE_SERVICE_ACCOUNT", "NO_AUTH", "BASIC_WITH_JWT", "CALCOM_AUTH", "SERVICE_ACCOUNT", "SAML", "DCR_OAUTH", "S2S_OAUTH2"]>;
|
|
2130
|
+
declare const AuthSchemeEnum: z$1.ZodEnum<["OAUTH2", "OAUTH1", "API_KEY", "BASIC", "BILLCOM_AUTH", "BEARER_TOKEN", "GOOGLE_SERVICE_ACCOUNT", "NO_AUTH", "BASIC_WITH_JWT", "CALCOM_AUTH", "SERVICE_ACCOUNT", "SAML", "DCR_OAUTH", "CIMD_OAUTH", "S2S_OAUTH2"]>;
|
|
1782
2131
|
declare const CreateCustomAuthConfigParamsSchema: z$1.ZodObject<{
|
|
1783
2132
|
type: z$1.ZodLiteral<"use_custom_auth">;
|
|
1784
2133
|
name: z$1.ZodOptional<z$1.ZodString>;
|
|
1785
2134
|
credentials: z$1.ZodRecord<z$1.ZodString, z$1.ZodUnion<[z$1.ZodString, z$1.ZodNumber, z$1.ZodBoolean]>>;
|
|
1786
|
-
authScheme: z$1.ZodEnum<["OAUTH2", "OAUTH1", "API_KEY", "BASIC", "BILLCOM_AUTH", "BEARER_TOKEN", "GOOGLE_SERVICE_ACCOUNT", "NO_AUTH", "BASIC_WITH_JWT", "CALCOM_AUTH", "SERVICE_ACCOUNT", "SAML", "DCR_OAUTH", "S2S_OAUTH2"]>;
|
|
2135
|
+
authScheme: z$1.ZodEnum<["OAUTH2", "OAUTH1", "API_KEY", "BASIC", "BILLCOM_AUTH", "BEARER_TOKEN", "GOOGLE_SERVICE_ACCOUNT", "NO_AUTH", "BASIC_WITH_JWT", "CALCOM_AUTH", "SERVICE_ACCOUNT", "SAML", "DCR_OAUTH", "CIMD_OAUTH", "S2S_OAUTH2"]>;
|
|
1787
2136
|
proxyConfig: z$1.ZodOptional<z$1.ZodObject<{
|
|
1788
2137
|
proxyUrl: z$1.ZodString;
|
|
1789
2138
|
proxyAuthKey: z$1.ZodOptional<z$1.ZodString>;
|
|
@@ -1804,7 +2153,7 @@ declare const CreateCustomAuthConfigParamsSchema: z$1.ZodObject<{
|
|
|
1804
2153
|
isEnabledForToolRouter: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
1805
2154
|
}, "strip", z$1.ZodTypeAny, {
|
|
1806
2155
|
type: "use_custom_auth";
|
|
1807
|
-
authScheme: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "S2S_OAUTH2";
|
|
2156
|
+
authScheme: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "CIMD_OAUTH" | "S2S_OAUTH2";
|
|
1808
2157
|
credentials: Record<string, string | number | boolean>;
|
|
1809
2158
|
name?: string | undefined;
|
|
1810
2159
|
proxyConfig?: {
|
|
@@ -1817,7 +2166,7 @@ declare const CreateCustomAuthConfigParamsSchema: z$1.ZodObject<{
|
|
|
1817
2166
|
isEnabledForToolRouter?: boolean | undefined;
|
|
1818
2167
|
}, {
|
|
1819
2168
|
type: "use_custom_auth";
|
|
1820
|
-
authScheme: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "S2S_OAUTH2";
|
|
2169
|
+
authScheme: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "CIMD_OAUTH" | "S2S_OAUTH2";
|
|
1821
2170
|
credentials: Record<string, string | number | boolean>;
|
|
1822
2171
|
name?: string | undefined;
|
|
1823
2172
|
proxyConfig?: {
|
|
@@ -1880,7 +2229,7 @@ declare const CreateAuthConfigParamsSchema: z$1.ZodDiscriminatedUnion<"type", [z
|
|
|
1880
2229
|
type: z$1.ZodLiteral<"use_custom_auth">;
|
|
1881
2230
|
name: z$1.ZodOptional<z$1.ZodString>;
|
|
1882
2231
|
credentials: z$1.ZodRecord<z$1.ZodString, z$1.ZodUnion<[z$1.ZodString, z$1.ZodNumber, z$1.ZodBoolean]>>;
|
|
1883
|
-
authScheme: z$1.ZodEnum<["OAUTH2", "OAUTH1", "API_KEY", "BASIC", "BILLCOM_AUTH", "BEARER_TOKEN", "GOOGLE_SERVICE_ACCOUNT", "NO_AUTH", "BASIC_WITH_JWT", "CALCOM_AUTH", "SERVICE_ACCOUNT", "SAML", "DCR_OAUTH", "S2S_OAUTH2"]>;
|
|
2232
|
+
authScheme: z$1.ZodEnum<["OAUTH2", "OAUTH1", "API_KEY", "BASIC", "BILLCOM_AUTH", "BEARER_TOKEN", "GOOGLE_SERVICE_ACCOUNT", "NO_AUTH", "BASIC_WITH_JWT", "CALCOM_AUTH", "SERVICE_ACCOUNT", "SAML", "DCR_OAUTH", "CIMD_OAUTH", "S2S_OAUTH2"]>;
|
|
1884
2233
|
proxyConfig: z$1.ZodOptional<z$1.ZodObject<{
|
|
1885
2234
|
proxyUrl: z$1.ZodString;
|
|
1886
2235
|
proxyAuthKey: z$1.ZodOptional<z$1.ZodString>;
|
|
@@ -1901,7 +2250,7 @@ declare const CreateAuthConfigParamsSchema: z$1.ZodDiscriminatedUnion<"type", [z
|
|
|
1901
2250
|
isEnabledForToolRouter: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
1902
2251
|
}, "strip", z$1.ZodTypeAny, {
|
|
1903
2252
|
type: "use_custom_auth";
|
|
1904
|
-
authScheme: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "S2S_OAUTH2";
|
|
2253
|
+
authScheme: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "CIMD_OAUTH" | "S2S_OAUTH2";
|
|
1905
2254
|
credentials: Record<string, string | number | boolean>;
|
|
1906
2255
|
name?: string | undefined;
|
|
1907
2256
|
proxyConfig?: {
|
|
@@ -1914,7 +2263,7 @@ declare const CreateAuthConfigParamsSchema: z$1.ZodDiscriminatedUnion<"type", [z
|
|
|
1914
2263
|
isEnabledForToolRouter?: boolean | undefined;
|
|
1915
2264
|
}, {
|
|
1916
2265
|
type: "use_custom_auth";
|
|
1917
|
-
authScheme: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "S2S_OAUTH2";
|
|
2266
|
+
authScheme: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "CIMD_OAUTH" | "S2S_OAUTH2";
|
|
1918
2267
|
credentials: Record<string, string | number | boolean>;
|
|
1919
2268
|
name?: string | undefined;
|
|
1920
2269
|
proxyConfig?: {
|
|
@@ -2002,7 +2351,7 @@ declare const AuthConfigRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
2002
2351
|
}>;
|
|
2003
2352
|
noOfConnections: z$1.ZodNumber;
|
|
2004
2353
|
status: z$1.ZodEnum<["ENABLED", "DISABLED"]>;
|
|
2005
|
-
authScheme: z$1.ZodOptional<z$1.ZodEnum<["OAUTH2", "OAUTH1", "API_KEY", "BASIC", "BILLCOM_AUTH", "BEARER_TOKEN", "GOOGLE_SERVICE_ACCOUNT", "NO_AUTH", "BASIC_WITH_JWT", "CALCOM_AUTH", "SERVICE_ACCOUNT", "SAML", "DCR_OAUTH", "S2S_OAUTH2"]>>;
|
|
2354
|
+
authScheme: z$1.ZodOptional<z$1.ZodEnum<["OAUTH2", "OAUTH1", "API_KEY", "BASIC", "BILLCOM_AUTH", "BEARER_TOKEN", "GOOGLE_SERVICE_ACCOUNT", "NO_AUTH", "BASIC_WITH_JWT", "CALCOM_AUTH", "SERVICE_ACCOUNT", "SAML", "DCR_OAUTH", "CIMD_OAUTH", "S2S_OAUTH2"]>>;
|
|
2006
2355
|
credentials: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
|
|
2007
2356
|
expectedInputFields: z$1.ZodOptional<z$1.ZodArray<z$1.ZodUnknown, "many">>;
|
|
2008
2357
|
isEnabledForToolRouter: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
@@ -2033,7 +2382,7 @@ declare const AuthConfigRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
2033
2382
|
};
|
|
2034
2383
|
id: string;
|
|
2035
2384
|
noOfConnections: number;
|
|
2036
|
-
authScheme?: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "S2S_OAUTH2" | undefined;
|
|
2385
|
+
authScheme?: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "CIMD_OAUTH" | "S2S_OAUTH2" | undefined;
|
|
2037
2386
|
createdAt?: string | undefined;
|
|
2038
2387
|
isComposioManaged?: boolean | undefined;
|
|
2039
2388
|
credentials?: Record<string, unknown> | undefined;
|
|
@@ -2055,7 +2404,7 @@ declare const AuthConfigRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
2055
2404
|
};
|
|
2056
2405
|
id: string;
|
|
2057
2406
|
noOfConnections: number;
|
|
2058
|
-
authScheme?: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "S2S_OAUTH2" | undefined;
|
|
2407
|
+
authScheme?: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "CIMD_OAUTH" | "S2S_OAUTH2" | undefined;
|
|
2059
2408
|
createdAt?: string | undefined;
|
|
2060
2409
|
isComposioManaged?: boolean | undefined;
|
|
2061
2410
|
credentials?: Record<string, unknown> | undefined;
|
|
@@ -2109,7 +2458,7 @@ declare const AuthConfigListResponseSchema: z$1.ZodObject<{
|
|
|
2109
2458
|
}>;
|
|
2110
2459
|
noOfConnections: z$1.ZodNumber;
|
|
2111
2460
|
status: z$1.ZodEnum<["ENABLED", "DISABLED"]>;
|
|
2112
|
-
authScheme: z$1.ZodOptional<z$1.ZodEnum<["OAUTH2", "OAUTH1", "API_KEY", "BASIC", "BILLCOM_AUTH", "BEARER_TOKEN", "GOOGLE_SERVICE_ACCOUNT", "NO_AUTH", "BASIC_WITH_JWT", "CALCOM_AUTH", "SERVICE_ACCOUNT", "SAML", "DCR_OAUTH", "S2S_OAUTH2"]>>;
|
|
2461
|
+
authScheme: z$1.ZodOptional<z$1.ZodEnum<["OAUTH2", "OAUTH1", "API_KEY", "BASIC", "BILLCOM_AUTH", "BEARER_TOKEN", "GOOGLE_SERVICE_ACCOUNT", "NO_AUTH", "BASIC_WITH_JWT", "CALCOM_AUTH", "SERVICE_ACCOUNT", "SAML", "DCR_OAUTH", "CIMD_OAUTH", "S2S_OAUTH2"]>>;
|
|
2113
2462
|
credentials: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
|
|
2114
2463
|
expectedInputFields: z$1.ZodOptional<z$1.ZodArray<z$1.ZodUnknown, "many">>;
|
|
2115
2464
|
isEnabledForToolRouter: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
@@ -2140,7 +2489,7 @@ declare const AuthConfigListResponseSchema: z$1.ZodObject<{
|
|
|
2140
2489
|
};
|
|
2141
2490
|
id: string;
|
|
2142
2491
|
noOfConnections: number;
|
|
2143
|
-
authScheme?: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "S2S_OAUTH2" | undefined;
|
|
2492
|
+
authScheme?: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "CIMD_OAUTH" | "S2S_OAUTH2" | undefined;
|
|
2144
2493
|
createdAt?: string | undefined;
|
|
2145
2494
|
isComposioManaged?: boolean | undefined;
|
|
2146
2495
|
credentials?: Record<string, unknown> | undefined;
|
|
@@ -2162,7 +2511,7 @@ declare const AuthConfigListResponseSchema: z$1.ZodObject<{
|
|
|
2162
2511
|
};
|
|
2163
2512
|
id: string;
|
|
2164
2513
|
noOfConnections: number;
|
|
2165
|
-
authScheme?: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "S2S_OAUTH2" | undefined;
|
|
2514
|
+
authScheme?: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "CIMD_OAUTH" | "S2S_OAUTH2" | undefined;
|
|
2166
2515
|
createdAt?: string | undefined;
|
|
2167
2516
|
isComposioManaged?: boolean | undefined;
|
|
2168
2517
|
credentials?: Record<string, unknown> | undefined;
|
|
@@ -2188,7 +2537,7 @@ declare const AuthConfigListResponseSchema: z$1.ZodObject<{
|
|
|
2188
2537
|
};
|
|
2189
2538
|
id: string;
|
|
2190
2539
|
noOfConnections: number;
|
|
2191
|
-
authScheme?: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "S2S_OAUTH2" | undefined;
|
|
2540
|
+
authScheme?: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "CIMD_OAUTH" | "S2S_OAUTH2" | undefined;
|
|
2192
2541
|
createdAt?: string | undefined;
|
|
2193
2542
|
isComposioManaged?: boolean | undefined;
|
|
2194
2543
|
credentials?: Record<string, unknown> | undefined;
|
|
@@ -2214,7 +2563,7 @@ declare const AuthConfigListResponseSchema: z$1.ZodObject<{
|
|
|
2214
2563
|
};
|
|
2215
2564
|
id: string;
|
|
2216
2565
|
noOfConnections: number;
|
|
2217
|
-
authScheme?: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "S2S_OAUTH2" | undefined;
|
|
2566
|
+
authScheme?: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "CIMD_OAUTH" | "S2S_OAUTH2" | undefined;
|
|
2218
2567
|
createdAt?: string | undefined;
|
|
2219
2568
|
isComposioManaged?: boolean | undefined;
|
|
2220
2569
|
credentials?: Record<string, unknown> | undefined;
|
|
@@ -2486,6 +2835,87 @@ declare class Toolkits {
|
|
|
2486
2835
|
* ```
|
|
2487
2836
|
*/
|
|
2488
2837
|
get(query?: ToolkitListParams, requestOptions?: ComposioRequestOptions): Promise<ToolKitListResponse>;
|
|
2838
|
+
/**
|
|
2839
|
+
* Retrieves several toolkits by slug in a single request.
|
|
2840
|
+
*
|
|
2841
|
+
* Returns the same transformed shape as `composio.toolkits.get({ ... })`.
|
|
2842
|
+
* Unknown slugs are simply absent from the result.
|
|
2843
|
+
*
|
|
2844
|
+
* @param {string[]} slugs - The toolkit slugs to retrieve (at least one)
|
|
2845
|
+
* @param {ToolkitGetManyParams} [params] - Optional filters and pagination, as for `list`
|
|
2846
|
+
* @returns {Promise<ToolKitListResponse>} The matching toolkits
|
|
2847
|
+
* @throws {ValidationError} If `slugs` is empty or the params fail validation
|
|
2848
|
+
* @throws {ComposioToolkitFetchError} If the request fails
|
|
2849
|
+
*
|
|
2850
|
+
* @example
|
|
2851
|
+
* ```typescript
|
|
2852
|
+
* const toolkits = await composio.toolkits.getMany(['github', 'slack']);
|
|
2853
|
+
* console.log(toolkits.map(toolkit => toolkit.name)); // ['GitHub', 'Slack']
|
|
2854
|
+
* ```
|
|
2855
|
+
*/
|
|
2856
|
+
getMany(slugs: string[], params?: ToolkitGetManyParams, requestOptions?: ComposioRequestOptions): Promise<ToolKitListResponse>;
|
|
2857
|
+
/**
|
|
2858
|
+
* Retrieves the version changelog of every toolkit (the last 10 versions
|
|
2859
|
+
* per toolkit).
|
|
2860
|
+
*
|
|
2861
|
+
* @returns {Promise<ToolkitChangelogResponse>} Toolkits with their recent version changelogs
|
|
2862
|
+
*
|
|
2863
|
+
* @example
|
|
2864
|
+
* ```typescript
|
|
2865
|
+
* const { items } = await composio.toolkits.changelog();
|
|
2866
|
+
* const github = items.find(item => item.slug === 'github');
|
|
2867
|
+
* console.log(github?.versions[0]); // { version: '20250909_00', changelog: '...' }
|
|
2868
|
+
* ```
|
|
2869
|
+
*/
|
|
2870
|
+
changelog(requestOptions?: ComposioRequestOptions): Promise<ToolkitChangelogResponse>;
|
|
2871
|
+
/**
|
|
2872
|
+
* Recommends the OAuth scopes to request so a connection can run the given
|
|
2873
|
+
* tools.
|
|
2874
|
+
* **Experimental — the API marks this endpoint beta; shape may change.**
|
|
2875
|
+
*
|
|
2876
|
+
* The answer comes in two variants: `leastPrivilege` (narrowest documented
|
|
2877
|
+
* scope per requirement) and `fewest` (smallest set covering everything).
|
|
2878
|
+
* Pass `toolkitVersion` from a previous answer to pin the computation.
|
|
2879
|
+
*
|
|
2880
|
+
* @param {string} toolkitSlug - The toolkit to recommend scopes for
|
|
2881
|
+
* @param {ToolkitRecommendScopesParams} params - Tools to cover (`[]` for the whole toolkit), auth scheme, grant context and scope constraints
|
|
2882
|
+
* @returns {Promise<ToolkitRecommendScopesResponse>} The recommended scope sets
|
|
2883
|
+
* @throws {ValidationError} If the params fail validation
|
|
2884
|
+
*
|
|
2885
|
+
* @example
|
|
2886
|
+
* ```typescript
|
|
2887
|
+
* const { scopes } = await composio.toolkits.recommendScopes('gmail', {
|
|
2888
|
+
* tools: ['GMAIL_SEND_EMAIL', 'GMAIL_FETCH_EMAILS'],
|
|
2889
|
+
* });
|
|
2890
|
+
* console.log(scopes.leastPrivilege);
|
|
2891
|
+
* ```
|
|
2892
|
+
*/
|
|
2893
|
+
recommendScopes(toolkitSlug: string, params: ToolkitRecommendScopesParams, requestOptions?: ComposioRequestOptions): Promise<ToolkitRecommendScopesResponse>;
|
|
2894
|
+
/**
|
|
2895
|
+
* Lists the grant-context dimensions a toolkit's scope recommendation
|
|
2896
|
+
* depends on (for example the Google account type), with their allowed
|
|
2897
|
+
* values and the default the API assumes.
|
|
2898
|
+
* **Experimental — the API marks this endpoint beta; shape may change.**
|
|
2899
|
+
*
|
|
2900
|
+
* Pass a dimension and a value as `grantContext` to
|
|
2901
|
+
* `composio.toolkits.recommendScopes()` to tailor the recommendation.
|
|
2902
|
+
*
|
|
2903
|
+
* @param {string} toolkitSlug - The toolkit to list grant contexts for
|
|
2904
|
+
* @param {ToolkitListGrantContextsParams} [params] - Optional auth scheme and toolkit version
|
|
2905
|
+
* @returns {Promise<ToolkitListGrantContextsResponse>} The dimensions and the default grant context
|
|
2906
|
+
* @throws {ValidationError} If the params fail validation
|
|
2907
|
+
*
|
|
2908
|
+
* @example
|
|
2909
|
+
* ```typescript
|
|
2910
|
+
* const { grantContextDimensions } = await composio.toolkits.listGrantContexts('gmail');
|
|
2911
|
+
* const [accountType] = grantContextDimensions;
|
|
2912
|
+
* const { scopes } = await composio.toolkits.recommendScopes('gmail', {
|
|
2913
|
+
* tools: ['GMAIL_SEND_EMAIL'],
|
|
2914
|
+
* grantContext: { [accountType.dimension]: accountType.values[0] },
|
|
2915
|
+
* });
|
|
2916
|
+
* ```
|
|
2917
|
+
*/
|
|
2918
|
+
listGrantContexts(toolkitSlug: string, params?: ToolkitListGrantContextsParams, requestOptions?: ComposioRequestOptions): Promise<ToolkitListGrantContextsResponse>;
|
|
2489
2919
|
private getAuthConfigFields;
|
|
2490
2920
|
/**
|
|
2491
2921
|
* Retrieves the fields required for creating an auth config for a toolkit.
|
|
@@ -4135,8 +4565,62 @@ declare class ConnectedAccounts {
|
|
|
4135
4565
|
* // Refresh a connected account's credentials
|
|
4136
4566
|
* const refreshedAccount = await composio.connectedAccounts.refresh('conn_abc123');
|
|
4137
4567
|
* ```
|
|
4568
|
+
*
|
|
4569
|
+
* @deprecated The `POST /connected_accounts/{id}/refresh` endpoint is deprecated by the
|
|
4570
|
+
* Composio API. Re-initiate authentication instead: `composio.connectedAccounts.link(userId, authConfigId)`
|
|
4571
|
+
* for a fresh connection, or `session.authorize(toolkit)` from a session. Behaviour is unchanged
|
|
4572
|
+
* while the endpoint remains available; do not generate new code against `refresh`.
|
|
4138
4573
|
*/
|
|
4139
4574
|
refresh(nanoid: string, options?: ConnectedAccountRefreshOptions, requestOptions?: ComposioRequestOptions): Promise<ConnectedAccountRefreshResponse>;
|
|
4575
|
+
/**
|
|
4576
|
+
* Revoke a connected account at the upstream provider.
|
|
4577
|
+
*
|
|
4578
|
+
* Best-effort upstream revocation of the stored tokens/credentials; on
|
|
4579
|
+
* success the connection status becomes `REVOKED`. Revoking an already
|
|
4580
|
+
* revoked connection returns an empty `revokedTokens` list without an
|
|
4581
|
+
* upstream call.
|
|
4582
|
+
*
|
|
4583
|
+
* @param {string} nanoid - The unique identifier of the connected account to revoke
|
|
4584
|
+
* @returns {Promise<ConnectedAccountRevokeResponse>} Which tokens were revoked and the resulting status
|
|
4585
|
+
* @throws {ComposioConnectedAccountRevocationNotSupportedError} If the toolkit does not support programmatic revocation (400)
|
|
4586
|
+
* @throws {ComposioConnectedAccountNotRevokableError} If the connection is not in a revokable state (409)
|
|
4587
|
+
*
|
|
4588
|
+
* @example
|
|
4589
|
+
* ```typescript
|
|
4590
|
+
* const result = await composio.connectedAccounts.revoke('conn_abc123');
|
|
4591
|
+
* console.log(result.connectedAccount.status); // 'REVOKED'
|
|
4592
|
+
* console.log(result.revokedTokens); // e.g. ['access_token', 'refresh_token']
|
|
4593
|
+
* ```
|
|
4594
|
+
*/
|
|
4595
|
+
revoke(nanoid: string, requestOptions?: ComposioRequestOptions): Promise<ConnectedAccountRevokeResponse>;
|
|
4596
|
+
/**
|
|
4597
|
+
* Complete a deferred OAuth connection once you have verified the user's
|
|
4598
|
+
* identity.
|
|
4599
|
+
*
|
|
4600
|
+
* When your project has an OAuth callback verifier configured, Composio
|
|
4601
|
+
* does not activate a new OAuth connection by itself: it redirects to your
|
|
4602
|
+
* verifier with a single-use session URI. After confirming who the user is,
|
|
4603
|
+
* redeem that session URI here; Composio checks that your project owns the
|
|
4604
|
+
* pending connection and that `userId` is its owner, completes the token
|
|
4605
|
+
* exchange, and the connection becomes `ACTIVE`.
|
|
4606
|
+
*
|
|
4607
|
+
* The session URI is single-use: redeeming it twice, or after it expires,
|
|
4608
|
+
* fails with a 404 from the API.
|
|
4609
|
+
*
|
|
4610
|
+
* @param {ConnectedAccountCompleteAuthParams} params - `userId` the connection was initiated for and the verifier's `sessionUri`
|
|
4611
|
+
* @returns {Promise<ConnectedAccountCompleteAuthResponse>} The completed connection's ID and toolkit
|
|
4612
|
+
* @throws {ValidationError} If the params fail validation
|
|
4613
|
+
*
|
|
4614
|
+
* @example
|
|
4615
|
+
* ```typescript
|
|
4616
|
+
* // In your verifier route, after authenticating the user:
|
|
4617
|
+
* const { connectedAccountId, toolkitSlug } = await composio.connectedAccounts.completeAuth({
|
|
4618
|
+
* userId: 'user_123',
|
|
4619
|
+
* sessionUri, // the session URI from the verifier redirect
|
|
4620
|
+
* });
|
|
4621
|
+
* ```
|
|
4622
|
+
*/
|
|
4623
|
+
completeAuth(params: ConnectedAccountCompleteAuthParams, requestOptions?: ComposioRequestOptions): Promise<ConnectedAccountCompleteAuthResponse>;
|
|
4140
4624
|
/**
|
|
4141
4625
|
* Update the status of a connected account
|
|
4142
4626
|
* @param {string} nanoid - Unique identifier of the connected account
|
|
@@ -4239,41 +4723,712 @@ declare class ConnectedAccounts {
|
|
|
4239
4723
|
update(nanoid: string, params: UpdateConnectedAccountParams, requestOptions?: ComposioRequestOptions): Promise<ConnectedAccountUpdateStatusResponse>;
|
|
4240
4724
|
}
|
|
4241
4725
|
//#endregion
|
|
4242
|
-
//#region src/
|
|
4243
|
-
|
|
4726
|
+
//#region src/types/usage.types.d.ts
|
|
4727
|
+
/**
|
|
4728
|
+
* Filters shared by the usage summary and breakdown queries.
|
|
4729
|
+
* **Experimental — shape may change in future releases.**
|
|
4730
|
+
*/
|
|
4731
|
+
declare const UsageFiltersSchema: z$1.ZodObject<{
|
|
4732
|
+
/** Only count events for these external end-user IDs (OR logic). */
|
|
4733
|
+
userId: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodArray<z$1.ZodString, "many">>>;
|
|
4734
|
+
/** Only count events for these session IDs (OR logic). */
|
|
4735
|
+
sessionId: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodArray<z$1.ZodString, "many">>>;
|
|
4736
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
4737
|
+
userId?: string[] | null | undefined;
|
|
4738
|
+
sessionId?: string[] | null | undefined;
|
|
4739
|
+
}, {
|
|
4740
|
+
userId?: string[] | null | undefined;
|
|
4741
|
+
sessionId?: string[] | null | undefined;
|
|
4742
|
+
}>;
|
|
4743
|
+
type UsageFilters = z$1.infer<typeof UsageFiltersSchema>;
|
|
4744
|
+
/**
|
|
4745
|
+
* Params for `composio.experimental.usage.summary()`.
|
|
4746
|
+
* **Experimental — shape may change in future releases.**
|
|
4747
|
+
*/
|
|
4748
|
+
declare const UsageSummaryParamsSchema: z$1.ZodObject<{
|
|
4749
|
+
/** Inclusive range start (Unix epoch milliseconds). Defaults to 30 days before `to`. */
|
|
4750
|
+
from: z$1.ZodOptional<z$1.ZodNumber>;
|
|
4751
|
+
/** Exclusive range end (Unix epoch milliseconds). Defaults to now. */
|
|
4752
|
+
to: z$1.ZodOptional<z$1.ZodNumber>;
|
|
4753
|
+
/** Restrict to these metering entity types. Omit for all types. */
|
|
4754
|
+
entityTypes: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString, "many">>;
|
|
4755
|
+
filters: z$1.ZodOptional<z$1.ZodObject<{
|
|
4756
|
+
/** Only count events for these external end-user IDs (OR logic). */
|
|
4757
|
+
userId: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodArray<z$1.ZodString, "many">>>;
|
|
4758
|
+
/** Only count events for these session IDs (OR logic). */
|
|
4759
|
+
sessionId: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodArray<z$1.ZodString, "many">>>;
|
|
4760
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
4761
|
+
userId?: string[] | null | undefined;
|
|
4762
|
+
sessionId?: string[] | null | undefined;
|
|
4763
|
+
}, {
|
|
4764
|
+
userId?: string[] | null | undefined;
|
|
4765
|
+
sessionId?: string[] | null | undefined;
|
|
4766
|
+
}>>;
|
|
4767
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
4768
|
+
from?: number | undefined;
|
|
4769
|
+
to?: number | undefined;
|
|
4770
|
+
filters?: {
|
|
4771
|
+
userId?: string[] | null | undefined;
|
|
4772
|
+
sessionId?: string[] | null | undefined;
|
|
4773
|
+
} | undefined;
|
|
4774
|
+
entityTypes?: string[] | undefined;
|
|
4775
|
+
}, {
|
|
4776
|
+
from?: number | undefined;
|
|
4777
|
+
to?: number | undefined;
|
|
4778
|
+
filters?: {
|
|
4779
|
+
userId?: string[] | null | undefined;
|
|
4780
|
+
sessionId?: string[] | null | undefined;
|
|
4781
|
+
} | undefined;
|
|
4782
|
+
entityTypes?: string[] | undefined;
|
|
4783
|
+
}>;
|
|
4784
|
+
type UsageSummaryParams = z$1.infer<typeof UsageSummaryParamsSchema>;
|
|
4785
|
+
declare const UsageOrderBySchema: z$1.ZodEnum<["key", "total_quantity", "event_count"]>;
|
|
4786
|
+
declare const UsageOrderDirectionSchema: z$1.ZodEnum<["asc", "desc"]>;
|
|
4787
|
+
/**
|
|
4788
|
+
* Params for `composio.experimental.usage.breakdown()`.
|
|
4789
|
+
* **Experimental — shape may change in future releases.**
|
|
4790
|
+
*/
|
|
4791
|
+
declare const UsageBreakdownParamsSchema: z$1.ZodObject<{
|
|
4792
|
+
/** Inclusive range start (Unix epoch milliseconds). Defaults to 30 days before `to`. */
|
|
4793
|
+
from: z$1.ZodOptional<z$1.ZodNumber>;
|
|
4794
|
+
/** Exclusive range end (Unix epoch milliseconds). Defaults to now. */
|
|
4795
|
+
to: z$1.ZodOptional<z$1.ZodNumber>;
|
|
4796
|
+
/** Dimension to group by. Defaults to `tool_slug` for tool_calls and `user_id` for sessions. */
|
|
4797
|
+
groupBy: z$1.ZodOptional<z$1.ZodString>;
|
|
4798
|
+
/** Field to order groups by. Defaults to `total_quantity`. */
|
|
4799
|
+
orderBy: z$1.ZodOptional<z$1.ZodEnum<["key", "total_quantity", "event_count"]>>;
|
|
4800
|
+
/** Sort direction. Defaults to `desc`. */
|
|
4801
|
+
orderDirection: z$1.ZodOptional<z$1.ZodEnum<["asc", "desc"]>>;
|
|
4802
|
+
/** Maximum number of groups to return. Defaults to 100, max 1000. */
|
|
4803
|
+
limit: z$1.ZodOptional<z$1.ZodNumber>;
|
|
4804
|
+
filters: z$1.ZodOptional<z$1.ZodObject<{
|
|
4805
|
+
/** Only count events for these external end-user IDs (OR logic). */
|
|
4806
|
+
userId: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodArray<z$1.ZodString, "many">>>;
|
|
4807
|
+
/** Only count events for these session IDs (OR logic). */
|
|
4808
|
+
sessionId: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodArray<z$1.ZodString, "many">>>;
|
|
4809
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
4810
|
+
userId?: string[] | null | undefined;
|
|
4811
|
+
sessionId?: string[] | null | undefined;
|
|
4812
|
+
}, {
|
|
4813
|
+
userId?: string[] | null | undefined;
|
|
4814
|
+
sessionId?: string[] | null | undefined;
|
|
4815
|
+
}>>;
|
|
4816
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
4817
|
+
limit?: number | undefined;
|
|
4818
|
+
orderBy?: "key" | "total_quantity" | "event_count" | undefined;
|
|
4819
|
+
from?: number | undefined;
|
|
4820
|
+
to?: number | undefined;
|
|
4821
|
+
filters?: {
|
|
4822
|
+
userId?: string[] | null | undefined;
|
|
4823
|
+
sessionId?: string[] | null | undefined;
|
|
4824
|
+
} | undefined;
|
|
4825
|
+
groupBy?: string | undefined;
|
|
4826
|
+
orderDirection?: "asc" | "desc" | undefined;
|
|
4827
|
+
}, {
|
|
4828
|
+
limit?: number | undefined;
|
|
4829
|
+
orderBy?: "key" | "total_quantity" | "event_count" | undefined;
|
|
4830
|
+
from?: number | undefined;
|
|
4831
|
+
to?: number | undefined;
|
|
4832
|
+
filters?: {
|
|
4833
|
+
userId?: string[] | null | undefined;
|
|
4834
|
+
sessionId?: string[] | null | undefined;
|
|
4835
|
+
} | undefined;
|
|
4836
|
+
groupBy?: string | undefined;
|
|
4837
|
+
orderDirection?: "asc" | "desc" | undefined;
|
|
4838
|
+
}>;
|
|
4839
|
+
type UsageBreakdownParams = z$1.infer<typeof UsageBreakdownParamsSchema>;
|
|
4840
|
+
declare const UsageEntitySummarySchema: z$1.ZodObject<{
|
|
4841
|
+
unit: z$1.ZodString;
|
|
4842
|
+
totalQuantity: z$1.ZodString;
|
|
4843
|
+
eventCount: z$1.ZodNumber;
|
|
4844
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
4845
|
+
unit: string;
|
|
4846
|
+
totalQuantity: string;
|
|
4847
|
+
eventCount: number;
|
|
4848
|
+
}, {
|
|
4849
|
+
unit: string;
|
|
4850
|
+
totalQuantity: string;
|
|
4851
|
+
eventCount: number;
|
|
4852
|
+
}>;
|
|
4853
|
+
type UsageEntitySummary = z$1.infer<typeof UsageEntitySummarySchema>;
|
|
4854
|
+
declare const UsageSummaryResponseSchema: z$1.ZodObject<{
|
|
4855
|
+
/** Aggregates keyed by metering entity type (e.g. `tool_calls`, `sessions`). */
|
|
4856
|
+
entities: z$1.ZodRecord<z$1.ZodString, z$1.ZodObject<{
|
|
4857
|
+
unit: z$1.ZodString;
|
|
4858
|
+
totalQuantity: z$1.ZodString;
|
|
4859
|
+
eventCount: z$1.ZodNumber;
|
|
4860
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
4861
|
+
unit: string;
|
|
4862
|
+
totalQuantity: string;
|
|
4863
|
+
eventCount: number;
|
|
4864
|
+
}, {
|
|
4865
|
+
unit: string;
|
|
4866
|
+
totalQuantity: string;
|
|
4867
|
+
eventCount: number;
|
|
4868
|
+
}>>;
|
|
4869
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
4870
|
+
entities: Record<string, {
|
|
4871
|
+
unit: string;
|
|
4872
|
+
totalQuantity: string;
|
|
4873
|
+
eventCount: number;
|
|
4874
|
+
}>;
|
|
4875
|
+
}, {
|
|
4876
|
+
entities: Record<string, {
|
|
4877
|
+
unit: string;
|
|
4878
|
+
totalQuantity: string;
|
|
4879
|
+
eventCount: number;
|
|
4880
|
+
}>;
|
|
4881
|
+
}>;
|
|
4882
|
+
type UsageSummaryResponse = z$1.infer<typeof UsageSummaryResponseSchema>;
|
|
4883
|
+
declare const UsageBreakdownGroupSchema: z$1.ZodObject<{
|
|
4884
|
+
key: z$1.ZodString;
|
|
4885
|
+
totalQuantity: z$1.ZodString;
|
|
4886
|
+
eventCount: z$1.ZodNumber;
|
|
4887
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
4888
|
+
key: string;
|
|
4889
|
+
totalQuantity: string;
|
|
4890
|
+
eventCount: number;
|
|
4891
|
+
}, {
|
|
4892
|
+
key: string;
|
|
4893
|
+
totalQuantity: string;
|
|
4894
|
+
eventCount: number;
|
|
4895
|
+
}>;
|
|
4896
|
+
type UsageBreakdownGroup = z$1.infer<typeof UsageBreakdownGroupSchema>;
|
|
4897
|
+
declare const UsageBreakdownResponseSchema: z$1.ZodObject<{
|
|
4898
|
+
entityType: z$1.ZodString;
|
|
4899
|
+
unit: z$1.ZodString;
|
|
4900
|
+
totalQuantity: z$1.ZodString;
|
|
4901
|
+
eventCount: z$1.ZodNumber;
|
|
4902
|
+
groups: z$1.ZodArray<z$1.ZodObject<{
|
|
4903
|
+
key: z$1.ZodString;
|
|
4904
|
+
totalQuantity: z$1.ZodString;
|
|
4905
|
+
eventCount: z$1.ZodNumber;
|
|
4906
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
4907
|
+
key: string;
|
|
4908
|
+
totalQuantity: string;
|
|
4909
|
+
eventCount: number;
|
|
4910
|
+
}, {
|
|
4911
|
+
key: string;
|
|
4912
|
+
totalQuantity: string;
|
|
4913
|
+
eventCount: number;
|
|
4914
|
+
}>, "many">;
|
|
4915
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
4916
|
+
unit: string;
|
|
4917
|
+
totalQuantity: string;
|
|
4918
|
+
eventCount: number;
|
|
4919
|
+
entityType: string;
|
|
4920
|
+
groups: {
|
|
4921
|
+
key: string;
|
|
4922
|
+
totalQuantity: string;
|
|
4923
|
+
eventCount: number;
|
|
4924
|
+
}[];
|
|
4925
|
+
}, {
|
|
4926
|
+
unit: string;
|
|
4927
|
+
totalQuantity: string;
|
|
4928
|
+
eventCount: number;
|
|
4929
|
+
entityType: string;
|
|
4930
|
+
groups: {
|
|
4931
|
+
key: string;
|
|
4932
|
+
totalQuantity: string;
|
|
4933
|
+
eventCount: number;
|
|
4934
|
+
}[];
|
|
4935
|
+
}>;
|
|
4936
|
+
type UsageBreakdownResponse = z$1.infer<typeof UsageBreakdownResponseSchema>;
|
|
4937
|
+
//#endregion
|
|
4938
|
+
//#region src/models/Usage.d.ts
|
|
4939
|
+
/**
|
|
4940
|
+
* `composio.experimental.usage` — metering for the project the API key
|
|
4941
|
+
* belongs to. **Experimental — shape may change in future releases.**
|
|
4942
|
+
*
|
|
4943
|
+
* @example
|
|
4944
|
+
* ```typescript
|
|
4945
|
+
* const summary = await composio.experimental.usage.summary();
|
|
4946
|
+
* console.log(summary.entities.tool_calls?.totalQuantity);
|
|
4947
|
+
*
|
|
4948
|
+
* const byTool = await composio.experimental.usage.breakdown('tool_calls', {
|
|
4949
|
+
* groupBy: 'tool_slug',
|
|
4950
|
+
* limit: 10,
|
|
4951
|
+
* });
|
|
4952
|
+
* ```
|
|
4953
|
+
*/
|
|
4954
|
+
declare class Usage {
|
|
4244
4955
|
private client;
|
|
4245
4956
|
constructor(client: ComposioClient);
|
|
4246
4957
|
/**
|
|
4247
|
-
*
|
|
4248
|
-
* Update the per-user ACL on a SHARED connected account.
|
|
4958
|
+
* Usage totals per metering entity type for a time range.
|
|
4249
4959
|
* **Experimental — shape may change in future releases.**
|
|
4250
4960
|
*
|
|
4251
|
-
*
|
|
4252
|
-
*
|
|
4253
|
-
*
|
|
4254
|
-
*
|
|
4255
|
-
* PATCH semantics: omit a field to leave it unchanged; pass an empty
|
|
4256
|
-
* array to clear an allow/deny list. At least one field must be
|
|
4257
|
-
* provided.
|
|
4258
|
-
*
|
|
4259
|
-
* Resolution rule (deny wins):
|
|
4260
|
-
* 1. requesting `userId` in `notAllowedUserIds` → DENY
|
|
4261
|
-
* 2. `allowAllUsers === true` → ALLOW
|
|
4262
|
-
* 3. requesting `userId` in `allowedUserIds` → ALLOW
|
|
4263
|
-
* 4. otherwise → DENY
|
|
4961
|
+
* @param {UsageSummaryParams} [params] - Optional range, `entityTypes` and filters
|
|
4962
|
+
* @returns {Promise<UsageSummaryResponse>} Totals keyed by entity type
|
|
4963
|
+
* @throws {ValidationError} If the params fail validation
|
|
4264
4964
|
*
|
|
4265
4965
|
* @example
|
|
4266
4966
|
* ```typescript
|
|
4267
|
-
*
|
|
4268
|
-
*
|
|
4269
|
-
*
|
|
4967
|
+
* const summary = await composio.experimental.usage.summary({
|
|
4968
|
+
* from: Date.now() - 7 * 24 * 60 * 60 * 1000,
|
|
4969
|
+
* filters: { userId: ['user_123'] },
|
|
4970
|
+
* });
|
|
4971
|
+
* ```
|
|
4972
|
+
*/
|
|
4973
|
+
summary(params?: UsageSummaryParams, requestOptions?: ComposioRequestOptions): Promise<UsageSummaryResponse>;
|
|
4974
|
+
/**
|
|
4975
|
+
* Usage for one metering entity type, grouped by a dimension.
|
|
4976
|
+
* **Experimental — shape may change in future releases.**
|
|
4270
4977
|
*
|
|
4271
|
-
*
|
|
4272
|
-
*
|
|
4978
|
+
* @param {string} entityType - Entity type to break down (e.g. `tool_calls`, `sessions`)
|
|
4979
|
+
* @param {UsageBreakdownParams} [params] - Optional range, `groupBy`, ordering, `limit` and filters
|
|
4980
|
+
* @returns {Promise<UsageBreakdownResponse>} Totals plus per-group rows
|
|
4981
|
+
* @throws {ValidationError} If the params fail validation
|
|
4273
4982
|
*
|
|
4274
|
-
*
|
|
4275
|
-
*
|
|
4276
|
-
*
|
|
4983
|
+
* @example
|
|
4984
|
+
* ```typescript
|
|
4985
|
+
* const byUser = await composio.experimental.usage.breakdown('sessions', {
|
|
4986
|
+
* groupBy: 'user_id',
|
|
4987
|
+
* orderBy: 'event_count',
|
|
4988
|
+
* });
|
|
4989
|
+
* ```
|
|
4990
|
+
*/
|
|
4991
|
+
breakdown(entityType: string, params?: UsageBreakdownParams, requestOptions?: ComposioRequestOptions): Promise<UsageBreakdownResponse>;
|
|
4992
|
+
}
|
|
4993
|
+
//#endregion
|
|
4994
|
+
//#region src/types/customToolkits.types.d.ts
|
|
4995
|
+
/**
|
|
4996
|
+
* How end users authenticate to a custom toolkit.
|
|
4997
|
+
* **Experimental — custom toolkits are in pilot; shape may change.**
|
|
4998
|
+
*/
|
|
4999
|
+
declare const CustomToolkitAuthSchemeSchema: z$1.ZodDiscriminatedUnion<"mode", [z$1.ZodObject<{
|
|
5000
|
+
mode: z$1.ZodLiteral<"NO_AUTH">;
|
|
5001
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
5002
|
+
mode: "NO_AUTH";
|
|
5003
|
+
}, {
|
|
5004
|
+
mode: "NO_AUTH";
|
|
5005
|
+
}>, z$1.ZodObject<{
|
|
5006
|
+
mode: z$1.ZodLiteral<"API_KEY">;
|
|
5007
|
+
/**
|
|
5008
|
+
* Headers sent with each request. Write `{{generic_api_key}}` where the
|
|
5009
|
+
* end user's API key goes, for example
|
|
5010
|
+
* `{ Authorization: 'Bearer {{generic_api_key}}' }`.
|
|
5011
|
+
*/
|
|
5012
|
+
headers: z$1.ZodRecord<z$1.ZodString, z$1.ZodString>;
|
|
5013
|
+
/** End-user copy for the API key input on the connect page. */
|
|
5014
|
+
apiKeyField: z$1.ZodOptional<z$1.ZodObject<{
|
|
5015
|
+
displayName: z$1.ZodOptional<z$1.ZodString>;
|
|
5016
|
+
description: z$1.ZodOptional<z$1.ZodString>;
|
|
5017
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
5018
|
+
description?: string | undefined;
|
|
5019
|
+
displayName?: string | undefined;
|
|
5020
|
+
}, {
|
|
5021
|
+
description?: string | undefined;
|
|
5022
|
+
displayName?: string | undefined;
|
|
5023
|
+
}>>;
|
|
5024
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
5025
|
+
mode: "API_KEY";
|
|
5026
|
+
headers: Record<string, string>;
|
|
5027
|
+
apiKeyField?: {
|
|
5028
|
+
description?: string | undefined;
|
|
5029
|
+
displayName?: string | undefined;
|
|
5030
|
+
} | undefined;
|
|
5031
|
+
}, {
|
|
5032
|
+
mode: "API_KEY";
|
|
5033
|
+
headers: Record<string, string>;
|
|
5034
|
+
apiKeyField?: {
|
|
5035
|
+
description?: string | undefined;
|
|
5036
|
+
displayName?: string | undefined;
|
|
5037
|
+
} | undefined;
|
|
5038
|
+
}>, z$1.ZodObject<{
|
|
5039
|
+
mode: z$1.ZodLiteral<"DCR_OAUTH">;
|
|
5040
|
+
/**
|
|
5041
|
+
* Where to fetch the full auth scheme, usually the
|
|
5042
|
+
* `/.well-known/oauth-authorization-server` path of your MCP URL.
|
|
5043
|
+
*/
|
|
5044
|
+
discoveryUrl: z$1.ZodString;
|
|
5045
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
5046
|
+
mode: "DCR_OAUTH";
|
|
5047
|
+
discoveryUrl: string;
|
|
5048
|
+
}, {
|
|
5049
|
+
mode: "DCR_OAUTH";
|
|
5050
|
+
discoveryUrl: string;
|
|
5051
|
+
}>]>;
|
|
5052
|
+
type CustomToolkitAuthScheme = z$1.infer<typeof CustomToolkitAuthSchemeSchema>;
|
|
5053
|
+
/**
|
|
5054
|
+
* Params for `composio.experimental.customToolkits.upsert()`.
|
|
5055
|
+
* **Experimental — custom toolkits are in pilot; shape may change.**
|
|
5056
|
+
*/
|
|
5057
|
+
declare const CustomToolkitUpsertParamsSchema: z$1.ZodObject<{
|
|
5058
|
+
/**
|
|
5059
|
+
* Letters, digits, underscores or spaces, up to 30 characters. The API
|
|
5060
|
+
* prefixes it with `CUSTOM_` and turns spaces into underscores.
|
|
5061
|
+
*/
|
|
5062
|
+
slug: z$1.ZodString;
|
|
5063
|
+
toolkitConfig: z$1.ZodObject<{
|
|
5064
|
+
/** Human-readable toolkit name. */
|
|
5065
|
+
name: z$1.ZodString;
|
|
5066
|
+
/** The app URL. For an MCP app, the MCP server URL. */
|
|
5067
|
+
appUrl: z$1.ZodString;
|
|
5068
|
+
/** Square PNG or JPEG logo (256-1024px, max 3MB), base64-encoded. Defaults to the Composio logo. */
|
|
5069
|
+
logoFile: z$1.ZodOptional<z$1.ZodObject<{
|
|
5070
|
+
content: z$1.ZodString;
|
|
5071
|
+
mimeType: z$1.ZodEnum<["image/png", "image/jpeg"]>;
|
|
5072
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
5073
|
+
content: string;
|
|
5074
|
+
mimeType: "image/png" | "image/jpeg";
|
|
5075
|
+
}, {
|
|
5076
|
+
content: string;
|
|
5077
|
+
mimeType: "image/png" | "image/jpeg";
|
|
5078
|
+
}>>;
|
|
5079
|
+
/** At least one scheme. The schemes cannot change once the toolkit exists. */
|
|
5080
|
+
authSchemes: z$1.ZodArray<z$1.ZodDiscriminatedUnion<"mode", [z$1.ZodObject<{
|
|
5081
|
+
mode: z$1.ZodLiteral<"NO_AUTH">;
|
|
5082
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
5083
|
+
mode: "NO_AUTH";
|
|
5084
|
+
}, {
|
|
5085
|
+
mode: "NO_AUTH";
|
|
5086
|
+
}>, z$1.ZodObject<{
|
|
5087
|
+
mode: z$1.ZodLiteral<"API_KEY">;
|
|
5088
|
+
/**
|
|
5089
|
+
* Headers sent with each request. Write `{{generic_api_key}}` where the
|
|
5090
|
+
* end user's API key goes, for example
|
|
5091
|
+
* `{ Authorization: 'Bearer {{generic_api_key}}' }`.
|
|
5092
|
+
*/
|
|
5093
|
+
headers: z$1.ZodRecord<z$1.ZodString, z$1.ZodString>;
|
|
5094
|
+
/** End-user copy for the API key input on the connect page. */
|
|
5095
|
+
apiKeyField: z$1.ZodOptional<z$1.ZodObject<{
|
|
5096
|
+
displayName: z$1.ZodOptional<z$1.ZodString>;
|
|
5097
|
+
description: z$1.ZodOptional<z$1.ZodString>;
|
|
5098
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
5099
|
+
description?: string | undefined;
|
|
5100
|
+
displayName?: string | undefined;
|
|
5101
|
+
}, {
|
|
5102
|
+
description?: string | undefined;
|
|
5103
|
+
displayName?: string | undefined;
|
|
5104
|
+
}>>;
|
|
5105
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
5106
|
+
mode: "API_KEY";
|
|
5107
|
+
headers: Record<string, string>;
|
|
5108
|
+
apiKeyField?: {
|
|
5109
|
+
description?: string | undefined;
|
|
5110
|
+
displayName?: string | undefined;
|
|
5111
|
+
} | undefined;
|
|
5112
|
+
}, {
|
|
5113
|
+
mode: "API_KEY";
|
|
5114
|
+
headers: Record<string, string>;
|
|
5115
|
+
apiKeyField?: {
|
|
5116
|
+
description?: string | undefined;
|
|
5117
|
+
displayName?: string | undefined;
|
|
5118
|
+
} | undefined;
|
|
5119
|
+
}>, z$1.ZodObject<{
|
|
5120
|
+
mode: z$1.ZodLiteral<"DCR_OAUTH">;
|
|
5121
|
+
/**
|
|
5122
|
+
* Where to fetch the full auth scheme, usually the
|
|
5123
|
+
* `/.well-known/oauth-authorization-server` path of your MCP URL.
|
|
5124
|
+
*/
|
|
5125
|
+
discoveryUrl: z$1.ZodString;
|
|
5126
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
5127
|
+
mode: "DCR_OAUTH";
|
|
5128
|
+
discoveryUrl: string;
|
|
5129
|
+
}, {
|
|
5130
|
+
mode: "DCR_OAUTH";
|
|
5131
|
+
discoveryUrl: string;
|
|
5132
|
+
}>]>, "many">;
|
|
5133
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
5134
|
+
name: string;
|
|
5135
|
+
appUrl: string;
|
|
5136
|
+
authSchemes: ({
|
|
5137
|
+
mode: "NO_AUTH";
|
|
5138
|
+
} | {
|
|
5139
|
+
mode: "API_KEY";
|
|
5140
|
+
headers: Record<string, string>;
|
|
5141
|
+
apiKeyField?: {
|
|
5142
|
+
description?: string | undefined;
|
|
5143
|
+
displayName?: string | undefined;
|
|
5144
|
+
} | undefined;
|
|
5145
|
+
} | {
|
|
5146
|
+
mode: "DCR_OAUTH";
|
|
5147
|
+
discoveryUrl: string;
|
|
5148
|
+
})[];
|
|
5149
|
+
logoFile?: {
|
|
5150
|
+
content: string;
|
|
5151
|
+
mimeType: "image/png" | "image/jpeg";
|
|
5152
|
+
} | undefined;
|
|
5153
|
+
}, {
|
|
5154
|
+
name: string;
|
|
5155
|
+
appUrl: string;
|
|
5156
|
+
authSchemes: ({
|
|
5157
|
+
mode: "NO_AUTH";
|
|
5158
|
+
} | {
|
|
5159
|
+
mode: "API_KEY";
|
|
5160
|
+
headers: Record<string, string>;
|
|
5161
|
+
apiKeyField?: {
|
|
5162
|
+
description?: string | undefined;
|
|
5163
|
+
displayName?: string | undefined;
|
|
5164
|
+
} | undefined;
|
|
5165
|
+
} | {
|
|
5166
|
+
mode: "DCR_OAUTH";
|
|
5167
|
+
discoveryUrl: string;
|
|
5168
|
+
})[];
|
|
5169
|
+
logoFile?: {
|
|
5170
|
+
content: string;
|
|
5171
|
+
mimeType: "image/png" | "image/jpeg";
|
|
5172
|
+
} | undefined;
|
|
5173
|
+
}>;
|
|
5174
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
5175
|
+
slug: string;
|
|
5176
|
+
toolkitConfig: {
|
|
5177
|
+
name: string;
|
|
5178
|
+
appUrl: string;
|
|
5179
|
+
authSchemes: ({
|
|
5180
|
+
mode: "NO_AUTH";
|
|
5181
|
+
} | {
|
|
5182
|
+
mode: "API_KEY";
|
|
5183
|
+
headers: Record<string, string>;
|
|
5184
|
+
apiKeyField?: {
|
|
5185
|
+
description?: string | undefined;
|
|
5186
|
+
displayName?: string | undefined;
|
|
5187
|
+
} | undefined;
|
|
5188
|
+
} | {
|
|
5189
|
+
mode: "DCR_OAUTH";
|
|
5190
|
+
discoveryUrl: string;
|
|
5191
|
+
})[];
|
|
5192
|
+
logoFile?: {
|
|
5193
|
+
content: string;
|
|
5194
|
+
mimeType: "image/png" | "image/jpeg";
|
|
5195
|
+
} | undefined;
|
|
5196
|
+
};
|
|
5197
|
+
}, {
|
|
5198
|
+
slug: string;
|
|
5199
|
+
toolkitConfig: {
|
|
5200
|
+
name: string;
|
|
5201
|
+
appUrl: string;
|
|
5202
|
+
authSchemes: ({
|
|
5203
|
+
mode: "NO_AUTH";
|
|
5204
|
+
} | {
|
|
5205
|
+
mode: "API_KEY";
|
|
5206
|
+
headers: Record<string, string>;
|
|
5207
|
+
apiKeyField?: {
|
|
5208
|
+
description?: string | undefined;
|
|
5209
|
+
displayName?: string | undefined;
|
|
5210
|
+
} | undefined;
|
|
5211
|
+
} | {
|
|
5212
|
+
mode: "DCR_OAUTH";
|
|
5213
|
+
discoveryUrl: string;
|
|
5214
|
+
})[];
|
|
5215
|
+
logoFile?: {
|
|
5216
|
+
content: string;
|
|
5217
|
+
mimeType: "image/png" | "image/jpeg";
|
|
5218
|
+
} | undefined;
|
|
5219
|
+
};
|
|
5220
|
+
}>;
|
|
5221
|
+
type CustomToolkitUpsertParams = z$1.infer<typeof CustomToolkitUpsertParamsSchema>;
|
|
5222
|
+
declare const CustomToolkitUpsertResponseSchema: z$1.ZodObject<{
|
|
5223
|
+
/** Slug of the created or updated toolkit. */
|
|
5224
|
+
slug: z$1.ZodString;
|
|
5225
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
5226
|
+
slug: string;
|
|
5227
|
+
}, {
|
|
5228
|
+
slug: string;
|
|
5229
|
+
}>;
|
|
5230
|
+
type CustomToolkitUpsertResponse = z$1.infer<typeof CustomToolkitUpsertResponseSchema>;
|
|
5231
|
+
/**
|
|
5232
|
+
* Params for `composio.experimental.customToolkits.sync()`.
|
|
5233
|
+
* **Experimental — custom toolkits are in pilot; shape may change.**
|
|
5234
|
+
*/
|
|
5235
|
+
declare const CustomToolkitSyncParamsSchema: z$1.ZodObject<{
|
|
5236
|
+
/** Connected account to use when fetching the remote tool definitions. */
|
|
5237
|
+
connectedAccountId: z$1.ZodOptional<z$1.ZodString>;
|
|
5238
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
5239
|
+
connectedAccountId?: string | undefined;
|
|
5240
|
+
}, {
|
|
5241
|
+
connectedAccountId?: string | undefined;
|
|
5242
|
+
}>;
|
|
5243
|
+
type CustomToolkitSyncParams = z$1.infer<typeof CustomToolkitSyncParamsSchema>;
|
|
5244
|
+
declare const CustomToolkitSyncResponseSchema: z$1.ZodObject<{
|
|
5245
|
+
slug: z$1.ZodString;
|
|
5246
|
+
/** Toolkit version after the sync. */
|
|
5247
|
+
version: z$1.ZodString;
|
|
5248
|
+
/** Number of tools synced. */
|
|
5249
|
+
syncedCount: z$1.ZodNumber;
|
|
5250
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
5251
|
+
slug: string;
|
|
5252
|
+
version: string;
|
|
5253
|
+
syncedCount: number;
|
|
5254
|
+
}, {
|
|
5255
|
+
slug: string;
|
|
5256
|
+
version: string;
|
|
5257
|
+
syncedCount: number;
|
|
5258
|
+
}>;
|
|
5259
|
+
type CustomToolkitSyncResponse = z$1.infer<typeof CustomToolkitSyncResponseSchema>;
|
|
5260
|
+
declare const CustomToolkitDeleteResponseSchema: z$1.ZodObject<{
|
|
5261
|
+
/** Slug of the deleted toolkit. */
|
|
5262
|
+
slug: z$1.ZodString;
|
|
5263
|
+
deleted: z$1.ZodBoolean;
|
|
5264
|
+
/** Background jobs revoking the credentials of the toolkit's connected accounts. */
|
|
5265
|
+
revokeJobIds: z$1.ZodArray<z$1.ZodString, "many">;
|
|
5266
|
+
authConfigsDeleted: z$1.ZodNumber;
|
|
5267
|
+
connectedAccountsDeleted: z$1.ZodNumber;
|
|
5268
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
5269
|
+
slug: string;
|
|
5270
|
+
deleted: boolean;
|
|
5271
|
+
revokeJobIds: string[];
|
|
5272
|
+
authConfigsDeleted: number;
|
|
5273
|
+
connectedAccountsDeleted: number;
|
|
5274
|
+
}, {
|
|
5275
|
+
slug: string;
|
|
5276
|
+
deleted: boolean;
|
|
5277
|
+
revokeJobIds: string[];
|
|
5278
|
+
authConfigsDeleted: number;
|
|
5279
|
+
connectedAccountsDeleted: number;
|
|
5280
|
+
}>;
|
|
5281
|
+
type CustomToolkitDeleteResponse = z$1.infer<typeof CustomToolkitDeleteResponseSchema>;
|
|
5282
|
+
//#endregion
|
|
5283
|
+
//#region src/models/CustomToolkits.d.ts
|
|
5284
|
+
/**
|
|
5285
|
+
* `composio.experimental.customToolkits` — toolkits your project registers
|
|
5286
|
+
* from its own app or MCP server, with their own auth configs and connected
|
|
5287
|
+
* accounts. **Experimental — custom toolkits are in pilot; shape may change.**
|
|
5288
|
+
*
|
|
5289
|
+
* These live on the Composio platform. They are unrelated to the in-process
|
|
5290
|
+
* toolkits built with `experimental_createToolkit()`, which run inside your
|
|
5291
|
+
* application.
|
|
5292
|
+
*
|
|
5293
|
+
* @example
|
|
5294
|
+
* ```typescript
|
|
5295
|
+
* const { slug } = await composio.experimental.customToolkits.upsert({
|
|
5296
|
+
* slug: 'MY_TOOLKIT',
|
|
5297
|
+
* toolkitConfig: {
|
|
5298
|
+
* name: 'My Toolkit',
|
|
5299
|
+
* appUrl: 'https://mcp.example.com/mcp',
|
|
5300
|
+
* authSchemes: [{ mode: 'DCR_OAUTH', discoveryUrl: 'https://mcp.example.com/.well-known/oauth-authorization-server' }],
|
|
5301
|
+
* },
|
|
5302
|
+
* });
|
|
5303
|
+
* await composio.experimental.customToolkits.sync(slug);
|
|
5304
|
+
* ```
|
|
5305
|
+
*/
|
|
5306
|
+
declare class CustomToolkits {
|
|
5307
|
+
private client;
|
|
5308
|
+
constructor(client: ComposioClient);
|
|
5309
|
+
/**
|
|
5310
|
+
* Creates a custom toolkit, or updates its display metadata (name, API key
|
|
5311
|
+
* field copy) when the project already owns a toolkit with this slug.
|
|
5312
|
+
* **Experimental — custom toolkits are in pilot; shape may change.**
|
|
5313
|
+
*
|
|
5314
|
+
* `appUrl` and `authSchemes` cannot change on an existing toolkit:
|
|
5315
|
+
* re-sending them unchanged is a no-op, and changing them fails with a 409.
|
|
5316
|
+
* Delete and re-register the toolkit instead, which revokes its connections.
|
|
5317
|
+
*
|
|
5318
|
+
* @param {CustomToolkitUpsertParams} params - The slug and toolkit configuration
|
|
5319
|
+
* @returns {Promise<CustomToolkitUpsertResponse>} The toolkit's slug
|
|
5320
|
+
* @throws {ValidationError} If the params fail validation
|
|
5321
|
+
*
|
|
5322
|
+
* @example
|
|
5323
|
+
* ```typescript
|
|
5324
|
+
* await composio.experimental.customToolkits.upsert({
|
|
5325
|
+
* slug: 'INTERNAL_API',
|
|
5326
|
+
* toolkitConfig: {
|
|
5327
|
+
* name: 'Internal API',
|
|
5328
|
+
* appUrl: 'https://mcp.internal.example.com/mcp',
|
|
5329
|
+
* authSchemes: [
|
|
5330
|
+
* { mode: 'API_KEY', headers: { Authorization: 'Bearer {{generic_api_key}}' } },
|
|
5331
|
+
* ],
|
|
5332
|
+
* },
|
|
5333
|
+
* });
|
|
5334
|
+
* ```
|
|
5335
|
+
*/
|
|
5336
|
+
upsert(params: CustomToolkitUpsertParams, requestOptions?: ComposioRequestOptions): Promise<CustomToolkitUpsertResponse>;
|
|
5337
|
+
/**
|
|
5338
|
+
* Re-fetches the tool definitions of a custom toolkit from its remote MCP
|
|
5339
|
+
* server. Call it when automatic sync fails or the remote tools change.
|
|
5340
|
+
* **Experimental — custom toolkits are in pilot; shape may change.**
|
|
5341
|
+
*
|
|
5342
|
+
* @param {string} slug - The custom toolkit slug (`CUSTOM_...`)
|
|
5343
|
+
* @param {CustomToolkitSyncParams} [params] - Optional connected account to fetch the definitions with
|
|
5344
|
+
* @returns {Promise<CustomToolkitSyncResponse>} The toolkit version and number of tools synced
|
|
5345
|
+
* @throws {ValidationError} If the params fail validation
|
|
5346
|
+
*
|
|
5347
|
+
* @example
|
|
5348
|
+
* ```typescript
|
|
5349
|
+
* const { version, syncedCount } = await composio.experimental.customToolkits.sync(
|
|
5350
|
+
* 'CUSTOM_MY_TOOLKIT',
|
|
5351
|
+
* { connectedAccountId: 'ca_abc123' }
|
|
5352
|
+
* );
|
|
5353
|
+
* ```
|
|
5354
|
+
*/
|
|
5355
|
+
sync(slug: string, params?: CustomToolkitSyncParams, requestOptions?: ComposioRequestOptions): Promise<CustomToolkitSyncResponse>;
|
|
5356
|
+
/**
|
|
5357
|
+
* Deletes a custom toolkit owned by the project, with its tools, auth
|
|
5358
|
+
* configs and connected accounts. The credentials behind those connected
|
|
5359
|
+
* accounts are revoked in background jobs (`revokeJobIds`).
|
|
5360
|
+
* **Experimental — custom toolkits are in pilot; shape may change.**
|
|
5361
|
+
*
|
|
5362
|
+
* Composio-managed toolkits cannot be deleted; the API answers 403.
|
|
5363
|
+
*
|
|
5364
|
+
* @param {string} slug - The custom toolkit slug (`CUSTOM_...`)
|
|
5365
|
+
* @returns {Promise<CustomToolkitDeleteResponse>} What was deleted
|
|
5366
|
+
*
|
|
5367
|
+
* @example
|
|
5368
|
+
* ```typescript
|
|
5369
|
+
* const result = await composio.experimental.customToolkits.delete('CUSTOM_MY_TOOLKIT');
|
|
5370
|
+
* console.log(result.connectedAccountsDeleted);
|
|
5371
|
+
* ```
|
|
5372
|
+
*/
|
|
5373
|
+
delete(slug: string, requestOptions?: ComposioRequestOptions): Promise<CustomToolkitDeleteResponse>;
|
|
5374
|
+
}
|
|
5375
|
+
//#endregion
|
|
5376
|
+
//#region src/models/Experimental.d.ts
|
|
5377
|
+
declare class Experimental {
|
|
5378
|
+
private client;
|
|
5379
|
+
/**
|
|
5380
|
+
* Project-scoped usage metering (`summary()` / `breakdown()`).
|
|
5381
|
+
* **Experimental — shape may change in future releases.**
|
|
5382
|
+
*
|
|
5383
|
+
* @example
|
|
5384
|
+
* ```typescript
|
|
5385
|
+
* const summary = await composio.experimental.usage.summary();
|
|
5386
|
+
* const byTool = await composio.experimental.usage.breakdown('tool_calls');
|
|
5387
|
+
* ```
|
|
5388
|
+
*/
|
|
5389
|
+
usage: Usage;
|
|
5390
|
+
/**
|
|
5391
|
+
* Register and manage project-owned custom toolkits (`upsert()` / `sync()` / `delete()`).
|
|
5392
|
+
* **Experimental — custom toolkits are in pilot; shape may change.**
|
|
5393
|
+
*
|
|
5394
|
+
* @example
|
|
5395
|
+
* ```typescript
|
|
5396
|
+
* await composio.experimental.customToolkits.sync('CUSTOM_MY_TOOLKIT');
|
|
5397
|
+
* ```
|
|
5398
|
+
*/
|
|
5399
|
+
customToolkits: CustomToolkits;
|
|
5400
|
+
constructor(client: ComposioClient);
|
|
5401
|
+
/**
|
|
5402
|
+
* Compatibility alias for `composio.connectedAccounts.updateAcl(...)`.
|
|
5403
|
+
* Update the per-user ACL on a SHARED connected account.
|
|
5404
|
+
* **Experimental — shape may change in future releases.**
|
|
5405
|
+
*
|
|
5406
|
+
* Only meaningful for SHARED connections — calling this on a PRIVATE
|
|
5407
|
+
* connection raises `ComposioAclOnlyForSharedError` (400). ACL writes
|
|
5408
|
+
* require the connection's creator or an API key.
|
|
5409
|
+
*
|
|
5410
|
+
* PATCH semantics: omit a field to leave it unchanged; pass an empty
|
|
5411
|
+
* array to clear an allow/deny list. At least one field must be
|
|
5412
|
+
* provided.
|
|
5413
|
+
*
|
|
5414
|
+
* Resolution rule (deny wins):
|
|
5415
|
+
* 1. requesting `userId` in `notAllowedUserIds` → DENY
|
|
5416
|
+
* 2. `allowAllUsers === true` → ALLOW
|
|
5417
|
+
* 3. requesting `userId` in `allowedUserIds` → ALLOW
|
|
5418
|
+
* 4. otherwise → DENY
|
|
5419
|
+
*
|
|
5420
|
+
* @example
|
|
5421
|
+
* ```typescript
|
|
5422
|
+
* import { Composio } from '@composio/core';
|
|
5423
|
+
*
|
|
5424
|
+
* const composio = new Composio({ apiKey: '...' });
|
|
5425
|
+
*
|
|
5426
|
+
* // Allow every userId to use this connection
|
|
5427
|
+
* await composio.connectedAccounts.updateAcl('ca_abc', { allowAllUsers: true });
|
|
5428
|
+
*
|
|
5429
|
+
* // Everyone except a specific user
|
|
5430
|
+
* await composio.connectedAccounts.updateAcl('ca_abc', {
|
|
5431
|
+
* allowAllUsers: true,
|
|
4277
5432
|
* notAllowedUserIds: ['user_bob'],
|
|
4278
5433
|
* });
|
|
4279
5434
|
*
|
|
@@ -4927,82 +6082,1212 @@ declare class MCP {
|
|
|
4927
6082
|
generate(userId: string, mcpConfigId: string, options?: MCPGetInstanceParams, requestOptions?: ComposioRequestOptions): Promise<MCPServerInstance>;
|
|
4928
6083
|
}
|
|
4929
6084
|
//#endregion
|
|
4930
|
-
//#region src/
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
|
|
4945
|
-
|
|
4946
|
-
|
|
4947
|
-
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
6085
|
+
//#region src/types/webhooks.types.d.ts
|
|
6086
|
+
/**
|
|
6087
|
+
* Webhook payload versions accepted by the webhook subscription endpoints.
|
|
6088
|
+
*/
|
|
6089
|
+
declare const WebhookVersionSchema: z$1.ZodEnum<["V1", "V2", "V3"]>;
|
|
6090
|
+
/**
|
|
6091
|
+
* A project webhook subscription in the SDK's camelCase shape. The signing
|
|
6092
|
+
* `secret` is returned by the API on every subscription read/write.
|
|
6093
|
+
*/
|
|
6094
|
+
declare const WebhookSubscriptionSchema: z$1.ZodObject<{
|
|
6095
|
+
id: z$1.ZodString;
|
|
6096
|
+
webhookUrl: z$1.ZodString;
|
|
6097
|
+
version: z$1.ZodEnum<["V1", "V2", "V3"]>;
|
|
6098
|
+
enabledEvents: z$1.ZodArray<z$1.ZodString, "many">;
|
|
6099
|
+
secret: z$1.ZodOptional<z$1.ZodString>;
|
|
6100
|
+
createdAt: z$1.ZodOptional<z$1.ZodString>;
|
|
6101
|
+
updatedAt: z$1.ZodOptional<z$1.ZodString>;
|
|
6102
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6103
|
+
version: "V1" | "V2" | "V3";
|
|
6104
|
+
id: string;
|
|
6105
|
+
webhookUrl: string;
|
|
6106
|
+
enabledEvents: string[];
|
|
6107
|
+
createdAt?: string | undefined;
|
|
6108
|
+
updatedAt?: string | undefined;
|
|
6109
|
+
secret?: string | undefined;
|
|
6110
|
+
}, {
|
|
6111
|
+
version: "V1" | "V2" | "V3";
|
|
6112
|
+
id: string;
|
|
6113
|
+
webhookUrl: string;
|
|
6114
|
+
enabledEvents: string[];
|
|
6115
|
+
createdAt?: string | undefined;
|
|
6116
|
+
updatedAt?: string | undefined;
|
|
6117
|
+
secret?: string | undefined;
|
|
6118
|
+
}>;
|
|
6119
|
+
declare const WebhookSubscriptionListParamsSchema: z$1.ZodObject<{
|
|
6120
|
+
/** Number of items per page, max allowed is 50. */
|
|
6121
|
+
limit: z$1.ZodOptional<z$1.ZodNumber>;
|
|
6122
|
+
/** Cursor for pagination, taken from a previous response's `nextCursor`. */
|
|
6123
|
+
cursor: z$1.ZodOptional<z$1.ZodString>;
|
|
6124
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6125
|
+
limit?: number | undefined;
|
|
6126
|
+
cursor?: string | undefined;
|
|
6127
|
+
}, {
|
|
6128
|
+
limit?: number | undefined;
|
|
6129
|
+
cursor?: string | undefined;
|
|
6130
|
+
}>;
|
|
6131
|
+
type WebhookSubscriptionListParams = z$1.infer<typeof WebhookSubscriptionListParamsSchema>;
|
|
6132
|
+
declare const WebhookSubscriptionListResponseSchema: z$1.ZodObject<{
|
|
6133
|
+
items: z$1.ZodArray<z$1.ZodObject<{
|
|
6134
|
+
id: z$1.ZodString;
|
|
6135
|
+
webhookUrl: z$1.ZodString;
|
|
6136
|
+
version: z$1.ZodEnum<["V1", "V2", "V3"]>;
|
|
6137
|
+
enabledEvents: z$1.ZodArray<z$1.ZodString, "many">;
|
|
6138
|
+
secret: z$1.ZodOptional<z$1.ZodString>;
|
|
6139
|
+
createdAt: z$1.ZodOptional<z$1.ZodString>;
|
|
6140
|
+
updatedAt: z$1.ZodOptional<z$1.ZodString>;
|
|
6141
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6142
|
+
version: "V1" | "V2" | "V3";
|
|
6143
|
+
id: string;
|
|
6144
|
+
webhookUrl: string;
|
|
6145
|
+
enabledEvents: string[];
|
|
6146
|
+
createdAt?: string | undefined;
|
|
6147
|
+
updatedAt?: string | undefined;
|
|
6148
|
+
secret?: string | undefined;
|
|
6149
|
+
}, {
|
|
6150
|
+
version: "V1" | "V2" | "V3";
|
|
6151
|
+
id: string;
|
|
6152
|
+
webhookUrl: string;
|
|
6153
|
+
enabledEvents: string[];
|
|
6154
|
+
createdAt?: string | undefined;
|
|
6155
|
+
updatedAt?: string | undefined;
|
|
6156
|
+
secret?: string | undefined;
|
|
6157
|
+
}>, "many">;
|
|
6158
|
+
nextCursor: z$1.ZodNullable<z$1.ZodString>;
|
|
6159
|
+
totalPages: z$1.ZodNumber;
|
|
6160
|
+
currentPage: z$1.ZodNumber;
|
|
6161
|
+
totalItems: z$1.ZodNumber;
|
|
6162
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6163
|
+
items: {
|
|
6164
|
+
version: "V1" | "V2" | "V3";
|
|
6165
|
+
id: string;
|
|
6166
|
+
webhookUrl: string;
|
|
6167
|
+
enabledEvents: string[];
|
|
6168
|
+
createdAt?: string | undefined;
|
|
6169
|
+
updatedAt?: string | undefined;
|
|
6170
|
+
secret?: string | undefined;
|
|
6171
|
+
}[];
|
|
6172
|
+
nextCursor: string | null;
|
|
6173
|
+
totalPages: number;
|
|
6174
|
+
currentPage: number;
|
|
6175
|
+
totalItems: number;
|
|
6176
|
+
}, {
|
|
6177
|
+
items: {
|
|
6178
|
+
version: "V1" | "V2" | "V3";
|
|
6179
|
+
id: string;
|
|
6180
|
+
webhookUrl: string;
|
|
6181
|
+
enabledEvents: string[];
|
|
6182
|
+
createdAt?: string | undefined;
|
|
6183
|
+
updatedAt?: string | undefined;
|
|
6184
|
+
secret?: string | undefined;
|
|
6185
|
+
}[];
|
|
6186
|
+
nextCursor: string | null;
|
|
6187
|
+
totalPages: number;
|
|
6188
|
+
currentPage: number;
|
|
6189
|
+
totalItems: number;
|
|
6190
|
+
}>;
|
|
6191
|
+
type WebhookSubscriptionListResponse = z$1.infer<typeof WebhookSubscriptionListResponseSchema>;
|
|
6192
|
+
/**
|
|
6193
|
+
* Params for `composio.webhooks.subscriptions.set()`. Identical to the
|
|
6194
|
+
* params accepted by `composio.triggers.setWebhookSubscription()`.
|
|
6195
|
+
*/
|
|
6196
|
+
declare const WebhookSubscriptionSetParamsSchema: z$1.ZodObject<{
|
|
6197
|
+
webhookUrl: z$1.ZodString;
|
|
6198
|
+
enabledEvents: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString, "many">>;
|
|
6199
|
+
version: z$1.ZodOptional<z$1.ZodEnum<["V1", "V2", "V3"]>>;
|
|
6200
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6201
|
+
webhookUrl: string;
|
|
6202
|
+
version?: "V1" | "V2" | "V3" | undefined;
|
|
6203
|
+
enabledEvents?: string[] | undefined;
|
|
6204
|
+
}, {
|
|
6205
|
+
webhookUrl: string;
|
|
6206
|
+
version?: "V1" | "V2" | "V3" | undefined;
|
|
6207
|
+
enabledEvents?: string[] | undefined;
|
|
6208
|
+
}>;
|
|
6209
|
+
type WebhookSubscriptionSetParams = z$1.infer<typeof WebhookSubscriptionSetParamsSchema>;
|
|
6210
|
+
declare const WebhookSubscriptionUpdateParamsSchema: z$1.ZodObject<{
|
|
6211
|
+
/** HTTPS URL to receive webhook events. */
|
|
6212
|
+
webhookUrl: z$1.ZodOptional<z$1.ZodString>;
|
|
6213
|
+
/** Event types to subscribe to. */
|
|
6214
|
+
enabledEvents: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString, "many">>;
|
|
6215
|
+
/** Webhook payload version. */
|
|
6216
|
+
version: z$1.ZodOptional<z$1.ZodEnum<["V1", "V2", "V3"]>>;
|
|
6217
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6218
|
+
version?: "V1" | "V2" | "V3" | undefined;
|
|
6219
|
+
webhookUrl?: string | undefined;
|
|
6220
|
+
enabledEvents?: string[] | undefined;
|
|
6221
|
+
}, {
|
|
6222
|
+
version?: "V1" | "V2" | "V3" | undefined;
|
|
6223
|
+
webhookUrl?: string | undefined;
|
|
6224
|
+
enabledEvents?: string[] | undefined;
|
|
6225
|
+
}>;
|
|
6226
|
+
type WebhookSubscriptionUpdateParams = z$1.infer<typeof WebhookSubscriptionUpdateParamsSchema>;
|
|
6227
|
+
declare const WebhookSubscriptionDeleteResponseSchema: z$1.ZodObject<{
|
|
6228
|
+
success: z$1.ZodBoolean;
|
|
6229
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6230
|
+
success: boolean;
|
|
6231
|
+
}, {
|
|
6232
|
+
success: boolean;
|
|
6233
|
+
}>;
|
|
6234
|
+
type WebhookSubscriptionDeleteResponse = z$1.infer<typeof WebhookSubscriptionDeleteResponseSchema>;
|
|
6235
|
+
declare const WebhookSubscriptionRotateSecretResponseSchema: z$1.ZodObject<{
|
|
6236
|
+
id: z$1.ZodString;
|
|
6237
|
+
/** The new signing secret. Store it — the previous secret stops validating. */
|
|
6238
|
+
secret: z$1.ZodString;
|
|
6239
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6240
|
+
id: string;
|
|
6241
|
+
secret: string;
|
|
6242
|
+
}, {
|
|
6243
|
+
id: string;
|
|
6244
|
+
secret: string;
|
|
6245
|
+
}>;
|
|
6246
|
+
type WebhookSubscriptionRotateSecretResponse = z$1.infer<typeof WebhookSubscriptionRotateSecretResponseSchema>;
|
|
6247
|
+
declare const WebhookSubscriptionEventTypeSchema: z$1.ZodObject<{
|
|
6248
|
+
eventType: z$1.ZodString;
|
|
6249
|
+
description: z$1.ZodString;
|
|
6250
|
+
supportedVersions: z$1.ZodArray<z$1.ZodEnum<["V1", "V2", "V3"]>, "many">;
|
|
6251
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6252
|
+
description: string;
|
|
6253
|
+
eventType: string;
|
|
6254
|
+
supportedVersions: ("V1" | "V2" | "V3")[];
|
|
6255
|
+
}, {
|
|
6256
|
+
description: string;
|
|
6257
|
+
eventType: string;
|
|
6258
|
+
supportedVersions: ("V1" | "V2" | "V3")[];
|
|
6259
|
+
}>;
|
|
6260
|
+
type WebhookSubscriptionEventType = z$1.infer<typeof WebhookSubscriptionEventTypeSchema>;
|
|
6261
|
+
declare const WebhookSubscriptionEventTypesResponseSchema: z$1.ZodObject<{
|
|
6262
|
+
items: z$1.ZodArray<z$1.ZodObject<{
|
|
6263
|
+
eventType: z$1.ZodString;
|
|
6264
|
+
description: z$1.ZodString;
|
|
6265
|
+
supportedVersions: z$1.ZodArray<z$1.ZodEnum<["V1", "V2", "V3"]>, "many">;
|
|
6266
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6267
|
+
description: string;
|
|
6268
|
+
eventType: string;
|
|
6269
|
+
supportedVersions: ("V1" | "V2" | "V3")[];
|
|
6270
|
+
}, {
|
|
6271
|
+
description: string;
|
|
6272
|
+
eventType: string;
|
|
6273
|
+
supportedVersions: ("V1" | "V2" | "V3")[];
|
|
6274
|
+
}>, "many">;
|
|
6275
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6276
|
+
items: {
|
|
6277
|
+
description: string;
|
|
6278
|
+
eventType: string;
|
|
6279
|
+
supportedVersions: ("V1" | "V2" | "V3")[];
|
|
6280
|
+
}[];
|
|
6281
|
+
}, {
|
|
6282
|
+
items: {
|
|
6283
|
+
description: string;
|
|
6284
|
+
eventType: string;
|
|
6285
|
+
supportedVersions: ("V1" | "V2" | "V3")[];
|
|
6286
|
+
}[];
|
|
6287
|
+
}>;
|
|
6288
|
+
type WebhookSubscriptionEventTypesResponse = z$1.infer<typeof WebhookSubscriptionEventTypesResponseSchema>;
|
|
6289
|
+
declare const WebhookEndpointListParamsSchema: z$1.ZodObject<{
|
|
6290
|
+
/** Only return endpoints for this toolkit slug. */
|
|
6291
|
+
toolkitSlug: z$1.ZodOptional<z$1.ZodString>;
|
|
6292
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6293
|
+
toolkitSlug?: string | undefined;
|
|
6294
|
+
}, {
|
|
6295
|
+
toolkitSlug?: string | undefined;
|
|
6296
|
+
}>;
|
|
6297
|
+
type WebhookEndpointListParams = z$1.infer<typeof WebhookEndpointListParamsSchema>;
|
|
6298
|
+
declare const WebhookEndpointListItemSchema: z$1.ZodObject<{
|
|
6299
|
+
id: z$1.ZodString;
|
|
6300
|
+
toolkitSlug: z$1.ZodString;
|
|
6301
|
+
clientId: z$1.ZodNullable<z$1.ZodString>;
|
|
6302
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6303
|
+
toolkitSlug: string;
|
|
6304
|
+
id: string;
|
|
6305
|
+
clientId: string | null;
|
|
6306
|
+
}, {
|
|
6307
|
+
toolkitSlug: string;
|
|
6308
|
+
id: string;
|
|
6309
|
+
clientId: string | null;
|
|
6310
|
+
}>;
|
|
6311
|
+
type WebhookEndpointListItem = z$1.infer<typeof WebhookEndpointListItemSchema>;
|
|
6312
|
+
declare const WebhookEndpointListResponseSchema: z$1.ZodObject<{
|
|
6313
|
+
items: z$1.ZodArray<z$1.ZodObject<{
|
|
6314
|
+
id: z$1.ZodString;
|
|
6315
|
+
toolkitSlug: z$1.ZodString;
|
|
6316
|
+
clientId: z$1.ZodNullable<z$1.ZodString>;
|
|
6317
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6318
|
+
toolkitSlug: string;
|
|
6319
|
+
id: string;
|
|
6320
|
+
clientId: string | null;
|
|
6321
|
+
}, {
|
|
6322
|
+
toolkitSlug: string;
|
|
6323
|
+
id: string;
|
|
6324
|
+
clientId: string | null;
|
|
6325
|
+
}>, "many">;
|
|
6326
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6327
|
+
items: {
|
|
6328
|
+
toolkitSlug: string;
|
|
6329
|
+
id: string;
|
|
6330
|
+
clientId: string | null;
|
|
6331
|
+
}[];
|
|
6332
|
+
}, {
|
|
6333
|
+
items: {
|
|
6334
|
+
toolkitSlug: string;
|
|
6335
|
+
id: string;
|
|
6336
|
+
clientId: string | null;
|
|
6337
|
+
}[];
|
|
6338
|
+
}>;
|
|
6339
|
+
type WebhookEndpointListResponse = z$1.infer<typeof WebhookEndpointListResponseSchema>;
|
|
6340
|
+
declare const WebhookEndpointSchema: z$1.ZodObject<{
|
|
6341
|
+
id: z$1.ZodString;
|
|
6342
|
+
toolkitSlug: z$1.ZodString;
|
|
6343
|
+
clientId: z$1.ZodNullable<z$1.ZodString>;
|
|
6344
|
+
/** The inbound URL to register with the third-party provider. */
|
|
6345
|
+
webhookUrl: z$1.ZodString;
|
|
6346
|
+
/** Configured setup fields with secret values masked. */
|
|
6347
|
+
data: z$1.ZodNullable<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
|
|
6348
|
+
createdAt: z$1.ZodString;
|
|
6349
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6350
|
+
toolkitSlug: string;
|
|
6351
|
+
data: Record<string, string> | null;
|
|
6352
|
+
id: string;
|
|
6353
|
+
createdAt: string;
|
|
6354
|
+
webhookUrl: string;
|
|
6355
|
+
clientId: string | null;
|
|
6356
|
+
}, {
|
|
6357
|
+
toolkitSlug: string;
|
|
6358
|
+
data: Record<string, string> | null;
|
|
6359
|
+
id: string;
|
|
6360
|
+
createdAt: string;
|
|
6361
|
+
webhookUrl: string;
|
|
6362
|
+
clientId: string | null;
|
|
6363
|
+
}>;
|
|
6364
|
+
type WebhookEndpoint = z$1.infer<typeof WebhookEndpointSchema>;
|
|
6365
|
+
declare const WebhookEndpointCreateParamsSchema: z$1.ZodObject<{
|
|
6366
|
+
/** Toolkit identifier (e.g. `slack`, `discord`). */
|
|
6367
|
+
toolkitSlug: z$1.ZodString;
|
|
6368
|
+
/** OAuth app client ID — identifies which app this endpoint is for. */
|
|
6369
|
+
clientId: z$1.ZodString;
|
|
6370
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6371
|
+
toolkitSlug: string;
|
|
6372
|
+
clientId: string;
|
|
6373
|
+
}, {
|
|
6374
|
+
toolkitSlug: string;
|
|
6375
|
+
clientId: string;
|
|
6376
|
+
}>;
|
|
6377
|
+
type WebhookEndpointCreateParams = z$1.infer<typeof WebhookEndpointCreateParamsSchema>;
|
|
6378
|
+
declare const WebhookEndpointReplaceParamsSchema: z$1.ZodObject<{
|
|
6379
|
+
/** Key-value pairs for ALL required setup fields of the toolkit. */
|
|
6380
|
+
data: z$1.ZodRecord<z$1.ZodString, z$1.ZodString>;
|
|
6381
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6382
|
+
data: Record<string, string>;
|
|
6383
|
+
}, {
|
|
6384
|
+
data: Record<string, string>;
|
|
6385
|
+
}>;
|
|
6386
|
+
type WebhookEndpointReplaceParams = z$1.infer<typeof WebhookEndpointReplaceParamsSchema>;
|
|
6387
|
+
declare const WebhookEndpointUpdateParamsSchema: z$1.ZodObject<{
|
|
6388
|
+
/** Key-value pairs to merge into the setup fields. Omitted fields are preserved. */
|
|
6389
|
+
data: z$1.ZodRecord<z$1.ZodString, z$1.ZodString>;
|
|
6390
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6391
|
+
data: Record<string, string>;
|
|
6392
|
+
}, {
|
|
6393
|
+
data: Record<string, string>;
|
|
6394
|
+
}>;
|
|
6395
|
+
type WebhookEndpointUpdateParams = z$1.infer<typeof WebhookEndpointUpdateParamsSchema>;
|
|
6396
|
+
//#endregion
|
|
6397
|
+
//#region src/models/Webhooks.d.ts
|
|
6398
|
+
/**
|
|
6399
|
+
* `composio.webhooks.subscriptions` — the project's outbound webhook
|
|
6400
|
+
* subscription. The API allows one subscription per project; every response
|
|
6401
|
+
* includes the signing `secret` used to verify deliveries with
|
|
6402
|
+
* `composio.triggers.verifyWebhook()` / `composio.triggers.parse()`.
|
|
6403
|
+
*/
|
|
6404
|
+
declare class WebhookSubscriptions {
|
|
6405
|
+
private client;
|
|
6406
|
+
constructor(client: ComposioClient);
|
|
6407
|
+
/**
|
|
6408
|
+
* List the project's webhook subscriptions.
|
|
6409
|
+
*
|
|
6410
|
+
* @param {WebhookSubscriptionListParams} [query] - Pagination options
|
|
6411
|
+
* @returns {Promise<WebhookSubscriptionListResponse>} Paginated subscriptions
|
|
6412
|
+
*
|
|
6413
|
+
* @example
|
|
6414
|
+
* ```typescript
|
|
6415
|
+
* const { items } = await composio.webhooks.subscriptions.list();
|
|
6416
|
+
* console.log(items[0]?.webhookUrl);
|
|
6417
|
+
* ```
|
|
6418
|
+
*/
|
|
6419
|
+
list(query?: WebhookSubscriptionListParams, requestOptions?: ComposioRequestOptions): Promise<WebhookSubscriptionListResponse>;
|
|
6420
|
+
/**
|
|
6421
|
+
* Retrieve a webhook subscription by id.
|
|
6422
|
+
*
|
|
6423
|
+
* @param {string} id - The subscription id
|
|
6424
|
+
* @returns {Promise<WebhookSubscription>} The subscription, including its signing secret
|
|
6425
|
+
*
|
|
6426
|
+
* @example
|
|
6427
|
+
* ```typescript
|
|
6428
|
+
* const subscription = await composio.webhooks.subscriptions.get('whs_abc123');
|
|
6429
|
+
* console.log(subscription.enabledEvents);
|
|
6430
|
+
* ```
|
|
6431
|
+
*/
|
|
6432
|
+
get(id: string, requestOptions?: ComposioRequestOptions): Promise<WebhookSubscription>;
|
|
6433
|
+
/**
|
|
6434
|
+
* Create or update the project webhook subscription.
|
|
6435
|
+
*
|
|
6436
|
+
* If a subscription already exists it is updated in place, otherwise a new
|
|
6437
|
+
* one is created. By default this subscribes to V3 trigger message events.
|
|
6438
|
+
*
|
|
6439
|
+
* @param {WebhookSubscriptionSetParams} params - `webhookUrl`, optional `enabledEvents` and `version`
|
|
6440
|
+
* @returns {Promise<WebhookSubscription>} The resulting subscription
|
|
6441
|
+
* @throws {ValidationError} If the params fail validation
|
|
6442
|
+
*
|
|
6443
|
+
* @example
|
|
6444
|
+
* ```typescript
|
|
6445
|
+
* const subscription = await composio.webhooks.subscriptions.set({
|
|
6446
|
+
* webhookUrl: `${APP_URL}/webhooks/composio`,
|
|
6447
|
+
* enabledEvents: ['composio.trigger.message', 'composio.connected_account.expired'],
|
|
6448
|
+
* });
|
|
6449
|
+
* process.env.COMPOSIO_WEBHOOK_SECRET = subscription.secret;
|
|
6450
|
+
* ```
|
|
6451
|
+
*/
|
|
6452
|
+
set(params: WebhookSubscriptionSetParams, requestOptions?: ComposioRequestOptions): Promise<WebhookSubscription>;
|
|
6453
|
+
/**
|
|
6454
|
+
* Update an existing webhook subscription. Only the provided fields change.
|
|
6455
|
+
*
|
|
6456
|
+
* @param {string} id - The subscription id
|
|
6457
|
+
* @param {WebhookSubscriptionUpdateParams} params - Fields to update
|
|
6458
|
+
* @returns {Promise<WebhookSubscription>} The updated subscription
|
|
6459
|
+
* @throws {ValidationError} If the params fail validation
|
|
6460
|
+
*
|
|
6461
|
+
* @example
|
|
6462
|
+
* ```typescript
|
|
6463
|
+
* await composio.webhooks.subscriptions.update('whs_abc123', {
|
|
6464
|
+
* enabledEvents: ['composio.trigger.message'],
|
|
6465
|
+
* });
|
|
6466
|
+
* ```
|
|
6467
|
+
*/
|
|
6468
|
+
update(id: string, params: WebhookSubscriptionUpdateParams, requestOptions?: ComposioRequestOptions): Promise<WebhookSubscription>;
|
|
6469
|
+
/**
|
|
6470
|
+
* Delete a webhook subscription. Deliveries stop immediately.
|
|
6471
|
+
*
|
|
6472
|
+
* @param {string} id - The subscription id
|
|
6473
|
+
* @returns {Promise<WebhookSubscriptionDeleteResponse>} `{ success }`
|
|
6474
|
+
*
|
|
6475
|
+
* @example
|
|
6476
|
+
* ```typescript
|
|
6477
|
+
* await composio.webhooks.subscriptions.delete('whs_abc123');
|
|
6478
|
+
* ```
|
|
6479
|
+
*/
|
|
6480
|
+
delete(id: string, requestOptions?: ComposioRequestOptions): Promise<WebhookSubscriptionDeleteResponse>;
|
|
6481
|
+
/**
|
|
6482
|
+
* Rotate the signing secret of a webhook subscription. The previous secret
|
|
6483
|
+
* stops validating, so update your verifier with the returned `secret`.
|
|
6484
|
+
*
|
|
6485
|
+
* @param {string} id - The subscription id
|
|
6486
|
+
* @returns {Promise<WebhookSubscriptionRotateSecretResponse>} `{ id, secret }`
|
|
6487
|
+
*
|
|
6488
|
+
* @example
|
|
6489
|
+
* ```typescript
|
|
6490
|
+
* const { secret } = await composio.webhooks.subscriptions.rotateSecret('whs_abc123');
|
|
6491
|
+
* ```
|
|
6492
|
+
*/
|
|
6493
|
+
rotateSecret(id: string, requestOptions?: ComposioRequestOptions): Promise<WebhookSubscriptionRotateSecretResponse>;
|
|
6494
|
+
/**
|
|
6495
|
+
* List the event types a subscription can enable, with the payload
|
|
6496
|
+
* versions each one supports.
|
|
6497
|
+
*
|
|
6498
|
+
* @returns {Promise<WebhookSubscriptionEventTypesResponse>} The available event types
|
|
6499
|
+
*
|
|
6500
|
+
* @example
|
|
6501
|
+
* ```typescript
|
|
6502
|
+
* const { items } = await composio.webhooks.subscriptions.listEventTypes();
|
|
6503
|
+
* console.log(items.map(item => item.eventType));
|
|
6504
|
+
* ```
|
|
6505
|
+
*/
|
|
6506
|
+
listEventTypes(requestOptions?: ComposioRequestOptions): Promise<WebhookSubscriptionEventTypesResponse>;
|
|
6507
|
+
}
|
|
6508
|
+
/**
|
|
6509
|
+
* `composio.webhooks.endpoints` — inbound webhook endpoints. Each endpoint is
|
|
6510
|
+
* the ingress URL Composio exposes for one toolkit + OAuth app pair, which you
|
|
6511
|
+
* register with the third-party provider so it can push events to Composio.
|
|
6512
|
+
*/
|
|
6513
|
+
declare class WebhookEndpoints {
|
|
6514
|
+
private client;
|
|
6515
|
+
constructor(client: ComposioClient);
|
|
6516
|
+
/**
|
|
6517
|
+
* List webhook endpoints, optionally filtered by toolkit.
|
|
6518
|
+
*
|
|
6519
|
+
* @param {WebhookEndpointListParams} [query] - Optional `toolkitSlug` filter
|
|
6520
|
+
* @returns {Promise<WebhookEndpointListResponse>} The endpoints
|
|
6521
|
+
*
|
|
6522
|
+
* @example
|
|
6523
|
+
* ```typescript
|
|
6524
|
+
* const { items } = await composio.webhooks.endpoints.list({ toolkitSlug: 'slack' });
|
|
6525
|
+
* ```
|
|
6526
|
+
*/
|
|
6527
|
+
list(query?: WebhookEndpointListParams, requestOptions?: ComposioRequestOptions): Promise<WebhookEndpointListResponse>;
|
|
6528
|
+
/**
|
|
6529
|
+
* Retrieve a webhook endpoint by its nano id.
|
|
6530
|
+
*
|
|
6531
|
+
* @param {string} nanoId - The endpoint nano id (e.g. `we_abc123`)
|
|
6532
|
+
* @returns {Promise<WebhookEndpoint>} The endpoint, with secret setup values masked
|
|
6533
|
+
*
|
|
6534
|
+
* @example
|
|
6535
|
+
* ```typescript
|
|
6536
|
+
* const endpoint = await composio.webhooks.endpoints.get('we_abc123');
|
|
6537
|
+
* console.log(endpoint.webhookUrl);
|
|
6538
|
+
* ```
|
|
6539
|
+
*/
|
|
6540
|
+
get(nanoId: string, requestOptions?: ComposioRequestOptions): Promise<WebhookEndpoint>;
|
|
6541
|
+
/**
|
|
6542
|
+
* Create a webhook endpoint for a toolkit + OAuth app pair. Returns the
|
|
6543
|
+
* existing endpoint when one already exists for that pair.
|
|
6544
|
+
*
|
|
6545
|
+
* @param {WebhookEndpointCreateParams} params - `toolkitSlug` and `clientId`
|
|
6546
|
+
* @returns {Promise<WebhookEndpoint>} The endpoint; register `webhookUrl` with the provider
|
|
6547
|
+
* @throws {ValidationError} If the params fail validation
|
|
6548
|
+
*
|
|
6549
|
+
* @example
|
|
6550
|
+
* ```typescript
|
|
6551
|
+
* const endpoint = await composio.webhooks.endpoints.create({
|
|
6552
|
+
* toolkitSlug: 'slack',
|
|
6553
|
+
* clientId: 'my-slack-app-client-id',
|
|
6554
|
+
* });
|
|
6555
|
+
* ```
|
|
6556
|
+
*/
|
|
6557
|
+
create(params: WebhookEndpointCreateParams, requestOptions?: ComposioRequestOptions): Promise<WebhookEndpoint>;
|
|
6558
|
+
/**
|
|
6559
|
+
* Replace the setup fields of a webhook endpoint. All required setup fields
|
|
6560
|
+
* for the toolkit must be provided — this is the initial configuration.
|
|
6561
|
+
*
|
|
6562
|
+
* @param {string} nanoId - The endpoint nano id
|
|
6563
|
+
* @param {WebhookEndpointReplaceParams} params - `data` with every required setup field
|
|
6564
|
+
* @returns {Promise<WebhookEndpoint>} The configured endpoint
|
|
6565
|
+
* @throws {ValidationError} If the params fail validation
|
|
6566
|
+
*
|
|
6567
|
+
* @example
|
|
6568
|
+
* ```typescript
|
|
6569
|
+
* await composio.webhooks.endpoints.replace('we_abc123', {
|
|
6570
|
+
* data: { signing_secret: process.env.SLACK_SIGNING_SECRET! },
|
|
6571
|
+
* });
|
|
6572
|
+
* ```
|
|
6573
|
+
*/
|
|
6574
|
+
replace(nanoId: string, params: WebhookEndpointReplaceParams, requestOptions?: ComposioRequestOptions): Promise<WebhookEndpoint>;
|
|
6575
|
+
/**
|
|
6576
|
+
* Merge setup fields into a webhook endpoint. Omitted fields are preserved.
|
|
6577
|
+
*
|
|
6578
|
+
* @param {string} nanoId - The endpoint nano id
|
|
6579
|
+
* @param {WebhookEndpointUpdateParams} params - `data` with the fields to change
|
|
6580
|
+
* @returns {Promise<WebhookEndpoint>} The updated endpoint
|
|
6581
|
+
* @throws {ValidationError} If the params fail validation
|
|
6582
|
+
*
|
|
6583
|
+
* @example
|
|
6584
|
+
* ```typescript
|
|
6585
|
+
* await composio.webhooks.endpoints.update('we_abc123', {
|
|
6586
|
+
* data: { signing_secret: 'rotated-secret' },
|
|
6587
|
+
* });
|
|
6588
|
+
* ```
|
|
6589
|
+
*/
|
|
6590
|
+
update(nanoId: string, params: WebhookEndpointUpdateParams, requestOptions?: ComposioRequestOptions): Promise<WebhookEndpoint>;
|
|
6591
|
+
}
|
|
6592
|
+
/**
|
|
6593
|
+
* `composio.webhooks` namespace.
|
|
6594
|
+
*
|
|
6595
|
+
* - `subscriptions`: the project's outbound webhook subscription (where
|
|
6596
|
+
* Composio delivers trigger and lifecycle events).
|
|
6597
|
+
* - `endpoints`: inbound ingress URLs for third-party providers, one per
|
|
6598
|
+
* toolkit + OAuth app pair.
|
|
6599
|
+
*
|
|
6600
|
+
* @example
|
|
6601
|
+
* ```typescript
|
|
6602
|
+
* const subscription = await composio.webhooks.subscriptions.set({
|
|
6603
|
+
* webhookUrl: 'https://example.com/webhooks/composio',
|
|
6604
|
+
* });
|
|
6605
|
+
* const endpoints = await composio.webhooks.endpoints.list({ toolkitSlug: 'slack' });
|
|
6606
|
+
* ```
|
|
6607
|
+
*/
|
|
6608
|
+
declare class Webhooks {
|
|
6609
|
+
/** Manage the project's outbound webhook subscription. */
|
|
6610
|
+
subscriptions: WebhookSubscriptions;
|
|
6611
|
+
/** Manage inbound webhook endpoints per toolkit + OAuth app. */
|
|
6612
|
+
endpoints: WebhookEndpoints;
|
|
6613
|
+
constructor(client: ComposioClient);
|
|
6614
|
+
}
|
|
6615
|
+
//#endregion
|
|
6616
|
+
//#region src/types/logs.types.d.ts
|
|
6617
|
+
/**
|
|
6618
|
+
* Fields a tool-execution log search can filter on.
|
|
6619
|
+
*/
|
|
6620
|
+
declare const LogSearchFilterFieldSchema: z$1.ZodEnum<["tool_slug", "toolkit_slug", "connected_account_id", "auth_config_id", "status", "user_id", "session_id", "sandbox_id", "request_id", "log_id"]>;
|
|
6621
|
+
type LogSearchFilterField = z$1.infer<typeof LogSearchFilterFieldSchema>;
|
|
6622
|
+
declare const LogSearchFilterOperatorSchema: z$1.ZodEnum<["==", "!=", "contains", "not_contains"]>;
|
|
6623
|
+
type LogSearchFilterOperator = z$1.infer<typeof LogSearchFilterOperatorSchema>;
|
|
6624
|
+
declare const LogSearchFilterSchema: z$1.ZodObject<{
|
|
6625
|
+
field: z$1.ZodEnum<["tool_slug", "toolkit_slug", "connected_account_id", "auth_config_id", "status", "user_id", "session_id", "sandbox_id", "request_id", "log_id"]>;
|
|
6626
|
+
operator: z$1.ZodEnum<["==", "!=", "contains", "not_contains"]>;
|
|
6627
|
+
value: z$1.ZodString;
|
|
6628
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6629
|
+
value: string;
|
|
6630
|
+
field: "status" | "log_id" | "user_id" | "connected_account_id" | "auth_config_id" | "tool_slug" | "toolkit_slug" | "session_id" | "sandbox_id" | "request_id";
|
|
6631
|
+
operator: "==" | "!=" | "contains" | "not_contains";
|
|
6632
|
+
}, {
|
|
6633
|
+
value: string;
|
|
6634
|
+
field: "status" | "log_id" | "user_id" | "connected_account_id" | "auth_config_id" | "tool_slug" | "toolkit_slug" | "session_id" | "sandbox_id" | "request_id";
|
|
6635
|
+
operator: "==" | "!=" | "contains" | "not_contains";
|
|
6636
|
+
}>;
|
|
6637
|
+
type LogSearchFilter = z$1.infer<typeof LogSearchFilterSchema>;
|
|
6638
|
+
declare const LogSearchTimeRangeSchema: z$1.ZodObject<{
|
|
6639
|
+
/** Start time in epoch milliseconds (inclusive). */
|
|
6640
|
+
from: z$1.ZodNumber;
|
|
6641
|
+
/** End time in epoch milliseconds. */
|
|
6642
|
+
to: z$1.ZodNumber;
|
|
6643
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6644
|
+
from: number;
|
|
6645
|
+
to: number;
|
|
6646
|
+
}, {
|
|
6647
|
+
from: number;
|
|
6648
|
+
to: number;
|
|
6649
|
+
}>;
|
|
6650
|
+
type LogSearchTimeRange = z$1.infer<typeof LogSearchTimeRangeSchema>;
|
|
6651
|
+
/**
|
|
6652
|
+
* Params for `composio.logs.search()`.
|
|
6653
|
+
*/
|
|
6654
|
+
declare const LogSearchParamsSchema: z$1.ZodObject<{
|
|
6655
|
+
limit: z$1.ZodOptional<z$1.ZodNumber>;
|
|
6656
|
+
cursor: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
6657
|
+
filters: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
|
|
6658
|
+
field: z$1.ZodEnum<["tool_slug", "toolkit_slug", "connected_account_id", "auth_config_id", "status", "user_id", "session_id", "sandbox_id", "request_id", "log_id"]>;
|
|
6659
|
+
operator: z$1.ZodEnum<["==", "!=", "contains", "not_contains"]>;
|
|
6660
|
+
value: z$1.ZodString;
|
|
6661
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6662
|
+
value: string;
|
|
6663
|
+
field: "status" | "log_id" | "user_id" | "connected_account_id" | "auth_config_id" | "tool_slug" | "toolkit_slug" | "session_id" | "sandbox_id" | "request_id";
|
|
6664
|
+
operator: "==" | "!=" | "contains" | "not_contains";
|
|
6665
|
+
}, {
|
|
6666
|
+
value: string;
|
|
6667
|
+
field: "status" | "log_id" | "user_id" | "connected_account_id" | "auth_config_id" | "tool_slug" | "toolkit_slug" | "session_id" | "sandbox_id" | "request_id";
|
|
6668
|
+
operator: "==" | "!=" | "contains" | "not_contains";
|
|
6669
|
+
}>, "many">>;
|
|
6670
|
+
timeRange: z$1.ZodOptional<z$1.ZodObject<{
|
|
6671
|
+
/** Start time in epoch milliseconds (inclusive). */
|
|
6672
|
+
from: z$1.ZodNumber;
|
|
6673
|
+
/** End time in epoch milliseconds. */
|
|
6674
|
+
to: z$1.ZodNumber;
|
|
6675
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6676
|
+
from: number;
|
|
6677
|
+
to: number;
|
|
6678
|
+
}, {
|
|
6679
|
+
from: number;
|
|
6680
|
+
to: number;
|
|
6681
|
+
}>>;
|
|
6682
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6683
|
+
limit?: number | undefined;
|
|
6684
|
+
cursor?: string | null | undefined;
|
|
6685
|
+
filters?: {
|
|
6686
|
+
value: string;
|
|
6687
|
+
field: "status" | "log_id" | "user_id" | "connected_account_id" | "auth_config_id" | "tool_slug" | "toolkit_slug" | "session_id" | "sandbox_id" | "request_id";
|
|
6688
|
+
operator: "==" | "!=" | "contains" | "not_contains";
|
|
6689
|
+
}[] | undefined;
|
|
6690
|
+
timeRange?: {
|
|
6691
|
+
from: number;
|
|
6692
|
+
to: number;
|
|
6693
|
+
} | undefined;
|
|
6694
|
+
}, {
|
|
6695
|
+
limit?: number | undefined;
|
|
6696
|
+
cursor?: string | null | undefined;
|
|
6697
|
+
filters?: {
|
|
6698
|
+
value: string;
|
|
6699
|
+
field: "status" | "log_id" | "user_id" | "connected_account_id" | "auth_config_id" | "tool_slug" | "toolkit_slug" | "session_id" | "sandbox_id" | "request_id";
|
|
6700
|
+
operator: "==" | "!=" | "contains" | "not_contains";
|
|
6701
|
+
}[] | undefined;
|
|
6702
|
+
timeRange?: {
|
|
6703
|
+
from: number;
|
|
6704
|
+
to: number;
|
|
6705
|
+
} | undefined;
|
|
6706
|
+
}>;
|
|
6707
|
+
type LogSearchParams = z$1.infer<typeof LogSearchParamsSchema>;
|
|
6708
|
+
declare const ToolExecutionLogStatusSchema: z$1.ZodEnum<["success", "failed"]>;
|
|
6709
|
+
declare const ToolExecutionLogLevelSchema: z$1.ZodEnum<["info", "error", "warn"]>;
|
|
6710
|
+
declare const ToolExecutionLogParentSchema: z$1.ZodNullable<z$1.ZodObject<{
|
|
6711
|
+
logId: z$1.ZodString;
|
|
6712
|
+
toolSlug: z$1.ZodString;
|
|
6713
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6714
|
+
logId: string;
|
|
6715
|
+
toolSlug: string;
|
|
6716
|
+
}, {
|
|
6717
|
+
logId: string;
|
|
6718
|
+
toolSlug: string;
|
|
6719
|
+
}>>;
|
|
6720
|
+
/**
|
|
6721
|
+
* A tool-execution log entry as returned by `composio.logs.search()`.
|
|
6722
|
+
*/
|
|
6723
|
+
declare const ToolExecutionLogSchema: z$1.ZodObject<{
|
|
6724
|
+
id: z$1.ZodString;
|
|
6725
|
+
/** ISO 8601 timestamp. */
|
|
6726
|
+
timestamp: z$1.ZodString;
|
|
6727
|
+
/** Log event type, e.g. `tool.execution`. */
|
|
6728
|
+
type: z$1.ZodString;
|
|
6729
|
+
status: z$1.ZodEnum<["success", "failed"]>;
|
|
6730
|
+
level: z$1.ZodEnum<["info", "error", "warn"]>;
|
|
6731
|
+
message: z$1.ZodOptional<z$1.ZodString>;
|
|
6732
|
+
metadata: z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>;
|
|
6733
|
+
metrics: z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>;
|
|
6734
|
+
parent: z$1.ZodNullable<z$1.ZodObject<{
|
|
6735
|
+
logId: z$1.ZodString;
|
|
6736
|
+
toolSlug: z$1.ZodString;
|
|
6737
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6738
|
+
logId: string;
|
|
6739
|
+
toolSlug: string;
|
|
6740
|
+
}, {
|
|
6741
|
+
logId: string;
|
|
6742
|
+
toolSlug: string;
|
|
6743
|
+
}>>;
|
|
6744
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6745
|
+
type: string;
|
|
6746
|
+
status: "success" | "failed";
|
|
6747
|
+
id: string;
|
|
6748
|
+
metadata: Record<string, unknown>;
|
|
6749
|
+
timestamp: string;
|
|
6750
|
+
level: "error" | "warn" | "info";
|
|
6751
|
+
metrics: Record<string, unknown>;
|
|
6752
|
+
parent: {
|
|
6753
|
+
logId: string;
|
|
6754
|
+
toolSlug: string;
|
|
6755
|
+
} | null;
|
|
6756
|
+
message?: string | undefined;
|
|
6757
|
+
}, {
|
|
6758
|
+
type: string;
|
|
6759
|
+
status: "success" | "failed";
|
|
6760
|
+
id: string;
|
|
6761
|
+
metadata: Record<string, unknown>;
|
|
6762
|
+
timestamp: string;
|
|
6763
|
+
level: "error" | "warn" | "info";
|
|
6764
|
+
metrics: Record<string, unknown>;
|
|
6765
|
+
parent: {
|
|
6766
|
+
logId: string;
|
|
6767
|
+
toolSlug: string;
|
|
6768
|
+
} | null;
|
|
6769
|
+
message?: string | undefined;
|
|
6770
|
+
}>;
|
|
6771
|
+
type ToolExecutionLog = z$1.infer<typeof ToolExecutionLogSchema>;
|
|
6772
|
+
declare const LogSearchResponseSchema: z$1.ZodObject<{
|
|
6773
|
+
logs: z$1.ZodArray<z$1.ZodObject<{
|
|
6774
|
+
id: z$1.ZodString;
|
|
6775
|
+
/** ISO 8601 timestamp. */
|
|
6776
|
+
timestamp: z$1.ZodString;
|
|
6777
|
+
/** Log event type, e.g. `tool.execution`. */
|
|
6778
|
+
type: z$1.ZodString;
|
|
6779
|
+
status: z$1.ZodEnum<["success", "failed"]>;
|
|
6780
|
+
level: z$1.ZodEnum<["info", "error", "warn"]>;
|
|
6781
|
+
message: z$1.ZodOptional<z$1.ZodString>;
|
|
6782
|
+
metadata: z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>;
|
|
6783
|
+
metrics: z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>;
|
|
6784
|
+
parent: z$1.ZodNullable<z$1.ZodObject<{
|
|
6785
|
+
logId: z$1.ZodString;
|
|
6786
|
+
toolSlug: z$1.ZodString;
|
|
6787
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6788
|
+
logId: string;
|
|
6789
|
+
toolSlug: string;
|
|
6790
|
+
}, {
|
|
6791
|
+
logId: string;
|
|
6792
|
+
toolSlug: string;
|
|
6793
|
+
}>>;
|
|
6794
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6795
|
+
type: string;
|
|
6796
|
+
status: "success" | "failed";
|
|
6797
|
+
id: string;
|
|
6798
|
+
metadata: Record<string, unknown>;
|
|
6799
|
+
timestamp: string;
|
|
6800
|
+
level: "error" | "warn" | "info";
|
|
6801
|
+
metrics: Record<string, unknown>;
|
|
6802
|
+
parent: {
|
|
6803
|
+
logId: string;
|
|
6804
|
+
toolSlug: string;
|
|
6805
|
+
} | null;
|
|
6806
|
+
message?: string | undefined;
|
|
6807
|
+
}, {
|
|
6808
|
+
type: string;
|
|
6809
|
+
status: "success" | "failed";
|
|
6810
|
+
id: string;
|
|
6811
|
+
metadata: Record<string, unknown>;
|
|
6812
|
+
timestamp: string;
|
|
6813
|
+
level: "error" | "warn" | "info";
|
|
6814
|
+
metrics: Record<string, unknown>;
|
|
6815
|
+
parent: {
|
|
6816
|
+
logId: string;
|
|
6817
|
+
toolSlug: string;
|
|
6818
|
+
} | null;
|
|
6819
|
+
message?: string | undefined;
|
|
6820
|
+
}>, "many">;
|
|
6821
|
+
nextCursor: z$1.ZodNullable<z$1.ZodString>;
|
|
6822
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6823
|
+
nextCursor: string | null;
|
|
6824
|
+
logs: {
|
|
6825
|
+
type: string;
|
|
6826
|
+
status: "success" | "failed";
|
|
6827
|
+
id: string;
|
|
6828
|
+
metadata: Record<string, unknown>;
|
|
6829
|
+
timestamp: string;
|
|
6830
|
+
level: "error" | "warn" | "info";
|
|
6831
|
+
metrics: Record<string, unknown>;
|
|
6832
|
+
parent: {
|
|
6833
|
+
logId: string;
|
|
6834
|
+
toolSlug: string;
|
|
6835
|
+
} | null;
|
|
6836
|
+
message?: string | undefined;
|
|
6837
|
+
}[];
|
|
6838
|
+
}, {
|
|
6839
|
+
nextCursor: string | null;
|
|
6840
|
+
logs: {
|
|
6841
|
+
type: string;
|
|
6842
|
+
status: "success" | "failed";
|
|
6843
|
+
id: string;
|
|
6844
|
+
metadata: Record<string, unknown>;
|
|
6845
|
+
timestamp: string;
|
|
6846
|
+
level: "error" | "warn" | "info";
|
|
6847
|
+
metrics: Record<string, unknown>;
|
|
6848
|
+
parent: {
|
|
6849
|
+
logId: string;
|
|
6850
|
+
toolSlug: string;
|
|
6851
|
+
} | null;
|
|
6852
|
+
message?: string | undefined;
|
|
6853
|
+
}[];
|
|
6854
|
+
}>;
|
|
6855
|
+
type LogSearchResponse = z$1.infer<typeof LogSearchResponseSchema>;
|
|
6856
|
+
/**
|
|
6857
|
+
* A single tool-execution log with its full detail, as returned by
|
|
6858
|
+
* `composio.logs.get()`.
|
|
6859
|
+
*/
|
|
6860
|
+
declare const ToolExecutionLogDetailSchema: z$1.ZodObject<{
|
|
6861
|
+
id: z$1.ZodString;
|
|
6862
|
+
/** ISO 8601 timestamp. */
|
|
6863
|
+
timestamp: z$1.ZodString;
|
|
6864
|
+
/** Log event type, e.g. `tool.execution`. */
|
|
6865
|
+
type: z$1.ZodString;
|
|
6866
|
+
status: z$1.ZodEnum<["success", "failed"]>;
|
|
6867
|
+
level: z$1.ZodEnum<["info", "error", "warn"]>;
|
|
6868
|
+
message: z$1.ZodOptional<z$1.ZodString>;
|
|
6869
|
+
metadata: z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>;
|
|
6870
|
+
metrics: z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>;
|
|
6871
|
+
parent: z$1.ZodNullable<z$1.ZodObject<{
|
|
6872
|
+
logId: z$1.ZodString;
|
|
6873
|
+
toolSlug: z$1.ZodString;
|
|
6874
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6875
|
+
logId: string;
|
|
6876
|
+
toolSlug: string;
|
|
6877
|
+
}, {
|
|
6878
|
+
logId: string;
|
|
6879
|
+
toolSlug: string;
|
|
6880
|
+
}>>;
|
|
6881
|
+
} & {
|
|
6882
|
+
timings: z$1.ZodOptional<z$1.ZodObject<{
|
|
6883
|
+
/** Epoch milliseconds. */
|
|
6884
|
+
startTime: z$1.ZodNumber;
|
|
6885
|
+
/** Epoch milliseconds. */
|
|
6886
|
+
endTime: z$1.ZodNumber;
|
|
6887
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6888
|
+
startTime: number;
|
|
6889
|
+
endTime: number;
|
|
6890
|
+
}, {
|
|
6891
|
+
startTime: number;
|
|
6892
|
+
endTime: number;
|
|
6893
|
+
}>>;
|
|
6894
|
+
context: z$1.ZodObject<{
|
|
6895
|
+
sessionId: z$1.ZodOptional<z$1.ZodString>;
|
|
6896
|
+
traceId: z$1.ZodOptional<z$1.ZodString>;
|
|
6897
|
+
requestId: z$1.ZodOptional<z$1.ZodString>;
|
|
6898
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6899
|
+
sessionId?: string | undefined;
|
|
6900
|
+
traceId?: string | undefined;
|
|
6901
|
+
requestId?: string | undefined;
|
|
6902
|
+
}, {
|
|
6903
|
+
sessionId?: string | undefined;
|
|
6904
|
+
traceId?: string | undefined;
|
|
6905
|
+
requestId?: string | undefined;
|
|
6906
|
+
}>;
|
|
6907
|
+
source: z$1.ZodObject<{
|
|
6908
|
+
host: z$1.ZodOptional<z$1.ZodString>;
|
|
6909
|
+
framework: z$1.ZodOptional<z$1.ZodString>;
|
|
6910
|
+
language: z$1.ZodOptional<z$1.ZodString>;
|
|
6911
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6912
|
+
host?: string | undefined;
|
|
6913
|
+
framework?: string | undefined;
|
|
6914
|
+
language?: string | undefined;
|
|
6915
|
+
}, {
|
|
6916
|
+
host?: string | undefined;
|
|
6917
|
+
framework?: string | undefined;
|
|
6918
|
+
language?: string | undefined;
|
|
6919
|
+
}>;
|
|
6920
|
+
data: z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>;
|
|
6921
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6922
|
+
type: string;
|
|
6923
|
+
status: "success" | "failed";
|
|
6924
|
+
data: Record<string, unknown>;
|
|
6925
|
+
id: string;
|
|
6926
|
+
metadata: Record<string, unknown>;
|
|
6927
|
+
timestamp: string;
|
|
6928
|
+
level: "error" | "warn" | "info";
|
|
6929
|
+
metrics: Record<string, unknown>;
|
|
6930
|
+
parent: {
|
|
6931
|
+
logId: string;
|
|
6932
|
+
toolSlug: string;
|
|
6933
|
+
} | null;
|
|
6934
|
+
context: {
|
|
6935
|
+
sessionId?: string | undefined;
|
|
6936
|
+
traceId?: string | undefined;
|
|
6937
|
+
requestId?: string | undefined;
|
|
6938
|
+
};
|
|
6939
|
+
source: {
|
|
6940
|
+
host?: string | undefined;
|
|
6941
|
+
framework?: string | undefined;
|
|
6942
|
+
language?: string | undefined;
|
|
6943
|
+
};
|
|
6944
|
+
message?: string | undefined;
|
|
6945
|
+
timings?: {
|
|
6946
|
+
startTime: number;
|
|
6947
|
+
endTime: number;
|
|
6948
|
+
} | undefined;
|
|
6949
|
+
}, {
|
|
6950
|
+
type: string;
|
|
6951
|
+
status: "success" | "failed";
|
|
6952
|
+
data: Record<string, unknown>;
|
|
6953
|
+
id: string;
|
|
6954
|
+
metadata: Record<string, unknown>;
|
|
6955
|
+
timestamp: string;
|
|
6956
|
+
level: "error" | "warn" | "info";
|
|
6957
|
+
metrics: Record<string, unknown>;
|
|
6958
|
+
parent: {
|
|
6959
|
+
logId: string;
|
|
6960
|
+
toolSlug: string;
|
|
6961
|
+
} | null;
|
|
6962
|
+
context: {
|
|
6963
|
+
sessionId?: string | undefined;
|
|
6964
|
+
traceId?: string | undefined;
|
|
6965
|
+
requestId?: string | undefined;
|
|
6966
|
+
};
|
|
6967
|
+
source: {
|
|
6968
|
+
host?: string | undefined;
|
|
6969
|
+
framework?: string | undefined;
|
|
6970
|
+
language?: string | undefined;
|
|
6971
|
+
};
|
|
6972
|
+
message?: string | undefined;
|
|
6973
|
+
timings?: {
|
|
6974
|
+
startTime: number;
|
|
6975
|
+
endTime: number;
|
|
6976
|
+
} | undefined;
|
|
6977
|
+
}>;
|
|
6978
|
+
type ToolExecutionLogDetail = z$1.infer<typeof ToolExecutionLogDetailSchema>;
|
|
6979
|
+
//#endregion
|
|
6980
|
+
//#region src/models/Logs.d.ts
|
|
6981
|
+
/**
|
|
6982
|
+
* `composio.logs` — tool-execution logs.
|
|
6983
|
+
*
|
|
6984
|
+
* @example
|
|
6985
|
+
* ```typescript
|
|
6986
|
+
* const { logs, nextCursor } = await composio.logs.search({
|
|
6987
|
+
* filters: [{ field: 'toolkit_slug', operator: '==', value: 'github' }],
|
|
6988
|
+
* limit: 20,
|
|
6989
|
+
* });
|
|
6990
|
+
* const detail = await composio.logs.get(logs[0].id);
|
|
6991
|
+
* ```
|
|
6992
|
+
*/
|
|
6993
|
+
declare class Logs {
|
|
6994
|
+
private client;
|
|
6995
|
+
constructor(client: ComposioClient);
|
|
6996
|
+
/**
|
|
6997
|
+
* Search tool-execution logs with filters, a time range and cursor
|
|
6998
|
+
* pagination.
|
|
6999
|
+
*
|
|
7000
|
+
* @param {LogSearchParams} [params] - Filters, `timeRange`, `limit` and `cursor`
|
|
7001
|
+
* @returns {Promise<LogSearchResponse>} Matching logs and the next cursor
|
|
7002
|
+
* @throws {ValidationError} If the params fail validation
|
|
7003
|
+
*
|
|
7004
|
+
* @example
|
|
7005
|
+
* ```typescript
|
|
7006
|
+
* const { logs } = await composio.logs.search({
|
|
7007
|
+
* filters: [
|
|
7008
|
+
* { field: 'status', operator: '==', value: 'failed' },
|
|
7009
|
+
* { field: 'user_id', operator: '==', value: 'user_123' },
|
|
7010
|
+
* ],
|
|
7011
|
+
* timeRange: { from: Date.now() - 24 * 60 * 60 * 1000, to: Date.now() },
|
|
7012
|
+
* });
|
|
7013
|
+
* ```
|
|
7014
|
+
*/
|
|
7015
|
+
search(params?: LogSearchParams, requestOptions?: ComposioRequestOptions): Promise<LogSearchResponse>;
|
|
7016
|
+
/**
|
|
7017
|
+
* Retrieve one tool-execution log with its full detail (timings, context,
|
|
7018
|
+
* source and raw `data`).
|
|
7019
|
+
*
|
|
7020
|
+
* @param {string} id - The log id
|
|
7021
|
+
* @returns {Promise<ToolExecutionLogDetail>} The log detail
|
|
7022
|
+
*
|
|
7023
|
+
* @example
|
|
7024
|
+
* ```typescript
|
|
7025
|
+
* const log = await composio.logs.get('log_abc123');
|
|
7026
|
+
* console.log(log.status, log.timings?.endTime);
|
|
7027
|
+
* ```
|
|
7028
|
+
*/
|
|
7029
|
+
get(id: string, requestOptions?: ComposioRequestOptions): Promise<ToolExecutionLogDetail>;
|
|
7030
|
+
}
|
|
7031
|
+
//#endregion
|
|
7032
|
+
//#region src/types/keyring.types.d.ts
|
|
7033
|
+
/**
|
|
7034
|
+
* A public JWK a secret can be sealed to. Fields keep their JWK names so a
|
|
7035
|
+
* key can be handed straight to WebCrypto or a JOSE library.
|
|
7036
|
+
*/
|
|
7037
|
+
declare const KeyringTransferKeySchema: z$1.ZodObject<{
|
|
7038
|
+
/** Key type. Always `RSA`. */
|
|
7039
|
+
kty: z$1.ZodString;
|
|
7040
|
+
/** RSA modulus, base64url-encoded. */
|
|
7041
|
+
n: z$1.ZodString;
|
|
7042
|
+
/** RSA public exponent, base64url-encoded. */
|
|
7043
|
+
e: z$1.ZodString;
|
|
7044
|
+
/** Key-management algorithm for the JWE (`RSA-OAEP-256`). Pair it with `A256GCM` content encryption. */
|
|
7045
|
+
alg: z$1.ZodString;
|
|
7046
|
+
/** Key use. Always `enc`. */
|
|
7047
|
+
use: z$1.ZodString;
|
|
7048
|
+
/** Key identifier. Put it in the JWE protected header. */
|
|
7049
|
+
kid: z$1.ZodString;
|
|
7050
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
7051
|
+
kty: string;
|
|
7052
|
+
n: string;
|
|
7053
|
+
e: string;
|
|
7054
|
+
alg: string;
|
|
7055
|
+
use: string;
|
|
7056
|
+
kid: string;
|
|
7057
|
+
}, {
|
|
7058
|
+
kty: string;
|
|
7059
|
+
n: string;
|
|
7060
|
+
e: string;
|
|
7061
|
+
alg: string;
|
|
7062
|
+
use: string;
|
|
7063
|
+
kid: string;
|
|
7064
|
+
}>;
|
|
7065
|
+
type KeyringTransferKey = z$1.infer<typeof KeyringTransferKeySchema>;
|
|
7066
|
+
/**
|
|
7067
|
+
* Response of `composio.keyring.listTransferKeys()`.
|
|
7068
|
+
*/
|
|
7069
|
+
declare const KeyringTransferKeysResponseSchema: z$1.ZodObject<{
|
|
7070
|
+
/** The `kid` of the key to seal new secrets to. */
|
|
7071
|
+
activeKid: z$1.ZodString;
|
|
7072
|
+
/** Every currently accepted transfer key, newest first. */
|
|
7073
|
+
keys: z$1.ZodArray<z$1.ZodObject<{
|
|
7074
|
+
/** Key type. Always `RSA`. */
|
|
7075
|
+
kty: z$1.ZodString;
|
|
7076
|
+
/** RSA modulus, base64url-encoded. */
|
|
7077
|
+
n: z$1.ZodString;
|
|
7078
|
+
/** RSA public exponent, base64url-encoded. */
|
|
7079
|
+
e: z$1.ZodString;
|
|
7080
|
+
/** Key-management algorithm for the JWE (`RSA-OAEP-256`). Pair it with `A256GCM` content encryption. */
|
|
7081
|
+
alg: z$1.ZodString;
|
|
7082
|
+
/** Key use. Always `enc`. */
|
|
7083
|
+
use: z$1.ZodString;
|
|
7084
|
+
/** Key identifier. Put it in the JWE protected header. */
|
|
7085
|
+
kid: z$1.ZodString;
|
|
7086
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
7087
|
+
kty: string;
|
|
7088
|
+
n: string;
|
|
7089
|
+
e: string;
|
|
7090
|
+
alg: string;
|
|
7091
|
+
use: string;
|
|
7092
|
+
kid: string;
|
|
7093
|
+
}, {
|
|
7094
|
+
kty: string;
|
|
7095
|
+
n: string;
|
|
7096
|
+
e: string;
|
|
7097
|
+
alg: string;
|
|
7098
|
+
use: string;
|
|
7099
|
+
kid: string;
|
|
7100
|
+
}>, "many">;
|
|
7101
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
7102
|
+
keys: {
|
|
7103
|
+
kty: string;
|
|
7104
|
+
n: string;
|
|
7105
|
+
e: string;
|
|
7106
|
+
alg: string;
|
|
7107
|
+
use: string;
|
|
7108
|
+
kid: string;
|
|
7109
|
+
}[];
|
|
7110
|
+
activeKid: string;
|
|
7111
|
+
}, {
|
|
7112
|
+
keys: {
|
|
7113
|
+
kty: string;
|
|
7114
|
+
n: string;
|
|
7115
|
+
e: string;
|
|
7116
|
+
alg: string;
|
|
7117
|
+
use: string;
|
|
7118
|
+
kid: string;
|
|
7119
|
+
}[];
|
|
7120
|
+
activeKid: string;
|
|
7121
|
+
}>;
|
|
7122
|
+
type KeyringTransferKeysResponse = z$1.infer<typeof KeyringTransferKeysResponseSchema>;
|
|
7123
|
+
//#endregion
|
|
7124
|
+
//#region src/models/Keyring.d.ts
|
|
7125
|
+
/**
|
|
7126
|
+
* `composio.keyring` — the organization's customer-managed keyring.
|
|
7127
|
+
*
|
|
7128
|
+
* @example
|
|
7129
|
+
* ```typescript
|
|
7130
|
+
* const { activeKid, keys } = await composio.keyring.listTransferKeys();
|
|
7131
|
+
* const sealingKey = keys.find(key => key.kid === activeKid);
|
|
7132
|
+
* ```
|
|
7133
|
+
*/
|
|
7134
|
+
declare class Keyring {
|
|
7135
|
+
private client;
|
|
7136
|
+
constructor(client: ComposioClient);
|
|
7137
|
+
/**
|
|
7138
|
+
* Lists the public transfer keys of the organization's active customer
|
|
7139
|
+
* keyring, the keys a secret is sealed to before it is sent to Composio.
|
|
7140
|
+
*
|
|
7141
|
+
* Always seal new secrets to the key whose `kid` is `activeKid`: a JWE with
|
|
7142
|
+
* `RSA-OAEP-256` key management, `A256GCM` content encryption, and the
|
|
7143
|
+
* `kid` in the protected header. Older keys stay listed so values sealed to
|
|
7144
|
+
* them remain openable.
|
|
7145
|
+
*
|
|
7146
|
+
* The organization behind the API key must have an ACTIVE customer keyring
|
|
7147
|
+
* instance; otherwise the API answers 404.
|
|
7148
|
+
*
|
|
7149
|
+
* @returns {Promise<KeyringTransferKeysResponse>} The active key ID and every accepted public JWK, newest first
|
|
7150
|
+
*
|
|
7151
|
+
* @example
|
|
7152
|
+
* ```typescript
|
|
7153
|
+
* import { CompactEncrypt, importJWK } from 'jose';
|
|
7154
|
+
*
|
|
7155
|
+
* const { activeKid, keys } = await composio.keyring.listTransferKeys();
|
|
7156
|
+
* const jwk = keys.find(key => key.kid === activeKid)!;
|
|
7157
|
+
* const sealed = await new CompactEncrypt(new TextEncoder().encode(secret))
|
|
7158
|
+
* .setProtectedHeader({ alg: 'RSA-OAEP-256', enc: 'A256GCM', kid: activeKid })
|
|
7159
|
+
* .encrypt(await importJWK(jwk, 'RSA-OAEP-256'));
|
|
7160
|
+
* ```
|
|
7161
|
+
*/
|
|
7162
|
+
listTransferKeys(requestOptions?: ComposioRequestOptions): Promise<KeyringTransferKeysResponse>;
|
|
7163
|
+
}
|
|
7164
|
+
//#endregion
|
|
7165
|
+
//#region src/utils/logger.d.ts
|
|
7166
|
+
declare const LOG_LEVELS: {
|
|
7167
|
+
readonly silent: -1;
|
|
7168
|
+
readonly error: 0;
|
|
7169
|
+
readonly warn: 1;
|
|
7170
|
+
readonly info: 2;
|
|
7171
|
+
readonly debug: 3;
|
|
7172
|
+
};
|
|
7173
|
+
type LogLevel = keyof typeof LOG_LEVELS;
|
|
7174
|
+
/**
|
|
7175
|
+
* Destination for SDK log output. Each method receives the already
|
|
7176
|
+
* formatted and redacted message as its single argument. `console` satisfies
|
|
7177
|
+
* this interface, and so do most structured loggers (pino, winston, ...).
|
|
7178
|
+
*/
|
|
7179
|
+
interface ComposioLogger {
|
|
7180
|
+
error: (...args: unknown[]) => void;
|
|
7181
|
+
warn: (...args: unknown[]) => void;
|
|
7182
|
+
info: (...args: unknown[]) => void;
|
|
7183
|
+
debug: (...args: unknown[]) => void;
|
|
7184
|
+
}
|
|
7185
|
+
interface LoggerOptions {
|
|
7186
|
+
level?: LogLevel;
|
|
7187
|
+
includeTimestamp?: boolean;
|
|
7188
|
+
/** Where formatted output is written. Defaults to `console`. */
|
|
7189
|
+
sink?: ComposioLogger;
|
|
7190
|
+
}
|
|
7191
|
+
interface LoggerConfigureOptions {
|
|
7192
|
+
level?: LogLevel;
|
|
7193
|
+
sink?: ComposioLogger;
|
|
7194
|
+
}
|
|
7195
|
+
declare class Logger {
|
|
7196
|
+
private level;
|
|
7197
|
+
private readonly includeTimestamp;
|
|
7198
|
+
private sink;
|
|
7199
|
+
constructor(options?: LoggerOptions);
|
|
7200
|
+
/**
|
|
7201
|
+
* Reconfigure the level and/or sink in place. Omitted fields are left
|
|
7202
|
+
* unchanged, so `configure({ level: 'debug' })` keeps the current sink.
|
|
7203
|
+
*/
|
|
7204
|
+
configure(options: LoggerConfigureOptions): void;
|
|
7205
|
+
getLevel(): LogLevel;
|
|
7206
|
+
private formatMessage;
|
|
7207
|
+
private shouldLog;
|
|
7208
|
+
error(...args: unknown[]): void;
|
|
7209
|
+
warn(...args: unknown[]): void;
|
|
7210
|
+
info(...args: unknown[]): void;
|
|
7211
|
+
debug(...args: unknown[]): void;
|
|
7212
|
+
}
|
|
7213
|
+
declare const logger: Logger;
|
|
7214
|
+
//#endregion
|
|
7215
|
+
//#region src/provider/OpenAIProvider.d.ts
|
|
7216
|
+
type OpenAiTool = OpenAI.ChatCompletionTool;
|
|
7217
|
+
type OpenAiToolCollection = Array<OpenAiTool>;
|
|
7218
|
+
declare class OpenAIProvider extends BaseNonAgenticProvider<OpenAiToolCollection, OpenAiTool, McpServerGetResponse> {
|
|
7219
|
+
readonly name = "openai";
|
|
7220
|
+
/**
|
|
7221
|
+
* Creates a new instance of the OpenAIProvider.
|
|
7222
|
+
*
|
|
7223
|
+
* This is the default provider for the Composio SDK and is automatically
|
|
7224
|
+
* available without additional installation.
|
|
7225
|
+
*
|
|
7226
|
+
* @example
|
|
7227
|
+
* ```typescript
|
|
7228
|
+
* // The OpenAIProvider is used by default when initializing Composio
|
|
7229
|
+
* const composio = new Composio({
|
|
7230
|
+
* apiKey: 'your-api-key'
|
|
7231
|
+
* });
|
|
7232
|
+
*
|
|
7233
|
+
* // You can also explicitly specify it
|
|
7234
|
+
* const composio = new Composio({
|
|
7235
|
+
* apiKey: 'your-api-key',
|
|
7236
|
+
* provider: new OpenAIProvider()
|
|
7237
|
+
* });
|
|
7238
|
+
* ```
|
|
7239
|
+
*/
|
|
7240
|
+
constructor();
|
|
7241
|
+
/**
|
|
7242
|
+
* Transform MCP URL response into OpenAI-specific format.
|
|
7243
|
+
* OpenAI uses the standard format by default.
|
|
7244
|
+
*
|
|
7245
|
+
* @param data - The MCP URL response data
|
|
7246
|
+
* @returns Standard MCP server response format
|
|
7247
|
+
*/
|
|
7248
|
+
wrapMcpServerResponse(data: McpUrlResponse): McpServerGetResponse;
|
|
7249
|
+
/**
|
|
7250
|
+
* Wraps a Composio tool in the OpenAI function calling format.
|
|
7251
|
+
*
|
|
7252
|
+
* This method transforms a Composio tool definition into the format
|
|
7253
|
+
* expected by OpenAI's function calling API.
|
|
7254
|
+
*
|
|
7255
|
+
* @param tool - The Composio tool to wrap
|
|
7256
|
+
* @returns The wrapped tool in OpenAI format
|
|
7257
|
+
*
|
|
7258
|
+
* @example
|
|
7259
|
+
* ```typescript
|
|
7260
|
+
* // Wrap a single tool for use with OpenAI
|
|
7261
|
+
* const composioTool = {
|
|
7262
|
+
* slug: 'SEARCH_TOOL',
|
|
7263
|
+
* description: 'Search for information',
|
|
7264
|
+
* inputParameters: {
|
|
7265
|
+
* type: 'object',
|
|
7266
|
+
* properties: {
|
|
7267
|
+
* query: { type: 'string' }
|
|
7268
|
+
* },
|
|
7269
|
+
* required: ['query']
|
|
7270
|
+
* }
|
|
7271
|
+
* };
|
|
7272
|
+
*
|
|
7273
|
+
* const openAITool = provider.wrapTool(composioTool);
|
|
7274
|
+
* ```
|
|
7275
|
+
*/
|
|
7276
|
+
wrapTool: (tool: Tool) => OpenAiTool;
|
|
7277
|
+
/**
|
|
7278
|
+
* Wraps multiple Composio tools in the OpenAI function calling format.
|
|
7279
|
+
*
|
|
7280
|
+
* This method transforms a list of Composio tools into the format
|
|
7281
|
+
* expected by OpenAI's function calling API.
|
|
7282
|
+
*
|
|
7283
|
+
* @param tools - Array of Composio tools to wrap
|
|
7284
|
+
* @returns Array of wrapped tools in OpenAI format
|
|
7285
|
+
*
|
|
7286
|
+
* @example
|
|
7287
|
+
* ```typescript
|
|
7288
|
+
* // Wrap multiple tools for use with OpenAI
|
|
7289
|
+
* const composioTools = [
|
|
7290
|
+
* {
|
|
5006
7291
|
* slug: 'SEARCH_TOOL',
|
|
5007
7292
|
* description: 'Search for information',
|
|
5008
7293
|
* inputParameters: {
|
|
@@ -5469,6 +7754,43 @@ type ComposioConfig<TProvider extends BaseComposioProvider<unknown, unknown, unk
|
|
|
5469
7754
|
* ```
|
|
5470
7755
|
*/
|
|
5471
7756
|
toolkitVersions?: ToolkitVersionParam;
|
|
7757
|
+
/**
|
|
7758
|
+
* Destination for SDK log output. Messages are formatted and have
|
|
7759
|
+
* credential-shaped values redacted before they reach the sink, so any
|
|
7760
|
+
* object with `error`/`warn`/`info`/`debug` methods works (`console`, pino,
|
|
7761
|
+
* winston, ...).
|
|
7762
|
+
*
|
|
7763
|
+
* Runtime deprecation warnings raised by the underlying API client (response
|
|
7764
|
+
* `Deprecation`/`Sunset` headers and deprecated request inputs) are routed
|
|
7765
|
+
* through this logger as well.
|
|
7766
|
+
*
|
|
7767
|
+
* The SDK logger is process-wide: configuring it on one `Composio` instance
|
|
7768
|
+
* affects every instance, and the last configured instance wins.
|
|
7769
|
+
*
|
|
7770
|
+
* @default console
|
|
7771
|
+
* @example
|
|
7772
|
+
* ```typescript
|
|
7773
|
+
* const composio = new Composio({
|
|
7774
|
+
* apiKey: 'your-api-key',
|
|
7775
|
+
* logger: pino(),
|
|
7776
|
+
* logLevel: 'warn',
|
|
7777
|
+
* });
|
|
7778
|
+
* ```
|
|
7779
|
+
*/
|
|
7780
|
+
logger?: ComposioLogger;
|
|
7781
|
+
/**
|
|
7782
|
+
* Minimum level to emit: `'silent' | 'error' | 'warn' | 'info' | 'debug'`.
|
|
7783
|
+
* Takes precedence over the `COMPOSIO_LOG_LEVEL` environment variable.
|
|
7784
|
+
* Also gates the API client's runtime deprecation warnings (`'silent'` turns
|
|
7785
|
+
* them off). The client's per-request lifecycle logs are emitted at
|
|
7786
|
+
* `'debug'` only.
|
|
7787
|
+
*
|
|
7788
|
+
* Like `logger`, this applies process-wide and the last configured instance
|
|
7789
|
+
* wins. The API client's own level is fixed when each instance is created.
|
|
7790
|
+
*
|
|
7791
|
+
* @default 'info' (or `COMPOSIO_LOG_LEVEL` when set)
|
|
7792
|
+
*/
|
|
7793
|
+
logLevel?: LogLevel;
|
|
5472
7794
|
};
|
|
5473
7795
|
/**
|
|
5474
7796
|
* This is the core class for Composio.
|
|
@@ -5502,6 +7824,15 @@ declare class Composio$1<TProvider extends BaseComposioProvider<unknown, unknown
|
|
|
5502
7824
|
authConfigs: AuthConfigs;
|
|
5503
7825
|
/** Manage authenticated connections */
|
|
5504
7826
|
connectedAccounts: ConnectedAccounts;
|
|
7827
|
+
/**
|
|
7828
|
+
* Manage the project's webhook subscription (`webhooks.subscriptions`) and
|
|
7829
|
+
* inbound per-toolkit webhook endpoints (`webhooks.endpoints`).
|
|
7830
|
+
*/
|
|
7831
|
+
webhooks: Webhooks;
|
|
7832
|
+
/** Search and inspect tool-execution logs */
|
|
7833
|
+
logs: Logs;
|
|
7834
|
+
/** Public transfer keys of the organization's customer-managed keyring */
|
|
7835
|
+
keyring: Keyring;
|
|
5505
7836
|
/**
|
|
5506
7837
|
* Experimental SDK methods whose shape may change in future releases.
|
|
5507
7838
|
* Prefer domain-specific mounts (for example
|
|
@@ -5697,4 +8028,4 @@ declare class Composio$1<TProvider extends BaseComposioProvider<unknown, unknown
|
|
|
5697
8028
|
flush(): Promise<void>;
|
|
5698
8029
|
}
|
|
5699
8030
|
//#endregion
|
|
5700
|
-
export {
|
|
8031
|
+
export { WebhookSubscriptionEventTypeSchema as $, AuthConfigToolAccessConfigSchema as $n, ToolkitRetrieveResponseSchema as $r, TriggerEvent as $t, ToolExecutionLogParentSchema as A, VerifyWebhookParamsSchema as An, ToolkitChangelogItemSchema as Ar, UsageBreakdownGroup as At, WebhookEndpointListItemSchema as B, WebhookRequestLike as Bn, ToolkitListGrantContextsParamsSchema as Br, UsageOrderBySchema as Bt, LogSearchResponseSchema as C, TriggerTypeSchema as Cn, ToolkitAuthField as Cr, CustomToolkitSyncResponse as Ct, ToolExecutionLogDetail as D, TriggersTypeListResponseSchema as Dn, ToolkitCategory as Dr, CustomToolkitUpsertResponse as Dt, ToolExecutionLog as E, TriggersTypeListResponse as En, ToolkitAuthFieldsResponseSchema as Er, CustomToolkitUpsertParamsSchema as Et, Webhooks as F, WebhookPayloadV1Schema as Fn, ToolkitGetManyParams as Fr, UsageBreakdownResponseSchema as Ft, WebhookEndpointReplaceParams as G, WebhookVersions as Gn, ToolkitMangedByEnumSchema as Gr, UsageSummaryResponseSchema as Gt, WebhookEndpointListParamsSchema as H, WebhookTriggerPayloadV3 as Hn, ToolkitListGrantContextsResponseSchema as Hr, UsageSummaryParams as Ht, WebhookEndpoint as I, WebhookPayloadV2 as In, ToolkitGetManySlugsSchema as Ir, UsageEntitySummary as It, WebhookEndpointUpdateParams as J, AuthConfigListParamsSchema as Jn, ToolkitRecommendScopesResponse as Jr, IncomingTriggerPayloadSchema as Jt, WebhookEndpointReplaceParamsSchema as K, AuthConfigCreationToolAccessConfigSchema as Kn, ToolkitRecommendScopesParams as Kr, DefaultWebhookSubscriptionEvents as Kt, WebhookEndpointCreateParams as L, WebhookPayloadV2Schema as Ln, ToolkitGrantContextDimension as Lr, UsageEntitySummarySchema as Lt, ToolExecutionLogStatusSchema as M, WebhookPayload as Mn, ToolkitChangelogResponseSchema as Mr, UsageBreakdownParams as Mt, WebhookEndpoints as N, WebhookPayloadSchema as Nn, ToolkitConditionalScope as Nr, UsageBreakdownParamsSchema as Nt, ToolExecutionLogDetailSchema as O, TriggersTypeRetrieveResponse as On, ToolkitCategorySchema as Or, CustomToolkitUpsertResponseSchema as Ot, WebhookSubscriptions as P, WebhookPayloadV1 as Pn, ToolkitConditionalScopeSchema as Pr, UsageBreakdownResponse as Pt, WebhookSubscriptionEventType as Q, AuthConfigRetrieveResponseSchema as Qn, ToolkitRetrieveResponse as Qr, TriggerData as Qt, WebhookEndpointCreateParamsSchema as R, WebhookPayloadV3 as Rn, ToolkitGrantContextDimensionSchema as Rr, UsageFilters as Rt, LogSearchResponse as S, TriggerType as Sn, ToolkitAuthConfigDetailsSchema as Sr, CustomToolkitSyncParamsSchema as St, LogSearchTimeRangeSchema as T, TriggersTypeListParamsSchema as Tn, ToolkitAuthFieldsResponse as Tr, CustomToolkitUpsertParams as Tt, WebhookEndpointListResponse as U, WebhookTriggerPayloadV3Schema as Un, ToolkitListParams as Ur, UsageSummaryParamsSchema as Ut, WebhookEndpointListParams as V, WebhookSubscription as Vn, ToolkitListGrantContextsResponse as Vr, UsageOrderDirectionSchema as Vt, WebhookEndpointListResponseSchema as W, WebhookVersion as Wn, ToolkitMangedByEnum as Wr, UsageSummaryResponse as Wt, WebhookSubscriptionDeleteResponse as X, AuthConfigListResponseSchema as Xn, ToolkitRetrieveCategoriesResponse as Xr, SetWebhookSubscriptionParams as Xt, WebhookEndpointUpdateParamsSchema as Y, AuthConfigListResponse as Yn, ToolkitRecommendScopesResponseSchema as Yr, ParseWebhookOptions as Yt, WebhookSubscriptionDeleteResponseSchema as Z, AuthConfigRetrieveResponse as Zn, ToolkitRetrieveCategoriesResponseSchema as Zr, SetWebhookSubscriptionParamsSchema as Zt, LogSearchFilterOperator as _, TriggerStatusEnum as _n, ToolKitListResponse as _r, CustomToolkitAuthScheme as _t, ComposioLogger as a, ToolkitsListParamsSchema as ai, TriggerInstanceListActiveResponseItemSchema as an, AuthDefaultConfigUpdateParamsSchema as ar, WebhookSubscriptionListResponseSchema as at, LogSearchParams as b, TriggerSubscribeParamSchema as bn, ToolKitMetaSchema as br, CustomToolkitDeleteResponseSchema as bt, Keyring as c, TriggerInstanceManageDeleteResponseSchema as cn, AuthSchemeTypes as cr, WebhookSubscriptionSchema as ct, KeyringTransferKeysResponse as d, TriggerInstanceManageUpdateResponse as dn, CreateAuthConfigResponse as dr, WebhookSubscriptionUpdateParams as dt, ToolkitSortByEnum as ei, TriggerEventData as en, AuthConfigType as er, WebhookSubscriptionEventTypesResponse as et, KeyringTransferKeysResponseSchema as f, TriggerInstanceManageUpdateResponseSchema as fn, CreateAuthConfigResponseSchema as fr, WebhookSubscriptionUpdateParamsSchema as ft, LogSearchFilterFieldSchema as g, TriggerInstanceUpsertResponseSchema as gn, ToolKitItemSchema as gr, CustomToolkits as gt, LogSearchFilterField as h, TriggerInstanceUpsertResponse as hn, ToolKitItem as hr, Experimental as ht, OpenAIProvider as i, ToolkitsGetManyParamsSchema as ii, TriggerInstanceListActiveResponseItem as in, AuthCustomConfigUpdateParamsSchema as ir, WebhookSubscriptionListResponse as it, ToolExecutionLogSchema as j, VerifyWebhookResult as jn, ToolkitChangelogResponse as jr, UsageBreakdownGroupSchema as jt, ToolExecutionLogLevelSchema as k, VerifyWebhookParams as kn, ToolkitChangelogItem as kr, Usage as kt, KeyringTransferKey as l, TriggerInstanceManageUpdateParams as ln, CreateAuthConfigParams as lr, WebhookSubscriptionSetParams as lt, LogSearchFilter as m, TriggerInstanceUpsertParamsSchema as mn, CreateCustomAuthConfigParamsSchema as mr, MCP as mt, ComposioConfig as n, ToolkitVersionChangelog as ni, TriggerInstanceListActiveParamsSchema as nn, AuthConfigUpdateParams as nr, WebhookSubscriptionListParams as nt, LogLevel as o, TriggerInstanceListActiveResponseSchema as on, AuthSchemeEnum as or, WebhookSubscriptionRotateSecretResponse as ot, Logs as p, TriggerInstanceUpsertParams as pn, CreateComposioManagedAuthConfigParamsSchema as pr, WebhookVersionSchema as pt, WebhookEndpointSchema as q, AuthConfigListParams as qn, ToolkitRecommendScopesParamsSchema as qr, IncomingTriggerPayload as qt, Sessions as r, ToolkitVersionChangelogSchema as ri, TriggerInstanceListActiveResponse as rn, AuthConfigUpdateParamsSchema as rr, WebhookSubscriptionListParamsSchema as rt, logger as s, TriggerInstanceManageDeleteResponse as sn, AuthSchemeType as sr, WebhookSubscriptionRotateSecretResponseSchema as st, Composio$1 as t, ToolkitSortByEnumSchema as ti, TriggerInstanceListActiveParams as tn, AuthConfigTypes as tr, WebhookSubscriptionEventTypesResponseSchema as tt, KeyringTransferKeySchema as u, TriggerInstanceManageUpdateParamsSchema as un, CreateAuthConfigParamsSchema as ur, WebhookSubscriptionSetParamsSchema as ut, LogSearchFilterOperatorSchema as v, TriggerStatusType as vn, ToolKitListResponseSchema as vr, CustomToolkitAuthSchemeSchema as vt, LogSearchTimeRange as w, TriggersTypeListParams as wn, ToolkitAuthFieldSchema as wr, CustomToolkitSyncResponseSchema as wt, LogSearchParamsSchema as x, TriggerSubscribeParams as xn, ToolkitAuthConfigDetails as xr, CustomToolkitSyncParams as xt, LogSearchFilterSchema as y, TriggerStatuses as yn, ToolKitMeta as yr, CustomToolkitDeleteResponse as yt, WebhookEndpointListItem as z, WebhookPayloadV3Schema as zn, ToolkitListGrantContextsParams as zr, UsageFiltersSchema as zt };
|