import { freezeSys , toPlainObject } from 'contentful-sdk-core' ; import copy from 'fast-copy' ; import { DefaultElements , MakeRequest , MetaLinkProps , MetaSysProps } from '../common-types' ; import { wrapCollection } from '../common-utils' ; export type SpaceMemberProps = { sys : MetaSysProps ; /**
     * User is an admin
     */ admin : boolean ; /**
     * Array of Role Links
     */ roles : { sys : MetaLinkProps ; } [ ] ; } ; export interface SpaceMember extends SpaceMemberProps , DefaultElements < SpaceMemberProps > { } private param makeRequest param data return export function wrapSpaceMember ( _makeRequest , data ) { const spaceMember = toPlainObject ( copy ( data ) ) ; return freezeSys ( spaceMember ) ; } private export const wrapSpaceMemberCollection = wrapCollection ( wrapSpaceMember ) ;