@composio/client 2.2.0 → 2.4.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 (129) hide show
  1. package/MIGRATION.md +13 -0
  2. package/README.md +4 -4
  3. package/dist/{_internal-C4ZzriQ6.d.mts → _internal-1d0QoPQ3.d.mts} +178 -13
  4. package/dist/{_internal-ChynSuwG.d.mts → _internal-uub7kBfy.d.mts} +4 -2
  5. package/dist/effect/internal.d.mts +1 -1
  6. package/dist/effect/schemas/_internal/logs/tools/retrieve.d.mts +1 -0
  7. package/dist/effect/schemas/_internal/logs/tools/retrieve.mjs +1 -0
  8. package/dist/effect/schemas/components/session-link-response-experimental.d.mts +2 -2
  9. package/dist/effect/schemas/components/session-link-response-experimental.mjs +2 -2
  10. package/dist/effect/schemas/connected-accounts/create.d.mts +2 -2
  11. package/dist/effect/schemas/connected-accounts/list.d.mts +3 -3
  12. package/dist/effect/schemas/connected-accounts/list.mjs +1 -1
  13. package/dist/effect/schemas/connected-accounts/retrieve.d.mts +3 -3
  14. package/dist/effect/schemas/connected-accounts/retrieve.mjs +1 -1
  15. package/dist/effect/schemas/link/create.d.mts +2 -2
  16. package/dist/effect/schemas/logs/create-tool-execution.d.mts +5 -0
  17. package/dist/effect/schemas/logs/create-tool-execution.mjs +5 -2
  18. package/dist/effect/schemas/logs/retrieve-tool-execution.d.mts +2 -0
  19. package/dist/effect/schemas/logs/retrieve-tool-execution.mjs +3 -1
  20. package/dist/effect/schemas/tool-router/session/link.d.mts +2 -2
  21. package/dist/effect/schemas/toolkits/list-scopes.d.mts +13 -0
  22. package/dist/effect/schemas/toolkits/list-scopes.mjs +17 -0
  23. package/dist/effect/schemas/toolkits/retrieve.d.mts +1 -0
  24. package/dist/effect/schemas/toolkits/retrieve.mjs +8 -0
  25. package/dist/effect/schemas.d.mts +32 -12
  26. package/dist/effect/schemas.mjs +1 -0
  27. package/dist/effect.d.mts +5 -4
  28. package/dist/effect.mjs +12 -5
  29. package/dist/{environments-C90r_t8M.mjs → environments-BoZhRNmR.mjs} +2 -2
  30. package/dist/{environments-j3Mor1h6.d.mts → environments-CuyJ-4ao.d.mts} +1 -1
  31. package/dist/{error-hMgVE2qc.mjs → error-Ch0f9xi8.mjs} +4 -1
  32. package/dist/{generated-operations-Btwe6bGR.mjs → generated-operations-DjDuvWLu.mjs} +8 -2
  33. package/dist/index.d.mts +3 -3
  34. package/dist/index.mjs +4 -4
  35. package/dist/internal.d.mts +1 -1
  36. package/dist/{pagination-rules-DMTBYzG_.mjs → pagination-rules-4iuoHqVk.mjs} +1 -1
  37. package/dist/pagination.mjs +1 -1
  38. package/dist/resources/_internal/_internal.d.mts +1 -1
  39. package/dist/resources/_internal/cli/cli.d.mts +1 -1
  40. package/dist/resources/_internal/cli/cli.mjs +1 -1
  41. package/dist/resources/_internal/cli/realtime.d.mts +1 -1
  42. package/dist/resources/_internal/cli/realtime.mjs +1 -1
  43. package/dist/resources/_internal/cli.d.mts +1 -1
  44. package/dist/resources/_internal/consumer/consumer.d.mts +1 -1
  45. package/dist/resources/_internal/consumer/permissions.d.mts +1 -1
  46. package/dist/resources/_internal/consumer/permissions.mjs +1 -1
  47. package/dist/resources/_internal/consumer.d.mts +1 -1
  48. package/dist/resources/_internal/logs/logs.d.mts +1 -1
  49. package/dist/resources/_internal/logs/tools.d.mts +1 -1
  50. package/dist/resources/_internal/logs/tools.mjs +1 -1
  51. package/dist/resources/_internal/logs/triggers.d.mts +1 -1
  52. package/dist/resources/_internal/logs/triggers.mjs +1 -1
  53. package/dist/resources/_internal/logs.d.mts +1 -1
  54. package/dist/resources/_internal/org/consumer/consumer.d.mts +1 -1
  55. package/dist/resources/_internal/org/consumer/consumer.mjs +1 -1
  56. package/dist/resources/_internal/org/consumer/project.d.mts +1 -1
  57. package/dist/resources/_internal/org/consumer/project.mjs +1 -1
  58. package/dist/resources/_internal/org/consumer.d.mts +1 -1
  59. package/dist/resources/_internal/org/org.d.mts +1 -1
  60. package/dist/resources/_internal/org.d.mts +1 -1
  61. package/dist/resources/_internal.d.mts +1 -1
  62. package/dist/resources/api-key-revocation.d.mts +1 -1
  63. package/dist/resources/api-key-revocation.mjs +1 -1
  64. package/dist/resources/auth/auth.d.mts +1 -1
  65. package/dist/resources/auth/session.d.mts +1 -1
  66. package/dist/resources/auth/session.mjs +1 -1
  67. package/dist/resources/auth-configs.d.mts +1 -1
  68. package/dist/resources/auth-configs.mjs +1 -1
  69. package/dist/resources/auth.d.mts +1 -1
  70. package/dist/resources/connected-accounts.d.mts +1 -1
  71. package/dist/resources/connected-accounts.mjs +1 -1
  72. package/dist/resources/custom.d.mts +1 -1
  73. package/dist/resources/custom.mjs +1 -1
  74. package/dist/resources/files.d.mts +1 -1
  75. package/dist/resources/files.mjs +1 -1
  76. package/dist/resources/keyring.d.mts +1 -1
  77. package/dist/resources/keyring.mjs +1 -1
  78. package/dist/resources/link.d.mts +1 -1
  79. package/dist/resources/link.mjs +1 -1
  80. package/dist/resources/logs/logs.d.mts +1 -1
  81. package/dist/resources/logs/logs.mjs +1 -1
  82. package/dist/resources/logs.d.mts +1 -1
  83. package/dist/resources/mcp/custom.d.mts +1 -1
  84. package/dist/resources/mcp/custom.mjs +1 -1
  85. package/dist/resources/mcp/generate.d.mts +1 -1
  86. package/dist/resources/mcp/generate.mjs +1 -1
  87. package/dist/resources/mcp/mcp.d.mts +1 -1
  88. package/dist/resources/mcp/mcp.mjs +1 -1
  89. package/dist/resources/mcp.d.mts +1 -1
  90. package/dist/resources/org/org.d.mts +1 -1
  91. package/dist/resources/org/org.mjs +1 -1
  92. package/dist/resources/org/owner/owner.d.mts +1 -1
  93. package/dist/resources/org/owner/project.d.mts +1 -1
  94. package/dist/resources/org/owner/project.mjs +1 -1
  95. package/dist/resources/org/owner.d.mts +1 -1
  96. package/dist/resources/org/project.d.mts +1 -1
  97. package/dist/resources/org/project.mjs +1 -1
  98. package/dist/resources/org/usage.d.mts +1 -1
  99. package/dist/resources/org/usage.mjs +1 -1
  100. package/dist/resources/org.d.mts +1 -1
  101. package/dist/resources/project/project.d.mts +1 -1
  102. package/dist/resources/project/usage.d.mts +1 -1
  103. package/dist/resources/project/usage.mjs +1 -1
  104. package/dist/resources/project.d.mts +1 -1
  105. package/dist/resources/session-configs.d.mts +1 -1
  106. package/dist/resources/session-configs.mjs +1 -1
  107. package/dist/resources/tool-router/session/files.d.mts +1 -1
  108. package/dist/resources/tool-router/session/files.mjs +1 -1
  109. package/dist/resources/tool-router/session/session.d.mts +1 -1
  110. package/dist/resources/tool-router/session/session.mjs +1 -1
  111. package/dist/resources/tool-router/session.d.mts +1 -1
  112. package/dist/resources/tool-router/tool-router.d.mts +1 -1
  113. package/dist/resources/tool-router.d.mts +1 -1
  114. package/dist/resources/toolkits.d.mts +2 -2
  115. package/dist/resources/toolkits.mjs +8 -1
  116. package/dist/resources/tools.d.mts +1 -1
  117. package/dist/resources/tools.mjs +1 -1
  118. package/dist/resources/trigger-instances/manage.d.mts +1 -1
  119. package/dist/resources/trigger-instances/manage.mjs +1 -1
  120. package/dist/resources/trigger-instances/trigger-instances.d.mts +1 -1
  121. package/dist/resources/trigger-instances/trigger-instances.mjs +1 -1
  122. package/dist/resources/trigger-instances.d.mts +1 -1
  123. package/dist/resources/triggers-types.d.mts +1 -1
  124. package/dist/resources/triggers-types.mjs +1 -1
  125. package/dist/resources/webhook-endpoints.d.mts +1 -1
  126. package/dist/resources/webhook-endpoints.mjs +1 -1
  127. package/dist/resources/webhook-subscriptions.d.mts +1 -1
  128. package/dist/resources/webhook-subscriptions.mjs +1 -1
  129. package/package.json +3 -3
package/MIGRATION.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Upgrade @composio/client
2
2
 
3
+ ### Unreleased
4
+
5
+ | Addition | Usage |
6
+ | --- | --- |
7
+ | `isWalletBalanceExhausted(error)` | Import from `@composio/client` for Promise calls or `@composio/client/effect` for Effect calls. When it returns true, `error.details.message` and the optional `error.details.suggested_fix` are available directly. |
8
+
9
+ | Operation | Migration |
10
+ | --- | --- |
11
+ | `connectedAccounts.list`, `retrieve`, and Effect `listStream` | The response can omit the deprecated `user_id`. If you need the user ID, retain the one used to look up the account. |
12
+ | `connectedAccounts.create`, `list`, `retrieve`, `link.create`, and `toolRouter.session.link` | A shared ACL can omit `allowed_user_ids` and `not_allowed_user_ids`. Check for presence before reading either list. An absent list gives no information about its membership. |
13
+ | `logs.createToolExecution` | When inspecting filters, handle `operator: 'in'` with a string array for `tool_slug` or `toolkit_slug`. Existing equality filters still take a string. |
14
+ | `toolkits.listScopes(toolkitSlug)` | Lists the OAuth scopes for a toolkit. |
15
+
3
16
  ### Changed in 2.2.0
4
17
 
5
18
  Version 2.2.0 adopts the documented Platform API compatibility changes below.
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # composio-client
2
2
 
3
3
  TypeScript and Python clients for the Composio v3.1 API. The checked-in OpenAPI snapshot supplies
4
- 116 operations, including explicitly unsupported internal operations used by Composio's own SDKs.
4
+ 117 operations, including explicitly unsupported internal operations used by Composio's own SDKs.
5
5
  Use the Promise client at the package root, the optional [Effect client](#effect), or the
6
6
  [Python sync and async clients](./python/README.md).
7
7
 
@@ -202,7 +202,7 @@ dependency, loads faster and spends less time per request (see [Performance](#pe
202
202
 
203
203
  The accessor chains, method names, argument order and request and response types are the root
204
204
  client's, and a call sends the same method, URL, body and headers as the root client does for the same
205
- input. All 116 operations of the spec are there.
205
+ input. All 117 operations of the spec are there.
206
206
 
207
207
  ### Install
208
208
 
@@ -616,8 +616,8 @@ The Python client lives in the [`python/`](./python/README.md) workspace (uv-man
616
616
  pnpm generate:python # from the repo root: spec snapshot → python/src/composio_client/_generated
617
617
  cd python
618
618
  uv sync
619
- uv run ruff check
620
- uv run mypy src scripts
619
+ ruff check
620
+ ty check --python .venv src scripts
621
621
  uv run pytest
622
622
  ```
623
623
 
@@ -1659,6 +1659,13 @@ type PostApiV31LogsToolExecutionData = {
1659
1659
  field: 'tool_slug' | 'toolkit_slug' | 'connected_account_id' | 'auth_config_id' | 'status' | 'user_id' | 'session_id' | 'sandbox_id' | 'request_id' | 'log_id';
1660
1660
  operator: '==' | '!=';
1661
1661
  value: string;
1662
+ } | {
1663
+ field: 'toolkit_slug' | 'tool_slug';
1664
+ operator: 'in';
1665
+ /**
1666
+ * Toolkit or tool slugs, matching `field`; a log matches when its toolkit or tool is any of them
1667
+ */
1668
+ value: Array<string>;
1662
1669
  }>;
1663
1670
  time_range?: {
1664
1671
  /**
@@ -1702,6 +1709,14 @@ type PostApiV31LogsToolExecutionResponses = {
1702
1709
  * Instant charge in USD for this tool, as an exact decimal string. Omitted when no charge was recorded; zero is returned as the string 0.
1703
1710
  */
1704
1711
  instant_charge?: string;
1712
+ /**
1713
+ * Auth config of the connected account the execution used. Omitted when it used none.
1714
+ */
1715
+ auth_config_id?: string;
1716
+ /**
1717
+ * Tool router session the execution ran in. Omitted when it ran outside a session.
1718
+ */
1719
+ session_id?: string;
1705
1720
  [key: string]: unknown;
1706
1721
  };
1707
1722
  metrics: {
@@ -1711,6 +1726,12 @@ type PostApiV31LogsToolExecutionResponses = {
1711
1726
  log_id: string;
1712
1727
  tool_slug: string;
1713
1728
  } | null;
1729
+ timings?: {
1730
+ /**
1731
+ * When the execution began, in epoch milliseconds
1732
+ */
1733
+ start_time: number;
1734
+ };
1714
1735
  }>;
1715
1736
  /**
1716
1737
  * Opaque cursor for the next page; pass it back as `cursor`. Null when the page is empty.
@@ -1744,6 +1765,14 @@ type GetApiV31LogsToolExecutionByIdResponses = {
1744
1765
  * Instant charge in USD for this tool, as an exact decimal string. Omitted when no charge was recorded; zero is returned as the string 0.
1745
1766
  */
1746
1767
  instant_charge?: string;
1768
+ /**
1769
+ * Auth config of the connected account the execution used. Omitted when it used none.
1770
+ */
1771
+ auth_config_id?: string;
1772
+ /**
1773
+ * Tool router session the execution ran in. Omitted when it ran outside a session.
1774
+ */
1775
+ session_id?: string;
1747
1776
  [key: string]: unknown;
1748
1777
  };
1749
1778
  metrics: {
@@ -3433,6 +3462,68 @@ type GetApiV31ToolkitsByToolkitSlugScopesGrantContextResponses = {
3433
3462
  };
3434
3463
  };
3435
3464
  };
3465
+ type GetApiV31ToolkitsByToolkitSlugScopesData = {
3466
+ body?: never;
3467
+ path: {
3468
+ /**
3469
+ * Toolkit to list scopes for.
3470
+ */
3471
+ toolkit_slug: string;
3472
+ };
3473
+ query?: {
3474
+ /**
3475
+ * Auth scheme whose scopes to list: OAUTH2 or S2S_OAUTH2, the auth schemes that carry scopes. Defaults to OAUTH2.
3476
+ */
3477
+ auth_scheme?: 'OAUTH2' | 'S2S_OAUTH2';
3478
+ /**
3479
+ * Toolkit version to read the scopes from; defaults to the latest published version. Pass a concrete version to pin.
3480
+ */
3481
+ toolkit_version?: string;
3482
+ };
3483
+ url: '/api/v3.1/toolkits/{toolkit_slug}/scopes';
3484
+ };
3485
+ type GetApiV31ToolkitsByToolkitSlugScopesResponses = {
3486
+ /**
3487
+ * Successfully listed the auth scheme's scopes
3488
+ */
3489
+ 200: {
3490
+ /**
3491
+ * Auth scheme whose scope catalog is listed.
3492
+ */
3493
+ auth_scheme: string;
3494
+ /**
3495
+ * Concrete toolkit version the catalog was read from; pass it back as toolkit_version to pin.
3496
+ */
3497
+ toolkit_version: string;
3498
+ /**
3499
+ * Every scope in the auth scheme's catalog, in catalog order; [] only when the catalog has no scopes.
3500
+ */
3501
+ scopes: Array<{
3502
+ /**
3503
+ * Scope name exactly as the provider spells it.
3504
+ */
3505
+ scope: string;
3506
+ /**
3507
+ * What the scope grants, in the provider's wording.
3508
+ */
3509
+ description: string;
3510
+ /**
3511
+ * Whether the provider has deprecated this scope.
3512
+ */
3513
+ deprecated: boolean;
3514
+ /**
3515
+ * Grant contexts in which the provider grants this scope: dimension to its allowed values, using the dimensions listed by GET /api/v3.1/toolkits/{toolkit_slug}/scopes/grant_context. {} means every grant context can grant it.
3516
+ */
3517
+ grantable_when: {
3518
+ [key: string]: Array<string>;
3519
+ };
3520
+ /**
3521
+ * Scopes that directly imply this one: granting any of them also grants this scope. Direct impliers only, not transitive: follow implied_by of each implier for chains.
3522
+ */
3523
+ implied_by: Array<string>;
3524
+ }>;
3525
+ };
3526
+ };
3436
3527
  type PostApiV31ToolRouterSessionData = {
3437
3528
  body?: {
3438
3529
  /**
@@ -8082,7 +8173,7 @@ type GetApiV31ConnectedAccountsResponses = {
8082
8173
  *
8083
8174
  * @deprecated
8084
8175
  */
8085
- user_id: string;
8176
+ user_id?: string;
8086
8177
  /**
8087
8178
  * The status of the connection
8088
8179
  */
@@ -8100,8 +8191,18 @@ type GetApiV31ConnectedAccountsResponses = {
8100
8191
  */
8101
8192
  acl_config_for_shared?: {
8102
8193
  allow_all_users: boolean;
8103
- allowed_user_ids: Array<string>;
8104
- not_allowed_user_ids: Array<string>;
8194
+ /**
8195
+ * Deprecated: this list will no longer be returned in responses. You can still set it on create and update.
8196
+ *
8197
+ * @deprecated
8198
+ */
8199
+ allowed_user_ids?: Array<string>;
8200
+ /**
8201
+ * Deprecated: this list will no longer be returned in responses. You can still set it on create and update.
8202
+ *
8203
+ * @deprecated
8204
+ */
8205
+ not_allowed_user_ids?: Array<string>;
8105
8206
  };
8106
8207
  };
8107
8208
  /**
@@ -16289,8 +16390,18 @@ type PostApiV31ConnectedAccountsResponses = {
16289
16390
  */
16290
16391
  acl_config_for_shared?: {
16291
16392
  allow_all_users: boolean;
16292
- allowed_user_ids: Array<string>;
16293
- not_allowed_user_ids: Array<string>;
16393
+ /**
16394
+ * Deprecated: this list will no longer be returned in responses. You can still set it on create and update.
16395
+ *
16396
+ * @deprecated
16397
+ */
16398
+ allowed_user_ids?: Array<string>;
16399
+ /**
16400
+ * Deprecated: this list will no longer be returned in responses. You can still set it on create and update.
16401
+ *
16402
+ * @deprecated
16403
+ */
16404
+ not_allowed_user_ids?: Array<string>;
16294
16405
  };
16295
16406
  };
16296
16407
  };
@@ -16380,7 +16491,7 @@ type GetApiV31ConnectedAccountsByNanoidResponses = {
16380
16491
  *
16381
16492
  * @deprecated
16382
16493
  */
16383
- user_id: string;
16494
+ user_id?: string;
16384
16495
  /**
16385
16496
  * The status of the connection
16386
16497
  */
@@ -16398,8 +16509,18 @@ type GetApiV31ConnectedAccountsByNanoidResponses = {
16398
16509
  */
16399
16510
  acl_config_for_shared?: {
16400
16511
  allow_all_users: boolean;
16401
- allowed_user_ids: Array<string>;
16402
- not_allowed_user_ids: Array<string>;
16512
+ /**
16513
+ * Deprecated: this list will no longer be returned in responses. You can still set it on create and update.
16514
+ *
16515
+ * @deprecated
16516
+ */
16517
+ allowed_user_ids?: Array<string>;
16518
+ /**
16519
+ * Deprecated: this list will no longer be returned in responses. You can still set it on create and update.
16520
+ *
16521
+ * @deprecated
16522
+ */
16523
+ not_allowed_user_ids?: Array<string>;
16403
16524
  };
16404
16525
  };
16405
16526
  /**
@@ -21848,8 +21969,18 @@ type PostApiV31ConnectedAccountsLinkResponses = {
21848
21969
  */
21849
21970
  acl_config_for_shared?: {
21850
21971
  allow_all_users: boolean;
21851
- allowed_user_ids: Array<string>;
21852
- not_allowed_user_ids: Array<string>;
21972
+ /**
21973
+ * Deprecated: this list will no longer be returned in responses. You can still set it on create and update.
21974
+ *
21975
+ * @deprecated
21976
+ */
21977
+ allowed_user_ids?: Array<string>;
21978
+ /**
21979
+ * Deprecated: this list will no longer be returned in responses. You can still set it on create and update.
21980
+ *
21981
+ * @deprecated
21982
+ */
21983
+ not_allowed_user_ids?: Array<string>;
21853
21984
  };
21854
21985
  };
21855
21986
  };
@@ -22094,6 +22225,10 @@ type GetApiV31InternalActionExecutionLogByIdResponses = {
22094
22225
  id: string;
22095
22226
  entity: string;
22096
22227
  };
22228
+ /**
22229
+ * The `ac_` id of the connected account's auth config; absent when the call used none
22230
+ */
22231
+ authConfigId?: string;
22097
22232
  credentialSource?: 'connected_account' | 'instant_account' | 'custom_auth' | 'no_auth';
22098
22233
  /**
22099
22234
  * Instant charge in USD for this tool, as an exact decimal string.
@@ -23750,6 +23885,10 @@ type GetApiV31ToolkitsBySlugResponses = {
23750
23885
  * Whether a connection made with this authentication method can be revoked at the provider
23751
23886
  */
23752
23887
  is_connection_revoke_supported: boolean;
23888
+ /**
23889
+ * Every scope in this auth scheme's scope catalog. Null when the auth scheme has no scope catalog: not added for this toolkit yet, or the auth scheme has no scopes. An empty array means the catalog has no scopes. GET /api/v3.1/toolkits/{toolkit_slug}/scopes returns each scope's description and grant conditions.
23890
+ */
23891
+ all_scopes: Array<string> | null;
23753
23892
  /**
23754
23893
  * Authentication URL fields for OAuth 2.0 and OAuth 1.0. We don't recommend using this field for authentication and might break post Aug 31 2025.
23755
23894
  *
@@ -25596,8 +25735,18 @@ type PostApiV31ToolRouterSessionBySessionIdLinkResponses = {
25596
25735
  */
25597
25736
  acl_config_for_shared?: {
25598
25737
  allow_all_users: boolean;
25599
- allowed_user_ids: Array<string>;
25600
- not_allowed_user_ids: Array<string>;
25738
+ /**
25739
+ * Deprecated: this list will no longer be returned in responses. You can still set it on create and update.
25740
+ *
25741
+ * @deprecated
25742
+ */
25743
+ allowed_user_ids?: Array<string>;
25744
+ /**
25745
+ * Deprecated: this list will no longer be returned in responses. You can still set it on create and update.
25746
+ *
25747
+ * @deprecated
25748
+ */
25749
+ not_allowed_user_ids?: Array<string>;
25601
25750
  };
25602
25751
  };
25603
25752
  };
@@ -26385,6 +26534,17 @@ declare class APIError<TStatus extends number | undefined = number | undefined,
26385
26534
  private static makeMessage;
26386
26535
  static generate(status: number | undefined, errorResponse: object | undefined, message: string | undefined, headers: Headers | undefined): APIError;
26387
26536
  }
26537
+ /** Fields shared by both clients when Apollo refuses an Instant call for lack of credit. */
26538
+ interface WalletBalanceExhaustedFields {
26539
+ readonly status: 402;
26540
+ readonly details: APIErrorBody['error'] & {
26541
+ readonly status: 402;
26542
+ readonly code: 5508;
26543
+ readonly slug: 'Metering_WalletBalanceExhausted';
26544
+ };
26545
+ }
26546
+ /** Whether the API refused an Instant tool call because the organization's wallet is exhausted. */
26547
+ declare const isWalletBalanceExhausted: (error: unknown) => error is APIError & WalletBalanceExhaustedFields;
26388
26548
  declare class APIUserAbortError extends APIError<undefined, undefined, undefined> {
26389
26549
  constructor({ message }?: {
26390
26550
  message?: string;
@@ -26683,6 +26843,8 @@ type ToolkitRetrieveParamsGen = NonNullable<GetApiV31ToolkitsBySlugData['query']
26683
26843
  interface ToolkitRetrieveParams extends ToolkitRetrieveParamsGen {}
26684
26844
  type ToolkitListParamsGen = NonNullable<GetApiV31ToolkitsData['query']>;
26685
26845
  interface ToolkitListParams extends ToolkitListParamsGen {}
26846
+ type ToolkitListScopesParamsGen = NonNullable<GetApiV31ToolkitsByToolkitSlugScopesData['query']>;
26847
+ interface ToolkitListScopesParams extends ToolkitListScopesParamsGen {}
26686
26848
  type ToolkitRecommendScopesParamsGen = NonNullable<PostApiV31ToolkitsByToolkitSlugScopesRecommendedData['body']>;
26687
26849
  interface ToolkitRecommendScopesParams extends ToolkitRecommendScopesParamsGen {}
26688
26850
  type ToolkitRetrieveChangelogParamsGen = NonNullable<GetApiV31ToolkitsChangelogData['query']>;
@@ -26695,6 +26857,8 @@ type ToolkitRetrieveResponseGen = GetApiV31ToolkitsBySlugResponses[200];
26695
26857
  interface ToolkitRetrieveResponse extends ToolkitRetrieveResponseGen {}
26696
26858
  type ToolkitListResponseGen = GetApiV31ToolkitsResponses[200];
26697
26859
  interface ToolkitListResponse extends ToolkitListResponseGen {}
26860
+ type ToolkitListScopesResponseGen = GetApiV31ToolkitsByToolkitSlugScopesResponses[200];
26861
+ interface ToolkitListScopesResponse extends ToolkitListScopesResponseGen {}
26698
26862
  type ToolkitRecommendScopesResponseGen = PostApiV31ToolkitsByToolkitSlugScopesRecommendedResponses[200];
26699
26863
  interface ToolkitRecommendScopesResponse extends ToolkitRecommendScopesResponseGen {}
26700
26864
  type ToolkitRetrieveCategoriesResponseGen = GetApiV31ToolkitsCategoriesResponses[200];
@@ -26709,6 +26873,7 @@ interface ToolkitRetrieveScopesGrantContextResponse extends ToolkitRetrieveScope
26709
26873
  interface Toolkits {
26710
26874
  retrieve(slug: string, query?: ToolkitRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<ToolkitRetrieveResponse>;
26711
26875
  list(query?: ToolkitListParams | null | undefined, options?: RequestOptions): APIPromise<ToolkitListResponse>;
26876
+ listScopes(toolkitSlug: string, query?: ToolkitListScopesParams | null | undefined, options?: RequestOptions): APIPromise<ToolkitListScopesResponse>;
26712
26877
  recommendScopes(toolkitSlug: string, body: ToolkitRecommendScopesParams, options?: RequestOptions): APIPromise<ToolkitRecommendScopesResponse>;
26713
26878
  retrieveCategories(options?: RequestOptions): APIPromise<ToolkitRetrieveCategoriesResponse>;
26714
26879
  retrieveChangelog(options?: RequestOptions & {
@@ -27380,4 +27545,4 @@ interface Internal {
27380
27545
  }
27381
27546
  /** @internal Builds the resource over a client; `new Composio(...)` calls it. */
27382
27547
  declare const makeInternal: (client: Composio) => Internal;
27383
- export { SessionConfigsRetrieveResponse as $, SessionExecuteResponse as $i, GenerateURLResponse as $n, LinkCreateResponse as $r, WebhookEndpointListParams as $t, PermissionsResolveParams as A, Scope as Aa, ToolListResponse$1 as Ai, LogRetrieveToolExecutionResponse as An, AuthConfigUpdateParams as Ar, UsageRetrieveParams as At, makeCli as B, InternalServerError as Ba, ToolRouter as Bi, McpDeleteResponse as Bn, ToolkitRetrieveCategoriesResponse as Br, makeOwner as Bt, TriggerListResponse as C, makeFiles$1 as Ca, Files as Ci, UsageRetrieveParams$1 as Cn, AuthConfigCreateParams as Cr, SessionRetrieveInfoResponse as Ct, Consumer$1 as D, AuthOf as Da, ToolGetInputParams as Di, makeUsage$1 as Dn, AuthConfigListParams as Dr, OrgListResponse as Dt, makeTriggers as E, AuthMode as Ea, ToolExecuteResponse as Ei, UsageRetrieveSummaryResponse$1 as En, AuthConfigDeleteResponse as Er, OrgListParams as Et, CliCreateCodactFailureResponse as F, APIUserAbortError as Fa, ToolRetrieveRequiredScopesParams as Fi, McpCreateInstanceResponse as Fn, makeAuthConfigs as Fr, Project$1 as Ft, makeRealtime as G, RequestOptions as Ga, SessionConfigHistoryParams as Gi, McpRetrieveAppParams as Gn, ToolkitRetrieveParams as Gr, ProjectDeleteResponse as Gt, RealtimeAuthParams as H, PermissionDeniedError as Ha, Session$1 as Hi, McpListInstancesResponse as Hn, ToolkitRetrieveChangelogResponse as Hr, ProjectCreateParams as Ht, CliCreateSessionParams as I, AuthenticationError as Ia, ToolRetrieveRequiredScopesResponse as Ii, McpCreateParams as In, ToolkitListParams as Ir, ProjectListParams as It, EnvironmentMap as J, createFetchTransport as Ja, SessionCreateResponse as Ji, McpUpdateParams as Jn, ToolkitRetrieveScopesGrantContextResponse as Jr, ProjectRegenerateAPIKeyResponse as Jt, ClientOptions as K, FetchTransportDefaults as Ka, SessionConfigHistoryResponse as Ki, McpRetrieveAppResponse as Kn, ToolkitRetrieveResponse as Kr, ProjectListParams$1 as Kt, CliCreateSessionResponse as L, BadRequestError as La, ToolRetrieveResponse$1 as Li, McpCreateResponse as Ln, ToolkitListResponse as Lr, ProjectListResponse as Lt, makePermissions as M, APIConnectionTimeoutError as Ma, ToolProxyResponse as Mi, makeLogs$1 as Mn, AuthConfigUpdateStatusParams as Mr, UsageRetrieveSummaryParams as Mt, Cli as N, APIError as Na, ToolRetrieveEnumResponse as Ni, Mcp as Nn, AuthConfigUpdateStatusResponse as Nr, UsageRetrieveSummaryResponse as Nt, makeConsumer$1 as O, AutoCredentials as Oa, ToolGetInputResponse as Oi, LogCreateToolExecutionParams as On, AuthConfigListResponse as Or, makeOrg$1 as Ot, CliCreateCodactFailureParams as P, APIErrorBody as Pa, ToolRetrieveParams as Pi, McpCreateInstanceParams as Pn, AuthConfigs as Pr, makeUsage as Pt, SessionConfigsListResponse as Q, SessionExecuteParams as Qi, GenerateURLParams as Qn, LinkCreateParams as Qr, WebhookEndpointCreateResponse as Qt, CliGetSessionParams as R, ComposioError as Ra, Tools$1 as Ri, McpDeleteInstanceParams as Rn, ToolkitRecommendScopesParams as Rr, makeProject$1 as Rt, TriggerListParams as S, Files$1 as Sa, FileListResponse as Si, Usage$1 as Sn, makeTriggersTypes as Sr, Session as St, Triggers as T, AuthConstructors as Ta, ToolExecuteParams as Ti, UsageRetrieveSummaryParams$1 as Tn, AuthConfigDeleteParams as Tr, Org$1 as Tt, RealtimeAuthResponse as U, RateLimitError as Ua, SessionAttachParams as Ui, McpListParams as Un, ToolkitRetrieveMultiParams as Ur, ProjectCreateResponse as Ut, Realtime as V, NotFoundError as Va, makeToolRouter as Vi, McpListInstancesParams as Vn, ToolkitRetrieveChangelogParams as Vr, Project$2 as Vt, RealtimeCredentialsResponse as W, UnprocessableEntityError as Wa, SessionAttachResponse as Wi, McpListResponse as Wn, ToolkitRetrieveMultiResponse as Wr, ProjectDeleteParams as Wt, SessionConfigs as X, HeadersLike as Xa, SessionExecuteMetaParams as Xi, makeMcp as Xn, makeToolkits as Xr, makeProject$2 as Xt, LogLevel as Y, ClientIdentity as Ya, SessionDeleteResponse as Yi, McpUpdateResponse as Yn, Toolkits as Yr, ProjectRetrieveResponse as Yt, SessionConfigsListParams as Z, APIPromise as Za, SessionExecuteMetaResponse as Zi, Generate as Zn, Link as Zr, WebhookEndpointCreateParams as Zt, ToolListParams as _, FileCreateUploadURLResponse as _a, ConnectedAccounts as _i, WebhookSubscriptionUpdateResponse as _n, TriggersTypeListResponse as _r, ApiKeyRevocationCreateParams as _t, Consumer as a, SessionProxyExecuteResponse as aa, ConnectedAccountDeleteParams as ai, WebhookEndpointUpdateResponse as an, TriggerInstanceListActiveParams as ar, CustomCreateToolkitParams as at, Tools as b, FileListParams$1 as ba, FileCreatePresignedURLResponse as bi, Project$3 as bn, TriggersTypeRetrieveResponse as br, Auth as bt, ConsumerRetrieveConfigResponse as c, SessionSearchResponse as ca, ConnectedAccountListResponse as ci, WebhookSubscriptionCreateParams as cn, TriggerInstanceUpsertResponse as cr, CustomDeleteToolkitResponse as ct, ProjectResolveParams as d, SessionToolsParams as da, ConnectedAccountRefreshParams as di, WebhookSubscriptionListEventTypesResponse as dn, Manage as dr, CustomUpdateToolkitsParams as dt, SessionLinkParams as ea, makeLink as ei, WebhookEndpointListResponse as en, makeGenerate as er, makeSessionConfigs as et, ProjectResolveResponse as f, SessionToolsResponse as fa, ConnectedAccountRefreshResponse as fi, WebhookSubscriptionListParams as fn, ManageDeleteResponse as fr, CustomUpdateToolkitsResponse as ft, ToolListFieldsResponse as g, FileCreateUploadURLParams as ga, ConnectedAccountUpdateStatusResponse as gi, WebhookSubscriptionUpdateParams as gn, TriggersTypeListParams as gr, ApiKeyRevocation as gt, makeLogs as h, FileCreateDownloadURLResponse as ha, ConnectedAccountUpdateStatusParams as hi, WebhookSubscriptionRotateSecretResponse as hn, makeManage as hr, makeCustom as ht, makeOrg as i, SessionProxyExecuteParams as ia, ConnectedAccountCreateResponse as ii, WebhookEndpointUpdateParams as in, makeCustom$1 as ir, Custom as it, PermissionsResolveResponse as j, APIConnectionError as ja, ToolProxyParams as ji, Logs$1 as jn, AuthConfigUpdateResponse as jr, UsageRetrieveResponse as jt, Permissions as k, Credential as ka, ToolListParams$1 as ki, LogCreateToolExecutionResponse as kn, AuthConfigRetrieveResponse as kr, Usage as kt, makeConsumer as l, SessionToolkitsParams as la, ConnectedAccountPatchParams as li, WebhookSubscriptionCreateResponse as ln, TriggerInstances as lr, CustomSyncParams as lt, Logs as m, FileCreateDownloadURLParams as ma, ConnectedAccountRevokeResponse as mi, WebhookSubscriptionRetrieveResponse as mn, ManageUpdateResponse as mr, CustomUpsertResponse as mt, makeInternal as n, SessionPatchParams as na, ConnectedAccountCompleteAuthResponse as ni, WebhookEndpointReplaceResponse as nn, CustomCreateParams as nr, KeyringListTransferKeysResponse as nt, ConsumerListConnectedToolkitsParams as o, SessionRetrieveResponse as oa, ConnectedAccountDeleteResponse as oi, WebhookEndpoints as on, TriggerInstanceListActiveResponse as or, CustomCreateToolkitResponse as ot, makeProject as p, makeSession$1 as pa, ConnectedAccountRetrieveResponse as pi, WebhookSubscriptionListResponse as pn, ManageUpdateParams as pr, CustomUpsertParams as pt, Composio as q, Transport as qa, SessionCreateParams as qi, McpRetrieveResponse as qn, ToolkitRetrieveScopesGrantContextParams as qr, ProjectListResponse$1 as qt, Org as r, SessionPatchResponse as ra, ConnectedAccountCreateParams as ri, WebhookEndpointRetrieveResponse as rn, CustomCreateResponse as rr, makeKeyring as rt, ConsumerListConnectedToolkitsResponse as s, SessionSearchParams as sa, ConnectedAccountListParams as si, makeWebhookEndpoints as sn, TriggerInstanceUpsertParams as sr, CustomDeleteToolkitParams as st, Internal as t, SessionLinkResponse as ta, ConnectedAccountCompleteAuthParams as ti, WebhookEndpointReplaceParams as tn, Custom$1 as tr, Keyring as tt, Project as u, SessionToolkitsResponse as ua, ConnectedAccountPatchResponse as ui, WebhookSubscriptionDeleteResponse as un, makeTriggerInstances as ur, CustomSyncResponse as ut, ToolListResponse as v, FileDeleteParams as va, makeConnectedAccounts as vi, WebhookSubscriptions as vn, TriggersTypeRetrieveEnumResponse as vr, ApiKeyRevocationCreateResponse as vt, TriggerRetrieveResponse as w, Auth$1 as wa, makeFiles as wi, UsageRetrieveResponse$1 as wn, AuthConfigCreateResponse as wr, makeSession as wt, makeTools as x, FileListResponse$1 as xa, FileListParams as xi, makeProject$3 as xn, TriggersTypes as xr, makeAuth as xt, ToolRetrieveResponse as y, FileDeleteResponse as ya, FileCreatePresignedURLParams as yi, makeWebhookSubscriptions as yn, TriggersTypeRetrieveParams as yr, makeApiKeyRevocation as yt, CliGetSessionResponse as z, ConflictError as za, makeTools$1 as zi, McpDeleteInstanceResponse as zn, ToolkitRecommendScopesResponse as zr, Owner as zt };
27548
+ export { SessionConfigsRetrieveResponse as $, ClientIdentity as $a, SessionExecuteMetaResponse as $i, GenerateURLResponse as $n, Link as $r, WebhookEndpointListParams as $t, PermissionsResolveParams as A, AutoCredentials as Aa, ToolGetInputResponse as Ai, LogRetrieveToolExecutionResponse as An, AuthConfigUpdateParams as Ar, UsageRetrieveParams as At, makeCli as B, ComposioError as Ba, Tools$1 as Bi, McpDeleteResponse as Bn, ToolkitRecommendScopesParams as Br, makeOwner as Bt, TriggerListResponse as C, FileListResponse$1 as Ca, FileListParams as Ci, UsageRetrieveParams$1 as Cn, AuthConfigCreateParams as Cr, SessionRetrieveInfoResponse as Ct, Consumer$1 as D, AuthConstructors as Da, ToolExecuteParams as Di, makeUsage$1 as Dn, AuthConfigListParams as Dr, OrgListResponse as Dt, makeTriggers as E, Auth$1 as Ea, makeFiles as Ei, UsageRetrieveSummaryResponse$1 as En, AuthConfigDeleteResponse as Er, OrgListParams as Et, CliCreateCodactFailureResponse as F, APIError as Fa, ToolRetrieveEnumResponse as Fi, McpCreateInstanceResponse as Fn, makeAuthConfigs as Fr, Project$1 as Ft, makeRealtime as G, RateLimitError as Ga, SessionAttachParams as Gi, McpRetrieveAppParams as Gn, ToolkitRetrieveMultiParams as Gr, ProjectDeleteResponse as Gt, RealtimeAuthParams as H, InternalServerError as Ha, ToolRouter as Hi, McpListInstancesResponse as Hn, ToolkitRetrieveCategoriesResponse as Hr, ProjectCreateParams as Ht, CliCreateSessionParams as I, APIErrorBody as Ia, ToolRetrieveParams as Ii, McpCreateParams as In, ToolkitListParams as Ir, ProjectListParams as It, EnvironmentMap as J, isWalletBalanceExhausted as Ja, SessionConfigHistoryResponse as Ji, McpUpdateParams as Jn, ToolkitRetrieveResponse as Jr, ProjectRegenerateAPIKeyResponse as Jt, ClientOptions as K, UnprocessableEntityError as Ka, SessionAttachResponse as Ki, McpRetrieveAppResponse as Kn, ToolkitRetrieveMultiResponse as Kr, ProjectListParams$1 as Kt, CliCreateSessionResponse as L, APIUserAbortError as La, ToolRetrieveRequiredScopesParams as Li, McpCreateResponse as Ln, ToolkitListResponse as Lr, ProjectListResponse as Lt, makePermissions as M, Scope as Ma, ToolListResponse$1 as Mi, makeLogs$1 as Mn, AuthConfigUpdateStatusParams as Mr, UsageRetrieveSummaryParams as Mt, Cli as N, APIConnectionError as Na, ToolProxyParams as Ni, Mcp as Nn, AuthConfigUpdateStatusResponse as Nr, UsageRetrieveSummaryResponse as Nt, makeConsumer$1 as O, AuthMode as Oa, ToolExecuteResponse as Oi, LogCreateToolExecutionParams as On, AuthConfigListResponse as Or, makeOrg$1 as Ot, CliCreateCodactFailureParams as P, APIConnectionTimeoutError as Pa, ToolProxyResponse as Pi, McpCreateInstanceParams as Pn, AuthConfigs as Pr, makeUsage as Pt, SessionConfigsListResponse as Q, createFetchTransport as Qa, SessionExecuteMetaParams as Qi, GenerateURLParams as Qn, makeToolkits as Qr, WebhookEndpointCreateResponse as Qt, CliGetSessionParams as R, AuthenticationError as Ra, ToolRetrieveRequiredScopesResponse as Ri, McpDeleteInstanceParams as Rn, ToolkitListScopesParams as Rr, makeProject$1 as Rt, TriggerListParams as S, FileListParams$1 as Sa, FileCreatePresignedURLResponse as Si, Usage$1 as Sn, makeTriggersTypes as Sr, Session as St, Triggers as T, makeFiles$1 as Ta, Files as Ti, UsageRetrieveSummaryParams$1 as Tn, AuthConfigDeleteParams as Tr, Org$1 as Tt, RealtimeAuthResponse as U, NotFoundError as Ua, makeToolRouter as Ui, McpListParams as Un, ToolkitRetrieveChangelogParams as Ur, ProjectCreateResponse as Ut, Realtime as V, ConflictError as Va, makeTools$1 as Vi, McpListInstancesParams as Vn, ToolkitRecommendScopesResponse as Vr, Project$2 as Vt, RealtimeCredentialsResponse as W, PermissionDeniedError as Wa, Session$1 as Wi, McpListResponse as Wn, ToolkitRetrieveChangelogResponse as Wr, ProjectDeleteParams as Wt, SessionConfigs as X, FetchTransportDefaults as Xa, SessionCreateResponse as Xi, makeMcp as Xn, ToolkitRetrieveScopesGrantContextResponse as Xr, makeProject$2 as Xt, LogLevel as Y, RequestOptions as Ya, SessionCreateParams as Yi, McpUpdateResponse as Yn, ToolkitRetrieveScopesGrantContextParams as Yr, ProjectRetrieveResponse as Yt, SessionConfigsListParams as Z, Transport as Za, SessionDeleteResponse as Zi, Generate as Zn, Toolkits as Zr, WebhookEndpointCreateParams as Zt, ToolListParams as _, FileCreateDownloadURLResponse as _a, ConnectedAccountUpdateStatusParams as _i, WebhookSubscriptionUpdateResponse as _n, TriggersTypeListResponse as _r, ApiKeyRevocationCreateParams as _t, Consumer as a, SessionPatchResponse as aa, ConnectedAccountCreateParams as ai, WebhookEndpointUpdateResponse as an, TriggerInstanceListActiveParams as ar, CustomCreateToolkitParams as at, Tools as b, FileDeleteParams as ba, makeConnectedAccounts as bi, Project$3 as bn, TriggersTypeRetrieveResponse as br, Auth as bt, ConsumerRetrieveConfigResponse as c, SessionRetrieveResponse as ca, ConnectedAccountDeleteResponse as ci, WebhookSubscriptionCreateParams as cn, TriggerInstanceUpsertResponse as cr, CustomDeleteToolkitResponse as ct, ProjectResolveParams as d, SessionToolkitsParams as da, ConnectedAccountPatchParams as di, WebhookSubscriptionListEventTypesResponse as dn, Manage as dr, CustomUpdateToolkitsParams as dt, SessionExecuteParams as ea, LinkCreateParams as ei, WebhookEndpointListResponse as en, HeadersLike as eo, makeGenerate as er, makeSessionConfigs as et, ProjectResolveResponse as f, SessionToolkitsResponse as fa, ConnectedAccountPatchResponse as fi, WebhookSubscriptionListParams as fn, ManageDeleteResponse as fr, CustomUpdateToolkitsResponse as ft, ToolListFieldsResponse as g, FileCreateDownloadURLParams as ga, ConnectedAccountRevokeResponse as gi, WebhookSubscriptionUpdateParams as gn, TriggersTypeListParams as gr, ApiKeyRevocation as gt, makeLogs as h, makeSession$1 as ha, ConnectedAccountRetrieveResponse as hi, WebhookSubscriptionRotateSecretResponse as hn, makeManage as hr, makeCustom as ht, makeOrg as i, SessionPatchParams as ia, ConnectedAccountCompleteAuthResponse as ii, WebhookEndpointUpdateParams as in, makeCustom$1 as ir, Custom as it, PermissionsResolveResponse as j, Credential as ja, ToolListParams$1 as ji, Logs$1 as jn, AuthConfigUpdateResponse as jr, UsageRetrieveResponse as jt, Permissions as k, AuthOf as ka, ToolGetInputParams as ki, LogCreateToolExecutionResponse as kn, AuthConfigRetrieveResponse as kr, Usage as kt, makeConsumer as l, SessionSearchParams as la, ConnectedAccountListParams as li, WebhookSubscriptionCreateResponse as ln, TriggerInstances as lr, CustomSyncParams as lt, Logs as m, SessionToolsResponse as ma, ConnectedAccountRefreshResponse as mi, WebhookSubscriptionRetrieveResponse as mn, ManageUpdateResponse as mr, CustomUpsertResponse as mt, makeInternal as n, SessionLinkParams as na, makeLink as ni, WebhookEndpointReplaceResponse as nn, CustomCreateParams as nr, KeyringListTransferKeysResponse as nt, ConsumerListConnectedToolkitsParams as o, SessionProxyExecuteParams as oa, ConnectedAccountCreateResponse as oi, WebhookEndpoints as on, TriggerInstanceListActiveResponse as or, CustomCreateToolkitResponse as ot, makeProject as p, SessionToolsParams as pa, ConnectedAccountRefreshParams as pi, WebhookSubscriptionListResponse as pn, ManageUpdateParams as pr, CustomUpsertParams as pt, Composio as q, WalletBalanceExhaustedFields as qa, SessionConfigHistoryParams as qi, McpRetrieveResponse as qn, ToolkitRetrieveParams as qr, ProjectListResponse$1 as qt, Org as r, SessionLinkResponse as ra, ConnectedAccountCompleteAuthParams as ri, WebhookEndpointRetrieveResponse as rn, CustomCreateResponse as rr, makeKeyring as rt, ConsumerListConnectedToolkitsResponse as s, SessionProxyExecuteResponse as sa, ConnectedAccountDeleteParams as si, makeWebhookEndpoints as sn, TriggerInstanceUpsertParams as sr, CustomDeleteToolkitParams as st, Internal as t, SessionExecuteResponse as ta, LinkCreateResponse as ti, WebhookEndpointReplaceParams as tn, APIPromise as to, Custom$1 as tr, Keyring as tt, Project as u, SessionSearchResponse as ua, ConnectedAccountListResponse as ui, WebhookSubscriptionDeleteResponse as un, makeTriggerInstances as ur, CustomSyncResponse as ut, ToolListResponse as v, FileCreateUploadURLParams as va, ConnectedAccountUpdateStatusResponse as vi, WebhookSubscriptions as vn, TriggersTypeRetrieveEnumResponse as vr, ApiKeyRevocationCreateResponse as vt, TriggerRetrieveResponse as w, Files$1 as wa, FileListResponse as wi, UsageRetrieveResponse$1 as wn, AuthConfigCreateResponse as wr, makeSession as wt, makeTools as x, FileDeleteResponse as xa, FileCreatePresignedURLParams as xi, makeProject$3 as xn, TriggersTypes as xr, makeAuth as xt, ToolRetrieveResponse as y, FileCreateUploadURLResponse as ya, ConnectedAccounts as yi, makeWebhookSubscriptions as yn, TriggersTypeRetrieveParams as yr, makeApiKeyRevocation as yt, CliGetSessionResponse as z, BadRequestError as za, ToolRetrieveResponse$1 as zi, McpDeleteInstanceResponse as zn, ToolkitListScopesResponse as zr, Owner as zt };
@@ -1,6 +1,6 @@
1
1
  import { Effect, Redacted } from "effect";
2
2
  import "effect/http/HttpClient";
3
- import { A as PermissionsResolveParams, C as TriggerListResponse, Da as AuthOf, F as CliCreateCodactFailureResponse, H as RealtimeAuthParams, I as CliCreateSessionParams, L as CliCreateSessionResponse, P as CliCreateCodactFailureParams, Pa as APIErrorBody, R as CliGetSessionParams, S as TriggerListParams, U as RealtimeAuthResponse, W as RealtimeCredentialsResponse, Xa as HeadersLike, _ as ToolListParams, c as ConsumerRetrieveConfigResponse, d as ProjectResolveParams, f as ProjectResolveResponse, g as ToolListFieldsResponse, j as PermissionsResolveResponse, o as ConsumerListConnectedToolkitsParams, s as ConsumerListConnectedToolkitsResponse, v as ToolListResponse, w as TriggerRetrieveResponse, y as ToolRetrieveResponse, z as CliGetSessionResponse } from "./_internal-C4ZzriQ6.mjs";
3
+ import { A as PermissionsResolveParams, C as TriggerListResponse, F as CliCreateCodactFailureResponse, H as RealtimeAuthParams, I as CliCreateSessionParams, Ia as APIErrorBody, L as CliCreateSessionResponse, P as CliCreateCodactFailureParams, R as CliGetSessionParams, S as TriggerListParams, U as RealtimeAuthResponse, W as RealtimeCredentialsResponse, _ as ToolListParams, c as ConsumerRetrieveConfigResponse, d as ProjectResolveParams, eo as HeadersLike, f as ProjectResolveResponse, g as ToolListFieldsResponse, j as PermissionsResolveResponse, ka as AuthOf, o as ConsumerListConnectedToolkitsParams, qa as WalletBalanceExhaustedFields, s as ConsumerListConnectedToolkitsResponse, v as ToolListResponse, w as TriggerRetrieveResponse, y as ToolRetrieveResponse, z as CliGetSessionResponse } from "./_internal-1d0QoPQ3.mjs";
4
4
  import * as Schema from "effect/Schema";
5
5
  /** The fields every error for a non-success HTTP response carries. */
6
6
  interface APIErrorFields {
@@ -125,6 +125,8 @@ type ComposioError = APIStatusError | APIConnectionError | APIConnectionTimeoutE
125
125
  * class. Structural, so it holds across duplicated copies of this module.
126
126
  */
127
127
  declare const isAPIError: (value: unknown) => value is APIStatusError;
128
+ /** Whether the API refused an Instant tool call because the organization's wallet is exhausted. */
129
+ declare const isWalletBalanceExhausted: (error: unknown) => error is APIStatusError & WalletBalanceExhaustedFields;
128
130
  /** Whether a value is any error this surface produces. Structural, like {@link isAPIError}. */
129
131
  declare const isComposioError: (value: unknown) => value is ComposioError;
130
132
  type Key = string | Redacted.Redacted<string>;
@@ -248,4 +250,4 @@ interface Internal {
248
250
  readonly logs: Logs;
249
251
  readonly org: Org;
250
252
  }
251
- export { PermissionDeniedError as C, isComposioError as D, isAPIError as E, NotFoundError as S, UnprocessableEntityError as T, ConfigurationError as _, Tracing as a, DecodeIssue as b, Credential as c, APIError as d, APIErrorFields as f, ComposioError as g, BadRequestError as h, RequestOptions as i, APIConnectionError as l, AuthenticationError as m, RawBodyRequestOptions as n, SchemaLoaders as o, APIStatusError as p, RawRequestOptions as r, Auth as s, Internal as t, APIConnectionTimeoutError as u, ConflictError as v, RateLimitError as w, InternalServerError as x, DecodeError as y };
253
+ export { PermissionDeniedError as C, isComposioError as D, isAPIError as E, isWalletBalanceExhausted as O, NotFoundError as S, UnprocessableEntityError as T, ConfigurationError as _, Tracing as a, DecodeIssue as b, Credential as c, APIError as d, APIErrorFields as f, ComposioError as g, BadRequestError as h, RequestOptions as i, APIConnectionError as l, AuthenticationError as m, RawBodyRequestOptions as n, SchemaLoaders as o, APIStatusError as p, RawRequestOptions as r, Auth as s, Internal as t, APIConnectionTimeoutError as u, ConflictError as v, RateLimitError as w, InternalServerError as x, DecodeError as y };
@@ -6,7 +6,7 @@
6
6
  * import type {} from '@composio/client/effect/internal'
7
7
  * ```
8
8
  */
9
- import { t as Internal } from "../_internal-ChynSuwG.mjs";
9
+ import { t as Internal } from "../_internal-uub7kBfy.mjs";
10
10
  declare module '@composio/client/effect' {
11
11
  interface ComposioClientShape {
12
12
  readonly _internal: Internal;
@@ -14,6 +14,7 @@ export declare const ToolRetrieveResponse: Schema.StructWithRest<Schema.Struct<{
14
14
  readonly id: Schema.String;
15
15
  readonly entity: Schema.String;
16
16
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
17
+ readonly authConfigId: Schema.optionalKey<Schema.String>;
17
18
  readonly credentialSource: Schema.optionalKey<Schema.Literals<readonly ["connected_account", "instant_account", "custom_auth", "no_auth"]>>;
18
19
  readonly instantCharge: Schema.optionalKey<Schema.String>;
19
20
  readonly session: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
@@ -21,6 +21,7 @@ const ToolRetrieveResponse = Schema.StructWithRest(Schema.Struct({
21
21
  "id": Schema.String,
22
22
  "entity": Schema.String
23
23
  }), [Schema.Record(Schema.String, Schema.Json.annotate({ "expected": "JSON value" }))]),
24
+ "authConfigId": Schema.optionalKey(Schema.String.annotate({ "description": "The `ac_` id of the connected account's auth config; absent when the call used none" })),
24
25
  "credentialSource": Schema.optionalKey(Schema.Literals([
25
26
  "connected_account",
26
27
  "instant_account",
@@ -4,7 +4,7 @@ export declare const SessionLinkResponseExperimental: Schema.StructWithRest<Sche
4
4
  readonly account_type: Schema.Literals<readonly ["PRIVATE", "SHARED"]>;
5
5
  readonly acl_config_for_shared: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
6
6
  readonly allow_all_users: Schema.Boolean;
7
- readonly allowed_user_ids: Schema.$Array<Schema.String>;
8
- readonly not_allowed_user_ids: Schema.$Array<Schema.String>;
7
+ readonly allowed_user_ids: Schema.optionalKey<Schema.$Array<Schema.String>>;
8
+ readonly not_allowed_user_ids: Schema.optionalKey<Schema.$Array<Schema.String>>;
9
9
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
10
10
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
@@ -6,8 +6,8 @@ const SessionLinkResponseExperimental = Schema.StructWithRest(Schema.Struct({
6
6
  "account_type": Schema.Literals(["PRIVATE", "SHARED"]).annotate({ "description": "Sharing model for this connected account. PRIVATE is usable only by the owning user_id. SHARED is reachable from a tool-router session only when explicitly pinned in the session config." }),
7
7
  "acl_config_for_shared": Schema.optionalKey(Schema.StructWithRest(Schema.Struct({
8
8
  "allow_all_users": Schema.Boolean,
9
- "allowed_user_ids": Schema.Array(Schema.String),
10
- "not_allowed_user_ids": Schema.Array(Schema.String)
9
+ "allowed_user_ids": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "description": "Deprecated: this list will no longer be returned in responses. You can still set it on create and update." })),
10
+ "not_allowed_user_ids": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "description": "Deprecated: this list will no longer be returned in responses. You can still set it on create and update." }))
11
11
  }), [Schema.Record(Schema.String, Schema.Json.annotate({ "expected": "JSON value" }))]).annotate({ "description": "Access control for SHARED connections. Visible only to the connection creator and project/org API key callers; non-creator cookie callers receive the response without this block." }))
12
12
  }), [Schema.Record(Schema.String, Schema.Json.annotate({ "expected": "JSON value" }))]).annotate({
13
13
  "description": "Experimental features - not stable, may be modified or removed in future versions.",
@@ -2447,8 +2447,8 @@ export declare const ConnectedAccountCreateResponse: Schema.StructWithRest<Schem
2447
2447
  readonly account_type: Schema.Literals<readonly ["PRIVATE", "SHARED"]>;
2448
2448
  readonly acl_config_for_shared: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
2449
2449
  readonly allow_all_users: Schema.Boolean;
2450
- readonly allowed_user_ids: Schema.$Array<Schema.String>;
2451
- readonly not_allowed_user_ids: Schema.$Array<Schema.String>;
2450
+ readonly allowed_user_ids: Schema.optionalKey<Schema.$Array<Schema.String>>;
2451
+ readonly not_allowed_user_ids: Schema.optionalKey<Schema.$Array<Schema.String>>;
2452
2452
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
2453
2453
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
2454
2454
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
@@ -15,14 +15,14 @@ export declare const ConnectedAccountListResponse: Schema.StructWithRest<Schema.
15
15
  readonly authScheme: Schema.optionalKey<Schema.Literals<readonly ["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"]>>;
16
16
  readonly word_id: Schema.Union<readonly [Schema.String, Schema.Null]>;
17
17
  readonly alias: Schema.Union<readonly [Schema.String, Schema.Null]>;
18
- readonly user_id: Schema.String;
18
+ readonly user_id: Schema.optionalKey<Schema.String>;
19
19
  readonly status: Schema.Literals<readonly ["INITIALIZING", "INITIATED", "ACTIVE", "FAILED", "EXPIRED", "INACTIVE", "REVOKED"]>;
20
20
  readonly experimental: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
21
21
  readonly account_type: Schema.Literals<readonly ["PRIVATE", "SHARED"]>;
22
22
  readonly acl_config_for_shared: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
23
23
  readonly allow_all_users: Schema.Boolean;
24
- readonly allowed_user_ids: Schema.$Array<Schema.String>;
25
- readonly not_allowed_user_ids: Schema.$Array<Schema.String>;
24
+ readonly allowed_user_ids: Schema.optionalKey<Schema.$Array<Schema.String>>;
25
+ readonly not_allowed_user_ids: Schema.optionalKey<Schema.$Array<Schema.String>>;
26
26
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
27
27
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
28
28
  readonly created_at: Schema.String;
@@ -55,7 +55,7 @@ const ConnectedAccountListResponse = Schema.StructWithRest(Schema.Struct({
55
55
  ]).annotate({ "description": "Duplicates state.authScheme. Kept for backward compatibility with existing readers; use state.authScheme instead." })),
56
56
  "word_id": Schema.Union([Schema.String, Schema.Null]).annotate({ "description": "A short, token-friendly identifier for multi-account disambiguation, typically toolkit-prefixed with 1-2 words (e.g., \"gmail_red-castle\")" }),
57
57
  "alias": Schema.Union([Schema.String, Schema.Null]).annotate({ "description": "A user-defined alias for the connected account" }),
58
- "user_id": Schema.String.annotate({ "description": "This is deprecated, we will not be providing userId from this api anymore, you will only be able to read via userId not get it back" }),
58
+ "user_id": Schema.optionalKey(Schema.String.annotate({ "description": "This is deprecated, we will not be providing userId from this api anymore, you will only be able to read via userId not get it back" })),
59
59
  "status": Schema.Literals([
60
60
  "INITIALIZING",
61
61
  "INITIATED",
@@ -14,14 +14,14 @@ export declare const ConnectedAccountRetrieveResponse: Schema.StructWithRest<Sch
14
14
  readonly authScheme: Schema.optionalKey<Schema.Literals<readonly ["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"]>>;
15
15
  readonly word_id: Schema.Union<readonly [Schema.String, Schema.Null]>;
16
16
  readonly alias: Schema.Union<readonly [Schema.String, Schema.Null]>;
17
- readonly user_id: Schema.String;
17
+ readonly user_id: Schema.optionalKey<Schema.String>;
18
18
  readonly status: Schema.Literals<readonly ["INITIALIZING", "INITIATED", "ACTIVE", "FAILED", "EXPIRED", "INACTIVE", "REVOKED"]>;
19
19
  readonly experimental: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
20
20
  readonly account_type: Schema.Literals<readonly ["PRIVATE", "SHARED"]>;
21
21
  readonly acl_config_for_shared: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
22
22
  readonly allow_all_users: Schema.Boolean;
23
- readonly allowed_user_ids: Schema.$Array<Schema.String>;
24
- readonly not_allowed_user_ids: Schema.$Array<Schema.String>;
23
+ readonly allowed_user_ids: Schema.optionalKey<Schema.$Array<Schema.String>>;
24
+ readonly not_allowed_user_ids: Schema.optionalKey<Schema.$Array<Schema.String>>;
25
25
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
26
26
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
27
27
  readonly created_at: Schema.String;
@@ -54,7 +54,7 @@ const ConnectedAccountRetrieveResponse = Schema.StructWithRest(Schema.Struct({
54
54
  ]).annotate({ "description": "Duplicates state.authScheme. Kept for backward compatibility with existing readers; use state.authScheme instead." })),
55
55
  "word_id": Schema.Union([Schema.String, Schema.Null]).annotate({ "description": "A short, token-friendly identifier for multi-account disambiguation, typically toolkit-prefixed with 1-2 words (e.g., \"gmail_red-castle\")" }),
56
56
  "alias": Schema.Union([Schema.String, Schema.Null]).annotate({ "description": "A user-defined alias for the connected account" }),
57
- "user_id": Schema.String.annotate({ "description": "This is deprecated, we will not be providing userId from this api anymore, you will only be able to read via userId not get it back" }),
57
+ "user_id": Schema.optionalKey(Schema.String.annotate({ "description": "This is deprecated, we will not be providing userId from this api anymore, you will only be able to read via userId not get it back" })),
58
58
  "status": Schema.Literals([
59
59
  "INITIALIZING",
60
60
  "INITIATED",
@@ -9,8 +9,8 @@ export declare const LinkCreateResponse: Schema.StructWithRest<Schema.Struct<{
9
9
  readonly account_type: Schema.Literals<readonly ["PRIVATE", "SHARED"]>;
10
10
  readonly acl_config_for_shared: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
11
11
  readonly allow_all_users: Schema.Boolean;
12
- readonly allowed_user_ids: Schema.$Array<Schema.String>;
13
- readonly not_allowed_user_ids: Schema.$Array<Schema.String>;
12
+ readonly allowed_user_ids: Schema.optionalKey<Schema.$Array<Schema.String>>;
13
+ readonly not_allowed_user_ids: Schema.optionalKey<Schema.$Array<Schema.String>>;
14
14
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
15
15
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
16
16
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
@@ -11,12 +11,17 @@ export declare const LogCreateToolExecutionResponse: Schema.StructWithRest<Schem
11
11
  readonly metadata: Schema.StructWithRest<Schema.Struct<{
12
12
  readonly credential_source: Schema.optionalKey<Schema.Literals<readonly ["connected_account", "instant_account", "custom_auth", "no_auth"]>>;
13
13
  readonly instant_charge: Schema.optionalKey<Schema.String>;
14
+ readonly auth_config_id: Schema.optionalKey<Schema.String>;
15
+ readonly session_id: Schema.optionalKey<Schema.String>;
14
16
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
15
17
  readonly metrics: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
16
18
  readonly parent: Schema.Union<readonly [Schema.StructWithRest<Schema.Struct<{
17
19
  readonly log_id: Schema.String;
18
20
  readonly tool_slug: Schema.String;
19
21
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>, Schema.Null]>;
22
+ readonly timings: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
23
+ readonly start_time: Schema.Number;
24
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
20
25
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
21
26
  readonly next_cursor: Schema.Union<readonly [Schema.String, Schema.Null]>;
22
27
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
@@ -24,13 +24,16 @@ const LogCreateToolExecutionResponse = Schema.StructWithRest(Schema.Struct({
24
24
  "custom_auth",
25
25
  "no_auth"
26
26
  ]).annotate({ "description": "Credential used for this execution. instant_account means a Composio Instant account. Omitted when no credential source was recorded." })),
27
- "instant_charge": Schema.optionalKey(Schema.String.annotate({ "description": "Instant charge in USD for this tool, as an exact decimal string. Omitted when no charge was recorded; zero is returned as the string 0." }))
27
+ "instant_charge": Schema.optionalKey(Schema.String.annotate({ "description": "Instant charge in USD for this tool, as an exact decimal string. Omitted when no charge was recorded; zero is returned as the string 0." })),
28
+ "auth_config_id": Schema.optionalKey(Schema.String.annotate({ "description": "Auth config of the connected account the execution used. Omitted when it used none." })),
29
+ "session_id": Schema.optionalKey(Schema.String.annotate({ "description": "Tool router session the execution ran in. Omitted when it ran outside a session." }))
28
30
  }), [Schema.Record(Schema.String, Schema.Json.annotate({ "expected": "JSON value" }))]),
29
31
  "metrics": Schema.Record(Schema.String, Schema.Json.annotate({ "expected": "JSON value" })),
30
32
  "parent": Schema.Union([Schema.StructWithRest(Schema.Struct({
31
33
  "log_id": Schema.String,
32
34
  "tool_slug": Schema.String
33
- }), [Schema.Record(Schema.String, Schema.Json.annotate({ "expected": "JSON value" }))]), Schema.Null])
35
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ "expected": "JSON value" }))]), Schema.Null]),
36
+ "timings": Schema.optionalKey(Schema.StructWithRest(Schema.Struct({ "start_time": Schema.Number.annotate({ "description": "When the execution began, in epoch milliseconds" }).check(Schema.isFinite().annotate({ "expected": "a finite number" })) }), [Schema.Record(Schema.String, Schema.Json.annotate({ "expected": "JSON value" }))]))
34
37
  }), [Schema.Record(Schema.String, Schema.Json.annotate({ "expected": "JSON value" }))])),
35
38
  "next_cursor": Schema.Union([Schema.String, Schema.Null]).annotate({ "description": "Opaque cursor for the next page; pass it back as `cursor`. Null when the page is empty." })
36
39
  }), [Schema.Record(Schema.String, Schema.Json.annotate({ "expected": "JSON value" }))]);
@@ -10,6 +10,8 @@ export declare const LogRetrieveToolExecutionResponse: Schema.StructWithRest<Sch
10
10
  readonly metadata: Schema.StructWithRest<Schema.Struct<{
11
11
  readonly credential_source: Schema.optionalKey<Schema.Literals<readonly ["connected_account", "instant_account", "custom_auth", "no_auth"]>>;
12
12
  readonly instant_charge: Schema.optionalKey<Schema.String>;
13
+ readonly auth_config_id: Schema.optionalKey<Schema.String>;
14
+ readonly session_id: Schema.optionalKey<Schema.String>;
13
15
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
14
16
  readonly metrics: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
15
17
  readonly parent: Schema.Union<readonly [Schema.StructWithRest<Schema.Struct<{