@composio/core 0.20.0 → 0.22.0

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.
Files changed (52) hide show
  1. package/dist/{CustomTool-fYEFjSLM.mjs → CustomTool-B-_VjWpy.mjs} +1 -1
  2. package/dist/{CustomTool-B3m-188G.d.mts → CustomTool-CKBCElpT.d.mts} +1 -1
  3. package/dist/{Telemetry-JRJJYS4I.mjs → Telemetry-41JkqpZ7.mjs} +3 -2
  4. package/dist/{cancellation-Dwa9lGHA.mjs → cancellation-DV8CIi52.mjs} +1 -1
  5. package/dist/{composio-B36OXii1.d.mts → composio-C-418N1P.d.mts} +542 -168
  6. package/dist/{customTool.types-C436M_D0.d.mts → customTool.types-CK408sI-.d.mts} +522 -66
  7. package/dist/docs/reference/sdk-reference/typescript/composio.mdx +2 -1
  8. package/dist/docs/reference/sdk-reference/typescript/index.mdx +1 -0
  9. package/dist/docs/reference/sdk-reference/typescript/meta.json +1 -0
  10. package/dist/docs/reference/sdk-reference/typescript/session-configs.mdx +83 -0
  11. package/dist/docs/reference/sdk-reference/typescript/session.mdx +29 -20
  12. package/dist/docs/reference/sdk-reference/typescript/sessions.mdx +10 -4
  13. package/dist/{errors-D_A4b2c2.mjs → errors-Dyiu3ifQ.mjs} +10 -6
  14. package/dist/experimental/index.d.mts +2 -2
  15. package/dist/experimental/index.mjs +1 -1
  16. package/dist/index.d.mts +40 -28
  17. package/dist/index.mjs +6815 -6571
  18. package/dist/models/Files.node.mjs +1 -1
  19. package/dist/{types-Br3GBya5.d.mts → types-RpMRVn4D.d.mts} +2 -2
  20. package/dist/utils/config-defaults/ConfigDefaults.node.d.mts +1 -1
  21. package/dist/utils/config-defaults/ConfigDefaults.workerd.d.mts +1 -1
  22. package/dist/utils/modifiers/FileToolModifier.node.d.mts +1 -1
  23. package/dist/utils/modifiers/FileToolModifier.node.mjs +2 -2
  24. package/dist/utils/modifiers/FileToolModifier.workerd.d.mts +1 -1
  25. package/package.json +5 -3
  26. package/src/composio.ts +8 -0
  27. package/src/errors/ToolRouterErrors.ts +10 -6
  28. package/src/index.ts +2 -0
  29. package/src/lib/sessionConfigConflict.ts +43 -0
  30. package/src/lib/toolRouterParams.ts +43 -10
  31. package/src/lib/toolRouterSourceSessionConfig.ts +12 -0
  32. package/src/models/AuthConfigs.ts +0 -9
  33. package/src/models/ConnectionRequest.ts +21 -18
  34. package/src/models/Logs.ts +2 -2
  35. package/src/models/RemoteFile.ts +25 -8
  36. package/src/models/SessionConfigs.ts +117 -0
  37. package/src/models/ToolRouter.ts +23 -5
  38. package/src/models/ToolRouterSession.ts +49 -24
  39. package/src/models/Tools.ts +7 -5
  40. package/src/models/Usage.ts +2 -1
  41. package/src/provider/OpenAIProvider.ts +0 -283
  42. package/src/telemetry/Telemetry.ts +4 -2
  43. package/src/types/logs.types.ts +9 -1
  44. package/src/types/sessionConfigs.types.ts +81 -0
  45. package/src/types/tool.types.ts +3 -1
  46. package/src/types/toolRouter.types.ts +177 -13
  47. package/src/types/usage.types.ts +2 -0
  48. package/src/utils/safePath.ts +172 -0
  49. package/src/utils/transformers/logs.ts +3 -2
  50. package/src/utils/transformers/sessionConfigs.ts +54 -0
  51. package/src/utils/transformers/toolRouterResponseTransform.ts +24 -0
  52. package/src/utils/transformers/usage.ts +4 -0
@@ -0,0 +1,117 @@
1
+ /**
2
+ * @fileoverview The `composio.sessionConfigs` namespace: read the saved
3
+ * Session configs of the project.
4
+ *
5
+ * @module SessionConfigs
6
+ */
7
+ import ComposioClient from '@composio/client';
8
+ import {
9
+ SessionConfig,
10
+ SessionConfigListParams,
11
+ SessionConfigListParamsSchema,
12
+ SessionConfigListResponse,
13
+ } from '../types/sessionConfigs.types';
14
+ import { ComposioRequestOptions } from '../types/requestOptions.types';
15
+ import { ValidationError } from '../errors/ValidationErrors';
16
+ import { telemetry } from '../telemetry/Telemetry';
17
+ import { withCancellation } from '../utils/cancellation';
18
+ import {
19
+ transformSessionConfig,
20
+ transformSessionConfigListResponse,
21
+ } from '../utils/transformers/sessionConfigs';
22
+
23
+ /**
24
+ * `composio.sessionConfigs` — saved, reusable Session configs.
25
+ *
26
+ * A Session config is a named access policy (`sc_…`) built in the Composio
27
+ * Dashboard under Sessions → Configs. Pass its id as
28
+ * `experimental.sessionConfigId` to `composio.sessions.create()` or
29
+ * `session.update()` to apply it.
30
+ *
31
+ * These endpoints require Session configs to be enabled for the project;
32
+ * otherwise the backend returns 403.
33
+ *
34
+ * @example
35
+ * ```typescript
36
+ * const { items } = await composio.sessionConfigs.list({ search: 'support' });
37
+ * const sessionConfig = await composio.sessionConfigs.get(items[0].id);
38
+ * const session = await composio.sessions.create('user_123', {
39
+ * experimental: { sessionConfigId: sessionConfig.id },
40
+ * });
41
+ * ```
42
+ */
43
+ export class SessionConfigs {
44
+ private client: ComposioClient;
45
+
46
+ constructor(client: ComposioClient) {
47
+ this.client = client;
48
+ telemetry.instrument(this, 'SessionConfigs');
49
+ }
50
+
51
+ /**
52
+ * List the project's saved Session configs with cursor pagination.
53
+ *
54
+ * Omitting `archived` returns active configs; `archived: true` returns only
55
+ * archived ones. The backend defaults `limit` to 20 and caps it at 100.
56
+ *
57
+ * Requires Session configs to be enabled for the project.
58
+ *
59
+ * @param {SessionConfigListParams} [params] - `search`, `archived`, `limit` and `cursor`
60
+ * @returns {Promise<SessionConfigListResponse>} Config summaries and the next cursor
61
+ * @throws {ValidationError} If the params fail validation
62
+ *
63
+ * @example
64
+ * ```typescript
65
+ * let cursor: string | undefined;
66
+ * do {
67
+ * const page = await composio.sessionConfigs.list({ cursor });
68
+ * for (const item of page.items) console.log(item.id, item.name);
69
+ * cursor = page.nextCursor ?? undefined;
70
+ * } while (cursor);
71
+ * ```
72
+ */
73
+ async list(
74
+ params?: SessionConfigListParams,
75
+ requestOptions?: ComposioRequestOptions
76
+ ): Promise<SessionConfigListResponse> {
77
+ const parsedParams = SessionConfigListParamsSchema.safeParse(params ?? {});
78
+ if (!parsedParams.success) {
79
+ throw new ValidationError('Failed to parse session config list params', {
80
+ cause: parsedParams.error,
81
+ });
82
+ }
83
+ const result = await withCancellation(
84
+ () => this.client.sessionConfigs.list(parsedParams.data, requestOptions),
85
+ requestOptions?.signal
86
+ );
87
+ return transformSessionConfigListResponse(result);
88
+ }
89
+
90
+ /**
91
+ * Retrieve one saved Session config with its description and access
92
+ * policy. A missing or cross-project id surfaces as the backend's 404.
93
+ *
94
+ * Requires Session configs to be enabled for the project.
95
+ *
96
+ * @param {string} id - The `sc_…` id of the Session config
97
+ * @returns {Promise<SessionConfig>} The config and its policy
98
+ * @throws {ValidationError} If `id` is empty
99
+ *
100
+ * @example
101
+ * ```typescript
102
+ * const sessionConfig = await composio.sessionConfigs.get('sc_abc123');
103
+ * console.log(sessionConfig.config.toolkits);
104
+ * ```
105
+ */
106
+ async get(id: string, requestOptions?: ComposioRequestOptions): Promise<SessionConfig> {
107
+ // An empty id would request the collection path and return a list page.
108
+ if (id.trim() === '') {
109
+ throw new ValidationError('Session config id must be a non-empty string');
110
+ }
111
+ const result = await withCancellation(
112
+ () => this.client.sessionConfigs.retrieve(id, requestOptions),
113
+ requestOptions?.signal
114
+ );
115
+ return transformSessionConfig(result);
116
+ }
117
+ }
@@ -44,16 +44,21 @@ import type {
44
44
  InlineCustomToolsWirePayload,
45
45
  } from '../types/customTool.types';
46
46
  import {
47
+ type SessionCreateBody,
47
48
  transformToolRouterTagsParams,
48
49
  transformToolRouterToolsParams,
49
50
  transformToolRouterManageConnectionsParams,
50
51
  transformToolRouterSandboxParams,
51
52
  transformToolRouterToolkitsParams,
52
53
  transformToolRouterMultiAccountParams,
54
+ transformToolRouterInstantParams,
53
55
  resolveToolRouterSandboxConfig,
54
56
  } from '../lib/toolRouterParams';
55
57
  import { PRELOAD_TOOLS_ALL } from '../lib/toolRouterConstants';
56
58
  import { buildMCPServerConfig } from '../lib/toolRouterMcp';
59
+ import { parseSessionConfigInput } from '../lib/sessionConfigConflict';
60
+ import { getSourceSessionConfig } from '../lib/toolRouterSourceSessionConfig';
61
+ import { transformSessionConfig } from '../utils/transformers/toolRouterResponseTransform';
57
62
  import { ToolRouterSession } from './ToolRouterSession';
58
63
  import { ComposioRequestOptions } from '../types/requestOptions.types';
59
64
  import { withCancellation } from '../utils/cancellation';
@@ -72,7 +77,7 @@ function getSessionMetadata(
72
77
  session: SessionCreateResponse | SessionRetrieveResponse | SessionAttachResponse
73
78
  ) {
74
79
  const metadata: ToolRouterSessionMetadata = {
75
- config: session.config,
80
+ config: transformSessionConfig(session.config),
76
81
  preload: session.config.preload,
77
82
  workbench: session.config.workbench,
78
83
  configVersion: session.config_version,
@@ -189,6 +194,12 @@ export class ToolRouter<
189
194
  * customToolkits: [myToolkit],
190
195
  * },
191
196
  * });
197
+ *
198
+ * // Start from a saved Session config instead of inline access fields
199
+ * const configured = await composio.sessions.create('user_123', {
200
+ * authConfigs: { github: 'ac_123' },
201
+ * experimental: { sessionConfigId: 'sc_123' },
202
+ * });
192
203
  * ```
193
204
  */
194
205
  // Overloads: passing `{ mcp: true }` surfaces `session.mcp` in the returned
@@ -209,7 +220,7 @@ export class ToolRouter<
209
220
  config?: ToolRouterCreateSessionConfig,
210
221
  requestOptions?: ComposioRequestOptions
211
222
  ): Promise<Session<TToolCollection, TTool, TProvider>> {
212
- const routerConfig = ToolRouterCreateSessionConfigSchema.parse(config ?? {});
223
+ const routerConfig = parseSessionConfigInput(ToolRouterCreateSessionConfigSchema, config ?? {});
213
224
  const isDirectToolsPreset = routerConfig.sessionPreset === SessionPreset.DIRECT_TOOLS;
214
225
 
215
226
  // Extract custom tools/toolkits from experimental config
@@ -226,6 +237,10 @@ export class ToolRouter<
226
237
  // Build the typed experimental payload for the backend
227
238
  const experimentalPayload: SessionCreateParams['experimental'] = {};
228
239
 
240
+ if (routerConfig.experimental?.sessionConfigId !== undefined) {
241
+ experimentalPayload.session_config_id = routerConfig.experimental.sessionConfigId;
242
+ }
243
+
229
244
  if (routerConfig.experimental?.assistivePrompt?.userTimezone) {
230
245
  experimentalPayload.assistive_prompt_config = {
231
246
  user_timezone: routerConfig.experimental.assistivePrompt.userTimezone,
@@ -254,11 +269,14 @@ export class ToolRouter<
254
269
  ])
255
270
  );
256
271
 
257
- const payload: SessionCreateParams = {
272
+ const payload: SessionCreateBody = {
258
273
  user_id: userId,
259
274
  auth_configs: routerConfig.authConfigs,
260
275
  connected_accounts: connectedAccountsPayload,
261
276
  toolkits: transformToolRouterToolkitsParams(routerConfig.toolkits),
277
+ ...(routerConfig.instant !== undefined && {
278
+ instant: transformToolRouterInstantParams(routerConfig.instant),
279
+ }),
262
280
  tools: transformToolRouterToolsParams(routerConfig.tools),
263
281
  tags: transformToolRouterTagsParams(routerConfig.tags),
264
282
  manage_connections: transformToolRouterManageConnectionsParams(
@@ -302,7 +320,7 @@ export class ToolRouter<
302
320
  this.config,
303
321
  session.session_id,
304
322
  this.createMCPServerConfig(session.mcp, routerConfig.mcp === true),
305
- { assistivePrompt },
323
+ { assistivePrompt, sourceSessionConfig: getSourceSessionConfig(session) },
306
324
  customToolsMap,
307
325
  userId,
308
326
  metadata
@@ -413,7 +431,7 @@ export class ToolRouter<
413
431
  this.config,
414
432
  session.session_id,
415
433
  this.createMCPServerConfig(session.mcp, options?.mcp === true),
416
- undefined,
434
+ { sourceSessionConfig: getSourceSessionConfig(session) },
417
435
  customToolsMap,
418
436
  userId,
419
437
  metadata
@@ -35,6 +35,7 @@ import {
35
35
  import {
36
36
  transformSearchResponse,
37
37
  transformExecuteResponse,
38
+ transformSessionConfig,
38
39
  } from '../utils/transformers/toolRouterResponseTransform';
39
40
  import { SessionMetaToolOptions } from '../types/modifiers.types';
40
41
  import { ConnectionRequest } from '../types/connectionRequest.types';
@@ -86,6 +87,8 @@ import {
86
87
  import { transformProxyParams } from './proxyParamsTransform';
87
88
  import { inlineCustomToolsExperimental } from './inlineCustomToolsPayload';
88
89
  import { transformToolRouterUpdateParams } from '../lib/toolRouterParams';
90
+ import { parseSessionConfigInput } from '../lib/sessionConfigConflict';
91
+ import { getSourceSessionConfig } from '../lib/toolRouterSourceSessionConfig';
89
92
  import { deleteToolRouterSession } from '../lib/toolRouterSessionDelete';
90
93
 
91
94
  const COMPOSIO_MULTI_EXECUTE_TOOL = 'COMPOSIO_MULTI_EXECUTE_TOOL';
@@ -129,9 +132,9 @@ export class ToolRouterSession<
129
132
  public readonly mcp: ToolRouterMCPServerConfig;
130
133
  public readonly experimental: SessionExperimental;
131
134
  /**
132
- * Server-side session configuration (toolkit/tool allowlists, tags, preload,
133
- * sandbox, manage_connections) as returned by the API. Refreshed in place by
134
- * `update()`.
135
+ * The session's current configuration (policy snapshot and runtime
136
+ * settings). Refreshed in place by `update()`. For saved, reusable Session
137
+ * configs, see `composio.sessionConfigs`.
135
138
  */
136
139
  public config: ToolRouterSessionConfig;
137
140
  public preload: ToolRouterSessionPreloadConfig;
@@ -139,8 +142,8 @@ export class ToolRouterSession<
139
142
  public sandbox?: ToolRouterSessionWorkbenchConfig;
140
143
  /**
141
144
  * Version of the server-side configuration this object last observed.
142
- * Refreshed in place by `update()`, which sends it as the
143
- * `expected_config_version` precondition by default.
145
+ * Refreshed in place by `update()`. Pass it as `expectedConfigVersion` to
146
+ * make an update conditional.
144
147
  */
145
148
  public configVersion?: number;
146
149
  public warnings: ToolRouterSessionWarning[];
@@ -155,7 +158,7 @@ export class ToolRouterSession<
155
158
  private readonly sdkConfig: ComposioConfig<TProvider> | undefined,
156
159
  sessionId: string,
157
160
  mcp: ToolRouterMCPServerConfig,
158
- experimentalOverrides?: Pick<SessionExperimental, 'assistivePrompt'>,
161
+ experimentalOverrides?: Pick<SessionExperimental, 'assistivePrompt' | 'sourceSessionConfig'>,
159
162
  private readonly customToolsMap?: CustomToolsMap,
160
163
  private readonly userId?: string,
161
164
  metadata?: ToolRouterSessionMetadata
@@ -165,7 +168,7 @@ export class ToolRouterSession<
165
168
  execute: {},
166
169
  search: {},
167
170
  preload: { tools: [] },
168
- premium_usage: false,
171
+ instant: false,
169
172
  };
170
173
  if (customToolsMap && !userId) {
171
174
  throw new Error('userId is required when custom tools are bound to a session.');
@@ -175,6 +178,7 @@ export class ToolRouterSession<
175
178
  this.experimental = {
176
179
  assistivePrompt: experimentalOverrides?.assistivePrompt,
177
180
  files: new ToolRouterSessionFilesMount(client, sessionId),
181
+ sourceSessionConfig: experimentalOverrides?.sourceSessionConfig,
178
182
  };
179
183
  this.config = config;
180
184
  this.preload = metadata?.preload ?? config.preload;
@@ -778,30 +782,37 @@ export class ToolRouterSession<
778
782
  * map entirely. `manageConnections.callbackUrl: null` removes only the
779
783
  * stored callback URL.
780
784
  *
781
- * The request carries the `configVersion` this object last observed as the
782
- * `expected_config_version` precondition, so a concurrent change surfaces as
785
+ * By default the request carries no precondition: the last writer wins.
786
+ * Pass `expectedConfigVersion` (for example `session.configVersion`) to make
787
+ * the update conditional: the API then applies it only when the stored
788
+ * version still matches, and a concurrent change surfaces as
783
789
  * {@link ComposioSessionConfigConflictError} (HTTP 409) instead of being
784
- * overwritten. Pass `expectedConfigVersion` to send another version, or
785
- * `expectedConfigVersion: false` to send no precondition (last writer
786
- * wins). The PATCH is never retried by the transport, so a 409 is reported
787
- * exactly once. On conflict this object is left unchanged: re-fetch the
788
- * session with `sessions.use(sessionId)` and retry against the fresh
789
- * `configVersion`.
790
+ * overwritten. The API must support the `expected_config_version` field;
791
+ * otherwise it rejects the request with a 400. `expectedConfigVersion: false`
792
+ * is the same as omitting it. The PATCH is never retried by the transport,
793
+ * so a 409 is reported exactly once. On conflict this object is left
794
+ * unchanged: re-fetch the session with `sessions.use(sessionId)` and retry
795
+ * against the fresh `configVersion`.
790
796
  *
791
- * `config`, `configVersion`, `preload`, `sandbox` and `warnings` are
792
- * refreshed in place only after a successful response, and the updated
793
- * `config` is returned.
797
+ * `experimental.sessionConfigId` applies a saved Session config: it
798
+ * replaces the session's toolkit, tool and tag access and cannot be combined
799
+ * with `toolkits`, `tools` or `tags` (a `ValidationError` is thrown before
800
+ * any request). A 409 while applying it means the session or the config
801
+ * changed; re-fetch the session and retry. Backend 400, 403 and 404 errors,
802
+ * for example for an archived or missing config, surface unchanged.
803
+ *
804
+ * `config`, `configVersion`, `preload`, `sandbox`, `warnings` and
805
+ * `experimental.sourceSessionConfig` are refreshed in place only after a
806
+ * successful response, and the updated `config` is returned.
794
807
  */
795
808
  async update(
796
809
  config: ToolRouterUpdateSessionConfig,
797
810
  requestOptions?: ComposioRequestOptions
798
811
  ): Promise<ToolRouterSessionConfig> {
799
- const parsed = ToolRouterUpdateSessionConfigSchema.parse(config);
812
+ const parsed = parseSessionConfigInput(ToolRouterUpdateSessionConfigSchema, config);
800
813
  const body = transformToolRouterUpdateParams(parsed);
801
814
  const expectedConfigVersion =
802
- parsed.expectedConfigVersion === false
803
- ? undefined
804
- : (parsed.expectedConfigVersion ?? this.configVersion);
815
+ parsed.expectedConfigVersion === false ? undefined : parsed.expectedConfigVersion;
805
816
  if (expectedConfigVersion !== undefined) {
806
817
  body.expected_config_version = expectedConfigVersion;
807
818
  }
@@ -821,6 +832,16 @@ export class ToolRouterSession<
821
832
  );
822
833
  } catch (error) {
823
834
  if (error instanceof ConflictError) {
835
+ const sessionConfigId = parsed.experimental?.sessionConfigId;
836
+ if (sessionConfigId !== undefined) {
837
+ throw new ComposioSessionConfigConflictError(
838
+ `Session ${this.sessionId} or Session config ${sessionConfigId} changed while the config was being applied; re-fetch the session and retry the update`,
839
+ {
840
+ cause: error,
841
+ meta: { sessionId: this.sessionId, sessionConfigId, expectedConfigVersion },
842
+ }
843
+ );
844
+ }
824
845
  throw new ComposioSessionConfigConflictError(
825
846
  expectedConfigVersion === undefined
826
847
  ? `Session ${this.sessionId} configuration changed while this update was in flight; re-fetch the session and retry the update`
@@ -835,10 +856,11 @@ export class ToolRouterSession<
835
856
  }
836
857
 
837
858
  this.configVersion = response.config_version;
838
- this.config = response.config;
859
+ this.config = transformSessionConfig(response.config);
839
860
  this.preload = response.config.preload;
840
861
  this.sandbox = response.config.workbench;
841
862
  this.warnings = response.warnings ?? [];
863
+ this.experimental.sourceSessionConfig = getSourceSessionConfig(response);
842
864
  return this.config;
843
865
  }
844
866
 
@@ -891,7 +913,7 @@ export class ToolRouterSession<
891
913
  version: item.version,
892
914
  createdAt: item.created_at,
893
915
  isCurrent: item.is_current,
894
- config: item.config,
916
+ config: transformSessionConfig(item.config),
895
917
  })),
896
918
  nextCursor: response.next_cursor ?? null,
897
919
  totalPages: response.total_pages,
@@ -1097,6 +1119,9 @@ export class ToolRouterSession<
1097
1119
  : `${failedCount} out of ${allResults.length} tools failed`
1098
1120
  : null,
1099
1121
  successful: !hasAnyError,
1122
+ ...(remoteResult?.instantCharge !== undefined && {
1123
+ instantCharge: remoteResult.instantCharge,
1124
+ }),
1100
1125
  };
1101
1126
  }
1102
1127
  }
@@ -62,6 +62,7 @@ import {
62
62
  import { dereferenceJsonSchema } from '../utils/jsonSchema';
63
63
  import { ComposioRequestOptions } from '../types/requestOptions.types';
64
64
  import { withCancellation } from '../utils/cancellation';
65
+ import { transformExecuteResponse } from '../utils/transformers/toolRouterResponseTransform';
65
66
  import { ComposioRequestCancelledError } from '../errors/SDKErrors';
66
67
 
67
68
  const TOOL_ROUTER_SESSION_TOOLS_PAGE_LIMIT = 500;
@@ -1257,12 +1258,13 @@ export class Tools<
1257
1258
  requestOptions?.signal
1258
1259
  );
1259
1260
 
1260
- // Prepare the result
1261
+ const { data, error, logId, instantCharge } = transformExecuteResponse(response);
1261
1262
  let result: ToolExecuteResponse = {
1262
- data: response.data,
1263
- error: response.error,
1264
- successful: !response.error,
1265
- logId: response.log_id,
1263
+ data,
1264
+ error,
1265
+ successful: !error,
1266
+ logId,
1267
+ ...(instantCharge !== undefined && { instantCharge }),
1266
1268
  };
1267
1269
 
1268
1270
  // Apply afterExecute modifier if provided
@@ -32,6 +32,7 @@ import {
32
32
  * ```typescript
33
33
  * const summary = await composio.experimental.usage.summary();
34
34
  * console.log(summary.entities.tool_calls?.totalQuantity);
35
+ * console.log(summary.instantCharge); // exact USD string
35
36
  *
36
37
  * const byTool = await composio.experimental.usage.breakdown('tool_calls', {
37
38
  * groupBy: 'tool_slug',
@@ -52,7 +53,7 @@ export class Usage {
52
53
  * **Experimental — shape may change in future releases.**
53
54
  *
54
55
  * @param {UsageSummaryParams} [params] - Optional range, `entityTypes` and filters
55
- * @returns {Promise<UsageSummaryResponse>} Totals keyed by entity type
56
+ * @returns {Promise<UsageSummaryResponse>} Totals keyed by entity type and the exact USD Instant charge
56
57
  * @throws {ValidationError} If the params fail validation
57
58
  *
58
59
  * @example