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

Function toUser

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

Source from the content-addressed store, hash-verified

158 * reports absent identity beside otherwise complete row data.
159 */
160const toUser = (subject: AdminSubject, identities: ReadonlyMap<string, AdminUserIdentity>) => {
161 const identity = identities.get(subject.externalId) ?? ABSENT_IDENTITY;
162 return {
163 externalId: subject.externalId,
164 createdAt: subject.createdAt.getTime(),
165 lastSeenAt: subject.lastSeenAt,
166 status: subject.status,
167 email: identity.email,
168 displayName: identity.displayName,
169 };
170};
171
172/**
173 * 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