@composio/client 2.0.0-rc.21 → 2.0.0-rc.22

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 (184) hide show
  1. package/README.md +51 -1
  2. package/dist/_internal-7BQNRB9A.d.mts +265 -0
  3. package/dist/{api-key-revocation-BB3FTdR3.d.mts → _internal-UUxDozdb.d.mts} +952 -268
  4. package/dist/effect/internal.d.mts +9 -0
  5. package/dist/effect/schemas/{cli → _internal/cli}/create-session.d.mts +2 -2
  6. package/dist/effect/schemas/{cli → _internal/cli}/create-session.mjs +2 -2
  7. package/dist/effect/schemas/{cli → _internal/cli}/get-session.d.mts +2 -2
  8. package/dist/effect/schemas/{cli → _internal/cli}/get-session.mjs +3 -3
  9. package/dist/effect/schemas/{cli → _internal/cli}/realtime/auth.d.mts +2 -2
  10. package/dist/effect/schemas/{cli → _internal/cli}/realtime/auth.mjs +2 -2
  11. package/dist/effect/schemas/{cli → _internal/cli}/realtime/credentials.d.mts +2 -2
  12. package/dist/effect/schemas/{cli → _internal/cli}/realtime/credentials.mjs +2 -2
  13. package/dist/effect/schemas/{logs → _internal/logs}/tools/list-fields.d.mts +2 -2
  14. package/dist/effect/schemas/{logs → _internal/logs}/tools/list-fields.mjs +2 -2
  15. package/dist/effect/schemas/{logs → _internal/logs}/tools/list.d.mts +2 -2
  16. package/dist/effect/schemas/{logs → _internal/logs}/tools/list.mjs +2 -2
  17. package/dist/effect/schemas/{logs → _internal/logs}/tools/retrieve.d.mts +2 -2
  18. package/dist/effect/schemas/{logs → _internal/logs}/tools/retrieve.mjs +2 -2
  19. package/dist/effect/schemas/{logs → _internal/logs}/triggers/list.d.mts +2 -2
  20. package/dist/effect/schemas/{logs → _internal/logs}/triggers/list.mjs +3 -3
  21. package/dist/effect/schemas/{logs → _internal/logs}/triggers/retrieve.d.mts +2 -2
  22. package/dist/effect/schemas/{logs → _internal/logs}/triggers/retrieve.mjs +3 -3
  23. package/dist/effect/schemas/{org → _internal/org}/consumer/list-connected-toolkits.d.mts +2 -2
  24. package/dist/effect/schemas/{org → _internal/org}/consumer/list-connected-toolkits.mjs +2 -2
  25. package/dist/effect/schemas/{org → _internal/org}/consumer/project/resolve.d.mts +3 -2
  26. package/dist/effect/schemas/{org → _internal/org}/consumer/project/resolve.mjs +4 -3
  27. package/dist/effect/schemas/auth-configs/list.d.mts +1 -0
  28. package/dist/effect/schemas/auth-configs/list.mjs +2 -1
  29. package/dist/effect/schemas/auth-configs/retrieve.d.mts +1 -0
  30. package/dist/effect/schemas/auth-configs/retrieve.mjs +2 -1
  31. package/dist/effect/schemas/components/block-reason.d.mts +12 -0
  32. package/dist/effect/schemas/components/block-reason.mjs +14 -0
  33. package/dist/effect/schemas/components/execute-blocked.d.mts +30 -0
  34. package/dist/effect/schemas/components/execute-blocked.mjs +24 -0
  35. package/dist/effect/schemas/components/execute-completed.d.mts +8 -0
  36. package/dist/effect/schemas/components/execute-completed.mjs +3 -1
  37. package/dist/effect/schemas/components/execute-failed.d.mts +8 -0
  38. package/dist/effect/schemas/components/execute-failed.mjs +3 -1
  39. package/dist/effect/schemas/components/hook-result.d.mts +13 -0
  40. package/dist/effect/schemas/components/hook-result.mjs +15 -0
  41. package/dist/effect/schemas/components/proxy-execute-blocked.d.mts +24 -0
  42. package/dist/effect/schemas/components/proxy-execute-blocked.mjs +18 -0
  43. package/dist/effect/schemas/components/proxy-execute-completed.d.mts +8 -0
  44. package/dist/effect/schemas/components/proxy-execute-completed.mjs +3 -1
  45. package/dist/effect/schemas/components/session-create-response-config.d.mts +28 -0
  46. package/dist/effect/schemas/components/session-create-response-config.mjs +24 -0
  47. package/dist/effect/schemas/components/tool-router-session-v31-config-history-list-response.d.mts +28 -0
  48. package/dist/effect/schemas/components/tool-router-session-v31-config-history-list-response.mjs +24 -0
  49. package/dist/effect/schemas/session-configs/retrieve.d.mts +11 -0
  50. package/dist/effect/schemas/session-configs/retrieve.mjs +59 -23
  51. package/dist/effect/schemas/tool-router/session/attach.d.mts +28 -0
  52. package/dist/effect/schemas/tool-router/session/config-history.d.mts +28 -0
  53. package/dist/effect/schemas/tool-router/session/create.d.mts +28 -0
  54. package/dist/effect/schemas/tool-router/session/execute-meta.d.mts +40 -0
  55. package/dist/effect/schemas/tool-router/session/execute-meta.mjs +2 -0
  56. package/dist/effect/schemas/tool-router/session/execute.d.mts +40 -0
  57. package/dist/effect/schemas/tool-router/session/execute.mjs +2 -0
  58. package/dist/effect/schemas/tool-router/session/patch.d.mts +28 -0
  59. package/dist/effect/schemas/tool-router/session/proxy-execute.d.mts +26 -0
  60. package/dist/effect/schemas/tool-router/session/proxy-execute.mjs +6 -1
  61. package/dist/effect/schemas/tool-router/session/retrieve.d.mts +28 -0
  62. package/dist/effect/schemas/triggers-types/list.d.mts +1 -0
  63. package/dist/effect/schemas/triggers-types/list.mjs +5 -1
  64. package/dist/effect/schemas/triggers-types/retrieve.d.mts +1 -0
  65. package/dist/effect/schemas/triggers-types/retrieve.mjs +5 -1
  66. package/dist/effect/schemas.d.mts +451 -189
  67. package/dist/effect/schemas.mjs +11 -11
  68. package/dist/effect.d.mts +9 -246
  69. package/dist/effect.mjs +122 -102
  70. package/dist/{environments-CmxYUUsW.mjs → environments-DIBy8nYx.mjs} +18 -10
  71. package/dist/{environments-BXSnADKo.d.mts → environments-Dz5jsC_v.d.mts} +1 -1
  72. package/dist/{generated-operations-BNRn8az6.mjs → generated-operations-igWp3zha.mjs} +21 -5
  73. package/dist/index.d.mts +2 -2
  74. package/dist/index.mjs +4 -2
  75. package/dist/internal.d.mts +9 -0
  76. package/dist/internal.mjs +1 -0
  77. package/dist/resources/_internal/_internal.d.mts +2 -0
  78. package/dist/resources/_internal/_internal.mjs +14 -0
  79. package/dist/resources/_internal/cli/cli.d.mts +2 -0
  80. package/dist/resources/_internal/cli/cli.mjs +25 -0
  81. package/dist/resources/_internal/cli/realtime.d.mts +2 -0
  82. package/dist/resources/{cli → _internal/cli}/realtime.mjs +4 -4
  83. package/dist/resources/_internal/cli.d.mts +2 -0
  84. package/dist/resources/_internal/cli.mjs +1 -0
  85. package/dist/resources/_internal/logs/logs.d.mts +2 -0
  86. package/dist/resources/_internal/logs/logs.mjs +12 -0
  87. package/dist/resources/_internal/logs/tools.d.mts +2 -0
  88. package/dist/resources/{logs → _internal/logs}/tools.mjs +5 -5
  89. package/dist/resources/_internal/logs/triggers.d.mts +2 -0
  90. package/dist/resources/{logs → _internal/logs}/triggers.mjs +4 -4
  91. package/dist/resources/_internal/logs.d.mts +2 -0
  92. package/dist/resources/_internal/logs.mjs +1 -0
  93. package/dist/resources/_internal/org/consumer/consumer.d.mts +2 -0
  94. package/dist/resources/{org → _internal/org}/consumer/consumer.mjs +3 -3
  95. package/dist/resources/_internal/org/consumer/project.d.mts +2 -0
  96. package/dist/resources/{org → _internal/org}/consumer/project.mjs +3 -3
  97. package/dist/resources/_internal/org/consumer.d.mts +2 -0
  98. package/dist/resources/_internal/org/consumer.mjs +1 -0
  99. package/dist/resources/_internal/org/org.d.mts +2 -0
  100. package/dist/resources/_internal/org/org.mjs +8 -0
  101. package/dist/resources/_internal/org.d.mts +2 -0
  102. package/dist/resources/_internal/org.mjs +1 -0
  103. package/dist/resources/_internal.d.mts +2 -0
  104. package/dist/resources/_internal.mjs +1 -0
  105. package/dist/resources/api-key-revocation.d.mts +1 -1
  106. package/dist/resources/api-key-revocation.mjs +1 -1
  107. package/dist/resources/auth/auth.d.mts +1 -1
  108. package/dist/resources/auth/session.d.mts +1 -1
  109. package/dist/resources/auth/session.mjs +1 -1
  110. package/dist/resources/auth-configs.d.mts +1 -1
  111. package/dist/resources/auth-configs.mjs +1 -1
  112. package/dist/resources/auth.d.mts +1 -1
  113. package/dist/resources/cli/cli.d.mts +2 -2
  114. package/dist/resources/cli/cli.mjs +8 -26
  115. package/dist/resources/cli.d.mts +2 -2
  116. package/dist/resources/connected-accounts.d.mts +1 -1
  117. package/dist/resources/connected-accounts.mjs +1 -1
  118. package/dist/resources/custom.d.mts +1 -1
  119. package/dist/resources/custom.mjs +1 -1
  120. package/dist/resources/files.d.mts +1 -1
  121. package/dist/resources/files.mjs +1 -1
  122. package/dist/resources/keyring.d.mts +1 -1
  123. package/dist/resources/keyring.mjs +1 -1
  124. package/dist/resources/link.d.mts +1 -1
  125. package/dist/resources/link.mjs +1 -1
  126. package/dist/resources/logs/logs.d.mts +1 -1
  127. package/dist/resources/logs/logs.mjs +1 -5
  128. package/dist/resources/logs.d.mts +2 -2
  129. package/dist/resources/mcp/custom.d.mts +1 -1
  130. package/dist/resources/mcp/custom.mjs +1 -1
  131. package/dist/resources/mcp/generate.d.mts +1 -1
  132. package/dist/resources/mcp/generate.mjs +1 -1
  133. package/dist/resources/mcp/mcp.d.mts +1 -1
  134. package/dist/resources/mcp/mcp.mjs +1 -1
  135. package/dist/resources/mcp.d.mts +1 -1
  136. package/dist/resources/org/clanker.d.mts +1 -1
  137. package/dist/resources/org/clanker.mjs +1 -1
  138. package/dist/resources/org/org.d.mts +1 -1
  139. package/dist/resources/org/org.mjs +1 -3
  140. package/dist/resources/org/owner/owner.d.mts +1 -1
  141. package/dist/resources/org/owner/project.d.mts +1 -1
  142. package/dist/resources/org/owner/project.mjs +1 -1
  143. package/dist/resources/org/owner.d.mts +1 -1
  144. package/dist/resources/org/project.d.mts +1 -1
  145. package/dist/resources/org/project.mjs +1 -1
  146. package/dist/resources/org/usage.d.mts +1 -1
  147. package/dist/resources/org/usage.mjs +1 -1
  148. package/dist/resources/org.d.mts +2 -2
  149. package/dist/resources/project/project.d.mts +1 -1
  150. package/dist/resources/project/usage.d.mts +1 -1
  151. package/dist/resources/project/usage.mjs +1 -1
  152. package/dist/resources/project.d.mts +1 -1
  153. package/dist/resources/session-configs.d.mts +1 -1
  154. package/dist/resources/session-configs.mjs +1 -1
  155. package/dist/resources/tool-router/session/files.d.mts +1 -1
  156. package/dist/resources/tool-router/session/files.mjs +1 -1
  157. package/dist/resources/tool-router/session/session.d.mts +1 -1
  158. package/dist/resources/tool-router/session/session.mjs +1 -1
  159. package/dist/resources/tool-router/session.d.mts +1 -1
  160. package/dist/resources/tool-router/tool-router.d.mts +1 -1
  161. package/dist/resources/tool-router.d.mts +1 -1
  162. package/dist/resources/toolkits.d.mts +1 -1
  163. package/dist/resources/toolkits.mjs +1 -1
  164. package/dist/resources/tools.d.mts +1 -1
  165. package/dist/resources/tools.mjs +1 -1
  166. package/dist/resources/trigger-instances/manage.d.mts +1 -1
  167. package/dist/resources/trigger-instances/manage.mjs +1 -1
  168. package/dist/resources/trigger-instances/trigger-instances.d.mts +1 -1
  169. package/dist/resources/trigger-instances/trigger-instances.mjs +1 -1
  170. package/dist/resources/trigger-instances.d.mts +1 -1
  171. package/dist/resources/triggers-types.d.mts +1 -1
  172. package/dist/resources/triggers-types.mjs +1 -1
  173. package/dist/resources/webhook-endpoints.d.mts +1 -1
  174. package/dist/resources/webhook-endpoints.mjs +1 -1
  175. package/dist/resources/webhook-subscriptions.d.mts +1 -1
  176. package/dist/resources/webhook-subscriptions.mjs +1 -1
  177. package/package.json +10 -2
  178. package/dist/resources/cli/realtime.d.mts +0 -2
  179. package/dist/resources/logs/tools.d.mts +0 -2
  180. package/dist/resources/logs/triggers.d.mts +0 -2
  181. package/dist/resources/org/consumer/consumer.d.mts +0 -2
  182. package/dist/resources/org/consumer/project.d.mts +0 -2
  183. package/dist/resources/org/consumer.d.mts +0 -2
  184. /package/dist/{resources/org/consumer.mjs → effect/internal.mjs} +0 -0
package/README.md CHANGED
@@ -54,7 +54,8 @@ anything is sent. A client that needs another credential or scope derives one:
54
54
  `composio.withOptions({ auth: Auth.project(key) })`. `withOptions` re-runs every construction check.
55
55
 
56
56
  Three operations declare a credential or scope id as a header parameter
57
- (`org.consumer.project.resolve`, `org.consumer.listConnectedToolkits`, `cli.createCodactFailure`).
57
+ (`_internal.org.consumer.project.resolve`, `_internal.org.consumer.listConnectedToolkits`,
58
+ `cli.createCodactFailure`).
58
59
  Their signatures are unchanged: the value replaces the configured credential for that call, and an
59
60
  `x-org-id` that disagrees with the configured `scope` fails the call.
60
61
 
@@ -137,6 +138,23 @@ polyfills and test interceptors keep working. A custom `fetch` or extra `Request
137
138
  through `createFetchTransport({ fetch, defaults })`; the former `fetch`, `fetchOptions` and
138
139
  `defaultQuery` constructor options are gone (see the upgrade section).
139
140
 
141
+ ### Internal operations
142
+
143
+ The spec publishes some operations for Composio's own CLI and SDKs and tags them `x-internal`: CLI
144
+ login sessions, realtime credentials, the execution and trigger logs, and the consumer-project
145
+ routes. They are under `client._internal`, they carry no compatibility promise, and any release may
146
+ change them. The property exists on every client, but the root types do not name it, so it stays
147
+ out of autocompletion. A program that needs it imports the opt-in subpath once:
148
+
149
+ ```ts
150
+ import type {} from '@composio/client/internal' // `@composio/client/effect/internal` for the Effect client
151
+
152
+ const session = await composio._internal.cli.getSession({ id })
153
+ ```
154
+
155
+ Their types are under `@composio/client/resources/_internal/*`. The previous-release gate does not
156
+ pin them. In Python the same operations are `client._internal.cli.get_session(...)`.
157
+
140
158
  ## Effect
141
159
 
142
160
  `@composio/client/effect` is the same API surface for applications written with
@@ -542,6 +560,38 @@ The opt-in records the resolved scheme, hostname, and port. Mutating `baseURL` c
542
560
  and `withOptions({ baseURL: ... })` requires `allowInsecureHTTP: true` again when the origin
543
561
  changes. Redirects to another origin remain credential-free.
544
562
 
563
+ ### Moved in 2.0.0-rc.22
564
+
565
+ The operations the spec tags `x-internal` moved under `client._internal`, which is typed only through
566
+ `@composio/client/internal` (see [Internal operations](#internal-operations)). The wire is unchanged.
567
+ The ledger declares each as a removal; `pnpm test:pack` holds the subpaths.
568
+
569
+ | Moved | Now |
570
+ | --- | --- |
571
+ | `client.cli.createSession`, `getSession` | `client._internal.cli.createSession`, `getSession` |
572
+ | `client.cli.realtime.*` | `client._internal.cli.realtime.*` |
573
+ | `client.logs.tools.*`, `client.logs.triggers.*` | `client._internal.logs.tools.*`, `client._internal.logs.triggers.*` |
574
+ | `client.org.consumer.*` | `client._internal.org.consumer.*` |
575
+ | Their types, from `@composio/client/resources/cli`, `resources/cli/realtime`, `resources/logs`, `resources/logs/tools`, `resources/logs/triggers`, `resources/org/consumer*` | The same names from `@composio/client/resources/_internal/<same path>` |
576
+
577
+ `client.cli.createCodactFailure`, `client.logs.createToolExecution` and
578
+ `client.logs.retrieveToolExecution` are not tagged and stay where they were.
579
+
580
+ ### Changed in 2.0.0-rc.22
581
+
582
+ | Change | Migration |
583
+ | --- | --- |
584
+ | `toolRouter.session.execute`, `executeMeta` and `proxyExecute` can return `result_type: 'blocked'` | Handle that branch before reading `data`, `error`, `status` or `headers`. Read `reason.type`, `reason.hook_id` and `message` instead. `request_blocked` means the tool did not run; `response_blocked` means it ran and its response was withheld. `log_id` is optional on blocked tool executions |
585
+ | Execution outcomes may include `hook_results` | Treat it as optional. An entry with `status: 'evaluated'` has `outcome: 'continue' \| 'block'`; `status: 'unavailable'` has no outcome. Python callers must also handle the new `SessionExecuteBlockedResponse`, `SessionExecuteMetaBlockedResponse` and `SessionProxyExecuteBlockedResponse` members of each `*Result` union |
586
+ | Trigger-type list items and retrieve responses require `types` | Add a non-empty `types` array of `'webhook'` and/or `'poll'` to typed fixtures and mocks. The older `type` field is deprecated |
587
+ | `org.consumer.project.resolve` requires response `user_id` | Add the authenticated user's id to typed response fixtures and mocks; `consumer_user_id` remains a separate field |
588
+ | Saved session configurations include `require_approval` lists | Handle toolkit/tool entries containing only `{ require_approval: [...] }`, as well as entries with `enable`, `disable` or tool tags. Session-wide and per-toolkit tags may also contain `require_approval` |
589
+ | Project creation no longer declares `config.require_mcp_api_key` | Remove it from project-creation inputs. The upstream schema declares no replacement. `config.enable_instant` controls Instant Toolkits and is unrelated to MCP authentication |
590
+
591
+ The removed project property has a `properties-removed` ledger entry. The previous-release gate
592
+ checks named property paths as well as assignability, so removing an optional key cannot silently
593
+ pass both structural checks.
594
+
545
595
  ### Removed in 2.0.0-rc.21
546
596
 
547
597
  The last members of the `Composio` class that existed only to look like the Stainless build. None is a
@@ -0,0 +1,265 @@
1
+ import { A as CliGetSessionResponse, C as TriggerRetrieveResponse, D as CliCreateSessionParams, F as RealtimeCredentialsResponse, N as RealtimeAuthParams, O as CliCreateSessionResponse, Oa as APIErrorBody, P as RealtimeAuthResponse, S as TriggerListResponse, Wa as HeadersLike, _ as ToolListResponse, d as ProjectResolveResponse, g as ToolListParams, h as ToolListFieldsResponse, k as CliGetSessionParams, o as ConsumerListConnectedToolkitsParams, s as ConsumerListConnectedToolkitsResponse, u as ProjectResolveParams, v as ToolRetrieveResponse, x as TriggerListParams, xa as AuthOf } from "./_internal-UUxDozdb.mjs";
2
+ import { Effect, Redacted } from "effect";
3
+ import "effect/http/HttpClient";
4
+ import * as Schema from "effect/Schema";
5
+ //#region src/effect/errors.d.ts
6
+ /** The fields every error for a non-success HTTP response carries. */
7
+ interface APIErrorFields {
8
+ /** The message the compat client builds for the same response. */
9
+ readonly message: string;
10
+ /** The request method, upper-cased. */
11
+ readonly method: string;
12
+ /** The origin plus the operation template, or `/<custom>` for an undeclared path. */
13
+ readonly url: string;
14
+ /** HTTP status of the response. */
15
+ readonly status: number;
16
+ /**
17
+ * The request id the API assigned: the `x-request-id` response header first,
18
+ * the envelope's `request_id` otherwise.
19
+ */
20
+ readonly requestId: string | undefined;
21
+ /** The body narrowed to the Composio error envelope, when it is one. */
22
+ readonly details: APIErrorBody['error'] | undefined;
23
+ /** The parsed JSON body, whatever its shape; `undefined` when it is not JSON. */
24
+ readonly body: unknown;
25
+ }
26
+ declare const BadRequestError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
27
+ readonly _tag: "@composio/client/BadRequestError";
28
+ } & Readonly<A>;
29
+ declare class BadRequestError extends BadRequestError_base<APIErrorFields> {}
30
+ declare const AuthenticationError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
31
+ readonly _tag: "@composio/client/AuthenticationError";
32
+ } & Readonly<A>;
33
+ declare class AuthenticationError extends AuthenticationError_base<APIErrorFields> {}
34
+ declare const PermissionDeniedError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
35
+ readonly _tag: "@composio/client/PermissionDeniedError";
36
+ } & Readonly<A>;
37
+ declare class PermissionDeniedError extends PermissionDeniedError_base<APIErrorFields> {}
38
+ declare const NotFoundError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
39
+ readonly _tag: "@composio/client/NotFoundError";
40
+ } & Readonly<A>;
41
+ declare class NotFoundError extends NotFoundError_base<APIErrorFields> {}
42
+ declare const ConflictError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
43
+ readonly _tag: "@composio/client/ConflictError";
44
+ } & Readonly<A>;
45
+ declare class ConflictError extends ConflictError_base<APIErrorFields> {}
46
+ declare const UnprocessableEntityError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
47
+ readonly _tag: "@composio/client/UnprocessableEntityError";
48
+ } & Readonly<A>;
49
+ declare class UnprocessableEntityError extends UnprocessableEntityError_base<APIErrorFields> {}
50
+ declare const RateLimitError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
51
+ readonly _tag: "@composio/client/RateLimitError";
52
+ } & Readonly<A>;
53
+ declare class RateLimitError extends RateLimitError_base<APIErrorFields> {}
54
+ declare const InternalServerError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
55
+ readonly _tag: "@composio/client/InternalServerError";
56
+ } & Readonly<A>;
57
+ /** Any status of 500 and above. */
58
+ declare class InternalServerError extends InternalServerError_base<APIErrorFields> {}
59
+ declare const APIError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
60
+ readonly _tag: "@composio/client/APIError";
61
+ } & Readonly<A>;
62
+ /** A non-success status none of the other classes names. */
63
+ declare class APIError extends APIError_base<APIErrorFields> {}
64
+ declare const APIConnectionError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
65
+ readonly _tag: "@composio/client/APIConnectionError";
66
+ } & Readonly<A>;
67
+ /**
68
+ * The request never produced a response: the transport failed below HTTP.
69
+ *
70
+ * The transport's error is reduced to `reason` (which of its failure kinds it
71
+ * was) and `description` (its own text, or its cause's messages).
72
+ */
73
+ declare class APIConnectionError extends APIConnectionError_base<{
74
+ readonly message: string;
75
+ readonly method: string;
76
+ readonly url: string;
77
+ readonly reason: string;
78
+ readonly description: string | undefined;
79
+ }> {}
80
+ declare const APIConnectionTimeoutError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
81
+ readonly _tag: "@composio/client/APIConnectionTimeoutError";
82
+ } & Readonly<A>;
83
+ /** An attempt outlived its time budget. */
84
+ declare class APIConnectionTimeoutError extends APIConnectionTimeoutError_base<{
85
+ readonly message: string;
86
+ readonly method: string;
87
+ readonly url: string;
88
+ }> {}
89
+ /** One thing wrong with a response body: where, and what kind of problem. */
90
+ interface DecodeIssue {
91
+ readonly path: ReadonlyArray<string | number>;
92
+ readonly kind: string;
93
+ }
94
+ declare const DecodeError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
95
+ readonly _tag: "@composio/client/DecodeError";
96
+ } & Readonly<A>;
97
+ /** A success response whose body is not what it claims to be. */
98
+ declare class DecodeError extends DecodeError_base<{
99
+ readonly message: string;
100
+ readonly method: string;
101
+ readonly url: string;
102
+ readonly status: number;
103
+ readonly requestId: string | undefined;
104
+ /** The operation's public chain (`toolkits.list`), or `undefined` for an undeclared path. */
105
+ readonly operation: string | undefined;
106
+ readonly issues: ReadonlyArray<DecodeIssue>;
107
+ }> {}
108
+ declare const ConfigurationError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
109
+ readonly _tag: "@composio/client/ConfigurationError";
110
+ } & Readonly<A>;
111
+ /**
112
+ * The client or the call is set up in a way no request can be made from: a
113
+ * credentialed origin that cannot carry a credential, a path parameter that
114
+ * would rewrite the path, a body that does not serialize. Retrying cannot
115
+ * change the answer.
116
+ */
117
+ declare class ConfigurationError extends ConfigurationError_base<{
118
+ readonly message: string;
119
+ }> {}
120
+ /** An error for a non-success HTTP response, of whichever status class. */
121
+ type APIStatusError = BadRequestError | AuthenticationError | PermissionDeniedError | NotFoundError | ConflictError | UnprocessableEntityError | RateLimitError | InternalServerError | APIError;
122
+ /** Every failure an operation of the Effect surface can end with. */
123
+ type ComposioError = APIStatusError | APIConnectionError | APIConnectionTimeoutError | DecodeError | ConfigurationError;
124
+ /**
125
+ * Whether a value is an error for a non-success HTTP response, of any status
126
+ * class. Structural, so it holds across duplicated copies of this module.
127
+ */
128
+ declare const isAPIError: (value: unknown) => value is APIStatusError;
129
+ /** Whether a value is any error this surface produces. Structural, like {@link isAPIError}. */
130
+ declare const isComposioError: (value: unknown) => value is ComposioError;
131
+ //#endregion
132
+ //#region src/effect/credentials.d.ts
133
+ type Key = string | Redacted.Redacted<string>;
134
+ type Provider = () => Key | PromiseLike<Key>;
135
+ /** A string or `Redacted` key, or a function returning one, called once per call. */
136
+ type Credential = Key | Provider;
137
+ type Auth = AuthOf<Credential>;
138
+ //#endregion
139
+ //#region src/effect/decode.d.ts
140
+ /**
141
+ * What a client decodes with: an operation's public chain (`toolkits.list`) →
142
+ * a function that loads its response schema. `schemaLoaders`, the export of
143
+ * `@composio/client/effect/schemas`, is the table for every operation.
144
+ */
145
+ type SchemaLoaders = Readonly<Record<string, () => Promise<Schema.Codec<unknown>>>>;
146
+ //#endregion
147
+ //#region src/effect/request.d.ts
148
+ /**
149
+ * What the client's own requests add to a trace:
150
+ *
151
+ * - `'off'` — nothing. No span is opened for a request and no trace header is
152
+ * sent, so the client sends exactly the headers the Promise client sends.
153
+ * - `'span'` — Effect's `HttpClient` opens its client span around each request,
154
+ * a child of the span the call runs in. Nothing about it goes on the wire.
155
+ * - `'propagate'` — the span, also sent to the API as `b3` and `traceparent`.
156
+ *
157
+ * Only this client's requests are affected, and only ever toward less: a
158
+ * span asked for here is still subject to the application's own
159
+ * `HttpClient.TracerDisabledWhen` and `HttpClient.TracerPropagationEnabled`.
160
+ */
161
+ type Tracing = 'off' | 'span' | 'propagate';
162
+ /** Per-call options: the last argument of every operation and raw method. */
163
+ interface RequestOptions {
164
+ /** Headers for this call; they win over the client's defaults, and `null` removes one. */
165
+ readonly headers?: HeadersLike;
166
+ /**
167
+ * Maximum retries for temporary failures on this call. Without it, a call
168
+ * whose method is idempotent (`GET`, `HEAD`, `OPTIONS`, `PUT`, `DELETE`)
169
+ * takes the client's, which defaults to 2, and any other call is sent once.
170
+ */
171
+ readonly maxRetries?: number | undefined;
172
+ /**
173
+ * Time budget for each attempt of this call, in milliseconds; a redirect
174
+ * chain shares one. Defaults to the client's, which defaults to one minute.
175
+ */
176
+ readonly timeout?: number | undefined;
177
+ /**
178
+ * Validates the success body against the operation's response schema, and
179
+ * fails with a `DecodeError` naming where it does not match. The value
180
+ * returned is the body as parsed either way: validation removes nothing.
181
+ * Defaults to the client's, which defaults to `false`.
182
+ *
183
+ * The schema is loaded on first use, through the `schemas` the client was
184
+ * constructed with; asking a client that was given none fails the call with
185
+ * a `ConfigurationError`. A raw call is validated when its path is a
186
+ * declared operation's, and has no schema to be held to otherwise.
187
+ */
188
+ readonly decode?: boolean | undefined;
189
+ }
190
+ /** What a raw `get` accepts beside the per-call options. */
191
+ interface RawRequestOptions extends RequestOptions {
192
+ readonly query?: Record<string, unknown> | null | undefined;
193
+ }
194
+ /** What a raw `post`, `put`, `patch` or `delete` accepts beside the per-call options. */
195
+ interface RawBodyRequestOptions extends RawRequestOptions {
196
+ readonly body?: unknown;
197
+ }
198
+ //#endregion
199
+ //#region src/effect/generated/resources/_internal/cli/realtime.d.ts
200
+ /** `client._internal.cli.realtime` on the Effect surface. */
201
+ interface Realtime {
202
+ readonly auth: (body: RealtimeAuthParams, options?: RequestOptions) => Effect.Effect<RealtimeAuthResponse, ComposioError>;
203
+ readonly credentials: (options?: RequestOptions) => Effect.Effect<RealtimeCredentialsResponse, ComposioError>;
204
+ }
205
+ //#endregion
206
+ //#region src/effect/generated/resources/_internal/cli/cli.d.ts
207
+ /** `client._internal.cli` on the Effect surface. */
208
+ interface Cli {
209
+ readonly realtime: Realtime;
210
+ readonly createSession: (body?: CliCreateSessionParams | null | undefined, options?: RequestOptions) => Effect.Effect<CliCreateSessionResponse, ComposioError>;
211
+ readonly getSession: (query: CliGetSessionParams, options?: RequestOptions) => Effect.Effect<CliGetSessionResponse, ComposioError>;
212
+ }
213
+ //#endregion
214
+ //#region src/effect/generated/resources/_internal/logs/triggers.d.ts
215
+ /** `client._internal.logs.triggers` on the Effect surface. */
216
+ interface Triggers {
217
+ /** @deprecated Deprecated in the input OpenAPI schema. */
218
+ readonly retrieve: (id: string, options?: RequestOptions) => Effect.Effect<TriggerRetrieveResponse, ComposioError>;
219
+ readonly list: (body?: TriggerListParams | null | undefined, options?: RequestOptions) => Effect.Effect<TriggerListResponse, ComposioError>;
220
+ }
221
+ //#endregion
222
+ //#region src/effect/generated/resources/_internal/logs/tools.d.ts
223
+ /** `client._internal.logs.tools` on the Effect surface. */
224
+ interface Tools {
225
+ readonly retrieve: (id: string, options?: RequestOptions) => Effect.Effect<ToolRetrieveResponse, ComposioError>;
226
+ readonly list: (body: ToolListParams, options?: RequestOptions) => Effect.Effect<ToolListResponse, ComposioError>;
227
+ /** @deprecated Deprecated in the input OpenAPI schema. */
228
+ readonly listFields: (options?: RequestOptions) => Effect.Effect<ToolListFieldsResponse, ComposioError>;
229
+ }
230
+ //#endregion
231
+ //#region src/effect/generated/resources/_internal/logs/logs.d.ts
232
+ /** `client._internal.logs` on the Effect surface. */
233
+ interface Logs {
234
+ readonly triggers: Triggers;
235
+ readonly tools: Tools;
236
+ }
237
+ //#endregion
238
+ //#region src/effect/generated/resources/_internal/org/consumer/project.d.ts
239
+ /** `client._internal.org.consumer.project` on the Effect surface. */
240
+ interface Project {
241
+ readonly resolve: (params: ProjectResolveParams, options?: RequestOptions) => Effect.Effect<ProjectResolveResponse, ComposioError>;
242
+ }
243
+ //#endregion
244
+ //#region src/effect/generated/resources/_internal/org/consumer/consumer.d.ts
245
+ /** `client._internal.org.consumer` on the Effect surface. */
246
+ interface Consumer {
247
+ readonly project: Project;
248
+ readonly listConnectedToolkits: (params: ConsumerListConnectedToolkitsParams, options?: RequestOptions) => Effect.Effect<ConsumerListConnectedToolkitsResponse, ComposioError>;
249
+ }
250
+ //#endregion
251
+ //#region src/effect/generated/resources/_internal/org/org.d.ts
252
+ /** `client._internal.org` on the Effect surface. */
253
+ interface Org {
254
+ readonly consumer: Consumer;
255
+ }
256
+ //#endregion
257
+ //#region src/effect/generated/resources/_internal/_internal.d.ts
258
+ /** `client._internal` on the Effect surface. */
259
+ interface Internal {
260
+ readonly cli: Cli;
261
+ readonly logs: Logs;
262
+ readonly org: Org;
263
+ }
264
+ //#endregion
265
+ 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 };