@@ -5,11 +5,15 @@ import {
55 TCancelConnectionSessionParams ,
66 TConnectionSessionResult ,
77 TCreateConnectionSessionResult ,
8+ TCreateReconnectionSessionParams ,
9+ TCreateReconnectionSessionResult ,
810 TDisconnectParams ,
911 TGetConnectionSessionParams ,
1012 TLinkedApiErrorType ,
1113 TRegenerateTokenParams ,
1214 TRegenerateTokenResult ,
15+ TReparseAccountInfoParams ,
16+ TReparseAccountInfoResult ,
1317} from '../types' ;
1418
1519export class AdminAccounts {
@@ -37,6 +41,22 @@ export class AdminAccounts {
3741 ) ;
3842 }
3943
44+ public async reparseAccountInfo (
45+ params : TReparseAccountInfoParams ,
46+ ) : Promise < TReparseAccountInfoResult > {
47+ const response = await this . httpClient . post < TReparseAccountInfoResult > (
48+ '/admin/accounts.reparseAccountInfo' ,
49+ params ,
50+ ) ;
51+ if ( response . success && response . result ) {
52+ return response . result ;
53+ }
54+ throw new LinkedApiError (
55+ ( response . error ?. type ?? 'httpError' ) as TLinkedApiErrorType ,
56+ response . error ?. message ?? 'Failed to reparse account info' ,
57+ ) ;
58+ }
59+
4060 public async regenerateIdentificationToken (
4161 params : TRegenerateTokenParams ,
4262 ) : Promise < TRegenerateTokenResult > {
@@ -66,6 +86,22 @@ export class AdminAccounts {
6686 ) ;
6787 }
6888
89+ public async createReconnectionSession (
90+ params : TCreateReconnectionSessionParams ,
91+ ) : Promise < TCreateReconnectionSessionResult > {
92+ const response = await this . httpClient . post < TCreateReconnectionSessionResult > (
93+ '/admin/accounts.createReconnectionSession' ,
94+ params ,
95+ ) ;
96+ if ( response . success && response . result ) {
97+ return response . result ;
98+ }
99+ throw new LinkedApiError (
100+ ( response . error ?. type ?? 'httpError' ) as TLinkedApiErrorType ,
101+ response . error ?. message ?? 'Failed to create reconnection session' ,
102+ ) ;
103+ }
104+
69105 public async getConnectionSession (
70106 params : TGetConnectionSessionParams ,
71107 ) : Promise < TConnectionSessionResult > {
0 commit comments