Skip to content

feat(shared): add internal directory sync react-query hooks - #9591

Open
kalafut wants to merge 1 commit into
jim/dir-sync-1-resourcefrom
jim/dir-sync-2-hooks
Open

feat(shared): add internal directory sync react-query hooks#9591
kalafut wants to merge 1 commit into
jim/dir-sync-1-resourcefrom
jim/dir-sync-2-hooks

Conversation

@kalafut

@kalafut kalafut commented Aug 27, 2026

Copy link
Copy Markdown

Description

Part 2 of 5 of the self-serve Directory Sync stack. Stacked on jim/dir-sync-1-resource; the changeset lands in the final PR and the stack will be squashed on merge.

Adds the internal react-query hooks __internal_use组织DirectorySync and __internal_use组织DirectorySyncUsers. The users hook polls continuously while enabled so the wizard's test step doubles as a recent-activity feed.

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
  • 🌟 新建 feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

🤖 Generated with Claude Code

https://claude.ai/code/session_01RYZSEgDLvdeKhFgnxFzPeP

@changeset-bot

changeset-bot Bot commented Aug 27, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 2291ba0

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@vercel

vercel Bot commented Aug 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment 操作 Updated (UTC)
clerk-js-sandbox Ready Ready Preview Aug 28, 2026 10:47pm
swingset Ready Ready Preview Aug 28, 2026 10:47pm

Request Review

@kalafut kalafut changed the title feat(self-serve-ds): add internal Directory Sync react-query hooks feat(shared): add internal directory sync react-query hooks Aug 27, 2026
__internal_use组织DirectorySync and
__internal_use组织DirectorySyncUsers; the users hook polls
continuously while enabled so the test step can double as a
recent-activity feed.
@pkg-pr-new

pkg-pr-new Bot commented Aug 28, 2026

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@9591

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@9591

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@9591

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@9591

@clerk/electron

npm i https://pkg.pr.new/@clerk/electron@9591

@clerk/electron-passkeys

npm i https://pkg.pr.new/@clerk/electron-passkeys@9591

@clerk/eslint-plugin

npm i https://pkg.pr.new/@clerk/eslint-plugin@9591

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@9591

@clerk/expo-google-signin

npm i https://pkg.pr.new/@clerk/expo-google-signin@9591

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@9591

@clerk/express

npm i https://pkg.pr.new/@clerk/express@9591

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@9591

@clerk/hono

npm i https://pkg.pr.new/@clerk/hono@9591

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@9591

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@9591

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@9591

@clerk/react

npm i https://pkg.pr.new/@clerk/react@9591

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@9591

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@9591

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@9591

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@9591

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@9591

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@9591

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@9591

commit: 2291ba0

@github-actions

Copy link
Copy Markdown
Contributor

API Changes Report

Generated by Break Check on 2026-08-28T22:50:40.810Z

Summary

Metric Count
包 analyzed 19
包 with changes 1
🔴 Breaking changes 0
🟡 Non-breaking changes 0
🟢 Additions 4

@clerk/shared

Current version: 4.30.2
Recommended bump: MINOR → 4.31.0

Subpath ./react

🟢 Additions (4)

Added: Use组织DirectorySyncParams
+ type Use组织DirectorySyncParams = {
+   enterpriseConnectionId: string | null;
+   enabled?: boolean;
+   keepPreviousData?: boolean;
+ };

Added type alias Use组织DirectorySyncParams

Added: Use组织DirectorySyncReturn
+ type Use组织DirectorySyncReturn = {
+   data: DirectorySyncResource | null | undefined;
+   error: Error | null;
+   isLoading: boolean;
+   isFetching: boolean;
+   createDirectorySync: (params?: CreateDirectorySyncParams) => Promise<DirectorySyncResource | undefined>;
+   updateDirectorySync: (params: UpdateDirectorySyncParams) => Promise<DirectorySyncResource | undefined>;
+   rotateDirectorySyncToken: () => Promise<DirectorySyncResource | undefined>;
+   deleteDirectorySync: () => Promise<DeletedObjectResource | undefined>;
+   revalidate: () => Promise<void>;
+ };

Added type alias Use组织DirectorySyncReturn

Added: Use组织DirectorySyncUsersParams
+ type Use组织DirectorySyncUsersParams = {
+   enterpriseConnectionId: string | null;
+   params?: GetDirectorySyncUsersParams;
+   pollIntervalMs?: number;
+   enabled?: boolean;
+   keepPreviousData?: boolean;
+ };

Added type alias Use组织DirectorySyncUsersParams

Added: Use组织DirectorySyncUsersReturn
+ type Use组织DirectorySyncUsersReturn = {
+   data: DirectorySyncUserResource[] | undefined;
+   totalCount: number | undefined;
+   error: Error | null;
+   isLoading: boolean;
+   isFetching: boolean;
+   isPolling: boolean;
+   startPolling: () => void;
+   stopPolling: () => void;
+   revalidate: () => Promise<void>;
+ };

Added type alias Use组织DirectorySyncUsersReturn


Report generated by Break Check

Last ran on 2291ba0.

注册 for free to join this conversation on GitHub. Already have an account? 登录 to comment

标签

None yet

项目

None yet

Development

Successfully merging this pull request may close these issues.

1 participant