You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/index.ts
+7-2Lines changed: 7 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -124,9 +124,10 @@ server.tool(
124
124
125
125
1. Function Structure:
126
126
- Input: Flowcore event object containing event data
127
-
- Output: Object matching the projection table schema
127
+
- Output: Object matching a single projection table schema
128
128
- Must be pure function with no side effects
129
129
- Handle null/undefined values gracefully
130
+
- Objects or array of object returned must match the projection table schema or it will fail to insert into the database
130
131
131
132
2. Data Type Formatting Requirements:
132
133
- Timestamps: ISO 8601 format (YYYY-MM-DD'T'HH:mm:ss.sssZ)
@@ -148,6 +149,10 @@ server.tool(
148
149
149
150
4. Example Function Structure:
150
151
152
+
input: raw event object from Flowcore
153
+
output: object or array of objects that match the projection table schema
154
+
155
+
***the function should only handle one table type output, if you need to project to multiple tables you can use the same function multiple times using a switch statement or if statements***
151
156
The function must return a single object or an array of objects, it can also return a promise that resolves to a single object or an array of objects.
152
157
153
158
<example js code>
@@ -180,7 +185,7 @@ server.tool(
180
185
tenant: z.string().describe("Tenant name"),
181
186
dataCore: z.string().describe("Name of the data core"),
182
187
flowTypeName: z.string().describe("Name of the flow type"),
183
-
eventTypeName: z.string().describe("Name of the event type"),
188
+
eventTypeNames: z.array(z.string()).describe("Name of the event types to project, can be multiple event types but only within the same flow type, this will maintain the ordering of the events"),
184
189
startDate: z.string().describe("Start date for event streaming"),
185
190
endDate: z.string().describe("End date for event streaming"),
186
191
projectorName: z.string().describe("Name of the projector to use for events"),
0 commit comments