Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(clerk-js,types): Initialize tasks on Session resource #5170

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

LauraBeatris
Copy link
Member

@LauraBeatris LauraBeatris commented Feb 14, 2025

Description

Adds the tasks property on the session client resource to be leveraged/accessed for displaying in AIO components

Object.keys(session.tasks).map(task => (
   <Route path={task}>
       <Task task={task}  />
   </Route>
)

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

@LauraBeatris LauraBeatris self-assigned this Feb 14, 2025
Copy link

changeset-bot bot commented Feb 14, 2025

🦋 Changeset detected

Latest commit: fa71eec

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 23 packages
Name Type
@clerk/clerk-js Patch
@clerk/types Patch
@clerk/chrome-extension Patch
@clerk/clerk-expo Patch
@clerk/agent-toolkit Patch
@clerk/astro Patch
@clerk/backend Patch
@clerk/elements Patch
@clerk/expo-passkeys Patch
@clerk/express Patch
@clerk/fastify Patch
@clerk/localizations Patch
@clerk/nextjs Patch
@clerk/nuxt Patch
@clerk/react-router Patch
@clerk/clerk-react Patch
@clerk/remix Patch
@clerk/shared Patch
@clerk/tanstack-start Patch
@clerk/testing Patch
@clerk/themes Patch
@clerk/ui Patch
@clerk/vue Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Feb 14, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
clerk-js-sandbox ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 14, 2025 11:41pm

@LauraBeatris LauraBeatris force-pushed the introduce-session-tasks-types branch from 613811f to 465496a Compare February 14, 2025 20:02
@LauraBeatris LauraBeatris changed the title [wip] chore(clerk-js,types): Add tasks on Session resource chore(clerk-js,types): Add tasks on Session resource Feb 14, 2025
@LauraBeatris LauraBeatris changed the title chore(clerk-js,types): Add tasks on Session resource chore(clerk-js,types): Initialize tasks on Session resource Feb 14, 2025
@LauraBeatris LauraBeatris marked this pull request as ready for review February 14, 2025 20:12
@LauraBeatris LauraBeatris force-pushed the introduce-session-tasks-types branch from 4809110 to f559c3e Compare February 14, 2025 20:15
@LauraBeatris LauraBeatris force-pushed the introduce-session-tasks-types branch from f559c3e to b9b5431 Compare February 14, 2025 20:16
@LauraBeatris LauraBeatris force-pushed the introduce-session-tasks-types branch from b9b5431 to 1882e49 Compare February 14, 2025 20:18
@@ -169,6 +170,10 @@ export interface PublicUserData {
userId?: string;
}

export interface SessionTasks {
orgs: Record<string, unknown>;
Copy link
Member Author

@LauraBeatris LauraBeatris Feb 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now, FAPI is returning an empty object by purpose (https://github.com/clerk/clerk_go/pull/9639) as we're developing incrementally, but it might include some additional metadata about the task in the future and I'll update it by then

The purpose of including it now is to unblock next PRs

@@ -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]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* [fistFactorAge, secondFactorAge]
* [firstFactorAge, secondFactorAge]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants