MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / insertEvent

Function insertEvent

packages/db/src/services/insights/store.ts:179–203  ·  view source on GitHub ↗
({
    projectId,
    insightId,
    moduleKey,
    dimensionKey,
    windowKind,
    eventKind,
    changeFrom,
    changeTo,
    now,
  })

Source from the content-addressed store, hash-verified

177 },
178
179 async insertEvent({
180 projectId,
181 insightId,
182 moduleKey,
183 dimensionKey,
184 windowKind,
185 eventKind,
186 changeFrom,
187 changeTo,
188 now,
189 }): Promise<void> {
190 await db.insightEvent.create({
191 data: {
192 insightId,
193 eventKind,
194 changeFrom: changeFrom
195 ? (changeFrom as Prisma.InputJsonValue)
196 : Prisma.DbNull,
197 changeTo: changeTo
198 ? (changeTo as Prisma.InputJsonValue)
199 : Prisma.DbNull,
200 createdAt: now,
201 },
202 });
203 },
204
205 async closeMissingActiveInsights({
206 projectId,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected