@composio/client 0.1.0-alpha.10 → 0.1.0-alpha.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 (170) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/client.d.mts +6 -6
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +6 -6
  5. package/client.d.ts.map +1 -1
  6. package/client.js.map +1 -1
  7. package/client.mjs.map +1 -1
  8. package/package.json +1 -1
  9. package/resources/auth-configs.d.mts +163 -24
  10. package/resources/auth-configs.d.mts.map +1 -1
  11. package/resources/auth-configs.d.ts +163 -24
  12. package/resources/auth-configs.d.ts.map +1 -1
  13. package/resources/auth-configs.js +50 -4
  14. package/resources/auth-configs.js.map +1 -1
  15. package/resources/auth-configs.mjs +50 -4
  16. package/resources/auth-configs.mjs.map +1 -1
  17. package/resources/connected-accounts.d.mts +80 -17
  18. package/resources/connected-accounts.d.mts.map +1 -1
  19. package/resources/connected-accounts.d.ts +80 -17
  20. package/resources/connected-accounts.d.ts.map +1 -1
  21. package/resources/connected-accounts.js +56 -4
  22. package/resources/connected-accounts.js.map +1 -1
  23. package/resources/connected-accounts.mjs +56 -4
  24. package/resources/connected-accounts.mjs.map +1 -1
  25. package/resources/files.d.mts +56 -23
  26. package/resources/files.d.mts.map +1 -1
  27. package/resources/files.d.ts +56 -23
  28. package/resources/files.d.ts.map +1 -1
  29. package/resources/files.js +20 -2
  30. package/resources/files.js.map +1 -1
  31. package/resources/files.mjs +20 -2
  32. package/resources/files.mjs.map +1 -1
  33. package/resources/index.d.mts +3 -3
  34. package/resources/index.d.mts.map +1 -1
  35. package/resources/index.d.ts +3 -3
  36. package/resources/index.d.ts.map +1 -1
  37. package/resources/index.js.map +1 -1
  38. package/resources/index.mjs.map +1 -1
  39. package/resources/mcp/command.d.mts +0 -33
  40. package/resources/mcp/command.d.mts.map +1 -1
  41. package/resources/mcp/command.d.ts +0 -33
  42. package/resources/mcp/command.d.ts.map +1 -1
  43. package/resources/mcp/command.js +0 -6
  44. package/resources/mcp/command.js.map +1 -1
  45. package/resources/mcp/command.mjs +0 -6
  46. package/resources/mcp/command.mjs.map +1 -1
  47. package/resources/mcp/index.d.mts +2 -2
  48. package/resources/mcp/index.d.mts.map +1 -1
  49. package/resources/mcp/index.d.ts +2 -2
  50. package/resources/mcp/index.d.ts.map +1 -1
  51. package/resources/mcp/index.js.map +1 -1
  52. package/resources/mcp/index.mjs.map +1 -1
  53. package/resources/mcp/mcp.d.mts +232 -235
  54. package/resources/mcp/mcp.d.mts.map +1 -1
  55. package/resources/mcp/mcp.d.ts +232 -235
  56. package/resources/mcp/mcp.d.ts.map +1 -1
  57. package/resources/mcp/mcp.js +55 -19
  58. package/resources/mcp/mcp.js.map +1 -1
  59. package/resources/mcp/mcp.mjs +55 -19
  60. package/resources/mcp/mcp.mjs.map +1 -1
  61. package/resources/migration.d.mts +11 -2
  62. package/resources/migration.d.mts.map +1 -1
  63. package/resources/migration.d.ts +11 -2
  64. package/resources/migration.d.ts.map +1 -1
  65. package/resources/migration.js +3 -1
  66. package/resources/migration.js.map +1 -1
  67. package/resources/migration.mjs +3 -1
  68. package/resources/migration.mjs.map +1 -1
  69. package/resources/org/api-key.d.mts +23 -2
  70. package/resources/org/api-key.d.mts.map +1 -1
  71. package/resources/org/api-key.d.ts +23 -2
  72. package/resources/org/api-key.d.ts.map +1 -1
  73. package/resources/org/api-key.js +15 -2
  74. package/resources/org/api-key.js.map +1 -1
  75. package/resources/org/api-key.mjs +15 -2
  76. package/resources/org/api-key.mjs.map +1 -1
  77. package/resources/org/project/api-keys.d.mts +97 -20
  78. package/resources/org/project/api-keys.d.mts.map +1 -1
  79. package/resources/org/project/api-keys.d.ts +97 -20
  80. package/resources/org/project/api-keys.d.ts.map +1 -1
  81. package/resources/org/project/api-keys.js +57 -0
  82. package/resources/org/project/api-keys.js.map +1 -1
  83. package/resources/org/project/api-keys.mjs +57 -0
  84. package/resources/org/project/api-keys.mjs.map +1 -1
  85. package/resources/org/project/project.d.mts +176 -4
  86. package/resources/org/project/project.d.mts.map +1 -1
  87. package/resources/org/project/project.d.ts +176 -4
  88. package/resources/org/project/project.d.ts.map +1 -1
  89. package/resources/org/project/project.js +46 -3
  90. package/resources/org/project/project.js.map +1 -1
  91. package/resources/org/project/project.mjs +46 -3
  92. package/resources/org/project/project.mjs.map +1 -1
  93. package/resources/org/project/trigger.d.mts +101 -1
  94. package/resources/org/project/trigger.d.mts.map +1 -1
  95. package/resources/org/project/trigger.d.ts +101 -1
  96. package/resources/org/project/trigger.d.ts.map +1 -1
  97. package/resources/org/project/trigger.js +21 -0
  98. package/resources/org/project/trigger.js.map +1 -1
  99. package/resources/org/project/trigger.mjs +21 -0
  100. package/resources/org/project/trigger.mjs.map +1 -1
  101. package/resources/org/project/webhook.d.mts +86 -15
  102. package/resources/org/project/webhook.d.mts.map +1 -1
  103. package/resources/org/project/webhook.d.ts +86 -15
  104. package/resources/org/project/webhook.d.ts.map +1 -1
  105. package/resources/org/project/webhook.js +49 -2
  106. package/resources/org/project/webhook.js.map +1 -1
  107. package/resources/org/project/webhook.mjs +49 -2
  108. package/resources/org/project/webhook.mjs.map +1 -1
  109. package/resources/toolkits.d.mts +195 -7
  110. package/resources/toolkits.d.mts.map +1 -1
  111. package/resources/toolkits.d.ts +195 -7
  112. package/resources/toolkits.d.ts.map +1 -1
  113. package/resources/toolkits.js +14 -6
  114. package/resources/toolkits.js.map +1 -1
  115. package/resources/toolkits.mjs +14 -6
  116. package/resources/toolkits.mjs.map +1 -1
  117. package/resources/tools.d.mts +207 -40
  118. package/resources/tools.d.mts.map +1 -1
  119. package/resources/tools.d.ts +207 -40
  120. package/resources/tools.d.ts.map +1 -1
  121. package/resources/tools.js +58 -5
  122. package/resources/tools.js.map +1 -1
  123. package/resources/tools.mjs +58 -5
  124. package/resources/tools.mjs.map +1 -1
  125. package/resources/trigger-instances/index.d.mts +1 -1
  126. package/resources/trigger-instances/index.d.mts.map +1 -1
  127. package/resources/trigger-instances/index.d.ts +1 -1
  128. package/resources/trigger-instances/index.d.ts.map +1 -1
  129. package/resources/trigger-instances/index.js.map +1 -1
  130. package/resources/trigger-instances/index.mjs.map +1 -1
  131. package/resources/trigger-instances/trigger-instances.d.mts +21 -24
  132. package/resources/trigger-instances/trigger-instances.d.mts.map +1 -1
  133. package/resources/trigger-instances/trigger-instances.d.ts +21 -24
  134. package/resources/trigger-instances/trigger-instances.d.ts.map +1 -1
  135. package/resources/trigger-instances/trigger-instances.js +1 -8
  136. package/resources/trigger-instances/trigger-instances.js.map +1 -1
  137. package/resources/trigger-instances/trigger-instances.mjs +1 -8
  138. package/resources/trigger-instances/trigger-instances.mjs.map +1 -1
  139. package/resources/triggers-types.d.mts +96 -2
  140. package/resources/triggers-types.d.mts.map +1 -1
  141. package/resources/triggers-types.d.ts +96 -2
  142. package/resources/triggers-types.d.ts.map +1 -1
  143. package/resources/triggers-types.js +23 -1
  144. package/resources/triggers-types.js.map +1 -1
  145. package/resources/triggers-types.mjs +23 -1
  146. package/resources/triggers-types.mjs.map +1 -1
  147. package/src/client.ts +4 -14
  148. package/src/resources/auth-configs.ts +164 -24
  149. package/src/resources/connected-accounts.ts +80 -17
  150. package/src/resources/files.ts +56 -23
  151. package/src/resources/index.ts +2 -7
  152. package/src/resources/mcp/command.ts +1 -46
  153. package/src/resources/mcp/index.ts +2 -5
  154. package/src/resources/mcp/mcp.ts +240 -280
  155. package/src/resources/migration.ts +11 -2
  156. package/src/resources/org/api-key.ts +23 -2
  157. package/src/resources/org/project/api-keys.ts +97 -20
  158. package/src/resources/org/project/project.ts +176 -4
  159. package/src/resources/org/project/trigger.ts +101 -1
  160. package/src/resources/org/project/webhook.ts +86 -15
  161. package/src/resources/toolkits.ts +200 -7
  162. package/src/resources/tools.ts +207 -40
  163. package/src/resources/trigger-instances/index.ts +0 -3
  164. package/src/resources/trigger-instances/trigger-instances.ts +22 -38
  165. package/src/resources/triggers-types.ts +96 -2
  166. package/src/version.ts +1 -1
  167. package/version.d.mts +1 -1
  168. package/version.d.ts +1 -1
  169. package/version.js +1 -1
  170. package/version.mjs +1 -1
@@ -3,89 +3,160 @@ import { APIPromise } from "../../../core/api-promise.js";
3
3
  import { RequestOptions } from "../../../internal/request-options.js";
4
4
  export declare class Webhook extends APIResource {
5
5
  /**
6
- * Get the webhook URL for a project
6
+ * Retrieves the webhook URL and secret for the current project. Webhooks come in
7
+ * two types: "trigger" webhooks are used for integration trigger events, while
8
+ * "event" webhooks receive system notifications about project events. The response
9
+ * includes both the URL and the secret key used to verify webhook signatures.
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * const webhook = await client.org.project.webhook.retrieve({
14
+ * type: 'trigger',
15
+ * });
16
+ * ```
7
17
  */
8
18
  retrieve(query: WebhookRetrieveParams, options?: RequestOptions): APIPromise<WebhookRetrieveResponse>;
19
+ /**
20
+ * Updates the webhook URL for the current project based on the specified type
21
+ * (trigger or event). Webhook URLs are endpoints that receive notifications about
22
+ * events in your project. "Trigger" webhooks receive integration trigger events,
23
+ * while "event" webhooks receive system notifications. This endpoint allows you to
24
+ * set or change these notification destinations.
25
+ *
26
+ * @example
27
+ * ```ts
28
+ * const webhook = await client.org.project.webhook.update({
29
+ * type: 'trigger',
30
+ * webhook_url: 'https://example.com/api/webhooks/triggers',
31
+ * });
32
+ * ```
33
+ */
9
34
  update(body: WebhookUpdateParams, options?: RequestOptions): APIPromise<WebhookUpdateResponse>;
10
35
  /**
11
- * Remove a webhook URL (trigger or event) from the project configuration
36
+ * Removes a webhook URL (trigger or event) from the project configuration. This
37
+ * operation sets the specified webhook URL to null in the database but preserves
38
+ * the webhook secret. After deletion, the project will no longer receive webhook
39
+ * notifications of the specified type until a new URL is configured.
40
+ *
41
+ * @example
42
+ * ```ts
43
+ * const webhook = await client.org.project.webhook.delete({
44
+ * type: 'trigger',
45
+ * });
46
+ * ```
12
47
  */
13
48
  delete(body: WebhookDeleteParams, options?: RequestOptions): APIPromise<WebhookDeleteResponse>;
49
+ /**
50
+ * Generates a new webhook secret for the project, invalidating the previous one.
51
+ * Webhook secrets are used to verify the authenticity of incoming webhook payloads
52
+ * through signature verification. This endpoint should be used when you need to
53
+ * rotate your webhook secret for security purposes. After refreshing, you must
54
+ * update your webhook verification logic to use the new secret.
55
+ *
56
+ * @example
57
+ * ```ts
58
+ * const response = await client.org.project.webhook.refresh();
59
+ * ```
60
+ */
14
61
  refresh(options?: RequestOptions): APIPromise<WebhookRefreshResponse>;
15
62
  }
63
+ /**
64
+ * Response containing webhook URL configuration and secret
65
+ */
16
66
  export interface WebhookRetrieveResponse {
17
67
  /**
18
- * Status of the webhook
68
+ * Indicates whether the webhook was found and retrieved successfully
19
69
  */
20
70
  status: 'success' | 'not found';
71
+ /**
72
+ * The webhook configuration containing either trigger or event webhook URL
73
+ */
21
74
  url: WebhookRetrieveResponse.UnionMember0 | WebhookRetrieveResponse.UnionMember1;
22
75
  /**
23
- * Webhook secret
76
+ * The secret key that should be used to verify webhook signatures
24
77
  */
25
78
  webhook_secret: string;
26
79
  }
27
80
  export declare namespace WebhookRetrieveResponse {
28
81
  interface UnionMember0 {
82
+ /**
83
+ * Identifies this as a trigger webhook response
84
+ */
29
85
  type: 'trigger';
30
86
  /**
31
- * Webhook URL
87
+ * The URL endpoint where trigger notifications will be delivered
32
88
  */
33
89
  webhook_url?: string;
34
90
  }
35
91
  interface UnionMember1 {
92
+ /**
93
+ * Identifies this as an event webhook response
94
+ */
36
95
  type: 'event';
37
96
  /**
38
- * Event webhook URL
97
+ * The URL endpoint where event notifications will be delivered
39
98
  */
40
99
  event_webhook_url?: string;
41
100
  }
42
101
  }
102
+ /**
103
+ * Response indicating the status of the webhook URL update operation
104
+ */
43
105
  export interface WebhookUpdateResponse {
44
106
  /**
45
- * Status message
107
+ * Human-readable description of the update operation result
46
108
  */
47
109
  message: string;
48
110
  /**
49
- * Whether the operation was successful
111
+ * Indicates if the webhook URL update was completed successfully
50
112
  */
51
113
  success: boolean;
52
114
  }
115
+ /**
116
+ * Response indicating successful webhook URL deletion
117
+ */
53
118
  export interface WebhookDeleteResponse {
119
+ /**
120
+ * Indicates the webhook URL was successfully removed
121
+ */
54
122
  status: 'success';
55
123
  }
124
+ /**
125
+ * Response containing the newly generated webhook secret
126
+ */
56
127
  export interface WebhookRefreshResponse {
57
128
  /**
58
- * Status message
129
+ * Human-readable description of the refresh operation result
59
130
  */
60
131
  message: string;
61
132
  /**
62
- * Whether the operation was successful
133
+ * Indicates if the webhook secret was successfully refreshed
63
134
  */
64
135
  success: boolean;
65
136
  /**
66
- * Webhook secret
137
+ * The new secret key that should be used to verify incoming webhook payloads
67
138
  */
68
139
  webhook_secret: string;
69
140
  }
70
141
  export interface WebhookRetrieveParams {
71
142
  /**
72
- * Type of the webhook
143
+ * Type of webhook to retrieve (trigger or event)
73
144
  */
74
145
  type: 'trigger' | 'event';
75
146
  }
76
147
  export interface WebhookUpdateParams {
77
148
  /**
78
- * Type of the webhook
149
+ * Specifies which webhook type to update (trigger or event)
79
150
  */
80
151
  type: 'trigger' | 'event';
81
152
  /**
82
- * Webhook URL
153
+ * Valid URL that will receive webhook payloads. Must include https:// protocol.
83
154
  */
84
155
  webhook_url: string;
85
156
  }
86
157
  export interface WebhookDeleteParams {
87
158
  /**
88
- * Type of the webhook
159
+ * Specifies which webhook type to remove from the project configuration
89
160
  */
90
161
  type: 'trigger' | 'event';
91
162
  }
@@ -1 +1 @@
1
- {"version":3,"file":"webhook.d.ts","sourceRoot":"","sources":["../../../src/resources/org/project/webhook.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,qBAAqB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC;IAIrG,MAAM,CAAC,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,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AK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
@@ -5,20 +5,67 @@ exports.Webhook = void 0;
5
5
  const resource_1 = require("../../../core/resource.js");
6
6
  class Webhook extends resource_1.APIResource {
7
7
  /**
8
- * Get the webhook URL for a project
8
+ * Retrieves the webhook URL and secret for the current project. Webhooks come in
9
+ * two types: "trigger" webhooks are used for integration trigger events, while
10
+ * "event" webhooks receive system notifications about project events. The response
11
+ * includes both the URL and the secret key used to verify webhook signatures.
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * const webhook = await client.org.project.webhook.retrieve({
16
+ * type: 'trigger',
17
+ * });
18
+ * ```
9
19
  */
10
20
  retrieve(query, options) {
11
21
  return this._client.get('/api/v3/org/project/webhook', { query, ...options });
12
22
  }
23
+ /**
24
+ * Updates the webhook URL for the current project based on the specified type
25
+ * (trigger or event). Webhook URLs are endpoints that receive notifications about
26
+ * events in your project. "Trigger" webhooks receive integration trigger events,
27
+ * while "event" webhooks receive system notifications. This endpoint allows you to
28
+ * set or change these notification destinations.
29
+ *
30
+ * @example
31
+ * ```ts
32
+ * const webhook = await client.org.project.webhook.update({
33
+ * type: 'trigger',
34
+ * webhook_url: 'https://example.com/api/webhooks/triggers',
35
+ * });
36
+ * ```
37
+ */
13
38
  update(body, options) {
14
39
  return this._client.post('/api/v3/org/project/webhook/update', { body, ...options });
15
40
  }
16
41
  /**
17
- * Remove a webhook URL (trigger or event) from the project configuration
42
+ * Removes a webhook URL (trigger or event) from the project configuration. This
43
+ * operation sets the specified webhook URL to null in the database but preserves
44
+ * the webhook secret. After deletion, the project will no longer receive webhook
45
+ * notifications of the specified type until a new URL is configured.
46
+ *
47
+ * @example
48
+ * ```ts
49
+ * const webhook = await client.org.project.webhook.delete({
50
+ * type: 'trigger',
51
+ * });
52
+ * ```
18
53
  */
19
54
  delete(body, options) {
20
55
  return this._client.delete('/api/v3/org/project/webhook', { body, ...options });
21
56
  }
57
+ /**
58
+ * Generates a new webhook secret for the project, invalidating the previous one.
59
+ * Webhook secrets are used to verify the authenticity of incoming webhook payloads
60
+ * through signature verification. This endpoint should be used when you need to
61
+ * rotate your webhook secret for security purposes. After refreshing, you must
62
+ * update your webhook verification logic to use the new secret.
63
+ *
64
+ * @example
65
+ * ```ts
66
+ * const response = await client.org.project.webhook.refresh();
67
+ * ```
68
+ */
22
69
  refresh(options) {
23
70
  return this._client.post('/api/v3/org/project/webhook/refresh', options);
24
71
  }
@@ -1 +1 @@
1
- {"version":3,"file":"webhook.js","sourceRoot":"","sources":["../../../src/resources/org/project/webhook.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAIrD,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;OAEG;IACH,QAAQ,CAAC,KAA4B,EAAE,OAAwB;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,6BAA6B,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChF,CAAC;IAED,MAAM,CAAC,IAAyB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,oCAAoC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvF,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,IAAyB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,6BAA6B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClF,CAAC;IAED,OAAO,CAAC,OAAwB;QAC9B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qCAAqC,EAAE,OAAO,CAAC,CAAC;IAC3E,CAAC;CACF;AAtBD,0BAsBC"}
1
+ {"version":3,"file":"webhook.js","sourceRoot":"","sources":["../../../src/resources/org/project/webhook.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAIrD,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,KAA4B,EAAE,OAAwB;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,6BAA6B,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChF,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,IAAyB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,oCAAoC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvF,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,IAAyB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,6BAA6B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClF,CAAC;IAED;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,OAAwB;QAC9B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qCAAqC,EAAE,OAAO,CAAC,CAAC;IAC3E,CAAC;CACF;AArED,0BAqEC"}
@@ -2,20 +2,67 @@
2
2
  import { APIResource } from "../../../core/resource.mjs";
3
3
  export class Webhook extends APIResource {
4
4
  /**
5
- * Get the webhook URL for a project
5
+ * Retrieves the webhook URL and secret for the current project. Webhooks come in
6
+ * two types: "trigger" webhooks are used for integration trigger events, while
7
+ * "event" webhooks receive system notifications about project events. The response
8
+ * includes both the URL and the secret key used to verify webhook signatures.
9
+ *
10
+ * @example
11
+ * ```ts
12
+ * const webhook = await client.org.project.webhook.retrieve({
13
+ * type: 'trigger',
14
+ * });
15
+ * ```
6
16
  */
7
17
  retrieve(query, options) {
8
18
  return this._client.get('/api/v3/org/project/webhook', { query, ...options });
9
19
  }
20
+ /**
21
+ * Updates the webhook URL for the current project based on the specified type
22
+ * (trigger or event). Webhook URLs are endpoints that receive notifications about
23
+ * events in your project. "Trigger" webhooks receive integration trigger events,
24
+ * while "event" webhooks receive system notifications. This endpoint allows you to
25
+ * set or change these notification destinations.
26
+ *
27
+ * @example
28
+ * ```ts
29
+ * const webhook = await client.org.project.webhook.update({
30
+ * type: 'trigger',
31
+ * webhook_url: 'https://example.com/api/webhooks/triggers',
32
+ * });
33
+ * ```
34
+ */
10
35
  update(body, options) {
11
36
  return this._client.post('/api/v3/org/project/webhook/update', { body, ...options });
12
37
  }
13
38
  /**
14
- * Remove a webhook URL (trigger or event) from the project configuration
39
+ * Removes a webhook URL (trigger or event) from the project configuration. This
40
+ * operation sets the specified webhook URL to null in the database but preserves
41
+ * the webhook secret. After deletion, the project will no longer receive webhook
42
+ * notifications of the specified type until a new URL is configured.
43
+ *
44
+ * @example
45
+ * ```ts
46
+ * const webhook = await client.org.project.webhook.delete({
47
+ * type: 'trigger',
48
+ * });
49
+ * ```
15
50
  */
16
51
  delete(body, options) {
17
52
  return this._client.delete('/api/v3/org/project/webhook', { body, ...options });
18
53
  }
54
+ /**
55
+ * Generates a new webhook secret for the project, invalidating the previous one.
56
+ * Webhook secrets are used to verify the authenticity of incoming webhook payloads
57
+ * through signature verification. This endpoint should be used when you need to
58
+ * rotate your webhook secret for security purposes. After refreshing, you must
59
+ * update your webhook verification logic to use the new secret.
60
+ *
61
+ * @example
62
+ * ```ts
63
+ * const response = await client.org.project.webhook.refresh();
64
+ * ```
65
+ */
19
66
  refresh(options) {
20
67
  return this._client.post('/api/v3/org/project/webhook/refresh', options);
21
68
  }
@@ -1 +1 @@
1
- {"version":3,"file":"webhook.mjs","sourceRoot":"","sources":["../../../src/resources/org/project/webhook.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,QAAQ,CAAC,KAA4B,EAAE,OAAwB;QAC7D,OAAO,IA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I,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClF,CAAC;IAED;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,OAAwB;QAC9B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qCAAqC,EAAE,OAAO,CAAC,CAAC;IAC3E,CAAC;CACF"}
@@ -3,57 +3,153 @@ import { APIPromise } from "../core/api-promise.mjs";
3
3
  import { RequestOptions } from "../internal/request-options.mjs";
4
4
  export declare class Toolkits extends APIResource {
5
5
  /**
6
- * Retrieve detailed information about a specific toolkit using its slug identifier
6
+ * Retrieves comprehensive information about a specific toolkit using its unique
7
+ * slug identifier. This endpoint provides detailed metadata, authentication
8
+ * configuration options, and feature counts for the requested toolkit.
7
9
  */
8
10
  retrieve(slug: string, options?: RequestOptions): APIPromise<ToolkitRetrieveResponse>;
9
11
  /**
10
- * Retrieve a list of available toolkits with optional filtering and sorting
11
- * options
12
+ * Retrieves a comprehensive list of toolkits that are available to the
13
+ * authenticated project. Toolkits represent integration points with external
14
+ * services and applications, each containing a collection of tools and triggers.
15
+ * This endpoint supports filtering by category, management type, and local
16
+ * availability, as well as different sorting options.
12
17
  */
13
18
  list(query?: ToolkitListParams | null | undefined, options?: RequestOptions): APIPromise<ToolkitListResponse>;
14
19
  /**
15
- * Retrieve a list of all available toolkit categories for filtering toolkits
20
+ * Retrieves a comprehensive list of all available toolkit categories. These
21
+ * categories can be used to filter toolkits by type or purpose when using the
22
+ * toolkit listing endpoint. Categories help organize toolkits into logical groups
23
+ * based on their functionality or industry focus.
16
24
  */
17
- retrieveCategories(options?: RequestOptions): APIPromise<ToolkitRetrieveCategoriesResponse>;
25
+ retrieveCategories(query?: ToolkitRetrieveCategoriesParams | null | undefined, options?: RequestOptions): APIPromise<ToolkitRetrieveCategoriesResponse>;
18
26
  }
27
+ /**
28
+ * Detailed information about a single toolkit
29
+ */
19
30
  export interface ToolkitRetrieveResponse {
31
+ /**
32
+ * Indicates if this toolkit is currently enabled and available for use
33
+ */
20
34
  enabled: boolean;
35
+ /**
36
+ * Indicates if this toolkit is specific to the current project or globally
37
+ * available
38
+ */
21
39
  is_local_toolkit: boolean;
40
+ /**
41
+ * Comprehensive metadata for the toolkit including dates, descriptions, and
42
+ * statistics
43
+ */
22
44
  meta: ToolkitRetrieveResponse.Meta;
45
+ /**
46
+ * Human-readable name of the toolkit
47
+ */
23
48
  name: string;
49
+ /**
50
+ * URL-friendly unique identifier for the toolkit
51
+ */
24
52
  slug: string;
53
+ /**
54
+ * Complete authentication configuration details for each supported auth method
55
+ */
25
56
  auth_config_details?: Array<ToolkitRetrieveResponse.AuthConfigDetail>;
57
+ /**
58
+ * List of authentication methods that Composio manages for this toolkit
59
+ */
26
60
  composio_managed_auth_schemes?: Array<string>;
27
61
  }
28
62
  export declare namespace ToolkitRetrieveResponse {
63
+ /**
64
+ * Comprehensive metadata for the toolkit including dates, descriptions, and
65
+ * statistics
66
+ */
29
67
  interface Meta {
68
+ /**
69
+ * List of categories associated with this toolkit
70
+ */
30
71
  categories: Array<Meta.Category>;
72
+ /**
73
+ * Creation date and time of the toolkit
74
+ */
31
75
  created_at: string;
76
+ /**
77
+ * Human-readable description explaining the toolkit's purpose and functionality
78
+ */
32
79
  description: string;
80
+ /**
81
+ * Image URL for the toolkit's branding
82
+ */
33
83
  logo: string;
84
+ /**
85
+ * Count of available tools in this toolkit
86
+ */
34
87
  tools_count: number;
88
+ /**
89
+ * Count of available triggers in this toolkit
90
+ */
35
91
  triggers_count: number;
92
+ /**
93
+ * Last modification date and time of the toolkit
94
+ */
36
95
  updated_at: string;
96
+ /**
97
+ * Link to the toolkit's main application or service website
98
+ */
37
99
  app_url?: string | null;
38
100
  }
39
101
  namespace Meta {
40
102
  interface Category {
103
+ /**
104
+ * Human-readable category name
105
+ */
41
106
  name: string;
107
+ /**
108
+ * URL-friendly identifier for the category
109
+ */
42
110
  slug: string;
43
111
  }
44
112
  }
113
+ /**
114
+ * Detailed configuration for an authentication method
115
+ */
45
116
  interface AuthConfigDetail {
117
+ /**
118
+ * Field groups required for different authentication stages
119
+ */
46
120
  fields: AuthConfigDetail.Fields;
121
+ /**
122
+ * The type of authentication mode (e.g., oauth2, basic_auth, api_key)
123
+ */
47
124
  mode: string;
125
+ /**
126
+ * Display name for this authentication method
127
+ */
48
128
  name: string;
129
+ /**
130
+ * Configuration for proxying authentication requests to external services
131
+ */
49
132
  proxy?: AuthConfigDetail.Proxy;
50
133
  }
51
134
  namespace AuthConfigDetail {
135
+ /**
136
+ * Field groups required for different authentication stages
137
+ */
52
138
  interface Fields {
139
+ /**
140
+ * Form fields needed when creating an authentication configuration
141
+ */
53
142
  auth_config_creation: Fields.AuthConfigCreation;
143
+ /**
144
+ * Form fields needed when connecting a user account with this authentication
145
+ * method
146
+ */
54
147
  connected_account_initiation: Fields.ConnectedAccountInitiation;
55
148
  }
56
149
  namespace Fields {
150
+ /**
151
+ * Form fields needed when creating an authentication configuration
152
+ */
57
153
  interface AuthConfigCreation {
58
154
  optional: Array<AuthConfigCreation.Optional>;
59
155
  required: Array<AuthConfigCreation.Required>;
@@ -76,6 +172,10 @@ export declare namespace ToolkitRetrieveResponse {
76
172
  default?: string | null;
77
173
  }
78
174
  }
175
+ /**
176
+ * Form fields needed when connecting a user account with this authentication
177
+ * method
178
+ */
79
179
  interface ConnectedAccountInitiation {
80
180
  optional: Array<ConnectedAccountInitiation.Optional>;
81
181
  required: Array<ConnectedAccountInitiation.Required>;
@@ -99,7 +199,13 @@ export declare namespace ToolkitRetrieveResponse {
99
199
  }
100
200
  }
101
201
  }
202
+ /**
203
+ * Configuration for proxying authentication requests to external services
204
+ */
102
205
  interface Proxy {
206
+ /**
207
+ * URL to which authentication requests will be proxied
208
+ */
103
209
  base_url: string;
104
210
  }
105
211
  }
@@ -110,29 +216,87 @@ export interface ToolkitListResponse {
110
216
  total_pages: number;
111
217
  }
112
218
  export declare namespace ToolkitListResponse {
219
+ /**
220
+ * Detailed information about a toolkit
221
+ */
113
222
  interface Item {
223
+ /**
224
+ * Indicates if this toolkit is specific to the current project or globally
225
+ * available
226
+ */
114
227
  is_local_toolkit: boolean;
228
+ /**
229
+ * Additional metadata about the toolkit
230
+ */
115
231
  meta: Item.Meta;
232
+ /**
233
+ * Human-readable name of the toolkit
234
+ */
116
235
  name: string;
236
+ /**
237
+ * URL-friendly unique identifier for the toolkit
238
+ */
117
239
  slug: string;
240
+ /**
241
+ * List of authentication methods supported by this toolkit
242
+ */
118
243
  auth_schemes?: Array<string>;
244
+ /**
245
+ * List of authentication methods that Composio manages for this toolkit
246
+ */
119
247
  composio_managed_auth_schemes?: Array<string>;
248
+ /**
249
+ * When true, this toolkit can be used without authentication
250
+ */
120
251
  no_auth?: boolean;
121
252
  }
122
253
  namespace Item {
254
+ /**
255
+ * Additional metadata about the toolkit
256
+ */
123
257
  interface Meta {
258
+ /**
259
+ * List of categories associated with this toolkit
260
+ */
124
261
  categories: Array<Meta.Category>;
262
+ /**
263
+ * Creation date and time of the toolkit
264
+ */
125
265
  created_at: string;
266
+ /**
267
+ * Human-readable description explaining the toolkit's purpose and functionality
268
+ */
126
269
  description: string;
270
+ /**
271
+ * Image URL for the toolkit's branding
272
+ */
127
273
  logo: string;
274
+ /**
275
+ * Count of available tools in this toolkit
276
+ */
128
277
  tools_count: number;
278
+ /**
279
+ * Count of available triggers in this toolkit
280
+ */
129
281
  triggers_count: number;
282
+ /**
283
+ * Last modification date and time of the toolkit
284
+ */
130
285
  updated_at: string;
286
+ /**
287
+ * Link to the toolkit's main application or service website
288
+ */
131
289
  app_url?: string | null;
132
290
  }
133
291
  namespace Meta {
134
292
  interface Category {
293
+ /**
294
+ * Category identifier
295
+ */
135
296
  id: string;
297
+ /**
298
+ * Human-readable category name
299
+ */
136
300
  name: string;
137
301
  }
138
302
  }
@@ -144,21 +308,45 @@ export interface ToolkitRetrieveCategoriesResponse {
144
308
  total_pages: number;
145
309
  }
146
310
  export declare namespace ToolkitRetrieveCategoriesResponse {
311
+ /**
312
+ * Information about a single toolkit category
313
+ */
147
314
  interface Item {
315
+ /**
316
+ * URL-friendly unique identifier for the category, used for filtering toolkits
317
+ */
148
318
  id: string;
319
+ /**
320
+ * Display name of the toolkit category
321
+ */
149
322
  name: string;
150
323
  }
151
324
  }
152
325
  export interface ToolkitListParams {
326
+ /**
327
+ * Filter toolkits by category
328
+ */
153
329
  category?: string;
154
330
  /**
155
- * Whether to include local toolkits
331
+ * Whether to include local toolkits in the results
156
332
  */
157
333
  is_local?: boolean | null;
334
+ /**
335
+ * Filter toolkits by who manages them
336
+ */
158
337
  managed_by?: 'composio' | 'all' | 'project';
338
+ /**
339
+ * Sort order for returned toolkits
340
+ */
159
341
  sort_by?: 'usage' | 'alphabetically';
160
342
  }
343
+ export interface ToolkitRetrieveCategoriesParams {
344
+ /**
345
+ * Cache control parameter
346
+ */
347
+ cache?: string;
348
+ }
161
349
  export declare namespace Toolkits {
162
- export { type ToolkitRetrieveResponse as ToolkitRetrieveResponse, type ToolkitListResponse as ToolkitListResponse, type ToolkitRetrieveCategoriesResponse as ToolkitRetrieveCategoriesResponse, type ToolkitListParams as ToolkitListParams, };
350
+ export { type ToolkitRetrieveResponse as ToolkitRetrieveResponse, type ToolkitListResponse as ToolkitListResponse, type ToolkitRetrieveCategoriesResponse as ToolkitRetrieveCategoriesResponse, type ToolkitListParams as ToolkitListParams, type ToolkitRetrieveCategoriesParams as ToolkitRetrieveCategoriesParams, };
163
351
  }
164
352
  //# sourceMappingURL=toolkits.d.mts.map