diff --git a/shareable/types/documents/user.ts b/shareable/types/documents/user.ts index 272a6f178..5275cf973 100644 --- a/shareable/types/documents/user.ts +++ b/shareable/types/documents/user.ts @@ -152,10 +152,19 @@ export type DeserializedUnreachableEmployeesResource = DeserializedResource< DeserializedUnreachableEmployeesAttributes > -export type DeserializedUserResource = +export type DeserializedUserResource< + T extends UserRelationshipNames|undefined = undefined +> = ( | DeserializedStudentResource | DeserializedReachableEmployeesResource | DeserializedUnreachableEmployeesResource +) & PartialOrPickDeserializedRelationship< + UserRelationshipData<"read">, + DeserializedUserRelationships<"read">, + UserRelationshipNames, + T extends UserRelationshipNames ? true : false, + T extends UserRelationshipNames ? T : UserRelationshipNames +> export type UserDocument = ResourceDocument< T, @@ -176,13 +185,7 @@ export type DeserializedUserDocument< > = DeserializedResourceDocument< UserResourceIdentifier<"read">, DeserializedUserAttributes, - DeserializedUserResource -> & PartialOrPickDeserializedRelationship< - UserRelationshipData<"read">, - DeserializedUserRelationships<"read">, - UserRelationshipNames, - T extends UserRelationshipNames ? true : false, - T extends UserRelationshipNames ? T : UserRelationshipNames + DeserializedUserResource > export type DeserializedUserListDocument< @@ -190,13 +193,7 @@ export type DeserializedUserListDocument< > = DeserializedResourceListDocument< UserResourceIdentifier<"read">, DeserializedUserAttributes, - DeserializedUserResource -> & PartialOrPickDeserializedRelationship< - UserRelationshipData<"read">, - DeserializedUserRelationships<"read">, - UserRelationshipNames, - T extends UserRelationshipNames ? true : false, - T extends UserRelationshipNames ? T : UserRelationshipNames + DeserializedUserResource > interface GeneralUserProfileMetaProperties extends Serializable {