Skip to content

Commit c3e016e

Browse files
authored
fix: relatedMembership prop added [DX-726]
1 parent da88b93 commit c3e016e

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

lib/entities/space-member.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
import { freezeSys, toPlainObject } from 'contentful-sdk-core'
22
import copy from 'fast-copy'
3-
import type { DefaultElements, MakeRequest, MetaLinkProps, MetaSysProps } from '../common-types'
3+
import type { DefaultElements, MakeRequest, SysLink, MetaSysProps } from '../common-types'
44
import { wrapCollection } from '../common-utils'
55

66
export type SpaceMemberProps = {
7-
sys: MetaSysProps
7+
sys: MetaSysProps & {
8+
user: SysLink
9+
relatedMemberships: SysLink[]
10+
}
811
/**
912
* User is an admin
1013
*/
1114
admin: boolean
1215
/**
1316
* Array of Role Links
1417
*/
15-
roles: { sys: MetaLinkProps }[]
18+
roles: SysLink[]
1619
}
1720

1821
export interface SpaceMember extends SpaceMemberProps, DefaultElements<SpaceMemberProps> {}

lib/entities/space-membership.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { wrapCollection } from '../common-utils'
55
import type { SysLink, MetaSysProps, DefaultElements, MakeRequest } from '../common-types'
66

77
export type SpaceMembershipProps = {
8-
sys: MetaSysProps & { space: SysLink; user: SysLink }
8+
sys: MetaSysProps & { space: SysLink; user: SysLink; relatedMemberships: SysLink[] }
99
user: SysLink
1010
admin: boolean
1111
roles: SysLink[]

0 commit comments

Comments
 (0)