MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / userWrite

Function userWrite

apps/cloud/src/auth/workos-events-replay.ts:339–343  ·  view source on GitHub ↗
(data: WorkOsUserPayload)

Source from the content-addressed store, hash-verified

337 profiled: PlannedProfiles = new Set(),
338): Effect.Effect<WorkOsMirrorWrite, E> => {
339 const userWrite = (data: WorkOsUserPayload) =>
340 Effect.sync(() => {
341 profiled.add(data.id);
342 return WorkOsMirrorWrite.UpsertUser({ user: mirrorUserFromWorkOs(data) });
343 });
344 return Match.value(event).pipe(
345 Match.discriminatorsExhaustive("event")({
346 "user.created": ({ data }) => userWrite(data),

Callers 1

planWorkOsEventFunction · 0.85

Calls 2

mirrorUserFromWorkOsFunction · 0.90
syncMethod · 0.65

Tested by

no test coverage detected