@@ -84,9 +84,10 @@ type APIInterface interface {
84
84
TrackEvent (ctx context.Context , event * RemoteTrackMessage ) (err error )
85
85
GetSupportedWorkspaceClasses (ctx context.Context ) (res []* SupportedWorkspaceClass , err error )
86
86
87
- CreateTeam (ctx context.Context , params string ) (* Team , error )
88
- GetTeamMembers (ctx context.Context , params string ) ([]* TeamMemberInfo , error )
89
- JoinTeam (ctx context.Context , params string ) (* Team , error )
87
+ CreateTeam (ctx context.Context , teamName string ) (* Team , error )
88
+ GetTeamMembers (ctx context.Context , teamID string ) ([]* TeamMemberInfo , error )
89
+ JoinTeam (ctx context.Context , teamID string ) (* Team , error )
90
+ GetGenericInvite (ctx context.Context , teamID string ) (* TeamMembershipInvite , error )
90
91
91
92
InstanceUpdates (ctx context.Context , instanceID string ) (<- chan * WorkspaceInstance , error )
92
93
}
@@ -208,6 +209,15 @@ const (
208
209
// FunctionGetSupportedWorkspaceClasses is the name of the getSupportedWorkspaceClasses function
209
210
FunctionGetSupportedWorkspaceClasses FunctionName = "getSupportedWorkspaceClasses"
210
211
212
+ // FunctionCreateTeam is the name of the createTeam function
213
+ FunctionCreateTeam FunctionName = "createTeam"
214
+ // FunctionJoinTeam is the name of the joinTeam function
215
+ FunctionJoinTeam FunctionName = "joinTeam"
216
+ // FunctionGetTeamMembers is the name of the getTeamMembers function
217
+ FunctionGetTeamMembers FunctionName = "getTeamMembers"
218
+ // FunctionGetGenericInvite is the name of the getGenericInvite function
219
+ FunctionGetGenericInvite FunctionName = "getGenericInvite"
220
+
211
221
// FunctionOnInstanceUpdate is the name of the onInstanceUpdate callback function
212
222
FunctionOnInstanceUpdate = "onInstanceUpdate"
213
223
)
@@ -1392,7 +1402,7 @@ func (gp *APIoverJSONRPC) CreateTeam(ctx context.Context, teamName string) (res
1392
1402
return
1393
1403
}
1394
1404
_params := []interface {}{teamName }
1395
- err = gp .C .Call (ctx , "createTeam" , _params , & res )
1405
+ err = gp .C .Call (ctx , string ( FunctionCreateTeam ) , _params , & res )
1396
1406
return
1397
1407
}
1398
1408
@@ -1402,7 +1412,7 @@ func (gp *APIoverJSONRPC) GetTeamMembers(ctx context.Context, teamID string) (re
1402
1412
return
1403
1413
}
1404
1414
_params := []interface {}{teamID }
1405
- err = gp .C .Call (ctx , "getTeamMembers" , _params , & res )
1415
+ err = gp .C .Call (ctx , string ( FunctionGetTeamMembers ) , _params , & res )
1406
1416
return
1407
1417
}
1408
1418
@@ -1412,7 +1422,17 @@ func (gp *APIoverJSONRPC) JoinTeam(ctx context.Context, inviteID string) (res *T
1412
1422
return
1413
1423
}
1414
1424
_params := []interface {}{inviteID }
1415
- err = gp .C .Call (ctx , "joinTeam" , _params , & res )
1425
+ err = gp .C .Call (ctx , string (FunctionJoinTeam ), _params , & res )
1426
+ return
1427
+ }
1428
+
1429
+ func (gp * APIoverJSONRPC ) GetGenericInvite (ctx context.Context , teamID string ) (res * TeamMembershipInvite , err error ) {
1430
+ if gp == nil {
1431
+ err = errNotConnected
1432
+ return
1433
+ }
1434
+ _params := []interface {}{teamID }
1435
+ err = gp .C .Call (ctx , string (FunctionGetGenericInvite ), _params , & res )
1416
1436
return
1417
1437
}
1418
1438
@@ -2131,3 +2151,12 @@ type TeamMemberInfo struct {
2131
2151
Role TeamMemberRole `json:"role,omitempty"`
2132
2152
MemberSince string `json:"memberSince,omitempty"`
2133
2153
}
2154
+
2155
+ type TeamMembershipInvite struct {
2156
+ ID string `json:"id,omitempty"`
2157
+ TeamID string `json:"teamId,omitempty"`
2158
+ Role TeamMemberRole `json:"role,omitempty"`
2159
+ CreationTime string `json:"creationTime,omitempty"`
2160
+ InvalidationTime string `json:"invalidationTime,omitempty"`
2161
+ InvitedEmail string `json:"invitedEmail,omitempty"`
2162
+ }
0 commit comments