Skip to content

Commit

Permalink
Add changeset
Browse files Browse the repository at this point in the history
  • Loading branch information
LauraBeatris committed Feb 14, 2025
1 parent 465496a commit 1882e49
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
6 changes: 6 additions & 0 deletions .changeset/plenty-peas-pretend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@clerk/clerk-js': patch
'@clerk/types': patch
---

Initialize `tasks` on `Session` resource
1 change: 0 additions & 1 deletion packages/types/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,3 @@ export * from './customMenuItems';
export * from './samlConnection';
export * from './waitlist';
export * from './snapshots';
export * from './tasks';
3 changes: 1 addition & 2 deletions packages/types/src/json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@ import type { OrganizationCustomRoleKey, OrganizationPermissionKey } from './org
import type { OrganizationSettingsJSON } from './organizationSettings';
import type { OrganizationSuggestionStatus } from './organizationSuggestion';
import type { SamlIdpSlug } from './saml';
import type { SessionStatus } from './session';
import type { SessionStatus, SessionTasks } from './session';
import type { SessionVerificationLevel, SessionVerificationStatus } from './sessionVerification';
import type { SignInFirstFactor, SignInJSON, SignInSecondFactor } from './signIn';
import type { SignUpField, SignUpIdentificationField, SignUpStatus } from './signUp';
import type { SessionTasks } from './tasks';
import type { BoxShadow, Color, EmUnit, FontWeight, HexColor } from './theme';
import type { UserSettingsJSON } from './userSettings';
import type { CamelToSnake } from './utils';
Expand Down
7 changes: 6 additions & 1 deletion packages/types/src/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,12 @@ export interface SessionResource extends ClerkResource {
* Each item represents the minutes that have passed since the last time a first or second factor were verified.
* [fistFactorAge, secondFactorAge]
*/
factorVerificationAge: [fistFactorAge: number, secondFactorAge: number] | null;
factorVerificationAge: [firstFactorAge: number, secondFactorAge: number] | null;
lastActiveToken: TokenResource | null;
lastActiveOrganizationId: string | null;
lastActiveAt: Date;
actor: ActJWTClaim | null;
tasks: SessionTasks | null;
user: UserResource | null;
publicUserData: PublicUserData;
end: () => Promise<SessionResource>;
Expand Down Expand Up @@ -169,6 +170,10 @@ export interface PublicUserData {
userId?: string;
}

export interface SessionTasks {
orgs: Record<string, unknown>;
}

export type GetTokenOptions = {
template?: string;
organizationId?: string;
Expand Down
3 changes: 0 additions & 3 deletions packages/types/src/tasks.ts

This file was deleted.

0 comments on commit 1882e49

Please sign in to comment.