@composio/core 0.18.1 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{CustomTool-VRfWzMix.d.mts → CustomTool-B3m-188G.d.mts} +1 -1
- package/dist/{CustomTool-Bz0f52QR.mjs → CustomTool-fYEFjSLM.mjs} +1 -1
- package/dist/{FileModifierErrors-CwB-Inm9.mjs → FileModifierErrors-CdGSABoq.mjs} +1 -1
- package/dist/{FileToolModifier.utils.neutral-D_YkHwZP.mjs → FileToolModifier.utils.neutral-DWFpnsj2.mjs} +4 -2
- package/dist/{SsrfErrors-xhdVE4yw.mjs → SsrfErrors-DiQldIdC.mjs} +32 -17
- package/dist/{Telemetry-Dw9W5RSp.mjs → Telemetry-JRJJYS4I.mjs} +2 -2
- package/dist/{cancellation-P5YUlcfz.mjs → cancellation-Dwa9lGHA.mjs} +7 -5
- package/dist/{composio-Cb3d1jFe.d.mts → composio-B36OXii1.d.mts} +3017 -144
- package/dist/{customTool.types-B6ej_8XZ.d.mts → customTool.types-C436M_D0.d.mts} +525 -101
- package/dist/docs/reference/sdk-reference/typescript/auth-configs.mdx +10 -10
- package/dist/docs/reference/sdk-reference/typescript/composio.mdx +8 -15
- package/dist/docs/reference/sdk-reference/typescript/connected-accounts.mdx +101 -18
- package/dist/docs/reference/sdk-reference/typescript/custom-toolkits.mdx +123 -0
- package/dist/docs/reference/sdk-reference/typescript/experimental.mdx +9 -2
- package/dist/docs/reference/sdk-reference/typescript/index.mdx +7 -0
- package/dist/docs/reference/sdk-reference/typescript/keyring.mdx +56 -0
- package/dist/docs/reference/sdk-reference/typescript/logs.mdx +78 -0
- package/dist/docs/reference/sdk-reference/typescript/mcp.mdx +15 -15
- package/dist/docs/reference/sdk-reference/typescript/meta.json +8 -1
- package/dist/docs/reference/sdk-reference/typescript/session-files.mdx +10 -10
- package/dist/docs/reference/sdk-reference/typescript/session.mdx +117 -24
- package/dist/docs/reference/sdk-reference/typescript/sessions.mdx +24 -10
- package/dist/docs/reference/sdk-reference/typescript/toolkits.mdx +151 -14
- package/dist/docs/reference/sdk-reference/typescript/tools.mdx +50 -40
- package/dist/docs/reference/sdk-reference/typescript/triggers.mdx +26 -25
- package/dist/docs/reference/sdk-reference/typescript/usage.mdx +78 -0
- package/dist/docs/reference/sdk-reference/typescript/webhook-endpoints.mdx +162 -0
- package/dist/docs/reference/sdk-reference/typescript/webhook-subscriptions.mdx +218 -0
- package/dist/docs/reference/sdk-reference/typescript/webhooks.mdx +20 -0
- package/dist/{errors-Ue9wMrPK.mjs → errors-D_A4b2c2.mjs} +143 -4
- package/dist/experimental/index.d.mts +2 -2
- package/dist/experimental/index.mjs +1 -1
- package/dist/{fileUtils.node-KE5Fa-af.mjs → fileUtils.node-DNLhLg0W.mjs} +8 -6
- package/dist/index.d.mts +418 -146
- package/dist/index.mjs +2728 -349
- package/dist/models/Files.node.d.mts +2 -3
- package/dist/models/Files.node.mjs +2 -2
- package/dist/models/Files.workerd.d.mts +2 -3
- package/dist/platform/node.d.mts +2 -3
- package/dist/platform/workerd.d.mts +2 -3
- package/dist/{sensitiveFileUploadPaths-QN7w4n8v.mjs → sensitiveFileUploadPaths-BlLp-Yo2.mjs} +10 -7
- package/dist/{ssrfGuard.node-BLX6b-Rf.mjs → ssrfGuard.node-BZ270bcu.mjs} +104 -14
- package/dist/{types-CGdgK442.d.mts → types-Br3GBya5.d.mts} +2 -2
- package/dist/utils/config-defaults/ConfigDefaults.node.d.mts +3 -4
- package/dist/utils/config-defaults/ConfigDefaults.workerd.d.mts +3 -4
- package/dist/utils/modifiers/FileToolModifier.node.d.mts +3 -4
- package/dist/utils/modifiers/FileToolModifier.node.mjs +6 -6
- package/dist/utils/modifiers/FileToolModifier.workerd.d.mts +3 -4
- package/dist/utils/modifiers/FileToolModifier.workerd.mjs +1 -1
- package/dist/utils/ssrfGuard.node.d.mts +19 -10
- package/dist/utils/ssrfGuard.node.mjs +1 -1
- package/dist/utils/ssrfGuard.workerd.d.mts +12 -4
- package/dist/utils/ssrfGuard.workerd.mjs +2 -2
- package/package.json +9 -9
- package/src/composio.ts +207 -10
- package/src/errors/ConnectedAccountsErrors.ts +47 -0
- package/src/errors/SDKErrors.ts +52 -0
- package/src/errors/ToolErrors.ts +24 -0
- package/src/errors/ToolRouterErrors.ts +57 -0
- package/src/errors/index.ts +3 -0
- package/src/index.ts +15 -0
- package/src/lib/toolRouterMcp.ts +132 -0
- package/src/lib/toolRouterParams.ts +116 -29
- package/src/models/ConnectedAccounts.ts +118 -2
- package/src/models/CustomToolkits.ts +169 -0
- package/src/models/Experimental.ts +27 -0
- package/src/models/Keyring.ts +65 -0
- package/src/models/Logs.ts +101 -0
- package/src/models/MCP.ts +29 -15
- package/src/models/ToolRouter.ts +43 -14
- package/src/models/ToolRouterSession.ts +224 -16
- package/src/models/Toolkits.ts +181 -2
- package/src/models/Tools.ts +58 -26
- package/src/models/Triggers.ts +10 -90
- package/src/models/Usage.ts +119 -0
- package/src/models/Webhooks.ts +520 -0
- package/src/services/pusher/Pusher.ts +46 -16
- package/src/types/authConfigs.types.ts +2 -0
- package/src/types/connectedAccounts.types.ts +54 -0
- package/src/types/customToolkits.types.ts +102 -0
- package/src/types/keyring.types.ts +32 -0
- package/src/types/logs.types.ts +108 -0
- package/src/types/toolRouter.types.ts +259 -14
- package/src/types/toolkit.types.ts +161 -0
- package/src/types/usage.types.ts +81 -0
- package/src/types/webhooks.types.ts +143 -0
- package/src/utils/constants.ts +1 -5
- package/src/utils/jsonSchema.ts +4 -1
- package/src/utils/logger.ts +39 -7
- package/src/utils/sdk.ts +385 -22
- package/src/utils/ssrfGuard.node.ts +127 -13
- package/src/utils/ssrfGuard.workerd.ts +11 -1
- package/src/utils/transformers/connectedAccounts.ts +37 -2
- package/src/utils/transformers/customToolkits.ts +98 -0
- package/src/utils/transformers/keyring.ts +24 -0
- package/src/utils/transformers/logs.ts +85 -0
- package/src/utils/transformers/toolkits.ts +183 -3
- package/src/utils/transformers/triggers.ts +2 -2
- package/src/utils/transformers/usage.ts +77 -0
- package/src/utils/transformers/webhooks.ts +139 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { D as Session, En as ConnectedAccountRetrieveResponse, M as SessionWithoutMcp, On as ConnectedAccountRevokeResponse, Qn as UpdateConnectedAccountParams, Ra as ToolkitVersionParam, Sa as ToolExecuteResponse, Ta as ToolListParams, Un as CreateConnectedAccountOptions, X as ToolRouterSessionDeleteResponse, Xn as UpdateConnectedAccountAclParams, Yr as McpServerGetResponse, _a as Tool, ba as ToolExecuteParams, ci as ToolCallSession, dn as ConnectedAccountCompleteAuthParams, ea as ExecuteToolModifiers, ei as McpUrlResponse, f as CustomToolkit, ga as SchemaModifierOptions, ii as ExecuteToolFnOptions, ja as ToolRetrievalOptions, ka as ToolProxyParams, na as ProviderOptions, nn as ComposioRequestOptions, nr as BaseNonAgenticProvider, o as CustomTool, pn as ConnectedAccountCompleteAuthResponse, ra as SessionExecuteMetaModifiers, rn as ConnectionRequest, tr as BaseComposioProvider, va as ToolExecuteMetaParams, wa as ToolList, wn as ConnectedAccountRefreshOptions, xn as ConnectedAccountListResponse, yn as ConnectedAccountListParams, z as ToolRouterCreateSessionConfig, zn as CreateConnectedAccountLinkOptions } from "./customTool.types-C436M_D0.mjs";
|
|
2
2
|
import ComposioClient, { Composio } from "@composio/client";
|
|
3
3
|
import z, { z as z$1 } from "zod/v3";
|
|
4
|
-
import { OpenAI } from "openai";
|
|
5
4
|
import { Files } from "#files";
|
|
6
5
|
import { ConnectedAccountDeleteResponse, ConnectedAccountPatchResponse, ConnectedAccountRefreshResponse, ConnectedAccountUpdateStatusParams, ConnectedAccountUpdateStatusResponse } from "@composio/client/resources/connected-accounts";
|
|
7
6
|
import { SessionExecuteParams } from "@composio/client/resources/tool-router/session/session.mjs";
|
|
8
7
|
import { ToolGetInputParams, ToolGetInputResponse, ToolProxyResponse, ToolRetrieveEnumResponse } from "@composio/client/resources/tools";
|
|
9
8
|
import { TriggersTypeRetrieveEnumResponse } from "@composio/client/resources/index";
|
|
10
9
|
import { AuthConfigDeleteResponse, AuthConfigUpdateResponse, AuthConfigUpdateStatusResponse } from "@composio/client/resources/auth-configs";
|
|
10
|
+
import { OpenAI } from "openai";
|
|
11
11
|
import { Stream } from "openai/streaming";
|
|
12
12
|
//#region src/models/Tools.d.ts
|
|
13
13
|
type ToolRouterSessionExecuteOptions = {
|
|
@@ -385,6 +385,10 @@ declare class Tools<TToolCollection, TTool, TProvider extends BaseComposioProvid
|
|
|
385
385
|
*
|
|
386
386
|
* @example Execute with a specific version (recommended for production)
|
|
387
387
|
* ```typescript
|
|
388
|
+
* // Look up the tool's current version once, then pin that string in your code or config
|
|
389
|
+
* const { version } = await composio.tools.getRawComposioToolBySlug('GITHUB_GET_REPOS');
|
|
390
|
+
* console.log(version); // e.g. '20250909_00'
|
|
391
|
+
*
|
|
388
392
|
* const result = await composio.tools.execute('GITHUB_GET_REPOS', {
|
|
389
393
|
* userId: 'default',
|
|
390
394
|
* version: '20250909_00',
|
|
@@ -467,45 +471,60 @@ declare class Tools<TToolCollection, TTool, TProvider extends BaseComposioProvid
|
|
|
467
471
|
*/
|
|
468
472
|
getToolsEnum(requestOptions?: ComposioRequestOptions): Promise<ToolRetrieveEnumResponse>;
|
|
469
473
|
/**
|
|
470
|
-
*
|
|
474
|
+
* Generates arguments for a tool from a natural-language description of the task.
|
|
471
475
|
*
|
|
472
|
-
*
|
|
476
|
+
* Composio uses an LLM to fill the tool's input parameters from `text`. Review the
|
|
477
|
+
* generated arguments before passing them to `tools.execute()`.
|
|
473
478
|
*
|
|
474
|
-
* @param {string} slug - The
|
|
475
|
-
* @param {ToolGetInputParams} body - The
|
|
476
|
-
* @
|
|
479
|
+
* @param {string} slug - The slug of the tool to generate arguments for
|
|
480
|
+
* @param {ToolGetInputParams} body - The generation request
|
|
481
|
+
* @param {string} body.text - What you want the tool to do, in natural language
|
|
482
|
+
* @param {string} [body.custom_description] - Extra context about the tool for the LLM
|
|
483
|
+
* @param {string} [body.system_prompt] - System prompt that steers the LLM
|
|
484
|
+
* @param {string} [body.version] - Tool version to generate arguments for
|
|
485
|
+
* @returns {Promise<ToolGetInputResponse>} The generated `arguments`, or an `error` when generation fails
|
|
477
486
|
*
|
|
478
487
|
* @example
|
|
479
488
|
* ```typescript
|
|
480
|
-
*
|
|
481
|
-
*
|
|
482
|
-
*
|
|
489
|
+
* const { arguments: args, error } = await composio.tools.getInput('GITHUB_CREATE_ISSUE', {
|
|
490
|
+
* text: 'Open an issue in composiohq/composio titled "Docs typo" describing the broken link',
|
|
491
|
+
* version: '20250909_00',
|
|
483
492
|
* });
|
|
484
|
-
*
|
|
493
|
+
* if (error) throw new Error(error);
|
|
494
|
+
* console.log(args); // { owner: 'composiohq', repo: 'composio', title: 'Docs typo', ... }
|
|
485
495
|
* ```
|
|
486
496
|
*/
|
|
487
497
|
getInput(slug: string, body: ToolGetInputParams, requestOptions?: ComposioRequestOptions): Promise<ToolGetInputResponse>;
|
|
488
498
|
/**
|
|
489
|
-
*
|
|
499
|
+
* Sends an HTTP request to a toolkit's API, authenticated as a connected account.
|
|
490
500
|
*
|
|
491
|
-
*
|
|
492
|
-
*
|
|
501
|
+
* Use it to call an endpoint that no predefined tool covers. Composio injects the
|
|
502
|
+
* connected account's credentials on the server side.
|
|
493
503
|
*
|
|
494
|
-
*
|
|
495
|
-
*
|
|
504
|
+
* A relative `endpoint` is appended to the toolkit's base URL, and that base URL can
|
|
505
|
+
* already include a path. Google Calendar's base URL is
|
|
506
|
+
* `https://www.googleapis.com/calendar/v3`, so pass `/users/me/calendarList`, not
|
|
507
|
+
* `/calendar/v3/users/me/calendarList` (which resolves to `/calendar/v3/calendar/v3/...`
|
|
508
|
+
* and returns a 404 from Google). An absolute URL on the same domain is sent as-is.
|
|
509
|
+
*
|
|
510
|
+
* @param {ToolProxyParams} body - The proxy request
|
|
511
|
+
* @param {string} body.endpoint - Path relative to the toolkit's base URL, or an absolute URL
|
|
512
|
+
* @param {'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH'} body.method - HTTP method
|
|
513
|
+
* @param {string} [body.connectedAccountId] - The connected account to authenticate as
|
|
514
|
+
* @param {unknown} [body.body] - JSON request body
|
|
515
|
+
* @param {Array<{ in: 'query' | 'header'; name: string; value: string | number }>} [body.parameters] - Extra query parameters or headers
|
|
516
|
+
* @returns {Promise<ToolProxyResponse>} The upstream status, headers, and parsed body
|
|
496
517
|
*
|
|
497
518
|
* @example
|
|
498
519
|
* ```typescript
|
|
499
|
-
* //
|
|
500
|
-
* const
|
|
501
|
-
*
|
|
502
|
-
*
|
|
503
|
-
*
|
|
504
|
-
*
|
|
505
|
-
* method: 'GET'
|
|
506
|
-
* }
|
|
520
|
+
* // Google Calendar's base URL is https://www.googleapis.com/calendar/v3
|
|
521
|
+
* const { status, data } = await composio.tools.proxyExecute({
|
|
522
|
+
* endpoint: '/users/me/calendarList',
|
|
523
|
+
* method: 'GET',
|
|
524
|
+
* connectedAccountId: 'ca_...',
|
|
525
|
+
* parameters: [{ in: 'query', name: 'maxResults', value: 10 }],
|
|
507
526
|
* });
|
|
508
|
-
* console.log(
|
|
527
|
+
* console.log(status, data);
|
|
509
528
|
* ```
|
|
510
529
|
*/
|
|
511
530
|
proxyExecute(body: ToolProxyParams, requestOptions?: ComposioRequestOptions): Promise<ToolProxyResponse>;
|
|
@@ -539,6 +558,31 @@ declare const ToolkitsListParamsSchema: z$1.ZodObject<{
|
|
|
539
558
|
type ToolkitMangedByEnum = z$1.infer<typeof ToolkitMangedByEnumSchema>;
|
|
540
559
|
type ToolkitSortByEnum = z$1.infer<typeof ToolkitSortByEnumSchema>;
|
|
541
560
|
type ToolkitListParams = z$1.infer<typeof ToolkitsListParamsSchema>;
|
|
561
|
+
/**
|
|
562
|
+
* Toolkit getMany params — the slugs to fetch plus the same filters `list`
|
|
563
|
+
* accepts.
|
|
564
|
+
*/
|
|
565
|
+
declare const ToolkitGetManySlugsSchema: z$1.ZodArray<z$1.ZodString, "many">;
|
|
566
|
+
declare const ToolkitsGetManyParamsSchema: z$1.ZodObject<{
|
|
567
|
+
category: z$1.ZodOptional<z$1.ZodString>;
|
|
568
|
+
managedBy: z$1.ZodOptional<z$1.ZodEnum<["all", "composio", "project"]>>;
|
|
569
|
+
sortBy: z$1.ZodOptional<z$1.ZodEnum<["usage", "alphabetically"]>>;
|
|
570
|
+
cursor: z$1.ZodOptional<z$1.ZodString>;
|
|
571
|
+
limit: z$1.ZodOptional<z$1.ZodNumber>;
|
|
572
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
573
|
+
limit?: number | undefined;
|
|
574
|
+
cursor?: string | undefined;
|
|
575
|
+
category?: string | undefined;
|
|
576
|
+
managedBy?: "all" | "composio" | "project" | undefined;
|
|
577
|
+
sortBy?: "usage" | "alphabetically" | undefined;
|
|
578
|
+
}, {
|
|
579
|
+
limit?: number | undefined;
|
|
580
|
+
cursor?: string | undefined;
|
|
581
|
+
category?: string | undefined;
|
|
582
|
+
managedBy?: "all" | "composio" | "project" | undefined;
|
|
583
|
+
sortBy?: "usage" | "alphabetically" | undefined;
|
|
584
|
+
}>;
|
|
585
|
+
type ToolkitGetManyParams = z$1.infer<typeof ToolkitsGetManyParamsSchema>;
|
|
542
586
|
/**
|
|
543
587
|
* Toolkits response
|
|
544
588
|
*/
|
|
@@ -793,6 +837,25 @@ declare const ToolkitAuthFieldSchema: z$1.ZodObject<{
|
|
|
793
837
|
name: z$1.ZodString;
|
|
794
838
|
type: z$1.ZodString;
|
|
795
839
|
default: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
840
|
+
/**
|
|
841
|
+
* Whether this field holds a secret/credential value. Clients use it to
|
|
842
|
+
* decide whether to mask the input when collecting the value in their own
|
|
843
|
+
* UI. The property is absent when the API omits the flag for the field.
|
|
844
|
+
*/
|
|
845
|
+
isSecret: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
846
|
+
/**
|
|
847
|
+
* The legacy template name the API reports for this field, mapped from
|
|
848
|
+
* `legacy_template_name`. The API declares it as an optional string without
|
|
849
|
+
* further documenting its semantics.
|
|
850
|
+
*/
|
|
851
|
+
legacyTemplateName: z$1.ZodOptional<z$1.ZodString>;
|
|
852
|
+
/**
|
|
853
|
+
* Whether the hosted connect flow shows this field to the end user, mapped
|
|
854
|
+
* from `user_visible`. A field with `false` is never required: its `default`
|
|
855
|
+
* applies unless the auth config supplies a value. Absent when the API omits
|
|
856
|
+
* the flag.
|
|
857
|
+
*/
|
|
858
|
+
userVisible: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
796
859
|
}, "strip", z$1.ZodTypeAny, {
|
|
797
860
|
name: string;
|
|
798
861
|
type: string;
|
|
@@ -800,6 +863,9 @@ declare const ToolkitAuthFieldSchema: z$1.ZodObject<{
|
|
|
800
863
|
required: boolean;
|
|
801
864
|
displayName: string;
|
|
802
865
|
default?: string | null | undefined;
|
|
866
|
+
isSecret?: boolean | undefined;
|
|
867
|
+
legacyTemplateName?: string | undefined;
|
|
868
|
+
userVisible?: boolean | undefined;
|
|
803
869
|
}, {
|
|
804
870
|
name: string;
|
|
805
871
|
type: string;
|
|
@@ -807,10 +873,24 @@ declare const ToolkitAuthFieldSchema: z$1.ZodObject<{
|
|
|
807
873
|
required: boolean;
|
|
808
874
|
displayName: string;
|
|
809
875
|
default?: string | null | undefined;
|
|
876
|
+
isSecret?: boolean | undefined;
|
|
877
|
+
legacyTemplateName?: string | undefined;
|
|
878
|
+
userVisible?: boolean | undefined;
|
|
810
879
|
}>;
|
|
811
880
|
declare const ToolkitAuthConfigDetailsSchema: z$1.ZodObject<{
|
|
812
881
|
name: z$1.ZodString;
|
|
813
882
|
mode: z$1.ZodString;
|
|
883
|
+
/**
|
|
884
|
+
* URL to a page where users can obtain or configure credentials for this
|
|
885
|
+
* authentication method, e.g. `https://github.com/settings/tokens`.
|
|
886
|
+
*/
|
|
887
|
+
authHintUrl: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
888
|
+
/**
|
|
889
|
+
* OAuth scopes always requested for this auth method regardless of the
|
|
890
|
+
* tool-specific scopes, such as token refresh (`offline_access`) and identity
|
|
891
|
+
* scopes. Mapped from `required_scopes`; absent when the API omits it.
|
|
892
|
+
*/
|
|
893
|
+
requiredScopes: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString, "many">>;
|
|
814
894
|
fields: z$1.ZodObject<{
|
|
815
895
|
authConfigCreation: z$1.ZodObject<{
|
|
816
896
|
optional: z$1.ZodArray<z$1.ZodObject<{
|
|
@@ -820,6 +900,25 @@ declare const ToolkitAuthConfigDetailsSchema: z$1.ZodObject<{
|
|
|
820
900
|
name: z$1.ZodString;
|
|
821
901
|
type: z$1.ZodString;
|
|
822
902
|
default: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
903
|
+
/**
|
|
904
|
+
* Whether this field holds a secret/credential value. Clients use it to
|
|
905
|
+
* decide whether to mask the input when collecting the value in their own
|
|
906
|
+
* UI. The property is absent when the API omits the flag for the field.
|
|
907
|
+
*/
|
|
908
|
+
isSecret: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
909
|
+
/**
|
|
910
|
+
* The legacy template name the API reports for this field, mapped from
|
|
911
|
+
* `legacy_template_name`. The API declares it as an optional string without
|
|
912
|
+
* further documenting its semantics.
|
|
913
|
+
*/
|
|
914
|
+
legacyTemplateName: z$1.ZodOptional<z$1.ZodString>;
|
|
915
|
+
/**
|
|
916
|
+
* Whether the hosted connect flow shows this field to the end user, mapped
|
|
917
|
+
* from `user_visible`. A field with `false` is never required: its `default`
|
|
918
|
+
* applies unless the auth config supplies a value. Absent when the API omits
|
|
919
|
+
* the flag.
|
|
920
|
+
*/
|
|
921
|
+
userVisible: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
823
922
|
}, "strip", z$1.ZodTypeAny, {
|
|
824
923
|
name: string;
|
|
825
924
|
type: string;
|
|
@@ -827,6 +926,9 @@ declare const ToolkitAuthConfigDetailsSchema: z$1.ZodObject<{
|
|
|
827
926
|
required: boolean;
|
|
828
927
|
displayName: string;
|
|
829
928
|
default?: string | null | undefined;
|
|
929
|
+
isSecret?: boolean | undefined;
|
|
930
|
+
legacyTemplateName?: string | undefined;
|
|
931
|
+
userVisible?: boolean | undefined;
|
|
830
932
|
}, {
|
|
831
933
|
name: string;
|
|
832
934
|
type: string;
|
|
@@ -834,6 +936,9 @@ declare const ToolkitAuthConfigDetailsSchema: z$1.ZodObject<{
|
|
|
834
936
|
required: boolean;
|
|
835
937
|
displayName: string;
|
|
836
938
|
default?: string | null | undefined;
|
|
939
|
+
isSecret?: boolean | undefined;
|
|
940
|
+
legacyTemplateName?: string | undefined;
|
|
941
|
+
userVisible?: boolean | undefined;
|
|
837
942
|
}>, "many">;
|
|
838
943
|
required: z$1.ZodArray<z$1.ZodObject<{
|
|
839
944
|
description: z$1.ZodString;
|
|
@@ -842,6 +947,25 @@ declare const ToolkitAuthConfigDetailsSchema: z$1.ZodObject<{
|
|
|
842
947
|
name: z$1.ZodString;
|
|
843
948
|
type: z$1.ZodString;
|
|
844
949
|
default: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
950
|
+
/**
|
|
951
|
+
* Whether this field holds a secret/credential value. Clients use it to
|
|
952
|
+
* decide whether to mask the input when collecting the value in their own
|
|
953
|
+
* UI. The property is absent when the API omits the flag for the field.
|
|
954
|
+
*/
|
|
955
|
+
isSecret: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
956
|
+
/**
|
|
957
|
+
* The legacy template name the API reports for this field, mapped from
|
|
958
|
+
* `legacy_template_name`. The API declares it as an optional string without
|
|
959
|
+
* further documenting its semantics.
|
|
960
|
+
*/
|
|
961
|
+
legacyTemplateName: z$1.ZodOptional<z$1.ZodString>;
|
|
962
|
+
/**
|
|
963
|
+
* Whether the hosted connect flow shows this field to the end user, mapped
|
|
964
|
+
* from `user_visible`. A field with `false` is never required: its `default`
|
|
965
|
+
* applies unless the auth config supplies a value. Absent when the API omits
|
|
966
|
+
* the flag.
|
|
967
|
+
*/
|
|
968
|
+
userVisible: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
845
969
|
}, "strip", z$1.ZodTypeAny, {
|
|
846
970
|
name: string;
|
|
847
971
|
type: string;
|
|
@@ -849,6 +973,9 @@ declare const ToolkitAuthConfigDetailsSchema: z$1.ZodObject<{
|
|
|
849
973
|
required: boolean;
|
|
850
974
|
displayName: string;
|
|
851
975
|
default?: string | null | undefined;
|
|
976
|
+
isSecret?: boolean | undefined;
|
|
977
|
+
legacyTemplateName?: string | undefined;
|
|
978
|
+
userVisible?: boolean | undefined;
|
|
852
979
|
}, {
|
|
853
980
|
name: string;
|
|
854
981
|
type: string;
|
|
@@ -856,6 +983,9 @@ declare const ToolkitAuthConfigDetailsSchema: z$1.ZodObject<{
|
|
|
856
983
|
required: boolean;
|
|
857
984
|
displayName: string;
|
|
858
985
|
default?: string | null | undefined;
|
|
986
|
+
isSecret?: boolean | undefined;
|
|
987
|
+
legacyTemplateName?: string | undefined;
|
|
988
|
+
userVisible?: boolean | undefined;
|
|
859
989
|
}>, "many">;
|
|
860
990
|
}, "strip", z$1.ZodTypeAny, {
|
|
861
991
|
required: {
|
|
@@ -865,6 +995,9 @@ declare const ToolkitAuthConfigDetailsSchema: z$1.ZodObject<{
|
|
|
865
995
|
required: boolean;
|
|
866
996
|
displayName: string;
|
|
867
997
|
default?: string | null | undefined;
|
|
998
|
+
isSecret?: boolean | undefined;
|
|
999
|
+
legacyTemplateName?: string | undefined;
|
|
1000
|
+
userVisible?: boolean | undefined;
|
|
868
1001
|
}[];
|
|
869
1002
|
optional: {
|
|
870
1003
|
name: string;
|
|
@@ -873,6 +1006,9 @@ declare const ToolkitAuthConfigDetailsSchema: z$1.ZodObject<{
|
|
|
873
1006
|
required: boolean;
|
|
874
1007
|
displayName: string;
|
|
875
1008
|
default?: string | null | undefined;
|
|
1009
|
+
isSecret?: boolean | undefined;
|
|
1010
|
+
legacyTemplateName?: string | undefined;
|
|
1011
|
+
userVisible?: boolean | undefined;
|
|
876
1012
|
}[];
|
|
877
1013
|
}, {
|
|
878
1014
|
required: {
|
|
@@ -882,6 +1018,9 @@ declare const ToolkitAuthConfigDetailsSchema: z$1.ZodObject<{
|
|
|
882
1018
|
required: boolean;
|
|
883
1019
|
displayName: string;
|
|
884
1020
|
default?: string | null | undefined;
|
|
1021
|
+
isSecret?: boolean | undefined;
|
|
1022
|
+
legacyTemplateName?: string | undefined;
|
|
1023
|
+
userVisible?: boolean | undefined;
|
|
885
1024
|
}[];
|
|
886
1025
|
optional: {
|
|
887
1026
|
name: string;
|
|
@@ -890,6 +1029,9 @@ declare const ToolkitAuthConfigDetailsSchema: z$1.ZodObject<{
|
|
|
890
1029
|
required: boolean;
|
|
891
1030
|
displayName: string;
|
|
892
1031
|
default?: string | null | undefined;
|
|
1032
|
+
isSecret?: boolean | undefined;
|
|
1033
|
+
legacyTemplateName?: string | undefined;
|
|
1034
|
+
userVisible?: boolean | undefined;
|
|
893
1035
|
}[];
|
|
894
1036
|
}>;
|
|
895
1037
|
connectedAccountInitiation: z$1.ZodObject<{
|
|
@@ -900,6 +1042,25 @@ declare const ToolkitAuthConfigDetailsSchema: z$1.ZodObject<{
|
|
|
900
1042
|
name: z$1.ZodString;
|
|
901
1043
|
type: z$1.ZodString;
|
|
902
1044
|
default: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
1045
|
+
/**
|
|
1046
|
+
* Whether this field holds a secret/credential value. Clients use it to
|
|
1047
|
+
* decide whether to mask the input when collecting the value in their own
|
|
1048
|
+
* UI. The property is absent when the API omits the flag for the field.
|
|
1049
|
+
*/
|
|
1050
|
+
isSecret: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
1051
|
+
/**
|
|
1052
|
+
* The legacy template name the API reports for this field, mapped from
|
|
1053
|
+
* `legacy_template_name`. The API declares it as an optional string without
|
|
1054
|
+
* further documenting its semantics.
|
|
1055
|
+
*/
|
|
1056
|
+
legacyTemplateName: z$1.ZodOptional<z$1.ZodString>;
|
|
1057
|
+
/**
|
|
1058
|
+
* Whether the hosted connect flow shows this field to the end user, mapped
|
|
1059
|
+
* from `user_visible`. A field with `false` is never required: its `default`
|
|
1060
|
+
* applies unless the auth config supplies a value. Absent when the API omits
|
|
1061
|
+
* the flag.
|
|
1062
|
+
*/
|
|
1063
|
+
userVisible: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
903
1064
|
}, "strip", z$1.ZodTypeAny, {
|
|
904
1065
|
name: string;
|
|
905
1066
|
type: string;
|
|
@@ -907,6 +1068,9 @@ declare const ToolkitAuthConfigDetailsSchema: z$1.ZodObject<{
|
|
|
907
1068
|
required: boolean;
|
|
908
1069
|
displayName: string;
|
|
909
1070
|
default?: string | null | undefined;
|
|
1071
|
+
isSecret?: boolean | undefined;
|
|
1072
|
+
legacyTemplateName?: string | undefined;
|
|
1073
|
+
userVisible?: boolean | undefined;
|
|
910
1074
|
}, {
|
|
911
1075
|
name: string;
|
|
912
1076
|
type: string;
|
|
@@ -914,6 +1078,9 @@ declare const ToolkitAuthConfigDetailsSchema: z$1.ZodObject<{
|
|
|
914
1078
|
required: boolean;
|
|
915
1079
|
displayName: string;
|
|
916
1080
|
default?: string | null | undefined;
|
|
1081
|
+
isSecret?: boolean | undefined;
|
|
1082
|
+
legacyTemplateName?: string | undefined;
|
|
1083
|
+
userVisible?: boolean | undefined;
|
|
917
1084
|
}>, "many">;
|
|
918
1085
|
required: z$1.ZodArray<z$1.ZodObject<{
|
|
919
1086
|
description: z$1.ZodString;
|
|
@@ -922,6 +1089,25 @@ declare const ToolkitAuthConfigDetailsSchema: z$1.ZodObject<{
|
|
|
922
1089
|
name: z$1.ZodString;
|
|
923
1090
|
type: z$1.ZodString;
|
|
924
1091
|
default: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
1092
|
+
/**
|
|
1093
|
+
* Whether this field holds a secret/credential value. Clients use it to
|
|
1094
|
+
* decide whether to mask the input when collecting the value in their own
|
|
1095
|
+
* UI. The property is absent when the API omits the flag for the field.
|
|
1096
|
+
*/
|
|
1097
|
+
isSecret: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
1098
|
+
/**
|
|
1099
|
+
* The legacy template name the API reports for this field, mapped from
|
|
1100
|
+
* `legacy_template_name`. The API declares it as an optional string without
|
|
1101
|
+
* further documenting its semantics.
|
|
1102
|
+
*/
|
|
1103
|
+
legacyTemplateName: z$1.ZodOptional<z$1.ZodString>;
|
|
1104
|
+
/**
|
|
1105
|
+
* Whether the hosted connect flow shows this field to the end user, mapped
|
|
1106
|
+
* from `user_visible`. A field with `false` is never required: its `default`
|
|
1107
|
+
* applies unless the auth config supplies a value. Absent when the API omits
|
|
1108
|
+
* the flag.
|
|
1109
|
+
*/
|
|
1110
|
+
userVisible: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
925
1111
|
}, "strip", z$1.ZodTypeAny, {
|
|
926
1112
|
name: string;
|
|
927
1113
|
type: string;
|
|
@@ -929,6 +1115,9 @@ declare const ToolkitAuthConfigDetailsSchema: z$1.ZodObject<{
|
|
|
929
1115
|
required: boolean;
|
|
930
1116
|
displayName: string;
|
|
931
1117
|
default?: string | null | undefined;
|
|
1118
|
+
isSecret?: boolean | undefined;
|
|
1119
|
+
legacyTemplateName?: string | undefined;
|
|
1120
|
+
userVisible?: boolean | undefined;
|
|
932
1121
|
}, {
|
|
933
1122
|
name: string;
|
|
934
1123
|
type: string;
|
|
@@ -936,6 +1125,9 @@ declare const ToolkitAuthConfigDetailsSchema: z$1.ZodObject<{
|
|
|
936
1125
|
required: boolean;
|
|
937
1126
|
displayName: string;
|
|
938
1127
|
default?: string | null | undefined;
|
|
1128
|
+
isSecret?: boolean | undefined;
|
|
1129
|
+
legacyTemplateName?: string | undefined;
|
|
1130
|
+
userVisible?: boolean | undefined;
|
|
939
1131
|
}>, "many">;
|
|
940
1132
|
}, "strip", z$1.ZodTypeAny, {
|
|
941
1133
|
required: {
|
|
@@ -945,6 +1137,9 @@ declare const ToolkitAuthConfigDetailsSchema: z$1.ZodObject<{
|
|
|
945
1137
|
required: boolean;
|
|
946
1138
|
displayName: string;
|
|
947
1139
|
default?: string | null | undefined;
|
|
1140
|
+
isSecret?: boolean | undefined;
|
|
1141
|
+
legacyTemplateName?: string | undefined;
|
|
1142
|
+
userVisible?: boolean | undefined;
|
|
948
1143
|
}[];
|
|
949
1144
|
optional: {
|
|
950
1145
|
name: string;
|
|
@@ -953,6 +1148,9 @@ declare const ToolkitAuthConfigDetailsSchema: z$1.ZodObject<{
|
|
|
953
1148
|
required: boolean;
|
|
954
1149
|
displayName: string;
|
|
955
1150
|
default?: string | null | undefined;
|
|
1151
|
+
isSecret?: boolean | undefined;
|
|
1152
|
+
legacyTemplateName?: string | undefined;
|
|
1153
|
+
userVisible?: boolean | undefined;
|
|
956
1154
|
}[];
|
|
957
1155
|
}, {
|
|
958
1156
|
required: {
|
|
@@ -962,6 +1160,9 @@ declare const ToolkitAuthConfigDetailsSchema: z$1.ZodObject<{
|
|
|
962
1160
|
required: boolean;
|
|
963
1161
|
displayName: string;
|
|
964
1162
|
default?: string | null | undefined;
|
|
1163
|
+
isSecret?: boolean | undefined;
|
|
1164
|
+
legacyTemplateName?: string | undefined;
|
|
1165
|
+
userVisible?: boolean | undefined;
|
|
965
1166
|
}[];
|
|
966
1167
|
optional: {
|
|
967
1168
|
name: string;
|
|
@@ -970,6 +1171,9 @@ declare const ToolkitAuthConfigDetailsSchema: z$1.ZodObject<{
|
|
|
970
1171
|
required: boolean;
|
|
971
1172
|
displayName: string;
|
|
972
1173
|
default?: string | null | undefined;
|
|
1174
|
+
isSecret?: boolean | undefined;
|
|
1175
|
+
legacyTemplateName?: string | undefined;
|
|
1176
|
+
userVisible?: boolean | undefined;
|
|
973
1177
|
}[];
|
|
974
1178
|
}>;
|
|
975
1179
|
}, "strip", z$1.ZodTypeAny, {
|
|
@@ -981,6 +1185,9 @@ declare const ToolkitAuthConfigDetailsSchema: z$1.ZodObject<{
|
|
|
981
1185
|
required: boolean;
|
|
982
1186
|
displayName: string;
|
|
983
1187
|
default?: string | null | undefined;
|
|
1188
|
+
isSecret?: boolean | undefined;
|
|
1189
|
+
legacyTemplateName?: string | undefined;
|
|
1190
|
+
userVisible?: boolean | undefined;
|
|
984
1191
|
}[];
|
|
985
1192
|
optional: {
|
|
986
1193
|
name: string;
|
|
@@ -989,6 +1196,9 @@ declare const ToolkitAuthConfigDetailsSchema: z$1.ZodObject<{
|
|
|
989
1196
|
required: boolean;
|
|
990
1197
|
displayName: string;
|
|
991
1198
|
default?: string | null | undefined;
|
|
1199
|
+
isSecret?: boolean | undefined;
|
|
1200
|
+
legacyTemplateName?: string | undefined;
|
|
1201
|
+
userVisible?: boolean | undefined;
|
|
992
1202
|
}[];
|
|
993
1203
|
};
|
|
994
1204
|
connectedAccountInitiation: {
|
|
@@ -999,6 +1209,9 @@ declare const ToolkitAuthConfigDetailsSchema: z$1.ZodObject<{
|
|
|
999
1209
|
required: boolean;
|
|
1000
1210
|
displayName: string;
|
|
1001
1211
|
default?: string | null | undefined;
|
|
1212
|
+
isSecret?: boolean | undefined;
|
|
1213
|
+
legacyTemplateName?: string | undefined;
|
|
1214
|
+
userVisible?: boolean | undefined;
|
|
1002
1215
|
}[];
|
|
1003
1216
|
optional: {
|
|
1004
1217
|
name: string;
|
|
@@ -1007,6 +1220,9 @@ declare const ToolkitAuthConfigDetailsSchema: z$1.ZodObject<{
|
|
|
1007
1220
|
required: boolean;
|
|
1008
1221
|
displayName: string;
|
|
1009
1222
|
default?: string | null | undefined;
|
|
1223
|
+
isSecret?: boolean | undefined;
|
|
1224
|
+
legacyTemplateName?: string | undefined;
|
|
1225
|
+
userVisible?: boolean | undefined;
|
|
1010
1226
|
}[];
|
|
1011
1227
|
};
|
|
1012
1228
|
}, {
|
|
@@ -1018,6 +1234,9 @@ declare const ToolkitAuthConfigDetailsSchema: z$1.ZodObject<{
|
|
|
1018
1234
|
required: boolean;
|
|
1019
1235
|
displayName: string;
|
|
1020
1236
|
default?: string | null | undefined;
|
|
1237
|
+
isSecret?: boolean | undefined;
|
|
1238
|
+
legacyTemplateName?: string | undefined;
|
|
1239
|
+
userVisible?: boolean | undefined;
|
|
1021
1240
|
}[];
|
|
1022
1241
|
optional: {
|
|
1023
1242
|
name: string;
|
|
@@ -1026,6 +1245,9 @@ declare const ToolkitAuthConfigDetailsSchema: z$1.ZodObject<{
|
|
|
1026
1245
|
required: boolean;
|
|
1027
1246
|
displayName: string;
|
|
1028
1247
|
default?: string | null | undefined;
|
|
1248
|
+
isSecret?: boolean | undefined;
|
|
1249
|
+
legacyTemplateName?: string | undefined;
|
|
1250
|
+
userVisible?: boolean | undefined;
|
|
1029
1251
|
}[];
|
|
1030
1252
|
};
|
|
1031
1253
|
connectedAccountInitiation: {
|
|
@@ -1036,6 +1258,9 @@ declare const ToolkitAuthConfigDetailsSchema: z$1.ZodObject<{
|
|
|
1036
1258
|
required: boolean;
|
|
1037
1259
|
displayName: string;
|
|
1038
1260
|
default?: string | null | undefined;
|
|
1261
|
+
isSecret?: boolean | undefined;
|
|
1262
|
+
legacyTemplateName?: string | undefined;
|
|
1263
|
+
userVisible?: boolean | undefined;
|
|
1039
1264
|
}[];
|
|
1040
1265
|
optional: {
|
|
1041
1266
|
name: string;
|
|
@@ -1044,6 +1269,9 @@ declare const ToolkitAuthConfigDetailsSchema: z$1.ZodObject<{
|
|
|
1044
1269
|
required: boolean;
|
|
1045
1270
|
displayName: string;
|
|
1046
1271
|
default?: string | null | undefined;
|
|
1272
|
+
isSecret?: boolean | undefined;
|
|
1273
|
+
legacyTemplateName?: string | undefined;
|
|
1274
|
+
userVisible?: boolean | undefined;
|
|
1047
1275
|
}[];
|
|
1048
1276
|
};
|
|
1049
1277
|
}>;
|
|
@@ -1066,6 +1294,9 @@ declare const ToolkitAuthConfigDetailsSchema: z$1.ZodObject<{
|
|
|
1066
1294
|
required: boolean;
|
|
1067
1295
|
displayName: string;
|
|
1068
1296
|
default?: string | null | undefined;
|
|
1297
|
+
isSecret?: boolean | undefined;
|
|
1298
|
+
legacyTemplateName?: string | undefined;
|
|
1299
|
+
userVisible?: boolean | undefined;
|
|
1069
1300
|
}[];
|
|
1070
1301
|
optional: {
|
|
1071
1302
|
name: string;
|
|
@@ -1074,6 +1305,9 @@ declare const ToolkitAuthConfigDetailsSchema: z$1.ZodObject<{
|
|
|
1074
1305
|
required: boolean;
|
|
1075
1306
|
displayName: string;
|
|
1076
1307
|
default?: string | null | undefined;
|
|
1308
|
+
isSecret?: boolean | undefined;
|
|
1309
|
+
legacyTemplateName?: string | undefined;
|
|
1310
|
+
userVisible?: boolean | undefined;
|
|
1077
1311
|
}[];
|
|
1078
1312
|
};
|
|
1079
1313
|
connectedAccountInitiation: {
|
|
@@ -1084,6 +1318,9 @@ declare const ToolkitAuthConfigDetailsSchema: z$1.ZodObject<{
|
|
|
1084
1318
|
required: boolean;
|
|
1085
1319
|
displayName: string;
|
|
1086
1320
|
default?: string | null | undefined;
|
|
1321
|
+
isSecret?: boolean | undefined;
|
|
1322
|
+
legacyTemplateName?: string | undefined;
|
|
1323
|
+
userVisible?: boolean | undefined;
|
|
1087
1324
|
}[];
|
|
1088
1325
|
optional: {
|
|
1089
1326
|
name: string;
|
|
@@ -1092,9 +1329,14 @@ declare const ToolkitAuthConfigDetailsSchema: z$1.ZodObject<{
|
|
|
1092
1329
|
required: boolean;
|
|
1093
1330
|
displayName: string;
|
|
1094
1331
|
default?: string | null | undefined;
|
|
1332
|
+
isSecret?: boolean | undefined;
|
|
1333
|
+
legacyTemplateName?: string | undefined;
|
|
1334
|
+
userVisible?: boolean | undefined;
|
|
1095
1335
|
}[];
|
|
1096
1336
|
};
|
|
1097
1337
|
};
|
|
1338
|
+
authHintUrl?: string | null | undefined;
|
|
1339
|
+
requiredScopes?: string[] | undefined;
|
|
1098
1340
|
proxy?: {
|
|
1099
1341
|
baseUrl?: string | undefined;
|
|
1100
1342
|
} | undefined;
|
|
@@ -1110,6 +1352,9 @@ declare const ToolkitAuthConfigDetailsSchema: z$1.ZodObject<{
|
|
|
1110
1352
|
required: boolean;
|
|
1111
1353
|
displayName: string;
|
|
1112
1354
|
default?: string | null | undefined;
|
|
1355
|
+
isSecret?: boolean | undefined;
|
|
1356
|
+
legacyTemplateName?: string | undefined;
|
|
1357
|
+
userVisible?: boolean | undefined;
|
|
1113
1358
|
}[];
|
|
1114
1359
|
optional: {
|
|
1115
1360
|
name: string;
|
|
@@ -1118,6 +1363,9 @@ declare const ToolkitAuthConfigDetailsSchema: z$1.ZodObject<{
|
|
|
1118
1363
|
required: boolean;
|
|
1119
1364
|
displayName: string;
|
|
1120
1365
|
default?: string | null | undefined;
|
|
1366
|
+
isSecret?: boolean | undefined;
|
|
1367
|
+
legacyTemplateName?: string | undefined;
|
|
1368
|
+
userVisible?: boolean | undefined;
|
|
1121
1369
|
}[];
|
|
1122
1370
|
};
|
|
1123
1371
|
connectedAccountInitiation: {
|
|
@@ -1128,6 +1376,9 @@ declare const ToolkitAuthConfigDetailsSchema: z$1.ZodObject<{
|
|
|
1128
1376
|
required: boolean;
|
|
1129
1377
|
displayName: string;
|
|
1130
1378
|
default?: string | null | undefined;
|
|
1379
|
+
isSecret?: boolean | undefined;
|
|
1380
|
+
legacyTemplateName?: string | undefined;
|
|
1381
|
+
userVisible?: boolean | undefined;
|
|
1131
1382
|
}[];
|
|
1132
1383
|
optional: {
|
|
1133
1384
|
name: string;
|
|
@@ -1136,9 +1387,14 @@ declare const ToolkitAuthConfigDetailsSchema: z$1.ZodObject<{
|
|
|
1136
1387
|
required: boolean;
|
|
1137
1388
|
displayName: string;
|
|
1138
1389
|
default?: string | null | undefined;
|
|
1390
|
+
isSecret?: boolean | undefined;
|
|
1391
|
+
legacyTemplateName?: string | undefined;
|
|
1392
|
+
userVisible?: boolean | undefined;
|
|
1139
1393
|
}[];
|
|
1140
1394
|
};
|
|
1141
1395
|
};
|
|
1396
|
+
authHintUrl?: string | null | undefined;
|
|
1397
|
+
requiredScopes?: string[] | undefined;
|
|
1142
1398
|
proxy?: {
|
|
1143
1399
|
baseUrl?: string | undefined;
|
|
1144
1400
|
} | undefined;
|
|
@@ -1197,6 +1453,17 @@ declare const ToolkitRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
1197
1453
|
authConfigDetails: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
|
|
1198
1454
|
name: z$1.ZodString;
|
|
1199
1455
|
mode: z$1.ZodString;
|
|
1456
|
+
/**
|
|
1457
|
+
* URL to a page where users can obtain or configure credentials for this
|
|
1458
|
+
* authentication method, e.g. `https://github.com/settings/tokens`.
|
|
1459
|
+
*/
|
|
1460
|
+
authHintUrl: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
1461
|
+
/**
|
|
1462
|
+
* OAuth scopes always requested for this auth method regardless of the
|
|
1463
|
+
* tool-specific scopes, such as token refresh (`offline_access`) and identity
|
|
1464
|
+
* scopes. Mapped from `required_scopes`; absent when the API omits it.
|
|
1465
|
+
*/
|
|
1466
|
+
requiredScopes: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString, "many">>;
|
|
1200
1467
|
fields: z$1.ZodObject<{
|
|
1201
1468
|
authConfigCreation: z$1.ZodObject<{
|
|
1202
1469
|
optional: z$1.ZodArray<z$1.ZodObject<{
|
|
@@ -1206,6 +1473,25 @@ declare const ToolkitRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
1206
1473
|
name: z$1.ZodString;
|
|
1207
1474
|
type: z$1.ZodString;
|
|
1208
1475
|
default: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
1476
|
+
/**
|
|
1477
|
+
* Whether this field holds a secret/credential value. Clients use it to
|
|
1478
|
+
* decide whether to mask the input when collecting the value in their own
|
|
1479
|
+
* UI. The property is absent when the API omits the flag for the field.
|
|
1480
|
+
*/
|
|
1481
|
+
isSecret: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
1482
|
+
/**
|
|
1483
|
+
* The legacy template name the API reports for this field, mapped from
|
|
1484
|
+
* `legacy_template_name`. The API declares it as an optional string without
|
|
1485
|
+
* further documenting its semantics.
|
|
1486
|
+
*/
|
|
1487
|
+
legacyTemplateName: z$1.ZodOptional<z$1.ZodString>;
|
|
1488
|
+
/**
|
|
1489
|
+
* Whether the hosted connect flow shows this field to the end user, mapped
|
|
1490
|
+
* from `user_visible`. A field with `false` is never required: its `default`
|
|
1491
|
+
* applies unless the auth config supplies a value. Absent when the API omits
|
|
1492
|
+
* the flag.
|
|
1493
|
+
*/
|
|
1494
|
+
userVisible: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
1209
1495
|
}, "strip", z$1.ZodTypeAny, {
|
|
1210
1496
|
name: string;
|
|
1211
1497
|
type: string;
|
|
@@ -1213,6 +1499,9 @@ declare const ToolkitRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
1213
1499
|
required: boolean;
|
|
1214
1500
|
displayName: string;
|
|
1215
1501
|
default?: string | null | undefined;
|
|
1502
|
+
isSecret?: boolean | undefined;
|
|
1503
|
+
legacyTemplateName?: string | undefined;
|
|
1504
|
+
userVisible?: boolean | undefined;
|
|
1216
1505
|
}, {
|
|
1217
1506
|
name: string;
|
|
1218
1507
|
type: string;
|
|
@@ -1220,6 +1509,9 @@ declare const ToolkitRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
1220
1509
|
required: boolean;
|
|
1221
1510
|
displayName: string;
|
|
1222
1511
|
default?: string | null | undefined;
|
|
1512
|
+
isSecret?: boolean | undefined;
|
|
1513
|
+
legacyTemplateName?: string | undefined;
|
|
1514
|
+
userVisible?: boolean | undefined;
|
|
1223
1515
|
}>, "many">;
|
|
1224
1516
|
required: z$1.ZodArray<z$1.ZodObject<{
|
|
1225
1517
|
description: z$1.ZodString;
|
|
@@ -1228,6 +1520,25 @@ declare const ToolkitRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
1228
1520
|
name: z$1.ZodString;
|
|
1229
1521
|
type: z$1.ZodString;
|
|
1230
1522
|
default: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
1523
|
+
/**
|
|
1524
|
+
* Whether this field holds a secret/credential value. Clients use it to
|
|
1525
|
+
* decide whether to mask the input when collecting the value in their own
|
|
1526
|
+
* UI. The property is absent when the API omits the flag for the field.
|
|
1527
|
+
*/
|
|
1528
|
+
isSecret: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
1529
|
+
/**
|
|
1530
|
+
* The legacy template name the API reports for this field, mapped from
|
|
1531
|
+
* `legacy_template_name`. The API declares it as an optional string without
|
|
1532
|
+
* further documenting its semantics.
|
|
1533
|
+
*/
|
|
1534
|
+
legacyTemplateName: z$1.ZodOptional<z$1.ZodString>;
|
|
1535
|
+
/**
|
|
1536
|
+
* Whether the hosted connect flow shows this field to the end user, mapped
|
|
1537
|
+
* from `user_visible`. A field with `false` is never required: its `default`
|
|
1538
|
+
* applies unless the auth config supplies a value. Absent when the API omits
|
|
1539
|
+
* the flag.
|
|
1540
|
+
*/
|
|
1541
|
+
userVisible: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
1231
1542
|
}, "strip", z$1.ZodTypeAny, {
|
|
1232
1543
|
name: string;
|
|
1233
1544
|
type: string;
|
|
@@ -1235,6 +1546,9 @@ declare const ToolkitRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
1235
1546
|
required: boolean;
|
|
1236
1547
|
displayName: string;
|
|
1237
1548
|
default?: string | null | undefined;
|
|
1549
|
+
isSecret?: boolean | undefined;
|
|
1550
|
+
legacyTemplateName?: string | undefined;
|
|
1551
|
+
userVisible?: boolean | undefined;
|
|
1238
1552
|
}, {
|
|
1239
1553
|
name: string;
|
|
1240
1554
|
type: string;
|
|
@@ -1242,6 +1556,9 @@ declare const ToolkitRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
1242
1556
|
required: boolean;
|
|
1243
1557
|
displayName: string;
|
|
1244
1558
|
default?: string | null | undefined;
|
|
1559
|
+
isSecret?: boolean | undefined;
|
|
1560
|
+
legacyTemplateName?: string | undefined;
|
|
1561
|
+
userVisible?: boolean | undefined;
|
|
1245
1562
|
}>, "many">;
|
|
1246
1563
|
}, "strip", z$1.ZodTypeAny, {
|
|
1247
1564
|
required: {
|
|
@@ -1251,6 +1568,9 @@ declare const ToolkitRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
1251
1568
|
required: boolean;
|
|
1252
1569
|
displayName: string;
|
|
1253
1570
|
default?: string | null | undefined;
|
|
1571
|
+
isSecret?: boolean | undefined;
|
|
1572
|
+
legacyTemplateName?: string | undefined;
|
|
1573
|
+
userVisible?: boolean | undefined;
|
|
1254
1574
|
}[];
|
|
1255
1575
|
optional: {
|
|
1256
1576
|
name: string;
|
|
@@ -1259,6 +1579,9 @@ declare const ToolkitRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
1259
1579
|
required: boolean;
|
|
1260
1580
|
displayName: string;
|
|
1261
1581
|
default?: string | null | undefined;
|
|
1582
|
+
isSecret?: boolean | undefined;
|
|
1583
|
+
legacyTemplateName?: string | undefined;
|
|
1584
|
+
userVisible?: boolean | undefined;
|
|
1262
1585
|
}[];
|
|
1263
1586
|
}, {
|
|
1264
1587
|
required: {
|
|
@@ -1268,6 +1591,9 @@ declare const ToolkitRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
1268
1591
|
required: boolean;
|
|
1269
1592
|
displayName: string;
|
|
1270
1593
|
default?: string | null | undefined;
|
|
1594
|
+
isSecret?: boolean | undefined;
|
|
1595
|
+
legacyTemplateName?: string | undefined;
|
|
1596
|
+
userVisible?: boolean | undefined;
|
|
1271
1597
|
}[];
|
|
1272
1598
|
optional: {
|
|
1273
1599
|
name: string;
|
|
@@ -1276,6 +1602,9 @@ declare const ToolkitRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
1276
1602
|
required: boolean;
|
|
1277
1603
|
displayName: string;
|
|
1278
1604
|
default?: string | null | undefined;
|
|
1605
|
+
isSecret?: boolean | undefined;
|
|
1606
|
+
legacyTemplateName?: string | undefined;
|
|
1607
|
+
userVisible?: boolean | undefined;
|
|
1279
1608
|
}[];
|
|
1280
1609
|
}>;
|
|
1281
1610
|
connectedAccountInitiation: z$1.ZodObject<{
|
|
@@ -1286,6 +1615,25 @@ declare const ToolkitRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
1286
1615
|
name: z$1.ZodString;
|
|
1287
1616
|
type: z$1.ZodString;
|
|
1288
1617
|
default: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
1618
|
+
/**
|
|
1619
|
+
* Whether this field holds a secret/credential value. Clients use it to
|
|
1620
|
+
* decide whether to mask the input when collecting the value in their own
|
|
1621
|
+
* UI. The property is absent when the API omits the flag for the field.
|
|
1622
|
+
*/
|
|
1623
|
+
isSecret: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
1624
|
+
/**
|
|
1625
|
+
* The legacy template name the API reports for this field, mapped from
|
|
1626
|
+
* `legacy_template_name`. The API declares it as an optional string without
|
|
1627
|
+
* further documenting its semantics.
|
|
1628
|
+
*/
|
|
1629
|
+
legacyTemplateName: z$1.ZodOptional<z$1.ZodString>;
|
|
1630
|
+
/**
|
|
1631
|
+
* Whether the hosted connect flow shows this field to the end user, mapped
|
|
1632
|
+
* from `user_visible`. A field with `false` is never required: its `default`
|
|
1633
|
+
* applies unless the auth config supplies a value. Absent when the API omits
|
|
1634
|
+
* the flag.
|
|
1635
|
+
*/
|
|
1636
|
+
userVisible: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
1289
1637
|
}, "strip", z$1.ZodTypeAny, {
|
|
1290
1638
|
name: string;
|
|
1291
1639
|
type: string;
|
|
@@ -1293,6 +1641,9 @@ declare const ToolkitRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
1293
1641
|
required: boolean;
|
|
1294
1642
|
displayName: string;
|
|
1295
1643
|
default?: string | null | undefined;
|
|
1644
|
+
isSecret?: boolean | undefined;
|
|
1645
|
+
legacyTemplateName?: string | undefined;
|
|
1646
|
+
userVisible?: boolean | undefined;
|
|
1296
1647
|
}, {
|
|
1297
1648
|
name: string;
|
|
1298
1649
|
type: string;
|
|
@@ -1300,6 +1651,9 @@ declare const ToolkitRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
1300
1651
|
required: boolean;
|
|
1301
1652
|
displayName: string;
|
|
1302
1653
|
default?: string | null | undefined;
|
|
1654
|
+
isSecret?: boolean | undefined;
|
|
1655
|
+
legacyTemplateName?: string | undefined;
|
|
1656
|
+
userVisible?: boolean | undefined;
|
|
1303
1657
|
}>, "many">;
|
|
1304
1658
|
required: z$1.ZodArray<z$1.ZodObject<{
|
|
1305
1659
|
description: z$1.ZodString;
|
|
@@ -1308,6 +1662,25 @@ declare const ToolkitRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
1308
1662
|
name: z$1.ZodString;
|
|
1309
1663
|
type: z$1.ZodString;
|
|
1310
1664
|
default: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
1665
|
+
/**
|
|
1666
|
+
* Whether this field holds a secret/credential value. Clients use it to
|
|
1667
|
+
* decide whether to mask the input when collecting the value in their own
|
|
1668
|
+
* UI. The property is absent when the API omits the flag for the field.
|
|
1669
|
+
*/
|
|
1670
|
+
isSecret: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
1671
|
+
/**
|
|
1672
|
+
* The legacy template name the API reports for this field, mapped from
|
|
1673
|
+
* `legacy_template_name`. The API declares it as an optional string without
|
|
1674
|
+
* further documenting its semantics.
|
|
1675
|
+
*/
|
|
1676
|
+
legacyTemplateName: z$1.ZodOptional<z$1.ZodString>;
|
|
1677
|
+
/**
|
|
1678
|
+
* Whether the hosted connect flow shows this field to the end user, mapped
|
|
1679
|
+
* from `user_visible`. A field with `false` is never required: its `default`
|
|
1680
|
+
* applies unless the auth config supplies a value. Absent when the API omits
|
|
1681
|
+
* the flag.
|
|
1682
|
+
*/
|
|
1683
|
+
userVisible: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
1311
1684
|
}, "strip", z$1.ZodTypeAny, {
|
|
1312
1685
|
name: string;
|
|
1313
1686
|
type: string;
|
|
@@ -1315,6 +1688,9 @@ declare const ToolkitRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
1315
1688
|
required: boolean;
|
|
1316
1689
|
displayName: string;
|
|
1317
1690
|
default?: string | null | undefined;
|
|
1691
|
+
isSecret?: boolean | undefined;
|
|
1692
|
+
legacyTemplateName?: string | undefined;
|
|
1693
|
+
userVisible?: boolean | undefined;
|
|
1318
1694
|
}, {
|
|
1319
1695
|
name: string;
|
|
1320
1696
|
type: string;
|
|
@@ -1322,6 +1698,9 @@ declare const ToolkitRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
1322
1698
|
required: boolean;
|
|
1323
1699
|
displayName: string;
|
|
1324
1700
|
default?: string | null | undefined;
|
|
1701
|
+
isSecret?: boolean | undefined;
|
|
1702
|
+
legacyTemplateName?: string | undefined;
|
|
1703
|
+
userVisible?: boolean | undefined;
|
|
1325
1704
|
}>, "many">;
|
|
1326
1705
|
}, "strip", z$1.ZodTypeAny, {
|
|
1327
1706
|
required: {
|
|
@@ -1331,6 +1710,9 @@ declare const ToolkitRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
1331
1710
|
required: boolean;
|
|
1332
1711
|
displayName: string;
|
|
1333
1712
|
default?: string | null | undefined;
|
|
1713
|
+
isSecret?: boolean | undefined;
|
|
1714
|
+
legacyTemplateName?: string | undefined;
|
|
1715
|
+
userVisible?: boolean | undefined;
|
|
1334
1716
|
}[];
|
|
1335
1717
|
optional: {
|
|
1336
1718
|
name: string;
|
|
@@ -1339,6 +1721,9 @@ declare const ToolkitRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
1339
1721
|
required: boolean;
|
|
1340
1722
|
displayName: string;
|
|
1341
1723
|
default?: string | null | undefined;
|
|
1724
|
+
isSecret?: boolean | undefined;
|
|
1725
|
+
legacyTemplateName?: string | undefined;
|
|
1726
|
+
userVisible?: boolean | undefined;
|
|
1342
1727
|
}[];
|
|
1343
1728
|
}, {
|
|
1344
1729
|
required: {
|
|
@@ -1348,6 +1733,9 @@ declare const ToolkitRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
1348
1733
|
required: boolean;
|
|
1349
1734
|
displayName: string;
|
|
1350
1735
|
default?: string | null | undefined;
|
|
1736
|
+
isSecret?: boolean | undefined;
|
|
1737
|
+
legacyTemplateName?: string | undefined;
|
|
1738
|
+
userVisible?: boolean | undefined;
|
|
1351
1739
|
}[];
|
|
1352
1740
|
optional: {
|
|
1353
1741
|
name: string;
|
|
@@ -1356,6 +1744,9 @@ declare const ToolkitRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
1356
1744
|
required: boolean;
|
|
1357
1745
|
displayName: string;
|
|
1358
1746
|
default?: string | null | undefined;
|
|
1747
|
+
isSecret?: boolean | undefined;
|
|
1748
|
+
legacyTemplateName?: string | undefined;
|
|
1749
|
+
userVisible?: boolean | undefined;
|
|
1359
1750
|
}[];
|
|
1360
1751
|
}>;
|
|
1361
1752
|
}, "strip", z$1.ZodTypeAny, {
|
|
@@ -1367,6 +1758,9 @@ declare const ToolkitRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
1367
1758
|
required: boolean;
|
|
1368
1759
|
displayName: string;
|
|
1369
1760
|
default?: string | null | undefined;
|
|
1761
|
+
isSecret?: boolean | undefined;
|
|
1762
|
+
legacyTemplateName?: string | undefined;
|
|
1763
|
+
userVisible?: boolean | undefined;
|
|
1370
1764
|
}[];
|
|
1371
1765
|
optional: {
|
|
1372
1766
|
name: string;
|
|
@@ -1375,6 +1769,9 @@ declare const ToolkitRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
1375
1769
|
required: boolean;
|
|
1376
1770
|
displayName: string;
|
|
1377
1771
|
default?: string | null | undefined;
|
|
1772
|
+
isSecret?: boolean | undefined;
|
|
1773
|
+
legacyTemplateName?: string | undefined;
|
|
1774
|
+
userVisible?: boolean | undefined;
|
|
1378
1775
|
}[];
|
|
1379
1776
|
};
|
|
1380
1777
|
connectedAccountInitiation: {
|
|
@@ -1385,6 +1782,9 @@ declare const ToolkitRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
1385
1782
|
required: boolean;
|
|
1386
1783
|
displayName: string;
|
|
1387
1784
|
default?: string | null | undefined;
|
|
1785
|
+
isSecret?: boolean | undefined;
|
|
1786
|
+
legacyTemplateName?: string | undefined;
|
|
1787
|
+
userVisible?: boolean | undefined;
|
|
1388
1788
|
}[];
|
|
1389
1789
|
optional: {
|
|
1390
1790
|
name: string;
|
|
@@ -1393,6 +1793,9 @@ declare const ToolkitRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
1393
1793
|
required: boolean;
|
|
1394
1794
|
displayName: string;
|
|
1395
1795
|
default?: string | null | undefined;
|
|
1796
|
+
isSecret?: boolean | undefined;
|
|
1797
|
+
legacyTemplateName?: string | undefined;
|
|
1798
|
+
userVisible?: boolean | undefined;
|
|
1396
1799
|
}[];
|
|
1397
1800
|
};
|
|
1398
1801
|
}, {
|
|
@@ -1404,6 +1807,9 @@ declare const ToolkitRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
1404
1807
|
required: boolean;
|
|
1405
1808
|
displayName: string;
|
|
1406
1809
|
default?: string | null | undefined;
|
|
1810
|
+
isSecret?: boolean | undefined;
|
|
1811
|
+
legacyTemplateName?: string | undefined;
|
|
1812
|
+
userVisible?: boolean | undefined;
|
|
1407
1813
|
}[];
|
|
1408
1814
|
optional: {
|
|
1409
1815
|
name: string;
|
|
@@ -1412,6 +1818,9 @@ declare const ToolkitRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
1412
1818
|
required: boolean;
|
|
1413
1819
|
displayName: string;
|
|
1414
1820
|
default?: string | null | undefined;
|
|
1821
|
+
isSecret?: boolean | undefined;
|
|
1822
|
+
legacyTemplateName?: string | undefined;
|
|
1823
|
+
userVisible?: boolean | undefined;
|
|
1415
1824
|
}[];
|
|
1416
1825
|
};
|
|
1417
1826
|
connectedAccountInitiation: {
|
|
@@ -1422,6 +1831,9 @@ declare const ToolkitRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
1422
1831
|
required: boolean;
|
|
1423
1832
|
displayName: string;
|
|
1424
1833
|
default?: string | null | undefined;
|
|
1834
|
+
isSecret?: boolean | undefined;
|
|
1835
|
+
legacyTemplateName?: string | undefined;
|
|
1836
|
+
userVisible?: boolean | undefined;
|
|
1425
1837
|
}[];
|
|
1426
1838
|
optional: {
|
|
1427
1839
|
name: string;
|
|
@@ -1430,6 +1842,9 @@ declare const ToolkitRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
1430
1842
|
required: boolean;
|
|
1431
1843
|
displayName: string;
|
|
1432
1844
|
default?: string | null | undefined;
|
|
1845
|
+
isSecret?: boolean | undefined;
|
|
1846
|
+
legacyTemplateName?: string | undefined;
|
|
1847
|
+
userVisible?: boolean | undefined;
|
|
1433
1848
|
}[];
|
|
1434
1849
|
};
|
|
1435
1850
|
}>;
|
|
@@ -1452,6 +1867,9 @@ declare const ToolkitRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
1452
1867
|
required: boolean;
|
|
1453
1868
|
displayName: string;
|
|
1454
1869
|
default?: string | null | undefined;
|
|
1870
|
+
isSecret?: boolean | undefined;
|
|
1871
|
+
legacyTemplateName?: string | undefined;
|
|
1872
|
+
userVisible?: boolean | undefined;
|
|
1455
1873
|
}[];
|
|
1456
1874
|
optional: {
|
|
1457
1875
|
name: string;
|
|
@@ -1460,6 +1878,9 @@ declare const ToolkitRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
1460
1878
|
required: boolean;
|
|
1461
1879
|
displayName: string;
|
|
1462
1880
|
default?: string | null | undefined;
|
|
1881
|
+
isSecret?: boolean | undefined;
|
|
1882
|
+
legacyTemplateName?: string | undefined;
|
|
1883
|
+
userVisible?: boolean | undefined;
|
|
1463
1884
|
}[];
|
|
1464
1885
|
};
|
|
1465
1886
|
connectedAccountInitiation: {
|
|
@@ -1470,6 +1891,9 @@ declare const ToolkitRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
1470
1891
|
required: boolean;
|
|
1471
1892
|
displayName: string;
|
|
1472
1893
|
default?: string | null | undefined;
|
|
1894
|
+
isSecret?: boolean | undefined;
|
|
1895
|
+
legacyTemplateName?: string | undefined;
|
|
1896
|
+
userVisible?: boolean | undefined;
|
|
1473
1897
|
}[];
|
|
1474
1898
|
optional: {
|
|
1475
1899
|
name: string;
|
|
@@ -1478,9 +1902,14 @@ declare const ToolkitRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
1478
1902
|
required: boolean;
|
|
1479
1903
|
displayName: string;
|
|
1480
1904
|
default?: string | null | undefined;
|
|
1905
|
+
isSecret?: boolean | undefined;
|
|
1906
|
+
legacyTemplateName?: string | undefined;
|
|
1907
|
+
userVisible?: boolean | undefined;
|
|
1481
1908
|
}[];
|
|
1482
1909
|
};
|
|
1483
1910
|
};
|
|
1911
|
+
authHintUrl?: string | null | undefined;
|
|
1912
|
+
requiredScopes?: string[] | undefined;
|
|
1484
1913
|
proxy?: {
|
|
1485
1914
|
baseUrl?: string | undefined;
|
|
1486
1915
|
} | undefined;
|
|
@@ -1496,6 +1925,9 @@ declare const ToolkitRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
1496
1925
|
required: boolean;
|
|
1497
1926
|
displayName: string;
|
|
1498
1927
|
default?: string | null | undefined;
|
|
1928
|
+
isSecret?: boolean | undefined;
|
|
1929
|
+
legacyTemplateName?: string | undefined;
|
|
1930
|
+
userVisible?: boolean | undefined;
|
|
1499
1931
|
}[];
|
|
1500
1932
|
optional: {
|
|
1501
1933
|
name: string;
|
|
@@ -1504,6 +1936,9 @@ declare const ToolkitRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
1504
1936
|
required: boolean;
|
|
1505
1937
|
displayName: string;
|
|
1506
1938
|
default?: string | null | undefined;
|
|
1939
|
+
isSecret?: boolean | undefined;
|
|
1940
|
+
legacyTemplateName?: string | undefined;
|
|
1941
|
+
userVisible?: boolean | undefined;
|
|
1507
1942
|
}[];
|
|
1508
1943
|
};
|
|
1509
1944
|
connectedAccountInitiation: {
|
|
@@ -1514,6 +1949,9 @@ declare const ToolkitRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
1514
1949
|
required: boolean;
|
|
1515
1950
|
displayName: string;
|
|
1516
1951
|
default?: string | null | undefined;
|
|
1952
|
+
isSecret?: boolean | undefined;
|
|
1953
|
+
legacyTemplateName?: string | undefined;
|
|
1954
|
+
userVisible?: boolean | undefined;
|
|
1517
1955
|
}[];
|
|
1518
1956
|
optional: {
|
|
1519
1957
|
name: string;
|
|
@@ -1522,9 +1960,14 @@ declare const ToolkitRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
1522
1960
|
required: boolean;
|
|
1523
1961
|
displayName: string;
|
|
1524
1962
|
default?: string | null | undefined;
|
|
1963
|
+
isSecret?: boolean | undefined;
|
|
1964
|
+
legacyTemplateName?: string | undefined;
|
|
1965
|
+
userVisible?: boolean | undefined;
|
|
1525
1966
|
}[];
|
|
1526
1967
|
};
|
|
1527
1968
|
};
|
|
1969
|
+
authHintUrl?: string | null | undefined;
|
|
1970
|
+
requiredScopes?: string[] | undefined;
|
|
1528
1971
|
proxy?: {
|
|
1529
1972
|
baseUrl?: string | undefined;
|
|
1530
1973
|
} | undefined;
|
|
@@ -1564,6 +2007,9 @@ declare const ToolkitRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
1564
2007
|
required: boolean;
|
|
1565
2008
|
displayName: string;
|
|
1566
2009
|
default?: string | null | undefined;
|
|
2010
|
+
isSecret?: boolean | undefined;
|
|
2011
|
+
legacyTemplateName?: string | undefined;
|
|
2012
|
+
userVisible?: boolean | undefined;
|
|
1567
2013
|
}[];
|
|
1568
2014
|
optional: {
|
|
1569
2015
|
name: string;
|
|
@@ -1572,6 +2018,9 @@ declare const ToolkitRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
1572
2018
|
required: boolean;
|
|
1573
2019
|
displayName: string;
|
|
1574
2020
|
default?: string | null | undefined;
|
|
2021
|
+
isSecret?: boolean | undefined;
|
|
2022
|
+
legacyTemplateName?: string | undefined;
|
|
2023
|
+
userVisible?: boolean | undefined;
|
|
1575
2024
|
}[];
|
|
1576
2025
|
};
|
|
1577
2026
|
connectedAccountInitiation: {
|
|
@@ -1582,6 +2031,9 @@ declare const ToolkitRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
1582
2031
|
required: boolean;
|
|
1583
2032
|
displayName: string;
|
|
1584
2033
|
default?: string | null | undefined;
|
|
2034
|
+
isSecret?: boolean | undefined;
|
|
2035
|
+
legacyTemplateName?: string | undefined;
|
|
2036
|
+
userVisible?: boolean | undefined;
|
|
1585
2037
|
}[];
|
|
1586
2038
|
optional: {
|
|
1587
2039
|
name: string;
|
|
@@ -1590,9 +2042,14 @@ declare const ToolkitRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
1590
2042
|
required: boolean;
|
|
1591
2043
|
displayName: string;
|
|
1592
2044
|
default?: string | null | undefined;
|
|
2045
|
+
isSecret?: boolean | undefined;
|
|
2046
|
+
legacyTemplateName?: string | undefined;
|
|
2047
|
+
userVisible?: boolean | undefined;
|
|
1593
2048
|
}[];
|
|
1594
2049
|
};
|
|
1595
2050
|
};
|
|
2051
|
+
authHintUrl?: string | null | undefined;
|
|
2052
|
+
requiredScopes?: string[] | undefined;
|
|
1596
2053
|
proxy?: {
|
|
1597
2054
|
baseUrl?: string | undefined;
|
|
1598
2055
|
} | undefined;
|
|
@@ -1631,6 +2088,9 @@ declare const ToolkitRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
1631
2088
|
required: boolean;
|
|
1632
2089
|
displayName: string;
|
|
1633
2090
|
default?: string | null | undefined;
|
|
2091
|
+
isSecret?: boolean | undefined;
|
|
2092
|
+
legacyTemplateName?: string | undefined;
|
|
2093
|
+
userVisible?: boolean | undefined;
|
|
1634
2094
|
}[];
|
|
1635
2095
|
optional: {
|
|
1636
2096
|
name: string;
|
|
@@ -1639,6 +2099,9 @@ declare const ToolkitRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
1639
2099
|
required: boolean;
|
|
1640
2100
|
displayName: string;
|
|
1641
2101
|
default?: string | null | undefined;
|
|
2102
|
+
isSecret?: boolean | undefined;
|
|
2103
|
+
legacyTemplateName?: string | undefined;
|
|
2104
|
+
userVisible?: boolean | undefined;
|
|
1642
2105
|
}[];
|
|
1643
2106
|
};
|
|
1644
2107
|
connectedAccountInitiation: {
|
|
@@ -1649,6 +2112,9 @@ declare const ToolkitRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
1649
2112
|
required: boolean;
|
|
1650
2113
|
displayName: string;
|
|
1651
2114
|
default?: string | null | undefined;
|
|
2115
|
+
isSecret?: boolean | undefined;
|
|
2116
|
+
legacyTemplateName?: string | undefined;
|
|
2117
|
+
userVisible?: boolean | undefined;
|
|
1652
2118
|
}[];
|
|
1653
2119
|
optional: {
|
|
1654
2120
|
name: string;
|
|
@@ -1657,9 +2123,14 @@ declare const ToolkitRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
1657
2123
|
required: boolean;
|
|
1658
2124
|
displayName: string;
|
|
1659
2125
|
default?: string | null | undefined;
|
|
2126
|
+
isSecret?: boolean | undefined;
|
|
2127
|
+
legacyTemplateName?: string | undefined;
|
|
2128
|
+
userVisible?: boolean | undefined;
|
|
1660
2129
|
}[];
|
|
1661
2130
|
};
|
|
1662
2131
|
};
|
|
2132
|
+
authHintUrl?: string | null | undefined;
|
|
2133
|
+
requiredScopes?: string[] | undefined;
|
|
1663
2134
|
proxy?: {
|
|
1664
2135
|
baseUrl?: string | undefined;
|
|
1665
2136
|
} | undefined;
|
|
@@ -1713,12 +2184,338 @@ declare const ToolkitRetrieveCategoriesResponseSchema: z$1.ZodObject<{
|
|
|
1713
2184
|
}>;
|
|
1714
2185
|
type ToolkitCategory = z$1.infer<typeof ToolkitCategorySchema>;
|
|
1715
2186
|
type ToolkitRetrieveCategoriesResponse = z$1.infer<typeof ToolkitRetrieveCategoriesResponseSchema>;
|
|
2187
|
+
/**
|
|
2188
|
+
* Toolkit changelog response
|
|
2189
|
+
*/
|
|
2190
|
+
declare const ToolkitVersionChangelogSchema: z$1.ZodObject<{
|
|
2191
|
+
version: z$1.ZodString;
|
|
2192
|
+
changelog: z$1.ZodString;
|
|
2193
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
2194
|
+
version: string;
|
|
2195
|
+
changelog: string;
|
|
2196
|
+
}, {
|
|
2197
|
+
version: string;
|
|
2198
|
+
changelog: string;
|
|
2199
|
+
}>;
|
|
2200
|
+
declare const ToolkitChangelogItemSchema: z$1.ZodObject<{
|
|
2201
|
+
slug: z$1.ZodString;
|
|
2202
|
+
name: z$1.ZodString;
|
|
2203
|
+
displayName: z$1.ZodString;
|
|
2204
|
+
/** Most recent versions first; the API returns up to the last 10 per toolkit. */
|
|
2205
|
+
versions: z$1.ZodArray<z$1.ZodObject<{
|
|
2206
|
+
version: z$1.ZodString;
|
|
2207
|
+
changelog: z$1.ZodString;
|
|
2208
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
2209
|
+
version: string;
|
|
2210
|
+
changelog: string;
|
|
2211
|
+
}, {
|
|
2212
|
+
version: string;
|
|
2213
|
+
changelog: string;
|
|
2214
|
+
}>, "many">;
|
|
2215
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
2216
|
+
slug: string;
|
|
2217
|
+
name: string;
|
|
2218
|
+
displayName: string;
|
|
2219
|
+
versions: {
|
|
2220
|
+
version: string;
|
|
2221
|
+
changelog: string;
|
|
2222
|
+
}[];
|
|
2223
|
+
}, {
|
|
2224
|
+
slug: string;
|
|
2225
|
+
name: string;
|
|
2226
|
+
displayName: string;
|
|
2227
|
+
versions: {
|
|
2228
|
+
version: string;
|
|
2229
|
+
changelog: string;
|
|
2230
|
+
}[];
|
|
2231
|
+
}>;
|
|
2232
|
+
declare const ToolkitChangelogResponseSchema: z$1.ZodObject<{
|
|
2233
|
+
items: z$1.ZodArray<z$1.ZodObject<{
|
|
2234
|
+
slug: z$1.ZodString;
|
|
2235
|
+
name: z$1.ZodString;
|
|
2236
|
+
displayName: z$1.ZodString;
|
|
2237
|
+
/** Most recent versions first; the API returns up to the last 10 per toolkit. */
|
|
2238
|
+
versions: z$1.ZodArray<z$1.ZodObject<{
|
|
2239
|
+
version: z$1.ZodString;
|
|
2240
|
+
changelog: z$1.ZodString;
|
|
2241
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
2242
|
+
version: string;
|
|
2243
|
+
changelog: string;
|
|
2244
|
+
}, {
|
|
2245
|
+
version: string;
|
|
2246
|
+
changelog: string;
|
|
2247
|
+
}>, "many">;
|
|
2248
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
2249
|
+
slug: string;
|
|
2250
|
+
name: string;
|
|
2251
|
+
displayName: string;
|
|
2252
|
+
versions: {
|
|
2253
|
+
version: string;
|
|
2254
|
+
changelog: string;
|
|
2255
|
+
}[];
|
|
2256
|
+
}, {
|
|
2257
|
+
slug: string;
|
|
2258
|
+
name: string;
|
|
2259
|
+
displayName: string;
|
|
2260
|
+
versions: {
|
|
2261
|
+
version: string;
|
|
2262
|
+
changelog: string;
|
|
2263
|
+
}[];
|
|
2264
|
+
}>, "many">;
|
|
2265
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
2266
|
+
items: {
|
|
2267
|
+
slug: string;
|
|
2268
|
+
name: string;
|
|
2269
|
+
displayName: string;
|
|
2270
|
+
versions: {
|
|
2271
|
+
version: string;
|
|
2272
|
+
changelog: string;
|
|
2273
|
+
}[];
|
|
2274
|
+
}[];
|
|
2275
|
+
}, {
|
|
2276
|
+
items: {
|
|
2277
|
+
slug: string;
|
|
2278
|
+
name: string;
|
|
2279
|
+
displayName: string;
|
|
2280
|
+
versions: {
|
|
2281
|
+
version: string;
|
|
2282
|
+
changelog: string;
|
|
2283
|
+
}[];
|
|
2284
|
+
}[];
|
|
2285
|
+
}>;
|
|
2286
|
+
type ToolkitVersionChangelog = z$1.infer<typeof ToolkitVersionChangelogSchema>;
|
|
2287
|
+
type ToolkitChangelogItem = z$1.infer<typeof ToolkitChangelogItemSchema>;
|
|
2288
|
+
type ToolkitChangelogResponse = z$1.infer<typeof ToolkitChangelogResponseSchema>;
|
|
2289
|
+
/**
|
|
2290
|
+
* Params for `composio.toolkits.recommendScopes()`.
|
|
2291
|
+
* **Experimental — shape may change in future releases.**
|
|
2292
|
+
*/
|
|
2293
|
+
declare const ToolkitRecommendScopesParamsSchema: z$1.ZodObject<{
|
|
2294
|
+
/** Tool slugs to cover. Pass `[]` to cover every tool in the toolkit. */
|
|
2295
|
+
tools: z$1.ZodArray<z$1.ZodString, "many">;
|
|
2296
|
+
/** Auth scheme the connection will use. The API defaults to `OAUTH2`. */
|
|
2297
|
+
authScheme: z$1.ZodOptional<z$1.ZodEnum<["OAUTH2", "OAUTH1", "API_KEY", "BASIC", "BILLCOM_AUTH", "BEARER_TOKEN", "GOOGLE_SERVICE_ACCOUNT", "NO_AUTH", "BASIC_WITH_JWT", "CALCOM_AUTH", "SERVICE_ACCOUNT", "SAML", "DCR_OAUTH", "CIMD_OAUTH", "S2S_OAUTH2"]>>;
|
|
2298
|
+
/** Toolkit version to compute from. The API defaults to the latest published version. */
|
|
2299
|
+
toolkitVersion: z$1.ZodOptional<z$1.ZodString>;
|
|
2300
|
+
/**
|
|
2301
|
+
* Context the scopes will be granted in, as dimension → selected value,
|
|
2302
|
+
* for example `{ account_type: 'Google Workspace' }`. Discover the
|
|
2303
|
+
* dimensions with `composio.toolkits.listGrantContexts()`.
|
|
2304
|
+
*/
|
|
2305
|
+
grantContext: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
|
|
2306
|
+
/** Scopes the recommendation must include, whether or not the tools need them. */
|
|
2307
|
+
include: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString, "many">>;
|
|
2308
|
+
/** Scopes the recommendation must not include; the API picks documented alternatives or fails. */
|
|
2309
|
+
exclude: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString, "many">>;
|
|
2310
|
+
/** Scopes your OAuth app can request. The recommendation never goes outside this list. */
|
|
2311
|
+
availableScopes: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString, "many">>;
|
|
2312
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
2313
|
+
tools: string[];
|
|
2314
|
+
authScheme?: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "CIMD_OAUTH" | "S2S_OAUTH2" | undefined;
|
|
2315
|
+
exclude?: string[] | undefined;
|
|
2316
|
+
toolkitVersion?: string | undefined;
|
|
2317
|
+
grantContext?: Record<string, string> | undefined;
|
|
2318
|
+
include?: string[] | undefined;
|
|
2319
|
+
availableScopes?: string[] | undefined;
|
|
2320
|
+
}, {
|
|
2321
|
+
tools: string[];
|
|
2322
|
+
authScheme?: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "CIMD_OAUTH" | "S2S_OAUTH2" | undefined;
|
|
2323
|
+
exclude?: string[] | undefined;
|
|
2324
|
+
toolkitVersion?: string | undefined;
|
|
2325
|
+
grantContext?: Record<string, string> | undefined;
|
|
2326
|
+
include?: string[] | undefined;
|
|
2327
|
+
availableScopes?: string[] | undefined;
|
|
2328
|
+
}>;
|
|
2329
|
+
type ToolkitRecommendScopesParams = z$1.infer<typeof ToolkitRecommendScopesParamsSchema>;
|
|
2330
|
+
declare const ToolkitConditionalScopeSchema: z$1.ZodObject<{
|
|
2331
|
+
/** The scope needed only when the `when` guard matches. */
|
|
2332
|
+
scope: z$1.ZodString;
|
|
2333
|
+
/** Input field name → qualifying values. Any value matches within a field; all fields must match. */
|
|
2334
|
+
when: z$1.ZodRecord<z$1.ZodString, z$1.ZodArray<z$1.ZodString, "many">>;
|
|
2335
|
+
/** Tool slugs that need this scope under the guard. */
|
|
2336
|
+
for: z$1.ZodArray<z$1.ZodString, "many">;
|
|
2337
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
2338
|
+
scope: string;
|
|
2339
|
+
when: Record<string, string[]>;
|
|
2340
|
+
for: string[];
|
|
2341
|
+
}, {
|
|
2342
|
+
scope: string;
|
|
2343
|
+
when: Record<string, string[]>;
|
|
2344
|
+
for: string[];
|
|
2345
|
+
}>;
|
|
2346
|
+
type ToolkitConditionalScope = z$1.infer<typeof ToolkitConditionalScopeSchema>;
|
|
2347
|
+
/**
|
|
2348
|
+
* Response of `composio.toolkits.recommendScopes()`.
|
|
2349
|
+
* **Experimental — shape may change in future releases.**
|
|
2350
|
+
*/
|
|
2351
|
+
declare const ToolkitRecommendScopesResponseSchema: z$1.ZodObject<{
|
|
2352
|
+
/** Auth scheme the recommendation was computed under. */
|
|
2353
|
+
authScheme: z$1.ZodString;
|
|
2354
|
+
/** Concrete toolkit version the answer was computed from; pass it back as `toolkitVersion` to pin. */
|
|
2355
|
+
toolkitVersion: z$1.ZodString;
|
|
2356
|
+
/** The effective grant context: the toolkit default overlaid with your overrides. */
|
|
2357
|
+
grantContext: z$1.ZodRecord<z$1.ZodString, z$1.ZodString>;
|
|
2358
|
+
scopes: z$1.ZodObject<{
|
|
2359
|
+
/** Narrowest documented option per requirement. */
|
|
2360
|
+
leastPrivilege: z$1.ZodArray<z$1.ZodString, "many">;
|
|
2361
|
+
/** Smallest scope set covering all requirements. */
|
|
2362
|
+
fewest: z$1.ZodArray<z$1.ZodString, "many">;
|
|
2363
|
+
/**
|
|
2364
|
+
* Scopes needed only for particular call-time inputs. Both lists above
|
|
2365
|
+
* already include them, so a caller that knows its inputs may drop the rest.
|
|
2366
|
+
*/
|
|
2367
|
+
conditional: z$1.ZodArray<z$1.ZodObject<{
|
|
2368
|
+
/** The scope needed only when the `when` guard matches. */
|
|
2369
|
+
scope: z$1.ZodString;
|
|
2370
|
+
/** Input field name → qualifying values. Any value matches within a field; all fields must match. */
|
|
2371
|
+
when: z$1.ZodRecord<z$1.ZodString, z$1.ZodArray<z$1.ZodString, "many">>;
|
|
2372
|
+
/** Tool slugs that need this scope under the guard. */
|
|
2373
|
+
for: z$1.ZodArray<z$1.ZodString, "many">;
|
|
2374
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
2375
|
+
scope: string;
|
|
2376
|
+
when: Record<string, string[]>;
|
|
2377
|
+
for: string[];
|
|
2378
|
+
}, {
|
|
2379
|
+
scope: string;
|
|
2380
|
+
when: Record<string, string[]>;
|
|
2381
|
+
for: string[];
|
|
2382
|
+
}>, "many">;
|
|
2383
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
2384
|
+
leastPrivilege: string[];
|
|
2385
|
+
fewest: string[];
|
|
2386
|
+
conditional: {
|
|
2387
|
+
scope: string;
|
|
2388
|
+
when: Record<string, string[]>;
|
|
2389
|
+
for: string[];
|
|
2390
|
+
}[];
|
|
2391
|
+
}, {
|
|
2392
|
+
leastPrivilege: string[];
|
|
2393
|
+
fewest: string[];
|
|
2394
|
+
conditional: {
|
|
2395
|
+
scope: string;
|
|
2396
|
+
when: Record<string, string[]>;
|
|
2397
|
+
for: string[];
|
|
2398
|
+
}[];
|
|
2399
|
+
}>;
|
|
2400
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
2401
|
+
scopes: {
|
|
2402
|
+
leastPrivilege: string[];
|
|
2403
|
+
fewest: string[];
|
|
2404
|
+
conditional: {
|
|
2405
|
+
scope: string;
|
|
2406
|
+
when: Record<string, string[]>;
|
|
2407
|
+
for: string[];
|
|
2408
|
+
}[];
|
|
2409
|
+
};
|
|
2410
|
+
authScheme: string;
|
|
2411
|
+
toolkitVersion: string;
|
|
2412
|
+
grantContext: Record<string, string>;
|
|
2413
|
+
}, {
|
|
2414
|
+
scopes: {
|
|
2415
|
+
leastPrivilege: string[];
|
|
2416
|
+
fewest: string[];
|
|
2417
|
+
conditional: {
|
|
2418
|
+
scope: string;
|
|
2419
|
+
when: Record<string, string[]>;
|
|
2420
|
+
for: string[];
|
|
2421
|
+
}[];
|
|
2422
|
+
};
|
|
2423
|
+
authScheme: string;
|
|
2424
|
+
toolkitVersion: string;
|
|
2425
|
+
grantContext: Record<string, string>;
|
|
2426
|
+
}>;
|
|
2427
|
+
type ToolkitRecommendScopesResponse = z$1.infer<typeof ToolkitRecommendScopesResponseSchema>;
|
|
2428
|
+
/**
|
|
2429
|
+
* Params for `composio.toolkits.listGrantContexts()`.
|
|
2430
|
+
* **Experimental — shape may change in future releases.**
|
|
2431
|
+
*/
|
|
2432
|
+
declare const ToolkitListGrantContextsParamsSchema: z$1.ZodObject<{
|
|
2433
|
+
/** Auth scheme the connection will use. The API defaults to `OAUTH2`. */
|
|
2434
|
+
authScheme: z$1.ZodOptional<z$1.ZodEnum<["OAUTH2", "OAUTH1", "API_KEY", "BASIC", "BILLCOM_AUTH", "BEARER_TOKEN", "GOOGLE_SERVICE_ACCOUNT", "NO_AUTH", "BASIC_WITH_JWT", "CALCOM_AUTH", "SERVICE_ACCOUNT", "SAML", "DCR_OAUTH", "CIMD_OAUTH", "S2S_OAUTH2"]>>;
|
|
2435
|
+
/** Toolkit version to read the scope catalog from. The API defaults to the latest published version. */
|
|
2436
|
+
toolkitVersion: z$1.ZodOptional<z$1.ZodString>;
|
|
2437
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
2438
|
+
authScheme?: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "CIMD_OAUTH" | "S2S_OAUTH2" | undefined;
|
|
2439
|
+
toolkitVersion?: string | undefined;
|
|
2440
|
+
}, {
|
|
2441
|
+
authScheme?: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "CIMD_OAUTH" | "S2S_OAUTH2" | undefined;
|
|
2442
|
+
toolkitVersion?: string | undefined;
|
|
2443
|
+
}>;
|
|
2444
|
+
type ToolkitListGrantContextsParams = z$1.infer<typeof ToolkitListGrantContextsParamsSchema>;
|
|
2445
|
+
declare const ToolkitGrantContextDimensionSchema: z$1.ZodObject<{
|
|
2446
|
+
/** Dimension name to use as a `grantContext` key. */
|
|
2447
|
+
dimension: z$1.ZodString;
|
|
2448
|
+
/** What the dimension means and when to pass it. */
|
|
2449
|
+
description: z$1.ZodString;
|
|
2450
|
+
/** Values the dimension can take. */
|
|
2451
|
+
values: z$1.ZodArray<z$1.ZodString, "many">;
|
|
2452
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
2453
|
+
values: string[];
|
|
2454
|
+
description: string;
|
|
2455
|
+
dimension: string;
|
|
2456
|
+
}, {
|
|
2457
|
+
values: string[];
|
|
2458
|
+
description: string;
|
|
2459
|
+
dimension: string;
|
|
2460
|
+
}>;
|
|
2461
|
+
type ToolkitGrantContextDimension = z$1.infer<typeof ToolkitGrantContextDimensionSchema>;
|
|
2462
|
+
/**
|
|
2463
|
+
* Response of `composio.toolkits.listGrantContexts()`.
|
|
2464
|
+
* **Experimental — shape may change in future releases.**
|
|
2465
|
+
*/
|
|
2466
|
+
declare const ToolkitListGrantContextsResponseSchema: z$1.ZodObject<{
|
|
2467
|
+
/** Auth scheme whose scope catalog the dimensions were read from. */
|
|
2468
|
+
authScheme: z$1.ZodString;
|
|
2469
|
+
/** Concrete toolkit version the answer was computed from. */
|
|
2470
|
+
toolkitVersion: z$1.ZodString;
|
|
2471
|
+
/** Dimensions the toolkit accepts in `grantContext`; empty when no scope depends on one. */
|
|
2472
|
+
grantContextDimensions: z$1.ZodArray<z$1.ZodObject<{
|
|
2473
|
+
/** Dimension name to use as a `grantContext` key. */
|
|
2474
|
+
dimension: z$1.ZodString;
|
|
2475
|
+
/** What the dimension means and when to pass it. */
|
|
2476
|
+
description: z$1.ZodString;
|
|
2477
|
+
/** Values the dimension can take. */
|
|
2478
|
+
values: z$1.ZodArray<z$1.ZodString, "many">;
|
|
2479
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
2480
|
+
values: string[];
|
|
2481
|
+
description: string;
|
|
2482
|
+
dimension: string;
|
|
2483
|
+
}, {
|
|
2484
|
+
values: string[];
|
|
2485
|
+
description: string;
|
|
2486
|
+
dimension: string;
|
|
2487
|
+
}>, "many">;
|
|
2488
|
+
/** The grant context assumed when you pass none. */
|
|
2489
|
+
defaultGrantContext: z$1.ZodRecord<z$1.ZodString, z$1.ZodString>;
|
|
2490
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
2491
|
+
authScheme: string;
|
|
2492
|
+
toolkitVersion: string;
|
|
2493
|
+
grantContextDimensions: {
|
|
2494
|
+
values: string[];
|
|
2495
|
+
description: string;
|
|
2496
|
+
dimension: string;
|
|
2497
|
+
}[];
|
|
2498
|
+
defaultGrantContext: Record<string, string>;
|
|
2499
|
+
}, {
|
|
2500
|
+
authScheme: string;
|
|
2501
|
+
toolkitVersion: string;
|
|
2502
|
+
grantContextDimensions: {
|
|
2503
|
+
values: string[];
|
|
2504
|
+
description: string;
|
|
2505
|
+
dimension: string;
|
|
2506
|
+
}[];
|
|
2507
|
+
defaultGrantContext: Record<string, string>;
|
|
2508
|
+
}>;
|
|
2509
|
+
type ToolkitListGrantContextsResponse = z$1.infer<typeof ToolkitListGrantContextsResponseSchema>;
|
|
1716
2510
|
declare const ToolkitAuthFieldsResponseSchema: z$1.ZodArray<z$1.ZodObject<{
|
|
1717
2511
|
description: z$1.ZodString;
|
|
1718
2512
|
displayName: z$1.ZodString;
|
|
1719
2513
|
name: z$1.ZodString;
|
|
1720
2514
|
type: z$1.ZodString;
|
|
1721
2515
|
default: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
2516
|
+
isSecret: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
2517
|
+
legacyTemplateName: z$1.ZodOptional<z$1.ZodString>;
|
|
2518
|
+
userVisible: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
1722
2519
|
} & {
|
|
1723
2520
|
required: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
1724
2521
|
}, "strip", z$1.ZodTypeAny, {
|
|
@@ -1728,6 +2525,9 @@ declare const ToolkitAuthFieldsResponseSchema: z$1.ZodArray<z$1.ZodObject<{
|
|
|
1728
2525
|
displayName: string;
|
|
1729
2526
|
required?: boolean | undefined;
|
|
1730
2527
|
default?: string | null | undefined;
|
|
2528
|
+
isSecret?: boolean | undefined;
|
|
2529
|
+
legacyTemplateName?: string | undefined;
|
|
2530
|
+
userVisible?: boolean | undefined;
|
|
1731
2531
|
}, {
|
|
1732
2532
|
name: string;
|
|
1733
2533
|
type: string;
|
|
@@ -1735,6 +2535,9 @@ declare const ToolkitAuthFieldsResponseSchema: z$1.ZodArray<z$1.ZodObject<{
|
|
|
1735
2535
|
displayName: string;
|
|
1736
2536
|
required?: boolean | undefined;
|
|
1737
2537
|
default?: string | null | undefined;
|
|
2538
|
+
isSecret?: boolean | undefined;
|
|
2539
|
+
legacyTemplateName?: string | undefined;
|
|
2540
|
+
userVisible?: boolean | undefined;
|
|
1738
2541
|
}>, "many">;
|
|
1739
2542
|
type ToolkitAuthFieldsResponse = z$1.infer<typeof ToolkitAuthFieldsResponseSchema>;
|
|
1740
2543
|
//#endregion
|
|
@@ -1758,6 +2561,7 @@ declare const AuthSchemeTypes: {
|
|
|
1758
2561
|
readonly SERVICE_ACCOUNT: "SERVICE_ACCOUNT";
|
|
1759
2562
|
readonly SAML: "SAML";
|
|
1760
2563
|
readonly DCR_OAUTH: "DCR_OAUTH";
|
|
2564
|
+
readonly CIMD_OAUTH: "CIMD_OAUTH";
|
|
1761
2565
|
readonly S2S_OAUTH2: "S2S_OAUTH2";
|
|
1762
2566
|
};
|
|
1763
2567
|
type AuthSchemeType = (typeof AuthSchemeTypes)[keyof typeof AuthSchemeTypes];
|
|
@@ -1778,12 +2582,12 @@ declare const AuthConfigToolAccessConfigSchema: z$1.ZodObject<{
|
|
|
1778
2582
|
toolsForConnectedAccountCreation?: string[] | undefined;
|
|
1779
2583
|
toolsAvailableForExecution?: string[] | undefined;
|
|
1780
2584
|
}>;
|
|
1781
|
-
declare const AuthSchemeEnum: z$1.ZodEnum<["OAUTH2", "OAUTH1", "API_KEY", "BASIC", "BILLCOM_AUTH", "BEARER_TOKEN", "GOOGLE_SERVICE_ACCOUNT", "NO_AUTH", "BASIC_WITH_JWT", "CALCOM_AUTH", "SERVICE_ACCOUNT", "SAML", "DCR_OAUTH", "S2S_OAUTH2"]>;
|
|
2585
|
+
declare const AuthSchemeEnum: z$1.ZodEnum<["OAUTH2", "OAUTH1", "API_KEY", "BASIC", "BILLCOM_AUTH", "BEARER_TOKEN", "GOOGLE_SERVICE_ACCOUNT", "NO_AUTH", "BASIC_WITH_JWT", "CALCOM_AUTH", "SERVICE_ACCOUNT", "SAML", "DCR_OAUTH", "CIMD_OAUTH", "S2S_OAUTH2"]>;
|
|
1782
2586
|
declare const CreateCustomAuthConfigParamsSchema: z$1.ZodObject<{
|
|
1783
2587
|
type: z$1.ZodLiteral<"use_custom_auth">;
|
|
1784
2588
|
name: z$1.ZodOptional<z$1.ZodString>;
|
|
1785
2589
|
credentials: z$1.ZodRecord<z$1.ZodString, z$1.ZodUnion<[z$1.ZodString, z$1.ZodNumber, z$1.ZodBoolean]>>;
|
|
1786
|
-
authScheme: z$1.ZodEnum<["OAUTH2", "OAUTH1", "API_KEY", "BASIC", "BILLCOM_AUTH", "BEARER_TOKEN", "GOOGLE_SERVICE_ACCOUNT", "NO_AUTH", "BASIC_WITH_JWT", "CALCOM_AUTH", "SERVICE_ACCOUNT", "SAML", "DCR_OAUTH", "S2S_OAUTH2"]>;
|
|
2590
|
+
authScheme: z$1.ZodEnum<["OAUTH2", "OAUTH1", "API_KEY", "BASIC", "BILLCOM_AUTH", "BEARER_TOKEN", "GOOGLE_SERVICE_ACCOUNT", "NO_AUTH", "BASIC_WITH_JWT", "CALCOM_AUTH", "SERVICE_ACCOUNT", "SAML", "DCR_OAUTH", "CIMD_OAUTH", "S2S_OAUTH2"]>;
|
|
1787
2591
|
proxyConfig: z$1.ZodOptional<z$1.ZodObject<{
|
|
1788
2592
|
proxyUrl: z$1.ZodString;
|
|
1789
2593
|
proxyAuthKey: z$1.ZodOptional<z$1.ZodString>;
|
|
@@ -1804,7 +2608,7 @@ declare const CreateCustomAuthConfigParamsSchema: z$1.ZodObject<{
|
|
|
1804
2608
|
isEnabledForToolRouter: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
1805
2609
|
}, "strip", z$1.ZodTypeAny, {
|
|
1806
2610
|
type: "use_custom_auth";
|
|
1807
|
-
authScheme: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "S2S_OAUTH2";
|
|
2611
|
+
authScheme: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "CIMD_OAUTH" | "S2S_OAUTH2";
|
|
1808
2612
|
credentials: Record<string, string | number | boolean>;
|
|
1809
2613
|
name?: string | undefined;
|
|
1810
2614
|
proxyConfig?: {
|
|
@@ -1817,7 +2621,7 @@ declare const CreateCustomAuthConfigParamsSchema: z$1.ZodObject<{
|
|
|
1817
2621
|
isEnabledForToolRouter?: boolean | undefined;
|
|
1818
2622
|
}, {
|
|
1819
2623
|
type: "use_custom_auth";
|
|
1820
|
-
authScheme: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "S2S_OAUTH2";
|
|
2624
|
+
authScheme: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "CIMD_OAUTH" | "S2S_OAUTH2";
|
|
1821
2625
|
credentials: Record<string, string | number | boolean>;
|
|
1822
2626
|
name?: string | undefined;
|
|
1823
2627
|
proxyConfig?: {
|
|
@@ -1880,7 +2684,7 @@ declare const CreateAuthConfigParamsSchema: z$1.ZodDiscriminatedUnion<"type", [z
|
|
|
1880
2684
|
type: z$1.ZodLiteral<"use_custom_auth">;
|
|
1881
2685
|
name: z$1.ZodOptional<z$1.ZodString>;
|
|
1882
2686
|
credentials: z$1.ZodRecord<z$1.ZodString, z$1.ZodUnion<[z$1.ZodString, z$1.ZodNumber, z$1.ZodBoolean]>>;
|
|
1883
|
-
authScheme: z$1.ZodEnum<["OAUTH2", "OAUTH1", "API_KEY", "BASIC", "BILLCOM_AUTH", "BEARER_TOKEN", "GOOGLE_SERVICE_ACCOUNT", "NO_AUTH", "BASIC_WITH_JWT", "CALCOM_AUTH", "SERVICE_ACCOUNT", "SAML", "DCR_OAUTH", "S2S_OAUTH2"]>;
|
|
2687
|
+
authScheme: z$1.ZodEnum<["OAUTH2", "OAUTH1", "API_KEY", "BASIC", "BILLCOM_AUTH", "BEARER_TOKEN", "GOOGLE_SERVICE_ACCOUNT", "NO_AUTH", "BASIC_WITH_JWT", "CALCOM_AUTH", "SERVICE_ACCOUNT", "SAML", "DCR_OAUTH", "CIMD_OAUTH", "S2S_OAUTH2"]>;
|
|
1884
2688
|
proxyConfig: z$1.ZodOptional<z$1.ZodObject<{
|
|
1885
2689
|
proxyUrl: z$1.ZodString;
|
|
1886
2690
|
proxyAuthKey: z$1.ZodOptional<z$1.ZodString>;
|
|
@@ -1901,7 +2705,7 @@ declare const CreateAuthConfigParamsSchema: z$1.ZodDiscriminatedUnion<"type", [z
|
|
|
1901
2705
|
isEnabledForToolRouter: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
1902
2706
|
}, "strip", z$1.ZodTypeAny, {
|
|
1903
2707
|
type: "use_custom_auth";
|
|
1904
|
-
authScheme: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "S2S_OAUTH2";
|
|
2708
|
+
authScheme: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "CIMD_OAUTH" | "S2S_OAUTH2";
|
|
1905
2709
|
credentials: Record<string, string | number | boolean>;
|
|
1906
2710
|
name?: string | undefined;
|
|
1907
2711
|
proxyConfig?: {
|
|
@@ -1914,7 +2718,7 @@ declare const CreateAuthConfigParamsSchema: z$1.ZodDiscriminatedUnion<"type", [z
|
|
|
1914
2718
|
isEnabledForToolRouter?: boolean | undefined;
|
|
1915
2719
|
}, {
|
|
1916
2720
|
type: "use_custom_auth";
|
|
1917
|
-
authScheme: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "S2S_OAUTH2";
|
|
2721
|
+
authScheme: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "CIMD_OAUTH" | "S2S_OAUTH2";
|
|
1918
2722
|
credentials: Record<string, string | number | boolean>;
|
|
1919
2723
|
name?: string | undefined;
|
|
1920
2724
|
proxyConfig?: {
|
|
@@ -2002,7 +2806,7 @@ declare const AuthConfigRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
2002
2806
|
}>;
|
|
2003
2807
|
noOfConnections: z$1.ZodNumber;
|
|
2004
2808
|
status: z$1.ZodEnum<["ENABLED", "DISABLED"]>;
|
|
2005
|
-
authScheme: z$1.ZodOptional<z$1.ZodEnum<["OAUTH2", "OAUTH1", "API_KEY", "BASIC", "BILLCOM_AUTH", "BEARER_TOKEN", "GOOGLE_SERVICE_ACCOUNT", "NO_AUTH", "BASIC_WITH_JWT", "CALCOM_AUTH", "SERVICE_ACCOUNT", "SAML", "DCR_OAUTH", "S2S_OAUTH2"]>>;
|
|
2809
|
+
authScheme: z$1.ZodOptional<z$1.ZodEnum<["OAUTH2", "OAUTH1", "API_KEY", "BASIC", "BILLCOM_AUTH", "BEARER_TOKEN", "GOOGLE_SERVICE_ACCOUNT", "NO_AUTH", "BASIC_WITH_JWT", "CALCOM_AUTH", "SERVICE_ACCOUNT", "SAML", "DCR_OAUTH", "CIMD_OAUTH", "S2S_OAUTH2"]>>;
|
|
2006
2810
|
credentials: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
|
|
2007
2811
|
expectedInputFields: z$1.ZodOptional<z$1.ZodArray<z$1.ZodUnknown, "many">>;
|
|
2008
2812
|
isEnabledForToolRouter: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
@@ -2033,7 +2837,7 @@ declare const AuthConfigRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
2033
2837
|
};
|
|
2034
2838
|
id: string;
|
|
2035
2839
|
noOfConnections: number;
|
|
2036
|
-
authScheme?: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "S2S_OAUTH2" | undefined;
|
|
2840
|
+
authScheme?: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "CIMD_OAUTH" | "S2S_OAUTH2" | undefined;
|
|
2037
2841
|
createdAt?: string | undefined;
|
|
2038
2842
|
isComposioManaged?: boolean | undefined;
|
|
2039
2843
|
credentials?: Record<string, unknown> | undefined;
|
|
@@ -2055,7 +2859,7 @@ declare const AuthConfigRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
2055
2859
|
};
|
|
2056
2860
|
id: string;
|
|
2057
2861
|
noOfConnections: number;
|
|
2058
|
-
authScheme?: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "S2S_OAUTH2" | undefined;
|
|
2862
|
+
authScheme?: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "CIMD_OAUTH" | "S2S_OAUTH2" | undefined;
|
|
2059
2863
|
createdAt?: string | undefined;
|
|
2060
2864
|
isComposioManaged?: boolean | undefined;
|
|
2061
2865
|
credentials?: Record<string, unknown> | undefined;
|
|
@@ -2109,7 +2913,7 @@ declare const AuthConfigListResponseSchema: z$1.ZodObject<{
|
|
|
2109
2913
|
}>;
|
|
2110
2914
|
noOfConnections: z$1.ZodNumber;
|
|
2111
2915
|
status: z$1.ZodEnum<["ENABLED", "DISABLED"]>;
|
|
2112
|
-
authScheme: z$1.ZodOptional<z$1.ZodEnum<["OAUTH2", "OAUTH1", "API_KEY", "BASIC", "BILLCOM_AUTH", "BEARER_TOKEN", "GOOGLE_SERVICE_ACCOUNT", "NO_AUTH", "BASIC_WITH_JWT", "CALCOM_AUTH", "SERVICE_ACCOUNT", "SAML", "DCR_OAUTH", "S2S_OAUTH2"]>>;
|
|
2916
|
+
authScheme: z$1.ZodOptional<z$1.ZodEnum<["OAUTH2", "OAUTH1", "API_KEY", "BASIC", "BILLCOM_AUTH", "BEARER_TOKEN", "GOOGLE_SERVICE_ACCOUNT", "NO_AUTH", "BASIC_WITH_JWT", "CALCOM_AUTH", "SERVICE_ACCOUNT", "SAML", "DCR_OAUTH", "CIMD_OAUTH", "S2S_OAUTH2"]>>;
|
|
2113
2917
|
credentials: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
|
|
2114
2918
|
expectedInputFields: z$1.ZodOptional<z$1.ZodArray<z$1.ZodUnknown, "many">>;
|
|
2115
2919
|
isEnabledForToolRouter: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
@@ -2140,7 +2944,7 @@ declare const AuthConfigListResponseSchema: z$1.ZodObject<{
|
|
|
2140
2944
|
};
|
|
2141
2945
|
id: string;
|
|
2142
2946
|
noOfConnections: number;
|
|
2143
|
-
authScheme?: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "S2S_OAUTH2" | undefined;
|
|
2947
|
+
authScheme?: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "CIMD_OAUTH" | "S2S_OAUTH2" | undefined;
|
|
2144
2948
|
createdAt?: string | undefined;
|
|
2145
2949
|
isComposioManaged?: boolean | undefined;
|
|
2146
2950
|
credentials?: Record<string, unknown> | undefined;
|
|
@@ -2162,7 +2966,7 @@ declare const AuthConfigListResponseSchema: z$1.ZodObject<{
|
|
|
2162
2966
|
};
|
|
2163
2967
|
id: string;
|
|
2164
2968
|
noOfConnections: number;
|
|
2165
|
-
authScheme?: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "S2S_OAUTH2" | undefined;
|
|
2969
|
+
authScheme?: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "CIMD_OAUTH" | "S2S_OAUTH2" | undefined;
|
|
2166
2970
|
createdAt?: string | undefined;
|
|
2167
2971
|
isComposioManaged?: boolean | undefined;
|
|
2168
2972
|
credentials?: Record<string, unknown> | undefined;
|
|
@@ -2188,7 +2992,7 @@ declare const AuthConfigListResponseSchema: z$1.ZodObject<{
|
|
|
2188
2992
|
};
|
|
2189
2993
|
id: string;
|
|
2190
2994
|
noOfConnections: number;
|
|
2191
|
-
authScheme?: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "S2S_OAUTH2" | undefined;
|
|
2995
|
+
authScheme?: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "CIMD_OAUTH" | "S2S_OAUTH2" | undefined;
|
|
2192
2996
|
createdAt?: string | undefined;
|
|
2193
2997
|
isComposioManaged?: boolean | undefined;
|
|
2194
2998
|
credentials?: Record<string, unknown> | undefined;
|
|
@@ -2214,7 +3018,7 @@ declare const AuthConfigListResponseSchema: z$1.ZodObject<{
|
|
|
2214
3018
|
};
|
|
2215
3019
|
id: string;
|
|
2216
3020
|
noOfConnections: number;
|
|
2217
|
-
authScheme?: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "S2S_OAUTH2" | undefined;
|
|
3021
|
+
authScheme?: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "CIMD_OAUTH" | "S2S_OAUTH2" | undefined;
|
|
2218
3022
|
createdAt?: string | undefined;
|
|
2219
3023
|
isComposioManaged?: boolean | undefined;
|
|
2220
3024
|
credentials?: Record<string, unknown> | undefined;
|
|
@@ -2486,6 +3290,87 @@ declare class Toolkits {
|
|
|
2486
3290
|
* ```
|
|
2487
3291
|
*/
|
|
2488
3292
|
get(query?: ToolkitListParams, requestOptions?: ComposioRequestOptions): Promise<ToolKitListResponse>;
|
|
3293
|
+
/**
|
|
3294
|
+
* Retrieves several toolkits by slug in a single request.
|
|
3295
|
+
*
|
|
3296
|
+
* Returns the same transformed shape as `composio.toolkits.get({ ... })`.
|
|
3297
|
+
* Unknown slugs are simply absent from the result.
|
|
3298
|
+
*
|
|
3299
|
+
* @param {string[]} slugs - The toolkit slugs to retrieve (at least one)
|
|
3300
|
+
* @param {ToolkitGetManyParams} [params] - Optional filters and pagination, as for `list`
|
|
3301
|
+
* @returns {Promise<ToolKitListResponse>} The matching toolkits
|
|
3302
|
+
* @throws {ValidationError} If `slugs` is empty or the params fail validation
|
|
3303
|
+
* @throws {ComposioToolkitFetchError} If the request fails
|
|
3304
|
+
*
|
|
3305
|
+
* @example
|
|
3306
|
+
* ```typescript
|
|
3307
|
+
* const toolkits = await composio.toolkits.getMany(['github', 'slack']);
|
|
3308
|
+
* console.log(toolkits.map(toolkit => toolkit.name)); // ['GitHub', 'Slack']
|
|
3309
|
+
* ```
|
|
3310
|
+
*/
|
|
3311
|
+
getMany(slugs: string[], params?: ToolkitGetManyParams, requestOptions?: ComposioRequestOptions): Promise<ToolKitListResponse>;
|
|
3312
|
+
/**
|
|
3313
|
+
* Retrieves the version changelog of every toolkit (the last 10 versions
|
|
3314
|
+
* per toolkit).
|
|
3315
|
+
*
|
|
3316
|
+
* @returns {Promise<ToolkitChangelogResponse>} Toolkits with their recent version changelogs
|
|
3317
|
+
*
|
|
3318
|
+
* @example
|
|
3319
|
+
* ```typescript
|
|
3320
|
+
* const { items } = await composio.toolkits.changelog();
|
|
3321
|
+
* const github = items.find(item => item.slug === 'github');
|
|
3322
|
+
* console.log(github?.versions[0]); // { version: '20250909_00', changelog: '...' }
|
|
3323
|
+
* ```
|
|
3324
|
+
*/
|
|
3325
|
+
changelog(requestOptions?: ComposioRequestOptions): Promise<ToolkitChangelogResponse>;
|
|
3326
|
+
/**
|
|
3327
|
+
* Recommends the OAuth scopes to request so a connection can run the given
|
|
3328
|
+
* tools.
|
|
3329
|
+
* **Experimental — the API marks this endpoint beta; shape may change.**
|
|
3330
|
+
*
|
|
3331
|
+
* The answer comes in two variants: `leastPrivilege` (narrowest documented
|
|
3332
|
+
* scope per requirement) and `fewest` (smallest set covering everything).
|
|
3333
|
+
* Pass `toolkitVersion` from a previous answer to pin the computation.
|
|
3334
|
+
*
|
|
3335
|
+
* @param {string} toolkitSlug - The toolkit to recommend scopes for
|
|
3336
|
+
* @param {ToolkitRecommendScopesParams} params - Tools to cover (`[]` for the whole toolkit), auth scheme, grant context and scope constraints
|
|
3337
|
+
* @returns {Promise<ToolkitRecommendScopesResponse>} The recommended scope sets
|
|
3338
|
+
* @throws {ValidationError} If the params fail validation
|
|
3339
|
+
*
|
|
3340
|
+
* @example
|
|
3341
|
+
* ```typescript
|
|
3342
|
+
* const { scopes } = await composio.toolkits.recommendScopes('gmail', {
|
|
3343
|
+
* tools: ['GMAIL_SEND_EMAIL', 'GMAIL_FETCH_EMAILS'],
|
|
3344
|
+
* });
|
|
3345
|
+
* console.log(scopes.leastPrivilege);
|
|
3346
|
+
* ```
|
|
3347
|
+
*/
|
|
3348
|
+
recommendScopes(toolkitSlug: string, params: ToolkitRecommendScopesParams, requestOptions?: ComposioRequestOptions): Promise<ToolkitRecommendScopesResponse>;
|
|
3349
|
+
/**
|
|
3350
|
+
* Lists the grant-context dimensions a toolkit's scope recommendation
|
|
3351
|
+
* depends on (for example the Google account type), with their allowed
|
|
3352
|
+
* values and the default the API assumes.
|
|
3353
|
+
* **Experimental — the API marks this endpoint beta; shape may change.**
|
|
3354
|
+
*
|
|
3355
|
+
* Pass a dimension and a value as `grantContext` to
|
|
3356
|
+
* `composio.toolkits.recommendScopes()` to tailor the recommendation.
|
|
3357
|
+
*
|
|
3358
|
+
* @param {string} toolkitSlug - The toolkit to list grant contexts for
|
|
3359
|
+
* @param {ToolkitListGrantContextsParams} [params] - Optional auth scheme and toolkit version
|
|
3360
|
+
* @returns {Promise<ToolkitListGrantContextsResponse>} The dimensions and the default grant context
|
|
3361
|
+
* @throws {ValidationError} If the params fail validation
|
|
3362
|
+
*
|
|
3363
|
+
* @example
|
|
3364
|
+
* ```typescript
|
|
3365
|
+
* const { grantContextDimensions } = await composio.toolkits.listGrantContexts('gmail');
|
|
3366
|
+
* const [accountType] = grantContextDimensions;
|
|
3367
|
+
* const { scopes } = await composio.toolkits.recommendScopes('gmail', {
|
|
3368
|
+
* tools: ['GMAIL_SEND_EMAIL'],
|
|
3369
|
+
* grantContext: { [accountType.dimension]: accountType.values[0] },
|
|
3370
|
+
* });
|
|
3371
|
+
* ```
|
|
3372
|
+
*/
|
|
3373
|
+
listGrantContexts(toolkitSlug: string, params?: ToolkitListGrantContextsParams, requestOptions?: ComposioRequestOptions): Promise<ToolkitListGrantContextsResponse>;
|
|
2489
3374
|
private getAuthConfigFields;
|
|
2490
3375
|
/**
|
|
2491
3376
|
* Retrieves the fields required for creating an auth config for a toolkit.
|
|
@@ -2716,9 +3601,9 @@ type TriggerInstanceUpsertResponse = z$1.infer<typeof TriggerInstanceUpsertRespo
|
|
|
2716
3601
|
declare const TriggerInstanceManageUpdateParamsSchema: z$1.ZodObject<{
|
|
2717
3602
|
status: z$1.ZodEnum<["enable", "disable"]>;
|
|
2718
3603
|
}, "strip", z$1.ZodTypeAny, {
|
|
2719
|
-
status: "
|
|
3604
|
+
status: "enable" | "disable";
|
|
2720
3605
|
}, {
|
|
2721
|
-
status: "
|
|
3606
|
+
status: "enable" | "disable";
|
|
2722
3607
|
}>;
|
|
2723
3608
|
type TriggerInstanceManageUpdateParams = z$1.infer<typeof TriggerInstanceManageUpdateParamsSchema>;
|
|
2724
3609
|
declare const TriggerInstanceManageUpdateResponseSchema: z$1.ZodObject<{
|
|
@@ -3534,6 +4419,10 @@ declare class Triggers<TProvider extends BaseComposioProvider<unknown, unknown,
|
|
|
3534
4419
|
*
|
|
3535
4420
|
* @param fn - The function to call when a trigger is received
|
|
3536
4421
|
* @param filters - The filters to apply to the triggers
|
|
4422
|
+
* @param onSubscriptionError - Optional callback invoked with the raw Pusher payload when
|
|
4423
|
+
* the underlying subscription fails (for example on auth or permission rejection). The
|
|
4424
|
+
* subscribe promise still resolves; this is the only programmatic signal of the failure.
|
|
4425
|
+
* Errors thrown from — or promises rejected by — the callback are contained and logged.
|
|
3537
4426
|
*
|
|
3538
4427
|
* @example
|
|
3539
4428
|
* ```ts
|
|
@@ -3543,7 +4432,7 @@ declare class Triggers<TProvider extends BaseComposioProvider<unknown, unknown,
|
|
|
3543
4432
|
* }, );
|
|
3544
4433
|
* ```
|
|
3545
4434
|
*/
|
|
3546
|
-
subscribe(fn: (_data: IncomingTriggerPayload) => void, filters?: TriggerSubscribeParams): Promise<void>;
|
|
4435
|
+
subscribe(fn: (_data: IncomingTriggerPayload) => void, filters?: TriggerSubscribeParams, onSubscriptionError?: (data: Record<string, unknown>) => void): Promise<void>;
|
|
3547
4436
|
/**
|
|
3548
4437
|
* Tries to parse data as V1, V2, or V3 webhook payload format.
|
|
3549
4438
|
* Returns the parsed result with version info, or null if no format matches.
|
|
@@ -4135,8 +5024,62 @@ declare class ConnectedAccounts {
|
|
|
4135
5024
|
* // Refresh a connected account's credentials
|
|
4136
5025
|
* const refreshedAccount = await composio.connectedAccounts.refresh('conn_abc123');
|
|
4137
5026
|
* ```
|
|
5027
|
+
*
|
|
5028
|
+
* @deprecated The `POST /connected_accounts/{id}/refresh` endpoint is deprecated by the
|
|
5029
|
+
* Composio API. Re-initiate authentication instead: `composio.connectedAccounts.link(userId, authConfigId)`
|
|
5030
|
+
* for a fresh connection, or `session.authorize(toolkit)` from a session. Behaviour is unchanged
|
|
5031
|
+
* while the endpoint remains available; do not generate new code against `refresh`.
|
|
4138
5032
|
*/
|
|
4139
5033
|
refresh(nanoid: string, options?: ConnectedAccountRefreshOptions, requestOptions?: ComposioRequestOptions): Promise<ConnectedAccountRefreshResponse>;
|
|
5034
|
+
/**
|
|
5035
|
+
* Revoke a connected account at the upstream provider.
|
|
5036
|
+
*
|
|
5037
|
+
* Best-effort upstream revocation of the stored tokens/credentials; on
|
|
5038
|
+
* success the connection status becomes `REVOKED`. Revoking an already
|
|
5039
|
+
* revoked connection returns an empty `revokedTokens` list without an
|
|
5040
|
+
* upstream call.
|
|
5041
|
+
*
|
|
5042
|
+
* @param {string} nanoid - The unique identifier of the connected account to revoke
|
|
5043
|
+
* @returns {Promise<ConnectedAccountRevokeResponse>} Which tokens were revoked and the resulting status
|
|
5044
|
+
* @throws {ComposioConnectedAccountRevocationNotSupportedError} If the toolkit does not support programmatic revocation (400)
|
|
5045
|
+
* @throws {ComposioConnectedAccountNotRevokableError} If the connection is not in a revokable state (409)
|
|
5046
|
+
*
|
|
5047
|
+
* @example
|
|
5048
|
+
* ```typescript
|
|
5049
|
+
* const result = await composio.connectedAccounts.revoke('conn_abc123');
|
|
5050
|
+
* console.log(result.connectedAccount.status); // 'REVOKED'
|
|
5051
|
+
* console.log(result.revokedTokens); // e.g. ['access_token', 'refresh_token']
|
|
5052
|
+
* ```
|
|
5053
|
+
*/
|
|
5054
|
+
revoke(nanoid: string, requestOptions?: ComposioRequestOptions): Promise<ConnectedAccountRevokeResponse>;
|
|
5055
|
+
/**
|
|
5056
|
+
* Complete a deferred OAuth connection once you have verified the user's
|
|
5057
|
+
* identity.
|
|
5058
|
+
*
|
|
5059
|
+
* When your project has an OAuth callback verifier configured, Composio
|
|
5060
|
+
* does not activate a new OAuth connection by itself: it redirects to your
|
|
5061
|
+
* verifier with a single-use session URI. After confirming who the user is,
|
|
5062
|
+
* redeem that session URI here; Composio checks that your project owns the
|
|
5063
|
+
* pending connection and that `userId` is its owner, completes the token
|
|
5064
|
+
* exchange, and the connection becomes `ACTIVE`.
|
|
5065
|
+
*
|
|
5066
|
+
* The session URI is single-use: redeeming it twice, or after it expires,
|
|
5067
|
+
* fails with a 404 from the API.
|
|
5068
|
+
*
|
|
5069
|
+
* @param {ConnectedAccountCompleteAuthParams} params - `userId` the connection was initiated for and the verifier's `sessionUri`
|
|
5070
|
+
* @returns {Promise<ConnectedAccountCompleteAuthResponse>} The completed connection's ID and toolkit
|
|
5071
|
+
* @throws {ValidationError} If the params fail validation
|
|
5072
|
+
*
|
|
5073
|
+
* @example
|
|
5074
|
+
* ```typescript
|
|
5075
|
+
* // In your verifier route, after authenticating the user:
|
|
5076
|
+
* const { connectedAccountId, toolkitSlug } = await composio.connectedAccounts.completeAuth({
|
|
5077
|
+
* userId: 'user_123',
|
|
5078
|
+
* sessionUri, // the session URI from the verifier redirect
|
|
5079
|
+
* });
|
|
5080
|
+
* ```
|
|
5081
|
+
*/
|
|
5082
|
+
completeAuth(params: ConnectedAccountCompleteAuthParams, requestOptions?: ComposioRequestOptions): Promise<ConnectedAccountCompleteAuthResponse>;
|
|
4140
5083
|
/**
|
|
4141
5084
|
* Update the status of a connected account
|
|
4142
5085
|
* @param {string} nanoid - Unique identifier of the connected account
|
|
@@ -4239,21 +5182,692 @@ declare class ConnectedAccounts {
|
|
|
4239
5182
|
update(nanoid: string, params: UpdateConnectedAccountParams, requestOptions?: ComposioRequestOptions): Promise<ConnectedAccountUpdateStatusResponse>;
|
|
4240
5183
|
}
|
|
4241
5184
|
//#endregion
|
|
4242
|
-
//#region src/
|
|
4243
|
-
|
|
5185
|
+
//#region src/types/usage.types.d.ts
|
|
5186
|
+
/**
|
|
5187
|
+
* Filters shared by the usage summary and breakdown queries.
|
|
5188
|
+
* **Experimental — shape may change in future releases.**
|
|
5189
|
+
*/
|
|
5190
|
+
declare const UsageFiltersSchema: z$1.ZodObject<{
|
|
5191
|
+
/** Only count events for these external end-user IDs (OR logic). */
|
|
5192
|
+
userId: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodArray<z$1.ZodString, "many">>>;
|
|
5193
|
+
/** Only count events for these session IDs (OR logic). */
|
|
5194
|
+
sessionId: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodArray<z$1.ZodString, "many">>>;
|
|
5195
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
5196
|
+
userId?: string[] | null | undefined;
|
|
5197
|
+
sessionId?: string[] | null | undefined;
|
|
5198
|
+
}, {
|
|
5199
|
+
userId?: string[] | null | undefined;
|
|
5200
|
+
sessionId?: string[] | null | undefined;
|
|
5201
|
+
}>;
|
|
5202
|
+
type UsageFilters = z$1.infer<typeof UsageFiltersSchema>;
|
|
5203
|
+
/**
|
|
5204
|
+
* Params for `composio.experimental.usage.summary()`.
|
|
5205
|
+
* **Experimental — shape may change in future releases.**
|
|
5206
|
+
*/
|
|
5207
|
+
declare const UsageSummaryParamsSchema: z$1.ZodObject<{
|
|
5208
|
+
/** Inclusive range start (Unix epoch milliseconds). Defaults to 30 days before `to`. */
|
|
5209
|
+
from: z$1.ZodOptional<z$1.ZodNumber>;
|
|
5210
|
+
/** Exclusive range end (Unix epoch milliseconds). Defaults to now. */
|
|
5211
|
+
to: z$1.ZodOptional<z$1.ZodNumber>;
|
|
5212
|
+
/** Restrict to these metering entity types. Omit for all types. */
|
|
5213
|
+
entityTypes: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString, "many">>;
|
|
5214
|
+
filters: z$1.ZodOptional<z$1.ZodObject<{
|
|
5215
|
+
/** Only count events for these external end-user IDs (OR logic). */
|
|
5216
|
+
userId: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodArray<z$1.ZodString, "many">>>;
|
|
5217
|
+
/** Only count events for these session IDs (OR logic). */
|
|
5218
|
+
sessionId: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodArray<z$1.ZodString, "many">>>;
|
|
5219
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
5220
|
+
userId?: string[] | null | undefined;
|
|
5221
|
+
sessionId?: string[] | null | undefined;
|
|
5222
|
+
}, {
|
|
5223
|
+
userId?: string[] | null | undefined;
|
|
5224
|
+
sessionId?: string[] | null | undefined;
|
|
5225
|
+
}>>;
|
|
5226
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
5227
|
+
from?: number | undefined;
|
|
5228
|
+
to?: number | undefined;
|
|
5229
|
+
filters?: {
|
|
5230
|
+
userId?: string[] | null | undefined;
|
|
5231
|
+
sessionId?: string[] | null | undefined;
|
|
5232
|
+
} | undefined;
|
|
5233
|
+
entityTypes?: string[] | undefined;
|
|
5234
|
+
}, {
|
|
5235
|
+
from?: number | undefined;
|
|
5236
|
+
to?: number | undefined;
|
|
5237
|
+
filters?: {
|
|
5238
|
+
userId?: string[] | null | undefined;
|
|
5239
|
+
sessionId?: string[] | null | undefined;
|
|
5240
|
+
} | undefined;
|
|
5241
|
+
entityTypes?: string[] | undefined;
|
|
5242
|
+
}>;
|
|
5243
|
+
type UsageSummaryParams = z$1.infer<typeof UsageSummaryParamsSchema>;
|
|
5244
|
+
declare const UsageOrderBySchema: z$1.ZodEnum<["key", "total_quantity", "event_count"]>;
|
|
5245
|
+
declare const UsageOrderDirectionSchema: z$1.ZodEnum<["asc", "desc"]>;
|
|
5246
|
+
/**
|
|
5247
|
+
* Params for `composio.experimental.usage.breakdown()`.
|
|
5248
|
+
* **Experimental — shape may change in future releases.**
|
|
5249
|
+
*/
|
|
5250
|
+
declare const UsageBreakdownParamsSchema: z$1.ZodObject<{
|
|
5251
|
+
/** Inclusive range start (Unix epoch milliseconds). Defaults to 30 days before `to`. */
|
|
5252
|
+
from: z$1.ZodOptional<z$1.ZodNumber>;
|
|
5253
|
+
/** Exclusive range end (Unix epoch milliseconds). Defaults to now. */
|
|
5254
|
+
to: z$1.ZodOptional<z$1.ZodNumber>;
|
|
5255
|
+
/** Dimension to group by. Defaults to `tool_slug` for tool_calls and `user_id` for sessions. */
|
|
5256
|
+
groupBy: z$1.ZodOptional<z$1.ZodString>;
|
|
5257
|
+
/** Field to order groups by. Defaults to `total_quantity`. */
|
|
5258
|
+
orderBy: z$1.ZodOptional<z$1.ZodEnum<["key", "total_quantity", "event_count"]>>;
|
|
5259
|
+
/** Sort direction. Defaults to `desc`. */
|
|
5260
|
+
orderDirection: z$1.ZodOptional<z$1.ZodEnum<["asc", "desc"]>>;
|
|
5261
|
+
/** Maximum number of groups to return. Defaults to 100, max 1000. */
|
|
5262
|
+
limit: z$1.ZodOptional<z$1.ZodNumber>;
|
|
5263
|
+
filters: z$1.ZodOptional<z$1.ZodObject<{
|
|
5264
|
+
/** Only count events for these external end-user IDs (OR logic). */
|
|
5265
|
+
userId: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodArray<z$1.ZodString, "many">>>;
|
|
5266
|
+
/** Only count events for these session IDs (OR logic). */
|
|
5267
|
+
sessionId: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodArray<z$1.ZodString, "many">>>;
|
|
5268
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
5269
|
+
userId?: string[] | null | undefined;
|
|
5270
|
+
sessionId?: string[] | null | undefined;
|
|
5271
|
+
}, {
|
|
5272
|
+
userId?: string[] | null | undefined;
|
|
5273
|
+
sessionId?: string[] | null | undefined;
|
|
5274
|
+
}>>;
|
|
5275
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
5276
|
+
limit?: number | undefined;
|
|
5277
|
+
orderBy?: "key" | "total_quantity" | "event_count" | undefined;
|
|
5278
|
+
from?: number | undefined;
|
|
5279
|
+
to?: number | undefined;
|
|
5280
|
+
filters?: {
|
|
5281
|
+
userId?: string[] | null | undefined;
|
|
5282
|
+
sessionId?: string[] | null | undefined;
|
|
5283
|
+
} | undefined;
|
|
5284
|
+
groupBy?: string | undefined;
|
|
5285
|
+
orderDirection?: "asc" | "desc" | undefined;
|
|
5286
|
+
}, {
|
|
5287
|
+
limit?: number | undefined;
|
|
5288
|
+
orderBy?: "key" | "total_quantity" | "event_count" | undefined;
|
|
5289
|
+
from?: number | undefined;
|
|
5290
|
+
to?: number | undefined;
|
|
5291
|
+
filters?: {
|
|
5292
|
+
userId?: string[] | null | undefined;
|
|
5293
|
+
sessionId?: string[] | null | undefined;
|
|
5294
|
+
} | undefined;
|
|
5295
|
+
groupBy?: string | undefined;
|
|
5296
|
+
orderDirection?: "asc" | "desc" | undefined;
|
|
5297
|
+
}>;
|
|
5298
|
+
type UsageBreakdownParams = z$1.infer<typeof UsageBreakdownParamsSchema>;
|
|
5299
|
+
declare const UsageEntitySummarySchema: z$1.ZodObject<{
|
|
5300
|
+
unit: z$1.ZodString;
|
|
5301
|
+
totalQuantity: z$1.ZodString;
|
|
5302
|
+
eventCount: z$1.ZodNumber;
|
|
5303
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
5304
|
+
unit: string;
|
|
5305
|
+
totalQuantity: string;
|
|
5306
|
+
eventCount: number;
|
|
5307
|
+
}, {
|
|
5308
|
+
unit: string;
|
|
5309
|
+
totalQuantity: string;
|
|
5310
|
+
eventCount: number;
|
|
5311
|
+
}>;
|
|
5312
|
+
type UsageEntitySummary = z$1.infer<typeof UsageEntitySummarySchema>;
|
|
5313
|
+
declare const UsageSummaryResponseSchema: z$1.ZodObject<{
|
|
5314
|
+
/** Aggregates keyed by metering entity type (e.g. `tool_calls`, `sessions`). */
|
|
5315
|
+
entities: z$1.ZodRecord<z$1.ZodString, z$1.ZodObject<{
|
|
5316
|
+
unit: z$1.ZodString;
|
|
5317
|
+
totalQuantity: z$1.ZodString;
|
|
5318
|
+
eventCount: z$1.ZodNumber;
|
|
5319
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
5320
|
+
unit: string;
|
|
5321
|
+
totalQuantity: string;
|
|
5322
|
+
eventCount: number;
|
|
5323
|
+
}, {
|
|
5324
|
+
unit: string;
|
|
5325
|
+
totalQuantity: string;
|
|
5326
|
+
eventCount: number;
|
|
5327
|
+
}>>;
|
|
5328
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
5329
|
+
entities: Record<string, {
|
|
5330
|
+
unit: string;
|
|
5331
|
+
totalQuantity: string;
|
|
5332
|
+
eventCount: number;
|
|
5333
|
+
}>;
|
|
5334
|
+
}, {
|
|
5335
|
+
entities: Record<string, {
|
|
5336
|
+
unit: string;
|
|
5337
|
+
totalQuantity: string;
|
|
5338
|
+
eventCount: number;
|
|
5339
|
+
}>;
|
|
5340
|
+
}>;
|
|
5341
|
+
type UsageSummaryResponse = z$1.infer<typeof UsageSummaryResponseSchema>;
|
|
5342
|
+
declare const UsageBreakdownGroupSchema: z$1.ZodObject<{
|
|
5343
|
+
key: z$1.ZodString;
|
|
5344
|
+
totalQuantity: z$1.ZodString;
|
|
5345
|
+
eventCount: z$1.ZodNumber;
|
|
5346
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
5347
|
+
key: string;
|
|
5348
|
+
totalQuantity: string;
|
|
5349
|
+
eventCount: number;
|
|
5350
|
+
}, {
|
|
5351
|
+
key: string;
|
|
5352
|
+
totalQuantity: string;
|
|
5353
|
+
eventCount: number;
|
|
5354
|
+
}>;
|
|
5355
|
+
type UsageBreakdownGroup = z$1.infer<typeof UsageBreakdownGroupSchema>;
|
|
5356
|
+
declare const UsageBreakdownResponseSchema: z$1.ZodObject<{
|
|
5357
|
+
entityType: z$1.ZodString;
|
|
5358
|
+
unit: z$1.ZodString;
|
|
5359
|
+
totalQuantity: z$1.ZodString;
|
|
5360
|
+
eventCount: z$1.ZodNumber;
|
|
5361
|
+
groups: z$1.ZodArray<z$1.ZodObject<{
|
|
5362
|
+
key: z$1.ZodString;
|
|
5363
|
+
totalQuantity: z$1.ZodString;
|
|
5364
|
+
eventCount: z$1.ZodNumber;
|
|
5365
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
5366
|
+
key: string;
|
|
5367
|
+
totalQuantity: string;
|
|
5368
|
+
eventCount: number;
|
|
5369
|
+
}, {
|
|
5370
|
+
key: string;
|
|
5371
|
+
totalQuantity: string;
|
|
5372
|
+
eventCount: number;
|
|
5373
|
+
}>, "many">;
|
|
5374
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
5375
|
+
unit: string;
|
|
5376
|
+
totalQuantity: string;
|
|
5377
|
+
eventCount: number;
|
|
5378
|
+
entityType: string;
|
|
5379
|
+
groups: {
|
|
5380
|
+
key: string;
|
|
5381
|
+
totalQuantity: string;
|
|
5382
|
+
eventCount: number;
|
|
5383
|
+
}[];
|
|
5384
|
+
}, {
|
|
5385
|
+
unit: string;
|
|
5386
|
+
totalQuantity: string;
|
|
5387
|
+
eventCount: number;
|
|
5388
|
+
entityType: string;
|
|
5389
|
+
groups: {
|
|
5390
|
+
key: string;
|
|
5391
|
+
totalQuantity: string;
|
|
5392
|
+
eventCount: number;
|
|
5393
|
+
}[];
|
|
5394
|
+
}>;
|
|
5395
|
+
type UsageBreakdownResponse = z$1.infer<typeof UsageBreakdownResponseSchema>;
|
|
5396
|
+
//#endregion
|
|
5397
|
+
//#region src/models/Usage.d.ts
|
|
5398
|
+
/**
|
|
5399
|
+
* `composio.experimental.usage` — metering for the project the API key
|
|
5400
|
+
* belongs to. **Experimental — shape may change in future releases.**
|
|
5401
|
+
*
|
|
5402
|
+
* @example
|
|
5403
|
+
* ```typescript
|
|
5404
|
+
* const summary = await composio.experimental.usage.summary();
|
|
5405
|
+
* console.log(summary.entities.tool_calls?.totalQuantity);
|
|
5406
|
+
*
|
|
5407
|
+
* const byTool = await composio.experimental.usage.breakdown('tool_calls', {
|
|
5408
|
+
* groupBy: 'tool_slug',
|
|
5409
|
+
* limit: 10,
|
|
5410
|
+
* });
|
|
5411
|
+
* ```
|
|
5412
|
+
*/
|
|
5413
|
+
declare class Usage {
|
|
4244
5414
|
private client;
|
|
4245
5415
|
constructor(client: ComposioClient);
|
|
4246
5416
|
/**
|
|
4247
|
-
*
|
|
4248
|
-
* Update the per-user ACL on a SHARED connected account.
|
|
5417
|
+
* Usage totals per metering entity type for a time range.
|
|
4249
5418
|
* **Experimental — shape may change in future releases.**
|
|
4250
5419
|
*
|
|
4251
|
-
*
|
|
4252
|
-
*
|
|
4253
|
-
*
|
|
5420
|
+
* @param {UsageSummaryParams} [params] - Optional range, `entityTypes` and filters
|
|
5421
|
+
* @returns {Promise<UsageSummaryResponse>} Totals keyed by entity type
|
|
5422
|
+
* @throws {ValidationError} If the params fail validation
|
|
4254
5423
|
*
|
|
4255
|
-
*
|
|
4256
|
-
*
|
|
5424
|
+
* @example
|
|
5425
|
+
* ```typescript
|
|
5426
|
+
* const summary = await composio.experimental.usage.summary({
|
|
5427
|
+
* from: Date.now() - 7 * 24 * 60 * 60 * 1000,
|
|
5428
|
+
* filters: { userId: ['user_123'] },
|
|
5429
|
+
* });
|
|
5430
|
+
* ```
|
|
5431
|
+
*/
|
|
5432
|
+
summary(params?: UsageSummaryParams, requestOptions?: ComposioRequestOptions): Promise<UsageSummaryResponse>;
|
|
5433
|
+
/**
|
|
5434
|
+
* Usage for one metering entity type, grouped by a dimension.
|
|
5435
|
+
* **Experimental — shape may change in future releases.**
|
|
5436
|
+
*
|
|
5437
|
+
* @param {string} entityType - Entity type to break down (e.g. `tool_calls`, `sessions`)
|
|
5438
|
+
* @param {UsageBreakdownParams} [params] - Optional range, `groupBy`, ordering, `limit` and filters
|
|
5439
|
+
* @returns {Promise<UsageBreakdownResponse>} Totals plus per-group rows
|
|
5440
|
+
* @throws {ValidationError} If the params fail validation
|
|
5441
|
+
*
|
|
5442
|
+
* @example
|
|
5443
|
+
* ```typescript
|
|
5444
|
+
* const byUser = await composio.experimental.usage.breakdown('sessions', {
|
|
5445
|
+
* groupBy: 'user_id',
|
|
5446
|
+
* orderBy: 'event_count',
|
|
5447
|
+
* });
|
|
5448
|
+
* ```
|
|
5449
|
+
*/
|
|
5450
|
+
breakdown(entityType: string, params?: UsageBreakdownParams, requestOptions?: ComposioRequestOptions): Promise<UsageBreakdownResponse>;
|
|
5451
|
+
}
|
|
5452
|
+
//#endregion
|
|
5453
|
+
//#region src/types/customToolkits.types.d.ts
|
|
5454
|
+
/**
|
|
5455
|
+
* How end users authenticate to a custom toolkit.
|
|
5456
|
+
* **Experimental — custom toolkits are in pilot; shape may change.**
|
|
5457
|
+
*/
|
|
5458
|
+
declare const CustomToolkitAuthSchemeSchema: z$1.ZodDiscriminatedUnion<"mode", [z$1.ZodObject<{
|
|
5459
|
+
mode: z$1.ZodLiteral<"NO_AUTH">;
|
|
5460
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
5461
|
+
mode: "NO_AUTH";
|
|
5462
|
+
}, {
|
|
5463
|
+
mode: "NO_AUTH";
|
|
5464
|
+
}>, z$1.ZodObject<{
|
|
5465
|
+
mode: z$1.ZodLiteral<"API_KEY">;
|
|
5466
|
+
/**
|
|
5467
|
+
* Headers sent with each request. Write `{{generic_api_key}}` where the
|
|
5468
|
+
* end user's API key goes, for example
|
|
5469
|
+
* `{ Authorization: 'Bearer {{generic_api_key}}' }`.
|
|
5470
|
+
*/
|
|
5471
|
+
headers: z$1.ZodRecord<z$1.ZodString, z$1.ZodString>;
|
|
5472
|
+
/** End-user copy for the API key input on the connect page. */
|
|
5473
|
+
apiKeyField: z$1.ZodOptional<z$1.ZodObject<{
|
|
5474
|
+
displayName: z$1.ZodOptional<z$1.ZodString>;
|
|
5475
|
+
description: z$1.ZodOptional<z$1.ZodString>;
|
|
5476
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
5477
|
+
description?: string | undefined;
|
|
5478
|
+
displayName?: string | undefined;
|
|
5479
|
+
}, {
|
|
5480
|
+
description?: string | undefined;
|
|
5481
|
+
displayName?: string | undefined;
|
|
5482
|
+
}>>;
|
|
5483
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
5484
|
+
mode: "API_KEY";
|
|
5485
|
+
headers: Record<string, string>;
|
|
5486
|
+
apiKeyField?: {
|
|
5487
|
+
description?: string | undefined;
|
|
5488
|
+
displayName?: string | undefined;
|
|
5489
|
+
} | undefined;
|
|
5490
|
+
}, {
|
|
5491
|
+
mode: "API_KEY";
|
|
5492
|
+
headers: Record<string, string>;
|
|
5493
|
+
apiKeyField?: {
|
|
5494
|
+
description?: string | undefined;
|
|
5495
|
+
displayName?: string | undefined;
|
|
5496
|
+
} | undefined;
|
|
5497
|
+
}>, z$1.ZodObject<{
|
|
5498
|
+
mode: z$1.ZodLiteral<"DCR_OAUTH">;
|
|
5499
|
+
/**
|
|
5500
|
+
* Where to fetch the full auth scheme, usually the
|
|
5501
|
+
* `/.well-known/oauth-authorization-server` path of your MCP URL.
|
|
5502
|
+
*/
|
|
5503
|
+
discoveryUrl: z$1.ZodString;
|
|
5504
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
5505
|
+
mode: "DCR_OAUTH";
|
|
5506
|
+
discoveryUrl: string;
|
|
5507
|
+
}, {
|
|
5508
|
+
mode: "DCR_OAUTH";
|
|
5509
|
+
discoveryUrl: string;
|
|
5510
|
+
}>]>;
|
|
5511
|
+
type CustomToolkitAuthScheme = z$1.infer<typeof CustomToolkitAuthSchemeSchema>;
|
|
5512
|
+
/**
|
|
5513
|
+
* Params for `composio.experimental.customToolkits.upsert()`.
|
|
5514
|
+
* **Experimental — custom toolkits are in pilot; shape may change.**
|
|
5515
|
+
*/
|
|
5516
|
+
declare const CustomToolkitUpsertParamsSchema: z$1.ZodObject<{
|
|
5517
|
+
/**
|
|
5518
|
+
* Letters, digits, underscores or spaces, up to 30 characters. The API
|
|
5519
|
+
* prefixes it with `CUSTOM_` and turns spaces into underscores.
|
|
5520
|
+
*/
|
|
5521
|
+
slug: z$1.ZodString;
|
|
5522
|
+
toolkitConfig: z$1.ZodObject<{
|
|
5523
|
+
/** Human-readable toolkit name. */
|
|
5524
|
+
name: z$1.ZodString;
|
|
5525
|
+
/** The app URL. For an MCP app, the MCP server URL. */
|
|
5526
|
+
appUrl: z$1.ZodString;
|
|
5527
|
+
/** Square PNG or JPEG logo (256-1024px, max 3MB), base64-encoded. Defaults to the Composio logo. */
|
|
5528
|
+
logoFile: z$1.ZodOptional<z$1.ZodObject<{
|
|
5529
|
+
content: z$1.ZodString;
|
|
5530
|
+
mimeType: z$1.ZodEnum<["image/png", "image/jpeg"]>;
|
|
5531
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
5532
|
+
content: string;
|
|
5533
|
+
mimeType: "image/png" | "image/jpeg";
|
|
5534
|
+
}, {
|
|
5535
|
+
content: string;
|
|
5536
|
+
mimeType: "image/png" | "image/jpeg";
|
|
5537
|
+
}>>;
|
|
5538
|
+
/** At least one scheme. The schemes cannot change once the toolkit exists. */
|
|
5539
|
+
authSchemes: z$1.ZodArray<z$1.ZodDiscriminatedUnion<"mode", [z$1.ZodObject<{
|
|
5540
|
+
mode: z$1.ZodLiteral<"NO_AUTH">;
|
|
5541
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
5542
|
+
mode: "NO_AUTH";
|
|
5543
|
+
}, {
|
|
5544
|
+
mode: "NO_AUTH";
|
|
5545
|
+
}>, z$1.ZodObject<{
|
|
5546
|
+
mode: z$1.ZodLiteral<"API_KEY">;
|
|
5547
|
+
/**
|
|
5548
|
+
* Headers sent with each request. Write `{{generic_api_key}}` where the
|
|
5549
|
+
* end user's API key goes, for example
|
|
5550
|
+
* `{ Authorization: 'Bearer {{generic_api_key}}' }`.
|
|
5551
|
+
*/
|
|
5552
|
+
headers: z$1.ZodRecord<z$1.ZodString, z$1.ZodString>;
|
|
5553
|
+
/** End-user copy for the API key input on the connect page. */
|
|
5554
|
+
apiKeyField: z$1.ZodOptional<z$1.ZodObject<{
|
|
5555
|
+
displayName: z$1.ZodOptional<z$1.ZodString>;
|
|
5556
|
+
description: z$1.ZodOptional<z$1.ZodString>;
|
|
5557
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
5558
|
+
description?: string | undefined;
|
|
5559
|
+
displayName?: string | undefined;
|
|
5560
|
+
}, {
|
|
5561
|
+
description?: string | undefined;
|
|
5562
|
+
displayName?: string | undefined;
|
|
5563
|
+
}>>;
|
|
5564
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
5565
|
+
mode: "API_KEY";
|
|
5566
|
+
headers: Record<string, string>;
|
|
5567
|
+
apiKeyField?: {
|
|
5568
|
+
description?: string | undefined;
|
|
5569
|
+
displayName?: string | undefined;
|
|
5570
|
+
} | undefined;
|
|
5571
|
+
}, {
|
|
5572
|
+
mode: "API_KEY";
|
|
5573
|
+
headers: Record<string, string>;
|
|
5574
|
+
apiKeyField?: {
|
|
5575
|
+
description?: string | undefined;
|
|
5576
|
+
displayName?: string | undefined;
|
|
5577
|
+
} | undefined;
|
|
5578
|
+
}>, z$1.ZodObject<{
|
|
5579
|
+
mode: z$1.ZodLiteral<"DCR_OAUTH">;
|
|
5580
|
+
/**
|
|
5581
|
+
* Where to fetch the full auth scheme, usually the
|
|
5582
|
+
* `/.well-known/oauth-authorization-server` path of your MCP URL.
|
|
5583
|
+
*/
|
|
5584
|
+
discoveryUrl: z$1.ZodString;
|
|
5585
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
5586
|
+
mode: "DCR_OAUTH";
|
|
5587
|
+
discoveryUrl: string;
|
|
5588
|
+
}, {
|
|
5589
|
+
mode: "DCR_OAUTH";
|
|
5590
|
+
discoveryUrl: string;
|
|
5591
|
+
}>]>, "many">;
|
|
5592
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
5593
|
+
name: string;
|
|
5594
|
+
appUrl: string;
|
|
5595
|
+
authSchemes: ({
|
|
5596
|
+
mode: "NO_AUTH";
|
|
5597
|
+
} | {
|
|
5598
|
+
mode: "API_KEY";
|
|
5599
|
+
headers: Record<string, string>;
|
|
5600
|
+
apiKeyField?: {
|
|
5601
|
+
description?: string | undefined;
|
|
5602
|
+
displayName?: string | undefined;
|
|
5603
|
+
} | undefined;
|
|
5604
|
+
} | {
|
|
5605
|
+
mode: "DCR_OAUTH";
|
|
5606
|
+
discoveryUrl: string;
|
|
5607
|
+
})[];
|
|
5608
|
+
logoFile?: {
|
|
5609
|
+
content: string;
|
|
5610
|
+
mimeType: "image/png" | "image/jpeg";
|
|
5611
|
+
} | undefined;
|
|
5612
|
+
}, {
|
|
5613
|
+
name: string;
|
|
5614
|
+
appUrl: string;
|
|
5615
|
+
authSchemes: ({
|
|
5616
|
+
mode: "NO_AUTH";
|
|
5617
|
+
} | {
|
|
5618
|
+
mode: "API_KEY";
|
|
5619
|
+
headers: Record<string, string>;
|
|
5620
|
+
apiKeyField?: {
|
|
5621
|
+
description?: string | undefined;
|
|
5622
|
+
displayName?: string | undefined;
|
|
5623
|
+
} | undefined;
|
|
5624
|
+
} | {
|
|
5625
|
+
mode: "DCR_OAUTH";
|
|
5626
|
+
discoveryUrl: string;
|
|
5627
|
+
})[];
|
|
5628
|
+
logoFile?: {
|
|
5629
|
+
content: string;
|
|
5630
|
+
mimeType: "image/png" | "image/jpeg";
|
|
5631
|
+
} | undefined;
|
|
5632
|
+
}>;
|
|
5633
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
5634
|
+
slug: string;
|
|
5635
|
+
toolkitConfig: {
|
|
5636
|
+
name: string;
|
|
5637
|
+
appUrl: string;
|
|
5638
|
+
authSchemes: ({
|
|
5639
|
+
mode: "NO_AUTH";
|
|
5640
|
+
} | {
|
|
5641
|
+
mode: "API_KEY";
|
|
5642
|
+
headers: Record<string, string>;
|
|
5643
|
+
apiKeyField?: {
|
|
5644
|
+
description?: string | undefined;
|
|
5645
|
+
displayName?: string | undefined;
|
|
5646
|
+
} | undefined;
|
|
5647
|
+
} | {
|
|
5648
|
+
mode: "DCR_OAUTH";
|
|
5649
|
+
discoveryUrl: string;
|
|
5650
|
+
})[];
|
|
5651
|
+
logoFile?: {
|
|
5652
|
+
content: string;
|
|
5653
|
+
mimeType: "image/png" | "image/jpeg";
|
|
5654
|
+
} | undefined;
|
|
5655
|
+
};
|
|
5656
|
+
}, {
|
|
5657
|
+
slug: string;
|
|
5658
|
+
toolkitConfig: {
|
|
5659
|
+
name: string;
|
|
5660
|
+
appUrl: string;
|
|
5661
|
+
authSchemes: ({
|
|
5662
|
+
mode: "NO_AUTH";
|
|
5663
|
+
} | {
|
|
5664
|
+
mode: "API_KEY";
|
|
5665
|
+
headers: Record<string, string>;
|
|
5666
|
+
apiKeyField?: {
|
|
5667
|
+
description?: string | undefined;
|
|
5668
|
+
displayName?: string | undefined;
|
|
5669
|
+
} | undefined;
|
|
5670
|
+
} | {
|
|
5671
|
+
mode: "DCR_OAUTH";
|
|
5672
|
+
discoveryUrl: string;
|
|
5673
|
+
})[];
|
|
5674
|
+
logoFile?: {
|
|
5675
|
+
content: string;
|
|
5676
|
+
mimeType: "image/png" | "image/jpeg";
|
|
5677
|
+
} | undefined;
|
|
5678
|
+
};
|
|
5679
|
+
}>;
|
|
5680
|
+
type CustomToolkitUpsertParams = z$1.infer<typeof CustomToolkitUpsertParamsSchema>;
|
|
5681
|
+
declare const CustomToolkitUpsertResponseSchema: z$1.ZodObject<{
|
|
5682
|
+
/** Slug of the created or updated toolkit. */
|
|
5683
|
+
slug: z$1.ZodString;
|
|
5684
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
5685
|
+
slug: string;
|
|
5686
|
+
}, {
|
|
5687
|
+
slug: string;
|
|
5688
|
+
}>;
|
|
5689
|
+
type CustomToolkitUpsertResponse = z$1.infer<typeof CustomToolkitUpsertResponseSchema>;
|
|
5690
|
+
/**
|
|
5691
|
+
* Params for `composio.experimental.customToolkits.sync()`.
|
|
5692
|
+
* **Experimental — custom toolkits are in pilot; shape may change.**
|
|
5693
|
+
*/
|
|
5694
|
+
declare const CustomToolkitSyncParamsSchema: z$1.ZodObject<{
|
|
5695
|
+
/** Connected account to use when fetching the remote tool definitions. */
|
|
5696
|
+
connectedAccountId: z$1.ZodOptional<z$1.ZodString>;
|
|
5697
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
5698
|
+
connectedAccountId?: string | undefined;
|
|
5699
|
+
}, {
|
|
5700
|
+
connectedAccountId?: string | undefined;
|
|
5701
|
+
}>;
|
|
5702
|
+
type CustomToolkitSyncParams = z$1.infer<typeof CustomToolkitSyncParamsSchema>;
|
|
5703
|
+
declare const CustomToolkitSyncResponseSchema: z$1.ZodObject<{
|
|
5704
|
+
slug: z$1.ZodString;
|
|
5705
|
+
/** Toolkit version after the sync. */
|
|
5706
|
+
version: z$1.ZodString;
|
|
5707
|
+
/** Number of tools synced. */
|
|
5708
|
+
syncedCount: z$1.ZodNumber;
|
|
5709
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
5710
|
+
slug: string;
|
|
5711
|
+
version: string;
|
|
5712
|
+
syncedCount: number;
|
|
5713
|
+
}, {
|
|
5714
|
+
slug: string;
|
|
5715
|
+
version: string;
|
|
5716
|
+
syncedCount: number;
|
|
5717
|
+
}>;
|
|
5718
|
+
type CustomToolkitSyncResponse = z$1.infer<typeof CustomToolkitSyncResponseSchema>;
|
|
5719
|
+
declare const CustomToolkitDeleteResponseSchema: z$1.ZodObject<{
|
|
5720
|
+
/** Slug of the deleted toolkit. */
|
|
5721
|
+
slug: z$1.ZodString;
|
|
5722
|
+
deleted: z$1.ZodBoolean;
|
|
5723
|
+
/** Background jobs revoking the credentials of the toolkit's connected accounts. */
|
|
5724
|
+
revokeJobIds: z$1.ZodArray<z$1.ZodString, "many">;
|
|
5725
|
+
authConfigsDeleted: z$1.ZodNumber;
|
|
5726
|
+
connectedAccountsDeleted: z$1.ZodNumber;
|
|
5727
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
5728
|
+
slug: string;
|
|
5729
|
+
deleted: boolean;
|
|
5730
|
+
revokeJobIds: string[];
|
|
5731
|
+
authConfigsDeleted: number;
|
|
5732
|
+
connectedAccountsDeleted: number;
|
|
5733
|
+
}, {
|
|
5734
|
+
slug: string;
|
|
5735
|
+
deleted: boolean;
|
|
5736
|
+
revokeJobIds: string[];
|
|
5737
|
+
authConfigsDeleted: number;
|
|
5738
|
+
connectedAccountsDeleted: number;
|
|
5739
|
+
}>;
|
|
5740
|
+
type CustomToolkitDeleteResponse = z$1.infer<typeof CustomToolkitDeleteResponseSchema>;
|
|
5741
|
+
//#endregion
|
|
5742
|
+
//#region src/models/CustomToolkits.d.ts
|
|
5743
|
+
/**
|
|
5744
|
+
* `composio.experimental.customToolkits` — toolkits your project registers
|
|
5745
|
+
* from its own app or MCP server, with their own auth configs and connected
|
|
5746
|
+
* accounts. **Experimental — custom toolkits are in pilot; shape may change.**
|
|
5747
|
+
*
|
|
5748
|
+
* These live on the Composio platform. They are unrelated to the in-process
|
|
5749
|
+
* toolkits built with `experimental_createToolkit()`, which run inside your
|
|
5750
|
+
* application.
|
|
5751
|
+
*
|
|
5752
|
+
* @example
|
|
5753
|
+
* ```typescript
|
|
5754
|
+
* const { slug } = await composio.experimental.customToolkits.upsert({
|
|
5755
|
+
* slug: 'MY_TOOLKIT',
|
|
5756
|
+
* toolkitConfig: {
|
|
5757
|
+
* name: 'My Toolkit',
|
|
5758
|
+
* appUrl: 'https://mcp.example.com/mcp',
|
|
5759
|
+
* authSchemes: [{ mode: 'DCR_OAUTH', discoveryUrl: 'https://mcp.example.com/.well-known/oauth-authorization-server' }],
|
|
5760
|
+
* },
|
|
5761
|
+
* });
|
|
5762
|
+
* await composio.experimental.customToolkits.sync(slug);
|
|
5763
|
+
* ```
|
|
5764
|
+
*/
|
|
5765
|
+
declare class CustomToolkits {
|
|
5766
|
+
private client;
|
|
5767
|
+
constructor(client: ComposioClient);
|
|
5768
|
+
/**
|
|
5769
|
+
* Creates a custom toolkit, or updates its display metadata (name, API key
|
|
5770
|
+
* field copy) when the project already owns a toolkit with this slug.
|
|
5771
|
+
* **Experimental — custom toolkits are in pilot; shape may change.**
|
|
5772
|
+
*
|
|
5773
|
+
* `appUrl` and `authSchemes` cannot change on an existing toolkit:
|
|
5774
|
+
* re-sending them unchanged is a no-op, and changing them fails with a 409.
|
|
5775
|
+
* Delete and re-register the toolkit instead, which revokes its connections.
|
|
5776
|
+
*
|
|
5777
|
+
* @param {CustomToolkitUpsertParams} params - The slug and toolkit configuration
|
|
5778
|
+
* @returns {Promise<CustomToolkitUpsertResponse>} The toolkit's slug
|
|
5779
|
+
* @throws {ValidationError} If the params fail validation
|
|
5780
|
+
*
|
|
5781
|
+
* @example
|
|
5782
|
+
* ```typescript
|
|
5783
|
+
* await composio.experimental.customToolkits.upsert({
|
|
5784
|
+
* slug: 'INTERNAL_API',
|
|
5785
|
+
* toolkitConfig: {
|
|
5786
|
+
* name: 'Internal API',
|
|
5787
|
+
* appUrl: 'https://mcp.internal.example.com/mcp',
|
|
5788
|
+
* authSchemes: [
|
|
5789
|
+
* { mode: 'API_KEY', headers: { Authorization: 'Bearer {{generic_api_key}}' } },
|
|
5790
|
+
* ],
|
|
5791
|
+
* },
|
|
5792
|
+
* });
|
|
5793
|
+
* ```
|
|
5794
|
+
*/
|
|
5795
|
+
upsert(params: CustomToolkitUpsertParams, requestOptions?: ComposioRequestOptions): Promise<CustomToolkitUpsertResponse>;
|
|
5796
|
+
/**
|
|
5797
|
+
* Re-fetches the tool definitions of a custom toolkit from its remote MCP
|
|
5798
|
+
* server. Call it when automatic sync fails or the remote tools change.
|
|
5799
|
+
* **Experimental — custom toolkits are in pilot; shape may change.**
|
|
5800
|
+
*
|
|
5801
|
+
* @param {string} slug - The custom toolkit slug (`CUSTOM_...`)
|
|
5802
|
+
* @param {CustomToolkitSyncParams} [params] - Optional connected account to fetch the definitions with
|
|
5803
|
+
* @returns {Promise<CustomToolkitSyncResponse>} The toolkit version and number of tools synced
|
|
5804
|
+
* @throws {ValidationError} If the params fail validation
|
|
5805
|
+
*
|
|
5806
|
+
* @example
|
|
5807
|
+
* ```typescript
|
|
5808
|
+
* const { version, syncedCount } = await composio.experimental.customToolkits.sync(
|
|
5809
|
+
* 'CUSTOM_MY_TOOLKIT',
|
|
5810
|
+
* { connectedAccountId: 'ca_abc123' }
|
|
5811
|
+
* );
|
|
5812
|
+
* ```
|
|
5813
|
+
*/
|
|
5814
|
+
sync(slug: string, params?: CustomToolkitSyncParams, requestOptions?: ComposioRequestOptions): Promise<CustomToolkitSyncResponse>;
|
|
5815
|
+
/**
|
|
5816
|
+
* Deletes a custom toolkit owned by the project, with its tools, auth
|
|
5817
|
+
* configs and connected accounts. The credentials behind those connected
|
|
5818
|
+
* accounts are revoked in background jobs (`revokeJobIds`).
|
|
5819
|
+
* **Experimental — custom toolkits are in pilot; shape may change.**
|
|
5820
|
+
*
|
|
5821
|
+
* Composio-managed toolkits cannot be deleted; the API answers 403.
|
|
5822
|
+
*
|
|
5823
|
+
* @param {string} slug - The custom toolkit slug (`CUSTOM_...`)
|
|
5824
|
+
* @returns {Promise<CustomToolkitDeleteResponse>} What was deleted
|
|
5825
|
+
*
|
|
5826
|
+
* @example
|
|
5827
|
+
* ```typescript
|
|
5828
|
+
* const result = await composio.experimental.customToolkits.delete('CUSTOM_MY_TOOLKIT');
|
|
5829
|
+
* console.log(result.connectedAccountsDeleted);
|
|
5830
|
+
* ```
|
|
5831
|
+
*/
|
|
5832
|
+
delete(slug: string, requestOptions?: ComposioRequestOptions): Promise<CustomToolkitDeleteResponse>;
|
|
5833
|
+
}
|
|
5834
|
+
//#endregion
|
|
5835
|
+
//#region src/models/Experimental.d.ts
|
|
5836
|
+
declare class Experimental {
|
|
5837
|
+
private client;
|
|
5838
|
+
/**
|
|
5839
|
+
* Project-scoped usage metering (`summary()` / `breakdown()`).
|
|
5840
|
+
* **Experimental — shape may change in future releases.**
|
|
5841
|
+
*
|
|
5842
|
+
* @example
|
|
5843
|
+
* ```typescript
|
|
5844
|
+
* const summary = await composio.experimental.usage.summary();
|
|
5845
|
+
* const byTool = await composio.experimental.usage.breakdown('tool_calls');
|
|
5846
|
+
* ```
|
|
5847
|
+
*/
|
|
5848
|
+
usage: Usage;
|
|
5849
|
+
/**
|
|
5850
|
+
* Register and manage project-owned custom toolkits (`upsert()` / `sync()` / `delete()`).
|
|
5851
|
+
* **Experimental — custom toolkits are in pilot; shape may change.**
|
|
5852
|
+
*
|
|
5853
|
+
* @example
|
|
5854
|
+
* ```typescript
|
|
5855
|
+
* await composio.experimental.customToolkits.sync('CUSTOM_MY_TOOLKIT');
|
|
5856
|
+
* ```
|
|
5857
|
+
*/
|
|
5858
|
+
customToolkits: CustomToolkits;
|
|
5859
|
+
constructor(client: ComposioClient);
|
|
5860
|
+
/**
|
|
5861
|
+
* Compatibility alias for `composio.connectedAccounts.updateAcl(...)`.
|
|
5862
|
+
* Update the per-user ACL on a SHARED connected account.
|
|
5863
|
+
* **Experimental — shape may change in future releases.**
|
|
5864
|
+
*
|
|
5865
|
+
* Only meaningful for SHARED connections — calling this on a PRIVATE
|
|
5866
|
+
* connection raises `ComposioAclOnlyForSharedError` (400). ACL writes
|
|
5867
|
+
* require the connection's creator or an API key.
|
|
5868
|
+
*
|
|
5869
|
+
* PATCH semantics: omit a field to leave it unchanged; pass an empty
|
|
5870
|
+
* array to clear an allow/deny list. At least one field must be
|
|
4257
5871
|
* provided.
|
|
4258
5872
|
*
|
|
4259
5873
|
* Resolution rule (deny wins):
|
|
@@ -4927,93 +6541,1223 @@ declare class MCP {
|
|
|
4927
6541
|
generate(userId: string, mcpConfigId: string, options?: MCPGetInstanceParams, requestOptions?: ComposioRequestOptions): Promise<MCPServerInstance>;
|
|
4928
6542
|
}
|
|
4929
6543
|
//#endregion
|
|
4930
|
-
//#region src/
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
|
|
4945
|
-
|
|
4946
|
-
|
|
4947
|
-
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
6544
|
+
//#region src/types/webhooks.types.d.ts
|
|
6545
|
+
/**
|
|
6546
|
+
* Webhook payload versions accepted by the webhook subscription endpoints.
|
|
6547
|
+
*/
|
|
6548
|
+
declare const WebhookVersionSchema: z$1.ZodEnum<["V1", "V2", "V3"]>;
|
|
6549
|
+
/**
|
|
6550
|
+
* A project webhook subscription in the SDK's camelCase shape. The signing
|
|
6551
|
+
* `secret` is returned by the API on every subscription read/write.
|
|
6552
|
+
*/
|
|
6553
|
+
declare const WebhookSubscriptionSchema: z$1.ZodObject<{
|
|
6554
|
+
id: z$1.ZodString;
|
|
6555
|
+
webhookUrl: z$1.ZodString;
|
|
6556
|
+
version: z$1.ZodEnum<["V1", "V2", "V3"]>;
|
|
6557
|
+
enabledEvents: z$1.ZodArray<z$1.ZodString, "many">;
|
|
6558
|
+
secret: z$1.ZodOptional<z$1.ZodString>;
|
|
6559
|
+
createdAt: z$1.ZodOptional<z$1.ZodString>;
|
|
6560
|
+
updatedAt: z$1.ZodOptional<z$1.ZodString>;
|
|
6561
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6562
|
+
version: "V1" | "V2" | "V3";
|
|
6563
|
+
id: string;
|
|
6564
|
+
webhookUrl: string;
|
|
6565
|
+
enabledEvents: string[];
|
|
6566
|
+
createdAt?: string | undefined;
|
|
6567
|
+
updatedAt?: string | undefined;
|
|
6568
|
+
secret?: string | undefined;
|
|
6569
|
+
}, {
|
|
6570
|
+
version: "V1" | "V2" | "V3";
|
|
6571
|
+
id: string;
|
|
6572
|
+
webhookUrl: string;
|
|
6573
|
+
enabledEvents: string[];
|
|
6574
|
+
createdAt?: string | undefined;
|
|
6575
|
+
updatedAt?: string | undefined;
|
|
6576
|
+
secret?: string | undefined;
|
|
6577
|
+
}>;
|
|
6578
|
+
declare const WebhookSubscriptionListParamsSchema: z$1.ZodObject<{
|
|
6579
|
+
/** Number of items per page, max allowed is 50. */
|
|
6580
|
+
limit: z$1.ZodOptional<z$1.ZodNumber>;
|
|
6581
|
+
/** Cursor for pagination, taken from a previous response's `nextCursor`. */
|
|
6582
|
+
cursor: z$1.ZodOptional<z$1.ZodString>;
|
|
6583
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6584
|
+
limit?: number | undefined;
|
|
6585
|
+
cursor?: string | undefined;
|
|
6586
|
+
}, {
|
|
6587
|
+
limit?: number | undefined;
|
|
6588
|
+
cursor?: string | undefined;
|
|
6589
|
+
}>;
|
|
6590
|
+
type WebhookSubscriptionListParams = z$1.infer<typeof WebhookSubscriptionListParamsSchema>;
|
|
6591
|
+
declare const WebhookSubscriptionListResponseSchema: z$1.ZodObject<{
|
|
6592
|
+
items: z$1.ZodArray<z$1.ZodObject<{
|
|
6593
|
+
id: z$1.ZodString;
|
|
6594
|
+
webhookUrl: z$1.ZodString;
|
|
6595
|
+
version: z$1.ZodEnum<["V1", "V2", "V3"]>;
|
|
6596
|
+
enabledEvents: z$1.ZodArray<z$1.ZodString, "many">;
|
|
6597
|
+
secret: z$1.ZodOptional<z$1.ZodString>;
|
|
6598
|
+
createdAt: z$1.ZodOptional<z$1.ZodString>;
|
|
6599
|
+
updatedAt: z$1.ZodOptional<z$1.ZodString>;
|
|
6600
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6601
|
+
version: "V1" | "V2" | "V3";
|
|
6602
|
+
id: string;
|
|
6603
|
+
webhookUrl: string;
|
|
6604
|
+
enabledEvents: string[];
|
|
6605
|
+
createdAt?: string | undefined;
|
|
6606
|
+
updatedAt?: string | undefined;
|
|
6607
|
+
secret?: string | undefined;
|
|
6608
|
+
}, {
|
|
6609
|
+
version: "V1" | "V2" | "V3";
|
|
6610
|
+
id: string;
|
|
6611
|
+
webhookUrl: string;
|
|
6612
|
+
enabledEvents: string[];
|
|
6613
|
+
createdAt?: string | undefined;
|
|
6614
|
+
updatedAt?: string | undefined;
|
|
6615
|
+
secret?: string | undefined;
|
|
6616
|
+
}>, "many">;
|
|
6617
|
+
nextCursor: z$1.ZodNullable<z$1.ZodString>;
|
|
6618
|
+
totalPages: z$1.ZodNumber;
|
|
6619
|
+
currentPage: z$1.ZodNumber;
|
|
6620
|
+
totalItems: z$1.ZodNumber;
|
|
6621
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6622
|
+
items: {
|
|
6623
|
+
version: "V1" | "V2" | "V3";
|
|
6624
|
+
id: string;
|
|
6625
|
+
webhookUrl: string;
|
|
6626
|
+
enabledEvents: string[];
|
|
6627
|
+
createdAt?: string | undefined;
|
|
6628
|
+
updatedAt?: string | undefined;
|
|
6629
|
+
secret?: string | undefined;
|
|
6630
|
+
}[];
|
|
6631
|
+
nextCursor: string | null;
|
|
6632
|
+
totalPages: number;
|
|
6633
|
+
currentPage: number;
|
|
6634
|
+
totalItems: number;
|
|
6635
|
+
}, {
|
|
6636
|
+
items: {
|
|
6637
|
+
version: "V1" | "V2" | "V3";
|
|
6638
|
+
id: string;
|
|
6639
|
+
webhookUrl: string;
|
|
6640
|
+
enabledEvents: string[];
|
|
6641
|
+
createdAt?: string | undefined;
|
|
6642
|
+
updatedAt?: string | undefined;
|
|
6643
|
+
secret?: string | undefined;
|
|
6644
|
+
}[];
|
|
6645
|
+
nextCursor: string | null;
|
|
6646
|
+
totalPages: number;
|
|
6647
|
+
currentPage: number;
|
|
6648
|
+
totalItems: number;
|
|
6649
|
+
}>;
|
|
6650
|
+
type WebhookSubscriptionListResponse = z$1.infer<typeof WebhookSubscriptionListResponseSchema>;
|
|
6651
|
+
/**
|
|
6652
|
+
* Params for `composio.webhooks.subscriptions.set()`. Identical to the
|
|
6653
|
+
* params accepted by `composio.triggers.setWebhookSubscription()`.
|
|
6654
|
+
*/
|
|
6655
|
+
declare const WebhookSubscriptionSetParamsSchema: z$1.ZodObject<{
|
|
6656
|
+
webhookUrl: z$1.ZodString;
|
|
6657
|
+
enabledEvents: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString, "many">>;
|
|
6658
|
+
version: z$1.ZodOptional<z$1.ZodEnum<["V1", "V2", "V3"]>>;
|
|
6659
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6660
|
+
webhookUrl: string;
|
|
6661
|
+
version?: "V1" | "V2" | "V3" | undefined;
|
|
6662
|
+
enabledEvents?: string[] | undefined;
|
|
6663
|
+
}, {
|
|
6664
|
+
webhookUrl: string;
|
|
6665
|
+
version?: "V1" | "V2" | "V3" | undefined;
|
|
6666
|
+
enabledEvents?: string[] | undefined;
|
|
6667
|
+
}>;
|
|
6668
|
+
type WebhookSubscriptionSetParams = z$1.infer<typeof WebhookSubscriptionSetParamsSchema>;
|
|
6669
|
+
declare const WebhookSubscriptionUpdateParamsSchema: z$1.ZodObject<{
|
|
6670
|
+
/** HTTPS URL to receive webhook events. */
|
|
6671
|
+
webhookUrl: z$1.ZodOptional<z$1.ZodString>;
|
|
6672
|
+
/** Event types to subscribe to. */
|
|
6673
|
+
enabledEvents: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString, "many">>;
|
|
6674
|
+
/** Webhook payload version. */
|
|
6675
|
+
version: z$1.ZodOptional<z$1.ZodEnum<["V1", "V2", "V3"]>>;
|
|
6676
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6677
|
+
version?: "V1" | "V2" | "V3" | undefined;
|
|
6678
|
+
webhookUrl?: string | undefined;
|
|
6679
|
+
enabledEvents?: string[] | undefined;
|
|
6680
|
+
}, {
|
|
6681
|
+
version?: "V1" | "V2" | "V3" | undefined;
|
|
6682
|
+
webhookUrl?: string | undefined;
|
|
6683
|
+
enabledEvents?: string[] | undefined;
|
|
6684
|
+
}>;
|
|
6685
|
+
type WebhookSubscriptionUpdateParams = z$1.infer<typeof WebhookSubscriptionUpdateParamsSchema>;
|
|
6686
|
+
declare const WebhookSubscriptionDeleteResponseSchema: z$1.ZodObject<{
|
|
6687
|
+
success: z$1.ZodBoolean;
|
|
6688
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6689
|
+
success: boolean;
|
|
6690
|
+
}, {
|
|
6691
|
+
success: boolean;
|
|
6692
|
+
}>;
|
|
6693
|
+
type WebhookSubscriptionDeleteResponse = z$1.infer<typeof WebhookSubscriptionDeleteResponseSchema>;
|
|
6694
|
+
declare const WebhookSubscriptionRotateSecretResponseSchema: z$1.ZodObject<{
|
|
6695
|
+
id: z$1.ZodString;
|
|
6696
|
+
/** The new signing secret. Store it — the previous secret stops validating. */
|
|
6697
|
+
secret: z$1.ZodString;
|
|
6698
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6699
|
+
id: string;
|
|
6700
|
+
secret: string;
|
|
6701
|
+
}, {
|
|
6702
|
+
id: string;
|
|
6703
|
+
secret: string;
|
|
6704
|
+
}>;
|
|
6705
|
+
type WebhookSubscriptionRotateSecretResponse = z$1.infer<typeof WebhookSubscriptionRotateSecretResponseSchema>;
|
|
6706
|
+
declare const WebhookSubscriptionEventTypeSchema: z$1.ZodObject<{
|
|
6707
|
+
eventType: z$1.ZodString;
|
|
6708
|
+
description: z$1.ZodString;
|
|
6709
|
+
supportedVersions: z$1.ZodArray<z$1.ZodEnum<["V1", "V2", "V3"]>, "many">;
|
|
6710
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6711
|
+
description: string;
|
|
6712
|
+
eventType: string;
|
|
6713
|
+
supportedVersions: ("V1" | "V2" | "V3")[];
|
|
6714
|
+
}, {
|
|
6715
|
+
description: string;
|
|
6716
|
+
eventType: string;
|
|
6717
|
+
supportedVersions: ("V1" | "V2" | "V3")[];
|
|
6718
|
+
}>;
|
|
6719
|
+
type WebhookSubscriptionEventType = z$1.infer<typeof WebhookSubscriptionEventTypeSchema>;
|
|
6720
|
+
declare const WebhookSubscriptionEventTypesResponseSchema: z$1.ZodObject<{
|
|
6721
|
+
items: z$1.ZodArray<z$1.ZodObject<{
|
|
6722
|
+
eventType: z$1.ZodString;
|
|
6723
|
+
description: z$1.ZodString;
|
|
6724
|
+
supportedVersions: z$1.ZodArray<z$1.ZodEnum<["V1", "V2", "V3"]>, "many">;
|
|
6725
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6726
|
+
description: string;
|
|
6727
|
+
eventType: string;
|
|
6728
|
+
supportedVersions: ("V1" | "V2" | "V3")[];
|
|
6729
|
+
}, {
|
|
6730
|
+
description: string;
|
|
6731
|
+
eventType: string;
|
|
6732
|
+
supportedVersions: ("V1" | "V2" | "V3")[];
|
|
6733
|
+
}>, "many">;
|
|
6734
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6735
|
+
items: {
|
|
6736
|
+
description: string;
|
|
6737
|
+
eventType: string;
|
|
6738
|
+
supportedVersions: ("V1" | "V2" | "V3")[];
|
|
6739
|
+
}[];
|
|
6740
|
+
}, {
|
|
6741
|
+
items: {
|
|
6742
|
+
description: string;
|
|
6743
|
+
eventType: string;
|
|
6744
|
+
supportedVersions: ("V1" | "V2" | "V3")[];
|
|
6745
|
+
}[];
|
|
6746
|
+
}>;
|
|
6747
|
+
type WebhookSubscriptionEventTypesResponse = z$1.infer<typeof WebhookSubscriptionEventTypesResponseSchema>;
|
|
6748
|
+
declare const WebhookEndpointListParamsSchema: z$1.ZodObject<{
|
|
6749
|
+
/** Only return endpoints for this toolkit slug. */
|
|
6750
|
+
toolkitSlug: z$1.ZodOptional<z$1.ZodString>;
|
|
6751
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6752
|
+
toolkitSlug?: string | undefined;
|
|
6753
|
+
}, {
|
|
6754
|
+
toolkitSlug?: string | undefined;
|
|
6755
|
+
}>;
|
|
6756
|
+
type WebhookEndpointListParams = z$1.infer<typeof WebhookEndpointListParamsSchema>;
|
|
6757
|
+
declare const WebhookEndpointListItemSchema: z$1.ZodObject<{
|
|
6758
|
+
id: z$1.ZodString;
|
|
6759
|
+
toolkitSlug: z$1.ZodString;
|
|
6760
|
+
clientId: z$1.ZodNullable<z$1.ZodString>;
|
|
6761
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6762
|
+
toolkitSlug: string;
|
|
6763
|
+
id: string;
|
|
6764
|
+
clientId: string | null;
|
|
6765
|
+
}, {
|
|
6766
|
+
toolkitSlug: string;
|
|
6767
|
+
id: string;
|
|
6768
|
+
clientId: string | null;
|
|
6769
|
+
}>;
|
|
6770
|
+
type WebhookEndpointListItem = z$1.infer<typeof WebhookEndpointListItemSchema>;
|
|
6771
|
+
declare const WebhookEndpointListResponseSchema: z$1.ZodObject<{
|
|
6772
|
+
items: z$1.ZodArray<z$1.ZodObject<{
|
|
6773
|
+
id: z$1.ZodString;
|
|
6774
|
+
toolkitSlug: z$1.ZodString;
|
|
6775
|
+
clientId: z$1.ZodNullable<z$1.ZodString>;
|
|
6776
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6777
|
+
toolkitSlug: string;
|
|
6778
|
+
id: string;
|
|
6779
|
+
clientId: string | null;
|
|
6780
|
+
}, {
|
|
6781
|
+
toolkitSlug: string;
|
|
6782
|
+
id: string;
|
|
6783
|
+
clientId: string | null;
|
|
6784
|
+
}>, "many">;
|
|
6785
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6786
|
+
items: {
|
|
6787
|
+
toolkitSlug: string;
|
|
6788
|
+
id: string;
|
|
6789
|
+
clientId: string | null;
|
|
6790
|
+
}[];
|
|
6791
|
+
}, {
|
|
6792
|
+
items: {
|
|
6793
|
+
toolkitSlug: string;
|
|
6794
|
+
id: string;
|
|
6795
|
+
clientId: string | null;
|
|
6796
|
+
}[];
|
|
6797
|
+
}>;
|
|
6798
|
+
type WebhookEndpointListResponse = z$1.infer<typeof WebhookEndpointListResponseSchema>;
|
|
6799
|
+
declare const WebhookEndpointSchema: z$1.ZodObject<{
|
|
6800
|
+
id: z$1.ZodString;
|
|
6801
|
+
toolkitSlug: z$1.ZodString;
|
|
6802
|
+
clientId: z$1.ZodNullable<z$1.ZodString>;
|
|
6803
|
+
/** The inbound URL to register with the third-party provider. */
|
|
6804
|
+
webhookUrl: z$1.ZodString;
|
|
6805
|
+
/** Configured setup fields with secret values masked. */
|
|
6806
|
+
data: z$1.ZodNullable<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
|
|
6807
|
+
createdAt: z$1.ZodString;
|
|
6808
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6809
|
+
toolkitSlug: string;
|
|
6810
|
+
data: Record<string, string> | null;
|
|
6811
|
+
id: string;
|
|
6812
|
+
createdAt: string;
|
|
6813
|
+
webhookUrl: string;
|
|
6814
|
+
clientId: string | null;
|
|
6815
|
+
}, {
|
|
6816
|
+
toolkitSlug: string;
|
|
6817
|
+
data: Record<string, string> | null;
|
|
6818
|
+
id: string;
|
|
6819
|
+
createdAt: string;
|
|
6820
|
+
webhookUrl: string;
|
|
6821
|
+
clientId: string | null;
|
|
6822
|
+
}>;
|
|
6823
|
+
type WebhookEndpoint = z$1.infer<typeof WebhookEndpointSchema>;
|
|
6824
|
+
declare const WebhookEndpointCreateParamsSchema: z$1.ZodObject<{
|
|
6825
|
+
/** Toolkit identifier (e.g. `slack`, `discord`). */
|
|
6826
|
+
toolkitSlug: z$1.ZodString;
|
|
6827
|
+
/** OAuth app client ID — identifies which app this endpoint is for. */
|
|
6828
|
+
clientId: z$1.ZodString;
|
|
6829
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6830
|
+
toolkitSlug: string;
|
|
6831
|
+
clientId: string;
|
|
6832
|
+
}, {
|
|
6833
|
+
toolkitSlug: string;
|
|
6834
|
+
clientId: string;
|
|
6835
|
+
}>;
|
|
6836
|
+
type WebhookEndpointCreateParams = z$1.infer<typeof WebhookEndpointCreateParamsSchema>;
|
|
6837
|
+
declare const WebhookEndpointReplaceParamsSchema: z$1.ZodObject<{
|
|
6838
|
+
/** Key-value pairs for ALL required setup fields of the toolkit. */
|
|
6839
|
+
data: z$1.ZodRecord<z$1.ZodString, z$1.ZodString>;
|
|
6840
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6841
|
+
data: Record<string, string>;
|
|
6842
|
+
}, {
|
|
6843
|
+
data: Record<string, string>;
|
|
6844
|
+
}>;
|
|
6845
|
+
type WebhookEndpointReplaceParams = z$1.infer<typeof WebhookEndpointReplaceParamsSchema>;
|
|
6846
|
+
declare const WebhookEndpointUpdateParamsSchema: z$1.ZodObject<{
|
|
6847
|
+
/** Key-value pairs to merge into the setup fields. Omitted fields are preserved. */
|
|
6848
|
+
data: z$1.ZodRecord<z$1.ZodString, z$1.ZodString>;
|
|
6849
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
6850
|
+
data: Record<string, string>;
|
|
6851
|
+
}, {
|
|
6852
|
+
data: Record<string, string>;
|
|
6853
|
+
}>;
|
|
6854
|
+
type WebhookEndpointUpdateParams = z$1.infer<typeof WebhookEndpointUpdateParamsSchema>;
|
|
6855
|
+
//#endregion
|
|
6856
|
+
//#region src/models/Webhooks.d.ts
|
|
6857
|
+
/**
|
|
6858
|
+
* `composio.webhooks.subscriptions` — the project's outbound webhook
|
|
6859
|
+
* subscription. The API allows one subscription per project; every response
|
|
6860
|
+
* includes the signing `secret` used to verify deliveries with
|
|
6861
|
+
* `composio.triggers.verifyWebhook()` / `composio.triggers.parse()`.
|
|
6862
|
+
*/
|
|
6863
|
+
declare class WebhookSubscriptions {
|
|
6864
|
+
private client;
|
|
6865
|
+
constructor(client: ComposioClient);
|
|
6866
|
+
/**
|
|
6867
|
+
* List the project's webhook subscriptions.
|
|
6868
|
+
*
|
|
6869
|
+
* @param {WebhookSubscriptionListParams} [query] - Pagination options
|
|
6870
|
+
* @returns {Promise<WebhookSubscriptionListResponse>} Paginated subscriptions
|
|
6871
|
+
*
|
|
6872
|
+
* @example
|
|
6873
|
+
* ```typescript
|
|
6874
|
+
* const { items } = await composio.webhooks.subscriptions.list();
|
|
6875
|
+
* console.log(items[0]?.webhookUrl);
|
|
6876
|
+
* ```
|
|
6877
|
+
*/
|
|
6878
|
+
list(query?: WebhookSubscriptionListParams, requestOptions?: ComposioRequestOptions): Promise<WebhookSubscriptionListResponse>;
|
|
6879
|
+
/**
|
|
6880
|
+
* Retrieve a webhook subscription by id.
|
|
6881
|
+
*
|
|
6882
|
+
* @param {string} id - The subscription id
|
|
6883
|
+
* @returns {Promise<WebhookSubscription>} The subscription, including its signing secret
|
|
6884
|
+
*
|
|
6885
|
+
* @example
|
|
6886
|
+
* ```typescript
|
|
6887
|
+
* const subscription = await composio.webhooks.subscriptions.get('whs_abc123');
|
|
6888
|
+
* console.log(subscription.enabledEvents);
|
|
6889
|
+
* ```
|
|
6890
|
+
*/
|
|
6891
|
+
get(id: string, requestOptions?: ComposioRequestOptions): Promise<WebhookSubscription>;
|
|
6892
|
+
/**
|
|
6893
|
+
* Create or update the project webhook subscription.
|
|
6894
|
+
*
|
|
6895
|
+
* If a subscription already exists it is updated in place, otherwise a new
|
|
6896
|
+
* one is created. By default this subscribes to V3 trigger message events.
|
|
6897
|
+
*
|
|
6898
|
+
* @param {WebhookSubscriptionSetParams} params - `webhookUrl`, optional `enabledEvents` and `version`
|
|
6899
|
+
* @returns {Promise<WebhookSubscription>} The resulting subscription
|
|
6900
|
+
* @throws {ValidationError} If the params fail validation
|
|
6901
|
+
*
|
|
6902
|
+
* @example
|
|
6903
|
+
* ```typescript
|
|
6904
|
+
* const subscription = await composio.webhooks.subscriptions.set({
|
|
6905
|
+
* webhookUrl: `${APP_URL}/webhooks/composio`,
|
|
6906
|
+
* enabledEvents: ['composio.trigger.message', 'composio.connected_account.expired'],
|
|
6907
|
+
* });
|
|
6908
|
+
* process.env.COMPOSIO_WEBHOOK_SECRET = subscription.secret;
|
|
6909
|
+
* ```
|
|
6910
|
+
*/
|
|
6911
|
+
set(params: WebhookSubscriptionSetParams, requestOptions?: ComposioRequestOptions): Promise<WebhookSubscription>;
|
|
6912
|
+
/**
|
|
6913
|
+
* Update an existing webhook subscription. Only the provided fields change.
|
|
6914
|
+
*
|
|
6915
|
+
* @param {string} id - The subscription id
|
|
6916
|
+
* @param {WebhookSubscriptionUpdateParams} params - Fields to update
|
|
6917
|
+
* @returns {Promise<WebhookSubscription>} The updated subscription
|
|
6918
|
+
* @throws {ValidationError} If the params fail validation
|
|
6919
|
+
*
|
|
6920
|
+
* @example
|
|
6921
|
+
* ```typescript
|
|
6922
|
+
* await composio.webhooks.subscriptions.update('whs_abc123', {
|
|
6923
|
+
* enabledEvents: ['composio.trigger.message'],
|
|
6924
|
+
* });
|
|
6925
|
+
* ```
|
|
6926
|
+
*/
|
|
6927
|
+
update(id: string, params: WebhookSubscriptionUpdateParams, requestOptions?: ComposioRequestOptions): Promise<WebhookSubscription>;
|
|
6928
|
+
/**
|
|
6929
|
+
* Delete a webhook subscription. Deliveries stop immediately.
|
|
6930
|
+
*
|
|
6931
|
+
* @param {string} id - The subscription id
|
|
6932
|
+
* @returns {Promise<WebhookSubscriptionDeleteResponse>} `{ success }`
|
|
6933
|
+
*
|
|
6934
|
+
* @example
|
|
6935
|
+
* ```typescript
|
|
6936
|
+
* await composio.webhooks.subscriptions.delete('whs_abc123');
|
|
6937
|
+
* ```
|
|
6938
|
+
*/
|
|
6939
|
+
delete(id: string, requestOptions?: ComposioRequestOptions): Promise<WebhookSubscriptionDeleteResponse>;
|
|
6940
|
+
/**
|
|
6941
|
+
* Rotate the signing secret of a webhook subscription. The previous secret
|
|
6942
|
+
* stops validating, so update your verifier with the returned `secret`.
|
|
6943
|
+
*
|
|
6944
|
+
* @param {string} id - The subscription id
|
|
6945
|
+
* @returns {Promise<WebhookSubscriptionRotateSecretResponse>} `{ id, secret }`
|
|
6946
|
+
*
|
|
6947
|
+
* @example
|
|
6948
|
+
* ```typescript
|
|
6949
|
+
* const { secret } = await composio.webhooks.subscriptions.rotateSecret('whs_abc123');
|
|
6950
|
+
* ```
|
|
6951
|
+
*/
|
|
6952
|
+
rotateSecret(id: string, requestOptions?: ComposioRequestOptions): Promise<WebhookSubscriptionRotateSecretResponse>;
|
|
6953
|
+
/**
|
|
6954
|
+
* List the event types a subscription can enable, with the payload
|
|
6955
|
+
* versions each one supports.
|
|
6956
|
+
*
|
|
6957
|
+
* @returns {Promise<WebhookSubscriptionEventTypesResponse>} The available event types
|
|
6958
|
+
*
|
|
6959
|
+
* @example
|
|
6960
|
+
* ```typescript
|
|
6961
|
+
* const { items } = await composio.webhooks.subscriptions.listEventTypes();
|
|
6962
|
+
* console.log(items.map(item => item.eventType));
|
|
6963
|
+
* ```
|
|
6964
|
+
*/
|
|
6965
|
+
listEventTypes(requestOptions?: ComposioRequestOptions): Promise<WebhookSubscriptionEventTypesResponse>;
|
|
6966
|
+
}
|
|
6967
|
+
/**
|
|
6968
|
+
* `composio.webhooks.endpoints` — inbound webhook endpoints. Each endpoint is
|
|
6969
|
+
* the ingress URL Composio exposes for one toolkit + OAuth app pair, which you
|
|
6970
|
+
* register with the third-party provider so it can push events to Composio.
|
|
6971
|
+
*/
|
|
6972
|
+
declare class WebhookEndpoints {
|
|
6973
|
+
private client;
|
|
6974
|
+
constructor(client: ComposioClient);
|
|
6975
|
+
/**
|
|
6976
|
+
* List webhook endpoints, optionally filtered by toolkit.
|
|
6977
|
+
*
|
|
6978
|
+
* @param {WebhookEndpointListParams} [query] - Optional `toolkitSlug` filter
|
|
6979
|
+
* @returns {Promise<WebhookEndpointListResponse>} The endpoints
|
|
6980
|
+
*
|
|
6981
|
+
* @example
|
|
6982
|
+
* ```typescript
|
|
6983
|
+
* const { items } = await composio.webhooks.endpoints.list({ toolkitSlug: 'slack' });
|
|
6984
|
+
* ```
|
|
6985
|
+
*/
|
|
6986
|
+
list(query?: WebhookEndpointListParams, requestOptions?: ComposioRequestOptions): Promise<WebhookEndpointListResponse>;
|
|
6987
|
+
/**
|
|
6988
|
+
* Retrieve a webhook endpoint by its nano id.
|
|
6989
|
+
*
|
|
6990
|
+
* @param {string} nanoId - The endpoint nano id (e.g. `we_abc123`)
|
|
6991
|
+
* @returns {Promise<WebhookEndpoint>} The endpoint, with secret setup values masked
|
|
6992
|
+
*
|
|
6993
|
+
* @example
|
|
6994
|
+
* ```typescript
|
|
6995
|
+
* const endpoint = await composio.webhooks.endpoints.get('we_abc123');
|
|
6996
|
+
* console.log(endpoint.webhookUrl);
|
|
6997
|
+
* ```
|
|
6998
|
+
*/
|
|
6999
|
+
get(nanoId: string, requestOptions?: ComposioRequestOptions): Promise<WebhookEndpoint>;
|
|
7000
|
+
/**
|
|
7001
|
+
* Create a webhook endpoint for a toolkit + OAuth app pair. Returns the
|
|
7002
|
+
* existing endpoint when one already exists for that pair.
|
|
7003
|
+
*
|
|
7004
|
+
* @param {WebhookEndpointCreateParams} params - `toolkitSlug` and `clientId`
|
|
7005
|
+
* @returns {Promise<WebhookEndpoint>} The endpoint; register `webhookUrl` with the provider
|
|
7006
|
+
* @throws {ValidationError} If the params fail validation
|
|
7007
|
+
*
|
|
7008
|
+
* @example
|
|
7009
|
+
* ```typescript
|
|
7010
|
+
* const endpoint = await composio.webhooks.endpoints.create({
|
|
7011
|
+
* toolkitSlug: 'slack',
|
|
7012
|
+
* clientId: 'my-slack-app-client-id',
|
|
7013
|
+
* });
|
|
7014
|
+
* ```
|
|
7015
|
+
*/
|
|
7016
|
+
create(params: WebhookEndpointCreateParams, requestOptions?: ComposioRequestOptions): Promise<WebhookEndpoint>;
|
|
7017
|
+
/**
|
|
7018
|
+
* Replace the setup fields of a webhook endpoint. All required setup fields
|
|
7019
|
+
* for the toolkit must be provided — this is the initial configuration.
|
|
7020
|
+
*
|
|
7021
|
+
* @param {string} nanoId - The endpoint nano id
|
|
7022
|
+
* @param {WebhookEndpointReplaceParams} params - `data` with every required setup field
|
|
7023
|
+
* @returns {Promise<WebhookEndpoint>} The configured endpoint
|
|
7024
|
+
* @throws {ValidationError} If the params fail validation
|
|
7025
|
+
*
|
|
7026
|
+
* @example
|
|
7027
|
+
* ```typescript
|
|
7028
|
+
* await composio.webhooks.endpoints.replace('we_abc123', {
|
|
7029
|
+
* data: { signing_secret: process.env.SLACK_SIGNING_SECRET! },
|
|
7030
|
+
* });
|
|
7031
|
+
* ```
|
|
7032
|
+
*/
|
|
7033
|
+
replace(nanoId: string, params: WebhookEndpointReplaceParams, requestOptions?: ComposioRequestOptions): Promise<WebhookEndpoint>;
|
|
7034
|
+
/**
|
|
7035
|
+
* Merge setup fields into a webhook endpoint. Omitted fields are preserved.
|
|
7036
|
+
*
|
|
7037
|
+
* @param {string} nanoId - The endpoint nano id
|
|
7038
|
+
* @param {WebhookEndpointUpdateParams} params - `data` with the fields to change
|
|
7039
|
+
* @returns {Promise<WebhookEndpoint>} The updated endpoint
|
|
7040
|
+
* @throws {ValidationError} If the params fail validation
|
|
7041
|
+
*
|
|
7042
|
+
* @example
|
|
7043
|
+
* ```typescript
|
|
7044
|
+
* await composio.webhooks.endpoints.update('we_abc123', {
|
|
7045
|
+
* data: { signing_secret: 'rotated-secret' },
|
|
7046
|
+
* });
|
|
7047
|
+
* ```
|
|
7048
|
+
*/
|
|
7049
|
+
update(nanoId: string, params: WebhookEndpointUpdateParams, requestOptions?: ComposioRequestOptions): Promise<WebhookEndpoint>;
|
|
7050
|
+
}
|
|
7051
|
+
/**
|
|
7052
|
+
* `composio.webhooks` namespace.
|
|
7053
|
+
*
|
|
7054
|
+
* - `subscriptions`: the project's outbound webhook subscription (where
|
|
7055
|
+
* Composio delivers trigger and lifecycle events).
|
|
7056
|
+
* - `endpoints`: inbound ingress URLs for third-party providers, one per
|
|
7057
|
+
* toolkit + OAuth app pair.
|
|
7058
|
+
*
|
|
7059
|
+
* @example
|
|
7060
|
+
* ```typescript
|
|
7061
|
+
* const subscription = await composio.webhooks.subscriptions.set({
|
|
7062
|
+
* webhookUrl: 'https://example.com/webhooks/composio',
|
|
7063
|
+
* });
|
|
7064
|
+
* const endpoints = await composio.webhooks.endpoints.list({ toolkitSlug: 'slack' });
|
|
7065
|
+
* ```
|
|
7066
|
+
*/
|
|
7067
|
+
declare class Webhooks {
|
|
7068
|
+
/** Manage the project's outbound webhook subscription. */
|
|
7069
|
+
subscriptions: WebhookSubscriptions;
|
|
7070
|
+
/** Manage inbound webhook endpoints per toolkit + OAuth app. */
|
|
7071
|
+
endpoints: WebhookEndpoints;
|
|
7072
|
+
constructor(client: ComposioClient);
|
|
7073
|
+
}
|
|
7074
|
+
//#endregion
|
|
7075
|
+
//#region src/types/logs.types.d.ts
|
|
7076
|
+
/**
|
|
7077
|
+
* Fields a tool-execution log search can filter on.
|
|
7078
|
+
*/
|
|
7079
|
+
declare const LogSearchFilterFieldSchema: z$1.ZodEnum<["tool_slug", "toolkit_slug", "connected_account_id", "auth_config_id", "status", "user_id", "session_id", "sandbox_id", "request_id", "log_id"]>;
|
|
7080
|
+
type LogSearchFilterField = z$1.infer<typeof LogSearchFilterFieldSchema>;
|
|
7081
|
+
declare const LogSearchFilterOperatorSchema: z$1.ZodEnum<["==", "!=", "contains", "not_contains"]>;
|
|
7082
|
+
type LogSearchFilterOperator = z$1.infer<typeof LogSearchFilterOperatorSchema>;
|
|
7083
|
+
declare const LogSearchFilterSchema: z$1.ZodObject<{
|
|
7084
|
+
field: z$1.ZodEnum<["tool_slug", "toolkit_slug", "connected_account_id", "auth_config_id", "status", "user_id", "session_id", "sandbox_id", "request_id", "log_id"]>;
|
|
7085
|
+
operator: z$1.ZodEnum<["==", "!=", "contains", "not_contains"]>;
|
|
7086
|
+
value: z$1.ZodString;
|
|
7087
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
7088
|
+
value: string;
|
|
7089
|
+
field: "status" | "log_id" | "user_id" | "connected_account_id" | "auth_config_id" | "tool_slug" | "toolkit_slug" | "session_id" | "sandbox_id" | "request_id";
|
|
7090
|
+
operator: "==" | "!=" | "contains" | "not_contains";
|
|
7091
|
+
}, {
|
|
7092
|
+
value: string;
|
|
7093
|
+
field: "status" | "log_id" | "user_id" | "connected_account_id" | "auth_config_id" | "tool_slug" | "toolkit_slug" | "session_id" | "sandbox_id" | "request_id";
|
|
7094
|
+
operator: "==" | "!=" | "contains" | "not_contains";
|
|
7095
|
+
}>;
|
|
7096
|
+
type LogSearchFilter = z$1.infer<typeof LogSearchFilterSchema>;
|
|
7097
|
+
declare const LogSearchTimeRangeSchema: z$1.ZodObject<{
|
|
7098
|
+
/** Start time in epoch milliseconds (inclusive). */
|
|
7099
|
+
from: z$1.ZodNumber;
|
|
7100
|
+
/** End time in epoch milliseconds. */
|
|
7101
|
+
to: z$1.ZodNumber;
|
|
7102
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
7103
|
+
from: number;
|
|
7104
|
+
to: number;
|
|
7105
|
+
}, {
|
|
7106
|
+
from: number;
|
|
7107
|
+
to: number;
|
|
7108
|
+
}>;
|
|
7109
|
+
type LogSearchTimeRange = z$1.infer<typeof LogSearchTimeRangeSchema>;
|
|
7110
|
+
/**
|
|
7111
|
+
* Params for `composio.logs.search()`.
|
|
7112
|
+
*/
|
|
7113
|
+
declare const LogSearchParamsSchema: z$1.ZodObject<{
|
|
7114
|
+
limit: z$1.ZodOptional<z$1.ZodNumber>;
|
|
7115
|
+
cursor: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
7116
|
+
filters: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
|
|
7117
|
+
field: z$1.ZodEnum<["tool_slug", "toolkit_slug", "connected_account_id", "auth_config_id", "status", "user_id", "session_id", "sandbox_id", "request_id", "log_id"]>;
|
|
7118
|
+
operator: z$1.ZodEnum<["==", "!=", "contains", "not_contains"]>;
|
|
7119
|
+
value: z$1.ZodString;
|
|
7120
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
7121
|
+
value: string;
|
|
7122
|
+
field: "status" | "log_id" | "user_id" | "connected_account_id" | "auth_config_id" | "tool_slug" | "toolkit_slug" | "session_id" | "sandbox_id" | "request_id";
|
|
7123
|
+
operator: "==" | "!=" | "contains" | "not_contains";
|
|
7124
|
+
}, {
|
|
7125
|
+
value: string;
|
|
7126
|
+
field: "status" | "log_id" | "user_id" | "connected_account_id" | "auth_config_id" | "tool_slug" | "toolkit_slug" | "session_id" | "sandbox_id" | "request_id";
|
|
7127
|
+
operator: "==" | "!=" | "contains" | "not_contains";
|
|
7128
|
+
}>, "many">>;
|
|
7129
|
+
timeRange: z$1.ZodOptional<z$1.ZodObject<{
|
|
7130
|
+
/** Start time in epoch milliseconds (inclusive). */
|
|
7131
|
+
from: z$1.ZodNumber;
|
|
7132
|
+
/** End time in epoch milliseconds. */
|
|
7133
|
+
to: z$1.ZodNumber;
|
|
7134
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
7135
|
+
from: number;
|
|
7136
|
+
to: number;
|
|
7137
|
+
}, {
|
|
7138
|
+
from: number;
|
|
7139
|
+
to: number;
|
|
7140
|
+
}>>;
|
|
7141
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
7142
|
+
limit?: number | undefined;
|
|
7143
|
+
cursor?: string | null | undefined;
|
|
7144
|
+
filters?: {
|
|
7145
|
+
value: string;
|
|
7146
|
+
field: "status" | "log_id" | "user_id" | "connected_account_id" | "auth_config_id" | "tool_slug" | "toolkit_slug" | "session_id" | "sandbox_id" | "request_id";
|
|
7147
|
+
operator: "==" | "!=" | "contains" | "not_contains";
|
|
7148
|
+
}[] | undefined;
|
|
7149
|
+
timeRange?: {
|
|
7150
|
+
from: number;
|
|
7151
|
+
to: number;
|
|
7152
|
+
} | undefined;
|
|
7153
|
+
}, {
|
|
7154
|
+
limit?: number | undefined;
|
|
7155
|
+
cursor?: string | null | undefined;
|
|
7156
|
+
filters?: {
|
|
7157
|
+
value: string;
|
|
7158
|
+
field: "status" | "log_id" | "user_id" | "connected_account_id" | "auth_config_id" | "tool_slug" | "toolkit_slug" | "session_id" | "sandbox_id" | "request_id";
|
|
7159
|
+
operator: "==" | "!=" | "contains" | "not_contains";
|
|
7160
|
+
}[] | undefined;
|
|
7161
|
+
timeRange?: {
|
|
7162
|
+
from: number;
|
|
7163
|
+
to: number;
|
|
7164
|
+
} | undefined;
|
|
7165
|
+
}>;
|
|
7166
|
+
type LogSearchParams = z$1.infer<typeof LogSearchParamsSchema>;
|
|
7167
|
+
declare const ToolExecutionLogStatusSchema: z$1.ZodEnum<["success", "failed"]>;
|
|
7168
|
+
declare const ToolExecutionLogLevelSchema: z$1.ZodEnum<["info", "error", "warn"]>;
|
|
7169
|
+
declare const ToolExecutionLogParentSchema: z$1.ZodNullable<z$1.ZodObject<{
|
|
7170
|
+
logId: z$1.ZodString;
|
|
7171
|
+
toolSlug: z$1.ZodString;
|
|
7172
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
7173
|
+
logId: string;
|
|
7174
|
+
toolSlug: string;
|
|
7175
|
+
}, {
|
|
7176
|
+
logId: string;
|
|
7177
|
+
toolSlug: string;
|
|
7178
|
+
}>>;
|
|
7179
|
+
/**
|
|
7180
|
+
* A tool-execution log entry as returned by `composio.logs.search()`.
|
|
7181
|
+
*/
|
|
7182
|
+
declare const ToolExecutionLogSchema: z$1.ZodObject<{
|
|
7183
|
+
id: z$1.ZodString;
|
|
7184
|
+
/** ISO 8601 timestamp. */
|
|
7185
|
+
timestamp: z$1.ZodString;
|
|
7186
|
+
/** Log event type, e.g. `tool.execution`. */
|
|
7187
|
+
type: z$1.ZodString;
|
|
7188
|
+
status: z$1.ZodEnum<["success", "failed"]>;
|
|
7189
|
+
level: z$1.ZodEnum<["info", "error", "warn"]>;
|
|
7190
|
+
message: z$1.ZodOptional<z$1.ZodString>;
|
|
7191
|
+
metadata: z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>;
|
|
7192
|
+
metrics: z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>;
|
|
7193
|
+
parent: z$1.ZodNullable<z$1.ZodObject<{
|
|
7194
|
+
logId: z$1.ZodString;
|
|
7195
|
+
toolSlug: z$1.ZodString;
|
|
7196
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
7197
|
+
logId: string;
|
|
7198
|
+
toolSlug: string;
|
|
7199
|
+
}, {
|
|
7200
|
+
logId: string;
|
|
7201
|
+
toolSlug: string;
|
|
7202
|
+
}>>;
|
|
7203
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
7204
|
+
type: string;
|
|
7205
|
+
status: "success" | "failed";
|
|
7206
|
+
id: string;
|
|
7207
|
+
metadata: Record<string, unknown>;
|
|
7208
|
+
timestamp: string;
|
|
7209
|
+
level: "error" | "warn" | "info";
|
|
7210
|
+
metrics: Record<string, unknown>;
|
|
7211
|
+
parent: {
|
|
7212
|
+
logId: string;
|
|
7213
|
+
toolSlug: string;
|
|
7214
|
+
} | null;
|
|
7215
|
+
message?: string | undefined;
|
|
7216
|
+
}, {
|
|
7217
|
+
type: string;
|
|
7218
|
+
status: "success" | "failed";
|
|
7219
|
+
id: string;
|
|
7220
|
+
metadata: Record<string, unknown>;
|
|
7221
|
+
timestamp: string;
|
|
7222
|
+
level: "error" | "warn" | "info";
|
|
7223
|
+
metrics: Record<string, unknown>;
|
|
7224
|
+
parent: {
|
|
7225
|
+
logId: string;
|
|
7226
|
+
toolSlug: string;
|
|
7227
|
+
} | null;
|
|
7228
|
+
message?: string | undefined;
|
|
7229
|
+
}>;
|
|
7230
|
+
type ToolExecutionLog = z$1.infer<typeof ToolExecutionLogSchema>;
|
|
7231
|
+
declare const LogSearchResponseSchema: z$1.ZodObject<{
|
|
7232
|
+
logs: z$1.ZodArray<z$1.ZodObject<{
|
|
7233
|
+
id: z$1.ZodString;
|
|
7234
|
+
/** ISO 8601 timestamp. */
|
|
7235
|
+
timestamp: z$1.ZodString;
|
|
7236
|
+
/** Log event type, e.g. `tool.execution`. */
|
|
7237
|
+
type: z$1.ZodString;
|
|
7238
|
+
status: z$1.ZodEnum<["success", "failed"]>;
|
|
7239
|
+
level: z$1.ZodEnum<["info", "error", "warn"]>;
|
|
7240
|
+
message: z$1.ZodOptional<z$1.ZodString>;
|
|
7241
|
+
metadata: z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>;
|
|
7242
|
+
metrics: z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>;
|
|
7243
|
+
parent: z$1.ZodNullable<z$1.ZodObject<{
|
|
7244
|
+
logId: z$1.ZodString;
|
|
7245
|
+
toolSlug: z$1.ZodString;
|
|
7246
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
7247
|
+
logId: string;
|
|
7248
|
+
toolSlug: string;
|
|
7249
|
+
}, {
|
|
7250
|
+
logId: string;
|
|
7251
|
+
toolSlug: string;
|
|
7252
|
+
}>>;
|
|
7253
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
7254
|
+
type: string;
|
|
7255
|
+
status: "success" | "failed";
|
|
7256
|
+
id: string;
|
|
7257
|
+
metadata: Record<string, unknown>;
|
|
7258
|
+
timestamp: string;
|
|
7259
|
+
level: "error" | "warn" | "info";
|
|
7260
|
+
metrics: Record<string, unknown>;
|
|
7261
|
+
parent: {
|
|
7262
|
+
logId: string;
|
|
7263
|
+
toolSlug: string;
|
|
7264
|
+
} | null;
|
|
7265
|
+
message?: string | undefined;
|
|
7266
|
+
}, {
|
|
7267
|
+
type: string;
|
|
7268
|
+
status: "success" | "failed";
|
|
7269
|
+
id: string;
|
|
7270
|
+
metadata: Record<string, unknown>;
|
|
7271
|
+
timestamp: string;
|
|
7272
|
+
level: "error" | "warn" | "info";
|
|
7273
|
+
metrics: Record<string, unknown>;
|
|
7274
|
+
parent: {
|
|
7275
|
+
logId: string;
|
|
7276
|
+
toolSlug: string;
|
|
7277
|
+
} | null;
|
|
7278
|
+
message?: string | undefined;
|
|
7279
|
+
}>, "many">;
|
|
7280
|
+
nextCursor: z$1.ZodNullable<z$1.ZodString>;
|
|
7281
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
7282
|
+
nextCursor: string | null;
|
|
7283
|
+
logs: {
|
|
7284
|
+
type: string;
|
|
7285
|
+
status: "success" | "failed";
|
|
7286
|
+
id: string;
|
|
7287
|
+
metadata: Record<string, unknown>;
|
|
7288
|
+
timestamp: string;
|
|
7289
|
+
level: "error" | "warn" | "info";
|
|
7290
|
+
metrics: Record<string, unknown>;
|
|
7291
|
+
parent: {
|
|
7292
|
+
logId: string;
|
|
7293
|
+
toolSlug: string;
|
|
7294
|
+
} | null;
|
|
7295
|
+
message?: string | undefined;
|
|
7296
|
+
}[];
|
|
7297
|
+
}, {
|
|
7298
|
+
nextCursor: string | null;
|
|
7299
|
+
logs: {
|
|
7300
|
+
type: string;
|
|
7301
|
+
status: "success" | "failed";
|
|
7302
|
+
id: string;
|
|
7303
|
+
metadata: Record<string, unknown>;
|
|
7304
|
+
timestamp: string;
|
|
7305
|
+
level: "error" | "warn" | "info";
|
|
7306
|
+
metrics: Record<string, unknown>;
|
|
7307
|
+
parent: {
|
|
7308
|
+
logId: string;
|
|
7309
|
+
toolSlug: string;
|
|
7310
|
+
} | null;
|
|
7311
|
+
message?: string | undefined;
|
|
7312
|
+
}[];
|
|
7313
|
+
}>;
|
|
7314
|
+
type LogSearchResponse = z$1.infer<typeof LogSearchResponseSchema>;
|
|
7315
|
+
/**
|
|
7316
|
+
* A single tool-execution log with its full detail, as returned by
|
|
7317
|
+
* `composio.logs.get()`.
|
|
7318
|
+
*/
|
|
7319
|
+
declare const ToolExecutionLogDetailSchema: z$1.ZodObject<{
|
|
7320
|
+
id: z$1.ZodString;
|
|
7321
|
+
/** ISO 8601 timestamp. */
|
|
7322
|
+
timestamp: z$1.ZodString;
|
|
7323
|
+
/** Log event type, e.g. `tool.execution`. */
|
|
7324
|
+
type: z$1.ZodString;
|
|
7325
|
+
status: z$1.ZodEnum<["success", "failed"]>;
|
|
7326
|
+
level: z$1.ZodEnum<["info", "error", "warn"]>;
|
|
7327
|
+
message: z$1.ZodOptional<z$1.ZodString>;
|
|
7328
|
+
metadata: z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>;
|
|
7329
|
+
metrics: z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>;
|
|
7330
|
+
parent: z$1.ZodNullable<z$1.ZodObject<{
|
|
7331
|
+
logId: z$1.ZodString;
|
|
7332
|
+
toolSlug: z$1.ZodString;
|
|
7333
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
7334
|
+
logId: string;
|
|
7335
|
+
toolSlug: string;
|
|
7336
|
+
}, {
|
|
7337
|
+
logId: string;
|
|
7338
|
+
toolSlug: string;
|
|
7339
|
+
}>>;
|
|
7340
|
+
} & {
|
|
7341
|
+
timings: z$1.ZodOptional<z$1.ZodObject<{
|
|
7342
|
+
/** Epoch milliseconds. */
|
|
7343
|
+
startTime: z$1.ZodNumber;
|
|
7344
|
+
/** Epoch milliseconds. */
|
|
7345
|
+
endTime: z$1.ZodNumber;
|
|
7346
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
7347
|
+
startTime: number;
|
|
7348
|
+
endTime: number;
|
|
7349
|
+
}, {
|
|
7350
|
+
startTime: number;
|
|
7351
|
+
endTime: number;
|
|
7352
|
+
}>>;
|
|
7353
|
+
context: z$1.ZodObject<{
|
|
7354
|
+
sessionId: z$1.ZodOptional<z$1.ZodString>;
|
|
7355
|
+
traceId: z$1.ZodOptional<z$1.ZodString>;
|
|
7356
|
+
requestId: z$1.ZodOptional<z$1.ZodString>;
|
|
7357
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
7358
|
+
sessionId?: string | undefined;
|
|
7359
|
+
traceId?: string | undefined;
|
|
7360
|
+
requestId?: string | undefined;
|
|
7361
|
+
}, {
|
|
7362
|
+
sessionId?: string | undefined;
|
|
7363
|
+
traceId?: string | undefined;
|
|
7364
|
+
requestId?: string | undefined;
|
|
7365
|
+
}>;
|
|
7366
|
+
source: z$1.ZodObject<{
|
|
7367
|
+
host: z$1.ZodOptional<z$1.ZodString>;
|
|
7368
|
+
framework: z$1.ZodOptional<z$1.ZodString>;
|
|
7369
|
+
language: z$1.ZodOptional<z$1.ZodString>;
|
|
7370
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
7371
|
+
host?: string | undefined;
|
|
7372
|
+
framework?: string | undefined;
|
|
7373
|
+
language?: string | undefined;
|
|
7374
|
+
}, {
|
|
7375
|
+
host?: string | undefined;
|
|
7376
|
+
framework?: string | undefined;
|
|
7377
|
+
language?: string | undefined;
|
|
7378
|
+
}>;
|
|
7379
|
+
data: z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>;
|
|
7380
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
7381
|
+
type: string;
|
|
7382
|
+
status: "success" | "failed";
|
|
7383
|
+
data: Record<string, unknown>;
|
|
7384
|
+
id: string;
|
|
7385
|
+
metadata: Record<string, unknown>;
|
|
7386
|
+
timestamp: string;
|
|
7387
|
+
level: "error" | "warn" | "info";
|
|
7388
|
+
metrics: Record<string, unknown>;
|
|
7389
|
+
parent: {
|
|
7390
|
+
logId: string;
|
|
7391
|
+
toolSlug: string;
|
|
7392
|
+
} | null;
|
|
7393
|
+
context: {
|
|
7394
|
+
sessionId?: string | undefined;
|
|
7395
|
+
traceId?: string | undefined;
|
|
7396
|
+
requestId?: string | undefined;
|
|
7397
|
+
};
|
|
7398
|
+
source: {
|
|
7399
|
+
host?: string | undefined;
|
|
7400
|
+
framework?: string | undefined;
|
|
7401
|
+
language?: string | undefined;
|
|
7402
|
+
};
|
|
7403
|
+
message?: string | undefined;
|
|
7404
|
+
timings?: {
|
|
7405
|
+
startTime: number;
|
|
7406
|
+
endTime: number;
|
|
7407
|
+
} | undefined;
|
|
7408
|
+
}, {
|
|
7409
|
+
type: string;
|
|
7410
|
+
status: "success" | "failed";
|
|
7411
|
+
data: Record<string, unknown>;
|
|
7412
|
+
id: string;
|
|
7413
|
+
metadata: Record<string, unknown>;
|
|
7414
|
+
timestamp: string;
|
|
7415
|
+
level: "error" | "warn" | "info";
|
|
7416
|
+
metrics: Record<string, unknown>;
|
|
7417
|
+
parent: {
|
|
7418
|
+
logId: string;
|
|
7419
|
+
toolSlug: string;
|
|
7420
|
+
} | null;
|
|
7421
|
+
context: {
|
|
7422
|
+
sessionId?: string | undefined;
|
|
7423
|
+
traceId?: string | undefined;
|
|
7424
|
+
requestId?: string | undefined;
|
|
7425
|
+
};
|
|
7426
|
+
source: {
|
|
7427
|
+
host?: string | undefined;
|
|
7428
|
+
framework?: string | undefined;
|
|
7429
|
+
language?: string | undefined;
|
|
7430
|
+
};
|
|
7431
|
+
message?: string | undefined;
|
|
7432
|
+
timings?: {
|
|
7433
|
+
startTime: number;
|
|
7434
|
+
endTime: number;
|
|
7435
|
+
} | undefined;
|
|
7436
|
+
}>;
|
|
7437
|
+
type ToolExecutionLogDetail = z$1.infer<typeof ToolExecutionLogDetailSchema>;
|
|
7438
|
+
//#endregion
|
|
7439
|
+
//#region src/models/Logs.d.ts
|
|
7440
|
+
/**
|
|
7441
|
+
* `composio.logs` — tool-execution logs.
|
|
7442
|
+
*
|
|
7443
|
+
* @example
|
|
7444
|
+
* ```typescript
|
|
7445
|
+
* const { logs, nextCursor } = await composio.logs.search({
|
|
7446
|
+
* filters: [{ field: 'toolkit_slug', operator: '==', value: 'github' }],
|
|
7447
|
+
* limit: 20,
|
|
7448
|
+
* });
|
|
7449
|
+
* const detail = await composio.logs.get(logs[0].id);
|
|
7450
|
+
* ```
|
|
7451
|
+
*/
|
|
7452
|
+
declare class Logs {
|
|
7453
|
+
private client;
|
|
7454
|
+
constructor(client: ComposioClient);
|
|
7455
|
+
/**
|
|
7456
|
+
* Search tool-execution logs with filters, a time range and cursor
|
|
7457
|
+
* pagination.
|
|
7458
|
+
*
|
|
7459
|
+
* @param {LogSearchParams} [params] - Filters, `timeRange`, `limit` and `cursor`
|
|
7460
|
+
* @returns {Promise<LogSearchResponse>} Matching logs and the next cursor
|
|
7461
|
+
* @throws {ValidationError} If the params fail validation
|
|
7462
|
+
*
|
|
7463
|
+
* @example
|
|
7464
|
+
* ```typescript
|
|
7465
|
+
* const { logs } = await composio.logs.search({
|
|
7466
|
+
* filters: [
|
|
7467
|
+
* { field: 'status', operator: '==', value: 'failed' },
|
|
7468
|
+
* { field: 'user_id', operator: '==', value: 'user_123' },
|
|
7469
|
+
* ],
|
|
7470
|
+
* timeRange: { from: Date.now() - 24 * 60 * 60 * 1000, to: Date.now() },
|
|
7471
|
+
* });
|
|
7472
|
+
* ```
|
|
7473
|
+
*/
|
|
7474
|
+
search(params?: LogSearchParams, requestOptions?: ComposioRequestOptions): Promise<LogSearchResponse>;
|
|
7475
|
+
/**
|
|
7476
|
+
* Retrieve one tool-execution log with its full detail (timings, context,
|
|
7477
|
+
* source and raw `data`).
|
|
7478
|
+
*
|
|
7479
|
+
* @param {string} id - The log id
|
|
7480
|
+
* @returns {Promise<ToolExecutionLogDetail>} The log detail
|
|
7481
|
+
*
|
|
7482
|
+
* @example
|
|
7483
|
+
* ```typescript
|
|
7484
|
+
* const log = await composio.logs.get('log_abc123');
|
|
7485
|
+
* console.log(log.status, log.timings?.endTime);
|
|
7486
|
+
* ```
|
|
7487
|
+
*/
|
|
7488
|
+
get(id: string, requestOptions?: ComposioRequestOptions): Promise<ToolExecutionLogDetail>;
|
|
7489
|
+
}
|
|
7490
|
+
//#endregion
|
|
7491
|
+
//#region src/types/keyring.types.d.ts
|
|
7492
|
+
/**
|
|
7493
|
+
* A public JWK a secret can be sealed to. Fields keep their JWK names so a
|
|
7494
|
+
* key can be handed straight to WebCrypto or a JOSE library.
|
|
7495
|
+
*/
|
|
7496
|
+
declare const KeyringTransferKeySchema: z$1.ZodObject<{
|
|
7497
|
+
/** Key type. Always `RSA`. */
|
|
7498
|
+
kty: z$1.ZodString;
|
|
7499
|
+
/** RSA modulus, base64url-encoded. */
|
|
7500
|
+
n: z$1.ZodString;
|
|
7501
|
+
/** RSA public exponent, base64url-encoded. */
|
|
7502
|
+
e: z$1.ZodString;
|
|
7503
|
+
/** Key-management algorithm for the JWE (`RSA-OAEP-256`). Pair it with `A256GCM` content encryption. */
|
|
7504
|
+
alg: z$1.ZodString;
|
|
7505
|
+
/** Key use. Always `enc`. */
|
|
7506
|
+
use: z$1.ZodString;
|
|
7507
|
+
/** Key identifier. Put it in the JWE protected header. */
|
|
7508
|
+
kid: z$1.ZodString;
|
|
7509
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
7510
|
+
kty: string;
|
|
7511
|
+
n: string;
|
|
7512
|
+
e: string;
|
|
7513
|
+
alg: string;
|
|
7514
|
+
use: string;
|
|
7515
|
+
kid: string;
|
|
7516
|
+
}, {
|
|
7517
|
+
kty: string;
|
|
7518
|
+
n: string;
|
|
7519
|
+
e: string;
|
|
7520
|
+
alg: string;
|
|
7521
|
+
use: string;
|
|
7522
|
+
kid: string;
|
|
7523
|
+
}>;
|
|
7524
|
+
type KeyringTransferKey = z$1.infer<typeof KeyringTransferKeySchema>;
|
|
7525
|
+
/**
|
|
7526
|
+
* Response of `composio.keyring.listTransferKeys()`.
|
|
7527
|
+
*/
|
|
7528
|
+
declare const KeyringTransferKeysResponseSchema: z$1.ZodObject<{
|
|
7529
|
+
/** The `kid` of the key to seal new secrets to. */
|
|
7530
|
+
activeKid: z$1.ZodString;
|
|
7531
|
+
/** Every currently accepted transfer key, newest first. */
|
|
7532
|
+
keys: z$1.ZodArray<z$1.ZodObject<{
|
|
7533
|
+
/** Key type. Always `RSA`. */
|
|
7534
|
+
kty: z$1.ZodString;
|
|
7535
|
+
/** RSA modulus, base64url-encoded. */
|
|
7536
|
+
n: z$1.ZodString;
|
|
7537
|
+
/** RSA public exponent, base64url-encoded. */
|
|
7538
|
+
e: z$1.ZodString;
|
|
7539
|
+
/** Key-management algorithm for the JWE (`RSA-OAEP-256`). Pair it with `A256GCM` content encryption. */
|
|
7540
|
+
alg: z$1.ZodString;
|
|
7541
|
+
/** Key use. Always `enc`. */
|
|
7542
|
+
use: z$1.ZodString;
|
|
7543
|
+
/** Key identifier. Put it in the JWE protected header. */
|
|
7544
|
+
kid: z$1.ZodString;
|
|
7545
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
7546
|
+
kty: string;
|
|
7547
|
+
n: string;
|
|
7548
|
+
e: string;
|
|
7549
|
+
alg: string;
|
|
7550
|
+
use: string;
|
|
7551
|
+
kid: string;
|
|
7552
|
+
}, {
|
|
7553
|
+
kty: string;
|
|
7554
|
+
n: string;
|
|
7555
|
+
e: string;
|
|
7556
|
+
alg: string;
|
|
7557
|
+
use: string;
|
|
7558
|
+
kid: string;
|
|
7559
|
+
}>, "many">;
|
|
7560
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
7561
|
+
keys: {
|
|
7562
|
+
kty: string;
|
|
7563
|
+
n: string;
|
|
7564
|
+
e: string;
|
|
7565
|
+
alg: string;
|
|
7566
|
+
use: string;
|
|
7567
|
+
kid: string;
|
|
7568
|
+
}[];
|
|
7569
|
+
activeKid: string;
|
|
7570
|
+
}, {
|
|
7571
|
+
keys: {
|
|
7572
|
+
kty: string;
|
|
7573
|
+
n: string;
|
|
7574
|
+
e: string;
|
|
7575
|
+
alg: string;
|
|
7576
|
+
use: string;
|
|
7577
|
+
kid: string;
|
|
7578
|
+
}[];
|
|
7579
|
+
activeKid: string;
|
|
7580
|
+
}>;
|
|
7581
|
+
type KeyringTransferKeysResponse = z$1.infer<typeof KeyringTransferKeysResponseSchema>;
|
|
7582
|
+
//#endregion
|
|
7583
|
+
//#region src/models/Keyring.d.ts
|
|
7584
|
+
/**
|
|
7585
|
+
* `composio.keyring` — the organization's customer-managed keyring.
|
|
7586
|
+
*
|
|
7587
|
+
* @example
|
|
7588
|
+
* ```typescript
|
|
7589
|
+
* const { activeKid, keys } = await composio.keyring.listTransferKeys();
|
|
7590
|
+
* const sealingKey = keys.find(key => key.kid === activeKid);
|
|
7591
|
+
* ```
|
|
7592
|
+
*/
|
|
7593
|
+
declare class Keyring {
|
|
7594
|
+
private client;
|
|
7595
|
+
constructor(client: ComposioClient);
|
|
7596
|
+
/**
|
|
7597
|
+
* Lists the public transfer keys of the organization's active customer
|
|
7598
|
+
* keyring, the keys a secret is sealed to before it is sent to Composio.
|
|
7599
|
+
*
|
|
7600
|
+
* Always seal new secrets to the key whose `kid` is `activeKid`: a JWE with
|
|
7601
|
+
* `RSA-OAEP-256` key management, `A256GCM` content encryption, and the
|
|
7602
|
+
* `kid` in the protected header. Older keys stay listed so values sealed to
|
|
7603
|
+
* them remain openable.
|
|
7604
|
+
*
|
|
7605
|
+
* The organization behind the API key must have an ACTIVE customer keyring
|
|
7606
|
+
* instance; otherwise the API answers 404.
|
|
7607
|
+
*
|
|
7608
|
+
* @returns {Promise<KeyringTransferKeysResponse>} The active key ID and every accepted public JWK, newest first
|
|
7609
|
+
*
|
|
7610
|
+
* @example
|
|
7611
|
+
* ```typescript
|
|
7612
|
+
* import { CompactEncrypt, importJWK } from 'jose';
|
|
7613
|
+
*
|
|
7614
|
+
* const { activeKid, keys } = await composio.keyring.listTransferKeys();
|
|
7615
|
+
* const jwk = keys.find(key => key.kid === activeKid)!;
|
|
7616
|
+
* const sealed = await new CompactEncrypt(new TextEncoder().encode(secret))
|
|
7617
|
+
* .setProtectedHeader({ alg: 'RSA-OAEP-256', enc: 'A256GCM', kid: activeKid })
|
|
7618
|
+
* .encrypt(await importJWK(jwk, 'RSA-OAEP-256'));
|
|
7619
|
+
* ```
|
|
7620
|
+
*/
|
|
7621
|
+
listTransferKeys(requestOptions?: ComposioRequestOptions): Promise<KeyringTransferKeysResponse>;
|
|
7622
|
+
}
|
|
7623
|
+
//#endregion
|
|
7624
|
+
//#region src/utils/logger.d.ts
|
|
7625
|
+
declare const LOG_LEVELS: {
|
|
7626
|
+
readonly silent: -1;
|
|
7627
|
+
readonly error: 0;
|
|
7628
|
+
readonly warn: 1;
|
|
7629
|
+
readonly info: 2;
|
|
7630
|
+
readonly debug: 3;
|
|
7631
|
+
};
|
|
7632
|
+
type LogLevel = keyof typeof LOG_LEVELS;
|
|
7633
|
+
/**
|
|
7634
|
+
* Destination for SDK log output. Each method receives the already
|
|
7635
|
+
* formatted and redacted message as its single argument. `console` satisfies
|
|
7636
|
+
* this interface, and so do most structured loggers (pino, winston, ...).
|
|
7637
|
+
*/
|
|
7638
|
+
interface ComposioLogger {
|
|
7639
|
+
error: (...args: unknown[]) => void;
|
|
7640
|
+
warn: (...args: unknown[]) => void;
|
|
7641
|
+
info: (...args: unknown[]) => void;
|
|
7642
|
+
debug: (...args: unknown[]) => void;
|
|
7643
|
+
}
|
|
7644
|
+
interface LoggerOptions {
|
|
7645
|
+
level?: LogLevel;
|
|
7646
|
+
includeTimestamp?: boolean;
|
|
7647
|
+
/** Where formatted output is written. Defaults to `console`. */
|
|
7648
|
+
sink?: ComposioLogger;
|
|
7649
|
+
}
|
|
7650
|
+
interface LoggerConfigureOptions {
|
|
7651
|
+
level?: LogLevel;
|
|
7652
|
+
sink?: ComposioLogger;
|
|
7653
|
+
}
|
|
7654
|
+
declare class Logger {
|
|
7655
|
+
private level;
|
|
7656
|
+
private readonly includeTimestamp;
|
|
7657
|
+
private sink;
|
|
7658
|
+
constructor(options?: LoggerOptions);
|
|
7659
|
+
/**
|
|
7660
|
+
* Reconfigure the level and/or sink in place. Omitted fields are left
|
|
7661
|
+
* unchanged, so `configure({ level: 'debug' })` keeps the current sink.
|
|
7662
|
+
*/
|
|
7663
|
+
configure(options: LoggerConfigureOptions): void;
|
|
7664
|
+
getLevel(): LogLevel;
|
|
7665
|
+
private formatMessage;
|
|
7666
|
+
private shouldLog;
|
|
7667
|
+
error(...args: unknown[]): void;
|
|
7668
|
+
warn(...args: unknown[]): void;
|
|
7669
|
+
info(...args: unknown[]): void;
|
|
7670
|
+
debug(...args: unknown[]): void;
|
|
7671
|
+
}
|
|
7672
|
+
declare const logger: Logger;
|
|
7673
|
+
//#endregion
|
|
7674
|
+
//#region src/provider/OpenAIProvider.d.ts
|
|
7675
|
+
type OpenAiTool = OpenAI.ChatCompletionTool;
|
|
7676
|
+
type OpenAiToolCollection = Array<OpenAiTool>;
|
|
7677
|
+
declare class OpenAIProvider extends BaseNonAgenticProvider<OpenAiToolCollection, OpenAiTool, McpServerGetResponse> {
|
|
7678
|
+
readonly name = "openai";
|
|
7679
|
+
/**
|
|
7680
|
+
* Creates a new instance of the OpenAIProvider.
|
|
7681
|
+
*
|
|
7682
|
+
* This is the default provider for the Composio SDK and is automatically
|
|
7683
|
+
* available without additional installation.
|
|
7684
|
+
*
|
|
7685
|
+
* @example
|
|
7686
|
+
* ```typescript
|
|
7687
|
+
* // The OpenAIProvider is used by default when initializing Composio
|
|
7688
|
+
* const composio = new Composio({
|
|
7689
|
+
* apiKey: 'your-api-key'
|
|
7690
|
+
* });
|
|
7691
|
+
*
|
|
7692
|
+
* // You can also explicitly specify it
|
|
7693
|
+
* const composio = new Composio({
|
|
7694
|
+
* apiKey: 'your-api-key',
|
|
7695
|
+
* provider: new OpenAIProvider()
|
|
7696
|
+
* });
|
|
7697
|
+
* ```
|
|
7698
|
+
*/
|
|
7699
|
+
constructor();
|
|
7700
|
+
/**
|
|
7701
|
+
* Transform MCP URL response into OpenAI-specific format.
|
|
7702
|
+
* OpenAI uses the standard format by default.
|
|
7703
|
+
*
|
|
7704
|
+
* @param data - The MCP URL response data
|
|
7705
|
+
* @returns Standard MCP server response format
|
|
7706
|
+
*/
|
|
7707
|
+
wrapMcpServerResponse(data: McpUrlResponse): McpServerGetResponse;
|
|
7708
|
+
/**
|
|
7709
|
+
* Wraps a Composio tool in the OpenAI function calling format.
|
|
7710
|
+
*
|
|
7711
|
+
* This method transforms a Composio tool definition into the format
|
|
7712
|
+
* expected by OpenAI's function calling API.
|
|
7713
|
+
*
|
|
7714
|
+
* @param tool - The Composio tool to wrap
|
|
7715
|
+
* @returns The wrapped tool in OpenAI format
|
|
7716
|
+
*
|
|
7717
|
+
* @example
|
|
7718
|
+
* ```typescript
|
|
7719
|
+
* // Wrap a single tool for use with OpenAI
|
|
7720
|
+
* const composioTool = {
|
|
7721
|
+
* slug: 'SEARCH_TOOL',
|
|
7722
|
+
* description: 'Search for information',
|
|
7723
|
+
* inputParameters: {
|
|
7724
|
+
* type: 'object',
|
|
7725
|
+
* properties: {
|
|
7726
|
+
* query: { type: 'string' }
|
|
7727
|
+
* },
|
|
7728
|
+
* required: ['query']
|
|
7729
|
+
* }
|
|
7730
|
+
* };
|
|
7731
|
+
*
|
|
7732
|
+
* const openAITool = provider.wrapTool(composioTool);
|
|
7733
|
+
* ```
|
|
7734
|
+
*/
|
|
7735
|
+
wrapTool: (tool: Tool) => OpenAiTool;
|
|
7736
|
+
/**
|
|
7737
|
+
* Wraps multiple Composio tools in the OpenAI function calling format.
|
|
7738
|
+
*
|
|
7739
|
+
* This method transforms a list of Composio tools into the format
|
|
7740
|
+
* expected by OpenAI's function calling API.
|
|
7741
|
+
*
|
|
7742
|
+
* @param tools - Array of Composio tools to wrap
|
|
7743
|
+
* @returns Array of wrapped tools in OpenAI format
|
|
7744
|
+
*
|
|
7745
|
+
* @example
|
|
7746
|
+
* ```typescript
|
|
7747
|
+
* // Wrap multiple tools for use with OpenAI
|
|
7748
|
+
* const composioTools = [
|
|
7749
|
+
* {
|
|
7750
|
+
* slug: 'SEARCH_TOOL',
|
|
7751
|
+
* description: 'Search for information',
|
|
7752
|
+
* inputParameters: {
|
|
7753
|
+
* type: 'object',
|
|
7754
|
+
* properties: {
|
|
7755
|
+
* query: { type: 'string' }
|
|
7756
|
+
* }
|
|
7757
|
+
* }
|
|
7758
|
+
* },
|
|
7759
|
+
* {
|
|
7760
|
+
* slug: 'WEATHER_TOOL',
|
|
5017
7761
|
* description: 'Get weather information',
|
|
5018
7762
|
* inputParameters: {
|
|
5019
7763
|
* type: 'object',
|
|
@@ -5259,15 +8003,32 @@ declare class ToolRouter<TToolCollection, TTool, TProvider extends BaseComposioP
|
|
|
5259
8003
|
private client;
|
|
5260
8004
|
private config?;
|
|
5261
8005
|
constructor(client: Composio, config?: ComposioConfig<TProvider> | undefined);
|
|
8006
|
+
/**
|
|
8007
|
+
* Derives the MCP config for a session from the auth context the session
|
|
8008
|
+
* request was made with: the project key when one is configured, otherwise
|
|
8009
|
+
* the resolved user API key, plus the org/project scope when configured.
|
|
8010
|
+
* Headers are only attached when the MCP URL shares the client's API
|
|
8011
|
+
* origin. Any other destination throws when the caller passed `mcp: true`
|
|
8012
|
+
* and otherwise yields empty headers plus a warning; see
|
|
8013
|
+
* `buildMCPServerConfig`.
|
|
8014
|
+
*/
|
|
5262
8015
|
private createMCPServerConfig;
|
|
5263
8016
|
/**
|
|
5264
8017
|
* Creates a new tool router session for a user.
|
|
5265
8018
|
* Use `sessionPreset: SessionPreset.DIRECT_TOOLS` when all needed tools
|
|
5266
8019
|
* should be exposed directly; see `ToolRouterCreateSessionConfig`.
|
|
5267
8020
|
*
|
|
8021
|
+
* The session's MCP config carries the session credential only when the
|
|
8022
|
+
* MCP URL shares the origin of the configured API base URL. When it does
|
|
8023
|
+
* not, `mcp: true` makes the call throw `ComposioMCPDestinationError`
|
|
8024
|
+
* (naming both origins, never a key); without `mcp: true` the session is
|
|
8025
|
+
* returned with `session.mcp.headers` empty and a warning naming both
|
|
8026
|
+
* origins is logged, so native tools keep working.
|
|
8027
|
+
*
|
|
5268
8028
|
* @param userId {string} The user id to create the session for
|
|
5269
8029
|
* @param config {ToolRouterCreateSessionConfig} The config for the tool router session
|
|
5270
8030
|
* @returns {Promise<Session<TToolCollection, TTool, TProvider>>} The tool router session
|
|
8031
|
+
* @throws {ComposioMCPDestinationError} When `mcp: true` is passed and the MCP URL is not on the API origin
|
|
5271
8032
|
*
|
|
5272
8033
|
* @example
|
|
5273
8034
|
* ```typescript
|
|
@@ -5291,8 +8052,17 @@ declare class ToolRouter<TToolCollection, TTool, TProvider extends BaseComposioP
|
|
|
5291
8052
|
create(userId: string, config?: ToolRouterCreateSessionConfig, requestOptions?: ComposioRequestOptions): Promise<SessionWithoutMcp<TToolCollection, TTool, TProvider>>;
|
|
5292
8053
|
/**
|
|
5293
8054
|
* Use an existing session
|
|
8055
|
+
*
|
|
8056
|
+
* The session's MCP config carries the session credential only when the
|
|
8057
|
+
* MCP URL shares the origin of the configured API base URL. When it does
|
|
8058
|
+
* not, `mcp: true` makes the call throw `ComposioMCPDestinationError`
|
|
8059
|
+
* (naming both origins, never a key); without `mcp: true` the session is
|
|
8060
|
+
* returned with `session.mcp.headers` empty and a warning naming both
|
|
8061
|
+
* origins is logged, so native tools keep working.
|
|
8062
|
+
*
|
|
5294
8063
|
* @param id {string} The id of the session to use
|
|
5295
8064
|
* @returns {Promise<Session<TToolCollection, TTool, TProvider>>} The tool router session
|
|
8065
|
+
* @throws {ComposioMCPDestinationError} When `mcp: true` is passed and the MCP URL is not on the API origin
|
|
5296
8066
|
*
|
|
5297
8067
|
* @example
|
|
5298
8068
|
* ```typescript
|
|
@@ -5340,10 +8110,62 @@ declare class Sessions<TToolCollection, TTool, TProvider extends BaseComposioPro
|
|
|
5340
8110
|
//#region src/composio.d.ts
|
|
5341
8111
|
type ComposioConfig<TProvider extends BaseComposioProvider<unknown, unknown, unknown> = OpenAIProvider> = {
|
|
5342
8112
|
/**
|
|
5343
|
-
* The API key for the Composio API.
|
|
5344
|
-
*
|
|
8113
|
+
* The project API key for the Composio API, sent as the `x-api-key` header.
|
|
8114
|
+
*
|
|
8115
|
+
* - A string is used as-is; the environment and the CLI user config file are not consulted.
|
|
8116
|
+
* - Omitted: falls back to `COMPOSIO_API_KEY`, then to the project key stored by the Composio
|
|
8117
|
+
* CLI in `~/.composio/user_data.json`. A stored user key (`uak_...`) is never used as a
|
|
8118
|
+
* project key; the SDK throws instead of sending it.
|
|
8119
|
+
* - `null`: disables project-key authentication entirely, including both fallbacks. The SDK
|
|
8120
|
+
* then requires another credential (`userApiKey`, `orgApiKey`, or an `x-user-api-key`
|
|
8121
|
+
* entry in `defaultHeaders`) and sends no `x-api-key`; an `x-api-key` entry in
|
|
8122
|
+
* `defaultHeaders` is rejected, also on `createSession()` clones.
|
|
8123
|
+
*
|
|
8124
|
+
* @example 'ak_1234567890'
|
|
5345
8125
|
*/
|
|
5346
8126
|
apiKey?: string | null;
|
|
8127
|
+
/**
|
|
8128
|
+
* User API key (`uak_*`) for the organization, consumer, and user-scoped
|
|
8129
|
+
* endpoints reached through `getClient()` (for example `client.org.list()`).
|
|
8130
|
+
* Sent as `x-user-api-key` only on operations whose security scheme accepts
|
|
8131
|
+
* it, never alongside the project key. Falls back to
|
|
8132
|
+
* `process.env['COMPOSIO_USER_API_KEY']`; `null` disables that fallback.
|
|
8133
|
+
* Combine with `apiKey: null` to authenticate with the user key alone.
|
|
8134
|
+
* @example 'uak_1234567890'
|
|
8135
|
+
*/
|
|
8136
|
+
userApiKey?: string | null;
|
|
8137
|
+
/**
|
|
8138
|
+
* Organization API key (`oak_*`) for the organization-owner endpoints reached
|
|
8139
|
+
* through `getClient()` (for example `client.org.owner.project.list()`).
|
|
8140
|
+
* Sent as `x-org-api-key` only on operations whose security scheme accepts
|
|
8141
|
+
* it, never alongside the project key. Falls back to
|
|
8142
|
+
* `process.env['COMPOSIO_ORG_API_KEY']`; `null` disables that fallback.
|
|
8143
|
+
* Combine with `apiKey: null` to authenticate with the organization key alone.
|
|
8144
|
+
* @example 'oak_1234567890'
|
|
8145
|
+
*/
|
|
8146
|
+
orgApiKey?: string | null;
|
|
8147
|
+
/**
|
|
8148
|
+
* Organization nano ID that scopes user-key requests, sent as the
|
|
8149
|
+
* `x-org-id` header on every request and exported with the session MCP
|
|
8150
|
+
* config. This is the short public identifier the API returns as `org_id`
|
|
8151
|
+
* (for example from the consumer project resolve endpoint), not a UUID.
|
|
8152
|
+
* Must be supplied together with `projectId`; without an explicit scope a
|
|
8153
|
+
* user API key addresses the API default (the developer project). May also
|
|
8154
|
+
* be supplied as the `x-org-id` entry in `defaultHeaders`; the two must
|
|
8155
|
+
* agree.
|
|
8156
|
+
* @example 'org_9f2k1x'
|
|
8157
|
+
*/
|
|
8158
|
+
orgId?: string;
|
|
8159
|
+
/**
|
|
8160
|
+
* Project nano ID that scopes user-key requests, sent as the
|
|
8161
|
+
* `x-project-id` header on every request and exported with the session MCP
|
|
8162
|
+
* config. This is the short public identifier the API returns as
|
|
8163
|
+
* `project_nano_id`, not the project UUID. Must be supplied together with
|
|
8164
|
+
* `orgId`. May also be supplied as the `x-project-id` entry in
|
|
8165
|
+
* `defaultHeaders`; the two must agree.
|
|
8166
|
+
* @example 'proj_4b8m2q'
|
|
8167
|
+
*/
|
|
8168
|
+
projectId?: string;
|
|
5347
8169
|
/**
|
|
5348
8170
|
* The base URL of the Composio API.
|
|
5349
8171
|
* @example 'https://backend.composio.dev'
|
|
@@ -5413,8 +8235,13 @@ type ComposioConfig<TProvider extends BaseComposioProvider<unknown, unknown, unk
|
|
|
5413
8235
|
*/
|
|
5414
8236
|
host?: string;
|
|
5415
8237
|
/**
|
|
5416
|
-
*
|
|
5417
|
-
*
|
|
8238
|
+
* Default headers attached to every request made through this instance.
|
|
8239
|
+
*
|
|
8240
|
+
* `x-user-api-key` is the one header the SDK treats as a credential: together
|
|
8241
|
+
* with `apiKey: null` it authenticates requests with a Composio user API key
|
|
8242
|
+
* instead of a project key. The project key is only ever set from `apiKey`:
|
|
8243
|
+
* an `x-api-key` entry is rejected when `apiKey` is `null`. Every other
|
|
8244
|
+
* header is passed through untouched.
|
|
5418
8245
|
* @example
|
|
5419
8246
|
* ```typescript
|
|
5420
8247
|
* const composio = new Composio({
|
|
@@ -5469,6 +8296,43 @@ type ComposioConfig<TProvider extends BaseComposioProvider<unknown, unknown, unk
|
|
|
5469
8296
|
* ```
|
|
5470
8297
|
*/
|
|
5471
8298
|
toolkitVersions?: ToolkitVersionParam;
|
|
8299
|
+
/**
|
|
8300
|
+
* Destination for SDK log output. Messages are formatted and have
|
|
8301
|
+
* credential-shaped values redacted before they reach the sink, so any
|
|
8302
|
+
* object with `error`/`warn`/`info`/`debug` methods works (`console`, pino,
|
|
8303
|
+
* winston, ...).
|
|
8304
|
+
*
|
|
8305
|
+
* Runtime deprecation warnings raised by the underlying API client (response
|
|
8306
|
+
* `Deprecation`/`Sunset` headers and deprecated request inputs) are routed
|
|
8307
|
+
* through this logger as well.
|
|
8308
|
+
*
|
|
8309
|
+
* The SDK logger is process-wide: configuring it on one `Composio` instance
|
|
8310
|
+
* affects every instance, and the last configured instance wins.
|
|
8311
|
+
*
|
|
8312
|
+
* @default console
|
|
8313
|
+
* @example
|
|
8314
|
+
* ```typescript
|
|
8315
|
+
* const composio = new Composio({
|
|
8316
|
+
* apiKey: 'your-api-key',
|
|
8317
|
+
* logger: pino(),
|
|
8318
|
+
* logLevel: 'warn',
|
|
8319
|
+
* });
|
|
8320
|
+
* ```
|
|
8321
|
+
*/
|
|
8322
|
+
logger?: ComposioLogger;
|
|
8323
|
+
/**
|
|
8324
|
+
* Minimum level to emit: `'silent' | 'error' | 'warn' | 'info' | 'debug'`.
|
|
8325
|
+
* Takes precedence over the `COMPOSIO_LOG_LEVEL` environment variable.
|
|
8326
|
+
* Also gates the API client's runtime deprecation warnings (`'silent'` turns
|
|
8327
|
+
* them off). The client's per-request lifecycle logs are emitted at
|
|
8328
|
+
* `'debug'` only.
|
|
8329
|
+
*
|
|
8330
|
+
* Like `logger`, this applies process-wide and the last configured instance
|
|
8331
|
+
* wins. The API client's own level is fixed when each instance is created.
|
|
8332
|
+
*
|
|
8333
|
+
* @default 'info' (or `COMPOSIO_LOG_LEVEL` when set)
|
|
8334
|
+
*/
|
|
8335
|
+
logLevel?: LogLevel;
|
|
5472
8336
|
};
|
|
5473
8337
|
/**
|
|
5474
8338
|
* This is the core class for Composio.
|
|
@@ -5502,6 +8366,15 @@ declare class Composio$1<TProvider extends BaseComposioProvider<unknown, unknown
|
|
|
5502
8366
|
authConfigs: AuthConfigs;
|
|
5503
8367
|
/** Manage authenticated connections */
|
|
5504
8368
|
connectedAccounts: ConnectedAccounts;
|
|
8369
|
+
/**
|
|
8370
|
+
* Manage the project's webhook subscription (`webhooks.subscriptions`) and
|
|
8371
|
+
* inbound per-toolkit webhook endpoints (`webhooks.endpoints`).
|
|
8372
|
+
*/
|
|
8373
|
+
webhooks: Webhooks;
|
|
8374
|
+
/** Search and inspect tool-execution logs */
|
|
8375
|
+
logs: Logs;
|
|
8376
|
+
/** Public transfer keys of the organization's customer-managed keyring */
|
|
8377
|
+
keyring: Keyring;
|
|
5505
8378
|
/**
|
|
5506
8379
|
* Experimental SDK methods whose shape may change in future releases.
|
|
5507
8380
|
* Prefer domain-specific mounts (for example
|
|
@@ -5697,4 +8570,4 @@ declare class Composio$1<TProvider extends BaseComposioProvider<unknown, unknown
|
|
|
5697
8570
|
flush(): Promise<void>;
|
|
5698
8571
|
}
|
|
5699
8572
|
//#endregion
|
|
5700
|
-
export {
|
|
8573
|
+
export { WebhookSubscriptionEventTypeSchema as $, AuthConfigToolAccessConfigSchema as $n, ToolkitRetrieveResponseSchema as $r, TriggerEvent as $t, ToolExecutionLogParentSchema as A, VerifyWebhookParamsSchema as An, ToolkitChangelogItemSchema as Ar, UsageBreakdownGroup as At, WebhookEndpointListItemSchema as B, WebhookRequestLike as Bn, ToolkitListGrantContextsParamsSchema as Br, UsageOrderBySchema as Bt, LogSearchResponseSchema as C, TriggerTypeSchema as Cn, ToolkitAuthField as Cr, CustomToolkitSyncResponse as Ct, ToolExecutionLogDetail as D, TriggersTypeListResponseSchema as Dn, ToolkitCategory as Dr, CustomToolkitUpsertResponse as Dt, ToolExecutionLog as E, TriggersTypeListResponse as En, ToolkitAuthFieldsResponseSchema as Er, CustomToolkitUpsertParamsSchema as Et, Webhooks as F, WebhookPayloadV1Schema as Fn, ToolkitGetManyParams as Fr, UsageBreakdownResponseSchema as Ft, WebhookEndpointReplaceParams as G, WebhookVersions as Gn, ToolkitMangedByEnumSchema as Gr, UsageSummaryResponseSchema as Gt, WebhookEndpointListParamsSchema as H, WebhookTriggerPayloadV3 as Hn, ToolkitListGrantContextsResponseSchema as Hr, UsageSummaryParams as Ht, WebhookEndpoint as I, WebhookPayloadV2 as In, ToolkitGetManySlugsSchema as Ir, UsageEntitySummary as It, WebhookEndpointUpdateParams as J, AuthConfigListParamsSchema as Jn, ToolkitRecommendScopesResponse as Jr, IncomingTriggerPayloadSchema as Jt, WebhookEndpointReplaceParamsSchema as K, AuthConfigCreationToolAccessConfigSchema as Kn, ToolkitRecommendScopesParams as Kr, DefaultWebhookSubscriptionEvents as Kt, WebhookEndpointCreateParams as L, WebhookPayloadV2Schema as Ln, ToolkitGrantContextDimension as Lr, UsageEntitySummarySchema as Lt, ToolExecutionLogStatusSchema as M, WebhookPayload as Mn, ToolkitChangelogResponseSchema as Mr, UsageBreakdownParams as Mt, WebhookEndpoints as N, WebhookPayloadSchema as Nn, ToolkitConditionalScope as Nr, UsageBreakdownParamsSchema as Nt, ToolExecutionLogDetailSchema as O, TriggersTypeRetrieveResponse as On, ToolkitCategorySchema as Or, CustomToolkitUpsertResponseSchema as Ot, WebhookSubscriptions as P, WebhookPayloadV1 as Pn, ToolkitConditionalScopeSchema as Pr, UsageBreakdownResponse as Pt, WebhookSubscriptionEventType as Q, AuthConfigRetrieveResponseSchema as Qn, ToolkitRetrieveResponse as Qr, TriggerData as Qt, WebhookEndpointCreateParamsSchema as R, WebhookPayloadV3 as Rn, ToolkitGrantContextDimensionSchema as Rr, UsageFilters as Rt, LogSearchResponse as S, TriggerType as Sn, ToolkitAuthConfigDetailsSchema as Sr, CustomToolkitSyncParamsSchema as St, LogSearchTimeRangeSchema as T, TriggersTypeListParamsSchema as Tn, ToolkitAuthFieldsResponse as Tr, CustomToolkitUpsertParams as Tt, WebhookEndpointListResponse as U, WebhookTriggerPayloadV3Schema as Un, ToolkitListParams as Ur, UsageSummaryParamsSchema as Ut, WebhookEndpointListParams as V, WebhookSubscription as Vn, ToolkitListGrantContextsResponse as Vr, UsageOrderDirectionSchema as Vt, WebhookEndpointListResponseSchema as W, WebhookVersion as Wn, ToolkitMangedByEnum as Wr, UsageSummaryResponse as Wt, WebhookSubscriptionDeleteResponse as X, AuthConfigListResponseSchema as Xn, ToolkitRetrieveCategoriesResponse as Xr, SetWebhookSubscriptionParams as Xt, WebhookEndpointUpdateParamsSchema as Y, AuthConfigListResponse as Yn, ToolkitRecommendScopesResponseSchema as Yr, ParseWebhookOptions as Yt, WebhookSubscriptionDeleteResponseSchema as Z, AuthConfigRetrieveResponse as Zn, ToolkitRetrieveCategoriesResponseSchema as Zr, SetWebhookSubscriptionParamsSchema as Zt, LogSearchFilterOperator as _, TriggerStatusEnum as _n, ToolKitListResponse as _r, CustomToolkitAuthScheme as _t, ComposioLogger as a, ToolkitsListParamsSchema as ai, TriggerInstanceListActiveResponseItemSchema as an, AuthDefaultConfigUpdateParamsSchema as ar, WebhookSubscriptionListResponseSchema as at, LogSearchParams as b, TriggerSubscribeParamSchema as bn, ToolKitMetaSchema as br, CustomToolkitDeleteResponseSchema as bt, Keyring as c, TriggerInstanceManageDeleteResponseSchema as cn, AuthSchemeTypes as cr, WebhookSubscriptionSchema as ct, KeyringTransferKeysResponse as d, TriggerInstanceManageUpdateResponse as dn, CreateAuthConfigResponse as dr, WebhookSubscriptionUpdateParams as dt, ToolkitSortByEnum as ei, TriggerEventData as en, AuthConfigType as er, WebhookSubscriptionEventTypesResponse as et, KeyringTransferKeysResponseSchema as f, TriggerInstanceManageUpdateResponseSchema as fn, CreateAuthConfigResponseSchema as fr, WebhookSubscriptionUpdateParamsSchema as ft, LogSearchFilterFieldSchema as g, TriggerInstanceUpsertResponseSchema as gn, ToolKitItemSchema as gr, CustomToolkits as gt, LogSearchFilterField as h, TriggerInstanceUpsertResponse as hn, ToolKitItem as hr, Experimental as ht, OpenAIProvider as i, ToolkitsGetManyParamsSchema as ii, TriggerInstanceListActiveResponseItem as in, AuthCustomConfigUpdateParamsSchema as ir, WebhookSubscriptionListResponse as it, ToolExecutionLogSchema as j, VerifyWebhookResult as jn, ToolkitChangelogResponse as jr, UsageBreakdownGroupSchema as jt, ToolExecutionLogLevelSchema as k, VerifyWebhookParams as kn, ToolkitChangelogItem as kr, Usage as kt, KeyringTransferKey as l, TriggerInstanceManageUpdateParams as ln, CreateAuthConfigParams as lr, WebhookSubscriptionSetParams as lt, LogSearchFilter as m, TriggerInstanceUpsertParamsSchema as mn, CreateCustomAuthConfigParamsSchema as mr, MCP as mt, ComposioConfig as n, ToolkitVersionChangelog as ni, TriggerInstanceListActiveParamsSchema as nn, AuthConfigUpdateParams as nr, WebhookSubscriptionListParams as nt, LogLevel as o, TriggerInstanceListActiveResponseSchema as on, AuthSchemeEnum as or, WebhookSubscriptionRotateSecretResponse as ot, Logs as p, TriggerInstanceUpsertParams as pn, CreateComposioManagedAuthConfigParamsSchema as pr, WebhookVersionSchema as pt, WebhookEndpointSchema as q, AuthConfigListParams as qn, ToolkitRecommendScopesParamsSchema as qr, IncomingTriggerPayload as qt, Sessions as r, ToolkitVersionChangelogSchema as ri, TriggerInstanceListActiveResponse as rn, AuthConfigUpdateParamsSchema as rr, WebhookSubscriptionListParamsSchema as rt, logger as s, TriggerInstanceManageDeleteResponse as sn, AuthSchemeType as sr, WebhookSubscriptionRotateSecretResponseSchema as st, Composio$1 as t, ToolkitSortByEnumSchema as ti, TriggerInstanceListActiveParams as tn, AuthConfigTypes as tr, WebhookSubscriptionEventTypesResponseSchema as tt, KeyringTransferKeySchema as u, TriggerInstanceManageUpdateParamsSchema as un, CreateAuthConfigParamsSchema as ur, WebhookSubscriptionSetParamsSchema as ut, LogSearchFilterOperatorSchema as v, TriggerStatusType as vn, ToolKitListResponseSchema as vr, CustomToolkitAuthSchemeSchema as vt, LogSearchTimeRange as w, TriggersTypeListParams as wn, ToolkitAuthFieldSchema as wr, CustomToolkitSyncResponseSchema as wt, LogSearchParamsSchema as x, TriggerSubscribeParams as xn, ToolkitAuthConfigDetails as xr, CustomToolkitSyncParams as xt, LogSearchFilterSchema as y, TriggerStatuses as yn, ToolKitMeta as yr, CustomToolkitDeleteResponse as yt, WebhookEndpointListItem as z, WebhookPayloadV3Schema as zn, ToolkitListGrantContextsParams as zr, UsageFiltersSchema as zt };
|