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

Function toUser

packages/core/api/src/admin/reads.ts:176–186  ·  view source on GitHub ↗
(subject: AdminSubject, identities: ReadonlyMap<string, AdminUserIdentity>)

Source from the content-addressed store, hash-verified

174 * reports absent identity beside otherwise complete row data.
175 */
176const toUser = (subject: AdminSubject, identities: ReadonlyMap<string, AdminUserIdentity>) => {
177 const identity = identities.get(subject.externalId) ?? ABSENT_IDENTITY;
178 return {
179 externalId: subject.externalId,
180 createdAt: subject.createdAt.getTime(),
181 lastSeenAt: subject.lastSeenAt,
182 status: subject.status,
183 email: identity.email,
184 displayName: identity.displayName,
185 };
186};
187
188/**
189 * The stored health verdict → the admin plane's `AdminConnectionHealth`.

Callers 2

toUserWithConnectionsFunction · 0.85
listUsersFunction · 0.85

Calls 1

getMethod · 0.65

Tested by

no test coverage detected