8
8
ResourcePage
9
9
} from './core'
10
10
import { AccountMemberBase } from './account-members'
11
+ import { AccountBase } from "./accounts" ;
11
12
12
13
/**
13
14
* The Account Membership object Interface
@@ -30,6 +31,24 @@ export interface AccountMembership extends Identifiable {
30
31
}
31
32
}
32
33
34
+ export interface AccountMembershipOnAccountMember extends Identifiable {
35
+ type : string
36
+ meta : {
37
+ timestamps : {
38
+ created_at : string
39
+ updated_at : string
40
+ }
41
+ }
42
+ relationships : {
43
+ account : {
44
+ data : {
45
+ id : string
46
+ type : string
47
+ }
48
+ }
49
+ }
50
+ }
51
+
33
52
export interface AccountMembershipCreateBody {
34
53
type : string
35
54
account_member_id : string
@@ -38,14 +57,20 @@ export interface AccountMembershipCreateBody {
38
57
export interface AccountMembershipsIncluded {
39
58
account_members : AccountMemberBase [ ]
40
59
}
60
+ export interface AccountMembershipsIncludedAccounts {
61
+ accounts : AccountBase [ ]
62
+ }
41
63
42
64
export type AccountMembershipsInclude = 'account_members'
65
+ export type AccountMembershipsIncludeAccounts = 'accounts'
43
66
44
67
export type AccountMembershipsResponse = ResourcePage <
45
68
AccountMembership ,
46
69
AccountMembershipsIncluded
47
70
>
48
71
72
+ export type AccountMembershipsOnAccountMember = ResourcePage < AccountMembershipOnAccountMember , AccountMembershipsIncludedAccounts >
73
+
49
74
/**
50
75
* filter for account memberships
51
76
*/
@@ -122,4 +147,11 @@ export interface AccountMembershipsEndpoint
122
147
* @param filter the filter object
123
148
*/
124
149
Filter ( filter : AccountMembershipsFilter ) : AccountMembershipsEndpoint
150
+
151
+ /**
152
+ * Get all Account Memberships for an account members
153
+ * @param accountMemberId
154
+ * @param token
155
+ */
156
+ AllOnAccountMember ( accountMemberId : string , token : null ) : Promise < AccountMembershipsOnAccountMember >
125
157
}
0 commit comments