@composio/core 0.1.12-alpha.11 → 0.1.12-alpha.13

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/index.d.ts CHANGED
@@ -1,8 +1,7 @@
1
1
  import ComposioClient from '@composio/client';
2
2
  import { z, ZodObject, ZodString, ZodNumber, ZodBoolean, ZodOptional } from 'zod';
3
3
  import { ToolProxyParams, ToolProxyResponse, ToolRetrieveEnumResponse, ToolGetInputParams, ToolGetInputResponse } from '@composio/client/resources/tools';
4
- import { RequestOptions } from '@composio/client/internal/request-options';
5
- import { TriggerInstanceListActiveParams, TriggerInstanceUpsertParams, TriggerInstanceUpsertResponse, TriggerInstanceRemoveUpsertResponse, TriggerInstanceUpdateStatusParams, TriggersTypeListParams, TriggersTypeListResponse, TriggersTypeRetrieveResponse, TriggersTypeRetrieveEnumResponse } from '@composio/client/resources/index';
4
+ import { TriggersTypeListParams, TriggersTypeListResponse, TriggersTypeRetrieveResponse, TriggersTypeRetrieveEnumResponse } from '@composio/client/resources/index';
6
5
  import { AuthConfigUpdateResponse, AuthConfigDeleteResponse, AuthConfigUpdateStatusResponse } from '@composio/client/resources/auth-configs';
7
6
  import { ConnectedAccountRetrieveResponse as ConnectedAccountRetrieveResponse$1, ConnectedAccountListResponse as ConnectedAccountListResponse$1, ConnectedAccountDeleteResponse, ConnectedAccountRefreshResponse, ConnectedAccountUpdateStatusParams, ConnectedAccountUpdateStatusResponse } from '@composio/client/resources/connected-accounts';
8
7
  import { OpenAI } from 'openai';
@@ -18,8 +17,50 @@ declare const ToolSchema: z.ZodObject<{
18
17
  slug: z.ZodString;
19
18
  name: z.ZodString;
20
19
  description: z.ZodOptional<z.ZodString>;
21
- inputParameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
22
- outputParameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
20
+ inputParameters: z.ZodOptional<z.ZodObject<{
21
+ type: z.ZodLiteral<"object">;
22
+ properties: z.ZodRecord<z.ZodString, z.ZodType<unknown, z.ZodTypeDef, unknown>>;
23
+ required: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
24
+ title: z.ZodOptional<z.ZodString>;
25
+ description: z.ZodOptional<z.ZodString>;
26
+ additionalProperties: z.ZodOptional<z.ZodBoolean>;
27
+ }, "strip", z.ZodTypeAny, {
28
+ type: "object";
29
+ properties: Record<string, unknown>;
30
+ description?: string | undefined;
31
+ title?: string | undefined;
32
+ required?: string[] | undefined;
33
+ additionalProperties?: boolean | undefined;
34
+ }, {
35
+ type: "object";
36
+ properties: Record<string, unknown>;
37
+ description?: string | undefined;
38
+ title?: string | undefined;
39
+ required?: string[] | undefined;
40
+ additionalProperties?: boolean | undefined;
41
+ }>>;
42
+ outputParameters: z.ZodOptional<z.ZodObject<{
43
+ type: z.ZodLiteral<"object">;
44
+ properties: z.ZodRecord<z.ZodString, z.ZodType<unknown, z.ZodTypeDef, unknown>>;
45
+ required: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
46
+ title: z.ZodOptional<z.ZodString>;
47
+ description: z.ZodOptional<z.ZodString>;
48
+ additionalProperties: z.ZodOptional<z.ZodBoolean>;
49
+ }, "strip", z.ZodTypeAny, {
50
+ type: "object";
51
+ properties: Record<string, unknown>;
52
+ description?: string | undefined;
53
+ title?: string | undefined;
54
+ required?: string[] | undefined;
55
+ additionalProperties?: boolean | undefined;
56
+ }, {
57
+ type: "object";
58
+ properties: Record<string, unknown>;
59
+ description?: string | undefined;
60
+ title?: string | undefined;
61
+ required?: string[] | undefined;
62
+ additionalProperties?: boolean | undefined;
63
+ }>>;
23
64
  tags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
24
65
  toolkit: z.ZodOptional<z.ZodObject<{
25
66
  slug: z.ZodString;
@@ -40,8 +81,22 @@ declare const ToolSchema: z.ZodObject<{
40
81
  name: string;
41
82
  tags: string[];
42
83
  description?: string | undefined;
43
- inputParameters?: Record<string, unknown> | undefined;
44
- outputParameters?: Record<string, unknown> | undefined;
84
+ inputParameters?: {
85
+ type: "object";
86
+ properties: Record<string, unknown>;
87
+ description?: string | undefined;
88
+ title?: string | undefined;
89
+ required?: string[] | undefined;
90
+ additionalProperties?: boolean | undefined;
91
+ } | undefined;
92
+ outputParameters?: {
93
+ type: "object";
94
+ properties: Record<string, unknown>;
95
+ description?: string | undefined;
96
+ title?: string | undefined;
97
+ required?: string[] | undefined;
98
+ additionalProperties?: boolean | undefined;
99
+ } | undefined;
45
100
  toolkit?: {
46
101
  slug: string;
47
102
  name: string;
@@ -52,8 +107,22 @@ declare const ToolSchema: z.ZodObject<{
52
107
  slug: string;
53
108
  name: string;
54
109
  description?: string | undefined;
55
- inputParameters?: Record<string, unknown> | undefined;
56
- outputParameters?: Record<string, unknown> | undefined;
110
+ inputParameters?: {
111
+ type: "object";
112
+ properties: Record<string, unknown>;
113
+ description?: string | undefined;
114
+ title?: string | undefined;
115
+ required?: string[] | undefined;
116
+ additionalProperties?: boolean | undefined;
117
+ } | undefined;
118
+ outputParameters?: {
119
+ type: "object";
120
+ properties: Record<string, unknown>;
121
+ description?: string | undefined;
122
+ title?: string | undefined;
123
+ required?: string[] | undefined;
124
+ additionalProperties?: boolean | undefined;
125
+ } | undefined;
57
126
  tags?: string[] | undefined;
58
127
  toolkit?: {
59
128
  slug: string;
@@ -67,32 +136,75 @@ type Tool = z.infer<typeof ToolSchema>;
67
136
  * Plain SDK level Tool List
68
137
  */
69
138
  type ToolList = Array<Tool>;
139
+ type ToolsOnlyParams = {
140
+ tools: string[];
141
+ toolkits?: never;
142
+ important?: never;
143
+ cursor?: never;
144
+ limit?: never;
145
+ search?: never;
146
+ };
147
+ type ToolkitsOnlyParams = {
148
+ tools?: never;
149
+ toolkits?: string[];
150
+ important?: boolean;
151
+ cursor?: string;
152
+ limit?: number;
153
+ search?: never;
154
+ };
155
+ type ToolkitSearchOnlyParams = {
156
+ tools?: never;
157
+ toolkits?: string[];
158
+ important?: never;
159
+ cursor?: string;
160
+ limit?: number;
161
+ search?: string;
162
+ };
70
163
  /**
71
164
  * ToolListParams is the parameters for the list of tools.
165
+ * You must provide either tools or toolkits, but not both.
72
166
  */
73
- declare const ToolListParamsSchema: z.ZodObject<{
74
- tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
167
+ type ToolListParams = ToolsOnlyParams | ToolkitsOnlyParams | ToolkitSearchOnlyParams;
168
+ declare const ToolListParamsSchema: z.ZodUnion<[z.ZodObject<{
169
+ tools: z.ZodArray<z.ZodString, "many">;
170
+ }, "strip", z.ZodTypeAny, {
171
+ tools: string[];
172
+ }, {
173
+ tools: string[];
174
+ }>, z.ZodObject<{
175
+ toolkits: z.ZodArray<z.ZodString, "many">;
176
+ important: z.ZodOptional<z.ZodBoolean>;
75
177
  cursor: z.ZodOptional<z.ZodString>;
76
- important: z.ZodOptional<z.ZodString>;
77
- limit: z.ZodOptional<z.ZodString>;
178
+ limit: z.ZodOptional<z.ZodNumber>;
78
179
  search: z.ZodOptional<z.ZodString>;
79
- toolkits: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
80
180
  }, "strip", z.ZodTypeAny, {
81
- tools?: string[] | undefined;
181
+ toolkits: string[];
182
+ important?: boolean | undefined;
82
183
  cursor?: string | undefined;
83
- important?: string | undefined;
84
- limit?: string | undefined;
184
+ limit?: number | undefined;
85
185
  search?: string | undefined;
86
- toolkits?: string[] | undefined;
87
186
  }, {
88
- tools?: string[] | undefined;
187
+ toolkits: string[];
188
+ important?: boolean | undefined;
89
189
  cursor?: string | undefined;
90
- important?: string | undefined;
91
- limit?: string | undefined;
190
+ limit?: number | undefined;
92
191
  search?: string | undefined;
192
+ }>, z.ZodObject<{
193
+ search: z.ZodString;
194
+ toolkits: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
195
+ cursor: z.ZodOptional<z.ZodString>;
196
+ limit: z.ZodOptional<z.ZodNumber>;
197
+ }, "strip", z.ZodTypeAny, {
198
+ search: string;
93
199
  toolkits?: string[] | undefined;
94
- }>;
95
- type ToolListParams = z.infer<typeof ToolListParamsSchema>;
200
+ cursor?: string | undefined;
201
+ limit?: number | undefined;
202
+ }, {
203
+ search: string;
204
+ toolkits?: string[] | undefined;
205
+ cursor?: string | undefined;
206
+ limit?: number | undefined;
207
+ }>]>;
96
208
  /**
97
209
  * CustomAuthParams is the parameters for the custom authentication.
98
210
  */
@@ -302,7 +414,7 @@ declare abstract class BaseProvider {
302
414
  _setExecuteToolFn(executeToolFn: GlobalExecuteToolFn): void;
303
415
  /**
304
416
  * @public
305
- * Gloabl function to execute a tool.
417
+ * Global function to execute a tool.
306
418
  * This function is used by provider providers to implement helper functions to execute tools.
307
419
  * This is a 1:1 mapping of the `execute` method in the `Tools` class.
308
420
  * @param {string} toolSlug - The slug of the tool to execute.
@@ -405,7 +517,7 @@ type BaseComposioProvider<TToolCollection, TTool> = BaseNonAgenticProvider<TTool
405
517
  * };
406
518
  * ```
407
519
  */
408
- type beforeExecuteModifier = (toolSlug: string, toolkitSlug: string, toolExecuteParams: ToolExecuteParams) => ToolExecuteParams;
520
+ type beforeExecuteModifier = (toolSlug: string, toolkitSlug: string, toolExecuteParams: ToolExecuteParams) => Promise<ToolExecuteParams>;
409
521
  /**
410
522
  * Modifier for altering the tool execution response after execution completes.
411
523
  *
@@ -456,7 +568,7 @@ type beforeExecuteModifier = (toolSlug: string, toolkitSlug: string, toolExecute
456
568
  * };
457
569
  * ```
458
570
  */
459
- type afterExecuteModifier = (toolSlug: string, toolkitSlug: string, toolExecuteResponse: ToolExecuteResponse) => ToolExecuteResponse;
571
+ type afterExecuteModifier = (toolSlug: string, toolkitSlug: string, toolExecuteResponse: ToolExecuteResponse) => Promise<ToolExecuteResponse>;
460
572
  /**
461
573
  * Modifier for altering the tool schema before it's exposed to consumers.
462
574
  *
@@ -516,7 +628,7 @@ type afterExecuteModifier = (toolSlug: string, toolkitSlug: string, toolExecuteR
516
628
  * };
517
629
  * ```
518
630
  */
519
- type TransformToolSchemaModifier = (toolSlug: string, toolkitSlug: string, toolSchema: Tool) => Tool;
631
+ type TransformToolSchemaModifier = (toolSlug: string, toolkitSlug: string, toolSchema: Tool) => Tool | Promise<Tool>;
520
632
  /**
521
633
  * Options for non-agentic tool configuration.
522
634
  *
@@ -727,7 +839,7 @@ declare class Tools<TToolCollection, TTool, TProvider extends BaseComposioProvid
727
839
  * );
728
840
  * ```
729
841
  */
730
- getRawComposioTools(userId: string, query?: ToolListParams, modifier?: TransformToolSchemaModifier): Promise<ToolList>;
842
+ getRawComposioTools(userId: string, query: ToolListParams, modifier?: TransformToolSchemaModifier): Promise<ToolList>;
731
843
  /**
732
844
  * Retrieves a tool by its Slug.
733
845
  * This method is used to get the raw tools from the composio API.
@@ -791,8 +903,10 @@ declare class Tools<TToolCollection, TTool, TProvider extends BaseComposioProvid
791
903
  get<T extends TProvider>(userId: string, slug: string, options?: ProviderOptions<TProvider>): Promise<ReturnType<T['wrapTools']>>;
792
904
  /**
793
905
  * @internal
906
+ * @description
794
907
  * Creates a function that executes a tool.
795
- * This function is used by agentic the toolsets to execute the tool
908
+ * This function is used by agentic toolsets to execute the tool
909
+ *
796
910
  * @param {string} userId - The user id
797
911
  * @param {ExecuteToolModifiers} modifiers - The modifiers to be applied to the tool
798
912
  * @returns {ExecuteToolFn} The execute tool function
@@ -1536,12 +1650,11 @@ type ToolkitRetrieveCategoriesResponse = z.infer<typeof ToolkitRetrieveCategorie
1536
1650
  * Connected Account create parameters
1537
1651
  */
1538
1652
  declare const ConnectedAccountStatuses: {
1539
- readonly ACTIVE: "ACTIVE";
1540
- readonly INACTIVE: "INACTIVE";
1541
- readonly DELETED: "DELETED";
1653
+ readonly INITIALIZING: "INITIALIZING";
1542
1654
  readonly INITIATED: "INITIATED";
1543
- readonly EXPIRED: "EXPIRED";
1655
+ readonly ACTIVE: "ACTIVE";
1544
1656
  readonly FAILED: "FAILED";
1657
+ readonly EXPIRED: "EXPIRED";
1545
1658
  };
1546
1659
  type ConnectedAccountStatus = (typeof ConnectedAccountStatuses)[keyof typeof ConnectedAccountStatuses];
1547
1660
  type CreateConnectedAccountOptions = z.infer<typeof CreateConnectedAccountOptionsSchema>;
@@ -1577,7 +1690,7 @@ declare const ConnectedAccountRetrieveResponseSchema: z.ZodObject<{
1577
1690
  userId: z.ZodString;
1578
1691
  data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1579
1692
  params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1580
- status: z.ZodEnum<["ACTIVE", "INACTIVE", "DELETED", "INITIATED", "EXPIRED", "FAILED"]>;
1693
+ status: z.ZodEnum<["INITIALIZING", "INITIATED", "ACTIVE", "FAILED", "EXPIRED"]>;
1581
1694
  statusReason: z.ZodNullable<z.ZodString>;
1582
1695
  toolkit: z.ZodObject<{
1583
1696
  slug: z.ZodString;
@@ -1591,7 +1704,7 @@ declare const ConnectedAccountRetrieveResponseSchema: z.ZodObject<{
1591
1704
  createdAt: z.ZodString;
1592
1705
  updatedAt: z.ZodString;
1593
1706
  }, "strip", z.ZodTypeAny, {
1594
- status: "ACTIVE" | "INACTIVE" | "DELETED" | "INITIATED" | "EXPIRED" | "FAILED";
1707
+ status: "INITIALIZING" | "INITIATED" | "ACTIVE" | "FAILED" | "EXPIRED";
1595
1708
  toolkit: {
1596
1709
  slug: string;
1597
1710
  };
@@ -1611,7 +1724,7 @@ declare const ConnectedAccountRetrieveResponseSchema: z.ZodObject<{
1611
1724
  params?: Record<string, unknown> | undefined;
1612
1725
  testRequestEndpoint?: string | undefined;
1613
1726
  }, {
1614
- status: "ACTIVE" | "INACTIVE" | "DELETED" | "INITIATED" | "EXPIRED" | "FAILED";
1727
+ status: "INITIALIZING" | "INITIATED" | "ACTIVE" | "FAILED" | "EXPIRED";
1615
1728
  toolkit: {
1616
1729
  slug: string;
1617
1730
  };
@@ -1638,7 +1751,7 @@ declare const ConnectedAccountListParamsSchema: z.ZodObject<{
1638
1751
  labels: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
1639
1752
  limit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1640
1753
  orderBy: z.ZodOptional<z.ZodEnum<["created_at", "updated_at"]>>;
1641
- statuses: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["ACTIVE", "INACTIVE", "DELETED", "INITIATED", "EXPIRED", "FAILED"]>, "many">>>;
1754
+ statuses: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["INITIALIZING", "INITIATED", "ACTIVE", "FAILED", "EXPIRED"]>, "many">>>;
1642
1755
  toolkitSlugs: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
1643
1756
  userIds: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
1644
1757
  }, "strip", z.ZodTypeAny, {
@@ -1647,7 +1760,7 @@ declare const ConnectedAccountListParamsSchema: z.ZodObject<{
1647
1760
  authConfigIds?: string[] | null | undefined;
1648
1761
  labels?: string[] | null | undefined;
1649
1762
  orderBy?: "created_at" | "updated_at" | undefined;
1650
- statuses?: ("ACTIVE" | "INACTIVE" | "DELETED" | "INITIATED" | "EXPIRED" | "FAILED")[] | null | undefined;
1763
+ statuses?: ("INITIALIZING" | "INITIATED" | "ACTIVE" | "FAILED" | "EXPIRED")[] | null | undefined;
1651
1764
  toolkitSlugs?: string[] | null | undefined;
1652
1765
  userIds?: string[] | null | undefined;
1653
1766
  }, {
@@ -1656,7 +1769,7 @@ declare const ConnectedAccountListParamsSchema: z.ZodObject<{
1656
1769
  authConfigIds?: string[] | null | undefined;
1657
1770
  labels?: string[] | null | undefined;
1658
1771
  orderBy?: "created_at" | "updated_at" | undefined;
1659
- statuses?: ("ACTIVE" | "INACTIVE" | "DELETED" | "INITIATED" | "EXPIRED" | "FAILED")[] | null | undefined;
1772
+ statuses?: ("INITIALIZING" | "INITIATED" | "ACTIVE" | "FAILED" | "EXPIRED")[] | null | undefined;
1660
1773
  toolkitSlugs?: string[] | null | undefined;
1661
1774
  userIds?: string[] | null | undefined;
1662
1775
  }>;
@@ -1683,7 +1796,7 @@ declare const ConnectedAccountListResponseSchema: z.ZodObject<{
1683
1796
  userId: z.ZodString;
1684
1797
  data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1685
1798
  params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1686
- status: z.ZodEnum<["ACTIVE", "INACTIVE", "DELETED", "INITIATED", "EXPIRED", "FAILED"]>;
1799
+ status: z.ZodEnum<["INITIALIZING", "INITIATED", "ACTIVE", "FAILED", "EXPIRED"]>;
1687
1800
  statusReason: z.ZodNullable<z.ZodString>;
1688
1801
  toolkit: z.ZodObject<{
1689
1802
  slug: z.ZodString;
@@ -1697,7 +1810,7 @@ declare const ConnectedAccountListResponseSchema: z.ZodObject<{
1697
1810
  createdAt: z.ZodString;
1698
1811
  updatedAt: z.ZodString;
1699
1812
  }, "strip", z.ZodTypeAny, {
1700
- status: "ACTIVE" | "INACTIVE" | "DELETED" | "INITIATED" | "EXPIRED" | "FAILED";
1813
+ status: "INITIALIZING" | "INITIATED" | "ACTIVE" | "FAILED" | "EXPIRED";
1701
1814
  toolkit: {
1702
1815
  slug: string;
1703
1816
  };
@@ -1717,7 +1830,7 @@ declare const ConnectedAccountListResponseSchema: z.ZodObject<{
1717
1830
  params?: Record<string, unknown> | undefined;
1718
1831
  testRequestEndpoint?: string | undefined;
1719
1832
  }, {
1720
- status: "ACTIVE" | "INACTIVE" | "DELETED" | "INITIATED" | "EXPIRED" | "FAILED";
1833
+ status: "INITIALIZING" | "INITIATED" | "ACTIVE" | "FAILED" | "EXPIRED";
1721
1834
  toolkit: {
1722
1835
  slug: string;
1723
1836
  };
@@ -1741,7 +1854,7 @@ declare const ConnectedAccountListResponseSchema: z.ZodObject<{
1741
1854
  totalPages: z.ZodNumber;
1742
1855
  }, "strip", z.ZodTypeAny, {
1743
1856
  items: {
1744
- status: "ACTIVE" | "INACTIVE" | "DELETED" | "INITIATED" | "EXPIRED" | "FAILED";
1857
+ status: "INITIALIZING" | "INITIATED" | "ACTIVE" | "FAILED" | "EXPIRED";
1745
1858
  toolkit: {
1746
1859
  slug: string;
1747
1860
  };
@@ -1765,7 +1878,7 @@ declare const ConnectedAccountListResponseSchema: z.ZodObject<{
1765
1878
  totalPages: number;
1766
1879
  }, {
1767
1880
  items: {
1768
- status: "ACTIVE" | "INACTIVE" | "DELETED" | "INITIATED" | "EXPIRED" | "FAILED";
1881
+ status: "INITIALIZING" | "INITIATED" | "ACTIVE" | "FAILED" | "EXPIRED";
1769
1882
  toolkit: {
1770
1883
  slug: string;
1771
1884
  };
@@ -1844,6 +1957,15 @@ declare class ConnectionRequest {
1844
1957
  * ```
1845
1958
  */
1846
1959
  waitForConnection(timeout?: number): Promise<ConnectedAccountRetrieveResponse>;
1960
+ /**
1961
+ * Returns a JSON-serializable representation of the connection request
1962
+ * Excludes the private client property to avoid cyclic reference issues
1963
+ */
1964
+ toJSON(): Record<string, unknown>;
1965
+ /**
1966
+ * Returns a string representation of the connection request
1967
+ */
1968
+ toString(): string;
1847
1969
  }
1848
1970
 
1849
1971
  /**
@@ -1951,53 +2073,275 @@ declare class Toolkits {
1951
2073
  authorize(userId: string, toolkitSlug: string): Promise<ConnectionRequest>;
1952
2074
  }
1953
2075
 
1954
- type TriggerStatusEnum = "enable" | "disable";
1955
- declare const ZTriggerSubscribeParam: z.ZodObject<{
1956
- appName: z.ZodOptional<z.ZodString>;
2076
+ declare const TriggerSubscribeParamSchema: z.ZodObject<{
2077
+ toolkits: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1957
2078
  triggerId: z.ZodOptional<z.ZodString>;
1958
- connectionId: z.ZodOptional<z.ZodString>;
1959
- integrationId: z.ZodOptional<z.ZodString>;
1960
- triggerName: z.ZodOptional<z.ZodString>;
2079
+ connectedAccountId: z.ZodOptional<z.ZodString>;
2080
+ authConfigId: z.ZodOptional<z.ZodString>;
2081
+ triggerSlug: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1961
2082
  triggerData: z.ZodOptional<z.ZodString>;
1962
- entityId: z.ZodOptional<z.ZodString>;
2083
+ userId: z.ZodOptional<z.ZodString>;
1963
2084
  }, "strip", z.ZodTypeAny, {
1964
- appName?: string | undefined;
2085
+ toolkits?: string[] | undefined;
2086
+ connectedAccountId?: string | undefined;
2087
+ userId?: string | undefined;
1965
2088
  triggerId?: string | undefined;
1966
- connectionId?: string | undefined;
1967
- integrationId?: string | undefined;
1968
- triggerName?: string | undefined;
2089
+ authConfigId?: string | undefined;
2090
+ triggerSlug?: string[] | undefined;
1969
2091
  triggerData?: string | undefined;
1970
- entityId?: string | undefined;
1971
2092
  }, {
1972
- appName?: string | undefined;
2093
+ toolkits?: string[] | undefined;
2094
+ connectedAccountId?: string | undefined;
2095
+ userId?: string | undefined;
1973
2096
  triggerId?: string | undefined;
1974
- connectionId?: string | undefined;
1975
- integrationId?: string | undefined;
1976
- triggerName?: string | undefined;
2097
+ authConfigId?: string | undefined;
2098
+ triggerSlug?: string[] | undefined;
1977
2099
  triggerData?: string | undefined;
1978
- entityId?: string | undefined;
1979
2100
  }>;
1980
- type TriggerSubscribeParams = z.infer<typeof ZTriggerSubscribeParam>;
1981
-
1982
- type TriggerData = {
1983
- appName: string;
1984
- clientId: number;
1985
- payload: Record<string, unknown>;
1986
- originalPayload: Record<string, unknown>;
1987
- metadata: {
2101
+ type TriggerSubscribeParams = z.infer<typeof TriggerSubscribeParamSchema>;
2102
+ declare const TriggerInstanceListActiveParamsSchema: z.ZodObject<{
2103
+ authConfigIds: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
2104
+ connectedAccountIds: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
2105
+ limit: z.ZodOptional<z.ZodNumber>;
2106
+ page: z.ZodOptional<z.ZodNumber>;
2107
+ showDisabled: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
2108
+ triggerIds: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
2109
+ triggerNames: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
2110
+ }, "strip", z.ZodTypeAny, {
2111
+ limit?: number | undefined;
2112
+ authConfigIds?: string[] | null | undefined;
2113
+ connectedAccountIds?: string[] | null | undefined;
2114
+ page?: number | undefined;
2115
+ showDisabled?: boolean | null | undefined;
2116
+ triggerIds?: string[] | null | undefined;
2117
+ triggerNames?: string[] | null | undefined;
2118
+ }, {
2119
+ limit?: number | undefined;
2120
+ authConfigIds?: string[] | null | undefined;
2121
+ connectedAccountIds?: string[] | null | undefined;
2122
+ page?: number | undefined;
2123
+ showDisabled?: boolean | null | undefined;
2124
+ triggerIds?: string[] | null | undefined;
2125
+ triggerNames?: string[] | null | undefined;
2126
+ }>;
2127
+ type TriggerInstanceListActiveParams = z.infer<typeof TriggerInstanceListActiveParamsSchema>;
2128
+ declare const TriggerInstanceListActiveResponseSchema: z.ZodObject<{
2129
+ items: z.ZodArray<z.ZodObject<{
2130
+ id: z.ZodString;
2131
+ connectedAccountId: z.ZodString;
2132
+ disabledAt: z.ZodNullable<z.ZodString>;
2133
+ state: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2134
+ triggerConfig: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2135
+ triggerName: z.ZodString;
2136
+ updatedAt: z.ZodString;
2137
+ triggerData: z.ZodOptional<z.ZodString>;
2138
+ uuid: z.ZodOptional<z.ZodString>;
2139
+ }, "strip", z.ZodTypeAny, {
2140
+ connectedAccountId: string;
2141
+ updatedAt: string;
1988
2142
  id: string;
1989
- connectionId: string;
2143
+ disabledAt: string | null;
2144
+ state: Record<string, unknown>;
2145
+ triggerConfig: Record<string, unknown>;
1990
2146
  triggerName: string;
1991
- triggerData: string;
2147
+ uuid?: string | undefined;
2148
+ triggerData?: string | undefined;
2149
+ }, {
2150
+ connectedAccountId: string;
2151
+ updatedAt: string;
2152
+ id: string;
2153
+ disabledAt: string | null;
2154
+ state: Record<string, unknown>;
1992
2155
  triggerConfig: Record<string, unknown>;
1993
- connection: {
2156
+ triggerName: string;
2157
+ uuid?: string | undefined;
2158
+ triggerData?: string | undefined;
2159
+ }>, "many">;
2160
+ nextCursor: z.ZodNullable<z.ZodString>;
2161
+ totalPages: z.ZodNumber;
2162
+ }, "strip", z.ZodTypeAny, {
2163
+ items: {
2164
+ connectedAccountId: string;
2165
+ updatedAt: string;
2166
+ id: string;
2167
+ disabledAt: string | null;
2168
+ state: Record<string, unknown>;
2169
+ triggerConfig: Record<string, unknown>;
2170
+ triggerName: string;
2171
+ uuid?: string | undefined;
2172
+ triggerData?: string | undefined;
2173
+ }[];
2174
+ nextCursor: string | null;
2175
+ totalPages: number;
2176
+ }, {
2177
+ items: {
2178
+ connectedAccountId: string;
2179
+ updatedAt: string;
2180
+ id: string;
2181
+ disabledAt: string | null;
2182
+ state: Record<string, unknown>;
2183
+ triggerConfig: Record<string, unknown>;
2184
+ triggerName: string;
2185
+ uuid?: string | undefined;
2186
+ triggerData?: string | undefined;
2187
+ }[];
2188
+ nextCursor: string | null;
2189
+ totalPages: number;
2190
+ }>;
2191
+ type TriggerInstanceListActiveResponse = z.infer<typeof TriggerInstanceListActiveResponseSchema>;
2192
+ declare const TriggerInstanceUpsertParamsSchema: z.ZodObject<{
2193
+ connectedAccountId: z.ZodOptional<z.ZodString>;
2194
+ triggerConfig: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2195
+ }, "strip", z.ZodTypeAny, {
2196
+ connectedAccountId?: string | undefined;
2197
+ triggerConfig?: Record<string, unknown> | undefined;
2198
+ }, {
2199
+ connectedAccountId?: string | undefined;
2200
+ triggerConfig?: Record<string, unknown> | undefined;
2201
+ }>;
2202
+ type TriggerInstanceUpsertParams = z.infer<typeof TriggerInstanceUpsertParamsSchema>;
2203
+ declare const TriggerInstanceUpsertResponseSchema: z.ZodObject<{
2204
+ triggerId: z.ZodString;
2205
+ }, "strip", z.ZodTypeAny, {
2206
+ triggerId: string;
2207
+ }, {
2208
+ triggerId: string;
2209
+ }>;
2210
+ type TriggerInstanceUpsertResponse = z.infer<typeof TriggerInstanceUpsertResponseSchema>;
2211
+ declare const TriggerInstanceManageUpdateParamsSchema: z.ZodObject<{
2212
+ status: z.ZodEnum<["enable", "disable"]>;
2213
+ }, "strip", z.ZodTypeAny, {
2214
+ status: "enable" | "disable";
2215
+ }, {
2216
+ status: "enable" | "disable";
2217
+ }>;
2218
+ type TriggerInstanceManageUpdateParams = z.infer<typeof TriggerInstanceManageUpdateParamsSchema>;
2219
+ declare const TriggerInstanceManageUpdateResponseSchema: z.ZodObject<{
2220
+ status: z.ZodEnum<["success"]>;
2221
+ }, "strip", z.ZodTypeAny, {
2222
+ status: "success";
2223
+ }, {
2224
+ status: "success";
2225
+ }>;
2226
+ type TriggerInstanceManageUpdateResponse = z.infer<typeof TriggerInstanceManageUpdateResponseSchema>;
2227
+ declare const TriggerInstanceManageDeleteResponseSchema: z.ZodObject<{
2228
+ triggerId: z.ZodString;
2229
+ }, "strip", z.ZodTypeAny, {
2230
+ triggerId: string;
2231
+ }, {
2232
+ triggerId: string;
2233
+ }>;
2234
+ type TriggerInstanceManageDeleteResponse = z.infer<typeof TriggerInstanceManageDeleteResponseSchema>;
2235
+ declare const IncomingTriggerPayloadSchema: z.ZodObject<{
2236
+ id: z.ZodString;
2237
+ triggerSlug: z.ZodString;
2238
+ toolkitSlug: z.ZodString;
2239
+ userId: z.ZodString;
2240
+ payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2241
+ originalPayload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2242
+ metadata: z.ZodObject<{
2243
+ id: z.ZodString;
2244
+ toolkitSlug: z.ZodString;
2245
+ triggerSlug: z.ZodString;
2246
+ triggerData: z.ZodOptional<z.ZodString>;
2247
+ triggerConfig: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2248
+ connectedAccount: z.ZodObject<{
2249
+ id: z.ZodString;
2250
+ uuid: z.ZodString;
2251
+ authConfigId: z.ZodString;
2252
+ authConfigUUID: z.ZodString;
2253
+ userId: z.ZodString;
2254
+ status: z.ZodEnum<["ACTIVE", "INACTIVE"]>;
2255
+ }, "strip", z.ZodTypeAny, {
2256
+ status: "ACTIVE" | "INACTIVE";
2257
+ userId: string;
2258
+ id: string;
2259
+ uuid: string;
2260
+ authConfigId: string;
2261
+ authConfigUUID: string;
2262
+ }, {
2263
+ status: "ACTIVE" | "INACTIVE";
2264
+ userId: string;
1994
2265
  id: string;
1995
- integrationId: string;
1996
- clientUniqueUserId: string;
1997
- status: string;
2266
+ uuid: string;
2267
+ authConfigId: string;
2268
+ authConfigUUID: string;
2269
+ }>;
2270
+ }, "strip", z.ZodTypeAny, {
2271
+ toolkitSlug: string;
2272
+ id: string;
2273
+ triggerSlug: string;
2274
+ triggerConfig: Record<string, unknown>;
2275
+ connectedAccount: {
2276
+ status: "ACTIVE" | "INACTIVE";
2277
+ userId: string;
2278
+ id: string;
2279
+ uuid: string;
2280
+ authConfigId: string;
2281
+ authConfigUUID: string;
1998
2282
  };
2283
+ triggerData?: string | undefined;
2284
+ }, {
2285
+ toolkitSlug: string;
2286
+ id: string;
2287
+ triggerSlug: string;
2288
+ triggerConfig: Record<string, unknown>;
2289
+ connectedAccount: {
2290
+ status: "ACTIVE" | "INACTIVE";
2291
+ userId: string;
2292
+ id: string;
2293
+ uuid: string;
2294
+ authConfigId: string;
2295
+ authConfigUUID: string;
2296
+ };
2297
+ triggerData?: string | undefined;
2298
+ }>;
2299
+ }, "strip", z.ZodTypeAny, {
2300
+ userId: string;
2301
+ toolkitSlug: string;
2302
+ id: string;
2303
+ triggerSlug: string;
2304
+ metadata: {
2305
+ toolkitSlug: string;
2306
+ id: string;
2307
+ triggerSlug: string;
2308
+ triggerConfig: Record<string, unknown>;
2309
+ connectedAccount: {
2310
+ status: "ACTIVE" | "INACTIVE";
2311
+ userId: string;
2312
+ id: string;
2313
+ uuid: string;
2314
+ authConfigId: string;
2315
+ authConfigUUID: string;
2316
+ };
2317
+ triggerData?: string | undefined;
1999
2318
  };
2000
- };
2319
+ payload?: Record<string, unknown> | undefined;
2320
+ originalPayload?: Record<string, unknown> | undefined;
2321
+ }, {
2322
+ userId: string;
2323
+ toolkitSlug: string;
2324
+ id: string;
2325
+ triggerSlug: string;
2326
+ metadata: {
2327
+ toolkitSlug: string;
2328
+ id: string;
2329
+ triggerSlug: string;
2330
+ triggerConfig: Record<string, unknown>;
2331
+ connectedAccount: {
2332
+ status: "ACTIVE" | "INACTIVE";
2333
+ userId: string;
2334
+ id: string;
2335
+ uuid: string;
2336
+ authConfigId: string;
2337
+ authConfigUUID: string;
2338
+ };
2339
+ triggerData?: string | undefined;
2340
+ };
2341
+ payload?: Record<string, unknown> | undefined;
2342
+ originalPayload?: Record<string, unknown> | undefined;
2343
+ }>;
2344
+ type IncomingTriggerPayload = z.infer<typeof IncomingTriggerPayloadSchema>;
2001
2345
 
2002
2346
  /**
2003
2347
  * Trigger (Instance) class
@@ -2006,12 +2350,33 @@ type TriggerData = {
2006
2350
  */
2007
2351
  declare class Triggers {
2008
2352
  private client;
2353
+ private pusherService;
2009
2354
  constructor(client: ComposioClient);
2355
+ /**
2356
+ * Parse the trigger instance list active item
2357
+ *
2358
+ * @param response - The response from the composio client
2359
+ * @returns The parsed trigger instance list active item
2360
+ */
2361
+ private parseTriggerInstanceListActiveItem;
2010
2362
  /**
2011
2363
  * Fetch list of all the active triggers
2012
- * @returns {Promise<TriggerInstance[]>} List of trigger instances
2364
+ *
2365
+ * @param {TriggerInstanceListActiveParams} query - The query parameters to filter the trigger instances
2366
+ * @returns {Promise<TriggerInstanceListActiveResponse>} List of trigger instances
2367
+ *
2368
+ * @throws {ValidationError} If the parameters are invalid
2369
+ * @throws {Error} If the client is not authenticated
2370
+ *
2371
+ * @example
2372
+ * ```ts
2373
+ * const triggers = await triggers.listActive({
2374
+ * authConfigIds: ['123'],
2375
+ * connectedAccountIds: ['456'],
2376
+ * });
2377
+ * ```
2013
2378
  */
2014
- list(query?: TriggerInstanceListActiveParams, options?: RequestOptions): Promise<ComposioClient.TriggerInstances.TriggerInstanceListActiveResponse>;
2379
+ listActive(query?: TriggerInstanceListActiveParams): Promise<TriggerInstanceListActiveResponse>;
2015
2380
  /**
2016
2381
  * Create a new trigger instance
2017
2382
  *
@@ -2019,47 +2384,36 @@ declare class Triggers {
2019
2384
  * @param {TriggerInstanceUpsertParams} body - The parameters to create the trigger instance
2020
2385
  * @returns {Promise<TriggerInstanceUpsertResponse>} The created trigger instance
2021
2386
  */
2022
- create(slug: string, body: TriggerInstanceUpsertParams, options?: RequestOptions): Promise<TriggerInstanceUpsertResponse>;
2387
+ create(slug: string, body: TriggerInstanceUpsertParams): Promise<TriggerInstanceUpsertResponse>;
2023
2388
  /**
2024
2389
  * Update an existing trigger instance
2025
2390
  *
2026
2391
  * @param {string} slug - The slug of the trigger instance
2027
- * @param {TriggerInstanceUpsertParams} body - The parameters to create the trigger instance
2392
+ * @param {TriggerInstanceManageUpdateParams} body - The parameters to create the trigger instance
2028
2393
  * @returns {Promise<TriggerInstanceUpsertResponse>} The updated trigger instance
2029
2394
  */
2030
- update(slug: string, body: TriggerInstanceUpsertParams, options?: RequestOptions): Promise<TriggerInstanceUpsertResponse>;
2395
+ update(slug: string, body: TriggerInstanceManageUpdateParams): Promise<TriggerInstanceManageUpdateResponse>;
2031
2396
  /**
2032
2397
  * Delete a trigger instance
2033
2398
  *
2034
- * @param {string} slug - The slug of the trigger instance
2399
+ * @param {string} triggerId - The slug of the trigger instance
2035
2400
  * @returns
2036
2401
  */
2037
- delete(slug: string): Promise<TriggerInstanceRemoveUpsertResponse>;
2038
- /**
2039
- * Update the status of a trigger
2040
- *
2041
- * @param {TriggerStatusEnum} status - The new status of the trigger
2042
- * @param {TriggerInstanceUpdateStatusParams} params - The parameters to update the trigger instance
2043
- * @param {RequestOptions} options - Request options
2044
- * @returns {Promise<TriggerInstanceUpsertResponse>} The updated trigger instance
2045
- */
2046
- updateStatus(status: TriggerStatusEnum, params: TriggerInstanceUpdateStatusParams, options?: RequestOptions): Promise<ComposioClient.TriggerInstances.TriggerInstanceUpdateStatusResponse>;
2402
+ delete(triggerId: string): Promise<TriggerInstanceManageDeleteResponse>;
2047
2403
  /**
2048
2404
  * Disable a trigger instance
2049
2405
  *
2050
- * @param {string} slug - The slug of the trigger instance
2051
- * @param {RequestOptions options - Request options
2406
+ * @param {string} triggerId - The id of the trigger instance
2052
2407
  * @returns {Promise<TriggerInstanceUpsertResponse>} The updated trigger instance
2053
2408
  */
2054
- disable(slug: string, options?: RequestOptions): Promise<ComposioClient.TriggerInstances.TriggerInstanceUpdateStatusResponse>;
2409
+ disable(triggerId: string): Promise<ComposioClient.TriggerInstances.Manage.ManageUpdateResponse>;
2055
2410
  /**
2056
2411
  * Enable a trigger instance
2057
2412
  *
2058
- * @param {string} slug - The slug of the trigger instance
2059
- * @param {RequestOptions options - Request options
2413
+ * @param {string} triggerId - The id of the trigger instance
2060
2414
  * @returns {Promise<TriggerInstanceUpsertResponse>} The updated trigger instance
2061
2415
  */
2062
- enable(slug: string, options?: RequestOptions): Promise<ComposioClient.TriggerInstances.TriggerInstanceUpdateStatusResponse>;
2416
+ enable(triggerId: string): Promise<ComposioClient.TriggerInstances.Manage.ManageUpdateResponse>;
2063
2417
  /**
2064
2418
  * @TODO Learn about trigger types
2065
2419
  */
@@ -2070,7 +2424,7 @@ declare class Triggers {
2070
2424
  * @param {RequestOptions} options - Request options
2071
2425
  * @returns {Promise<TriggersTypeListResponse>} The list of trigger types
2072
2426
  */
2073
- listTypes(query?: TriggersTypeListParams, options?: RequestOptions): Promise<TriggersTypeListResponse>;
2427
+ listTypes(query?: TriggersTypeListParams): Promise<TriggersTypeListResponse>;
2074
2428
  /**
2075
2429
  * Retrieve a trigger type by its slug
2076
2430
  *
@@ -2078,7 +2432,7 @@ declare class Triggers {
2078
2432
  * @param {RequestOptions} options - request options
2079
2433
  * @returns {Promise<TriggersTypeRetrieveResponse>} The trigger type object
2080
2434
  */
2081
- getType(slug: string, options?: RequestOptions): Promise<TriggersTypeRetrieveResponse>;
2435
+ getType(slug: string): Promise<TriggersTypeRetrieveResponse>;
2082
2436
  /**
2083
2437
  * Fetches the list of all the available trigger enums
2084
2438
  *
@@ -2086,8 +2440,36 @@ declare class Triggers {
2086
2440
  * @param options
2087
2441
  * @returns
2088
2442
  */
2089
- listEnum(options?: RequestOptions): Promise<TriggersTypeRetrieveEnumResponse>;
2090
- subscribe(fn: (_data: TriggerData) => void, filters?: TriggerSubscribeParams): Promise<void>;
2443
+ listEnum(): Promise<TriggersTypeRetrieveEnumResponse>;
2444
+ /**
2445
+ * Subscribe to all the triggers
2446
+ *
2447
+ * @param fn - The function to call when a trigger is received
2448
+ * @param filters - The filters to apply to the triggers
2449
+ *
2450
+ * @example
2451
+ * ```ts
2452
+ *
2453
+ * triggers.subscribe((data) => {
2454
+ * console.log(data);
2455
+ * }, );
2456
+ * ```
2457
+ */
2458
+ subscribe(fn: (_data: IncomingTriggerPayload) => void, filters?: TriggerSubscribeParams): Promise<void>;
2459
+ /**
2460
+ * Unsubscribe from all the triggers
2461
+ *
2462
+ * @returns {Promise<void>}
2463
+ *
2464
+ * @example
2465
+ * ```ts
2466
+ * composio.trigger.subscribe((data) => {
2467
+ * console.log(data);
2468
+ * });
2469
+ *
2470
+ * await triggers.unsubscribe();
2471
+ * ```
2472
+ */
2091
2473
  unsubscribe(): Promise<void>;
2092
2474
  }
2093
2475
 
@@ -2296,7 +2678,7 @@ declare const AuthConfigListResponseSchema: z.ZodObject<{
2296
2678
  createdBy?: string | undefined;
2297
2679
  lastUpdatedAt?: string | undefined;
2298
2680
  }>, "many">;
2299
- nextCursor: z.ZodOptional<z.ZodString>;
2681
+ nextCursor: z.ZodNullable<z.ZodString>;
2300
2682
  totalPages: z.ZodNumber;
2301
2683
  }, "strip", z.ZodTypeAny, {
2302
2684
  items: {
@@ -2317,8 +2699,8 @@ declare const AuthConfigListResponseSchema: z.ZodObject<{
2317
2699
  createdBy?: string | undefined;
2318
2700
  lastUpdatedAt?: string | undefined;
2319
2701
  }[];
2702
+ nextCursor: string | null;
2320
2703
  totalPages: number;
2321
- nextCursor?: string | undefined;
2322
2704
  }, {
2323
2705
  items: {
2324
2706
  name: string;
@@ -2338,8 +2720,8 @@ declare const AuthConfigListResponseSchema: z.ZodObject<{
2338
2720
  createdBy?: string | undefined;
2339
2721
  lastUpdatedAt?: string | undefined;
2340
2722
  }[];
2723
+ nextCursor: string | null;
2341
2724
  totalPages: number;
2342
- nextCursor?: string | undefined;
2343
2725
  }>;
2344
2726
  type AuthConfigListResponse = z.infer<typeof AuthConfigListResponseSchema>;
2345
2727
  declare const AuthConfigUpdateParamsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
@@ -2814,7 +3196,7 @@ declare class OpenAIProvider extends BaseNonAgenticProvider<OpenAiToolCollection
2814
3196
  * @param {string} userId - The user id.
2815
3197
  * @returns {Promise<string[]>} The results of the tool call.
2816
3198
  */
2817
- handleToolCall(userId: string, chatCompletion: OpenAI.ChatCompletion, options?: ExecuteToolFnOptions, modifiers?: ExecuteToolModifiers): Promise<string[]>;
3199
+ handleToolCalls(userId: string, chatCompletion: OpenAI.ChatCompletion, options?: ExecuteToolFnOptions, modifiers?: ExecuteToolModifiers): Promise<string[]>;
2818
3200
  /**
2819
3201
  * Handles all the tool calls from the assistant.
2820
3202
  *
@@ -2909,7 +3291,50 @@ declare class ComposioProvider extends BaseNonAgenticProvider<Array<CustomTool>,
2909
3291
  wrapTools(tools: Tool[]): CustomTool[];
2910
3292
  }
2911
3293
 
2912
- declare function jsonSchemaToModel(jsonSchema: Record<string, unknown>): z.ZodObject<Record<string, z.ZodTypeAny>>;
3294
+ /**
3295
+ * Convert a JSON schema to a Zod schema
3296
+ * @param jsonSchema - The JSON schema to convert
3297
+ * @returns The Zod schema
3298
+ *
3299
+ * @example
3300
+ * ```ts
3301
+ * const zodSchema = jsonSchemaToZodSchema({
3302
+ * type: 'object',
3303
+ * properties: {
3304
+ * name: { type: 'string' },
3305
+ * },
3306
+ * });
3307
+ *
3308
+ * console.log(zodSchema);
3309
+ * ```
3310
+ */
3311
+ declare function jsonSchemaToZodSchema(jsonSchema: Record<string, unknown>): z.ZodObject<Record<string, z.ZodTypeAny>>;
3312
+
3313
+ declare const LOG_LEVELS: {
3314
+ readonly silent: -1;
3315
+ readonly error: 0;
3316
+ readonly warn: 1;
3317
+ readonly info: 2;
3318
+ readonly debug: 3;
3319
+ };
3320
+ type LogLevel = keyof typeof LOG_LEVELS;
3321
+ interface LoggerOptions {
3322
+ level?: LogLevel;
3323
+ includeTimestamp?: boolean;
3324
+ }
3325
+ declare class Logger {
3326
+ private readonly level;
3327
+ private readonly includeTimestamp;
3328
+ private readonly console;
3329
+ constructor(options?: LoggerOptions);
3330
+ private formatMessage;
3331
+ private shouldLog;
3332
+ error(...args: unknown[]): void;
3333
+ warn(...args: unknown[]): void;
3334
+ info(...args: unknown[]): void;
3335
+ debug(...args: unknown[]): void;
3336
+ }
3337
+ declare const logger: Logger;
2913
3338
 
2914
3339
  /**
2915
3340
  * Options for error handling
@@ -2961,6 +3386,15 @@ declare class ComposioError extends Error {
2961
3386
  * @private
2962
3387
  */
2963
3388
  private definePropertyIfExists;
3389
+ /**
3390
+ * Helper method to combine stack traces when wrapping errors
3391
+ * This ensures the full call chain is preserved
3392
+ * @param originalStack The stack of the error being wrapped
3393
+ * @param currentStack The stack of the wrapper error
3394
+ * @returns Combined stack trace
3395
+ * @private
3396
+ */
3397
+ private static combineStackTraces;
2964
3398
  /**
2965
3399
  * Extract and normalize error data for formatting
2966
3400
  * @param includeStack Whether to include stack trace information
@@ -3097,4 +3531,4 @@ declare class ComposioNoAPIKeyError extends ComposioError {
3097
3531
  constructor(message?: string, options?: Omit<ComposioErrorOptions, 'code' | 'statusCode'>);
3098
3532
  }
3099
3533
 
3100
- export { type AgenticToolOptions, AuthConfigErrorCodes, type AuthConfigType, AuthConfigTypes, type AuthSchemeType, AuthSchemeTypes, BaseAgenticProvider, type BaseComposioProvider, BaseNonAgenticProvider, BaseTelemetryTransport, Composio, ComposioAuthConfigNotFoundError, ComposioConnectedAccountNotFoundError, ComposioCustomToolsNotInitializedError, ComposioError, type ComposioErrorOptions, ComposioGlobalExecuteToolFnNotSetError, ComposioInvalidExecuteFunctionError, ComposioInvalidModifierError, ComposioNoAPIKeyError, ComposioProvider, ComposioProviderNotDefinedError, ComposioToolExecutionError, ComposioToolNotFoundError, ComposioToolkitFetchError, ComposioToolkitNotFoundError, ConnectedAccountErrorCodes, ConnectionRequestErrorCodes, ConnectionRequestFailedError, ConnectionRequestTimeoutError, ConsoleTelemetryTransport, type ErrorHandleOptions, type ExecuteMetadata, type ExecuteToolFn, type ExecuteToolFnOptions, type ExecuteToolModifiers, OpenAIProvider, type Provider, SDKErrorCodes, type Tool, ToolErrorCodes, type ToolExecuteParams, type ToolListParams, ToolListParamsSchema, type ToolOptions, ToolkitErrorCodes, type TransformToolSchemaModifier, ValidationError, ValidationErrorCodes, type afterExecuteModifier, type beforeExecuteModifier, jsonSchemaToModel };
3534
+ export { type AgenticToolOptions, AuthConfigErrorCodes, type AuthConfigType, AuthConfigTypes, type AuthSchemeType, AuthSchemeTypes, BaseAgenticProvider, type BaseComposioProvider, BaseNonAgenticProvider, BaseTelemetryTransport, Composio, ComposioAuthConfigNotFoundError, ComposioConnectedAccountNotFoundError, ComposioCustomToolsNotInitializedError, ComposioError, type ComposioErrorOptions, ComposioGlobalExecuteToolFnNotSetError, ComposioInvalidExecuteFunctionError, ComposioInvalidModifierError, ComposioNoAPIKeyError, ComposioProvider, ComposioProviderNotDefinedError, ComposioToolExecutionError, ComposioToolNotFoundError, ComposioToolkitFetchError, ComposioToolkitNotFoundError, ConnectedAccountErrorCodes, ConnectionRequestErrorCodes, ConnectionRequestFailedError, ConnectionRequestTimeoutError, ConsoleTelemetryTransport, type ErrorHandleOptions, type ExecuteMetadata, type ExecuteToolFn, type ExecuteToolFnOptions, type ExecuteToolModifiers, OpenAIProvider, type Provider, SDKErrorCodes, type Tool, ToolErrorCodes, type ToolExecuteParams, type ToolListParams, ToolListParamsSchema, type ToolOptions, ToolkitErrorCodes, type TransformToolSchemaModifier, ValidationError, ValidationErrorCodes, type afterExecuteModifier, type beforeExecuteModifier, jsonSchemaToZodSchema, logger };