@composio/client 0.1.0-alpha.15 → 0.1.0-alpha.16
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/CHANGELOG.md +29 -0
- package/README.md +12 -24
- package/client.d.mts +5 -5
- package/client.d.mts.map +1 -1
- package/client.d.ts +5 -5
- package/client.d.ts.map +1 -1
- package/client.js +3 -3
- package/client.js.map +1 -1
- package/client.mjs +3 -3
- package/client.mjs.map +1 -1
- package/internal/detect-platform.js +3 -3
- package/internal/detect-platform.js.map +1 -1
- package/internal/detect-platform.mjs +3 -3
- package/internal/detect-platform.mjs.map +1 -1
- package/internal/shim-types.d.mts +11 -22
- package/internal/shim-types.d.mts.map +1 -0
- package/internal/shim-types.d.ts +11 -22
- package/internal/shim-types.d.ts.map +1 -0
- package/internal/shim-types.js +4 -0
- package/internal/shim-types.js.map +1 -0
- package/internal/shim-types.mjs +3 -0
- package/internal/shim-types.mjs.map +1 -0
- package/internal/shims.d.mts +2 -2
- package/internal/shims.d.mts.map +1 -1
- package/internal/shims.d.ts +2 -2
- package/internal/shims.d.ts.map +1 -1
- package/package.json +1 -4
- package/resources/auth-configs.d.mts +3 -3
- package/resources/auth-configs.d.mts.map +1 -1
- package/resources/auth-configs.d.ts +3 -3
- package/resources/auth-configs.d.ts.map +1 -1
- package/resources/connected-accounts.d.mts +5262 -52
- package/resources/connected-accounts.d.mts.map +1 -1
- package/resources/connected-accounts.d.ts +5262 -52
- package/resources/connected-accounts.d.ts.map +1 -1
- package/resources/index.d.mts +2 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/mcp/index.d.mts +1 -1
- package/resources/mcp/index.d.mts.map +1 -1
- package/resources/mcp/index.d.ts +1 -1
- package/resources/mcp/index.d.ts.map +1 -1
- package/resources/mcp/index.js.map +1 -1
- package/resources/mcp/index.mjs.map +1 -1
- package/resources/mcp/mcp.d.mts +99 -1
- package/resources/mcp/mcp.d.mts.map +1 -1
- package/resources/mcp/mcp.d.ts +99 -1
- package/resources/mcp/mcp.d.ts.map +1 -1
- package/resources/mcp/mcp.js +22 -0
- package/resources/mcp/mcp.js.map +1 -1
- package/resources/mcp/mcp.mjs +22 -0
- package/resources/mcp/mcp.mjs.map +1 -1
- package/resources/org/project/api-keys.d.mts +0 -15
- package/resources/org/project/api-keys.d.mts.map +1 -1
- package/resources/org/project/api-keys.d.ts +0 -15
- package/resources/org/project/api-keys.d.ts.map +1 -1
- package/resources/tools.d.mts +4 -5
- package/resources/tools.d.mts.map +1 -1
- package/resources/tools.d.ts +4 -5
- package/resources/tools.d.ts.map +1 -1
- package/resources/trigger-instances/trigger-instances.d.mts +9 -46
- package/resources/trigger-instances/trigger-instances.d.mts.map +1 -1
- package/resources/trigger-instances/trigger-instances.d.ts +9 -46
- package/resources/trigger-instances/trigger-instances.d.ts.map +1 -1
- package/resources/trigger-instances/trigger-instances.js.map +1 -1
- package/resources/trigger-instances/trigger-instances.mjs.map +1 -1
- package/resources/v3/admin.d.mts +100 -0
- package/resources/v3/admin.d.mts.map +1 -0
- package/resources/v3/admin.d.ts +100 -0
- package/resources/v3/admin.d.ts.map +1 -0
- package/resources/v3/admin.js +54 -0
- package/resources/v3/admin.js.map +1 -0
- package/resources/v3/admin.mjs +50 -0
- package/resources/v3/admin.mjs.map +1 -0
- package/resources/v3/auth/auth.d.mts +10 -0
- package/resources/v3/auth/auth.d.mts.map +1 -0
- package/resources/v3/auth/auth.d.ts +10 -0
- package/resources/v3/auth/auth.d.ts.map +1 -0
- package/resources/{auth → v3/auth}/auth.js +2 -2
- package/resources/v3/auth/auth.js.map +1 -0
- package/resources/{auth → v3/auth}/auth.mjs +1 -1
- package/resources/v3/auth/auth.mjs.map +1 -0
- package/resources/v3/auth/index.d.mts +3 -0
- package/resources/v3/auth/index.d.mts.map +1 -0
- package/resources/v3/auth/index.d.ts +3 -0
- package/resources/v3/auth/index.d.ts.map +1 -0
- package/resources/v3/auth/index.js.map +1 -0
- package/resources/v3/auth/index.mjs.map +1 -0
- package/resources/{auth → v3/auth}/session.d.mts +16 -10
- package/resources/v3/auth/session.d.mts.map +1 -0
- package/resources/{auth → v3/auth}/session.d.ts +16 -10
- package/resources/v3/auth/session.d.ts.map +1 -0
- package/resources/{auth → v3/auth}/session.js +8 -2
- package/resources/v3/auth/session.js.map +1 -0
- package/resources/{auth → v3/auth}/session.mjs +8 -2
- package/resources/v3/auth/session.mjs.map +1 -0
- package/resources/{auth.d.mts.map → v3/auth.d.mts.map} +1 -1
- package/resources/v3/auth.d.ts.map +1 -0
- package/resources/{auth.js → v3/auth.js} +1 -1
- package/resources/v3/auth.js.map +1 -0
- package/resources/v3/auth.mjs.map +1 -0
- package/resources/v3/cli.d.mts +167 -0
- package/resources/v3/cli.d.mts.map +1 -0
- package/resources/v3/cli.d.ts +167 -0
- package/resources/v3/cli.d.ts.map +1 -0
- package/resources/v3/cli.js +55 -0
- package/resources/v3/cli.js.map +1 -0
- package/resources/v3/cli.mjs +51 -0
- package/resources/v3/cli.mjs.map +1 -0
- package/resources/v3/index.d.mts +6 -0
- package/resources/v3/index.d.mts.map +1 -0
- package/resources/v3/index.d.ts +6 -0
- package/resources/v3/index.d.ts.map +1 -0
- package/resources/v3/index.js +15 -0
- package/resources/v3/index.js.map +1 -0
- package/resources/v3/index.mjs +7 -0
- package/resources/v3/index.mjs.map +1 -0
- package/resources/v3/internal/action-execution.d.mts +153 -0
- package/resources/v3/internal/action-execution.d.mts.map +1 -0
- package/resources/v3/internal/action-execution.d.ts +153 -0
- package/resources/v3/internal/action-execution.d.ts.map +1 -0
- package/resources/v3/internal/action-execution.js +38 -0
- package/resources/v3/internal/action-execution.js.map +1 -0
- package/resources/v3/internal/action-execution.mjs +34 -0
- package/resources/v3/internal/action-execution.mjs.map +1 -0
- package/resources/v3/internal/index.d.mts +4 -0
- package/resources/v3/internal/index.d.mts.map +1 -0
- package/resources/v3/internal/index.d.ts +4 -0
- package/resources/v3/internal/index.d.ts.map +1 -0
- package/resources/v3/internal/index.js +11 -0
- package/resources/v3/internal/index.js.map +1 -0
- package/resources/v3/internal/index.mjs +5 -0
- package/resources/v3/internal/index.mjs.map +1 -0
- package/resources/v3/internal/internal.d.mts +14 -0
- package/resources/v3/internal/internal.d.mts.map +1 -0
- package/resources/v3/internal/internal.d.ts +14 -0
- package/resources/v3/internal/internal.d.ts.map +1 -0
- package/resources/v3/internal/internal.js +21 -0
- package/resources/v3/internal/internal.js.map +1 -0
- package/resources/v3/internal/internal.mjs +16 -0
- package/resources/v3/internal/internal.mjs.map +1 -0
- package/resources/v3/internal/trigger.d.mts +84 -0
- package/resources/v3/internal/trigger.d.mts.map +1 -0
- package/resources/v3/internal/trigger.d.ts +84 -0
- package/resources/v3/internal/trigger.d.ts.map +1 -0
- package/resources/v3/internal/trigger.js +23 -0
- package/resources/v3/internal/trigger.js.map +1 -0
- package/resources/v3/internal/trigger.mjs +19 -0
- package/resources/v3/internal/trigger.mjs.map +1 -0
- package/resources/v3/internal.d.mts +2 -0
- package/resources/v3/internal.d.mts.map +1 -0
- package/resources/v3/internal.d.ts +2 -0
- package/resources/v3/internal.d.ts.map +1 -0
- package/resources/v3/internal.js +6 -0
- package/resources/v3/internal.js.map +1 -0
- package/resources/v3/internal.mjs +3 -0
- package/resources/v3/internal.mjs.map +1 -0
- package/resources/v3/v3.d.mts +22 -0
- package/resources/v3/v3.d.mts.map +1 -0
- package/resources/v3/v3.d.ts +22 -0
- package/resources/v3/v3.d.ts.map +1 -0
- package/resources/v3/v3.js +29 -0
- package/resources/v3/v3.js.map +1 -0
- package/resources/v3/v3.mjs +24 -0
- package/resources/v3/v3.mjs.map +1 -0
- package/resources/v3.d.mts +2 -0
- package/resources/v3.d.mts.map +1 -0
- package/resources/v3.d.ts +2 -0
- package/resources/v3.d.ts.map +1 -0
- package/resources/v3.js +6 -0
- package/resources/v3.js.map +1 -0
- package/resources/v3.mjs +3 -0
- package/resources/v3.mjs.map +1 -0
- package/src/client.ts +9 -5
- package/src/internal/detect-platform.ts +3 -3
- package/src/internal/shim-types.ts +26 -0
- package/src/internal/shims.ts +2 -2
- package/src/resources/auth-configs.ts +0 -3
- package/src/resources/connected-accounts.ts +10261 -298
- package/src/resources/index.ts +3 -1
- package/src/resources/mcp/index.ts +2 -0
- package/src/resources/mcp/mcp.ts +128 -0
- package/src/resources/org/project/api-keys.ts +0 -18
- package/src/resources/tools.ts +5 -6
- package/src/resources/trigger-instances/trigger-instances.ts +9 -49
- package/src/resources/v3/admin.ts +141 -0
- package/src/resources/{auth → v3/auth}/auth.ts +3 -3
- package/src/resources/{auth → v3/auth}/index.ts +1 -1
- package/src/resources/{auth → v3/auth}/session.ts +16 -10
- package/src/resources/v3/cli.ts +209 -0
- package/src/resources/v3/index.ts +20 -0
- package/src/resources/v3/internal/action-execution.ts +236 -0
- package/src/resources/v3/internal/index.ts +10 -0
- package/src/resources/v3/internal/internal.ts +35 -0
- package/src/resources/v3/internal/trigger.ts +122 -0
- package/src/resources/v3/internal.ts +3 -0
- package/src/resources/v3/v3.ts +59 -0
- package/src/resources/v3.ts +3 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/auth/auth.d.mts +0 -10
- package/resources/auth/auth.d.mts.map +0 -1
- package/resources/auth/auth.d.ts +0 -10
- package/resources/auth/auth.d.ts.map +0 -1
- package/resources/auth/auth.js.map +0 -1
- package/resources/auth/auth.mjs.map +0 -1
- package/resources/auth/index.d.mts +0 -3
- package/resources/auth/index.d.mts.map +0 -1
- package/resources/auth/index.d.ts +0 -3
- package/resources/auth/index.d.ts.map +0 -1
- package/resources/auth/index.js.map +0 -1
- package/resources/auth/index.mjs.map +0 -1
- package/resources/auth/session.d.mts.map +0 -1
- package/resources/auth/session.d.ts.map +0 -1
- package/resources/auth/session.js.map +0 -1
- package/resources/auth/session.mjs.map +0 -1
- package/resources/auth.d.ts.map +0 -1
- package/resources/auth.js.map +0 -1
- package/resources/auth.mjs.map +0 -1
- package/src/internal/shim-types.d.ts +0 -28
- /package/resources/{auth → v3/auth}/index.js +0 -0
- /package/resources/{auth → v3/auth}/index.mjs +0 -0
- /package/resources/{auth.d.mts → v3/auth.d.mts} +0 -0
- /package/resources/{auth.d.ts → v3/auth.d.ts} +0 -0
- /package/resources/{auth.mjs → v3/auth.mjs} +0 -0
- /package/src/resources/{auth.ts → v3/auth.ts} +0 -0
package/src/resources/index.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
export { Auth } from './auth/auth';
|
|
4
3
|
export {
|
|
5
4
|
AuthConfigs,
|
|
6
5
|
type AuthConfigCreateResponse,
|
|
@@ -41,10 +40,12 @@ export {
|
|
|
41
40
|
type McpListResponse,
|
|
42
41
|
type McpDeleteResponse,
|
|
43
42
|
type McpRetrieveAppResponse,
|
|
43
|
+
type McpValidateResponse,
|
|
44
44
|
type McpCreateParams,
|
|
45
45
|
type McpUpdateParams,
|
|
46
46
|
type McpListParams,
|
|
47
47
|
type McpRetrieveAppParams,
|
|
48
|
+
type McpValidateParams,
|
|
48
49
|
} from './mcp/mcp';
|
|
49
50
|
export {
|
|
50
51
|
Migration,
|
|
@@ -96,3 +97,4 @@ export {
|
|
|
96
97
|
type TriggersTypeRetrieveEnumResponse,
|
|
97
98
|
type TriggersTypeListParams,
|
|
98
99
|
} from './triggers-types';
|
|
100
|
+
export { V3 } from './v3/v3';
|
|
@@ -9,8 +9,10 @@ export {
|
|
|
9
9
|
type McpListResponse,
|
|
10
10
|
type McpDeleteResponse,
|
|
11
11
|
type McpRetrieveAppResponse,
|
|
12
|
+
type McpValidateResponse,
|
|
12
13
|
type McpCreateParams,
|
|
13
14
|
type McpUpdateParams,
|
|
14
15
|
type McpListParams,
|
|
15
16
|
type McpRetrieveAppParams,
|
|
17
|
+
type McpValidateParams,
|
|
16
18
|
} from './mcp';
|
package/src/resources/mcp/mcp.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { APIResource } from '../../core/resource';
|
|
|
4
4
|
import * as CustomAPI from './custom';
|
|
5
5
|
import { Custom, CustomCreateParams, CustomCreateResponse } from './custom';
|
|
6
6
|
import { APIPromise } from '../../core/api-promise';
|
|
7
|
+
import { buildHeaders } from '../../internal/headers';
|
|
7
8
|
import { RequestOptions } from '../../internal/request-options';
|
|
8
9
|
import { path } from '../../internal/utils/path';
|
|
9
10
|
|
|
@@ -117,6 +118,32 @@ export class Mcp extends APIResource {
|
|
|
117
118
|
): APIPromise<McpRetrieveAppResponse> {
|
|
118
119
|
return this._client.get(path`/api/v3/mcp/app/${appKey}`, { query, ...options });
|
|
119
120
|
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Admin-only endpoint that validates a Model Control Protocol (MCP) server and
|
|
124
|
+
* retrieves its complete configuration details, including authentication
|
|
125
|
+
* information. This endpoint is typically used by the MCP service itself to
|
|
126
|
+
* authenticate and authorize connection requests from clients.
|
|
127
|
+
*
|
|
128
|
+
* @example
|
|
129
|
+
* ```ts
|
|
130
|
+
* const response = await client.mcp.validate(
|
|
131
|
+
* '550e8400-e29b-41d4-a716-446655440000',
|
|
132
|
+
* { 'x-composio-admin-token': 'admin_tk_12345abcdef' },
|
|
133
|
+
* );
|
|
134
|
+
* ```
|
|
135
|
+
*/
|
|
136
|
+
validate(
|
|
137
|
+
uuid: string,
|
|
138
|
+
params: McpValidateParams,
|
|
139
|
+
options?: RequestOptions,
|
|
140
|
+
): APIPromise<McpValidateResponse> {
|
|
141
|
+
const { 'x-composio-admin-token': xComposioAdminToken } = params;
|
|
142
|
+
return this._client.get(path`/api/v3/mcp/validate/${uuid}`, {
|
|
143
|
+
...options,
|
|
144
|
+
headers: buildHeaders([{ 'x-composio-admin-token': xComposioAdminToken }, options?.headers]),
|
|
145
|
+
});
|
|
146
|
+
}
|
|
120
147
|
}
|
|
121
148
|
|
|
122
149
|
/**
|
|
@@ -528,6 +555,98 @@ export namespace McpRetrieveAppResponse {
|
|
|
528
555
|
}
|
|
529
556
|
}
|
|
530
557
|
|
|
558
|
+
/**
|
|
559
|
+
* Complete validation and connection details for an MCP server
|
|
560
|
+
*/
|
|
561
|
+
export interface McpValidateResponse {
|
|
562
|
+
/**
|
|
563
|
+
* Unique identifier of the validated MCP server
|
|
564
|
+
*/
|
|
565
|
+
id: string;
|
|
566
|
+
|
|
567
|
+
/**
|
|
568
|
+
* Client information for the MCP server
|
|
569
|
+
*/
|
|
570
|
+
client: McpValidateResponse.Client;
|
|
571
|
+
|
|
572
|
+
/**
|
|
573
|
+
* Human-readable name of the MCP server
|
|
574
|
+
*/
|
|
575
|
+
name: string;
|
|
576
|
+
|
|
577
|
+
/**
|
|
578
|
+
* URL endpoint for connecting to this MCP server
|
|
579
|
+
*/
|
|
580
|
+
url: string;
|
|
581
|
+
|
|
582
|
+
/**
|
|
583
|
+
* User authentication data for the MCP server
|
|
584
|
+
*/
|
|
585
|
+
userData: McpValidateResponse.UserData;
|
|
586
|
+
|
|
587
|
+
/**
|
|
588
|
+
* List of action identifiers enabled for this server
|
|
589
|
+
*/
|
|
590
|
+
actions?: Array<string> | null;
|
|
591
|
+
|
|
592
|
+
/**
|
|
593
|
+
* List of application identifiers this server is configured for
|
|
594
|
+
*/
|
|
595
|
+
apps?: Array<string>;
|
|
596
|
+
|
|
597
|
+
/**
|
|
598
|
+
* List of connected account identifiers this server can use for authentication
|
|
599
|
+
*/
|
|
600
|
+
connectedAccountIds?: Array<string> | null;
|
|
601
|
+
|
|
602
|
+
/**
|
|
603
|
+
* Flag indicating if this server uses custom authentication headers
|
|
604
|
+
*/
|
|
605
|
+
customAuthHeaders?: boolean;
|
|
606
|
+
|
|
607
|
+
/**
|
|
608
|
+
* List of entity identifiers this MCP server can interact with
|
|
609
|
+
*/
|
|
610
|
+
entityIds?: Array<string> | null;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
export namespace McpValidateResponse {
|
|
614
|
+
/**
|
|
615
|
+
* Client information for the MCP server
|
|
616
|
+
*/
|
|
617
|
+
export interface Client {
|
|
618
|
+
/**
|
|
619
|
+
* Project identifier that owns this MCP server
|
|
620
|
+
*/
|
|
621
|
+
id: string;
|
|
622
|
+
|
|
623
|
+
/**
|
|
624
|
+
* Organization identifier that owns the project
|
|
625
|
+
*/
|
|
626
|
+
orgId: string;
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
/**
|
|
630
|
+
* User authentication data for the MCP server
|
|
631
|
+
*/
|
|
632
|
+
export interface UserData {
|
|
633
|
+
/**
|
|
634
|
+
* User identifier for API access
|
|
635
|
+
*/
|
|
636
|
+
id: string;
|
|
637
|
+
|
|
638
|
+
/**
|
|
639
|
+
* API key for authenticating requests to the Composio API
|
|
640
|
+
*/
|
|
641
|
+
apiKey: string;
|
|
642
|
+
|
|
643
|
+
/**
|
|
644
|
+
* Email address associated with the API key user
|
|
645
|
+
*/
|
|
646
|
+
email: string;
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
|
|
531
650
|
export interface McpCreateParams {
|
|
532
651
|
/**
|
|
533
652
|
* Human-readable name to identify this MCP server instance (4-25 characters,
|
|
@@ -624,6 +743,13 @@ export interface McpRetrieveAppParams {
|
|
|
624
743
|
toolkit?: string;
|
|
625
744
|
}
|
|
626
745
|
|
|
746
|
+
export interface McpValidateParams {
|
|
747
|
+
/**
|
|
748
|
+
* Administrative access token required for validating MCP servers
|
|
749
|
+
*/
|
|
750
|
+
'x-composio-admin-token': string;
|
|
751
|
+
}
|
|
752
|
+
|
|
627
753
|
Mcp.Custom = Custom;
|
|
628
754
|
|
|
629
755
|
export declare namespace Mcp {
|
|
@@ -634,10 +760,12 @@ export declare namespace Mcp {
|
|
|
634
760
|
type McpListResponse as McpListResponse,
|
|
635
761
|
type McpDeleteResponse as McpDeleteResponse,
|
|
636
762
|
type McpRetrieveAppResponse as McpRetrieveAppResponse,
|
|
763
|
+
type McpValidateResponse as McpValidateResponse,
|
|
637
764
|
type McpCreateParams as McpCreateParams,
|
|
638
765
|
type McpUpdateParams as McpUpdateParams,
|
|
639
766
|
type McpListParams as McpListParams,
|
|
640
767
|
type McpRetrieveAppParams as McpRetrieveAppParams,
|
|
768
|
+
type McpValidateParams as McpValidateParams,
|
|
641
769
|
};
|
|
642
770
|
|
|
643
771
|
export {
|
|
@@ -99,12 +99,6 @@ export interface APIKeyCreateResponse {
|
|
|
99
99
|
*/
|
|
100
100
|
created_at: string;
|
|
101
101
|
|
|
102
|
-
/**
|
|
103
|
-
* @deprecated UTC timestamp indicating when the API key was created. DEPRECATED:
|
|
104
|
-
* Use created_at instead.
|
|
105
|
-
*/
|
|
106
|
-
createdAt: string;
|
|
107
|
-
|
|
108
102
|
/**
|
|
109
103
|
* The API key string value that should be included in API requests. This value is
|
|
110
104
|
* only shown once at creation time.
|
|
@@ -193,24 +187,12 @@ export interface APIKeyCreateAPIKeyResponse {
|
|
|
193
187
|
*/
|
|
194
188
|
created_at: string;
|
|
195
189
|
|
|
196
|
-
/**
|
|
197
|
-
* @deprecated UTC timestamp indicating when the API key was created. Use
|
|
198
|
-
* created_at instead.
|
|
199
|
-
*/
|
|
200
|
-
createdAt: string;
|
|
201
|
-
|
|
202
190
|
/**
|
|
203
191
|
* The API key string value that should be included in API requests. This value is
|
|
204
192
|
* only shown once.
|
|
205
193
|
*/
|
|
206
194
|
key: string;
|
|
207
195
|
|
|
208
|
-
/**
|
|
209
|
-
* @deprecated UTC timestamp indicating when the API key was created. Use
|
|
210
|
-
* last_used_at instead.
|
|
211
|
-
*/
|
|
212
|
-
lastUsedAt: string;
|
|
213
|
-
|
|
214
196
|
/**
|
|
215
197
|
* Name assigned to help identify the key's purpose. For auto-generated keys, this
|
|
216
198
|
* will be a random name.
|
package/src/resources/tools.ts
CHANGED
|
@@ -411,18 +411,17 @@ export interface ToolExecuteParams {
|
|
|
411
411
|
*/
|
|
412
412
|
custom_auth_params?: ToolExecuteParams.CustomAuthParams;
|
|
413
413
|
|
|
414
|
-
/**
|
|
415
|
-
* Entity identifier for multi-entity connected accounts (e.g. multiple
|
|
416
|
-
* repositories, organizations)
|
|
417
|
-
*/
|
|
418
|
-
entity_id?: string;
|
|
419
|
-
|
|
420
414
|
/**
|
|
421
415
|
* Natural language description of the task to perform (mutually exclusive with
|
|
422
416
|
* arguments)
|
|
423
417
|
*/
|
|
424
418
|
text?: string;
|
|
425
419
|
|
|
420
|
+
/**
|
|
421
|
+
* User id for multi-user connected accounts (e.g. multiple users, organizations)
|
|
422
|
+
*/
|
|
423
|
+
user_id?: string;
|
|
424
|
+
|
|
426
425
|
/**
|
|
427
426
|
* Tool version to execute (defaults to "latest" if not specified)
|
|
428
427
|
*/
|
|
@@ -56,10 +56,9 @@ export namespace TriggerInstanceListActiveResponse {
|
|
|
56
56
|
connected_account_id: string;
|
|
57
57
|
|
|
58
58
|
/**
|
|
59
|
-
*
|
|
60
|
-
* Please use connected_account_id instead.
|
|
59
|
+
* UUID of the connected account this trigger is associated with
|
|
61
60
|
*/
|
|
62
|
-
|
|
61
|
+
connected_account_uuid: string;
|
|
63
62
|
|
|
64
63
|
/**
|
|
65
64
|
* ISO 8601 timestamp when the trigger instance was disabled, if applicable
|
|
@@ -86,28 +85,15 @@ export namespace TriggerInstanceListActiveResponse {
|
|
|
86
85
|
*/
|
|
87
86
|
trigger_name: string;
|
|
88
87
|
|
|
89
|
-
/**
|
|
90
|
-
* @deprecated DEPRECATED: This parameter will be removed in a future version.
|
|
91
|
-
* Please use trigger_config instead.
|
|
92
|
-
*/
|
|
93
|
-
triggerConfig: Record<string, unknown>;
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* @deprecated DEPRECATED: This parameter will be removed in a future version.
|
|
97
|
-
* Please use trigger_name instead.
|
|
98
|
-
*/
|
|
99
|
-
triggerName: string;
|
|
100
|
-
|
|
101
88
|
/**
|
|
102
89
|
* ISO 8601 timestamp when the trigger instance was updated
|
|
103
90
|
*/
|
|
104
91
|
updated_at: string;
|
|
105
92
|
|
|
106
93
|
/**
|
|
107
|
-
*
|
|
108
|
-
* Please use updated_at instead.
|
|
94
|
+
* ID of the user this trigger is associated with
|
|
109
95
|
*/
|
|
110
|
-
|
|
96
|
+
user_id: string;
|
|
111
97
|
|
|
112
98
|
/**
|
|
113
99
|
* Deprecated fields for the trigger instance
|
|
@@ -162,22 +148,14 @@ export interface TriggerInstanceListActiveParams {
|
|
|
162
148
|
*/
|
|
163
149
|
auth_config_ids?: Array<string> | null;
|
|
164
150
|
|
|
165
|
-
|
|
166
|
-
* @deprecated DEPRECATED: This parameter will be removed in a future version.
|
|
167
|
-
* Please use auth_config_ids instead.
|
|
168
|
-
*/
|
|
169
|
-
authConfigIds?: Array<string> | null;
|
|
151
|
+
authConfigIds?: string;
|
|
170
152
|
|
|
171
153
|
/**
|
|
172
154
|
* Array of connected account IDs to filter triggers by
|
|
173
155
|
*/
|
|
174
156
|
connected_account_ids?: Array<string> | null;
|
|
175
157
|
|
|
176
|
-
|
|
177
|
-
* @deprecated DEPRECATED: This parameter will be removed in a future version.
|
|
178
|
-
* Please use connected_account_ids instead.
|
|
179
|
-
*/
|
|
180
|
-
connectedAccountIds?: Array<string> | null;
|
|
158
|
+
connectedAccountIds?: string;
|
|
181
159
|
|
|
182
160
|
/**
|
|
183
161
|
* Array of auth config UUIDs to filter triggers by
|
|
@@ -204,11 +182,7 @@ export interface TriggerInstanceListActiveParams {
|
|
|
204
182
|
*/
|
|
205
183
|
show_disabled?: boolean | null;
|
|
206
184
|
|
|
207
|
-
|
|
208
|
-
* @deprecated DEPRECATED: This parameter will be removed in a future version.
|
|
209
|
-
* Please use show_disabled instead.
|
|
210
|
-
*/
|
|
211
|
-
showDisabled?: boolean | null;
|
|
185
|
+
showDisabled?: string;
|
|
212
186
|
|
|
213
187
|
/**
|
|
214
188
|
* Array of trigger IDs to filter triggers by
|
|
@@ -220,17 +194,9 @@ export interface TriggerInstanceListActiveParams {
|
|
|
220
194
|
*/
|
|
221
195
|
trigger_names?: Array<string> | null;
|
|
222
196
|
|
|
223
|
-
|
|
224
|
-
* @deprecated DEPRECATED: This parameter will be removed in a future version.
|
|
225
|
-
* Please use trigger_ids instead.
|
|
226
|
-
*/
|
|
227
|
-
triggerIds?: Array<string> | null;
|
|
197
|
+
triggerIds?: string;
|
|
228
198
|
|
|
229
|
-
|
|
230
|
-
* @deprecated DEPRECATED: This parameter will be removed in a future version.
|
|
231
|
-
* Please use trigger_names instead.
|
|
232
|
-
*/
|
|
233
|
-
triggerNames?: Array<string> | null;
|
|
199
|
+
triggerNames?: string;
|
|
234
200
|
}
|
|
235
201
|
|
|
236
202
|
export interface TriggerInstanceUpsertParams {
|
|
@@ -239,12 +205,6 @@ export interface TriggerInstanceUpsertParams {
|
|
|
239
205
|
*/
|
|
240
206
|
connected_account_id?: string;
|
|
241
207
|
|
|
242
|
-
/**
|
|
243
|
-
* @deprecated DEPRECATED: This parameter will be removed in a future version.
|
|
244
|
-
* Please use connected_account_id instead.
|
|
245
|
-
*/
|
|
246
|
-
connectedAuthId?: string;
|
|
247
|
-
|
|
248
208
|
/**
|
|
249
209
|
* Trigger configuration
|
|
250
210
|
*/
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../core/api-promise';
|
|
5
|
+
import { buildHeaders } from '../../internal/headers';
|
|
6
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
7
|
+
|
|
8
|
+
export class Admin extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Administrative endpoint that retrieves all active connections for a given
|
|
11
|
+
* toolkit slug. This is primarily used for token refresh operations and system
|
|
12
|
+
* maintenance. Only includes non-deleted connections with OAuth2 or JWT
|
|
13
|
+
* authentication types.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* const response = await client.v3.admin.listConnections({
|
|
18
|
+
* toolkit_slug: 'google-drive',
|
|
19
|
+
* 'x-composio-admin-token': 'adm_123456789abcdef',
|
|
20
|
+
* });
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
listConnections(
|
|
24
|
+
params: AdminListConnectionsParams,
|
|
25
|
+
options?: RequestOptions,
|
|
26
|
+
): APIPromise<AdminListConnectionsResponse> {
|
|
27
|
+
const { 'x-composio-admin-token': xComposioAdminToken, ...query } = params;
|
|
28
|
+
return this._client.get('/api/v3/admin/connections', {
|
|
29
|
+
query,
|
|
30
|
+
...options,
|
|
31
|
+
headers: buildHeaders([{ 'x-composio-admin-token': xComposioAdminToken }, options?.headers]),
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Administrative endpoint that refreshes authentication tokens for multiple
|
|
37
|
+
* connected accounts in parallel. This is useful for proactive token refresh to
|
|
38
|
+
* prevent authentication failures or for recovering from authentication issues
|
|
39
|
+
* across multiple connections.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```ts
|
|
43
|
+
* const response = await client.v3.admin.refreshAuthTokens({
|
|
44
|
+
* connectionIds: ['conn_123abc', 'conn_456def'],
|
|
45
|
+
* 'x-composio-admin-token': 'adm_123456789abcdef',
|
|
46
|
+
* });
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
refreshAuthTokens(
|
|
50
|
+
params: AdminRefreshAuthTokensParams,
|
|
51
|
+
options?: RequestOptions,
|
|
52
|
+
): APIPromise<AdminRefreshAuthTokensResponse> {
|
|
53
|
+
const { 'x-composio-admin-token': xComposioAdminToken, ...body } = params;
|
|
54
|
+
return this._client.post('/api/v3/admin/auth-refresh', {
|
|
55
|
+
body,
|
|
56
|
+
...options,
|
|
57
|
+
headers: buildHeaders([{ 'x-composio-admin-token': xComposioAdminToken }, options?.headers]),
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface AdminListConnectionsResponse {
|
|
63
|
+
/**
|
|
64
|
+
* Collection of account connection objects, may be empty if no connections exist
|
|
65
|
+
*/
|
|
66
|
+
items: Array<AdminListConnectionsResponse.Item>;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export namespace AdminListConnectionsResponse {
|
|
70
|
+
export interface Item {
|
|
71
|
+
/**
|
|
72
|
+
* Identifier that can be used with other API endpoints that operate on connections
|
|
73
|
+
*/
|
|
74
|
+
id: string;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface AdminRefreshAuthTokensResponse {
|
|
79
|
+
/**
|
|
80
|
+
* Array of connections that failed to refresh with detailed error information
|
|
81
|
+
*/
|
|
82
|
+
failures: Array<AdminRefreshAuthTokensResponse.Failure>;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* List of connections where token refresh was successful or not needed
|
|
86
|
+
*/
|
|
87
|
+
success: Array<string>;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export namespace AdminRefreshAuthTokensResponse {
|
|
91
|
+
export interface Failure {
|
|
92
|
+
/**
|
|
93
|
+
* Connection ID that failed during refresh
|
|
94
|
+
*/
|
|
95
|
+
connectionId: string;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Specific error code identifying why the refresh operation failed
|
|
99
|
+
*/
|
|
100
|
+
error: string;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export interface AdminListConnectionsParams {
|
|
105
|
+
/**
|
|
106
|
+
* Query param: The unique identifier slug of the toolkit to filter connections by
|
|
107
|
+
*/
|
|
108
|
+
toolkit_slug: string;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Header param: Admin authentication token required for administrative operations
|
|
112
|
+
*/
|
|
113
|
+
'x-composio-admin-token': string;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export interface AdminRefreshAuthTokensParams {
|
|
117
|
+
/**
|
|
118
|
+
* Body param: List of connection identifiers that need token refresh
|
|
119
|
+
*/
|
|
120
|
+
connectionIds: Array<string>;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Header param: Admin authentication token required for administrative operations
|
|
124
|
+
*/
|
|
125
|
+
'x-composio-admin-token': string;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Body param: Controls processing speed and system load. Higher values process
|
|
129
|
+
* faster but increase load.
|
|
130
|
+
*/
|
|
131
|
+
parallelism?: number;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export declare namespace Admin {
|
|
135
|
+
export {
|
|
136
|
+
type AdminListConnectionsResponse as AdminListConnectionsResponse,
|
|
137
|
+
type AdminRefreshAuthTokensResponse as AdminRefreshAuthTokensResponse,
|
|
138
|
+
type AdminListConnectionsParams as AdminListConnectionsParams,
|
|
139
|
+
type AdminRefreshAuthTokensParams as AdminRefreshAuthTokensParams,
|
|
140
|
+
};
|
|
141
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from '
|
|
3
|
+
import { APIResource } from '../../../core/resource';
|
|
4
4
|
import * as SessionAPI from './session';
|
|
5
|
-
import { Session,
|
|
5
|
+
import { Session, SessionRetrieveInfoResponse } from './session';
|
|
6
6
|
|
|
7
7
|
export class Auth extends APIResource {
|
|
8
8
|
session: SessionAPI.Session = new SessionAPI.Session(this._client);
|
|
@@ -11,5 +11,5 @@ export class Auth extends APIResource {
|
|
|
11
11
|
Auth.Session = Session;
|
|
12
12
|
|
|
13
13
|
export declare namespace Auth {
|
|
14
|
-
export { Session as Session, type
|
|
14
|
+
export { Session as Session, type SessionRetrieveInfoResponse as SessionRetrieveInfoResponse };
|
|
15
15
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from '
|
|
4
|
-
import { APIPromise } from '
|
|
5
|
-
import { RequestOptions } from '
|
|
3
|
+
import { APIResource } from '../../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../../../internal/request-options';
|
|
6
6
|
|
|
7
7
|
export class Session extends APIResource {
|
|
8
8
|
/**
|
|
@@ -11,8 +11,14 @@ export class Session extends APIResource {
|
|
|
11
11
|
* applicable. This endpoint is useful for verifying authentication status and
|
|
12
12
|
* retrieving contextual information about the authenticated user and their access
|
|
13
13
|
* privileges.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* const response =
|
|
18
|
+
* await client.v3.auth.session.retrieveInfo();
|
|
19
|
+
* ```
|
|
14
20
|
*/
|
|
15
|
-
|
|
21
|
+
retrieveInfo(options?: RequestOptions): APIPromise<SessionRetrieveInfoResponse> {
|
|
16
22
|
return this._client.get('/api/v3/auth/session/info', options);
|
|
17
23
|
}
|
|
18
24
|
}
|
|
@@ -20,25 +26,25 @@ export class Session extends APIResource {
|
|
|
20
26
|
/**
|
|
21
27
|
* Response containing user session information
|
|
22
28
|
*/
|
|
23
|
-
export interface
|
|
29
|
+
export interface SessionRetrieveInfoResponse {
|
|
24
30
|
/**
|
|
25
31
|
* Details of the API key used for authentication (null if using session auth)
|
|
26
32
|
*/
|
|
27
|
-
api_key:
|
|
33
|
+
api_key: SessionRetrieveInfoResponse.APIKey | null;
|
|
28
34
|
|
|
29
35
|
/**
|
|
30
36
|
* Information about the authenticated user
|
|
31
37
|
*/
|
|
32
|
-
org_member:
|
|
38
|
+
org_member: SessionRetrieveInfoResponse.OrgMember;
|
|
33
39
|
|
|
34
40
|
/**
|
|
35
41
|
* Details of the current active project (null if accessing with org-level
|
|
36
42
|
* credentials)
|
|
37
43
|
*/
|
|
38
|
-
project:
|
|
44
|
+
project: SessionRetrieveInfoResponse.Project | null;
|
|
39
45
|
}
|
|
40
46
|
|
|
41
|
-
export namespace
|
|
47
|
+
export namespace SessionRetrieveInfoResponse {
|
|
42
48
|
/**
|
|
43
49
|
* Details of the API key used for authentication (null if using session auth)
|
|
44
50
|
*/
|
|
@@ -288,5 +294,5 @@ export namespace SessionRetrieveResponse {
|
|
|
288
294
|
}
|
|
289
295
|
|
|
290
296
|
export declare namespace Session {
|
|
291
|
-
export { type
|
|
297
|
+
export { type SessionRetrieveInfoResponse as SessionRetrieveInfoResponse };
|
|
292
298
|
}
|