Skip to content

Commit

Permalink
Update tasks to array
Browse files Browse the repository at this point in the history
  • Loading branch information
LauraBeatris committed Feb 18, 2025
1 parent 34763e5 commit aa2c20a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions packages/clerk-js/src/core/resources/Session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import type {
SessionJSONSnapshot,
SessionResource,
SessionStatus,
SessionTasks,
SessionTask,
SessionVerificationJSON,
SessionVerificationResource,
SessionVerifyAttemptFirstFactorParams,
Expand Down Expand Up @@ -43,7 +43,7 @@ export class Session extends BaseResource implements SessionResource {
user!: UserResource | null;
publicUserData!: PublicUserData;
factorVerificationAge: [number, number] | null = null;
tasks!: SessionTasks | null;
tasks: Array<SessionTask> | null = null;
expireAt!: Date;
abandonAt!: Date;
createdAt!: Date;
Expand Down
6 changes: 3 additions & 3 deletions packages/types/src/json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import type { OrganizationCustomRoleKey, OrganizationPermissionKey } from './org
import type { OrganizationSettingsJSON } from './organizationSettings';
import type { OrganizationSuggestionStatus } from './organizationSuggestion';
import type { SamlIdpSlug } from './saml';
import type { SessionStatus, SessionTasks } from './session';
import type { SessionStatus, SessionTask } from './session';
import type { SessionVerificationLevel, SessionVerificationStatus } from './sessionVerification';
import type { SignInFirstFactor, SignInJSON, SignInSecondFactor } from './signIn';
import type { SignUpField, SignUpIdentificationField, SignUpStatus } from './signUp';
Expand Down Expand Up @@ -110,14 +110,14 @@ export interface SessionJSON extends ClerkResourceJSON {
* This API is experimental and may change at any moment.
* @experimental
*/
factor_verification_age: [fistFactorAge: number, secondFactorAge: number] | null;
factor_verification_age: [firstFactorAge: number, secondFactorAge: number] | null;
expire_at: number;
abandon_at: number;
last_active_at: number;
last_active_token: TokenJSON;
last_active_organization_id: string | null;
actor: ActJWTClaim | null;
tasks: SessionTasks | null;
tasks: Array<SessionTask> | null;
user: UserJSON;
public_user_data: PublicUserDataJSON;
created_at: number;
Expand Down
6 changes: 3 additions & 3 deletions packages/types/src/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export interface SessionResource extends ClerkResource {
lastActiveOrganizationId: string | null;
lastActiveAt: Date;
actor: ActJWTClaim | null;
tasks: SessionTasks | null;
tasks: Array<SessionTask> | null;
user: UserResource | null;
publicUserData: PublicUserData;
end: () => Promise<SessionResource>;
Expand Down Expand Up @@ -170,8 +170,8 @@ export interface PublicUserData {
userId?: string;
}

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

export type GetTokenOptions = {
Expand Down

0 comments on commit aa2c20a

Please sign in to comment.