@@ -514,6 +514,11 @@ class Vehicle extends BaseModel {
514514 name : "equipment" ,
515515 type : "array" ,
516516 modelType : "equipment"
517+ } ,
518+ {
519+ name : "team" ,
520+ type : "single" ,
521+ modelType : "teams"
517522 }
518523 ] ;
519524 constructor ( data ) {
@@ -1506,15 +1511,13 @@ class BaseService extends RequestBuilder {
15061511 } ;
15071512 }
15081513 async create ( model , params ) {
1509- if ( params ) {
1510- }
1514+ if ( params ) { }
15111515 const jsonApiSerializer = new JsonApiSerializer ( this . hydrator . getModelMap ( ) ) ;
15121516 const payload = jsonApiSerializer . buildCreatePayload ( model ) ;
15131517 return await this . client . makePostRequest ( this . endpoint , payload ) ;
15141518 }
15151519 async update ( id , model , params ) {
1516- if ( params ) {
1517- }
1520+ if ( params ) { }
15181521 const jsonApiSerializer = new JsonApiSerializer ( this . hydrator . getModelMap ( ) ) ;
15191522 const payload = jsonApiSerializer . buildUpdatePayload ( model ) ;
15201523 return await this . client . makePatchRequest ( `${ this . endpoint } /${ id } ` , payload ) ;
@@ -1696,6 +1699,11 @@ class VehiclesService extends BaseService {
16961699 const payload = jsonApiSerializer . buildRelationshipPayload ( new User , user ) ;
16971700 return await this . client . makePatchRequest ( `${ this . endpoint } /relationships/assignee` , payload ) ;
16981701 }
1702+ async patchTeam ( team ) {
1703+ const jsonApiSerializer = new JsonApiSerializer ( this . hydrator . getModelMap ( ) ) ;
1704+ const payload = jsonApiSerializer . buildRelationshipPayload ( new Team , team ) ;
1705+ return await this . client . makePatchRequest ( `${ this . endpoint } /relationships/team` , payload ) ;
1706+ }
16991707}
17001708
17011709// src/services/EquipmentService.ts
@@ -2172,9 +2180,6 @@ class ClientConfig {
21722180}
21732181// src/models/Organisation.ts
21742182class Organisation extends BaseModel {
2175- constructor ( ) {
2176- super ( ...arguments ) ;
2177- }
21782183 type = "organisations" ;
21792184 static relationships = [ ] ;
21802185}
0 commit comments