@composio/client 0.1.0-alpha.39 → 0.1.0-alpha.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/client.d.mts +1 -1
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +1 -1
  5. package/client.d.ts.map +1 -1
  6. package/client.js +1 -1
  7. package/client.js.map +1 -1
  8. package/client.mjs +1 -1
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/auth-configs.d.mts +41 -3
  12. package/resources/auth-configs.d.mts.map +1 -1
  13. package/resources/auth-configs.d.ts +41 -3
  14. package/resources/auth-configs.d.ts.map +1 -1
  15. package/resources/connected-accounts.d.mts +2656 -964
  16. package/resources/connected-accounts.d.mts.map +1 -1
  17. package/resources/connected-accounts.d.ts +2656 -964
  18. package/resources/connected-accounts.d.ts.map +1 -1
  19. package/resources/files.d.mts +30 -0
  20. package/resources/files.d.mts.map +1 -1
  21. package/resources/files.d.ts +30 -0
  22. package/resources/files.d.ts.map +1 -1
  23. package/resources/index.d.mts +1 -1
  24. package/resources/index.d.ts +1 -1
  25. package/resources/index.js +1 -1
  26. package/resources/index.js.map +1 -1
  27. package/resources/index.mjs +1 -1
  28. package/resources/link.d.mts +410 -1
  29. package/resources/link.d.mts.map +1 -1
  30. package/resources/link.d.ts +410 -1
  31. package/resources/link.d.ts.map +1 -1
  32. package/resources/mcp/custom.d.mts +9 -6
  33. package/resources/mcp/custom.d.mts.map +1 -1
  34. package/resources/mcp/custom.d.ts +9 -6
  35. package/resources/mcp/custom.d.ts.map +1 -1
  36. package/resources/mcp/mcp.d.mts +2 -4
  37. package/resources/mcp/mcp.d.mts.map +1 -1
  38. package/resources/mcp/mcp.d.ts +2 -4
  39. package/resources/mcp/mcp.d.ts.map +1 -1
  40. package/resources/mcp/mcp.js.map +1 -1
  41. package/resources/mcp/mcp.mjs.map +1 -1
  42. package/resources/tool-router/index.d.mts +3 -0
  43. package/resources/tool-router/index.d.mts.map +1 -0
  44. package/resources/tool-router/index.d.ts +3 -0
  45. package/resources/tool-router/index.d.ts.map +1 -0
  46. package/resources/tool-router/index.js +9 -0
  47. package/resources/tool-router/index.js.map +1 -0
  48. package/resources/tool-router/index.mjs +4 -0
  49. package/resources/tool-router/index.mjs.map +1 -0
  50. package/resources/tool-router/session.d.mts +708 -0
  51. package/resources/tool-router/session.d.mts.map +1 -0
  52. package/resources/tool-router/session.d.ts +708 -0
  53. package/resources/tool-router/session.d.ts.map +1 -0
  54. package/resources/tool-router/session.js +98 -0
  55. package/resources/tool-router/session.js.map +1 -0
  56. package/resources/tool-router/session.mjs +94 -0
  57. package/resources/tool-router/session.mjs.map +1 -0
  58. package/resources/tool-router/tool-router.d.mts +91 -0
  59. package/resources/tool-router/tool-router.d.mts.map +1 -0
  60. package/resources/tool-router/tool-router.d.ts +91 -0
  61. package/resources/tool-router/tool-router.d.ts.map +1 -0
  62. package/resources/tool-router/tool-router.js +46 -0
  63. package/resources/tool-router/tool-router.js.map +1 -0
  64. package/resources/tool-router/tool-router.mjs +41 -0
  65. package/resources/tool-router/tool-router.mjs.map +1 -0
  66. package/resources/tool-router.d.mts +1 -86
  67. package/resources/tool-router.d.mts.map +1 -1
  68. package/resources/tool-router.d.ts +1 -86
  69. package/resources/tool-router.d.ts.map +1 -1
  70. package/resources/tool-router.js +2 -34
  71. package/resources/tool-router.js.map +1 -1
  72. package/resources/tool-router.mjs +1 -32
  73. package/resources/tool-router.mjs.map +1 -1
  74. package/resources/toolkits.d.mts +9 -9
  75. package/resources/toolkits.d.ts +9 -9
  76. package/resources/toolkits.js +9 -9
  77. package/resources/toolkits.mjs +9 -9
  78. package/resources/tools.d.mts +161 -45
  79. package/resources/tools.d.mts.map +1 -1
  80. package/resources/tools.d.ts +161 -45
  81. package/resources/tools.d.ts.map +1 -1
  82. package/resources/tools.js +3 -3
  83. package/resources/tools.mjs +3 -3
  84. package/resources/trigger-instances/manage.d.mts +17 -0
  85. package/resources/trigger-instances/manage.d.mts.map +1 -1
  86. package/resources/trigger-instances/manage.d.ts +17 -0
  87. package/resources/trigger-instances/manage.d.ts.map +1 -1
  88. package/resources/trigger-instances/manage.js +17 -0
  89. package/resources/trigger-instances/manage.js.map +1 -1
  90. package/resources/trigger-instances/manage.mjs +17 -0
  91. package/resources/trigger-instances/manage.mjs.map +1 -1
  92. package/resources/trigger-instances/trigger-instances.d.mts +25 -0
  93. package/resources/trigger-instances/trigger-instances.d.mts.map +1 -1
  94. package/resources/trigger-instances/trigger-instances.d.ts +25 -0
  95. package/resources/trigger-instances/trigger-instances.d.ts.map +1 -1
  96. package/resources/trigger-instances/trigger-instances.js +14 -0
  97. package/resources/trigger-instances/trigger-instances.js.map +1 -1
  98. package/resources/trigger-instances/trigger-instances.mjs +14 -0
  99. package/resources/trigger-instances/trigger-instances.mjs.map +1 -1
  100. package/resources/triggers-types.d.mts +1 -5
  101. package/resources/triggers-types.d.mts.map +1 -1
  102. package/resources/triggers-types.d.ts +1 -5
  103. package/resources/triggers-types.d.ts.map +1 -1
  104. package/resources/triggers-types.js +1 -1
  105. package/resources/triggers-types.mjs +1 -1
  106. package/src/client.ts +5 -5
  107. package/src/resources/auth-configs.ts +43 -3
  108. package/src/resources/connected-accounts.ts +4657 -1579
  109. package/src/resources/files.ts +36 -0
  110. package/src/resources/index.ts +1 -1
  111. package/src/resources/link.ts +741 -1
  112. package/src/resources/mcp/custom.ts +10 -6
  113. package/src/resources/mcp/mcp.ts +2 -4
  114. package/src/resources/tool-router/index.ts +19 -0
  115. package/src/resources/tool-router/session.ts +858 -0
  116. package/src/resources/tool-router/tool-router.ts +137 -0
  117. package/src/resources/tool-router.ts +1 -105
  118. package/src/resources/toolkits.ts +9 -9
  119. package/src/resources/tools.ts +237 -45
  120. package/src/resources/trigger-instances/manage.ts +17 -0
  121. package/src/resources/trigger-instances/trigger-instances.ts +25 -0
  122. package/src/resources/triggers-types.ts +1 -6
  123. package/src/version.ts +1 -1
  124. package/version.d.mts +1 -1
  125. package/version.d.ts +1 -1
  126. package/version.js +1 -1
  127. package/version.mjs +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/resources/tool-router/session.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;IAI9F;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC;IAI1F;;;;;;;;;;;;;;OAcG;IACH,OAAO,CACL,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,oBAAoB,EAC5B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,sBAAsB,CAAC;IAYrC;;;;;;;;;;;;OAYG;IACH,IAAI,CACF,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,iBAAiB,EACvB,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,mBAAmB,CAAC;IAIlC;;;;;;;;;;;OAWG;IACH,QAAQ,CACN,SAAS,EAAE,MAAM,EACjB,KAAK,GAAE,qBAAqB,GAAG,IAAI,GAAG,SAAc,EACpD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,uBAAuB,CAAC;CAGvC;AAED,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,MAAM,EAAE,qBAAqB,CAAC,MAAM,CAAC;IAErC,GAAG,EAAE,qBAAqB,CAAC,GAAG,CAAC;IAE/B;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,iBAAiB,EAAE,KAAK,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BAAmB,EAC/C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;CACH"}
@@ -0,0 +1,98 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Session = void 0;
5
+ const resource_1 = require("../../core/resource.js");
6
+ const headers_1 = require("../../internal/headers.js");
7
+ const path_1 = require("../../internal/utils/path.js");
8
+ class Session extends resource_1.APIResource {
9
+ /**
10
+ * Creates a new session for the tool router feature. This endpoint initializes a
11
+ * new session with specified toolkits and their authentication configurations. The
12
+ * session provides an isolated environment for testing and managing tool routing
13
+ * logic with scoped MCP server access.
14
+ *
15
+ * @example
16
+ * ```ts
17
+ * const session = await client.toolRouter.session.create({
18
+ * user_id: 'user_123456789',
19
+ * });
20
+ * ```
21
+ */
22
+ create(body, options) {
23
+ return this._client.post('/api/v3/tool_router/session', { body, ...options });
24
+ }
25
+ /**
26
+ * Retrieves an existing tool router session by its ID. Returns the session
27
+ * configuration, MCP server URL, and available tools.
28
+ *
29
+ * @example
30
+ * ```ts
31
+ * const session = await client.toolRouter.session.retrieve(
32
+ * 'trs_123456789',
33
+ * );
34
+ * ```
35
+ */
36
+ retrieve(sessionID, options) {
37
+ return this._client.get((0, path_1.path) `/api/v3/tool_router/session/${sessionID}`, options);
38
+ }
39
+ /**
40
+ * Executes a specific tool within a tool router session. The toolkit is
41
+ * automatically inferred from the tool slug. The tool must belong to an allowed
42
+ * toolkit and must not be disabled in the session configuration. This endpoint
43
+ * validates permissions, resolves connected accounts, and executes the tool with
44
+ * the session context.
45
+ *
46
+ * @example
47
+ * ```ts
48
+ * const response = await client.toolRouter.session.execute(
49
+ * 'trs_LX9uJKBinWWr',
50
+ * { tool_slug: 'GITHUB_CREATE_ISSUE' },
51
+ * );
52
+ * ```
53
+ */
54
+ execute(sessionID, params, options) {
55
+ const { 'x-session-access-key': xSessionAccessKey, ...body } = params;
56
+ return this._client.post((0, path_1.path) `/api/v3/tool_router/session/${sessionID}/execute`, {
57
+ body,
58
+ ...options,
59
+ headers: (0, headers_1.buildHeaders)([
60
+ { ...(xSessionAccessKey != null ? { 'x-session-access-key': xSessionAccessKey } : undefined) },
61
+ options?.headers,
62
+ ]),
63
+ });
64
+ }
65
+ /**
66
+ * Initiates an authentication link session for a specific toolkit within a tool
67
+ * router session. Returns a link token and redirect URL that users can use to
68
+ * complete the OAuth flow.
69
+ *
70
+ * @example
71
+ * ```ts
72
+ * const response = await client.toolRouter.session.link(
73
+ * 'trs_LX9uJKBinWWr',
74
+ * { toolkit: 'github' },
75
+ * );
76
+ * ```
77
+ */
78
+ link(sessionID, body, options) {
79
+ return this._client.post((0, path_1.path) `/api/v3/tool_router/session/${sessionID}/link`, { body, ...options });
80
+ }
81
+ /**
82
+ * Retrieves a cursor-paginated list of toolkits available in the tool router
83
+ * session. Includes toolkit metadata, composio-managed auth schemes, and connected
84
+ * accounts if available. Optionally filter by specific toolkit slugs.
85
+ *
86
+ * @example
87
+ * ```ts
88
+ * const response = await client.toolRouter.session.toolkits(
89
+ * 'trs_123456789',
90
+ * );
91
+ * ```
92
+ */
93
+ toolkits(sessionID, query = {}, options) {
94
+ return this._client.get((0, path_1.path) `/api/v3/tool_router/session/${sessionID}/toolkits`, { query, ...options });
95
+ }
96
+ }
97
+ exports.Session = Session;
98
+ //# sourceMappingURL=session.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session.js","sourceRoot":"","sources":["../../src/resources/tool-router/session.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAElD,uDAAsD;AAEtD,uDAAiD;AAEjD,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,IAAyB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,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CAAC;CACF;AAxGD,0BAwGC"}
@@ -0,0 +1,94 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../../core/resource.mjs";
3
+ import { buildHeaders } from "../../internal/headers.mjs";
4
+ import { path } from "../../internal/utils/path.mjs";
5
+ export class Session extends APIResource {
6
+ /**
7
+ * Creates a new session for the tool router feature. This endpoint initializes a
8
+ * new session with specified toolkits and their authentication configurations. The
9
+ * session provides an isolated environment for testing and managing tool routing
10
+ * logic with scoped MCP server access.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const session = await client.toolRouter.session.create({
15
+ * user_id: 'user_123456789',
16
+ * });
17
+ * ```
18
+ */
19
+ create(body, options) {
20
+ return this._client.post('/api/v3/tool_router/session', { body, ...options });
21
+ }
22
+ /**
23
+ * Retrieves an existing tool router session by its ID. Returns the session
24
+ * configuration, MCP server URL, and available tools.
25
+ *
26
+ * @example
27
+ * ```ts
28
+ * const session = await client.toolRouter.session.retrieve(
29
+ * 'trs_123456789',
30
+ * );
31
+ * ```
32
+ */
33
+ retrieve(sessionID, options) {
34
+ return this._client.get(path `/api/v3/tool_router/session/${sessionID}`, options);
35
+ }
36
+ /**
37
+ * Executes a specific tool within a tool router session. The toolkit is
38
+ * automatically inferred from the tool slug. The tool must belong to an allowed
39
+ * toolkit and must not be disabled in the session configuration. This endpoint
40
+ * validates permissions, resolves connected accounts, and executes the tool with
41
+ * the session context.
42
+ *
43
+ * @example
44
+ * ```ts
45
+ * const response = await client.toolRouter.session.execute(
46
+ * 'trs_LX9uJKBinWWr',
47
+ * { tool_slug: 'GITHUB_CREATE_ISSUE' },
48
+ * );
49
+ * ```
50
+ */
51
+ execute(sessionID, params, options) {
52
+ const { 'x-session-access-key': xSessionAccessKey, ...body } = params;
53
+ return this._client.post(path `/api/v3/tool_router/session/${sessionID}/execute`, {
54
+ body,
55
+ ...options,
56
+ headers: buildHeaders([
57
+ { ...(xSessionAccessKey != null ? { 'x-session-access-key': xSessionAccessKey } : undefined) },
58
+ options?.headers,
59
+ ]),
60
+ });
61
+ }
62
+ /**
63
+ * Initiates an authentication link session for a specific toolkit within a tool
64
+ * router session. Returns a link token and redirect URL that users can use to
65
+ * complete the OAuth flow.
66
+ *
67
+ * @example
68
+ * ```ts
69
+ * const response = await client.toolRouter.session.link(
70
+ * 'trs_LX9uJKBinWWr',
71
+ * { toolkit: 'github' },
72
+ * );
73
+ * ```
74
+ */
75
+ link(sessionID, body, options) {
76
+ return this._client.post(path `/api/v3/tool_router/session/${sessionID}/link`, { body, ...options });
77
+ }
78
+ /**
79
+ * Retrieves a cursor-paginated list of toolkits available in the tool router
80
+ * session. Includes toolkit metadata, composio-managed auth schemes, and connected
81
+ * accounts if available. Optionally filter by specific toolkit slugs.
82
+ *
83
+ * @example
84
+ * ```ts
85
+ * const response = await client.toolRouter.session.toolkits(
86
+ * 'trs_123456789',
87
+ * );
88
+ * ```
89
+ */
90
+ toolkits(sessionID, query = {}, options) {
91
+ return this._client.get(path `/api/v3/tool_router/session/${sessionID}/toolkits`, { query, ...options });
92
+ }
93
+ }
94
+ //# sourceMappingURL=session.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session.mjs","sourceRoot":"","sources":["../../src/resources/tool-router/session.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,IAAyB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,6BAA6B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChF,CAAC;IAED;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,SAAiB,EAAE,OAAwB;QAClD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,+BAA+B,SAAS,EAAE,EAAE,OAAO,CAAC,CAAC;IACnF,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,OAAO,CACL,SAAiB,EACjB,MAA4B,EAC5B,OAAwB;QAExB,MAAM,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACtE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,+BAA+B,SAAS,UAAU,EAAE;YAC/E,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,GAAG,CAAC,iBAAiB,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBAC9F,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,IAAI,CACF,SAAiB,EACjB,IAAuB,EACvB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,+BAA+B,SAAS,OAAO,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtG,CAAC;IAED;;;;;;;;;;;OAWG;IACH,QAAQ,CACN,SAAiB,EACjB,QAAkD,EAAE,EACpD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,+BAA+B,SAAS,WAAW,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1G,CAAC;CACF"}
@@ -0,0 +1,91 @@
1
+ import { APIResource } from "../../core/resource.mjs";
2
+ import * as SessionAPI from "./session.mjs";
3
+ import { Session, SessionCreateParams, SessionCreateResponse, SessionExecuteParams, SessionExecuteResponse, SessionLinkParams, SessionLinkResponse, SessionRetrieveResponse, SessionToolkitsParams, SessionToolkitsResponse } from "./session.mjs";
4
+ import { APIPromise } from "../../core/api-promise.mjs";
5
+ import { RequestOptions } from "../../internal/request-options.mjs";
6
+ export declare class ToolRouter extends APIResource {
7
+ session: SessionAPI.Session;
8
+ /**
9
+ * Creates a new session for the tool router lab feature. This endpoint initializes
10
+ * a new session with specified toolkits and their authentication configurations.
11
+ * The session provides an isolated environment for testing and managing tool
12
+ * routing logic with scoped MCP server access.
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * const response = await client.toolRouter.createSession({
17
+ * user_id: 'user_123456789',
18
+ * config: {
19
+ * toolkits: [
20
+ * {
21
+ * toolkit: 'gmail',
22
+ * auth_config_id: 'auth_config_123',
23
+ * },
24
+ * {
25
+ * toolkit: 'slack',
26
+ * auth_config_id: 'auth_config_456',
27
+ * },
28
+ * { toolkit: 'github' },
29
+ * ],
30
+ * },
31
+ * });
32
+ * ```
33
+ */
34
+ createSession(body: ToolRouterCreateSessionParams, options?: RequestOptions): APIPromise<ToolRouterCreateSessionResponse>;
35
+ }
36
+ export interface ToolRouterCreateSessionResponse {
37
+ /**
38
+ * MCP server endpoint URL for this specific chat session
39
+ */
40
+ chat_session_mcp_url: string;
41
+ /**
42
+ * Generated session identifier
43
+ */
44
+ session_id: string;
45
+ /**
46
+ * MCP server endpoint URL for this specific tool router instance
47
+ */
48
+ tool_router_instance_mcp_url: string;
49
+ }
50
+ export interface ToolRouterCreateSessionParams {
51
+ /**
52
+ * Unique user identifier for the session owner
53
+ */
54
+ user_id: string;
55
+ /**
56
+ * Session configuration including enabled toolkits and their auth configs
57
+ */
58
+ config?: ToolRouterCreateSessionParams.Config;
59
+ }
60
+ export declare namespace ToolRouterCreateSessionParams {
61
+ /**
62
+ * Session configuration including enabled toolkits and their auth configs
63
+ */
64
+ interface Config {
65
+ /**
66
+ * Whether to manually manage connections
67
+ */
68
+ manually_manage_connections?: boolean | null;
69
+ /**
70
+ * Array of toolkit configurations with optional auth configs
71
+ */
72
+ toolkits?: Array<Config.Toolkit>;
73
+ }
74
+ namespace Config {
75
+ interface Toolkit {
76
+ /**
77
+ * Toolkit identifier (e.g., gmail, slack, github)
78
+ */
79
+ toolkit: string;
80
+ /**
81
+ * Specific auth configuration ID for this toolkit
82
+ */
83
+ auth_config_id?: string;
84
+ }
85
+ }
86
+ }
87
+ export declare namespace ToolRouter {
88
+ export { type ToolRouterCreateSessionResponse as ToolRouterCreateSessionResponse, type ToolRouterCreateSessionParams as ToolRouterCreateSessionParams, };
89
+ export { Session as Session, type SessionCreateResponse as SessionCreateResponse, type SessionRetrieveResponse as SessionRetrieveResponse, type SessionExecuteResponse as SessionExecuteResponse, type SessionLinkResponse as SessionLinkResponse, type SessionToolkitsResponse as SessionToolkitsResponse, type SessionCreateParams as SessionCreateParams, type SessionExecuteParams as SessionExecuteParams, type SessionLinkParams as SessionLinkParams, type SessionToolkitsParams as SessionToolkitsParams, };
90
+ }
91
+ //# sourceMappingURL=tool-router.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-router.d.mts","sourceRoot":"","sources":["../../src/resources/tool-router/tool-router.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,EACL,OAAO,EACP,mBAAmB,EACnB,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,EACtB,iBAAiB,EACjB,mBAAmB,EACnB,uBAAuB,EACvB,qBAAqB,EACrB,uBAAuB,EACxB;OACM,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,UAAW,SAAQ,WAAW;IACzC,OAAO,EAAE,UAAU,CAAC,OAAO,CAAwC;IAEnE;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,aAAa,CACX,IAAI,EAAE,6BAA6B,EACnC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,+BAA+B,CAAC;CAG/C;AAED,MAAM,WAAW,+BAA+B;IAC9C;;OAEG;IACH,oBAAoB,EAAE,MAAM,CAAC;IAE7B;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,4BAA4B,EAAE,MAAM,CAAC;CACtC;AAED,MAAM,WAAW,6BAA6B;IAC5C;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,MAAM,CAAC,EAAE,6BAA6B,CAAC,MAAM,CAAC;CAC/C;AAED,yBAAiB,6BAA6B,CAAC;IAC7C;;OAEG;IACH,UAAiB,MAAM;QACrB;;WAEG;QACH,2BAA2B,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;QAE7C;;WAEG;QACH,QAAQ,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;KAClC;IAED,UAAiB,MAAM,CAAC;QACtB,UAAiB,OAAO;YACtB;;eAEG;YACH,OAAO,EAAE,MAAM,CAAC;YAEhB;;eAEG;YACH,cAAc,CAAC,EAAE,MAAM,CAAC;SACzB;KACF;CACF;AAID,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC,OAAO,EACL,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,6BAA6B,IAAI,6BAA6B,GACpE,CAAC;IAEF,OAAO,EACL,OAAO,IAAI,OAAO,EAClB,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;CACH"}
@@ -0,0 +1,91 @@
1
+ import { APIResource } from "../../core/resource.js";
2
+ import * as SessionAPI from "./session.js";
3
+ import { Session, SessionCreateParams, SessionCreateResponse, SessionExecuteParams, SessionExecuteResponse, SessionLinkParams, SessionLinkResponse, SessionRetrieveResponse, SessionToolkitsParams, SessionToolkitsResponse } from "./session.js";
4
+ import { APIPromise } from "../../core/api-promise.js";
5
+ import { RequestOptions } from "../../internal/request-options.js";
6
+ export declare class ToolRouter extends APIResource {
7
+ session: SessionAPI.Session;
8
+ /**
9
+ * Creates a new session for the tool router lab feature. This endpoint initializes
10
+ * a new session with specified toolkits and their authentication configurations.
11
+ * The session provides an isolated environment for testing and managing tool
12
+ * routing logic with scoped MCP server access.
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * const response = await client.toolRouter.createSession({
17
+ * user_id: 'user_123456789',
18
+ * config: {
19
+ * toolkits: [
20
+ * {
21
+ * toolkit: 'gmail',
22
+ * auth_config_id: 'auth_config_123',
23
+ * },
24
+ * {
25
+ * toolkit: 'slack',
26
+ * auth_config_id: 'auth_config_456',
27
+ * },
28
+ * { toolkit: 'github' },
29
+ * ],
30
+ * },
31
+ * });
32
+ * ```
33
+ */
34
+ createSession(body: ToolRouterCreateSessionParams, options?: RequestOptions): APIPromise<ToolRouterCreateSessionResponse>;
35
+ }
36
+ export interface ToolRouterCreateSessionResponse {
37
+ /**
38
+ * MCP server endpoint URL for this specific chat session
39
+ */
40
+ chat_session_mcp_url: string;
41
+ /**
42
+ * Generated session identifier
43
+ */
44
+ session_id: string;
45
+ /**
46
+ * MCP server endpoint URL for this specific tool router instance
47
+ */
48
+ tool_router_instance_mcp_url: string;
49
+ }
50
+ export interface ToolRouterCreateSessionParams {
51
+ /**
52
+ * Unique user identifier for the session owner
53
+ */
54
+ user_id: string;
55
+ /**
56
+ * Session configuration including enabled toolkits and their auth configs
57
+ */
58
+ config?: ToolRouterCreateSessionParams.Config;
59
+ }
60
+ export declare namespace ToolRouterCreateSessionParams {
61
+ /**
62
+ * Session configuration including enabled toolkits and their auth configs
63
+ */
64
+ interface Config {
65
+ /**
66
+ * Whether to manually manage connections
67
+ */
68
+ manually_manage_connections?: boolean | null;
69
+ /**
70
+ * Array of toolkit configurations with optional auth configs
71
+ */
72
+ toolkits?: Array<Config.Toolkit>;
73
+ }
74
+ namespace Config {
75
+ interface Toolkit {
76
+ /**
77
+ * Toolkit identifier (e.g., gmail, slack, github)
78
+ */
79
+ toolkit: string;
80
+ /**
81
+ * Specific auth configuration ID for this toolkit
82
+ */
83
+ auth_config_id?: string;
84
+ }
85
+ }
86
+ }
87
+ export declare namespace ToolRouter {
88
+ export { type ToolRouterCreateSessionResponse as ToolRouterCreateSessionResponse, type ToolRouterCreateSessionParams as ToolRouterCreateSessionParams, };
89
+ export { Session as Session, type SessionCreateResponse as SessionCreateResponse, type SessionRetrieveResponse as SessionRetrieveResponse, type SessionExecuteResponse as SessionExecuteResponse, type SessionLinkResponse as SessionLinkResponse, type SessionToolkitsResponse as SessionToolkitsResponse, type SessionCreateParams as SessionCreateParams, type SessionExecuteParams as SessionExecuteParams, type SessionLinkParams as SessionLinkParams, type SessionToolkitsParams as SessionToolkitsParams, };
90
+ }
91
+ //# sourceMappingURL=tool-router.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-router.d.ts","sourceRoot":"","sources":["../../src/resources/tool-router/tool-router.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,EACL,OAAO,EACP,mBAAmB,EACnB,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,EACtB,iBAAiB,EACjB,mBAAmB,EACnB,uBAAuB,EACvB,qBAAqB,EACrB,uBAAuB,EACxB;OACM,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,UAAW,SAAQ,WAAW;IACzC,OAAO,EAAE,UAAU,CAAC,OAAO,CAAwC;IAEnE;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,aAAa,CACX,IAAI,EAAE,6BAA6B,EACnC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,+BAA+B,CAAC;CAG/C;AAED,MAAM,WAAW,+BAA+B;IAC9C;;OAEG;IACH,oBAAoB,EAAE,MAAM,CAAC;IAE7B;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,4BAA4B,EAAE,MAAM,CAAC;CACtC;AAED,MAAM,WAAW,6BAA6B;IAC5C;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,MAAM,CAAC,EAAE,6BAA6B,CAAC,MAAM,CAAC;CAC/C;AAED,yBAAiB,6BAA6B,CAAC;IAC7C;;OAEG;IACH,UAAiB,MAAM;QACrB;;WAEG;QACH,2BAA2B,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;QAE7C;;WAEG;QACH,QAAQ,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;KAClC;IAED,UAAiB,MAAM,CAAC;QACtB,UAAiB,OAAO;YACtB;;eAEG;YACH,OAAO,EAAE,MAAM,CAAC;YAEhB;;eAEG;YACH,cAAc,CAAC,EAAE,MAAM,CAAC;SACzB;KACF;CACF;AAID,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC,OAAO,EACL,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,6BAA6B,IAAI,6BAA6B,GACpE,CAAC;IAEF,OAAO,EACL,OAAO,IAAI,OAAO,EAClB,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;CACH"}
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.ToolRouter = void 0;
5
+ const tslib_1 = require("../../internal/tslib.js");
6
+ const resource_1 = require("../../core/resource.js");
7
+ const SessionAPI = tslib_1.__importStar(require("./session.js"));
8
+ const session_1 = require("./session.js");
9
+ class ToolRouter extends resource_1.APIResource {
10
+ constructor() {
11
+ super(...arguments);
12
+ this.session = new SessionAPI.Session(this._client);
13
+ }
14
+ /**
15
+ * Creates a new session for the tool router lab feature. This endpoint initializes
16
+ * a new session with specified toolkits and their authentication configurations.
17
+ * The session provides an isolated environment for testing and managing tool
18
+ * routing logic with scoped MCP server access.
19
+ *
20
+ * @example
21
+ * ```ts
22
+ * const response = await client.toolRouter.createSession({
23
+ * user_id: 'user_123456789',
24
+ * config: {
25
+ * toolkits: [
26
+ * {
27
+ * toolkit: 'gmail',
28
+ * auth_config_id: 'auth_config_123',
29
+ * },
30
+ * {
31
+ * toolkit: 'slack',
32
+ * auth_config_id: 'auth_config_456',
33
+ * },
34
+ * { toolkit: 'github' },
35
+ * ],
36
+ * },
37
+ * });
38
+ * ```
39
+ */
40
+ createSession(body, options) {
41
+ return this._client.post('/api/v3/labs/tool_router/session', { body, ...options });
42
+ }
43
+ }
44
+ exports.ToolRouter = ToolRouter;
45
+ ToolRouter.Session = session_1.Session;
46
+ //# sourceMappingURL=tool-router.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-router.js","sourceRoot":"","sources":["../../src/resources/tool-router/tool-router.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,iEAAwC;AACxC,0CAWmB;AAInB,MAAa,UAAW,SAAQ,sBAAW;IAA3C;;QACE,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAkCrE,CAAC;IAhCC;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,aAAa,CACX,IAAmC,EACnC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kCAAkC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;CACF;AAnCD,gCAmCC;AA8DD,UAAU,CAAC,OAAO,GAAG,iBAAO,CAAC"}
@@ -0,0 +1,41 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../../core/resource.mjs";
3
+ import * as SessionAPI from "./session.mjs";
4
+ import { Session, } from "./session.mjs";
5
+ export class ToolRouter extends APIResource {
6
+ constructor() {
7
+ super(...arguments);
8
+ this.session = new SessionAPI.Session(this._client);
9
+ }
10
+ /**
11
+ * Creates a new session for the tool router lab feature. This endpoint initializes
12
+ * a new session with specified toolkits and their authentication configurations.
13
+ * The session provides an isolated environment for testing and managing tool
14
+ * routing logic with scoped MCP server access.
15
+ *
16
+ * @example
17
+ * ```ts
18
+ * const response = await client.toolRouter.createSession({
19
+ * user_id: 'user_123456789',
20
+ * config: {
21
+ * toolkits: [
22
+ * {
23
+ * toolkit: 'gmail',
24
+ * auth_config_id: 'auth_config_123',
25
+ * },
26
+ * {
27
+ * toolkit: 'slack',
28
+ * auth_config_id: 'auth_config_456',
29
+ * },
30
+ * { toolkit: 'github' },
31
+ * ],
32
+ * },
33
+ * });
34
+ * ```
35
+ */
36
+ createSession(body, options) {
37
+ return this._client.post('/api/v3/labs/tool_router/session', { body, ...options });
38
+ }
39
+ }
40
+ ToolRouter.Session = Session;
41
+ //# sourceMappingURL=tool-router.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-router.mjs","sourceRoot":"","sources":["../../src/resources/tool-router/tool-router.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,EACL,OAAO,GAUR;AAID,MAAM,OAAO,UAAW,SAAQ,WAAW;IAA3C;;QACE,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAkCrE,CAAC;IAhCC;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,aAAa,CACX,IAAmC,EACnC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kCAAkC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;CACF;AA8DD,UAAU,CAAC,OAAO,GAAG,OAAO,CAAC"}
@@ -1,87 +1,2 @@
1
- import { APIResource } from "../core/resource.mjs";
2
- import { APIPromise } from "../core/api-promise.mjs";
3
- import { RequestOptions } from "../internal/request-options.mjs";
4
- export declare class ToolRouter extends APIResource {
5
- /**
6
- * Creates a new session for the tool router lab feature. This endpoint initializes
7
- * a new session with specified toolkits and their authentication configurations.
8
- * The session provides an isolated environment for testing and managing tool
9
- * routing logic with scoped MCP server access.
10
- *
11
- * @example
12
- * ```ts
13
- * const response = await client.toolRouter.createSession({
14
- * user_id: 'user_123456789',
15
- * config: {
16
- * toolkits: [
17
- * {
18
- * toolkit: 'gmail',
19
- * auth_config_id: 'auth_config_123',
20
- * },
21
- * {
22
- * toolkit: 'slack',
23
- * auth_config_id: 'auth_config_456',
24
- * },
25
- * { toolkit: 'github' },
26
- * ],
27
- * },
28
- * });
29
- * ```
30
- */
31
- createSession(body: ToolRouterCreateSessionParams, options?: RequestOptions): APIPromise<ToolRouterCreateSessionResponse>;
32
- }
33
- export interface ToolRouterCreateSessionResponse {
34
- /**
35
- * MCP server endpoint URL for this specific chat session
36
- */
37
- chat_session_mcp_url: string;
38
- /**
39
- * Generated session identifier
40
- */
41
- session_id: string;
42
- /**
43
- * MCP server endpoint URL for this specific tool router instance
44
- */
45
- tool_router_instance_mcp_url: string;
46
- }
47
- export interface ToolRouterCreateSessionParams {
48
- /**
49
- * Unique user identifier for the session owner
50
- */
51
- user_id: string;
52
- /**
53
- * Session configuration including enabled toolkits and their auth configs
54
- */
55
- config?: ToolRouterCreateSessionParams.Config;
56
- }
57
- export declare namespace ToolRouterCreateSessionParams {
58
- /**
59
- * Session configuration including enabled toolkits and their auth configs
60
- */
61
- interface Config {
62
- /**
63
- * Whether to manually manage connections
64
- */
65
- manually_manage_connections?: boolean | null;
66
- /**
67
- * Array of toolkit configurations with optional auth configs
68
- */
69
- toolkits?: Array<Config.Toolkit>;
70
- }
71
- namespace Config {
72
- interface Toolkit {
73
- /**
74
- * Toolkit identifier (e.g., gmail, slack, github)
75
- */
76
- toolkit: string;
77
- /**
78
- * Specific auth configuration ID for this toolkit
79
- */
80
- auth_config_id?: string;
81
- }
82
- }
83
- }
84
- export declare namespace ToolRouter {
85
- export { type ToolRouterCreateSessionResponse as ToolRouterCreateSessionResponse, type ToolRouterCreateSessionParams as ToolRouterCreateSessionParams, };
86
- }
1
+ export * from "./tool-router/index.mjs";
87
2
  //# sourceMappingURL=tool-router.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tool-router.d.mts","sourceRoot":"","sources":["../src/resources/tool-router.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,UAAW,SAAQ,WAAW;IACzC;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,aAAa,CACX,IAAI,EAAE,6BAA6B,EACnC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,+BAA+B,CAAC;CAG/C;AAED,MAAM,WAAW,+BAA+B;IAC9C;;OAEG;IACH,oBAAoB,EAAE,MAAM,CAAC;IAE7B;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,4BAA4B,EAAE,MAAM,CAAC;CACtC;AAED,MAAM,WAAW,6BAA6B;IAC5C;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,MAAM,CAAC,EAAE,6BAA6B,CAAC,MAAM,CAAC;CAC/C;AAED,yBAAiB,6BAA6B,CAAC;IAC7C;;OAEG;IACH,UAAiB,MAAM;QACrB;;WAEG;QACH,2BAA2B,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;QAE7C;;WAEG;QACH,QAAQ,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;KAClC;IAED,UAAiB,MAAM,CAAC;QACtB,UAAiB,OAAO;YACtB;;eAEG;YACH,OAAO,EAAE,MAAM,CAAC;YAEhB;;eAEG;YACH,cAAc,CAAC,EAAE,MAAM,CAAC;SACzB;KACF;CACF;AAED,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC,OAAO,EACL,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,6BAA6B,IAAI,6BAA6B,GACpE,CAAC;CACH"}
1
+ {"version":3,"file":"tool-router.d.mts","sourceRoot":"","sources":["../src/resources/tool-router.ts"],"names":[],"mappings":""}