@@ -27,7 +27,7 @@ export class Client extends BaseResource implements ClientResource {
2727 cookieExpiresAt : Date | null = null ;
2828 /** Last authentication strategy used by this client; `null` when unknown/disabled. */
2929 lastAuthenticationStrategy : LastAuthenticationStrategy | null = null ;
30- clientTrustState : ClientTrustState | null = null ;
30+ clientTrustState ? : ClientTrustState | undefined = undefined ;
3131 createdAt : Date | null = null ;
3232 updatedAt : Date | null = null ;
3333
@@ -88,7 +88,7 @@ export class Client extends BaseResource implements ClientResource {
8888 this . signIn = new SignIn ( null ) ;
8989 this . lastActiveSessionId = null ;
9090 this . lastAuthenticationStrategy = null ;
91- this . clientTrustState = null ;
91+ this . clientTrustState = undefined ;
9292 this . cookieExpiresAt = null ;
9393 this . createdAt = null ;
9494 this . updatedAt = null ;
@@ -138,7 +138,7 @@ export class Client extends BaseResource implements ClientResource {
138138 this . captchaBypass = data . captcha_bypass || false ;
139139 this . cookieExpiresAt = data . cookie_expires_at ? unixEpochToDate ( data . cookie_expires_at ) : null ;
140140 this . lastAuthenticationStrategy = data . last_authentication_strategy || null ;
141- this . clientTrustState = data . client_trust_state || null ;
141+ this . clientTrustState = data . client_trust_state ;
142142 this . createdAt = unixEpochToDate ( data . created_at || undefined ) ;
143143 this . updatedAt = unixEpochToDate ( data . updated_at || undefined ) ;
144144 }
@@ -157,7 +157,7 @@ export class Client extends BaseResource implements ClientResource {
157157 captcha_bypass : this . captchaBypass ,
158158 cookie_expires_at : this . cookieExpiresAt ? this . cookieExpiresAt . getTime ( ) : null ,
159159 last_authentication_strategy : this . lastAuthenticationStrategy ?? null ,
160- client_trust_state : this . clientTrustState ?? null ,
160+ ... ( this . clientTrustState && { client_trust_state : this . clientTrustState } ) ,
161161 created_at : this . createdAt ?. getTime ( ) ?? null ,
162162 updated_at : this . updatedAt ?. getTime ( ) ?? null ,
163163 } ;
0 commit comments