(params: {
orgEntity: Entity<Organization>;
})
| 52 | import type { VerifiableIdentityAddress } from "@ory/client"; |
| 53 | |
| 54 | export const constructMinimalOrg = (params: { |
| 55 | orgEntity: Entity<Organization>; |
| 56 | }): MinimalOrg => { |
| 57 | const { orgEntity } = params; |
| 58 | |
| 59 | const { organizationName, pinnedEntityTypeBaseUrl, ...simpleProperties } = |
| 60 | simplifyProperties(orgEntity.properties); |
| 61 | |
| 62 | return { |
| 63 | kind: "org", |
| 64 | entity: orgEntity, |
| 65 | webId: extractWebIdFromEntityId(orgEntity.metadata.recordId.entityId), |
| 66 | name: organizationName, |
| 67 | ...(pinnedEntityTypeBaseUrl !== undefined |
| 68 | ? { |
| 69 | pinnedEntityTypeBaseUrls: pinnedEntityTypeBaseUrl as BaseUrl[], |
| 70 | } |
| 71 | : {}), |
| 72 | ...simpleProperties, |
| 73 | }; |
| 74 | }; |
| 75 | |
| 76 | export type MinimalUser = { |
| 77 | kind: "user"; |
no test coverage detected