@composio/client 2.0.0-rc.18 → 2.0.0-rc.19
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/README.md +36 -14
- package/dist/{api-key-revocation-JkA4sOGH.mjs → api-key-revocation-DMCgun-A.mjs} +1 -1
- package/dist/{auth-B_K-wdMm.mjs → auth-D-U9Aq8C.mjs} +1 -1
- package/dist/{auth-configs-RAgN782Z.mjs → auth-configs-DAG5mMeH.mjs} +1 -1
- package/dist/{clanker-Pgyyh95r.mjs → clanker-Yomp86hJ.mjs} +1 -1
- package/dist/{cli-Ca5bRiEN.mjs → cli-zihiw3aI.mjs} +2 -2
- package/dist/{connected-accounts-D6NTwvbi.mjs → connected-accounts-Bd4AbWoH.mjs} +1 -1
- package/dist/{consumer-BP4OyJS0.mjs → consumer-Bk0cyIii.mjs} +2 -2
- package/dist/{custom-DA3ABHnI.mjs → custom-Ce8G2c11.mjs} +1 -1
- package/dist/{custom-BBr7KbCv.mjs → custom-DWT3cCog.mjs} +1 -1
- package/dist/effect.d.mts +16 -60
- package/dist/effect.mjs +146 -182
- package/dist/{files-CeBs4ZE1.mjs → files-DRp_J4zH.mjs} +1 -1
- package/dist/{files-DLRmNLRD.mjs → files-ZxEVlE_y.mjs} +1 -1
- package/dist/{generate-16uLPwUU.mjs → generate-Du9XUrlx.mjs} +1 -1
- package/dist/{generated-deprecated-inputs-zx6ml908.mjs → generated-deprecated-inputs-Dy_lBver.mjs} +1 -1
- package/dist/{generated-operations-DKgGT6Dg.mjs → generated-operations-Dv7pAKDT.mjs} +150 -250
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +60 -140
- package/dist/{keyring-Q8GSieAv.mjs → keyring-CgOIS5x7.mjs} +1 -1
- package/dist/{link-D4dY_eaN.mjs → link-CW1ts4pm.mjs} +1 -1
- package/dist/{logs-Dc63Ju74.mjs → logs-DFdH5DoT.mjs} +3 -3
- package/dist/{manage-ByF6b3OD.mjs → manage-CeB03gO8.mjs} +1 -1
- package/dist/{mcp-Cw7-Mtkm.mjs → mcp-DNRMWWum.mjs} +3 -3
- package/dist/{org-RRUxKfRw.mjs → org-HuYaKgVf.mjs} +6 -6
- package/dist/{owner-GZX-sp-h.mjs → owner-I9fXmIO_.mjs} +1 -1
- package/dist/{project-Cj9ULE0a.mjs → project-CxQ2H8UB.mjs} +1 -1
- package/dist/{project-C_YZ-eLI.mjs → project-DcV01umC.mjs} +1 -1
- package/dist/{project-BsKmk9T7.mjs → project-Dwblmpw8.mjs} +1 -1
- package/dist/{project-C1uq7bV_.mjs → project-FuP5k9R1.mjs} +1 -1
- package/dist/{realtime-W-lJ0Vcs.mjs → realtime-F_sGuTd8.mjs} +1 -1
- 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/custom.d.mts +1 -1
- package/dist/resources/custom.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/keyring.d.mts +1 -1
- package/dist/resources/keyring.mjs +1 -1
- 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/session-configs.d.mts +1 -1
- package/dist/resources/session-configs.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-BT5NJfbm.mjs → session-B-ifOjVv.mjs} +1 -1
- package/dist/{session-BmXeclWC.mjs → session-CpwJh7Hn.mjs} +2 -2
- package/dist/{session-configs-x3OA4CSe.d.mts → session-configs-BLy_O6bX.d.mts} +21 -101
- package/dist/{tool-router-DYPUf-fN.mjs → tool-router-jNsaldKV.mjs} +1 -1
- package/dist/{toolkits-DZOZDm-4.mjs → toolkits-DK4My9FW.mjs} +1 -1
- package/dist/{tools-C0GjPEpP.mjs → tools-DNkimllW.mjs} +1 -1
- package/dist/{tools-BDCRk80t.mjs → tools-Gun_2We6.mjs} +1 -1
- package/dist/{trigger-instances-J5frdgzO.mjs → trigger-instances-vvKswQSW.mjs} +2 -2
- package/dist/{triggers-CnvE7y0L.mjs → triggers-CfrGxKIo.mjs} +1 -1
- package/dist/{triggers-types-DLVCtuwC.mjs → triggers-types-DYW2Mr8z.mjs} +1 -1
- package/dist/{usage-DjQg9WIV.mjs → usage-YIBYNpVF.mjs} +1 -1
- package/dist/{usage-DPxuivP6.mjs → usage-vt9HmnNf.mjs} +1 -1
- package/dist/version-DB98yI2B.d.mts +4 -0
- package/dist/{webhook-endpoints-BrSjXOf0.mjs → webhook-endpoints-HqLteVW6.mjs} +1 -1
- package/dist/{webhook-subscriptions-HT1acmwH.mjs → webhook-subscriptions-CXhNXIOM.mjs} +1 -1
- package/package.json +2 -2
- package/dist/version-DEAhxVwC.d.mts +0 -4
|
@@ -86,43 +86,12 @@ const SCHEME_HEADERS = {
|
|
|
86
86
|
/** The scheme a request authenticates with when its operation names none. */
|
|
87
87
|
const DEFAULT_SCHEME = "ApiKeyAuth";
|
|
88
88
|
/**
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
* and 200 for `x-user-api-key` alone, and answers both together with
|
|
96
|
-
* `401 HTTP_Unauthorized`:
|
|
97
|
-
*
|
|
98
|
-
* > Multiple authentication modes were provided. Provide exactly one
|
|
99
|
-
* > authentication mode per request. Provided: ApiKeyAuth via x-api-key,
|
|
100
|
-
* > UserApiKeyAuth via x-user-api-key.
|
|
101
|
-
*
|
|
102
|
-
* The platform names the schemes by their OpenAPI names, so this is the same
|
|
103
|
-
* vocabulary `security` is written in rather than a coincidence of headers. It
|
|
104
|
-
* holds for `x-api-key` + `x-org-api-key` too, and on an operation that accepts
|
|
105
|
-
* only one of them. There is therefore no additive "send the user key as well"
|
|
106
|
-
* model available, and the choice has to be made per request rather than
|
|
107
|
-
* accumulated.
|
|
108
|
-
*
|
|
109
|
-
* The precedence is the one every release before `rc.18` applied:
|
|
110
|
-
*
|
|
111
|
-
* 1. **`ApiKeyAuth` wins wherever the operation accepts it** and a project key
|
|
112
|
-
* is held.
|
|
113
|
-
* 2. Otherwise the first scheme the operation names that this client both
|
|
114
|
-
* recognizes *and* holds a credential for. That is what makes the
|
|
115
|
-
* `UserApiKeyAuth`-only and `OrgApiKeyAuth`-only operations reachable.
|
|
116
|
-
* 3. Otherwise `ApiKeyAuth`, which is what this client did before any of this
|
|
117
|
-
* existed. A `UserApiKeyAuth`-only operation called by a client with no user
|
|
118
|
-
* key still sends `x-api-key` and still fails the same way.
|
|
119
|
-
*
|
|
120
|
-
* Rule 3 is also where a scheme name this client does not know lands. Three of
|
|
121
|
-
* them exist: `security` references `no_auth` (3 operations) and
|
|
122
|
-
* `workbench_access_key` (1) and `components.securitySchemes` declares neither.
|
|
123
|
-
* Those four operations receive `x-api-key`, so resolving an unknown name to
|
|
124
|
-
* "no credential" would be a wire change made on the strength of a spec defect.
|
|
125
|
-
* A later generator pass must not "fix" that.
|
|
89
|
+
* `Auth.auto`'s choice for an operation declaring `schemes`: `ApiKeyAuth`
|
|
90
|
+
* wherever the operation accepts it and a project key is held, else the first
|
|
91
|
+
* declared scheme that is held, else `ApiKeyAuth`. An undeclared scheme name
|
|
92
|
+
* (`no_auth`, `workbench_access_key`) falls through to `ApiKeyAuth`, as every
|
|
93
|
+
* release before rc.18 sent. A request may carry only one credential: the API
|
|
94
|
+
* answers two with a 401.
|
|
126
95
|
*/
|
|
127
96
|
const selectScheme = (schemes, held) => {
|
|
128
97
|
if (schemes === void 0 || schemes.length === 0) return DEFAULT_SCHEME;
|
|
@@ -134,9 +103,6 @@ const selectScheme = (schemes, held) => {
|
|
|
134
103
|
}
|
|
135
104
|
return DEFAULT_SCHEME;
|
|
136
105
|
};
|
|
137
|
-
/** The header `scheme` is sent as. */
|
|
138
|
-
const schemeHeader = (scheme) => SCHEME_HEADERS[scheme];
|
|
139
|
-
/** The scheme a credential header name belongs to, or `undefined` for any other name. */
|
|
140
106
|
const schemeOfHeader = (name) => Object.keys(SCHEME_HEADERS).find((scheme) => SCHEME_HEADERS[scheme] === name);
|
|
141
107
|
/**
|
|
142
108
|
* What counts as loopback, pinned rather than assumed. `localhost` is not the
|
|
@@ -191,7 +157,7 @@ const resolveHTTPURL = (target, base) => {
|
|
|
191
157
|
/** Whether a credential may be sent to this origin at all. */
|
|
192
158
|
const isCredentialSafeOrigin = (url, allowedHTTPOrigin = null) => url.protocol === "https:" || url.protocol === "http:" && (isLoopbackHostname(url.hostname) || allowedHTTPOrigin !== null && url.origin === allowedHTTPOrigin);
|
|
193
159
|
const LOOPBACK_DESCRIPTION = "localhost, *.localhost, 127.0.0.0/8, [::1]";
|
|
194
|
-
const insecureOriginMessage = (baseURL) => `Refusing to send a Composio API credential to ${baseURL}: a credentialed API origin must use HTTPS. By default, plain http:// is permitted only for loopback development endpoints (${LOOPBACK_DESCRIPTION}). Pass an https://
|
|
160
|
+
const insecureOriginMessage = (baseURL) => `Refusing to send a Composio API credential to ${baseURL}: a credentialed API origin must use HTTPS. By default, plain http:// is permitted only for loopback development endpoints (${LOOPBACK_DESCRIPTION}). Pass an https:// or loopback baseURL, set allowInsecureHTTP: true (or COMPOSIO_ALLOW_INSECURE_HTTP=1) for the configured development origin, or construct the client without credentials.`;
|
|
195
161
|
/**
|
|
196
162
|
* Rule 1 at construction time: a client that holds a credential must be
|
|
197
163
|
* pointed at an origin that can carry one. Knowable before any request is
|
|
@@ -317,18 +283,7 @@ const carriesCredentials = (headers) => CREDENTIAL_HEADERS.some((name) => header
|
|
|
317
283
|
|
|
318
284
|
//#endregion
|
|
319
285
|
//#region src/compat/auth.ts
|
|
320
|
-
/**
|
|
321
|
-
* Who a client authenticates as (`Auth`) and which organization or project it
|
|
322
|
-
* addresses (`Scope`).
|
|
323
|
-
*
|
|
324
|
-
* A request carries zero or one Composio credential. A fixed mode sends that
|
|
325
|
-
* credential class on every request to the API origin and never consults the
|
|
326
|
-
* operation table; `auto` picks one configured credential from the operation's
|
|
327
|
-
* declared schemes, which is how `rc.17` and earlier chose. `none` sends no
|
|
328
|
-
* credential, and leaves the credential header names to the caller.
|
|
329
|
-
*/
|
|
330
286
|
const NONE = Object.freeze({ mode: "none" });
|
|
331
|
-
/** The constructors, typed for one entry's credential. Every entry's behave the same. */
|
|
332
287
|
const authConstructors = () => Object.freeze({
|
|
333
288
|
none: () => NONE,
|
|
334
289
|
project: (credential) => Object.freeze({
|
|
@@ -348,176 +303,164 @@ const authConstructors = () => Object.freeze({
|
|
|
348
303
|
credentials: Object.freeze({ ...credentials })
|
|
349
304
|
})
|
|
350
305
|
});
|
|
351
|
-
/** The constructors of {@link Auth}: `Auth.project(key)`, `Auth.user(key)`, `Auth.organization(key)`, `Auth.auto({ ... })`, `Auth.none()`. */
|
|
352
306
|
const Auth = authConstructors();
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
const
|
|
359
|
-
const given = [
|
|
360
|
-
"project",
|
|
361
|
-
"user",
|
|
362
|
-
"organization"
|
|
363
|
-
].filter((key) => credentials[key] !== void 0);
|
|
364
|
-
if (given.length === 0) return NONE;
|
|
365
|
-
if (given.length > 1) return authConstructors().auto(Object.fromEntries(given.map((key) => [key, credentials[key]])));
|
|
366
|
-
const [only] = given;
|
|
367
|
-
return authConstructors()[only](credentials[only]);
|
|
368
|
-
};
|
|
369
|
-
const MODE_SCHEME = {
|
|
307
|
+
const FIXED_MODES = [
|
|
308
|
+
"project",
|
|
309
|
+
"user",
|
|
310
|
+
"organization"
|
|
311
|
+
];
|
|
312
|
+
const SCHEME_OF_MODE = {
|
|
370
313
|
project: "ApiKeyAuth",
|
|
371
314
|
user: "UserApiKeyAuth",
|
|
372
315
|
organization: "OrgApiKeyAuth"
|
|
373
316
|
};
|
|
374
|
-
|
|
375
|
-
|
|
317
|
+
const isFixedMode = (mode) => FIXED_MODES.includes(mode);
|
|
318
|
+
/** One credential is that fixed mode, several is `auto`, none is `none`. Shared by `fromEnv` and `layerConfig`. */
|
|
319
|
+
const authFromCredentials = (credentials) => {
|
|
320
|
+
const auth = authConstructors();
|
|
321
|
+
const [first, ...rest] = FIXED_MODES.filter((mode) => credentials[mode] !== void 0);
|
|
322
|
+
if (first === void 0) return auth.none();
|
|
323
|
+
if (rest.length > 0) return auth.auto(credentials);
|
|
324
|
+
return auth[first](credentials[first]);
|
|
325
|
+
};
|
|
326
|
+
const isSendable = (value, name = "x-api-key") => {
|
|
327
|
+
try {
|
|
328
|
+
new globalThis.Headers().set(name, value);
|
|
329
|
+
return true;
|
|
330
|
+
} catch {
|
|
331
|
+
return false;
|
|
332
|
+
}
|
|
333
|
+
};
|
|
334
|
+
const isUsableKey = (key) => typeof key === "string" && /\S/.test(key) && isSendable(key);
|
|
335
|
+
const unusableKeyError = (source) => new ComposioError(`${source} is not a usable key: it must be a string with a non-whitespace character and no line break, NUL or character outside Latin-1.`);
|
|
336
|
+
const holdCredential = (value, option, kind) => {
|
|
337
|
+
if (!kind.is(value)) throw new ComposioError(`\`${option}\` must be a key or a function that returns one.`);
|
|
338
|
+
const key = kind.keyOf(value);
|
|
339
|
+
if (key !== void 0 && !isUsableKey(key)) throw unusableKeyError(`\`${option}\``);
|
|
340
|
+
return value;
|
|
341
|
+
};
|
|
342
|
+
const holdAuto = (given, kind) => {
|
|
343
|
+
const credentials = {};
|
|
344
|
+
for (const mode of FIXED_MODES) {
|
|
345
|
+
const value = given?.[mode];
|
|
346
|
+
if (value !== void 0) credentials[SCHEME_OF_MODE[mode]] = holdCredential(value, `auth.credentials.${mode}`, kind);
|
|
347
|
+
}
|
|
348
|
+
if (Object.keys(credentials).length === 0) throw new ComposioError("`Auth.auto` needs at least one of `project`, `user` and `organization`.");
|
|
349
|
+
return credentials;
|
|
350
|
+
};
|
|
376
351
|
const MIGRATION = "Pass `auth`: `Auth.project(key)`, `Auth.user(key)`, `Auth.organization(key)`, `Auth.auto({ project, user, organization })` or `Auth.none()`.";
|
|
377
|
-
|
|
352
|
+
const resolveAuth = (auth, kind) => {
|
|
353
|
+
const value = auth;
|
|
354
|
+
const mode = value?.mode;
|
|
355
|
+
if (mode === void 0) throw new ComposioError(`\`auth\` is required. ${MIGRATION}`);
|
|
356
|
+
if (mode === "none") return {
|
|
357
|
+
mode,
|
|
358
|
+
credentials: {}
|
|
359
|
+
};
|
|
360
|
+
if (mode === "auto") return {
|
|
361
|
+
mode,
|
|
362
|
+
credentials: holdAuto(value?.credentials, kind)
|
|
363
|
+
};
|
|
364
|
+
if (!isFixedMode(mode)) throw new ComposioError(`\`auth.mode\` must be 'none', 'project', 'user', 'organization' or 'auto'. ${MIGRATION}`);
|
|
365
|
+
return {
|
|
366
|
+
mode,
|
|
367
|
+
credentials: { [SCHEME_OF_MODE[mode]]: holdCredential(value?.credential, "auth.credential", kind) }
|
|
368
|
+
};
|
|
369
|
+
};
|
|
378
370
|
const REMOVED_OPTIONS = {
|
|
379
371
|
apiKey: "Auth.project(key)",
|
|
380
372
|
userApiKey: "Auth.user(key)",
|
|
381
373
|
orgApiKey: "Auth.organization(key)"
|
|
382
374
|
};
|
|
383
|
-
/**
|
|
384
|
-
* Refuses a removed credential option, which TypeScript already rejects, for
|
|
385
|
-
* a caller it did not reach.
|
|
386
|
-
*/
|
|
387
375
|
const assertNoRemovedCredentialOptions = (options) => {
|
|
388
|
-
for (const [option, replacement] of Object.entries(REMOVED_OPTIONS))
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
* Validates `auth` and lays it out by scheme. `isCredential` decides what a
|
|
392
|
-
* credential may be on the calling entry; `checkKey` validates a key that is
|
|
393
|
-
* already known, so a bad literal fails here rather than on the first request.
|
|
394
|
-
*/
|
|
395
|
-
const resolveAuth = (auth, isCredential, checkKey) => {
|
|
396
|
-
if (typeof auth !== "object" || auth === null || !("mode" in auth)) throw new ComposioError(`\`auth\` is required. ${MIGRATION}`);
|
|
397
|
-
const value = auth;
|
|
398
|
-
const held = (credential, option) => {
|
|
399
|
-
if (!isCredential(credential)) throw new ComposioError(`\`${option}\` must be a key or a function that returns one.`);
|
|
400
|
-
checkKey(credential, option);
|
|
401
|
-
return credential;
|
|
402
|
-
};
|
|
403
|
-
switch (value.mode) {
|
|
404
|
-
case "none": return {
|
|
405
|
-
mode: "none",
|
|
406
|
-
credentials: {}
|
|
407
|
-
};
|
|
408
|
-
case "project":
|
|
409
|
-
case "user":
|
|
410
|
-
case "organization": return {
|
|
411
|
-
mode: value.mode,
|
|
412
|
-
credentials: { [MODE_SCHEME[value.mode]]: held(value.credential, "auth.credential") }
|
|
413
|
-
};
|
|
414
|
-
case "auto": {
|
|
415
|
-
const given = value.credentials;
|
|
416
|
-
if (typeof given !== "object" || given === null) throw new ComposioError("`Auth.auto` needs at least one of `project`, `user` and `organization`.");
|
|
417
|
-
const credentials = {};
|
|
418
|
-
for (const [key, scheme] of Object.entries(MODE_SCHEME)) {
|
|
419
|
-
const credential = given[key];
|
|
420
|
-
if (credential !== void 0) credentials[scheme] = held(credential, `auth.credentials.${key}`);
|
|
421
|
-
}
|
|
422
|
-
if (Object.keys(credentials).length === 0) throw new ComposioError("`Auth.auto` needs at least one of `project`, `user` and `organization`.");
|
|
423
|
-
return {
|
|
424
|
-
mode: "auto",
|
|
425
|
-
credentials
|
|
426
|
-
};
|
|
427
|
-
}
|
|
428
|
-
default: throw new ComposioError(`\`auth.mode\` must be 'none', 'project', 'user', 'organization' or 'auto'. ${MIGRATION}`);
|
|
376
|
+
for (const [option, replacement] of Object.entries(REMOVED_OPTIONS)) {
|
|
377
|
+
if (!Object.hasOwn(options, option)) continue;
|
|
378
|
+
throw new ComposioError(`The \`${option}\` option was removed in 2.0.0-rc.18. Pass \`auth: ${replacement}\` instead, or \`Auth.auto({ ... })\` for per-operation selection.`);
|
|
429
379
|
}
|
|
430
380
|
};
|
|
431
|
-
|
|
432
|
-
const
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
}
|
|
381
|
+
const CREDENTIAL_HEADER_NAMES = Object.values(SCHEME_HEADERS);
|
|
382
|
+
const SCOPE_HEADER_NAMES = ["x-org-id", "x-project-id"];
|
|
383
|
+
const isScopeId = (value) => typeof value === "string" && value !== "" && value === value.trim() && isSendable(value, "x-org-id");
|
|
384
|
+
const scopeId = (field, value) => {
|
|
385
|
+
if (value === void 0) return void 0;
|
|
386
|
+
if (!isScopeId(value)) throw new ComposioError(`\`scope.${field}\` must be a non-empty string with no surrounding whitespace.`);
|
|
387
|
+
return value;
|
|
439
388
|
};
|
|
440
|
-
/**
|
|
441
|
-
* Whether `key` can be sent as `scheme`'s header: a string with a
|
|
442
|
-
* non-whitespace character that the platform's `Headers` accepts. It is sent
|
|
443
|
-
* as given.
|
|
444
|
-
*/
|
|
445
|
-
const isUsableKey = (scheme, key) => typeof key === "string" && /\S/.test(key) && isSendable(SCHEME_HEADERS[scheme], key);
|
|
446
|
-
/** The error for a key that cannot be sent. It names where the key came from and never the key. */
|
|
447
|
-
const unusableKeyError = (source) => new ComposioError(`${source} is not a usable key: it must be a string with a non-whitespace character and no line break, NUL or character outside Latin-1.`);
|
|
448
|
-
const SCOPE_ID = /^\S(?:.*\S)?$/s;
|
|
449
|
-
/** Validates `scope` (an id must be non-empty with no surrounding whitespace) and returns the headers it sends. */
|
|
450
389
|
const resolveScope = (scope) => {
|
|
451
390
|
if (scope === void 0) return void 0;
|
|
452
391
|
if (typeof scope !== "object" || scope === null) throw new ComposioError("`scope` must be an object with an `organizationId`, a `projectId`, or both.");
|
|
453
392
|
const { organizationId, projectId } = scope;
|
|
454
|
-
if (organizationId === void 0 && projectId === void 0) throw new ComposioError("`scope` must name an `organizationId`, a `projectId`, or both.");
|
|
455
393
|
const headers = {};
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
"projectId",
|
|
462
|
-
"x-project-id",
|
|
463
|
-
projectId
|
|
464
|
-
]]) {
|
|
465
|
-
if (value === void 0) continue;
|
|
466
|
-
if (typeof value !== "string" || !SCOPE_ID.test(value) || !isSendable(header, value)) throw new ComposioError(`\`scope.${field}\` must be a non-empty string with no surrounding whitespace.`);
|
|
467
|
-
headers[header] = value;
|
|
468
|
-
}
|
|
394
|
+
const org = scopeId("organizationId", organizationId);
|
|
395
|
+
const project = scopeId("projectId", projectId);
|
|
396
|
+
if (org !== void 0) headers["x-org-id"] = org;
|
|
397
|
+
if (project !== void 0) headers["x-project-id"] = project;
|
|
398
|
+
if (Object.keys(headers).length === 0) throw new ComposioError("`scope` must name an `organizationId`, a `projectId`, or both.");
|
|
469
399
|
return headers;
|
|
470
400
|
};
|
|
471
|
-
/** The header names `auth` owns while it is not `none`. */
|
|
472
|
-
const CREDENTIAL_HEADER_NAMES = Object.values(SCHEME_HEADERS);
|
|
473
|
-
/** The header names `scope` owns while it is set. */
|
|
474
|
-
const SCOPE_HEADER_NAMES = ["x-org-id", "x-project-id"];
|
|
475
|
-
/**
|
|
476
|
-
* Fails a generated call whose operation requires an owned header parameter it
|
|
477
|
-
* did not supply. It does not fall back to the configured `auth` or `scope`:
|
|
478
|
-
* the operation asked for a value of its own.
|
|
479
|
-
*/
|
|
480
401
|
const assertRequiredOperationHeaders = (operation, supplied) => {
|
|
481
|
-
for (const name of operation?.requiredHeaders ?? [])
|
|
402
|
+
for (const name of operation?.requiredHeaders ?? []) {
|
|
403
|
+
if (supplied?.[name] != null) continue;
|
|
404
|
+
throw new ComposioError(`\`${operation?.chain.join(".")}\` requires the \`${name}\` parameter.`);
|
|
405
|
+
}
|
|
482
406
|
};
|
|
483
|
-
const
|
|
407
|
+
const scopeForCall = (configured, supplied) => {
|
|
408
|
+
const merged = { ...configured };
|
|
409
|
+
for (const name of SCOPE_HEADER_NAMES) {
|
|
410
|
+
const value = supplied?.[name];
|
|
411
|
+
if (value == null) continue;
|
|
412
|
+
const current = configured?.[name];
|
|
413
|
+
if (current !== void 0 && current !== value) throw new ComposioError(`The \`${name}\` parameter disagrees with the client's \`scope\`. Derive a client with \`withOptions({ scope })\` to address another one.`);
|
|
414
|
+
merged[name] = value;
|
|
415
|
+
}
|
|
416
|
+
return merged;
|
|
417
|
+
};
|
|
418
|
+
const operationCredential = (supplied) => {
|
|
484
419
|
for (const [name, value] of Object.entries(supplied ?? {})) {
|
|
485
420
|
const scheme = schemeOfHeader(name);
|
|
486
|
-
if (scheme
|
|
487
|
-
if (!isUsableKey(scheme, value)) throw unusableKeyError(`The \`${name}\` parameter`);
|
|
488
|
-
return {
|
|
489
|
-
kind: "operation",
|
|
421
|
+
if (scheme !== void 0 && value != null) return {
|
|
490
422
|
scheme,
|
|
491
|
-
|
|
423
|
+
credential: value
|
|
492
424
|
};
|
|
493
425
|
}
|
|
494
|
-
|
|
495
|
-
|
|
426
|
+
};
|
|
427
|
+
const configuredScheme = (auth, operation) => {
|
|
428
|
+
if (auth.mode === "none") return void 0;
|
|
429
|
+
if (auth.mode === "auto") return selectScheme(operation?.schemes, (scheme) => auth.credentials[scheme] !== void 0);
|
|
430
|
+
return SCHEME_OF_MODE[auth.mode];
|
|
431
|
+
};
|
|
432
|
+
/**
|
|
433
|
+
* The credential one call carries: an operation credential replaces `auth`,
|
|
434
|
+
* and a fixed mode never reads the operation table. `null` off the API origin.
|
|
435
|
+
*/
|
|
436
|
+
const chooseCredential = (auth, baseURL, requestURL, operation, supplied) => {
|
|
437
|
+
if (!sameOrigin(baseURL, requestURL)) return null;
|
|
438
|
+
const own = operationCredential(supplied);
|
|
439
|
+
if (own !== void 0) return own;
|
|
440
|
+
const scheme = configuredScheme(auth, operation);
|
|
441
|
+
if (scheme === void 0) return null;
|
|
496
442
|
const credential = auth.credentials[scheme];
|
|
497
443
|
return credential === void 0 ? null : {
|
|
498
|
-
kind: "configured",
|
|
499
444
|
scheme,
|
|
500
445
|
credential
|
|
501
446
|
};
|
|
502
447
|
};
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
}
|
|
520
|
-
return merged;
|
|
448
|
+
const credentialHeader = (scheme, key) => {
|
|
449
|
+
const name = SCHEME_HEADERS[scheme];
|
|
450
|
+
if (!isUsableKey(key)) throw unusableKeyError(`The \`${name}\` credential`);
|
|
451
|
+
return {
|
|
452
|
+
name,
|
|
453
|
+
value: key
|
|
454
|
+
};
|
|
455
|
+
};
|
|
456
|
+
const providerFailed = (cause) => {
|
|
457
|
+
const error = new ComposioError("The `auth` credential provider failed.");
|
|
458
|
+
Object.defineProperty(error, "cause", {
|
|
459
|
+
value: cause,
|
|
460
|
+
configurable: true,
|
|
461
|
+
writable: true
|
|
462
|
+
});
|
|
463
|
+
return error;
|
|
521
464
|
};
|
|
522
465
|
|
|
523
466
|
//#endregion
|
|
@@ -1065,7 +1008,7 @@ function* headerNames(headers) {
|
|
|
1065
1008
|
|
|
1066
1009
|
//#endregion
|
|
1067
1010
|
//#region src/version.ts
|
|
1068
|
-
const VERSION = "2.0.0-rc.
|
|
1011
|
+
const VERSION = "2.0.0-rc.19";
|
|
1069
1012
|
|
|
1070
1013
|
//#endregion
|
|
1071
1014
|
//#region src/compat/identity.ts
|
|
@@ -1217,13 +1160,7 @@ const resolveIdentity = (identity) => {
|
|
|
1217
1160
|
reserved: IDENTITY_RESERVED
|
|
1218
1161
|
};
|
|
1219
1162
|
};
|
|
1220
|
-
/**
|
|
1221
|
-
* The reserved names, as a function of what is configured. The identity names
|
|
1222
|
-
* are rc.17's. The credential names are reserved while `auth` is not `none`,
|
|
1223
|
-
* and the routing ids while a `scope` is set; with neither configured they are
|
|
1224
|
-
* ordinary headers, which is how a client is used as a transport for schemes
|
|
1225
|
-
* it does not model.
|
|
1226
|
-
*/
|
|
1163
|
+
/** Credential names are reserved while `auth` is not `none`, routing ids while `scope` is set. */
|
|
1227
1164
|
const reservedHeaders = (identity, configured) => {
|
|
1228
1165
|
const reserved = /* @__PURE__ */ new Map();
|
|
1229
1166
|
for (const name of identity.reserved) reserved.set(name, PACKAGE_RESERVED.has(name) ? "client" : "identity");
|
|
@@ -1318,17 +1255,11 @@ const createFetchTransport = (options = {}) => {
|
|
|
1318
1255
|
* regression that measures fine and reports nothing.
|
|
1319
1256
|
*/
|
|
1320
1257
|
const OPERATION = Symbol("composio.operation");
|
|
1321
|
-
/**
|
|
1322
|
-
* Beside the descriptor, the owned header parameters the call supplied
|
|
1323
|
-
* (`x-user-api-key`, `x-org-id`): the generated method takes them out of the
|
|
1324
|
-
* generic header bag and hands them over here, so the kernel can let an
|
|
1325
|
-
* operation credential replace `auth` and hold an operation scope id to the
|
|
1326
|
-
* configured `scope`. A raw call has no way to set it.
|
|
1327
|
-
*/
|
|
1258
|
+
/** The owned header parameters (`x-user-api-key`, `x-org-id`) a generated call supplied. */
|
|
1328
1259
|
const OPERATION_HEADERS = Symbol("composio.operationHeaders");
|
|
1329
1260
|
/**
|
|
1330
|
-
* Attach a generated call's operation, and
|
|
1331
|
-
*
|
|
1261
|
+
* Attach a generated call's operation, and its owned header parameters, to
|
|
1262
|
+
* the options bag it dispatches with.
|
|
1332
1263
|
*
|
|
1333
1264
|
* Called with the freshly built literal — never with the caller's own object —
|
|
1334
1265
|
* and *after* the caller's options have been spread into it, so a caller
|
|
@@ -1342,7 +1273,6 @@ const withOperation = (operation, options, headers) => {
|
|
|
1342
1273
|
};
|
|
1343
1274
|
/** The operation a generated call recorded, or `undefined` for a raw one. */
|
|
1344
1275
|
const readOperation = (options) => options[OPERATION];
|
|
1345
|
-
/** The owned header parameters a generated call supplied, or `undefined`. */
|
|
1346
1276
|
const readOperationHeaders = (options) => options[OPERATION_HEADERS];
|
|
1347
1277
|
/** A request label safe to print: dynamic path values and URL secrets are excluded. */
|
|
1348
1278
|
const printableURL = (url, operation) => `${new URL(url).origin}${operation?.path ?? "/<custom>"}`;
|
|
@@ -1647,56 +1577,26 @@ const buildRequestHeaders = (config, options, requestURL, bodyHeaders, withdrawn
|
|
|
1647
1577
|
if (withdrawn) withdrawCredentials(headers);
|
|
1648
1578
|
return headers;
|
|
1649
1579
|
};
|
|
1650
|
-
|
|
1651
|
-
const providerFailed = (cause) => {
|
|
1652
|
-
const error = new ComposioError("The `auth` credential provider failed.");
|
|
1653
|
-
Object.defineProperty(error, "cause", {
|
|
1654
|
-
value: cause,
|
|
1655
|
-
configurable: true,
|
|
1656
|
-
writable: true
|
|
1657
|
-
});
|
|
1658
|
-
return error;
|
|
1659
|
-
};
|
|
1660
|
-
/**
|
|
1661
|
-
* The credential one logical call carries, its provider asked at most once,
|
|
1662
|
-
* and before any network work.
|
|
1663
|
-
*
|
|
1664
|
-
* A configured credential is asked for only when the call starts on the API
|
|
1665
|
-
* origin: a call that starts anywhere else never carries it (rule 2), and a
|
|
1666
|
-
* redirect back onto the origin arrives after the chain has left it, so the
|
|
1667
|
-
* withdrawal holds. An operation credential is the call's own and is returned
|
|
1668
|
-
* as given; the origin rules still decide, per hop, whether it is sent.
|
|
1669
|
-
*/
|
|
1670
|
-
const resolveCallCredential = (config, operation, supplied, requestURL) => {
|
|
1671
|
-
const choice = chooseCredential(config.auth, operation, supplied);
|
|
1672
|
-
if (choice === null) return null;
|
|
1673
|
-
const name = schemeHeader(choice.scheme);
|
|
1674
|
-
if (choice.kind === "operation") return {
|
|
1675
|
-
name,
|
|
1676
|
-
value: choice.key
|
|
1677
|
-
};
|
|
1678
|
-
if (!sameOrigin(config.baseURL, requestURL)) return null;
|
|
1679
|
-
if (typeof choice.credential === "string") return {
|
|
1680
|
-
name,
|
|
1681
|
-
value: choice.credential
|
|
1682
|
-
};
|
|
1683
|
-
const usable = (key) => {
|
|
1684
|
-
if (!isUsableKey(choice.scheme, key)) throw unusableKeyError("The key the `auth` credential provider returned");
|
|
1685
|
-
return {
|
|
1686
|
-
name,
|
|
1687
|
-
value: key
|
|
1688
|
-
};
|
|
1689
|
-
};
|
|
1580
|
+
const callProvider = (provider, header) => {
|
|
1690
1581
|
let key;
|
|
1691
1582
|
try {
|
|
1692
|
-
key =
|
|
1583
|
+
key = provider();
|
|
1693
1584
|
} catch (cause) {
|
|
1694
1585
|
throw providerFailed(cause);
|
|
1695
1586
|
}
|
|
1696
|
-
|
|
1587
|
+
if (typeof key === "string") return header(key);
|
|
1588
|
+
return Promise.resolve(key).then(header, (cause) => {
|
|
1697
1589
|
throw providerFailed(cause);
|
|
1698
1590
|
});
|
|
1699
1591
|
};
|
|
1592
|
+
/** Synchronous unless a provider has to be awaited, so a string key goes out in the turn the call starts. */
|
|
1593
|
+
const resolveCallCredential = (config, requestURL, operation, supplied) => {
|
|
1594
|
+
const choice = chooseCredential(config.auth, config.baseURL, requestURL, operation, supplied);
|
|
1595
|
+
if (choice === null) return null;
|
|
1596
|
+
const header = (key) => credentialHeader(choice.scheme, key);
|
|
1597
|
+
if (typeof choice.credential === "string") return header(choice.credential);
|
|
1598
|
+
return callProvider(choice.credential, header);
|
|
1599
|
+
};
|
|
1700
1600
|
/**
|
|
1701
1601
|
* One attempt: the request, plus however many redirects it takes to land on a
|
|
1702
1602
|
* non-3xx response.
|
|
@@ -1784,10 +1684,10 @@ async function makeRequest(config, options) {
|
|
|
1784
1684
|
const supplied = readOperationHeaders(options);
|
|
1785
1685
|
assertRequiredOperationHeaders(threaded ?? null, supplied);
|
|
1786
1686
|
const scope = scopeForCall(config.scope, supplied);
|
|
1787
|
-
const
|
|
1687
|
+
const credential = resolveCallCredential(config, url, operation, supplied);
|
|
1788
1688
|
const call = {
|
|
1789
1689
|
scope,
|
|
1790
|
-
credential:
|
|
1690
|
+
credential: credential instanceof Promise ? await credential : credential
|
|
1791
1691
|
};
|
|
1792
1692
|
if (config.onRequest !== void 0 && (threaded === void 0 || threaded.hasDeprecatedInputs === true)) config.onRequest(operation, query, options.body, buildHeaders([config.defaultHeaders, options.headers]));
|
|
1793
1693
|
for (let numRetries = 0;; numRetries++) {
|
|
@@ -2706,4 +2606,4 @@ const generatedOperation = (chainKey) => {
|
|
|
2706
2606
|
};
|
|
2707
2607
|
|
|
2708
2608
|
//#endregion
|
|
2709
|
-
export { Auth as A,
|
|
2609
|
+
export { Auth as A, SCHEME_HEADERS as B, resolveIdentity as C, inspectDeprecatedInputs as D, mergeHeaders as E, chooseCredential as F, carriesCredentials as H, credentialHeader as I, resolveAuth as L, assertRequiredOperationHeaders as M, authConstructors as N, inspectDeprecation as O, authFromCredentials as P, resolveScope as R, reservedHeaders as S, buildHeaders as T, parseHTTPURL as U, assertCredentialTransport as V, resolveHTTPURL as W, shouldRetryResponse as _, TOO_MANY_REDIRECTS as a, createFetchTransport as b, buildURL as c, path as d, printableURL as f, safeJSON as g, rewriteForRedirect as h, REDIRECT_STATUSES as i, assertNoRemovedCredentialOptions as j, matchOperation as k, castToError as l, retryDelayMillis as m, generatedOperation as n, buildBody as o, readOperation as p, OPAQUE_REDIRECT as r, buildRequestHeaders as s, GENERATED_OPERATIONS as t, makeRequest as u, validatePositiveInteger as v, VERSION as w, assertNoReservedHeaders as x, withOperation as y, scopeForCall as z };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { $r as
|
|
2
|
-
import { t as VERSION } from "./version-
|
|
3
|
-
export { APIConnectionError, APIConnectionTimeoutError, APIError, type APIErrorBody, APIPromise, APIUserAbortError, Auth, type AuthMode, AuthenticationError, type AutoCredentials, BadRequestError, type ClientIdentity, type ClientOptions, Composio, Composio as default, ComposioError, ConflictError, type Credential, type EnvironmentMap, type FetchTransportDefaults, type FileCreateDownloadURLParams, type FileCreateDownloadURLResponse, type FileCreateUploadURLParams, type FileCreateUploadURLResponse, type FileDeleteParams, type FileDeleteResponse, type FileListParams, type FileListResponse, Files, InternalServerError, type LogLevel,
|
|
1
|
+
import { $i as APIPromise, $r as SessionDeleteResponse, Ai as AutoCredentials, Bi as ComposioError, Ci as FileListParams, Ei as Auth, Fi as APIError, Gi as RateLimitError, Gr as ToolRouter, Hi as InternalServerError, Ii as APIErrorBody, Ji as FetchTransportDefaults, Jr as SessionAttachResponse, Ki as UnprocessableEntityError, Kr as Session, Li as APIUserAbortError, Mi as Scope, Ni as APIConnectionError, Oi as AuthMode, Pi as APIConnectionTimeoutError, Qr as SessionCreateResponse, Ri as AuthenticationError, Si as FileDeleteResponse, Ti as Files, Ui as NotFoundError, Vi as ConflictError, Wi as PermissionDeniedError, Xi as createFetchTransport, Xr as SessionConfigHistoryResponse, Yi as Transport, Yr as SessionConfigHistoryParams, Zi as ClientIdentity, Zr as SessionCreateParams, _i as FileCreateDownloadURLParams, a as ClientOptions, ai as SessionLinkResponse, bi as FileCreateUploadURLResponse, c as LogLevel, ci as SessionProxyExecuteParams, di as SessionSearchParams, ei as SessionExecuteMetaParams, fi as SessionSearchResponse, gi as SessionToolsResponse, hi as SessionToolsParams, ii as SessionLinkParams, ji as Credential, li as SessionProxyExecuteResponse, mi as SessionToolkitsResponse, ni as SessionExecuteParams, o as Composio, oi as SessionPatchParams, pi as SessionToolkitsParams, qi as RequestOptions, qr as SessionAttachParams, ri as SessionExecuteResponse, s as EnvironmentMap, si as SessionPatchResponse, ti as SessionExecuteMetaResponse, ui as SessionRetrieveResponse, vi as FileCreateDownloadURLResponse, wi as FileListResponse, xi as FileDeleteParams, yi as FileCreateUploadURLParams, zi as BadRequestError } from "./session-configs-BLy_O6bX.mjs";
|
|
2
|
+
import { t as VERSION } from "./version-DB98yI2B.mjs";
|
|
3
|
+
export { APIConnectionError, APIConnectionTimeoutError, APIError, type APIErrorBody, APIPromise, APIUserAbortError, Auth, type AuthMode, AuthenticationError, type AutoCredentials, BadRequestError, type ClientIdentity, type ClientOptions, Composio, Composio as default, ComposioError, ConflictError, type Credential, type EnvironmentMap, type FetchTransportDefaults, type FileCreateDownloadURLParams, type FileCreateDownloadURLResponse, type FileCreateUploadURLParams, type FileCreateUploadURLResponse, type FileDeleteParams, type FileDeleteResponse, type FileListParams, type FileListResponse, Files, InternalServerError, type LogLevel, NotFoundError, PermissionDeniedError, RateLimitError, type RequestOptions, type Scope, 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, type Transport, UnprocessableEntityError, VERSION, createFetchTransport };
|