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

Function stubDirectory

apps/cloud/src/org/handlers.test.ts:174–183  ·  view source on GitHub ↗
(role: "admin" | "member")

Source from the content-addressed store, hash-verified

172
173const unread = (why: string) => () => Effect.die(why);
174const stubDirectory = (role: "admin" | "member") =>
175 Layer.succeed(MemberDirectory)({
176 membership: (accountId, organizationId) =>
177 Effect.succeed(accountId === CALLER && organizationId === ORG ? callerRow(role) : null),
178 membershipById: unread("the org plane does not look up by membership id"),
179 membershipsOf: unread("the org plane reads one membership, not the list"),
180 members: unread("the org plane does not list members"),
181 membersById: unread("the org plane does not batch members"),
182 findByEmail: unread("the org plane does not resolve emails"),
183 });
184
185const organizationRow = (id: string) => ({
186 id,

Callers 1

orgAppFunction · 0.70

Calls 2

callerRowFunction · 0.85
unreadFunction · 0.85

Tested by

no test coverage detected