Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
TypeScript agentic-aiagentsaiai-agentsaiagentsdeveloper-toolsfunction-callinggpt-4javascriptjsllmllmopsmcppythonremote-mcp-serverssetypescript
add trigger event types (#1798)
Rahul Tarak6c980adaffe7
diff --git a/.changeset/giant-badgers-happen.md b/.changeset/giant-badgers-happen.mdnew file mode 100644index 000000000..b8a6ebfd0--- /dev/null+++ b/.changeset/giant-badgers-happen.md@@ -0,0 +1,13 @@+---+'@composio/core': patch+'@composio/anthropic': patch+'@composio/cloudflare': patch+'@composio/google': patch+'@composio/langchain': patch+'@composio/mastra': patch+'@composio/openai': patch+'@composio/openai-agents': patch+'@composio/vercel': patch+---++Add generics for CLI trigger type generationdiff --git a/ts/packages/core/src/types/triggers.types.ts b/ts/packages/core/src/types/triggers.types.tsindex 4f03fb2e0..7f29a550c 100644--- a/ts/packages/core/src/types/triggers.types.ts+++ b/ts/packages/core/src/types/triggers.types.ts@@ -173,3 +173,23 @@ export const TriggersTypeListResponseSchema = z.object({export type TriggersTypeListResponse = z.infer<typeof TriggersTypeListResponseSchema>;export type TriggersTypeRetrieveResponse = z.infer<typeof TriggerTypeSchema>;++/**+ * Generic trigger event type that can be used with generated trigger payload types+ * @template TPayload - The specific trigger payload type (e.g., GITHUB_COMMIT_EVENT_PAYLOAD)+ */+export interface TriggerEvent<TPayload = unknown> {+ type: string;+ timestamp: string;+ data: TriggerEventData<TPayload>;+}++/**+ * Generic trigger event data type that contains the payload and metadata+ * @template TPayload - The specific trigger payload type+ */+export type TriggerEventData<TPayload = unknown> = TPayload & {+ connection_nano_id: string;+ trigger_nano_id: string;+ user_id: string;+};