@composio/client 2.0.0-rc.1 → 2.0.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{api-key-revocation-BZL5FAx7.mjs → api-key-revocation-BqiqlJh6.mjs} +1 -1
- package/dist/{auth-CEq4JqWm.mjs → auth-ClFXmN5T.mjs} +1 -1
- package/dist/{auth-configs-CyksMqNB.mjs → auth-configs-COkEdwlP.mjs} +1 -1
- package/dist/{clanker-4wByThQJ.mjs → clanker-1ptspWLR.mjs} +1 -1
- package/dist/{cli-Bi4_ORQO.mjs → cli-BWTXVRT4.mjs} +3 -6
- package/dist/{client-CK6bm7nf.d.mts → client-D5v0_f-k.d.mts} +18 -5
- package/dist/{connected-accounts-B-qN_yLT.mjs → connected-accounts-DK24qYIM.mjs} +1 -1
- package/dist/{consumer-DWlaGBmh.mjs → consumer-Do3lg_vI.mjs} +5 -6
- package/dist/{custom-BQWoONFY.mjs → custom-CH7n4Dyd.mjs} +1 -1
- package/dist/{files-B-UnEejx.mjs → files-DoNtYu2Q.mjs} +1 -1
- package/dist/{files-CNZ-ttVS.mjs → files-lfGzAnJ_.mjs} +1 -1
- package/dist/{generate-DSqfJENZ.mjs → generate-B7ClqhN0.mjs} +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +179 -51
- package/dist/{link-CukKZMxs.mjs → link-NsFv9L3R.mjs} +1 -1
- package/dist/{logs-B87z4hq7.mjs → logs-BhCTVSZE.mjs} +3 -3
- package/dist/{manage-By-b66OH.mjs → manage-7vQYn-gu.mjs} +1 -1
- package/dist/{mcp-B0wla_93.mjs → mcp-r-SWyCDh.mjs} +3 -3
- package/dist/{org-BSq_z6fP.mjs → org-C12wx9QM.mjs} +6 -6
- package/dist/{owner-BDkEFEVF.mjs → owner-D4ghEkrK.mjs} +1 -1
- package/dist/{project-_s0fWHut.mjs → project-By-OBe-4.mjs} +4 -5
- package/dist/{project-Cj-NKnWZ.mjs → project-Cnr9eceg.mjs} +1 -1
- package/dist/{project-D-c0Zrrl.mjs → project-DgdqyoZJ.mjs} +1 -1
- package/dist/{project-C0h91WGF.mjs → project-DzrdSIis.mjs} +1 -1
- package/dist/{realtime-BcHoYszT.mjs → realtime-DHJnO2Ye.mjs} +1 -1
- package/dist/{request-DwPfYYNF.mjs → request-zLX87M09.mjs} +290 -70
- package/dist/resources/api-key-revocation.d.mts +1 -1
- package/dist/resources/api-key-revocation.mjs +1 -1
- package/dist/resources/auth/auth.d.mts +1 -1
- package/dist/resources/auth/auth.mjs +1 -1
- package/dist/resources/auth/index.d.mts +1 -1
- package/dist/resources/auth/index.mjs +2 -2
- package/dist/resources/auth/session.d.mts +1 -1
- package/dist/resources/auth/session.mjs +1 -1
- package/dist/resources/auth-configs.d.mts +1 -1
- package/dist/resources/auth-configs.mjs +1 -1
- package/dist/resources/auth.d.mts +1 -1
- package/dist/resources/auth.mjs +2 -2
- package/dist/resources/cli/cli.d.mts +1 -1
- package/dist/resources/cli/cli.mjs +1 -1
- package/dist/resources/cli/index.d.mts +1 -1
- package/dist/resources/cli/index.mjs +2 -2
- package/dist/resources/cli/realtime.d.mts +1 -1
- package/dist/resources/cli/realtime.mjs +1 -1
- package/dist/resources/cli.d.mts +1 -1
- package/dist/resources/cli.mjs +2 -2
- package/dist/resources/connected-accounts.d.mts +1 -1
- package/dist/resources/connected-accounts.mjs +1 -1
- package/dist/resources/files.d.mts +1 -1
- package/dist/resources/files.mjs +1 -1
- package/dist/resources/index.d.mts +1 -1
- package/dist/resources/index.mjs +13 -13
- package/dist/resources/link.d.mts +1 -1
- package/dist/resources/link.mjs +1 -1
- package/dist/resources/logs/index.d.mts +1 -1
- package/dist/resources/logs/index.mjs +3 -3
- package/dist/resources/logs/logs.d.mts +1 -1
- package/dist/resources/logs/logs.mjs +1 -1
- package/dist/resources/logs/tools.d.mts +1 -1
- package/dist/resources/logs/tools.mjs +1 -1
- package/dist/resources/logs/triggers.d.mts +1 -1
- package/dist/resources/logs/triggers.mjs +1 -1
- package/dist/resources/logs.d.mts +1 -1
- package/dist/resources/logs.mjs +3 -3
- package/dist/resources/mcp/custom.d.mts +1 -1
- package/dist/resources/mcp/custom.mjs +1 -1
- package/dist/resources/mcp/generate.d.mts +1 -1
- package/dist/resources/mcp/generate.mjs +1 -1
- package/dist/resources/mcp/index.d.mts +1 -1
- package/dist/resources/mcp/index.mjs +3 -3
- package/dist/resources/mcp/mcp.d.mts +1 -1
- package/dist/resources/mcp/mcp.mjs +1 -1
- package/dist/resources/mcp.d.mts +1 -1
- package/dist/resources/mcp.mjs +3 -3
- package/dist/resources/org/clanker.d.mts +1 -1
- package/dist/resources/org/clanker.mjs +1 -1
- package/dist/resources/org/consumer/consumer.d.mts +1 -1
- package/dist/resources/org/consumer/consumer.mjs +1 -1
- package/dist/resources/org/consumer/index.d.mts +1 -1
- package/dist/resources/org/consumer/index.mjs +2 -2
- package/dist/resources/org/consumer/project.d.mts +1 -1
- package/dist/resources/org/consumer/project.mjs +1 -1
- package/dist/resources/org/consumer.d.mts +1 -1
- package/dist/resources/org/consumer.mjs +2 -2
- package/dist/resources/org/index.d.mts +1 -1
- package/dist/resources/org/index.mjs +6 -6
- package/dist/resources/org/org.d.mts +1 -1
- package/dist/resources/org/org.mjs +1 -1
- package/dist/resources/org/owner/index.d.mts +1 -1
- package/dist/resources/org/owner/index.mjs +2 -2
- package/dist/resources/org/owner/owner.d.mts +1 -1
- package/dist/resources/org/owner/owner.mjs +1 -1
- package/dist/resources/org/owner/project.d.mts +1 -1
- package/dist/resources/org/owner/project.mjs +1 -1
- package/dist/resources/org/owner.d.mts +1 -1
- package/dist/resources/org/owner.mjs +2 -2
- package/dist/resources/org/project.d.mts +1 -1
- package/dist/resources/org/project.mjs +1 -1
- package/dist/resources/org/usage.d.mts +1 -1
- package/dist/resources/org/usage.mjs +1 -1
- package/dist/resources/org.d.mts +1 -1
- package/dist/resources/org.mjs +6 -6
- package/dist/resources/project/index.d.mts +1 -1
- package/dist/resources/project/index.mjs +1 -1
- package/dist/resources/project/project.d.mts +1 -1
- package/dist/resources/project/project.mjs +1 -1
- package/dist/resources/project/usage.d.mts +1 -1
- package/dist/resources/project/usage.mjs +1 -1
- package/dist/resources/project.d.mts +1 -1
- package/dist/resources/project.mjs +1 -1
- package/dist/resources/tool-router/index.d.mts +1 -1
- package/dist/resources/tool-router/index.mjs +2 -2
- package/dist/resources/tool-router/session/files.d.mts +1 -1
- package/dist/resources/tool-router/session/files.mjs +1 -1
- package/dist/resources/tool-router/session/index.d.mts +1 -1
- package/dist/resources/tool-router/session/index.mjs +2 -2
- package/dist/resources/tool-router/session/session.d.mts +1 -1
- package/dist/resources/tool-router/session/session.mjs +1 -1
- package/dist/resources/tool-router/session.d.mts +1 -1
- package/dist/resources/tool-router/session.mjs +2 -2
- package/dist/resources/tool-router/tool-router.d.mts +1 -1
- package/dist/resources/tool-router/tool-router.mjs +1 -1
- package/dist/resources/tool-router.d.mts +1 -1
- package/dist/resources/tool-router.mjs +2 -2
- package/dist/resources/toolkits.d.mts +1 -1
- package/dist/resources/toolkits.mjs +1 -1
- package/dist/resources/tools.d.mts +1 -1
- package/dist/resources/tools.mjs +1 -1
- package/dist/resources/trigger-instances/index.d.mts +1 -1
- package/dist/resources/trigger-instances/index.mjs +2 -2
- package/dist/resources/trigger-instances/manage.d.mts +1 -1
- package/dist/resources/trigger-instances/manage.mjs +1 -1
- package/dist/resources/trigger-instances/trigger-instances.d.mts +1 -1
- package/dist/resources/trigger-instances/trigger-instances.mjs +1 -1
- package/dist/resources/trigger-instances.d.mts +1 -1
- package/dist/resources/trigger-instances.mjs +2 -2
- package/dist/resources/triggers-types.d.mts +1 -1
- package/dist/resources/triggers-types.mjs +1 -1
- package/dist/resources/webhook-endpoints.d.mts +1 -1
- package/dist/resources/webhook-endpoints.mjs +1 -1
- package/dist/resources/webhook-subscriptions.d.mts +1 -1
- package/dist/resources/webhook-subscriptions.mjs +1 -1
- package/dist/{session-DNm4GFO-.mjs → session-Ci0MoTTn.mjs} +1 -1
- package/dist/{session-Do3wHYNe.mjs → session-CmqSfXtq.mjs} +2 -2
- package/dist/{tool-router-5OfsPkJ_.mjs → tool-router-DbmIxiU5.mjs} +1 -1
- package/dist/{toolkits-CcE90C2S.mjs → toolkits-BUWB3p_C.mjs} +1 -1
- package/dist/{tools-B5uEInC8.mjs → tools-B4kHPHbe.mjs} +1 -1
- package/dist/{tools-CdVgfSpk.mjs → tools-BO1wTIiE.mjs} +2 -5
- package/dist/{trigger-instances-lkKWqHgd.mjs → trigger-instances-CoEohjcv.mjs} +2 -2
- package/dist/{triggers-DNx9yjbS.mjs → triggers-BwsETpsM.mjs} +1 -1
- package/dist/{triggers-types-MjEcrPbH.mjs → triggers-types-DmOurxxx.mjs} +1 -1
- package/dist/{usage-CKyu9RzD.mjs → usage-BJsJ4nsd.mjs} +1 -1
- package/dist/{usage-Cv9VNy5H.mjs → usage-D6ahTV_Y.mjs} +1 -1
- package/dist/{webhook-endpoints-DIyg3YlR.mjs → webhook-endpoints-CyWYVPMe.mjs} +1 -1
- package/dist/{webhook-subscriptions-B7AgTACq.mjs → webhook-subscriptions-BgnCTUGn.mjs} +1 -1
- package/package.json +3 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as path } from "./request-
|
|
2
|
-
import { t as Realtime } from "./realtime-
|
|
1
|
+
import { c as mergeHeaders, r as path } from "./request-zLX87M09.mjs";
|
|
2
|
+
import { t as Realtime } from "./realtime-DHJnO2Ye.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/compat/resources/cli/cli.ts
|
|
5
5
|
/**
|
|
@@ -20,10 +20,7 @@ var Cli = class {
|
|
|
20
20
|
return this.#client.post(path`/api/v3.1/cli/codact_failures`, {
|
|
21
21
|
body,
|
|
22
22
|
...options,
|
|
23
|
-
headers: {
|
|
24
|
-
...xUserApiKey != null ? { "x-user-api-key": xUserApiKey } : void 0,
|
|
25
|
-
...options?.headers
|
|
26
|
-
}
|
|
23
|
+
headers: mergeHeaders([{ ...xUserApiKey != null ? { "x-user-api-key": xUserApiKey } : void 0 }, options?.headers])
|
|
27
24
|
});
|
|
28
25
|
}
|
|
29
26
|
createSession(body = {}, options) {
|
|
@@ -79,6 +79,20 @@ declare class UnprocessableEntityError extends APIError<422, Headers> {}
|
|
|
79
79
|
declare class RateLimitError extends APIError<429, Headers> {}
|
|
80
80
|
declare class InternalServerError extends APIError<number, Headers> {}
|
|
81
81
|
//#endregion
|
|
82
|
+
//#region src/compat/headers.d.ts
|
|
83
|
+
type HeaderValue = string | null | undefined;
|
|
84
|
+
/**
|
|
85
|
+
* The internal nullable representation used by Stainless. The symbol that
|
|
86
|
+
* brands its concrete type is private, so compatibility is expressed through
|
|
87
|
+
* the two public data fields the representation carries.
|
|
88
|
+
*/
|
|
89
|
+
interface NullableHeadersLike {
|
|
90
|
+
readonly values: Headers;
|
|
91
|
+
readonly nulls: ReadonlySet<string>;
|
|
92
|
+
}
|
|
93
|
+
/** Header inputs accepted by the published Stainless client. */
|
|
94
|
+
type HeadersLike = Headers | ReadonlyArray<ReadonlyArray<HeaderValue | readonly HeaderValue[]>> | Record<string, HeaderValue | readonly HeaderValue[]> | NullableHeadersLike | null | undefined;
|
|
95
|
+
//#endregion
|
|
82
96
|
//#region src/generated/types.gen.d.ts
|
|
83
97
|
type Tool = {
|
|
84
98
|
/**
|
|
@@ -20884,7 +20898,7 @@ type GetApiV31ToolkitsChangelogResponses = {
|
|
|
20884
20898
|
* `signal` support is load-bearing (abort → `APIUserAbortError`).
|
|
20885
20899
|
*/
|
|
20886
20900
|
interface RequestOptions {
|
|
20887
|
-
headers?:
|
|
20901
|
+
headers?: HeadersLike;
|
|
20888
20902
|
maxRetries?: number;
|
|
20889
20903
|
timeout?: number;
|
|
20890
20904
|
signal?: AbortSignal | null;
|
|
@@ -22639,9 +22653,8 @@ interface Logger {
|
|
|
22639
22653
|
/**
|
|
22640
22654
|
* Stainless-compatible constructor options (composio-base-ts `src/client.ts`).
|
|
22641
22655
|
*
|
|
22642
|
-
* `logLevel`/`logger`
|
|
22643
|
-
*
|
|
22644
|
-
* 'off'` silences it.
|
|
22656
|
+
* `logLevel`/`logger` control request lifecycle records and runtime
|
|
22657
|
+
* deprecation notices. `logLevel: 'off'` silences both.
|
|
22645
22658
|
*/
|
|
22646
22659
|
interface ClientOptions {
|
|
22647
22660
|
/** API key authentication. Defaults to `process.env['COMPOSIO_API_KEY']`. */
|
|
@@ -22686,7 +22699,7 @@ interface ClientOptions {
|
|
|
22686
22699
|
/** Maximum retries for temporary failures. Defaults to 2. */
|
|
22687
22700
|
maxRetries?: number | undefined;
|
|
22688
22701
|
/** Headers sent on every request; per-request headers win, `null` deletes. */
|
|
22689
|
-
defaultHeaders?:
|
|
22702
|
+
defaultHeaders?: HeadersLike;
|
|
22690
22703
|
/** Query params sent on every request; `undefined` removes a param. */
|
|
22691
22704
|
defaultQuery?: Record<string, string | undefined> | undefined;
|
|
22692
22705
|
/** Defaults to `process.env['COMPOSIO_LOG']` or 'warn'. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as path } from "./request-
|
|
2
|
-
import { t as Project } from "./project-
|
|
1
|
+
import { c as mergeHeaders, r as path } from "./request-zLX87M09.mjs";
|
|
2
|
+
import { t as Project } from "./project-By-OBe-4.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/compat/resources/org/consumer/consumer.ts
|
|
5
5
|
/**
|
|
@@ -20,11 +20,10 @@ var Consumer = class {
|
|
|
20
20
|
return this.#client.get(path`/api/v3.1/org/consumer/connected_toolkits`, {
|
|
21
21
|
query,
|
|
22
22
|
...options,
|
|
23
|
-
headers: {
|
|
23
|
+
headers: mergeHeaders([{
|
|
24
24
|
...xUserApiKey != null ? { "x-user-api-key": xUserApiKey } : void 0,
|
|
25
|
-
...xOrgId != null ? { "x-org-id": xOrgId } : void 0
|
|
26
|
-
|
|
27
|
-
}
|
|
25
|
+
...xOrgId != null ? { "x-org-id": xOrgId } : void 0
|
|
26
|
+
}, options?.headers])
|
|
28
27
|
});
|
|
29
28
|
}
|
|
30
29
|
};
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $r as FileListResponse, Ar as SessionExecuteMetaResponse, Br as SessionSearchParams, Cr as SessionAttachResponse, Dr as SessionCreateResponse, Er as SessionCreateParams, Fr as SessionPatchParams, Gr as SessionToolsResponse, Hr as SessionToolkitsParams, Ir as SessionPatchResponse, Jr as FileCreateUploadURLParams, Kr as FileCreateDownloadURLParams, Lr as SessionProxyExecuteParams, Mr as SessionExecuteResponse, Nr as SessionLinkParams, Or as SessionDeleteResponse, Pr as SessionLinkResponse, Qr as FileListParams, Rr as SessionProxyExecuteResponse, Sr as SessionAttachParams, Tr as SessionConfigHistoryResponse, Ur as SessionToolkitsResponse, Vr as SessionSearchResponse, Wr as SessionToolsParams, Xr as FileDeleteParams, Yr as FileCreateUploadURLResponse, Zr as FileDeleteResponse, ai as APIUserAbortError, br as ToolRouter, ci as ComposioError, di as NotFoundError, ei as Files, fi as PermissionDeniedError, hi as APIPromise, i as Logger, ii as APIError, jr as SessionExecuteParams, kr as SessionExecuteMetaParams, li as ConflictError, mi as UnprocessableEntityError, n as Composio, ni as APIConnectionError, oi as AuthenticationError, pi as RateLimitError, qr as FileCreateDownloadURLResponse, r as LogLevel, ri as APIConnectionTimeoutError, si as BadRequestError, t as ClientOptions, ti as RequestOptions, ui as InternalServerError, wr as SessionConfigHistoryParams, xr as Session, zr as SessionRetrieveResponse } from "./client-
|
|
1
|
+
import { $r as FileListResponse, Ar as SessionExecuteMetaResponse, Br as SessionSearchParams, Cr as SessionAttachResponse, Dr as SessionCreateResponse, Er as SessionCreateParams, Fr as SessionPatchParams, Gr as SessionToolsResponse, Hr as SessionToolkitsParams, Ir as SessionPatchResponse, Jr as FileCreateUploadURLParams, Kr as FileCreateDownloadURLParams, Lr as SessionProxyExecuteParams, Mr as SessionExecuteResponse, Nr as SessionLinkParams, Or as SessionDeleteResponse, Pr as SessionLinkResponse, Qr as FileListParams, Rr as SessionProxyExecuteResponse, Sr as SessionAttachParams, Tr as SessionConfigHistoryResponse, Ur as SessionToolkitsResponse, Vr as SessionSearchResponse, Wr as SessionToolsParams, Xr as FileDeleteParams, Yr as FileCreateUploadURLResponse, Zr as FileDeleteResponse, ai as APIUserAbortError, br as ToolRouter, ci as ComposioError, di as NotFoundError, ei as Files, fi as PermissionDeniedError, hi as APIPromise, i as Logger, ii as APIError, jr as SessionExecuteParams, kr as SessionExecuteMetaParams, li as ConflictError, mi as UnprocessableEntityError, n as Composio, ni as APIConnectionError, oi as AuthenticationError, pi as RateLimitError, qr as FileCreateDownloadURLResponse, r as LogLevel, ri as APIConnectionTimeoutError, si as BadRequestError, t as ClientOptions, ti as RequestOptions, ui as InternalServerError, wr as SessionConfigHistoryParams, xr as Session, zr as SessionRetrieveResponse } from "./client-D5v0_f-k.mjs";
|
|
2
2
|
//#region src/version.d.ts
|
|
3
|
-
declare const VERSION = "2.0.0-rc.
|
|
3
|
+
declare const VERSION = "2.0.0-rc.2";
|
|
4
4
|
//#endregion
|
|
5
5
|
export { APIConnectionError, APIConnectionTimeoutError, APIError, APIPromise, APIUserAbortError, AuthenticationError, BadRequestError, type ClientOptions, Composio, Composio as default, ComposioError, ConflictError, type FileCreateDownloadURLParams, type FileCreateDownloadURLResponse, type FileCreateUploadURLParams, type FileCreateUploadURLResponse, type FileDeleteParams, type FileDeleteResponse, type FileListParams, type FileListResponse, Files, InternalServerError, type LogLevel, type Logger, NotFoundError, PermissionDeniedError, RateLimitError, type RequestOptions, Session, type SessionAttachParams, type SessionAttachResponse, type SessionConfigHistoryParams, type SessionConfigHistoryResponse, type SessionCreateParams, type SessionCreateResponse, type SessionDeleteResponse, type SessionExecuteMetaParams, type SessionExecuteMetaResponse, type SessionExecuteParams, type SessionExecuteResponse, type SessionLinkParams, type SessionLinkResponse, type SessionPatchParams, type SessionPatchResponse, type SessionProxyExecuteParams, type SessionProxyExecuteResponse, type SessionRetrieveResponse, type SessionSearchParams, type SessionSearchResponse, type SessionToolkitsParams, type SessionToolkitsResponse, type SessionToolsParams, type SessionToolsResponse, ToolRouter, UnprocessableEntityError, VERSION };
|
package/dist/index.mjs
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
import { t as ApiKeyRevocation } from "./api-key-revocation-
|
|
3
|
-
import { t as AuthConfigs } from "./auth-configs-
|
|
4
|
-
import { t as Auth } from "./auth-
|
|
5
|
-
import { t as Cli } from "./cli-
|
|
6
|
-
import { t as ConnectedAccounts } from "./connected-accounts-
|
|
7
|
-
import { t as Files$1 } from "./files-
|
|
8
|
-
import { t as Link } from "./link-
|
|
9
|
-
import { t as Logs } from "./logs-
|
|
10
|
-
import { t as Mcp } from "./mcp-
|
|
1
|
+
import { _ as InternalServerError, a as inspectDeprecatedInputs, b as RateLimitError, c as mergeHeaders, d as APIError, f as APIUserAbortError, g as ConflictError, h as ComposioError, i as safeJSON, l as APIConnectionError, m as BadRequestError, n as makeRequest, o as inspectDeprecation, p as AuthenticationError, s as assertCredentialTransport, t as castToError, u as APIConnectionTimeoutError, v as NotFoundError, x as UnprocessableEntityError, y as PermissionDeniedError } from "./request-zLX87M09.mjs";
|
|
2
|
+
import { t as ApiKeyRevocation } from "./api-key-revocation-BqiqlJh6.mjs";
|
|
3
|
+
import { t as AuthConfigs } from "./auth-configs-COkEdwlP.mjs";
|
|
4
|
+
import { t as Auth } from "./auth-ClFXmN5T.mjs";
|
|
5
|
+
import { t as Cli } from "./cli-BWTXVRT4.mjs";
|
|
6
|
+
import { t as ConnectedAccounts } from "./connected-accounts-DK24qYIM.mjs";
|
|
7
|
+
import { t as Files$1 } from "./files-DoNtYu2Q.mjs";
|
|
8
|
+
import { t as Link } from "./link-NsFv9L3R.mjs";
|
|
9
|
+
import { t as Logs } from "./logs-BhCTVSZE.mjs";
|
|
10
|
+
import { t as Mcp } from "./mcp-r-SWyCDh.mjs";
|
|
11
11
|
import { t as Migration } from "./migration-CBhnoN-Y.mjs";
|
|
12
|
-
import { t as Org } from "./org-
|
|
13
|
-
import { t as Project } from "./project-
|
|
14
|
-
import { t as Files } from "./files-
|
|
15
|
-
import { t as Session } from "./session-
|
|
16
|
-
import { t as ToolRouter } from "./tool-router-
|
|
17
|
-
import { t as Toolkits } from "./toolkits-
|
|
18
|
-
import { t as Tools } from "./tools-
|
|
19
|
-
import { t as TriggerInstances } from "./trigger-instances-
|
|
20
|
-
import { t as TriggersTypes } from "./triggers-types-
|
|
21
|
-
import { t as WebhookEndpoints } from "./webhook-endpoints-
|
|
22
|
-
import { t as WebhookSubscriptions } from "./webhook-subscriptions-
|
|
12
|
+
import { t as Org } from "./org-C12wx9QM.mjs";
|
|
13
|
+
import { t as Project } from "./project-DgdqyoZJ.mjs";
|
|
14
|
+
import { t as Files } from "./files-lfGzAnJ_.mjs";
|
|
15
|
+
import { t as Session } from "./session-CmqSfXtq.mjs";
|
|
16
|
+
import { t as ToolRouter } from "./tool-router-DbmIxiU5.mjs";
|
|
17
|
+
import { t as Toolkits } from "./toolkits-BUWB3p_C.mjs";
|
|
18
|
+
import { t as Tools } from "./tools-BO1wTIiE.mjs";
|
|
19
|
+
import { t as TriggerInstances } from "./trigger-instances-CoEohjcv.mjs";
|
|
20
|
+
import { t as TriggersTypes } from "./triggers-types-DmOurxxx.mjs";
|
|
21
|
+
import { t as WebhookEndpoints } from "./webhook-endpoints-CyWYVPMe.mjs";
|
|
22
|
+
import { t as WebhookSubscriptions } from "./webhook-subscriptions-BgnCTUGn.mjs";
|
|
23
23
|
|
|
24
24
|
//#region src/compat/api-promise.ts
|
|
25
25
|
/**
|
|
@@ -98,6 +98,98 @@ var APIPromise = class APIPromise extends Promise {
|
|
|
98
98
|
}
|
|
99
99
|
};
|
|
100
100
|
|
|
101
|
+
//#endregion
|
|
102
|
+
//#region src/compat/generated-deprecated-inputs.ts
|
|
103
|
+
const GENERATED_DEPRECATED_INPUTS = /* @__PURE__ */ new Map([
|
|
104
|
+
["authConfigs.list", [{
|
|
105
|
+
wire: "deprecated_app_id",
|
|
106
|
+
in: "query",
|
|
107
|
+
replacementWire: "toolkit_slug"
|
|
108
|
+
}, {
|
|
109
|
+
wire: "deprecated_status",
|
|
110
|
+
in: "query",
|
|
111
|
+
replacementWire: null
|
|
112
|
+
}]],
|
|
113
|
+
["authConfigs.update", [{
|
|
114
|
+
wire: "restrict_to_following_tools",
|
|
115
|
+
in: "body",
|
|
116
|
+
replacementWire: "tool_access_config"
|
|
117
|
+
}]],
|
|
118
|
+
["tools.execute", [{
|
|
119
|
+
wire: "entity_id",
|
|
120
|
+
in: "body",
|
|
121
|
+
replacementWire: "user_id"
|
|
122
|
+
}, {
|
|
123
|
+
wire: "allow_tracing",
|
|
124
|
+
in: "body",
|
|
125
|
+
replacementWire: null
|
|
126
|
+
}]],
|
|
127
|
+
["tools.list", [{
|
|
128
|
+
wire: "search",
|
|
129
|
+
in: "query",
|
|
130
|
+
replacementWire: "query"
|
|
131
|
+
}]],
|
|
132
|
+
["tools.proxy", [{
|
|
133
|
+
wire: "custom_connection_data",
|
|
134
|
+
in: "body",
|
|
135
|
+
replacementWire: null
|
|
136
|
+
}]],
|
|
137
|
+
["triggerInstances.listActive", [
|
|
138
|
+
{
|
|
139
|
+
wire: "connectedAccountIds",
|
|
140
|
+
in: "query",
|
|
141
|
+
replacementWire: "connected_account_ids"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
wire: "authConfigIds",
|
|
145
|
+
in: "query",
|
|
146
|
+
replacementWire: "auth_config_ids"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
wire: "triggerIds",
|
|
150
|
+
in: "query",
|
|
151
|
+
replacementWire: "trigger_ids"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
wire: "triggerNames",
|
|
155
|
+
in: "query",
|
|
156
|
+
replacementWire: "trigger_names"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
wire: "showDisabled",
|
|
160
|
+
in: "query",
|
|
161
|
+
replacementWire: "show_disabled"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
wire: "deprecatedConnectedAccountUuids",
|
|
165
|
+
in: "query",
|
|
166
|
+
replacementWire: "connected_account_ids"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
wire: "deprecatedAuthConfigUuids",
|
|
170
|
+
in: "query",
|
|
171
|
+
replacementWire: "auth_config_ids"
|
|
172
|
+
}
|
|
173
|
+
]],
|
|
174
|
+
["triggerInstances.upsert", [
|
|
175
|
+
{
|
|
176
|
+
wire: "connectedAuthId",
|
|
177
|
+
in: "body",
|
|
178
|
+
replacementWire: "connected_account_id"
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
wire: "triggerConfig",
|
|
182
|
+
in: "body",
|
|
183
|
+
replacementWire: "trigger_config"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
wire: "version",
|
|
187
|
+
in: "body",
|
|
188
|
+
replacementWire: "toolkit_versions"
|
|
189
|
+
}
|
|
190
|
+
]]
|
|
191
|
+
]);
|
|
192
|
+
|
|
101
193
|
//#endregion
|
|
102
194
|
//#region src/compat/generated-operations.ts
|
|
103
195
|
const GENERATED_OPERATIONS = [
|
|
@@ -870,7 +962,7 @@ const createClientResources = (client) => ({
|
|
|
870
962
|
|
|
871
963
|
//#endregion
|
|
872
964
|
//#region src/version.ts
|
|
873
|
-
const VERSION = "2.0.0-rc.
|
|
965
|
+
const VERSION = "2.0.0-rc.2";
|
|
874
966
|
|
|
875
967
|
//#endregion
|
|
876
968
|
//#region src/compat/client.ts
|
|
@@ -879,6 +971,17 @@ const environments = {
|
|
|
879
971
|
staging: "https://staging-backend.composio.dev",
|
|
880
972
|
local: "http://localhost:9900"
|
|
881
973
|
};
|
|
974
|
+
/** Read a trimmed environment value in Node or Deno without assuming either runtime exists. */
|
|
975
|
+
const readEnv = (name) => {
|
|
976
|
+
const globals = globalThis;
|
|
977
|
+
try {
|
|
978
|
+
const fromProcess = globals.process?.env?.[name]?.trim();
|
|
979
|
+
if (fromProcess) return fromProcess;
|
|
980
|
+
} catch {}
|
|
981
|
+
try {
|
|
982
|
+
return globals.Deno?.env?.get?.(name)?.trim() || void 0;
|
|
983
|
+
} catch {}
|
|
984
|
+
};
|
|
882
985
|
/** Severity order: a record at or below the configured level is emitted. */
|
|
883
986
|
const LOG_LEVELS = {
|
|
884
987
|
off: 0,
|
|
@@ -906,10 +1009,13 @@ var Composio = class Composio {
|
|
|
906
1009
|
#fetch;
|
|
907
1010
|
#options;
|
|
908
1011
|
/**
|
|
909
|
-
* The (operation, notice) pairs
|
|
910
|
-
*
|
|
911
|
-
*
|
|
912
|
-
*
|
|
1012
|
+
* The (operation, notice) pairs, and separately the (operation, deprecated
|
|
1013
|
+
* input set) pairs, this instance has already warned about — one Set shared
|
|
1014
|
+
* by both triggers under distinct key prefixes (`inspectDeprecation` vs
|
|
1015
|
+
* `inspectDeprecatedInputs`), so a deprecated endpoint or a deprecated
|
|
1016
|
+
* parameter called in a loop announces itself once — while a *revised*
|
|
1017
|
+
* notice from that same endpoint, say once a `Sunset` date is committed,
|
|
1018
|
+
* still gets through.
|
|
913
1019
|
*
|
|
914
1020
|
* Per client *lineage*, not per process: a client built with `new Composio()`
|
|
915
1021
|
* starts empty, and `withOptions()` shares this exact Set with the client it
|
|
@@ -917,7 +1023,7 @@ var Composio = class Composio {
|
|
|
917
1023
|
* only so a derived client can join its parent's record.
|
|
918
1024
|
*/
|
|
919
1025
|
#deprecationSeen = /* @__PURE__ */ new Set();
|
|
920
|
-
constructor({ baseURL =
|
|
1026
|
+
constructor({ baseURL = readEnv("COMPOSIO_BASE_URL"), apiKey = readEnv("COMPOSIO_API_KEY") ?? null, userApiKey = readEnv("COMPOSIO_USER_API_KEY") ?? null, orgApiKey = readEnv("COMPOSIO_ORG_API_KEY") ?? null, ...opts } = {}) {
|
|
921
1027
|
const options = {
|
|
922
1028
|
apiKey,
|
|
923
1029
|
userApiKey,
|
|
@@ -930,21 +1036,22 @@ var Composio = class Composio {
|
|
|
930
1036
|
this.baseURL = options.baseURL || environments[options.environment || "production"];
|
|
931
1037
|
this.timeout = options.timeout ?? Composio.DEFAULT_TIMEOUT;
|
|
932
1038
|
this.logger = options.logger ?? console;
|
|
933
|
-
this.logLevel = options.logLevel ??
|
|
1039
|
+
this.logLevel = options.logLevel ?? readEnv("COMPOSIO_LOG") ?? "warn";
|
|
934
1040
|
this.fetchOptions = options.fetchOptions;
|
|
935
1041
|
this.maxRetries = options.maxRetries ?? 2;
|
|
936
1042
|
this.#fetch = options.fetch ?? ((input, init) => globalThis.fetch(input, init));
|
|
937
|
-
const customHeadersEnv =
|
|
1043
|
+
const customHeadersEnv = readEnv("COMPOSIO_CUSTOM_HEADERS");
|
|
938
1044
|
if (customHeadersEnv) {
|
|
939
1045
|
const parsed = {};
|
|
940
1046
|
for (const line of customHeadersEnv.split("\n")) {
|
|
941
1047
|
const colon = line.indexOf(":");
|
|
942
1048
|
if (colon >= 0) parsed[line.substring(0, colon).trim()] = line.substring(colon + 1).trim();
|
|
943
1049
|
}
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
1050
|
+
try {
|
|
1051
|
+
options.defaultHeaders = mergeHeaders([parsed, options.defaultHeaders]);
|
|
1052
|
+
} catch (cause) {
|
|
1053
|
+
throw new ComposioError(`COMPOSIO_CUSTOM_HEADERS contains an invalid header: ${cause instanceof Error ? cause.message : String(cause)}`);
|
|
1054
|
+
}
|
|
948
1055
|
}
|
|
949
1056
|
this.#options = options;
|
|
950
1057
|
this.apiKey = apiKey;
|
|
@@ -1006,7 +1113,38 @@ var Composio = class Composio {
|
|
|
1006
1113
|
orgApiKey: this.orgApiKey
|
|
1007
1114
|
};
|
|
1008
1115
|
}
|
|
1116
|
+
#onKernelLog = (level, message, metadata) => {
|
|
1117
|
+
this.#emitLog(level, message, metadata);
|
|
1118
|
+
};
|
|
1119
|
+
#onKernelResponse = (response, options) => {
|
|
1120
|
+
inspectDeprecation({
|
|
1121
|
+
response,
|
|
1122
|
+
method: options.method,
|
|
1123
|
+
path: options.path,
|
|
1124
|
+
baseURL: this.baseURL,
|
|
1125
|
+
operations: GENERATED_OPERATIONS,
|
|
1126
|
+
seen: this.#deprecationSeen,
|
|
1127
|
+
warn: (message) => {
|
|
1128
|
+
this.#emitLog("warn", message);
|
|
1129
|
+
}
|
|
1130
|
+
});
|
|
1131
|
+
};
|
|
1132
|
+
#onKernelRequest = (operation, query, body, headers) => {
|
|
1133
|
+
inspectDeprecatedInputs({
|
|
1134
|
+
operation,
|
|
1135
|
+
query,
|
|
1136
|
+
body,
|
|
1137
|
+
headers,
|
|
1138
|
+
table: GENERATED_DEPRECATED_INPUTS,
|
|
1139
|
+
seen: this.#deprecationSeen,
|
|
1140
|
+
warn: (message) => {
|
|
1141
|
+
this.#emitLog("warn", message);
|
|
1142
|
+
}
|
|
1143
|
+
});
|
|
1144
|
+
};
|
|
1009
1145
|
#kernelConfig() {
|
|
1146
|
+
const configuredLogLevel = isLogLevel(this.logLevel) ? this.logLevel : "warn";
|
|
1147
|
+
const lifecycleLoggingEnabled = LOG_LEVELS[configuredLogLevel] >= LOG_LEVELS.info;
|
|
1010
1148
|
return {
|
|
1011
1149
|
baseURL: this.baseURL,
|
|
1012
1150
|
credentials: this.#credentials(),
|
|
@@ -1018,19 +1156,9 @@ var Composio = class Composio {
|
|
|
1018
1156
|
defaultHeaders: this.#options.defaultHeaders,
|
|
1019
1157
|
defaultQuery: this.#options.defaultQuery,
|
|
1020
1158
|
fetchOptions: this.fetchOptions,
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
method: options.method,
|
|
1025
|
-
path: options.path,
|
|
1026
|
-
baseURL: this.baseURL,
|
|
1027
|
-
operations: GENERATED_OPERATIONS,
|
|
1028
|
-
seen: this.#deprecationSeen,
|
|
1029
|
-
warn: (message) => {
|
|
1030
|
-
this.#emitLog("warn", message);
|
|
1031
|
-
}
|
|
1032
|
-
});
|
|
1033
|
-
}
|
|
1159
|
+
...lifecycleLoggingEnabled ? { onLog: this.#onKernelLog } : {},
|
|
1160
|
+
onResponse: this.#onKernelResponse,
|
|
1161
|
+
onRequest: this.#onKernelRequest
|
|
1034
1162
|
};
|
|
1035
1163
|
}
|
|
1036
1164
|
/**
|
|
@@ -1040,15 +1168,15 @@ var Composio = class Composio {
|
|
|
1040
1168
|
* and the public surface is pinned against the Stainless client, which
|
|
1041
1169
|
* exposes no such method. The logger is caller-supplied, so a missing method
|
|
1042
1170
|
* or a throwing one is treated as no logger at all — the same rule the
|
|
1043
|
-
* kernel applies to
|
|
1171
|
+
* kernel applies to its advisory observer callbacks.
|
|
1044
1172
|
*/
|
|
1045
|
-
#emitLog(level, message) {
|
|
1173
|
+
#emitLog(level, message, ...details) {
|
|
1046
1174
|
const configured = isLogLevel(this.logLevel) ? this.logLevel : "warn";
|
|
1047
1175
|
if (LOG_LEVELS[configured] < LOG_LEVELS[level]) return;
|
|
1048
|
-
const sink = this.logger[level];
|
|
1049
|
-
if (typeof sink !== "function") return;
|
|
1050
1176
|
try {
|
|
1051
|
-
sink
|
|
1177
|
+
const sink = this.logger[level];
|
|
1178
|
+
if (typeof sink !== "function") return;
|
|
1179
|
+
sink.call(this.logger, message, ...details);
|
|
1052
1180
|
} catch {}
|
|
1053
1181
|
}
|
|
1054
1182
|
static Composio = this;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as path } from "./request-
|
|
2
|
-
import { t as Triggers } from "./triggers-
|
|
3
|
-
import { t as Tools } from "./tools-
|
|
1
|
+
import { r as path } from "./request-zLX87M09.mjs";
|
|
2
|
+
import { t as Triggers } from "./triggers-BwsETpsM.mjs";
|
|
3
|
+
import { t as Tools } from "./tools-B4kHPHbe.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/compat/resources/logs/logs.ts
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as path } from "./request-
|
|
2
|
-
import { t as Custom } from "./custom-
|
|
3
|
-
import { t as Generate } from "./generate-
|
|
1
|
+
import { r as path } from "./request-zLX87M09.mjs";
|
|
2
|
+
import { t as Custom } from "./custom-CH7n4Dyd.mjs";
|
|
3
|
+
import { t as Generate } from "./generate-B7ClqhN0.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/compat/resources/mcp/mcp.ts
|
|
6
6
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { r as path } from "./request-
|
|
2
|
-
import { t as Clanker } from "./clanker-
|
|
3
|
-
import { t as Consumer } from "./consumer-
|
|
4
|
-
import { t as Owner } from "./owner-
|
|
5
|
-
import { t as Project } from "./project-
|
|
6
|
-
import { t as Usage } from "./usage-
|
|
1
|
+
import { r as path } from "./request-zLX87M09.mjs";
|
|
2
|
+
import { t as Clanker } from "./clanker-1ptspWLR.mjs";
|
|
3
|
+
import { t as Consumer } from "./consumer-Do3lg_vI.mjs";
|
|
4
|
+
import { t as Owner } from "./owner-D4ghEkrK.mjs";
|
|
5
|
+
import { t as Project } from "./project-Cnr9eceg.mjs";
|
|
6
|
+
import { t as Usage } from "./usage-D6ahTV_Y.mjs";
|
|
7
7
|
|
|
8
8
|
//#region src/compat/resources/org/org.ts
|
|
9
9
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as path } from "./request-
|
|
1
|
+
import { c as mergeHeaders, r as path } from "./request-zLX87M09.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/compat/resources/org/consumer/project.ts
|
|
4
4
|
/**
|
|
@@ -16,11 +16,10 @@ var Project = class {
|
|
|
16
16
|
const { "x-user-api-key": xUserApiKey, "x-org-id": xOrgId } = params;
|
|
17
17
|
return this.#client.post(path`/api/v3.1/org/consumer/project/resolve`, {
|
|
18
18
|
...options,
|
|
19
|
-
headers: {
|
|
19
|
+
headers: mergeHeaders([{
|
|
20
20
|
...xUserApiKey != null ? { "x-user-api-key": xUserApiKey } : void 0,
|
|
21
|
-
...xOrgId != null ? { "x-org-id": xOrgId } : void 0
|
|
22
|
-
|
|
23
|
-
}
|
|
21
|
+
...xOrgId != null ? { "x-org-id": xOrgId } : void 0
|
|
22
|
+
}, options?.headers])
|
|
24
23
|
});
|
|
25
24
|
}
|
|
26
25
|
};
|