File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed
clerk-js/src/core/resources Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ export class EnterpriseAccount extends BaseResource implements EnterpriseAccount
2424 publicMetadata = { } ;
2525 verification : VerificationResource | null = null ;
2626 enterpriseConnection : EnterpriseAccountConnectionResource | null = null ;
27+ lastAuthenticatedAt : Date | null = null ;
2728
2829 public constructor ( data : Partial < EnterpriseAccountJSON | EnterpriseAccountJSONSnapshot > , pathRoot : string ) ;
2930 public constructor ( data : EnterpriseAccountJSON | EnterpriseAccountJSONSnapshot , pathRoot : string ) {
@@ -46,7 +47,7 @@ export class EnterpriseAccount extends BaseResource implements EnterpriseAccount
4647 this . firstName = data . first_name ;
4748 this . lastName = data . last_name ;
4849 this . publicMetadata = data . public_metadata ;
49-
50+ this . lastAuthenticatedAt = data . last_authenticated_at ? unixEpochToDate ( data . last_authenticated_at ) : null ;
5051 if ( data . verification ) {
5152 this . verification = new Verification ( data . verification ) ;
5253 }
@@ -72,6 +73,7 @@ export class EnterpriseAccount extends BaseResource implements EnterpriseAccount
7273 public_metadata : this . publicMetadata ,
7374 verification : this . verification ?. __internal_toSnapshot ( ) || null ,
7475 enterprise_connection : this . enterpriseConnection ?. __internal_toSnapshot ( ) || null ,
76+ last_authenticated_at : this . lastAuthenticatedAt ? this . lastAuthenticatedAt . getTime ( ) : null ,
7577 } ;
7678 }
7779}
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ export class SamlAccount extends BaseResource implements SamlAccountResource {
2323 lastName = '' ;
2424 verification : VerificationResource | null = null ;
2525 samlConnection : SamlAccountConnectionResource | null = null ;
26+ lastAuthenticatedAt : Date | null = null ;
2627
2728 public constructor ( data : Partial < SamlAccountJSON | SamlAccountJSONSnapshot > , pathRoot : string ) ;
2829 public constructor ( data : SamlAccountJSON | SamlAccountJSONSnapshot , pathRoot : string ) {
@@ -52,6 +53,8 @@ export class SamlAccount extends BaseResource implements SamlAccountResource {
5253 this . samlConnection = new SamlAccountConnection ( data . saml_connection ) ;
5354 }
5455
56+ this . lastAuthenticatedAt = data . last_authenticated_at ? unixEpochToDate ( data . last_authenticated_at ) : null ;
57+
5558 return this ;
5659 }
5760
@@ -67,6 +70,7 @@ export class SamlAccount extends BaseResource implements SamlAccountResource {
6770 last_name : this . lastName ,
6871 verification : this . verification ?. __internal_toSnapshot ( ) || null ,
6972 saml_connection : this . samlConnection ?. __internal_toSnapshot ( ) ,
73+ last_authenticated_at : this . lastAuthenticatedAt ? this . lastAuthenticatedAt . getTime ( ) : null ,
7074 } ;
7175 }
7276}
Original file line number Diff line number Diff line change @@ -252,6 +252,7 @@ export interface EnterpriseAccountJSON extends ClerkResourceJSON {
252252 provider_user_id : string | null ;
253253 public_metadata : Record < string , unknown > ;
254254 verification : VerificationJSON | null ;
255+ last_authenticated_at : number | null ;
255256}
256257
257258export interface EnterpriseAccountConnectionJSON extends ClerkResourceJSON {
@@ -279,6 +280,7 @@ export interface SamlAccountJSON extends ClerkResourceJSON {
279280 last_name : string ;
280281 verification ?: VerificationJSON ;
281282 saml_connection ?: SamlAccountConnectionJSON ;
283+ last_authenticated_at : number | null ;
282284}
283285
284286export interface UserJSON extends ClerkResourceJSON {
You can’t perform that action at this time.
0 commit comments