@composio/client 2.0.0-rc.1 → 2.0.0-rc.11

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 (177) hide show
  1. package/README.md +108 -2
  2. package/dist/{api-key-revocation-BZL5FAx7.mjs → api-key-revocation-Dh-KSokR.mjs} +4 -3
  3. package/dist/{auth-CEq4JqWm.mjs → auth-Drov-jN8.mjs} +1 -1
  4. package/dist/{auth-configs-CyksMqNB.mjs → auth-configs-yM05-r6r.mjs} +18 -11
  5. package/dist/{clanker-4wByThQJ.mjs → clanker-BYmc69WC.mjs} +4 -3
  6. package/dist/cli-Ce8RT7yp.mjs +45 -0
  7. package/dist/{connected-accounts-B-qN_yLT.mjs → connected-accounts-D__sOoNZ.mjs} +31 -15
  8. package/dist/{consumer-DWlaGBmh.mjs → consumer-DTh50Hih.mjs} +8 -8
  9. package/dist/{custom-BQWoONFY.mjs → custom-CdC-6Y_i.mjs} +5 -3
  10. package/dist/custom-nlGufiDz.mjs +88 -0
  11. package/dist/error-DLB1uKM3.mjs +109 -0
  12. package/dist/{files-B-UnEejx.mjs → files-DROCPzLP.mjs} +7 -5
  13. package/dist/{files-CNZ-ttVS.mjs → files-RJPIH6iE.mjs} +13 -9
  14. package/dist/{generate-DSqfJENZ.mjs → generate-mU4b3zJf.mjs} +5 -3
  15. package/dist/{request-DwPfYYNF.mjs → generated-operations-CWhusMPU.mjs} +1266 -157
  16. package/dist/index.d.mts +3 -3
  17. package/dist/index.mjs +312 -827
  18. package/dist/keyring-BzkcB1gu.mjs +17 -0
  19. package/dist/{link-CukKZMxs.mjs → link-CfIyH3nF.mjs} +4 -3
  20. package/dist/{logs-B87z4hq7.mjs → logs-D2wxXYiO.mjs} +8 -6
  21. package/dist/{manage-By-b66OH.mjs → manage-Vc3jdRr_.mjs} +7 -5
  22. package/dist/mcp-DEe7xU7G.mjs +91 -0
  23. package/dist/{org-BSq_z6fP.mjs → org-CYsl9O1u.mjs} +9 -8
  24. package/dist/{owner-BDkEFEVF.mjs → owner-DmQb3AF5.mjs} +1 -1
  25. package/dist/pagination.d.mts +56 -0
  26. package/dist/pagination.mjs +50 -0
  27. package/dist/{project-D-c0Zrrl.mjs → project-BVBWJzHm.mjs} +1 -1
  28. package/dist/{project-_s0fWHut.mjs → project-D-_r3H1_.mjs} +7 -7
  29. package/dist/project-DvSCDA9B.mjs +47 -0
  30. package/dist/{project-Cj-NKnWZ.mjs → project-OSigfIdr.mjs} +4 -3
  31. package/dist/realtime-Dsk1QGAl.mjs +28 -0
  32. package/dist/resources/api-key-revocation.d.mts +1 -1
  33. package/dist/resources/api-key-revocation.mjs +1 -1
  34. package/dist/resources/auth/auth.d.mts +1 -1
  35. package/dist/resources/auth/auth.mjs +1 -1
  36. package/dist/resources/auth/index.d.mts +1 -1
  37. package/dist/resources/auth/index.mjs +2 -2
  38. package/dist/resources/auth/session.d.mts +1 -1
  39. package/dist/resources/auth/session.mjs +1 -1
  40. package/dist/resources/auth-configs.d.mts +1 -1
  41. package/dist/resources/auth-configs.mjs +1 -1
  42. package/dist/resources/auth.d.mts +1 -1
  43. package/dist/resources/auth.mjs +2 -2
  44. package/dist/resources/cli/cli.d.mts +1 -1
  45. package/dist/resources/cli/cli.mjs +1 -1
  46. package/dist/resources/cli/index.d.mts +1 -1
  47. package/dist/resources/cli/index.mjs +2 -2
  48. package/dist/resources/cli/realtime.d.mts +1 -1
  49. package/dist/resources/cli/realtime.mjs +1 -1
  50. package/dist/resources/cli.d.mts +1 -1
  51. package/dist/resources/cli.mjs +2 -2
  52. package/dist/resources/connected-accounts.d.mts +1 -1
  53. package/dist/resources/connected-accounts.mjs +1 -1
  54. package/dist/resources/custom.d.mts +2 -0
  55. package/dist/resources/custom.mjs +3 -0
  56. package/dist/resources/files.d.mts +1 -1
  57. package/dist/resources/files.mjs +1 -1
  58. package/dist/resources/index.d.mts +1 -1
  59. package/dist/resources/index.mjs +13 -13
  60. package/dist/resources/keyring.d.mts +2 -0
  61. package/dist/resources/keyring.mjs +3 -0
  62. package/dist/resources/link.d.mts +1 -1
  63. package/dist/resources/link.mjs +1 -1
  64. package/dist/resources/logs/index.d.mts +1 -1
  65. package/dist/resources/logs/index.mjs +3 -3
  66. package/dist/resources/logs/logs.d.mts +1 -1
  67. package/dist/resources/logs/logs.mjs +1 -1
  68. package/dist/resources/logs/tools.d.mts +1 -1
  69. package/dist/resources/logs/tools.mjs +1 -1
  70. package/dist/resources/logs/triggers.d.mts +1 -1
  71. package/dist/resources/logs/triggers.mjs +1 -1
  72. package/dist/resources/logs.d.mts +1 -1
  73. package/dist/resources/logs.mjs +3 -3
  74. package/dist/resources/mcp/custom.d.mts +1 -1
  75. package/dist/resources/mcp/custom.mjs +1 -1
  76. package/dist/resources/mcp/generate.d.mts +1 -1
  77. package/dist/resources/mcp/generate.mjs +1 -1
  78. package/dist/resources/mcp/index.d.mts +1 -1
  79. package/dist/resources/mcp/index.mjs +3 -3
  80. package/dist/resources/mcp/mcp.d.mts +1 -1
  81. package/dist/resources/mcp/mcp.mjs +1 -1
  82. package/dist/resources/mcp.d.mts +1 -1
  83. package/dist/resources/mcp.mjs +3 -3
  84. package/dist/resources/org/clanker.d.mts +1 -1
  85. package/dist/resources/org/clanker.mjs +1 -1
  86. package/dist/resources/org/consumer/consumer.d.mts +1 -1
  87. package/dist/resources/org/consumer/consumer.mjs +1 -1
  88. package/dist/resources/org/consumer/index.d.mts +1 -1
  89. package/dist/resources/org/consumer/index.mjs +2 -2
  90. package/dist/resources/org/consumer/project.d.mts +1 -1
  91. package/dist/resources/org/consumer/project.mjs +1 -1
  92. package/dist/resources/org/consumer.d.mts +1 -1
  93. package/dist/resources/org/consumer.mjs +2 -2
  94. package/dist/resources/org/index.d.mts +1 -1
  95. package/dist/resources/org/index.mjs +6 -6
  96. package/dist/resources/org/org.d.mts +1 -1
  97. package/dist/resources/org/org.mjs +1 -1
  98. package/dist/resources/org/owner/index.d.mts +1 -1
  99. package/dist/resources/org/owner/index.mjs +2 -2
  100. package/dist/resources/org/owner/owner.d.mts +1 -1
  101. package/dist/resources/org/owner/owner.mjs +1 -1
  102. package/dist/resources/org/owner/project.d.mts +1 -1
  103. package/dist/resources/org/owner/project.mjs +1 -1
  104. package/dist/resources/org/owner.d.mts +1 -1
  105. package/dist/resources/org/owner.mjs +2 -2
  106. package/dist/resources/org/project.d.mts +1 -1
  107. package/dist/resources/org/project.mjs +1 -1
  108. package/dist/resources/org/usage.d.mts +1 -1
  109. package/dist/resources/org/usage.mjs +1 -1
  110. package/dist/resources/org.d.mts +1 -1
  111. package/dist/resources/org.mjs +6 -6
  112. package/dist/resources/project/index.d.mts +1 -1
  113. package/dist/resources/project/index.mjs +1 -1
  114. package/dist/resources/project/project.d.mts +1 -1
  115. package/dist/resources/project/project.mjs +1 -1
  116. package/dist/resources/project/usage.d.mts +1 -1
  117. package/dist/resources/project/usage.mjs +1 -1
  118. package/dist/resources/project.d.mts +1 -1
  119. package/dist/resources/project.mjs +1 -1
  120. package/dist/resources/session-configs.d.mts +2 -0
  121. package/dist/resources/session-configs.mjs +24 -0
  122. package/dist/resources/tool-router/index.d.mts +1 -1
  123. package/dist/resources/tool-router/index.mjs +2 -2
  124. package/dist/resources/tool-router/session/files.d.mts +1 -1
  125. package/dist/resources/tool-router/session/files.mjs +1 -1
  126. package/dist/resources/tool-router/session/index.d.mts +1 -1
  127. package/dist/resources/tool-router/session/index.mjs +2 -2
  128. package/dist/resources/tool-router/session/session.d.mts +1 -1
  129. package/dist/resources/tool-router/session/session.mjs +1 -1
  130. package/dist/resources/tool-router/session.d.mts +1 -1
  131. package/dist/resources/tool-router/session.mjs +2 -2
  132. package/dist/resources/tool-router/tool-router.d.mts +1 -1
  133. package/dist/resources/tool-router/tool-router.mjs +1 -1
  134. package/dist/resources/tool-router.d.mts +1 -1
  135. package/dist/resources/tool-router.mjs +2 -2
  136. package/dist/resources/toolkits.d.mts +1 -1
  137. package/dist/resources/toolkits.mjs +1 -1
  138. package/dist/resources/tools.d.mts +1 -1
  139. package/dist/resources/tools.mjs +1 -1
  140. package/dist/resources/trigger-instances/index.d.mts +1 -1
  141. package/dist/resources/trigger-instances/index.mjs +2 -2
  142. package/dist/resources/trigger-instances/manage.d.mts +1 -1
  143. package/dist/resources/trigger-instances/manage.mjs +1 -1
  144. package/dist/resources/trigger-instances/trigger-instances.d.mts +1 -1
  145. package/dist/resources/trigger-instances/trigger-instances.mjs +1 -1
  146. package/dist/resources/trigger-instances.d.mts +1 -1
  147. package/dist/resources/trigger-instances.mjs +2 -2
  148. package/dist/resources/triggers-types.d.mts +1 -1
  149. package/dist/resources/triggers-types.mjs +1 -1
  150. package/dist/resources/webhook-endpoints.d.mts +1 -1
  151. package/dist/resources/webhook-endpoints.mjs +1 -1
  152. package/dist/resources/webhook-subscriptions.d.mts +1 -1
  153. package/dist/resources/webhook-subscriptions.mjs +1 -1
  154. package/dist/{session-Do3wHYNe.mjs → session-BUYbl8BA.mjs} +39 -26
  155. package/dist/{session-DNm4GFO-.mjs → session-DfISYrbs.mjs} +3 -2
  156. package/dist/{client-CK6bm7nf.d.mts → session-configs-CipRvstF.d.mts} +5450 -1009
  157. package/dist/{tool-router-5OfsPkJ_.mjs → tool-router-DJQ12uhs.mjs} +1 -1
  158. package/dist/toolkits-CbdyRtvr.mjs +62 -0
  159. package/dist/tools-DiH6dAto.mjs +69 -0
  160. package/dist/tools-a29E_8La.mjs +33 -0
  161. package/dist/{trigger-instances-lkKWqHgd.mjs → trigger-instances-Bg0n7X-d.mjs} +8 -6
  162. package/dist/{triggers-DNx9yjbS.mjs → triggers-BoSFNGss.mjs} +6 -4
  163. package/dist/triggers-types-BPtTEwUA.mjs +34 -0
  164. package/dist/{usage-CKyu9RzD.mjs → usage-CHVyZ3tm.mjs} +7 -5
  165. package/dist/{usage-Cv9VNy5H.mjs → usage-Cs10eWCd.mjs} +7 -5
  166. package/dist/{webhook-endpoints-DIyg3YlR.mjs → webhook-endpoints-B4lZc5YC.mjs} +15 -10
  167. package/dist/webhook-subscriptions-DJTSJd6K.mjs +55 -0
  168. package/package.json +21 -6
  169. package/dist/cli-Bi4_ORQO.mjs +0 -45
  170. package/dist/mcp-B0wla_93.mjs +0 -73
  171. package/dist/project-C0h91WGF.mjs +0 -42
  172. package/dist/realtime-BcHoYszT.mjs +0 -26
  173. package/dist/toolkits-CcE90C2S.mjs +0 -43
  174. package/dist/tools-B5uEInC8.mjs +0 -30
  175. package/dist/tools-CdVgfSpk.mjs +0 -63
  176. package/dist/triggers-types-MjEcrPbH.mjs +0 -31
  177. package/dist/webhook-subscriptions-B7AgTACq.mjs +0 -48
@@ -1,4 +1,4 @@
1
- import { t as Session } from "./session-Do3wHYNe.mjs";
1
+ import { t as Session } from "./session-BUYbl8BA.mjs";
2
2
 
3
3
  //#region src/compat/resources/tool-router/tool-router.ts
4
4
  /** Stainless-shaped `client.toolRouter` resource. */
@@ -0,0 +1,62 @@
1
+ import { a as path, c as withOperation, n as generatedOperation } from "./generated-operations-CWhusMPU.mjs";
2
+
3
+ //#region src/compat/resources/toolkits.ts
4
+ const OP_RETRIEVE = generatedOperation("toolkits.retrieve");
5
+ const OP_LIST = generatedOperation("toolkits.list");
6
+ const OP_RECOMMEND_SCOPES = generatedOperation("toolkits.recommendScopes");
7
+ const OP_RETRIEVE_CATEGORIES = generatedOperation("toolkits.retrieveCategories");
8
+ const OP_RETRIEVE_CHANGELOG = generatedOperation("toolkits.retrieveChangelog");
9
+ const OP_RETRIEVE_MULTI = generatedOperation("toolkits.retrieveMulti");
10
+ const OP_RETRIEVE_SCOPES_GRANT_CONTEXT = generatedOperation("toolkits.retrieveScopesGrantContext");
11
+ /**
12
+ * Stainless-shaped `client.toolkits` resource: the 3-method published surface
13
+ * of `@composio/client` (retrieve/list/retrieveCategories) plus the
14
+ * spec-surface `retrieveMulti` (`POST /toolkits/multi`) and
15
+ * `retrieveChangelog` (`GET /toolkits/changelog`), never published by
16
+ * Stainless — wayfinder ticket 29.
17
+ */
18
+ var Toolkits = class {
19
+ #client;
20
+ constructor(client) {
21
+ this.#client = client;
22
+ }
23
+ retrieve(slug, query = {}, options) {
24
+ return this.#client.get(path`/api/v3.1/toolkits/${slug}`, withOperation(OP_RETRIEVE, {
25
+ query,
26
+ ...options
27
+ }));
28
+ }
29
+ list(query = {}, options) {
30
+ return this.#client.get("/api/v3.1/toolkits", withOperation(OP_LIST, {
31
+ query,
32
+ ...options
33
+ }));
34
+ }
35
+ recommendScopes(toolkitSlug, body, options) {
36
+ return this.#client.post(path`/api/v3.1/toolkits/${toolkitSlug}/scopes/recommended`, withOperation(OP_RECOMMEND_SCOPES, {
37
+ body,
38
+ ...options
39
+ }));
40
+ }
41
+ retrieveCategories(options) {
42
+ return this.#client.get("/api/v3.1/toolkits/categories", withOperation(OP_RETRIEVE_CATEGORIES, { ...options }));
43
+ }
44
+ retrieveChangelog(options) {
45
+ return this.#client.get("/api/v3.1/toolkits/changelog", withOperation(OP_RETRIEVE_CHANGELOG, { ...options }));
46
+ }
47
+ retrieveMulti(body = {}, options) {
48
+ return this.#client.post("/api/v3.1/toolkits/multi", withOperation(OP_RETRIEVE_MULTI, {
49
+ body,
50
+ ...options
51
+ }));
52
+ }
53
+ retrieveScopesGrantContext(toolkitSlug, query = {}, options) {
54
+ return this.#client.get(path`/api/v3.1/toolkits/${toolkitSlug}/scopes/grant_context`, withOperation(OP_RETRIEVE_SCOPES_GRANT_CONTEXT, {
55
+ query,
56
+ ...options
57
+ }));
58
+ }
59
+ };
60
+
61
+ //#endregion
62
+ export { Toolkits as t };
@@ -0,0 +1,69 @@
1
+ import { a as path, c as withOperation, m as mergeHeaders, n as generatedOperation } from "./generated-operations-CWhusMPU.mjs";
2
+
3
+ //#region src/compat/resources/tools.ts
4
+ const OP_RETRIEVE = generatedOperation("tools.retrieve");
5
+ const OP_LIST = generatedOperation("tools.list");
6
+ const OP_EXECUTE = generatedOperation("tools.execute");
7
+ const OP_GET_INPUT = generatedOperation("tools.getInput");
8
+ const OP_PROXY = generatedOperation("tools.proxy");
9
+ const OP_RETRIEVE_ENUM = generatedOperation("tools.retrieveEnum");
10
+ const OP_RETRIEVE_REQUIRED_SCOPES = generatedOperation("tools.retrieveRequiredScopes");
11
+ /**
12
+ * Stainless-shaped `client.tools` resource: the 6-method published surface of
13
+ * `@composio/client` (retrieve/list/execute/getInput/proxy/retrieveEnum) plus
14
+ * the spec-surface `retrieveRequiredScopes` (`POST /tools/scopes/required`,
15
+ * never published by Stainless — wayfinder ticket 29), dispatched through the
16
+ * handwritten kernel.
17
+ */
18
+ var Tools = class {
19
+ #client;
20
+ constructor(client) {
21
+ this.#client = client;
22
+ }
23
+ retrieve(toolSlug, query = {}, options) {
24
+ return this.#client.get(path`/api/v3.1/tools/${toolSlug}`, withOperation(OP_RETRIEVE, {
25
+ query,
26
+ ...options
27
+ }));
28
+ }
29
+ list(query = {}, options) {
30
+ return this.#client.get("/api/v3.1/tools", withOperation(OP_LIST, {
31
+ query,
32
+ ...options
33
+ }));
34
+ }
35
+ execute(toolSlug, params = {}, options) {
36
+ const { "x-llm-gateway-headers": xLlmGatewayHeaders, ...body } = params ?? {};
37
+ return this.#client.post(path`/api/v3.1/tools/execute/${toolSlug}`, withOperation(OP_EXECUTE, {
38
+ body,
39
+ ...options,
40
+ headers: mergeHeaders([{ ...xLlmGatewayHeaders != null ? { "x-llm-gateway-headers": xLlmGatewayHeaders } : void 0 }, options?.headers])
41
+ }));
42
+ }
43
+ /** @deprecated Deprecated in the input OpenAPI schema. */
44
+ getInput(toolSlug, body, options) {
45
+ return this.#client.post(path`/api/v3.1/tools/execute/${toolSlug}/input`, withOperation(OP_GET_INPUT, {
46
+ body,
47
+ ...options
48
+ }));
49
+ }
50
+ proxy(body, options) {
51
+ return this.#client.post("/api/v3.1/tools/execute/proxy", withOperation(OP_PROXY, {
52
+ body,
53
+ ...options
54
+ }));
55
+ }
56
+ retrieveEnum(options) {
57
+ return this.#client.get("/api/v3.1/tools/enum", withOperation(OP_RETRIEVE_ENUM, { ...options }));
58
+ }
59
+ /** @deprecated Deprecated in the input OpenAPI schema. */
60
+ retrieveRequiredScopes(body, options) {
61
+ return this.#client.post("/api/v3.1/tools/scopes/required", withOperation(OP_RETRIEVE_REQUIRED_SCOPES, {
62
+ body,
63
+ ...options
64
+ }));
65
+ }
66
+ };
67
+
68
+ //#endregion
69
+ export { Tools as t };
@@ -0,0 +1,33 @@
1
+ import { a as path, c as withOperation, n as generatedOperation } from "./generated-operations-CWhusMPU.mjs";
2
+
3
+ //#region src/compat/resources/logs/tools.ts
4
+ const OP_RETRIEVE = generatedOperation("logs.tools.retrieve");
5
+ const OP_LIST = generatedOperation("logs.tools.list");
6
+ const OP_LIST_FIELDS = generatedOperation("logs.tools.listFields");
7
+ /**
8
+ * Stainless-shaped `client.logs.tools` resource plus the deprecated
9
+ * spec-surface `listFields` method: tool-execution log retrieval/listing and
10
+ * field metadata over `internal/action_execution/*`.
11
+ */
12
+ var Tools = class {
13
+ #client;
14
+ constructor(client) {
15
+ this.#client = client;
16
+ }
17
+ retrieve(id, options) {
18
+ return this.#client.get(path`/api/v3.1/internal/action_execution/log/${id}`, withOperation(OP_RETRIEVE, { ...options }));
19
+ }
20
+ list(body, options) {
21
+ return this.#client.post("/api/v3.1/internal/action_execution/logs", withOperation(OP_LIST, {
22
+ body,
23
+ ...options
24
+ }));
25
+ }
26
+ /** @deprecated Deprecated in the input OpenAPI schema. */
27
+ listFields(options) {
28
+ return this.#client.get("/api/v3.1/internal/action_execution/fields", withOperation(OP_LIST_FIELDS, { ...options }));
29
+ }
30
+ };
31
+
32
+ //#endregion
33
+ export { Tools as t };
@@ -1,7 +1,9 @@
1
- import { r as path } from "./request-DwPfYYNF.mjs";
2
- import { t as Manage } from "./manage-By-b66OH.mjs";
1
+ import { a as path, c as withOperation, n as generatedOperation } from "./generated-operations-CWhusMPU.mjs";
2
+ import { t as Manage } from "./manage-Vc3jdRr_.mjs";
3
3
 
4
4
  //#region src/compat/resources/trigger-instances/trigger-instances.ts
5
+ const OP_LIST_ACTIVE = generatedOperation("triggerInstances.listActive");
6
+ const OP_UPSERT = generatedOperation("triggerInstances.upsert");
5
7
  /**
6
8
  * Stainless-shaped `client.triggerInstances` resource: the exact 2-method
7
9
  * surface of `@composio/client` (listActive/upsert), dispatched through the
@@ -15,16 +17,16 @@ var TriggerInstances = class {
15
17
  this.manage = new Manage(client);
16
18
  }
17
19
  listActive(query = {}, options) {
18
- return this.#client.get(path`/api/v3.1/trigger_instances/active`, {
20
+ return this.#client.get("/api/v3.1/trigger_instances/active", withOperation(OP_LIST_ACTIVE, {
19
21
  query,
20
22
  ...options
21
- });
23
+ }));
22
24
  }
23
25
  upsert(slug, body = {}, options) {
24
- return this.#client.post(path`/api/v3.1/trigger_instances/${slug}/upsert`, {
26
+ return this.#client.post(path`/api/v3.1/trigger_instances/${slug}/upsert`, withOperation(OP_UPSERT, {
25
27
  body,
26
28
  ...options
27
- });
29
+ }));
28
30
  }
29
31
  };
30
32
  TriggerInstances.Manage = Manage;
@@ -1,6 +1,8 @@
1
- import { r as path } from "./request-DwPfYYNF.mjs";
1
+ import { a as path, c as withOperation, n as generatedOperation } from "./generated-operations-CWhusMPU.mjs";
2
2
 
3
3
  //#region src/compat/resources/logs/triggers.ts
4
+ const OP_RETRIEVE = generatedOperation("logs.triggers.retrieve");
5
+ const OP_LIST = generatedOperation("logs.triggers.list");
4
6
  /**
5
7
  * Stainless-shaped `client.logs.triggers` resource: the 2-method trigger-log
6
8
  * sub-surface of `@composio/client` (retrieve/list over `internal/trigger/*`).
@@ -12,13 +14,13 @@ var Triggers = class {
12
14
  }
13
15
  /** @deprecated Deprecated in the input OpenAPI schema. */
14
16
  retrieve(id, options) {
15
- return this.#client.get(path`/api/v3.1/internal/trigger/log/${id}`, { ...options });
17
+ return this.#client.get(path`/api/v3.1/internal/trigger/log/${id}`, withOperation(OP_RETRIEVE, { ...options }));
16
18
  }
17
19
  list(body = {}, options) {
18
- return this.#client.post(path`/api/v3.1/internal/trigger/logs`, {
20
+ return this.#client.post("/api/v3.1/internal/trigger/logs", withOperation(OP_LIST, {
19
21
  body,
20
22
  ...options
21
- });
23
+ }));
22
24
  }
23
25
  };
24
26
 
@@ -0,0 +1,34 @@
1
+ import { a as path, c as withOperation, n as generatedOperation } from "./generated-operations-CWhusMPU.mjs";
2
+
3
+ //#region src/compat/resources/triggers-types.ts
4
+ const OP_RETRIEVE = generatedOperation("triggersTypes.retrieve");
5
+ const OP_LIST = generatedOperation("triggersTypes.list");
6
+ const OP_RETRIEVE_ENUM = generatedOperation("triggersTypes.retrieveEnum");
7
+ /**
8
+ * Stainless-shaped `client.triggersTypes` resource: the exact 3-method surface
9
+ * of `@composio/client` (retrieve/list/retrieveEnum).
10
+ */
11
+ var TriggersTypes = class {
12
+ #client;
13
+ constructor(client) {
14
+ this.#client = client;
15
+ }
16
+ retrieve(slug, query = {}, options) {
17
+ return this.#client.get(path`/api/v3.1/triggers_types/${slug}`, withOperation(OP_RETRIEVE, {
18
+ query,
19
+ ...options
20
+ }));
21
+ }
22
+ list(query = {}, options) {
23
+ return this.#client.get("/api/v3.1/triggers_types", withOperation(OP_LIST, {
24
+ query,
25
+ ...options
26
+ }));
27
+ }
28
+ retrieveEnum(options) {
29
+ return this.#client.get("/api/v3.1/triggers_types/list/enum", withOperation(OP_RETRIEVE_ENUM, { ...options }));
30
+ }
31
+ };
32
+
33
+ //#endregion
34
+ export { TriggersTypes as t };
@@ -1,6 +1,8 @@
1
- import { r as path } from "./request-DwPfYYNF.mjs";
1
+ import { a as path, c as withOperation, n as generatedOperation } from "./generated-operations-CWhusMPU.mjs";
2
2
 
3
3
  //#region src/compat/resources/project/usage.ts
4
+ const OP_RETRIEVE = generatedOperation("project.usage.retrieve");
5
+ const OP_RETRIEVE_SUMMARY = generatedOperation("project.usage.retrieveSummary");
4
6
  /**
5
7
  * Spec-surface `client.project.usage` resource: the 2-method project metering
6
8
  * surface of the v3.1 spec (retrieveSummary/retrieve over `/project/usage/*`
@@ -12,16 +14,16 @@ var Usage = class {
12
14
  this.#client = client;
13
15
  }
14
16
  retrieve(entityType, body = {}, options) {
15
- return this.#client.post(path`/api/v3.1/project/usage/${entityType}`, {
17
+ return this.#client.post(path`/api/v3.1/project/usage/${entityType}`, withOperation(OP_RETRIEVE, {
16
18
  body,
17
19
  ...options
18
- });
20
+ }));
19
21
  }
20
22
  retrieveSummary(body = {}, options) {
21
- return this.#client.post(path`/api/v3.1/project/usage/summary`, {
23
+ return this.#client.post("/api/v3.1/project/usage/summary", withOperation(OP_RETRIEVE_SUMMARY, {
22
24
  body,
23
25
  ...options
24
- });
26
+ }));
25
27
  }
26
28
  };
27
29
 
@@ -1,6 +1,8 @@
1
- import { r as path } from "./request-DwPfYYNF.mjs";
1
+ import { a as path, c as withOperation, n as generatedOperation } from "./generated-operations-CWhusMPU.mjs";
2
2
 
3
3
  //#region src/compat/resources/org/usage.ts
4
+ const OP_RETRIEVE = generatedOperation("org.usage.retrieve");
5
+ const OP_RETRIEVE_SUMMARY = generatedOperation("org.usage.retrieveSummary");
4
6
  /**
5
7
  * Spec-surface `client.org.usage` resource: the 2-method org metering surface
6
8
  * of the v3.1 spec (retrieveSummary/retrieve over `/org/usage/*` —
@@ -12,16 +14,16 @@ var Usage = class {
12
14
  this.#client = client;
13
15
  }
14
16
  retrieve(entityType, body = {}, options) {
15
- return this.#client.post(path`/api/v3.1/org/usage/${entityType}`, {
17
+ return this.#client.post(path`/api/v3.1/org/usage/${entityType}`, withOperation(OP_RETRIEVE, {
16
18
  body,
17
19
  ...options
18
- });
20
+ }));
19
21
  }
20
22
  retrieveSummary(body = {}, options) {
21
- return this.#client.post(path`/api/v3.1/org/usage/summary`, {
23
+ return this.#client.post("/api/v3.1/org/usage/summary", withOperation(OP_RETRIEVE_SUMMARY, {
22
24
  body,
23
25
  ...options
24
- });
26
+ }));
25
27
  }
26
28
  };
27
29
 
@@ -1,6 +1,11 @@
1
- import { r as path } from "./request-DwPfYYNF.mjs";
1
+ import { a as path, c as withOperation, n as generatedOperation } from "./generated-operations-CWhusMPU.mjs";
2
2
 
3
3
  //#region src/compat/resources/webhook-endpoints.ts
4
+ const OP_CREATE = generatedOperation("webhookEndpoints.create");
5
+ const OP_RETRIEVE = generatedOperation("webhookEndpoints.retrieve");
6
+ const OP_UPDATE = generatedOperation("webhookEndpoints.update");
7
+ const OP_LIST = generatedOperation("webhookEndpoints.list");
8
+ const OP_REPLACE = generatedOperation("webhookEndpoints.replace");
4
9
  /**
5
10
  * Spec-surface `client.webhookEndpoints` resource: the 5-method
6
11
  * `/webhook_endpoints` surface of the v3.1 spec (create/list/retrieve/
@@ -14,31 +19,31 @@ var WebhookEndpoints = class {
14
19
  this.#client = client;
15
20
  }
16
21
  create(body, options) {
17
- return this.#client.post(path`/api/v3.1/webhook_endpoints`, {
22
+ return this.#client.post("/api/v3.1/webhook_endpoints", withOperation(OP_CREATE, {
18
23
  body,
19
24
  ...options
20
- });
25
+ }));
21
26
  }
22
27
  retrieve(nanoID, options) {
23
- return this.#client.get(path`/api/v3.1/webhook_endpoints/${nanoID}`, { ...options });
28
+ return this.#client.get(path`/api/v3.1/webhook_endpoints/${nanoID}`, withOperation(OP_RETRIEVE, { ...options }));
24
29
  }
25
30
  update(nanoID, body, options) {
26
- return this.#client.patch(path`/api/v3.1/webhook_endpoints/${nanoID}`, {
31
+ return this.#client.patch(path`/api/v3.1/webhook_endpoints/${nanoID}`, withOperation(OP_UPDATE, {
27
32
  body,
28
33
  ...options
29
- });
34
+ }));
30
35
  }
31
36
  list(query = {}, options) {
32
- return this.#client.get(path`/api/v3.1/webhook_endpoints`, {
37
+ return this.#client.get("/api/v3.1/webhook_endpoints", withOperation(OP_LIST, {
33
38
  query,
34
39
  ...options
35
- });
40
+ }));
36
41
  }
37
42
  replace(nanoID, body, options) {
38
- return this.#client.post(path`/api/v3.1/webhook_endpoints/${nanoID}`, {
43
+ return this.#client.post(path`/api/v3.1/webhook_endpoints/${nanoID}`, withOperation(OP_REPLACE, {
39
44
  body,
40
45
  ...options
41
- });
46
+ }));
42
47
  }
43
48
  };
44
49
 
@@ -0,0 +1,55 @@
1
+ import { a as path, c as withOperation, n as generatedOperation } from "./generated-operations-CWhusMPU.mjs";
2
+
3
+ //#region src/compat/resources/webhook-subscriptions.ts
4
+ const OP_CREATE = generatedOperation("webhookSubscriptions.create");
5
+ const OP_RETRIEVE = generatedOperation("webhookSubscriptions.retrieve");
6
+ const OP_UPDATE = generatedOperation("webhookSubscriptions.update");
7
+ const OP_LIST = generatedOperation("webhookSubscriptions.list");
8
+ const OP_DELETE = generatedOperation("webhookSubscriptions.delete");
9
+ const OP_LIST_EVENT_TYPES = generatedOperation("webhookSubscriptions.listEventTypes");
10
+ const OP_ROTATE_SECRET = generatedOperation("webhookSubscriptions.rotateSecret");
11
+ /**
12
+ * Spec-surface `client.webhookSubscriptions` resource: the 7-method
13
+ * `/webhook_subscriptions` surface of the v3.1 spec
14
+ * (create/list/retrieve/update/delete/rotateSecret/listEventTypes), never
15
+ * published by Stainless — wayfinder ticket 30.
16
+ */
17
+ var WebhookSubscriptions = class {
18
+ #client;
19
+ constructor(client) {
20
+ this.#client = client;
21
+ }
22
+ create(body, options) {
23
+ return this.#client.post("/api/v3.1/webhook_subscriptions", withOperation(OP_CREATE, {
24
+ body,
25
+ ...options
26
+ }));
27
+ }
28
+ retrieve(id, options) {
29
+ return this.#client.get(path`/api/v3.1/webhook_subscriptions/${id}`, withOperation(OP_RETRIEVE, { ...options }));
30
+ }
31
+ update(id, body = {}, options) {
32
+ return this.#client.patch(path`/api/v3.1/webhook_subscriptions/${id}`, withOperation(OP_UPDATE, {
33
+ body,
34
+ ...options
35
+ }));
36
+ }
37
+ list(query = {}, options) {
38
+ return this.#client.get("/api/v3.1/webhook_subscriptions", withOperation(OP_LIST, {
39
+ query,
40
+ ...options
41
+ }));
42
+ }
43
+ delete(id, options) {
44
+ return this.#client.delete(path`/api/v3.1/webhook_subscriptions/${id}`, withOperation(OP_DELETE, { ...options }));
45
+ }
46
+ listEventTypes(options) {
47
+ return this.#client.get("/api/v3.1/webhook_subscriptions/event_types", withOperation(OP_LIST_EVENT_TYPES, { ...options }));
48
+ }
49
+ rotateSecret(id, options) {
50
+ return this.#client.post(path`/api/v3.1/webhook_subscriptions/${id}/rotate_secret`, withOperation(OP_ROTATE_SECRET, { ...options }));
51
+ }
52
+ };
53
+
54
+ //#endregion
55
+ export { WebhookSubscriptions as t };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@composio/client",
3
- "version": "2.0.0-rc.1",
3
+ "version": "2.0.0-rc.11",
4
4
  "description": "Composio API client for TypeScript, generated from the v3.1 OpenAPI spec with hey-api",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -10,6 +10,18 @@
10
10
  "types": "./dist/index.d.mts",
11
11
  "default": "./dist/index.mjs"
12
12
  },
13
+ "./pagination": {
14
+ "types": "./dist/pagination.d.mts",
15
+ "default": "./dist/pagination.mjs"
16
+ },
17
+ "./pagination.js": {
18
+ "types": "./dist/pagination.d.mts",
19
+ "default": "./dist/pagination.mjs"
20
+ },
21
+ "./pagination.mjs": {
22
+ "types": "./dist/pagination.d.mts",
23
+ "default": "./dist/pagination.mjs"
24
+ },
13
25
  "./resources": {
14
26
  "types": "./dist/resources/index.d.mts",
15
27
  "default": "./dist/resources/index.mjs"
@@ -60,14 +72,17 @@
60
72
  "codegen:check": "codegen compat --check && codegen python --check",
61
73
  "refresh-spec": "./scripts/refresh-spec.sh",
62
74
  "build": "tsdown",
63
- "typecheck": "tsgo --noEmit && tsgo --noEmit -p tsconfig.type-tests.json && tsgo --noEmit -p packages/codegen && tsgo --noEmit -p packages/parity",
64
- "typecheck:tsc": "tsc --noEmit && tsc --noEmit -p tsconfig.type-tests.json && tsc --noEmit -p packages/codegen && tsc --noEmit -p packages/parity",
65
- "lint": "eslint src test packages/codegen/src packages/codegen/test packages/parity/src packages/parity/test",
66
- "test": "vitest run --project unit --project codegen --project parity",
75
+ "benchmark": "pnpm build && node --experimental-transform-types scripts/benchmark.ts",
76
+ "benchmark:baseline": "pnpm build && rm -rf .artifacts/benchmark/baseline && mkdir -p .artifacts/benchmark && cp -R dist .artifacts/benchmark/baseline",
77
+ "typecheck": "tsgo --noEmit && tsgo --noEmit -p tsconfig.type-tests.json && tsgo --noEmit -p packages/codegen && tsgo --noEmit -p packages/parity && tsgo --noEmit -p demo",
78
+ "typecheck:tsc": "tsc --noEmit && tsc --noEmit -p tsconfig.type-tests.json && tsc --noEmit -p packages/codegen && tsc --noEmit -p packages/parity && tsc --noEmit -p demo",
79
+ "lint": "eslint src test packages/codegen/src packages/codegen/test packages/parity/src packages/parity/test demo/run.ts demo/typescript",
80
+ "test": "vitest run --project unit --project codegen --project parity --project demo",
67
81
  "test:pack": "./scripts/pack-check.sh",
68
82
  "test:contract": "vitest run --project contract",
69
83
  "test:parity:live": "pnpm build && node --experimental-transform-types packages/parity/src/main.ts",
70
- "test:parity:live:python": "cd python && rm -rf dist && uv build && cd .. && node --experimental-transform-types packages/parity/src/main.ts --language python"
84
+ "test:parity:live:python": "cd python && rm -rf dist && uv build && cd .. && node --experimental-transform-types packages/parity/src/main.ts --language python",
85
+ "deprecation-probe": "node --env-file=.env --experimental-transform-types scripts/deprecation-probe.ts"
71
86
  },
72
87
  "devDependencies": {
73
88
  "@arethetypeswrong/cli": "^0.18.4",
@@ -1,45 +0,0 @@
1
- import { r as path } from "./request-DwPfYYNF.mjs";
2
- import { t as Realtime } from "./realtime-BcHoYszT.mjs";
3
-
4
- //#region src/compat/resources/cli/cli.ts
5
- /**
6
- * Stainless-shaped `client.cli` resource: the 2-method published CLI
7
- * authentication surface of `@composio/client` (createSession/getSession)
8
- * plus the spec-surface `createCodactFailure` (`POST /cli/codact_failures`,
9
- * never published by Stainless — wayfinder ticket 29).
10
- */
11
- var Cli = class {
12
- realtime;
13
- #client;
14
- constructor(client) {
15
- this.#client = client;
16
- this.realtime = new Realtime(client);
17
- }
18
- createCodactFailure(params, options) {
19
- const { "x-user-api-key": xUserApiKey, ...body } = params;
20
- return this.#client.post(path`/api/v3.1/cli/codact_failures`, {
21
- body,
22
- ...options,
23
- headers: {
24
- ...xUserApiKey != null ? { "x-user-api-key": xUserApiKey } : void 0,
25
- ...options?.headers
26
- }
27
- });
28
- }
29
- createSession(body = {}, options) {
30
- return this.#client.post(path`/api/v3.1/cli/create-session`, {
31
- body,
32
- ...options
33
- });
34
- }
35
- getSession(query, options) {
36
- return this.#client.get(path`/api/v3.1/cli/get-session`, {
37
- query,
38
- ...options
39
- });
40
- }
41
- };
42
- Cli.Realtime = Realtime;
43
-
44
- //#endregion
45
- export { Cli as t };
@@ -1,73 +0,0 @@
1
- import { r as path } from "./request-DwPfYYNF.mjs";
2
- import { t as Custom } from "./custom-BQWoONFY.mjs";
3
- import { t as Generate } from "./generate-DSqfJENZ.mjs";
4
-
5
- //#region src/compat/resources/mcp/mcp.ts
6
- /**
7
- * Stainless-shaped `client.mcp` resource: the 6-method published surface of
8
- * `@composio/client` (create/retrieve/update/list/delete/retrieveApp) plus the
9
- * spec-surface `/mcp/servers/{serverId}/instances` trio (listInstances/
10
- * createInstance/deleteInstance), never published by Stainless — wayfinder
11
- * ticket 29. Dispatched through the handwritten kernel.
12
- */
13
- var Mcp = class {
14
- custom;
15
- generate;
16
- #client;
17
- constructor(client) {
18
- this.#client = client;
19
- this.custom = new Custom(client);
20
- this.generate = new Generate(client);
21
- }
22
- create(body, options) {
23
- return this.#client.post(path`/api/v3.1/mcp/servers`, {
24
- body,
25
- ...options
26
- });
27
- }
28
- retrieve(id, options) {
29
- return this.#client.get(path`/api/v3.1/mcp/${id}`, { ...options });
30
- }
31
- update(id, body = {}, options) {
32
- return this.#client.patch(path`/api/v3.1/mcp/${id}`, {
33
- body,
34
- ...options
35
- });
36
- }
37
- list(query = {}, options) {
38
- return this.#client.get(path`/api/v3.1/mcp/servers`, {
39
- query,
40
- ...options
41
- });
42
- }
43
- delete(id, options) {
44
- return this.#client.delete(path`/api/v3.1/mcp/${id}`, { ...options });
45
- }
46
- createInstance(serverID, body, options) {
47
- return this.#client.post(path`/api/v3.1/mcp/servers/${serverID}/instances`, {
48
- body,
49
- ...options
50
- });
51
- }
52
- deleteInstance(instanceID, params, options) {
53
- const { serverId } = params;
54
- return this.#client.delete(path`/api/v3.1/mcp/servers/${serverId}/instances/${instanceID}`, { ...options });
55
- }
56
- listInstances(serverID, query = {}, options) {
57
- return this.#client.get(path`/api/v3.1/mcp/servers/${serverID}/instances`, {
58
- query,
59
- ...options
60
- });
61
- }
62
- retrieveApp(appKey, query = {}, options) {
63
- return this.#client.get(path`/api/v3.1/mcp/app/${appKey}`, {
64
- query,
65
- ...options
66
- });
67
- }
68
- };
69
- Mcp.Custom = Custom;
70
- Mcp.Generate = Generate;
71
-
72
- //#endregion
73
- export { Mcp as t };
@@ -1,42 +0,0 @@
1
- import { r as path } from "./request-DwPfYYNF.mjs";
2
-
3
- //#region src/compat/resources/org/owner/project.ts
4
- /**
5
- * Spec-surface `client.org.owner.project` resource: the 5-method owner-scoped
6
- * project surface of the v3.1 spec (create/list/retrieve/delete/
7
- * regenerateAPIKey over `/org/owner/project/*`), never published by
8
- * Stainless — wayfinder ticket 31.
9
- */
10
- var Project = class {
11
- #client;
12
- constructor(client) {
13
- this.#client = client;
14
- }
15
- create(body, options) {
16
- return this.#client.post(path`/api/v3.1/org/owner/project/new`, {
17
- body,
18
- ...options
19
- });
20
- }
21
- retrieve(nanoID, options) {
22
- return this.#client.get(path`/api/v3.1/org/owner/project/${nanoID}`, { ...options });
23
- }
24
- list(query = {}, options) {
25
- return this.#client.get(path`/api/v3.1/org/owner/project/list`, {
26
- query,
27
- ...options
28
- });
29
- }
30
- delete(nanoID, query = {}, options) {
31
- return this.#client.delete(path`/api/v3.1/org/owner/project/${nanoID}`, {
32
- query,
33
- ...options
34
- });
35
- }
36
- regenerateAPIKey(nanoID, options) {
37
- return this.#client.post(path`/api/v3.1/org/owner/project/${nanoID}/regenerate_api_key`, { ...options });
38
- }
39
- };
40
-
41
- //#endregion
42
- export { Project as t };