@@ -1626,8 +1626,14 @@ class ServiceAccountKeysService extends BaseService {
16261626
16271627// src/services/GroupService.ts
16281628class GroupsService extends BaseService {
1629- constructor ( client ) {
1630- super ( client , "/v3/orgs/:orgId/iam/groups" ) ;
1629+ constructor ( client , groupId ) {
1630+ const endpoint = groupId ? `/v3/orgs/:orgId/iam/groups/${ groupId } ` : `/v3/orgs/:orgId/iam/groups` ;
1631+ super ( client , endpoint ) ;
1632+ }
1633+ async patchMembers ( users ) {
1634+ const jsonApiSerializer = new JsonApiSerializer ( this . hydrator . getModelMap ( ) ) ;
1635+ const payload = jsonApiSerializer . buildRelationshipPayload ( new User , users ) ;
1636+ return await this . client . makePatchRequest ( `${ this . endpoint } /relationships/members` , payload ) ;
16311637 }
16321638}
16331639
@@ -1955,8 +1961,8 @@ class Client {
19551961 permissions ( ) {
19561962 return new PermissionsService ( this ) ;
19571963 }
1958- groups ( ) {
1959- return new GroupsService ( this ) ;
1964+ groups ( groupId ) {
1965+ return new GroupsService ( this , groupId ) ;
19601966 }
19611967 vehicles ( ) {
19621968 return new VehiclesService ( this ) ;
@@ -2116,9 +2122,6 @@ class ClientConfig {
21162122}
21172123// src/models/Organisation.ts
21182124class Organisation extends BaseModel {
2119- constructor ( ) {
2120- super ( ...arguments ) ;
2121- }
21222125 type = "organisations" ;
21232126 static relationships = [ ] ;
21242127}
0 commit comments