@clerk/shared 4.32.0-snapshot.v20260904162929 → 4.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/{error-C-B61RHn.js → error-CdWUgmMd.js} +4 -4
- package/dist/_chunks/error-CdWUgmMd.js.map +1 -0
- package/dist/_chunks/{error-CYyD2kei.mjs → error-wrUdW78M.mjs} +4 -4
- package/dist/_chunks/error-wrUdW78M.mjs.map +1 -0
- package/dist/error.js +1 -1
- package/dist/error.mjs +1 -1
- package/dist/errors/errorThrower.d.mts +3 -3
- package/dist/errors/errorThrower.d.ts +3 -3
- package/dist/errors/errorThrower.js +3 -3
- package/dist/internal/clerk-js/componentGuards.d.mts +2 -1
- package/dist/internal/clerk-js/componentGuards.d.ts +2 -1
- package/dist/internal/clerk-js/componentGuards.js +4 -0
- package/dist/internal/clerk-js/componentGuards.js.map +1 -1
- package/dist/internal/clerk-js/componentGuards.mjs +4 -1
- package/dist/internal/clerk-js/componentGuards.mjs.map +1 -1
- package/dist/internal/clerk-js/passkeys.js +1 -1
- package/dist/internal/clerk-js/passkeys.mjs +1 -1
- package/dist/internal/clerk-js/protectCheck.js +1 -1
- package/dist/internal/clerk-js/protectCheck.mjs +1 -1
- package/dist/internal/clerk-js/warnings.d.mts +3 -2
- package/dist/internal/clerk-js/warnings.d.ts +3 -2
- package/dist/internal/clerk-js/warnings.js +2 -1
- package/dist/internal/clerk-js/warnings.js.map +1 -1
- package/dist/internal/clerk-js/warnings.mjs +2 -1
- package/dist/internal/clerk-js/warnings.mjs.map +1 -1
- package/dist/internal/clerk-js/web3.js +1 -1
- package/dist/internal/clerk-js/web3.mjs +1 -1
- package/dist/keys.d.mts +1 -6
- package/dist/keys.d.ts +1 -6
- package/dist/keys.js +2 -8
- package/dist/keys.js.map +1 -1
- package/dist/keys.mjs +3 -8
- package/dist/keys.mjs.map +1 -1
- package/dist/loadClerkJsScript.js +2 -2
- package/dist/loadClerkJsScript.js.map +1 -1
- package/dist/loadClerkJsScript.mjs +2 -2
- package/dist/loadClerkJsScript.mjs.map +1 -1
- package/dist/react/hooks/index.d.mts +2 -0
- package/dist/react/hooks/index.d.ts +2 -0
- package/dist/react/hooks/index.js +2 -0
- package/dist/react/hooks/useClerk.d.mts +1 -1
- package/dist/react/hooks/useClerk.d.ts +1 -1
- package/dist/react/hooks/useClerk.js +1 -1
- package/dist/react/hooks/useOAuthDeviceVerification.types.d.mts +31 -2
- package/dist/react/hooks/useOAuthDeviceVerification.types.d.ts +31 -2
- package/dist/react/hooks/useOrganization.d.mts +1 -1
- package/dist/react/hooks/useOrganization.d.ts +1 -1
- package/dist/react/hooks/useOrganizationDirectorySync.d.mts +27 -0
- package/dist/react/hooks/useOrganizationDirectorySync.d.ts +27 -0
- package/dist/react/hooks/useOrganizationDirectorySync.js +89 -0
- package/dist/react/hooks/useOrganizationDirectorySync.shared.js +49 -0
- package/dist/react/hooks/useOrganizationDirectorySyncUsers.d.mts +53 -0
- package/dist/react/hooks/useOrganizationDirectorySyncUsers.d.ts +53 -0
- package/dist/react/hooks/useOrganizationDirectorySyncUsers.js +71 -0
- package/dist/react/hooks/useOrganizationEnterpriseConnectionTestRuns.js +7 -5
- package/dist/react/hooks/useOrganizationList.d.mts +1 -1
- package/dist/react/hooks/useOrganizationList.d.ts +1 -1
- package/dist/react/hooks/useReverification.d.mts +1 -1
- package/dist/react/hooks/useReverification.d.ts +1 -1
- package/dist/react/index.d.mts +3 -1
- package/dist/react/index.d.ts +3 -1
- package/dist/react/index.js +199 -8
- package/dist/react/index.js.map +1 -1
- package/dist/react/index.mjs +198 -9
- package/dist/react/index.mjs.map +1 -1
- package/dist/react/stable-keys.js +5 -1
- package/dist/types/billing.d.mts +1 -1
- package/dist/types/billing.d.ts +1 -1
- package/dist/types/clerk.d.mts +19 -3
- package/dist/types/clerk.d.ts +19 -3
- package/dist/types/directorySync.d.mts +123 -0
- package/dist/types/directorySync.d.ts +123 -0
- package/dist/types/elementIds.d.mts +2 -2
- package/dist/types/elementIds.d.ts +2 -2
- package/dist/types/hooks.d.mts +11 -11
- package/dist/types/hooks.d.ts +11 -11
- package/dist/types/index.d.mts +2 -1
- package/dist/types/index.d.ts +2 -1
- package/dist/types/localization.d.mts +108 -0
- package/dist/types/localization.d.ts +108 -0
- package/dist/types/oauthApplication.d.mts +76 -3
- package/dist/types/oauthApplication.d.ts +76 -3
- package/dist/types/organization.d.mts +11 -1
- package/dist/types/organization.d.ts +11 -1
- package/dist/types/organizationDomain.d.mts +3 -3
- package/dist/types/organizationDomain.d.ts +3 -3
- package/dist/types/signIn.d.mts +2 -0
- package/dist/types/signIn.d.ts +2 -0
- package/dist/types/signInFuture.d.mts +19 -7
- package/dist/types/signInFuture.d.ts +19 -7
- package/dist/types/signUpFuture.d.mts +5 -5
- package/dist/types/signUpFuture.d.ts +5 -5
- package/dist/types/user.d.mts +1 -1
- package/dist/types/user.d.ts +1 -1
- package/dist/types/userSettings.d.mts +2 -1
- package/dist/types/userSettings.d.ts +2 -1
- package/dist/versionSelector.js +1 -1
- package/dist/versionSelector.js.map +1 -1
- package/dist/versionSelector.mjs +1 -1
- package/dist/versionSelector.mjs.map +1 -1
- package/package.json +2 -2
- package/dist/_chunks/error-C-B61RHn.js.map +0 -1
- package/dist/_chunks/error-CYyD2kei.mjs.map +0 -1
|
@@ -2,16 +2,45 @@ import { ClerkAPIResponseError } from "../../errors/clerkApiResponseError.mjs";
|
|
|
2
2
|
import { ClerkRuntimeError } from "../../errors/clerkRuntimeError.mjs";
|
|
3
3
|
import { LookupOAuthDeviceVerificationParams, OAuthDeviceVerificationInfo, OAuthDeviceVerificationResult, SubmitOAuthDeviceVerificationParams } from "../../types/oauthApplication.mjs";
|
|
4
4
|
//#region src/react/hooks/useOAuthDeviceVerification.types.d.ts
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* @interface
|
|
7
|
+
*/
|
|
6
8
|
type UseOAuthDeviceVerificationReturn = {
|
|
9
|
+
/**
|
|
10
|
+
* Information about the device authorization returned by the latest successful lookup, or `undefined` if no lookup has succeeded.
|
|
11
|
+
*/
|
|
7
12
|
data: OAuthDeviceVerificationInfo | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* The result of the latest approval or denial, or `undefined` if no decision has succeeded.
|
|
15
|
+
*/
|
|
8
16
|
result: OAuthDeviceVerificationResult | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* The latest error recorded by a lookup or submission operation, or `null` if no error has been recorded since the state was last cleared. Preflight rejections (Clerk not loaded, or a conflicting request already in progress) reject the returned promise without setting this, so callers must also handle rejections from `lookup`, `approve`, and `deny`.
|
|
19
|
+
*/
|
|
9
20
|
error: ClerkAPIResponseError | ClerkRuntimeError | null;
|
|
21
|
+
/**
|
|
22
|
+
* Whether a device authorization lookup is in progress.
|
|
23
|
+
*/
|
|
10
24
|
isLoading: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Whether an approval or denial is in progress.
|
|
27
|
+
*/
|
|
11
28
|
isSubmitting: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Looks up a device authorization by its user code.
|
|
31
|
+
*/
|
|
12
32
|
lookup: (params: LookupOAuthDeviceVerificationParams) => Promise<OAuthDeviceVerificationInfo>;
|
|
13
|
-
|
|
33
|
+
/**
|
|
34
|
+
* Approves a device authorization.
|
|
35
|
+
*/
|
|
36
|
+
approve: (params: Omit<SubmitOAuthDeviceVerificationParams, 'approved'>) => Promise<OAuthDeviceVerificationResult>;
|
|
37
|
+
/**
|
|
38
|
+
* Denies a device authorization.
|
|
39
|
+
*/
|
|
14
40
|
deny: (params: LookupOAuthDeviceVerificationParams) => Promise<OAuthDeviceVerificationResult>;
|
|
41
|
+
/**
|
|
42
|
+
* Clears the current device authorization state.
|
|
43
|
+
*/
|
|
15
44
|
reset: () => void;
|
|
16
45
|
};
|
|
17
46
|
//#endregion
|
|
@@ -2,16 +2,45 @@ import { ClerkAPIResponseError } from "../../errors/clerkApiResponseError.js";
|
|
|
2
2
|
import { ClerkRuntimeError } from "../../errors/clerkRuntimeError.js";
|
|
3
3
|
import { LookupOAuthDeviceVerificationParams, OAuthDeviceVerificationInfo, OAuthDeviceVerificationResult, SubmitOAuthDeviceVerificationParams } from "../../types/oauthApplication.js";
|
|
4
4
|
//#region src/react/hooks/useOAuthDeviceVerification.types.d.ts
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* @interface
|
|
7
|
+
*/
|
|
6
8
|
type UseOAuthDeviceVerificationReturn = {
|
|
9
|
+
/**
|
|
10
|
+
* Information about the device authorization returned by the latest successful lookup, or `undefined` if no lookup has succeeded.
|
|
11
|
+
*/
|
|
7
12
|
data: OAuthDeviceVerificationInfo | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* The result of the latest approval or denial, or `undefined` if no decision has succeeded.
|
|
15
|
+
*/
|
|
8
16
|
result: OAuthDeviceVerificationResult | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* The latest error recorded by a lookup or submission operation, or `null` if no error has been recorded since the state was last cleared. Preflight rejections (Clerk not loaded, or a conflicting request already in progress) reject the returned promise without setting this, so callers must also handle rejections from `lookup`, `approve`, and `deny`.
|
|
19
|
+
*/
|
|
9
20
|
error: ClerkAPIResponseError | ClerkRuntimeError | null;
|
|
21
|
+
/**
|
|
22
|
+
* Whether a device authorization lookup is in progress.
|
|
23
|
+
*/
|
|
10
24
|
isLoading: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Whether an approval or denial is in progress.
|
|
27
|
+
*/
|
|
11
28
|
isSubmitting: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Looks up a device authorization by its user code.
|
|
31
|
+
*/
|
|
12
32
|
lookup: (params: LookupOAuthDeviceVerificationParams) => Promise<OAuthDeviceVerificationInfo>;
|
|
13
|
-
|
|
33
|
+
/**
|
|
34
|
+
* Approves a device authorization.
|
|
35
|
+
*/
|
|
36
|
+
approve: (params: Omit<SubmitOAuthDeviceVerificationParams, 'approved'>) => Promise<OAuthDeviceVerificationResult>;
|
|
37
|
+
/**
|
|
38
|
+
* Denies a device authorization.
|
|
39
|
+
*/
|
|
14
40
|
deny: (params: LookupOAuthDeviceVerificationParams) => Promise<OAuthDeviceVerificationResult>;
|
|
41
|
+
/**
|
|
42
|
+
* Clears the current device authorization state.
|
|
43
|
+
*/
|
|
15
44
|
reset: () => void;
|
|
16
45
|
};
|
|
17
46
|
//#endregion
|
|
@@ -59,7 +59,7 @@ type UseOrganizationParams = {
|
|
|
59
59
|
*/
|
|
60
60
|
type UseOrganizationReturn<T extends UseOrganizationParams> = {
|
|
61
61
|
/**
|
|
62
|
-
* Indicates whether Clerk has loaded the current authentication state. Initially `false`, becomes `true` once Clerk loads, and can revert to `false` while auth state is updating (e.g., when switching organizations via [`setActive()`](https://clerk.com/docs/reference/objects/clerk#
|
|
62
|
+
* Indicates whether Clerk has loaded the current authentication state. Initially `false`, becomes `true` once Clerk loads, and can revert to `false` while auth state is updating (e.g., when switching organizations via [`setActive()`](https://clerk.com/docs/reference/objects/clerk#setactive)).
|
|
63
63
|
*/
|
|
64
64
|
isLoaded: false;
|
|
65
65
|
/**
|
|
@@ -59,7 +59,7 @@ type UseOrganizationParams = {
|
|
|
59
59
|
*/
|
|
60
60
|
type UseOrganizationReturn<T extends UseOrganizationParams> = {
|
|
61
61
|
/**
|
|
62
|
-
* Indicates whether Clerk has loaded the current authentication state. Initially `false`, becomes `true` once Clerk loads, and can revert to `false` while auth state is updating (e.g., when switching organizations via [`setActive()`](https://clerk.com/docs/reference/objects/clerk#
|
|
62
|
+
* Indicates whether Clerk has loaded the current authentication state. Initially `false`, becomes `true` once Clerk loads, and can revert to `false` while auth state is updating (e.g., when switching organizations via [`setActive()`](https://clerk.com/docs/reference/objects/clerk#setactive)).
|
|
63
63
|
*/
|
|
64
64
|
isLoaded: false;
|
|
65
65
|
/**
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { DeletedObjectResource } from "../../types/deletedObject.mjs";
|
|
2
|
+
import { CreateDirectorySyncParams, DirectorySyncResource, UpdateDirectorySyncParams } from "../../types/directorySync.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/react/hooks/useOrganizationDirectorySync.d.ts
|
|
5
|
+
type UseOrganizationDirectorySyncParams = {
|
|
6
|
+
enterpriseConnectionId: string | null;
|
|
7
|
+
enabled?: boolean;
|
|
8
|
+
};
|
|
9
|
+
type UseOrganizationDirectorySyncReturn = {
|
|
10
|
+
/** The connection's directory, `null` when none has been created yet, `undefined` while loading. */data: DirectorySyncResource | null | undefined;
|
|
11
|
+
error: Error | null;
|
|
12
|
+
isLoading: boolean;
|
|
13
|
+
isFetching: boolean;
|
|
14
|
+
createDirectorySync: (params?: CreateDirectorySyncParams) => Promise<DirectorySyncResource | undefined>; /** Resolves `undefined` until `data` has loaded, since the mutations act on the loaded directory. */
|
|
15
|
+
updateDirectorySync: (params: UpdateDirectorySyncParams) => Promise<DirectorySyncResource | undefined>;
|
|
16
|
+
rotateDirectorySyncToken: () => Promise<DirectorySyncResource | undefined>;
|
|
17
|
+
deleteDirectorySync: () => Promise<DeletedObjectResource | undefined>;
|
|
18
|
+
revalidate: () => Promise<void>;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* The Directory Sync directory bound to an enterprise connection of the active organization.
|
|
22
|
+
*
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
declare function useOrganizationDirectorySync(params: UseOrganizationDirectorySyncParams): UseOrganizationDirectorySyncReturn;
|
|
26
|
+
//#endregion
|
|
27
|
+
export { UseOrganizationDirectorySyncParams, UseOrganizationDirectorySyncReturn, useOrganizationDirectorySync };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { DeletedObjectResource } from "../../types/deletedObject.js";
|
|
2
|
+
import { CreateDirectorySyncParams, DirectorySyncResource, UpdateDirectorySyncParams } from "../../types/directorySync.js";
|
|
3
|
+
|
|
4
|
+
//#region src/react/hooks/useOrganizationDirectorySync.d.ts
|
|
5
|
+
type UseOrganizationDirectorySyncParams = {
|
|
6
|
+
enterpriseConnectionId: string | null;
|
|
7
|
+
enabled?: boolean;
|
|
8
|
+
};
|
|
9
|
+
type UseOrganizationDirectorySyncReturn = {
|
|
10
|
+
/** The connection's directory, `null` when none has been created yet, `undefined` while loading. */data: DirectorySyncResource | null | undefined;
|
|
11
|
+
error: Error | null;
|
|
12
|
+
isLoading: boolean;
|
|
13
|
+
isFetching: boolean;
|
|
14
|
+
createDirectorySync: (params?: CreateDirectorySyncParams) => Promise<DirectorySyncResource | undefined>; /** Resolves `undefined` until `data` has loaded, since the mutations act on the loaded directory. */
|
|
15
|
+
updateDirectorySync: (params: UpdateDirectorySyncParams) => Promise<DirectorySyncResource | undefined>;
|
|
16
|
+
rotateDirectorySyncToken: () => Promise<DirectorySyncResource | undefined>;
|
|
17
|
+
deleteDirectorySync: () => Promise<DeletedObjectResource | undefined>;
|
|
18
|
+
revalidate: () => Promise<void>;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* The Directory Sync directory bound to an enterprise connection of the active organization.
|
|
22
|
+
*
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
declare function useOrganizationDirectorySync(params: UseOrganizationDirectorySyncParams): UseOrganizationDirectorySyncReturn;
|
|
26
|
+
//#endregion
|
|
27
|
+
export { UseOrganizationDirectorySyncParams, UseOrganizationDirectorySyncReturn, useOrganizationDirectorySync };
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
const require_clerkApiResponseError = require('../../errors/clerkApiResponseError.js');
|
|
2
|
+
require('../../error.js');
|
|
3
|
+
const require_contexts = require('../contexts.js');
|
|
4
|
+
const require_use_clerk_query_client = require('../query/use-clerk-query-client.js');
|
|
5
|
+
const require_useQuery = require('../query/useQuery.js');
|
|
6
|
+
const require_useClearQueriesOnSignOut = require('./useClearQueriesOnSignOut.js');
|
|
7
|
+
const require_useOrganizationBase = require('./base/useOrganizationBase.js');
|
|
8
|
+
const require_useOrganizationDirectorySync_shared = require('./useOrganizationDirectorySync.shared.js');
|
|
9
|
+
let react = require("react");
|
|
10
|
+
|
|
11
|
+
//#region src/react/hooks/useOrganizationDirectorySync.tsx
|
|
12
|
+
/**
|
|
13
|
+
* The Directory Sync directory bound to an enterprise connection of the active organization.
|
|
14
|
+
*
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
function useOrganizationDirectorySync(params) {
|
|
18
|
+
const { enterpriseConnectionId, enabled = true } = params;
|
|
19
|
+
const clerk = require_contexts.useClerkInstanceContext();
|
|
20
|
+
const organization = require_useOrganizationBase.useOrganizationBase();
|
|
21
|
+
const [queryClient] = require_use_clerk_query_client.useClerkQueryClient();
|
|
22
|
+
const { queryKey, invalidationKey, stableKey, authenticated } = require_useOrganizationDirectorySync_shared.useOrganizationDirectorySyncCacheKeys({
|
|
23
|
+
organizationId: organization?.id ?? null,
|
|
24
|
+
enterpriseConnectionId
|
|
25
|
+
});
|
|
26
|
+
const queryEnabled = enabled && clerk.loaded && Boolean(organization) && Boolean(enterpriseConnectionId);
|
|
27
|
+
require_useClearQueriesOnSignOut.useClearQueriesOnSignOut({
|
|
28
|
+
isSignedOut: organization === null,
|
|
29
|
+
authenticated,
|
|
30
|
+
stableKeys: stableKey
|
|
31
|
+
});
|
|
32
|
+
const query = require_useQuery.useClerkQuery({
|
|
33
|
+
queryKey,
|
|
34
|
+
queryFn: async () => {
|
|
35
|
+
if (!enterpriseConnectionId) throw new Error("enterpriseConnectionId is required to fetch the directory");
|
|
36
|
+
try {
|
|
37
|
+
return await organization?.getDirectorySync(enterpriseConnectionId) ?? null;
|
|
38
|
+
} catch (err) {
|
|
39
|
+
if (require_clerkApiResponseError.isClerkAPIResponseError(err) && err.status === 404) return null;
|
|
40
|
+
throw err;
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
enabled: queryEnabled
|
|
44
|
+
});
|
|
45
|
+
const revalidate = (0, react.useCallback)(() => queryClient.invalidateQueries({ queryKey: invalidationKey }), [queryClient, invalidationKey]);
|
|
46
|
+
const createDirectorySync = (0, react.useCallback)(async (createParams) => {
|
|
47
|
+
if (!enterpriseConnectionId) return;
|
|
48
|
+
const created = await organization?.createDirectorySync(enterpriseConnectionId, createParams);
|
|
49
|
+
await revalidate();
|
|
50
|
+
return created;
|
|
51
|
+
}, [
|
|
52
|
+
organization,
|
|
53
|
+
enterpriseConnectionId,
|
|
54
|
+
revalidate
|
|
55
|
+
]);
|
|
56
|
+
const directory = query.data;
|
|
57
|
+
const updateDirectorySync = (0, react.useCallback)(async (updateParams) => {
|
|
58
|
+
if (!directory) return;
|
|
59
|
+
const updated = await directory.update(updateParams);
|
|
60
|
+
await revalidate();
|
|
61
|
+
return updated;
|
|
62
|
+
}, [directory, revalidate]);
|
|
63
|
+
const rotateDirectorySyncToken = (0, react.useCallback)(async () => {
|
|
64
|
+
if (!directory) return;
|
|
65
|
+
const rotated = await directory.rotateToken();
|
|
66
|
+
await revalidate();
|
|
67
|
+
return rotated;
|
|
68
|
+
}, [directory, revalidate]);
|
|
69
|
+
const deleteDirectorySync = (0, react.useCallback)(async () => {
|
|
70
|
+
if (!directory) return;
|
|
71
|
+
const deleted = await directory.delete();
|
|
72
|
+
await revalidate();
|
|
73
|
+
return deleted;
|
|
74
|
+
}, [directory, revalidate]);
|
|
75
|
+
return {
|
|
76
|
+
data: query.data,
|
|
77
|
+
error: query.error ?? null,
|
|
78
|
+
isLoading: query.isLoading,
|
|
79
|
+
isFetching: query.isFetching,
|
|
80
|
+
createDirectorySync,
|
|
81
|
+
updateDirectorySync,
|
|
82
|
+
rotateDirectorySyncToken,
|
|
83
|
+
deleteDirectorySync,
|
|
84
|
+
revalidate
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
//#endregion
|
|
89
|
+
exports.useOrganizationDirectorySync = useOrganizationDirectorySync;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
const require_stable_keys = require('../stable-keys.js');
|
|
2
|
+
const require_createCacheKeys = require('./createCacheKeys.js');
|
|
3
|
+
let react = require("react");
|
|
4
|
+
|
|
5
|
+
//#region src/react/hooks/useOrganizationDirectorySync.shared.ts
|
|
6
|
+
/**
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
function useOrganizationDirectorySyncCacheKeys(params) {
|
|
10
|
+
const { organizationId, enterpriseConnectionId } = params;
|
|
11
|
+
return (0, react.useMemo)(() => {
|
|
12
|
+
return require_createCacheKeys.createCacheKeys({
|
|
13
|
+
stablePrefix: require_stable_keys.INTERNAL_STABLE_KEYS.ORGANIZATION_DIRECTORY_SYNC_KEY,
|
|
14
|
+
authenticated: Boolean(organizationId),
|
|
15
|
+
tracked: {
|
|
16
|
+
organizationId: organizationId ?? null,
|
|
17
|
+
enterpriseConnectionId: enterpriseConnectionId ?? null
|
|
18
|
+
},
|
|
19
|
+
untracked: { args: {} }
|
|
20
|
+
});
|
|
21
|
+
}, [organizationId, enterpriseConnectionId]);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* @internal
|
|
25
|
+
*/
|
|
26
|
+
function useOrganizationDirectorySyncUsersCacheKeys(params) {
|
|
27
|
+
const { organizationId, enterpriseConnectionId, directoryId, args } = params;
|
|
28
|
+
return (0, react.useMemo)(() => {
|
|
29
|
+
return require_createCacheKeys.createCacheKeys({
|
|
30
|
+
stablePrefix: require_stable_keys.INTERNAL_STABLE_KEYS.ORGANIZATION_DIRECTORY_SYNC_USERS_KEY,
|
|
31
|
+
authenticated: Boolean(organizationId),
|
|
32
|
+
tracked: {
|
|
33
|
+
organizationId: organizationId ?? null,
|
|
34
|
+
enterpriseConnectionId: enterpriseConnectionId ?? null,
|
|
35
|
+
directoryId: directoryId ?? null
|
|
36
|
+
},
|
|
37
|
+
untracked: { args }
|
|
38
|
+
});
|
|
39
|
+
}, [
|
|
40
|
+
organizationId,
|
|
41
|
+
enterpriseConnectionId,
|
|
42
|
+
directoryId,
|
|
43
|
+
JSON.stringify(args)
|
|
44
|
+
]);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
//#endregion
|
|
48
|
+
exports.useOrganizationDirectorySyncCacheKeys = useOrganizationDirectorySyncCacheKeys;
|
|
49
|
+
exports.useOrganizationDirectorySyncUsersCacheKeys = useOrganizationDirectorySyncUsersCacheKeys;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { DirectorySyncResource, DirectorySyncUserResource, GetDirectorySyncUsersParams } from "../../types/directorySync.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/react/hooks/useOrganizationDirectorySyncUsers.d.ts
|
|
4
|
+
type UseOrganizationDirectorySyncUsersParams = {
|
|
5
|
+
/** The directory to list users for, e.g. `data` from `useOrganizationDirectorySync`. Nothing is fetched while `null` or `undefined`. */directory: DirectorySyncResource | null | undefined;
|
|
6
|
+
/**
|
|
7
|
+
* Pass-through fetch parameters (pagination).
|
|
8
|
+
* Defaults to `{ initialPage: 1, pageSize: 10 }`.
|
|
9
|
+
*/
|
|
10
|
+
params?: GetDirectorySyncUsersParams;
|
|
11
|
+
/**
|
|
12
|
+
* Poll the list for changes while `true`. Tie this to the view that needs the
|
|
13
|
+
* live feed so polling stops when that view goes away.
|
|
14
|
+
*
|
|
15
|
+
* @default false
|
|
16
|
+
*/
|
|
17
|
+
poll?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Polling interval (ms) used while `poll` is `true`.
|
|
20
|
+
*
|
|
21
|
+
* @default 2000
|
|
22
|
+
*/
|
|
23
|
+
pollIntervalMs?: number;
|
|
24
|
+
/**
|
|
25
|
+
* If `false`, nothing is fetched and polling is paused.
|
|
26
|
+
*
|
|
27
|
+
* @default true
|
|
28
|
+
*/
|
|
29
|
+
enabled?: boolean;
|
|
30
|
+
keepPreviousData?: boolean;
|
|
31
|
+
};
|
|
32
|
+
type UseOrganizationDirectorySyncUsersReturn = {
|
|
33
|
+
/** `undefined` while loading and while the hook is disabled. */data: DirectorySyncUserResource[] | undefined;
|
|
34
|
+
totalCount: number | undefined;
|
|
35
|
+
error: Error | null;
|
|
36
|
+
isLoading: boolean;
|
|
37
|
+
isFetching: boolean; /** `true` while the hook is polling. */
|
|
38
|
+
isPolling: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Force a refetch.
|
|
41
|
+
*/
|
|
42
|
+
revalidate: () => Promise<void>;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* The users provisioned into an enterprise connection's Directory Sync
|
|
46
|
+
* directory, most recently touched first. Polling is opt-in via `poll`, which
|
|
47
|
+
* lets the setup flow use the list as a live activity feed.
|
|
48
|
+
*
|
|
49
|
+
* @internal
|
|
50
|
+
*/
|
|
51
|
+
declare function useOrganizationDirectorySyncUsers(params: UseOrganizationDirectorySyncUsersParams): UseOrganizationDirectorySyncUsersReturn;
|
|
52
|
+
//#endregion
|
|
53
|
+
export { UseOrganizationDirectorySyncUsersParams, UseOrganizationDirectorySyncUsersReturn, useOrganizationDirectorySyncUsers };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { DirectorySyncResource, DirectorySyncUserResource, GetDirectorySyncUsersParams } from "../../types/directorySync.js";
|
|
2
|
+
|
|
3
|
+
//#region src/react/hooks/useOrganizationDirectorySyncUsers.d.ts
|
|
4
|
+
type UseOrganizationDirectorySyncUsersParams = {
|
|
5
|
+
/** The directory to list users for, e.g. `data` from `useOrganizationDirectorySync`. Nothing is fetched while `null` or `undefined`. */directory: DirectorySyncResource | null | undefined;
|
|
6
|
+
/**
|
|
7
|
+
* Pass-through fetch parameters (pagination).
|
|
8
|
+
* Defaults to `{ initialPage: 1, pageSize: 10 }`.
|
|
9
|
+
*/
|
|
10
|
+
params?: GetDirectorySyncUsersParams;
|
|
11
|
+
/**
|
|
12
|
+
* Poll the list for changes while `true`. Tie this to the view that needs the
|
|
13
|
+
* live feed so polling stops when that view goes away.
|
|
14
|
+
*
|
|
15
|
+
* @default false
|
|
16
|
+
*/
|
|
17
|
+
poll?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Polling interval (ms) used while `poll` is `true`.
|
|
20
|
+
*
|
|
21
|
+
* @default 2000
|
|
22
|
+
*/
|
|
23
|
+
pollIntervalMs?: number;
|
|
24
|
+
/**
|
|
25
|
+
* If `false`, nothing is fetched and polling is paused.
|
|
26
|
+
*
|
|
27
|
+
* @default true
|
|
28
|
+
*/
|
|
29
|
+
enabled?: boolean;
|
|
30
|
+
keepPreviousData?: boolean;
|
|
31
|
+
};
|
|
32
|
+
type UseOrganizationDirectorySyncUsersReturn = {
|
|
33
|
+
/** `undefined` while loading and while the hook is disabled. */data: DirectorySyncUserResource[] | undefined;
|
|
34
|
+
totalCount: number | undefined;
|
|
35
|
+
error: Error | null;
|
|
36
|
+
isLoading: boolean;
|
|
37
|
+
isFetching: boolean; /** `true` while the hook is polling. */
|
|
38
|
+
isPolling: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Force a refetch.
|
|
41
|
+
*/
|
|
42
|
+
revalidate: () => Promise<void>;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* The users provisioned into an enterprise connection's Directory Sync
|
|
46
|
+
* directory, most recently touched first. Polling is opt-in via `poll`, which
|
|
47
|
+
* lets the setup flow use the list as a live activity feed.
|
|
48
|
+
*
|
|
49
|
+
* @internal
|
|
50
|
+
*/
|
|
51
|
+
declare function useOrganizationDirectorySyncUsers(params: UseOrganizationDirectorySyncUsersParams): UseOrganizationDirectorySyncUsersReturn;
|
|
52
|
+
//#endregion
|
|
53
|
+
export { UseOrganizationDirectorySyncUsersParams, UseOrganizationDirectorySyncUsersReturn, useOrganizationDirectorySyncUsers };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
const require_contexts = require('../contexts.js');
|
|
2
|
+
const require_use_clerk_query_client = require('../query/use-clerk-query-client.js');
|
|
3
|
+
const require_useQuery = require('../query/useQuery.js');
|
|
4
|
+
const require_useClearQueriesOnSignOut = require('./useClearQueriesOnSignOut.js');
|
|
5
|
+
const require_useOrganizationBase = require('./base/useOrganizationBase.js');
|
|
6
|
+
const require_useOrganizationDirectorySync_shared = require('./useOrganizationDirectorySync.shared.js');
|
|
7
|
+
let react = require("react");
|
|
8
|
+
|
|
9
|
+
//#region src/react/hooks/useOrganizationDirectorySyncUsers.tsx
|
|
10
|
+
const DEFAULT_POLL_INTERVAL_MS = 2e3;
|
|
11
|
+
/**
|
|
12
|
+
* The users provisioned into an enterprise connection's Directory Sync
|
|
13
|
+
* directory, most recently touched first. Polling is opt-in via `poll`, which
|
|
14
|
+
* lets the setup flow use the list as a live activity feed.
|
|
15
|
+
*
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
function useOrganizationDirectorySyncUsers(params) {
|
|
19
|
+
const { directory, params: fetchParams = {
|
|
20
|
+
initialPage: 1,
|
|
21
|
+
pageSize: 10
|
|
22
|
+
}, poll = false, pollIntervalMs = DEFAULT_POLL_INTERVAL_MS, enabled = true, keepPreviousData = true } = params;
|
|
23
|
+
const clerk = require_contexts.useClerkInstanceContext();
|
|
24
|
+
const organization = require_useOrganizationBase.useOrganizationBase();
|
|
25
|
+
const [queryClient] = require_use_clerk_query_client.useClerkQueryClient();
|
|
26
|
+
const enterpriseConnectionId = directory?.enterpriseConnectionId ?? null;
|
|
27
|
+
const directoryId = directory?.id ?? null;
|
|
28
|
+
const { queryKey, invalidationKey, stableKey, authenticated } = require_useOrganizationDirectorySync_shared.useOrganizationDirectorySyncUsersCacheKeys({
|
|
29
|
+
organizationId: organization?.id ?? null,
|
|
30
|
+
enterpriseConnectionId,
|
|
31
|
+
directoryId,
|
|
32
|
+
args: fetchParams
|
|
33
|
+
});
|
|
34
|
+
require_useClearQueriesOnSignOut.useClearQueriesOnSignOut({
|
|
35
|
+
isSignedOut: organization === null,
|
|
36
|
+
authenticated,
|
|
37
|
+
stableKeys: stableKey
|
|
38
|
+
});
|
|
39
|
+
const queryEnabled = enabled && clerk.loaded && Boolean(organization) && Boolean(directory);
|
|
40
|
+
const currentTracked = queryKey[2];
|
|
41
|
+
const query = require_useQuery.useClerkQuery({
|
|
42
|
+
queryKey,
|
|
43
|
+
queryFn: () => {
|
|
44
|
+
if (!directory) throw new Error("directory is required to fetch directory users");
|
|
45
|
+
return directory.getUsers(fetchParams);
|
|
46
|
+
},
|
|
47
|
+
refetchInterval: () => poll ? pollIntervalMs : false,
|
|
48
|
+
enabled: queryEnabled,
|
|
49
|
+
refetchIntervalInBackground: false,
|
|
50
|
+
placeholderData: keepPreviousData ? (previousData, previousQuery) => {
|
|
51
|
+
const previousTracked = previousQuery?.queryKey[2];
|
|
52
|
+
return Boolean(currentTracked.organizationId) && Boolean(currentTracked.directoryId) && previousTracked?.organizationId === currentTracked.organizationId && previousTracked?.directoryId === currentTracked.directoryId ? previousData : void 0;
|
|
53
|
+
} : void 0
|
|
54
|
+
});
|
|
55
|
+
const revalidate = (0, react.useCallback)(async () => {
|
|
56
|
+
await queryClient.invalidateQueries({ queryKey: invalidationKey });
|
|
57
|
+
}, [queryClient, invalidationKey]);
|
|
58
|
+
const isPolling = queryEnabled && poll;
|
|
59
|
+
return {
|
|
60
|
+
data: queryEnabled ? query.data?.data : void 0,
|
|
61
|
+
totalCount: queryEnabled ? query.data?.total_count : void 0,
|
|
62
|
+
error: query.error ?? null,
|
|
63
|
+
isLoading: query.isLoading,
|
|
64
|
+
isFetching: query.isFetching,
|
|
65
|
+
isPolling,
|
|
66
|
+
revalidate
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
//#endregion
|
|
71
|
+
exports.useOrganizationDirectorySyncUsers = useOrganizationDirectorySyncUsers;
|
|
@@ -33,9 +33,10 @@ function useOrganizationEnterpriseConnectionTestRuns(params) {
|
|
|
33
33
|
stableKeys: stableKey
|
|
34
34
|
});
|
|
35
35
|
const queryEnabled = enabled && clerk.loaded && Boolean(organization) && Boolean(enterpriseConnectionId);
|
|
36
|
-
const [
|
|
36
|
+
const [pollingConnectionId, setPollingConnectionId] = (0, react.useState)(null);
|
|
37
|
+
const shouldPoll = pollingConnectionId !== null && pollingConnectionId === enterpriseConnectionId;
|
|
37
38
|
(0, react.useEffect)(() => {
|
|
38
|
-
|
|
39
|
+
setPollingConnectionId((current) => current !== null && current !== enterpriseConnectionId ? null : current);
|
|
39
40
|
}, [enterpriseConnectionId]);
|
|
40
41
|
const query = require_useQuery.useClerkQuery({
|
|
41
42
|
queryKey,
|
|
@@ -53,10 +54,10 @@ function useOrganizationEnterpriseConnectionTestRuns(params) {
|
|
|
53
54
|
});
|
|
54
55
|
const hasRows = (query.data?.data?.length ?? 0) > 0;
|
|
55
56
|
(0, react.useEffect)(() => {
|
|
56
|
-
if (shouldPoll && hasRows)
|
|
57
|
+
if (shouldPoll && hasRows) setPollingConnectionId(null);
|
|
57
58
|
}, [shouldPoll, hasRows]);
|
|
58
59
|
const revalidate = (0, react.useCallback)(async (options) => {
|
|
59
|
-
if ((options?.armPolling ?? true) && !hasRows)
|
|
60
|
+
if ((options?.armPolling ?? true) && !hasRows) setPollingConnectionId(enterpriseConnectionId);
|
|
60
61
|
if (options?.exact) await queryClient.invalidateQueries({
|
|
61
62
|
queryKey,
|
|
62
63
|
exact: true
|
|
@@ -71,7 +72,8 @@ function useOrganizationEnterpriseConnectionTestRuns(params) {
|
|
|
71
72
|
queryClient,
|
|
72
73
|
invalidationKey,
|
|
73
74
|
queryKey,
|
|
74
|
-
hasRows
|
|
75
|
+
hasRows,
|
|
76
|
+
enterpriseConnectionId
|
|
75
77
|
]);
|
|
76
78
|
const isPolling = queryEnabled && shouldPoll && !hasRows;
|
|
77
79
|
return {
|
|
@@ -46,7 +46,7 @@ type UseOrganizationListParams = {
|
|
|
46
46
|
*/
|
|
47
47
|
type UseOrganizationListReturn<T extends UseOrganizationListParams> = {
|
|
48
48
|
/**
|
|
49
|
-
* Indicates whether Clerk has loaded the current authentication state and there is an authenticated user. Initially `false`, becomes `true` once Clerk loads with a user, and can revert to `false` while auth state is updating (e.g., when switching organizations via [`setActive()`](https://clerk.com/docs/reference/objects/clerk#
|
|
49
|
+
* Indicates whether Clerk has loaded the current authentication state and there is an authenticated user. Initially `false`, becomes `true` once Clerk loads with a user, and can revert to `false` while auth state is updating (e.g., when switching organizations via [`setActive()`](https://clerk.com/docs/reference/objects/clerk#setactive)).
|
|
50
50
|
*/
|
|
51
51
|
isLoaded: false;
|
|
52
52
|
/**
|
|
@@ -46,7 +46,7 @@ type UseOrganizationListParams = {
|
|
|
46
46
|
*/
|
|
47
47
|
type UseOrganizationListReturn<T extends UseOrganizationListParams> = {
|
|
48
48
|
/**
|
|
49
|
-
* Indicates whether Clerk has loaded the current authentication state and there is an authenticated user. Initially `false`, becomes `true` once Clerk loads with a user, and can revert to `false` while auth state is updating (e.g., when switching organizations via [`setActive()`](https://clerk.com/docs/reference/objects/clerk#
|
|
49
|
+
* Indicates whether Clerk has loaded the current authentication state and there is an authenticated user. Initially `false`, becomes `true` once Clerk loads with a user, and can revert to `false` while auth state is updating (e.g., when switching organizations via [`setActive()`](https://clerk.com/docs/reference/objects/clerk#setactive)).
|
|
50
50
|
*/
|
|
51
51
|
isLoaded: false;
|
|
52
52
|
/**
|
|
@@ -50,7 +50,7 @@ type UseReverification = <Fetcher extends (...args: any[]) => Promise<any> | und
|
|
|
50
50
|
|
|
51
51
|
fetcher: Fetcher,
|
|
52
52
|
/**
|
|
53
|
-
* Optional configuration object extending [`UseReverificationOptions`](https://clerk.com/docs/reference/hooks/use-reverification#
|
|
53
|
+
* Optional configuration object extending [`UseReverificationOptions`](https://clerk.com/docs/reference/hooks/use-reverification#usereverificationoptions).
|
|
54
54
|
*/
|
|
55
55
|
|
|
56
56
|
options?: Options) => UseReverificationResult<Fetcher>;
|
|
@@ -50,7 +50,7 @@ type UseReverification = <Fetcher extends (...args: any[]) => Promise<any> | und
|
|
|
50
50
|
|
|
51
51
|
fetcher: Fetcher,
|
|
52
52
|
/**
|
|
53
|
-
* Optional configuration object extending [`UseReverificationOptions`](https://clerk.com/docs/reference/hooks/use-reverification#
|
|
53
|
+
* Optional configuration object extending [`UseReverificationOptions`](https://clerk.com/docs/reference/hooks/use-reverification#usereverificationoptions).
|
|
54
54
|
*/
|
|
55
55
|
|
|
56
56
|
options?: Options) => UseReverificationResult<Fetcher>;
|
package/dist/react/index.d.mts
CHANGED
|
@@ -32,6 +32,8 @@ import { usePaymentAttemptQuery } from "./hooks/usePaymentAttemptQuery.mjs";
|
|
|
32
32
|
import { UseUserEnterpriseConnectionsParams, UseUserEnterpriseConnectionsReturn, useUserEnterpriseConnections } from "./hooks/useUserEnterpriseConnections.mjs";
|
|
33
33
|
import { UseOrganizationEnterpriseConnectionsParams, UseOrganizationEnterpriseConnectionsReturn, useOrganizationEnterpriseConnections } from "./hooks/useOrganizationEnterpriseConnections.mjs";
|
|
34
34
|
import { UseOrganizationDomainsParams, UseOrganizationDomainsReturn, useOrganizationDomains } from "./hooks/useOrganizationDomains.mjs";
|
|
35
|
+
import { UseOrganizationDirectorySyncParams, UseOrganizationDirectorySyncReturn, useOrganizationDirectorySync } from "./hooks/useOrganizationDirectorySync.mjs";
|
|
36
|
+
import { UseOrganizationDirectorySyncUsersParams, UseOrganizationDirectorySyncUsersReturn, useOrganizationDirectorySyncUsers } from "./hooks/useOrganizationDirectorySyncUsers.mjs";
|
|
35
37
|
import { UseOrganizationEnterpriseConnectionTestRunsParams, UseOrganizationEnterpriseConnectionTestRunsReturn, UseOrganizationEnterpriseConnectionTestRunsRevalidateResult, useOrganizationEnterpriseConnectionTestRuns } from "./hooks/useOrganizationEnterpriseConnectionTestRuns.mjs";
|
|
36
38
|
import { useUserBase } from "./hooks/base/useUserBase.mjs";
|
|
37
39
|
import { useClientBase } from "./hooks/base/useClientBase.mjs";
|
|
@@ -41,4 +43,4 @@ import { ClerkContextProvider } from "./ClerkContextProvider.mjs";
|
|
|
41
43
|
import { PaymentElement, PaymentElementProps, PaymentElementProvider, PaymentElementProviderProps, UsePaymentElementReturn, usePaymentElement } from "./billing/payment-element.mjs";
|
|
42
44
|
import { UNSAFE_PortalProvider, usePortalRoot } from "./PortalProvider.mjs";
|
|
43
45
|
import { __createClerkTestQueryClient, __resetClerkQueryClientForTest, __setClerkQueryClientForTest, getClerkQueryClient } from "./query/clerk-query-client.mjs";
|
|
44
|
-
export { ClerkContextProvider, ClerkInstanceContext, InitialStateProvider, OptionsContext, PaymentElementProps, PaymentElementProviderProps, UNSAFE_PortalProvider, type UseOAuthConsentParams, type UseOAuthConsentReturn, type UseOAuthDeviceVerificationReturn, type UseOrganizationCreationDefaultsParams, type UseOrganizationCreationDefaultsReturn, type UseOrganizationDomainsParams, type UseOrganizationDomainsReturn, type UseOrganizationEnterpriseConnectionTestRunsParams, type UseOrganizationEnterpriseConnectionTestRunsReturn, type UseOrganizationEnterpriseConnectionTestRunsRevalidateResult, type UseOrganizationEnterpriseConnectionsParams, type UseOrganizationEnterpriseConnectionsReturn, UsePaymentElementReturn, type UseSubscriptionParams, type UseUserEnterpriseConnectionsParams, type UseUserEnterpriseConnectionsReturn, __createClerkTestQueryClient, __experimental_CheckoutProvider, PaymentElement as __experimental_PaymentElement, PaymentElementProvider as __experimental_PaymentElementProvider, useCheckout as __experimental_useCheckout, usePaymentAttempts as __experimental_usePaymentAttempts, usePaymentElement as __experimental_usePaymentElement, usePaymentMethods as __experimental_usePaymentMethods, usePlans as __experimental_usePlans, useStatements as __experimental_useStatements, useSubscription as __experimental_useSubscription, useClientBase as __internal_useClientBase, __internal_useCreditBalanceQuery, __internal_useCreditHistoryQuery, useOrganizationBase as __internal_useOrganizationBase, useOrganizationDomains as __internal_useOrganizationDomains, useOrganizationEnterpriseConnectionTestRuns as __internal_useOrganizationEnterpriseConnectionTestRuns, useOrganizationEnterpriseConnections as __internal_useOrganizationEnterpriseConnections, usePaymentAttemptQuery as __internal_usePaymentAttemptQuery, __internal_usePlanDetailsQuery, useSessionBase as __internal_useSessionBase, useStatementQuery as __internal_useStatementQuery, useUserBase as __internal_useUserBase, useUserEnterpriseConnections as __internal_useUserEnterpriseConnections, __resetClerkQueryClientForTest, __setClerkQueryClientForTest, assertContextExists, createContextAndHook, getClerkQueryClient, isDeeplyEqual, useAPIKeys, useAssertWrappedByClerkProvider, useAttemptToEnableOrganizations, useClerk, useClerkInstanceContext, useDeepEqualMemo, useInitialStateContext, useOAuthConsent, useOAuthDeviceVerification, useOptionsContext, useOrganization, useOrganizationCreationDefaults, useOrganizationList, usePortalRoot, useReverification, useSafeLayoutEffect, useSession, useSessionList, useUser };
|
|
46
|
+
export { ClerkContextProvider, ClerkInstanceContext, InitialStateProvider, OptionsContext, PaymentElementProps, PaymentElementProviderProps, UNSAFE_PortalProvider, type UseOAuthConsentParams, type UseOAuthConsentReturn, type UseOAuthDeviceVerificationReturn, type UseOrganizationCreationDefaultsParams, type UseOrganizationCreationDefaultsReturn, type UseOrganizationDirectorySyncParams, type UseOrganizationDirectorySyncReturn, type UseOrganizationDirectorySyncUsersParams, type UseOrganizationDirectorySyncUsersReturn, type UseOrganizationDomainsParams, type UseOrganizationDomainsReturn, type UseOrganizationEnterpriseConnectionTestRunsParams, type UseOrganizationEnterpriseConnectionTestRunsReturn, type UseOrganizationEnterpriseConnectionTestRunsRevalidateResult, type UseOrganizationEnterpriseConnectionsParams, type UseOrganizationEnterpriseConnectionsReturn, UsePaymentElementReturn, type UseSubscriptionParams, type UseUserEnterpriseConnectionsParams, type UseUserEnterpriseConnectionsReturn, __createClerkTestQueryClient, __experimental_CheckoutProvider, PaymentElement as __experimental_PaymentElement, PaymentElementProvider as __experimental_PaymentElementProvider, useCheckout as __experimental_useCheckout, usePaymentAttempts as __experimental_usePaymentAttempts, usePaymentElement as __experimental_usePaymentElement, usePaymentMethods as __experimental_usePaymentMethods, usePlans as __experimental_usePlans, useStatements as __experimental_useStatements, useSubscription as __experimental_useSubscription, useClientBase as __internal_useClientBase, __internal_useCreditBalanceQuery, __internal_useCreditHistoryQuery, useOrganizationBase as __internal_useOrganizationBase, useOrganizationDirectorySync as __internal_useOrganizationDirectorySync, useOrganizationDirectorySyncUsers as __internal_useOrganizationDirectorySyncUsers, useOrganizationDomains as __internal_useOrganizationDomains, useOrganizationEnterpriseConnectionTestRuns as __internal_useOrganizationEnterpriseConnectionTestRuns, useOrganizationEnterpriseConnections as __internal_useOrganizationEnterpriseConnections, usePaymentAttemptQuery as __internal_usePaymentAttemptQuery, __internal_usePlanDetailsQuery, useSessionBase as __internal_useSessionBase, useStatementQuery as __internal_useStatementQuery, useUserBase as __internal_useUserBase, useUserEnterpriseConnections as __internal_useUserEnterpriseConnections, __resetClerkQueryClientForTest, __setClerkQueryClientForTest, assertContextExists, createContextAndHook, getClerkQueryClient, isDeeplyEqual, useAPIKeys, useAssertWrappedByClerkProvider, useAttemptToEnableOrganizations, useClerk, useClerkInstanceContext, useDeepEqualMemo, useInitialStateContext, useOAuthConsent, useOAuthDeviceVerification, useOptionsContext, useOrganization, useOrganizationCreationDefaults, useOrganizationList, usePortalRoot, useReverification, useSafeLayoutEffect, useSession, useSessionList, useUser };
|
package/dist/react/index.d.ts
CHANGED
|
@@ -32,6 +32,8 @@ import { usePaymentAttemptQuery } from "./hooks/usePaymentAttemptQuery.js";
|
|
|
32
32
|
import { UseUserEnterpriseConnectionsParams, UseUserEnterpriseConnectionsReturn, useUserEnterpriseConnections } from "./hooks/useUserEnterpriseConnections.js";
|
|
33
33
|
import { UseOrganizationEnterpriseConnectionsParams, UseOrganizationEnterpriseConnectionsReturn, useOrganizationEnterpriseConnections } from "./hooks/useOrganizationEnterpriseConnections.js";
|
|
34
34
|
import { UseOrganizationDomainsParams, UseOrganizationDomainsReturn, useOrganizationDomains } from "./hooks/useOrganizationDomains.js";
|
|
35
|
+
import { UseOrganizationDirectorySyncParams, UseOrganizationDirectorySyncReturn, useOrganizationDirectorySync } from "./hooks/useOrganizationDirectorySync.js";
|
|
36
|
+
import { UseOrganizationDirectorySyncUsersParams, UseOrganizationDirectorySyncUsersReturn, useOrganizationDirectorySyncUsers } from "./hooks/useOrganizationDirectorySyncUsers.js";
|
|
35
37
|
import { UseOrganizationEnterpriseConnectionTestRunsParams, UseOrganizationEnterpriseConnectionTestRunsReturn, UseOrganizationEnterpriseConnectionTestRunsRevalidateResult, useOrganizationEnterpriseConnectionTestRuns } from "./hooks/useOrganizationEnterpriseConnectionTestRuns.js";
|
|
36
38
|
import { useUserBase } from "./hooks/base/useUserBase.js";
|
|
37
39
|
import { useClientBase } from "./hooks/base/useClientBase.js";
|
|
@@ -41,4 +43,4 @@ import { ClerkContextProvider } from "./ClerkContextProvider.js";
|
|
|
41
43
|
import { PaymentElement, PaymentElementProps, PaymentElementProvider, PaymentElementProviderProps, UsePaymentElementReturn, usePaymentElement } from "./billing/payment-element.js";
|
|
42
44
|
import { UNSAFE_PortalProvider, usePortalRoot } from "./PortalProvider.js";
|
|
43
45
|
import { __createClerkTestQueryClient, __resetClerkQueryClientForTest, __setClerkQueryClientForTest, getClerkQueryClient } from "./query/clerk-query-client.js";
|
|
44
|
-
export { ClerkContextProvider, ClerkInstanceContext, InitialStateProvider, OptionsContext, PaymentElementProps, PaymentElementProviderProps, UNSAFE_PortalProvider, type UseOAuthConsentParams, type UseOAuthConsentReturn, type UseOAuthDeviceVerificationReturn, type UseOrganizationCreationDefaultsParams, type UseOrganizationCreationDefaultsReturn, type UseOrganizationDomainsParams, type UseOrganizationDomainsReturn, type UseOrganizationEnterpriseConnectionTestRunsParams, type UseOrganizationEnterpriseConnectionTestRunsReturn, type UseOrganizationEnterpriseConnectionTestRunsRevalidateResult, type UseOrganizationEnterpriseConnectionsParams, type UseOrganizationEnterpriseConnectionsReturn, UsePaymentElementReturn, type UseSubscriptionParams, type UseUserEnterpriseConnectionsParams, type UseUserEnterpriseConnectionsReturn, __createClerkTestQueryClient, __experimental_CheckoutProvider, PaymentElement as __experimental_PaymentElement, PaymentElementProvider as __experimental_PaymentElementProvider, useCheckout as __experimental_useCheckout, usePaymentAttempts as __experimental_usePaymentAttempts, usePaymentElement as __experimental_usePaymentElement, usePaymentMethods as __experimental_usePaymentMethods, usePlans as __experimental_usePlans, useStatements as __experimental_useStatements, useSubscription as __experimental_useSubscription, useClientBase as __internal_useClientBase, __internal_useCreditBalanceQuery, __internal_useCreditHistoryQuery, useOrganizationBase as __internal_useOrganizationBase, useOrganizationDomains as __internal_useOrganizationDomains, useOrganizationEnterpriseConnectionTestRuns as __internal_useOrganizationEnterpriseConnectionTestRuns, useOrganizationEnterpriseConnections as __internal_useOrganizationEnterpriseConnections, usePaymentAttemptQuery as __internal_usePaymentAttemptQuery, __internal_usePlanDetailsQuery, useSessionBase as __internal_useSessionBase, useStatementQuery as __internal_useStatementQuery, useUserBase as __internal_useUserBase, useUserEnterpriseConnections as __internal_useUserEnterpriseConnections, __resetClerkQueryClientForTest, __setClerkQueryClientForTest, assertContextExists, createContextAndHook, getClerkQueryClient, isDeeplyEqual, useAPIKeys, useAssertWrappedByClerkProvider, useAttemptToEnableOrganizations, useClerk, useClerkInstanceContext, useDeepEqualMemo, useInitialStateContext, useOAuthConsent, useOAuthDeviceVerification, useOptionsContext, useOrganization, useOrganizationCreationDefaults, useOrganizationList, usePortalRoot, useReverification, useSafeLayoutEffect, useSession, useSessionList, useUser };
|
|
46
|
+
export { ClerkContextProvider, ClerkInstanceContext, InitialStateProvider, OptionsContext, PaymentElementProps, PaymentElementProviderProps, UNSAFE_PortalProvider, type UseOAuthConsentParams, type UseOAuthConsentReturn, type UseOAuthDeviceVerificationReturn, type UseOrganizationCreationDefaultsParams, type UseOrganizationCreationDefaultsReturn, type UseOrganizationDirectorySyncParams, type UseOrganizationDirectorySyncReturn, type UseOrganizationDirectorySyncUsersParams, type UseOrganizationDirectorySyncUsersReturn, type UseOrganizationDomainsParams, type UseOrganizationDomainsReturn, type UseOrganizationEnterpriseConnectionTestRunsParams, type UseOrganizationEnterpriseConnectionTestRunsReturn, type UseOrganizationEnterpriseConnectionTestRunsRevalidateResult, type UseOrganizationEnterpriseConnectionsParams, type UseOrganizationEnterpriseConnectionsReturn, UsePaymentElementReturn, type UseSubscriptionParams, type UseUserEnterpriseConnectionsParams, type UseUserEnterpriseConnectionsReturn, __createClerkTestQueryClient, __experimental_CheckoutProvider, PaymentElement as __experimental_PaymentElement, PaymentElementProvider as __experimental_PaymentElementProvider, useCheckout as __experimental_useCheckout, usePaymentAttempts as __experimental_usePaymentAttempts, usePaymentElement as __experimental_usePaymentElement, usePaymentMethods as __experimental_usePaymentMethods, usePlans as __experimental_usePlans, useStatements as __experimental_useStatements, useSubscription as __experimental_useSubscription, useClientBase as __internal_useClientBase, __internal_useCreditBalanceQuery, __internal_useCreditHistoryQuery, useOrganizationBase as __internal_useOrganizationBase, useOrganizationDirectorySync as __internal_useOrganizationDirectorySync, useOrganizationDirectorySyncUsers as __internal_useOrganizationDirectorySyncUsers, useOrganizationDomains as __internal_useOrganizationDomains, useOrganizationEnterpriseConnectionTestRuns as __internal_useOrganizationEnterpriseConnectionTestRuns, useOrganizationEnterpriseConnections as __internal_useOrganizationEnterpriseConnections, usePaymentAttemptQuery as __internal_usePaymentAttemptQuery, __internal_usePlanDetailsQuery, useSessionBase as __internal_useSessionBase, useStatementQuery as __internal_useStatementQuery, useUserBase as __internal_useUserBase, useUserEnterpriseConnections as __internal_useUserEnterpriseConnections, __resetClerkQueryClientForTest, __setClerkQueryClientForTest, assertContextExists, createContextAndHook, getClerkQueryClient, isDeeplyEqual, useAPIKeys, useAssertWrappedByClerkProvider, useAttemptToEnableOrganizations, useClerk, useClerkInstanceContext, useDeepEqualMemo, useInitialStateContext, useOAuthConsent, useOAuthDeviceVerification, useOptionsContext, useOrganization, useOrganizationCreationDefaults, useOrganizationList, usePortalRoot, useReverification, useSafeLayoutEffect, useSession, useSessionList, useUser };
|