@@ -13,6 +13,9 @@ import type {
1313 AddGroupMemberRequest ,
1414 AddGroupMembersRequest ,
1515 Application ,
16+ Connection ,
17+ ConnectionConnectedOrganization ,
18+ ConnectionConnectedUser ,
1619 CreateAPIKeyRequest ,
1720 CreateApplicationRequest ,
1821 CreateGroupRequest ,
@@ -23,9 +26,6 @@ import type {
2326 CreateUserRequestMember ,
2427 EncodedJWT ,
2528 GetUserConnectionsResponse ,
26- GetUserConnectionsResponseConnection ,
27- GetUserConnectionsResponseConnectionConnectedOrganization ,
28- GetUserConnectionsResponseConnectionConnectedUser ,
2929 GracePeriod ,
3030 Group ,
3131 JWT ,
@@ -300,57 +300,51 @@ export const unmarshalEncodedJWT = (data: unknown): EncodedJWT => {
300300 } as EncodedJWT
301301}
302302
303- const unmarshalGetUserConnectionsResponseConnectionConnectedOrganization = (
303+ const unmarshalConnectionConnectedOrganization = (
304304 data : unknown ,
305- ) : GetUserConnectionsResponseConnectionConnectedOrganization => {
305+ ) : ConnectionConnectedOrganization => {
306306 if ( ! isJSONObject ( data ) ) {
307307 throw new TypeError (
308- `Unmarshalling the type 'GetUserConnectionsResponseConnectionConnectedOrganization ' failed as data isn't a dictionary.` ,
308+ `Unmarshalling the type 'ConnectionConnectedOrganization ' failed as data isn't a dictionary.` ,
309309 )
310310 }
311311
312312 return {
313313 id : data . id ,
314314 locked : data . locked ,
315315 name : data . name ,
316- } as GetUserConnectionsResponseConnectionConnectedOrganization
316+ } as ConnectionConnectedOrganization
317317}
318318
319- const unmarshalGetUserConnectionsResponseConnectionConnectedUser = (
319+ const unmarshalConnectionConnectedUser = (
320320 data : unknown ,
321- ) : GetUserConnectionsResponseConnectionConnectedUser => {
321+ ) : ConnectionConnectedUser => {
322322 if ( ! isJSONObject ( data ) ) {
323323 throw new TypeError (
324- `Unmarshalling the type 'GetUserConnectionsResponseConnectionConnectedUser ' failed as data isn't a dictionary.` ,
324+ `Unmarshalling the type 'ConnectionConnectedUser ' failed as data isn't a dictionary.` ,
325325 )
326326 }
327327
328328 return {
329329 id : data . id ,
330330 type : data . type ,
331331 username : data . username ,
332- } as GetUserConnectionsResponseConnectionConnectedUser
332+ } as ConnectionConnectedUser
333333}
334334
335- const unmarshalGetUserConnectionsResponseConnection = (
336- data : unknown ,
337- ) : GetUserConnectionsResponseConnection => {
335+ const unmarshalConnection = ( data : unknown ) : Connection => {
338336 if ( ! isJSONObject ( data ) ) {
339337 throw new TypeError (
340- `Unmarshalling the type 'GetUserConnectionsResponseConnection ' failed as data isn't a dictionary.` ,
338+ `Unmarshalling the type 'Connection ' failed as data isn't a dictionary.` ,
341339 )
342340 }
343341
344342 return {
345343 organization : data . organization
346- ? unmarshalGetUserConnectionsResponseConnectionConnectedOrganization (
347- data . organization ,
348- )
349- : undefined ,
350- user : data . user
351- ? unmarshalGetUserConnectionsResponseConnectionConnectedUser ( data . user )
344+ ? unmarshalConnectionConnectedOrganization ( data . organization )
352345 : undefined ,
353- } as GetUserConnectionsResponseConnection
346+ user : data . user ? unmarshalConnectionConnectedUser ( data . user ) : undefined ,
347+ } as Connection
354348}
355349
356350export const unmarshalGetUserConnectionsResponse = (
@@ -363,10 +357,7 @@ export const unmarshalGetUserConnectionsResponse = (
363357 }
364358
365359 return {
366- connections : unmarshalArrayOfObject (
367- data . connections ,
368- unmarshalGetUserConnectionsResponseConnection ,
369- ) ,
360+ connections : unmarshalArrayOfObject ( data . connections , unmarshalConnection ) ,
370361 } as GetUserConnectionsResponse
371362}
372363
0 commit comments