Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Mirrored from https://github.com/Camo67/composio.git
Synced Nov 22, 22:00 UTC
add trigger event types (#1798)
Co-authored-by: haxzie <musthu.gm@gmail.com>
Rahul Tarak committed
Jul 27, 2025 at 05:23 UTC
6c980adaffe748a484e524cec7c0d44c1437c3fe
2 files changed
+33
.changeset/giant-badgers-happen.md
new
+13
@@ -0,0 +1,13 @@
1
+---
2
+'@composio/core': patch
3
+'@composio/anthropic': patch
4
+'@composio/cloudflare': patch
5
+'@composio/google': patch
6
+'@composio/langchain': patch
7
+'@composio/mastra': patch
8
+'@composio/openai': patch
9
+'@composio/openai-agents': patch
10
+'@composio/vercel': patch
11
+---
12
+
13
+Add generics for CLI trigger type generation
ts/packages/core/src/types/triggers.types.ts
+20
@@ -173,3 +173,23 @@ export const TriggersTypeListResponseSchema = z.object({
173
174
export type TriggersTypeListResponse = z.infer<typeof TriggersTypeListResponseSchema>;
175
export type TriggersTypeRetrieveResponse = z.infer<typeof TriggerTypeSchema>;
176
+
177
+/**
178
+ * Generic trigger event type that can be used with generated trigger payload types
179
+ * @template TPayload - The specific trigger payload type (e.g., GITHUB_COMMIT_EVENT_PAYLOAD)
180
+ */
181
+export interface TriggerEvent<TPayload = unknown> {
182
+ type: string;
183
+ timestamp: string;
184
+ data: TriggerEventData<TPayload>;
185
+}
186
+
187
+/**
188
+ * Generic trigger event data type that contains the payload and metadata
189
+ * @template TPayload - The specific trigger payload type
190
+ */
191
+export type TriggerEventData<TPayload = unknown> = TPayload & {
192
+ connection_nano_id: string;
193
+ trigger_nano_id: string;
194
+ user_id: string;
195
+};