@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
|
@@ -46,6 +46,8 @@ const ENTERPRISE_CONNECTION_TEST_RUNS_KEY = "enterpriseConnectionTestRuns";
|
|
|
46
46
|
const ORGANIZATION_ENTERPRISE_CONNECTIONS_KEY = "organizationEnterpriseConnections";
|
|
47
47
|
const ORGANIZATION_ENTERPRISE_CONNECTION_TEST_RUNS_KEY = "organizationEnterpriseConnectionTestRuns";
|
|
48
48
|
const ORGANIZATION_DOMAINS_KEY = "organizationDomains";
|
|
49
|
+
const ORGANIZATION_DIRECTORY_SYNC_KEY = "organizationDirectorySync";
|
|
50
|
+
const ORGANIZATION_DIRECTORY_SYNC_USERS_KEY = "organizationDirectorySyncUsers";
|
|
49
51
|
const CREDIT_HISTORY_KEY = "billing-credit-history";
|
|
50
52
|
const INTERNAL_STABLE_KEYS = {
|
|
51
53
|
PAYMENT_ATTEMPT_KEY,
|
|
@@ -56,7 +58,9 @@ const INTERNAL_STABLE_KEYS = {
|
|
|
56
58
|
ENTERPRISE_CONNECTION_TEST_RUNS_KEY,
|
|
57
59
|
ORGANIZATION_ENTERPRISE_CONNECTIONS_KEY,
|
|
58
60
|
ORGANIZATION_ENTERPRISE_CONNECTION_TEST_RUNS_KEY,
|
|
59
|
-
ORGANIZATION_DOMAINS_KEY
|
|
61
|
+
ORGANIZATION_DOMAINS_KEY,
|
|
62
|
+
ORGANIZATION_DIRECTORY_SYNC_KEY,
|
|
63
|
+
ORGANIZATION_DIRECTORY_SYNC_USERS_KEY
|
|
60
64
|
};
|
|
61
65
|
|
|
62
66
|
//#endregion
|
package/dist/types/billing.d.mts
CHANGED
|
@@ -507,7 +507,7 @@ interface BillingInitializedPaymentMethodResource extends ClerkResource {
|
|
|
507
507
|
*/
|
|
508
508
|
externalGatewayId: string;
|
|
509
509
|
/**
|
|
510
|
-
* The order the payment methods will be displayed in when [`<PaymentElement/>`](/docs/nextjs/reference/hooks/use-payment-element#
|
|
510
|
+
* The order the payment methods will be displayed in when [`<PaymentElement/>`](/docs/nextjs/reference/hooks/use-payment-element#paymentelement) renders.
|
|
511
511
|
*/
|
|
512
512
|
paymentMethodOrder: string[];
|
|
513
513
|
}
|
package/dist/types/billing.d.ts
CHANGED
|
@@ -507,7 +507,7 @@ interface BillingInitializedPaymentMethodResource extends ClerkResource {
|
|
|
507
507
|
*/
|
|
508
508
|
externalGatewayId: string;
|
|
509
509
|
/**
|
|
510
|
-
* The order the payment methods will be displayed in when [`<PaymentElement/>`](/docs/nextjs/reference/hooks/use-payment-element#
|
|
510
|
+
* The order the payment methods will be displayed in when [`<PaymentElement/>`](/docs/nextjs/reference/hooks/use-payment-element#paymentelement) renders.
|
|
511
511
|
*/
|
|
512
512
|
paymentMethodOrder: string[];
|
|
513
513
|
}
|
package/dist/types/clerk.d.mts
CHANGED
|
@@ -694,6 +694,22 @@ interface Clerk {
|
|
|
694
694
|
* @hidden
|
|
695
695
|
*/
|
|
696
696
|
__internal_unmountConfigureSSO: (targetNode: HTMLDivElement) => void;
|
|
697
|
+
/**
|
|
698
|
+
* Mount a configure Directory Sync component at the target element.
|
|
699
|
+
*
|
|
700
|
+
* @param targetNode - Target to mount the ConfigureDirectorySync component.
|
|
701
|
+
* @param props - Configuration parameters.
|
|
702
|
+
* @hidden
|
|
703
|
+
*/
|
|
704
|
+
__internal_mountConfigureDirectorySync: (targetNode: HTMLDivElement, props?: ConfigureSSOProps) => void;
|
|
705
|
+
/**
|
|
706
|
+
* Unmount a configure Directory Sync component from the target element.
|
|
707
|
+
* If there is no component mounted at the target node, results in a noop.
|
|
708
|
+
*
|
|
709
|
+
* @param targetNode - Target node to unmount the ConfigureDirectorySync component from.
|
|
710
|
+
* @hidden
|
|
711
|
+
*/
|
|
712
|
+
__internal_unmountConfigureDirectorySync: (targetNode: HTMLDivElement) => void;
|
|
697
713
|
/**
|
|
698
714
|
* Mounts a OAuth consent component at the target element.
|
|
699
715
|
*
|
|
@@ -978,7 +994,7 @@ interface Clerk {
|
|
|
978
994
|
*/
|
|
979
995
|
redirectToTasks(opts?: TasksRedirectOptions): Promise<unknown>;
|
|
980
996
|
/**
|
|
981
|
-
* Completes a Google One Tap redirection flow started by [`authenticateWithGoogleOneTap()`](https://clerk.com/docs/reference/objects/clerk#
|
|
997
|
+
* Completes a Google One Tap redirection flow started by [`authenticateWithGoogleOneTap()`](https://clerk.com/docs/reference/objects/clerk#authenticatewithgoogleonetap). This method should be called after the user is redirected back from visiting the Google One Tap prompt.
|
|
982
998
|
*
|
|
983
999
|
* @param signInOrUp - The resource returned from the initial `authenticateWithGoogleOneTap()` call (before redirect).
|
|
984
1000
|
* @param params - Additional props that define where the user will be redirected to at the end of a successful Google One Tap flow.
|
|
@@ -1711,7 +1727,7 @@ type __internal_EnableOrganizationsPromptProps = {
|
|
|
1711
1727
|
};
|
|
1712
1728
|
type __internal_AttemptToEnableEnvironmentSettingParams = {
|
|
1713
1729
|
for: 'organizations';
|
|
1714
|
-
caller: 'OrganizationSwitcher' | 'OrganizationProfile' | 'InviteMembers' | 'OrganizationList' | 'CreateOrganization' | 'TaskChooseOrganization' | 'ConfigureSSO' | 'useOrganizationList' | 'useOrganization';
|
|
1730
|
+
caller: 'OrganizationSwitcher' | 'OrganizationProfile' | 'InviteMembers' | 'OrganizationList' | 'CreateOrganization' | 'TaskChooseOrganization' | 'ConfigureSSO' | 'ConfigureDirectorySync' | 'useOrganizationList' | 'useOrganization';
|
|
1715
1731
|
onClose?: () => void;
|
|
1716
1732
|
};
|
|
1717
1733
|
type __internal_AttemptToEnableEnvironmentSettingResult = {
|
|
@@ -2773,7 +2789,7 @@ type IsomorphicClerkOptions = Without<ClerkOptions, 'isSatellite'> & {
|
|
|
2773
2789
|
*/
|
|
2774
2790
|
__internal_clerkUIVersion?: string;
|
|
2775
2791
|
/**
|
|
2776
|
-
* The Clerk Publishable Key for your instance. This can be found on the [API keys](https://dashboard.clerk.com
|
|
2792
|
+
* The Clerk Publishable Key for your instance. This can be found on the [API keys](https://dashboard.clerk.com/~/api-keys) page in the Clerk Dashboard.
|
|
2777
2793
|
*/
|
|
2778
2794
|
publishableKey: string;
|
|
2779
2795
|
/**
|
package/dist/types/clerk.d.ts
CHANGED
|
@@ -694,6 +694,22 @@ interface Clerk {
|
|
|
694
694
|
* @hidden
|
|
695
695
|
*/
|
|
696
696
|
__internal_unmountConfigureSSO: (targetNode: HTMLDivElement) => void;
|
|
697
|
+
/**
|
|
698
|
+
* Mount a configure Directory Sync component at the target element.
|
|
699
|
+
*
|
|
700
|
+
* @param targetNode - Target to mount the ConfigureDirectorySync component.
|
|
701
|
+
* @param props - Configuration parameters.
|
|
702
|
+
* @hidden
|
|
703
|
+
*/
|
|
704
|
+
__internal_mountConfigureDirectorySync: (targetNode: HTMLDivElement, props?: ConfigureSSOProps) => void;
|
|
705
|
+
/**
|
|
706
|
+
* Unmount a configure Directory Sync component from the target element.
|
|
707
|
+
* If there is no component mounted at the target node, results in a noop.
|
|
708
|
+
*
|
|
709
|
+
* @param targetNode - Target node to unmount the ConfigureDirectorySync component from.
|
|
710
|
+
* @hidden
|
|
711
|
+
*/
|
|
712
|
+
__internal_unmountConfigureDirectorySync: (targetNode: HTMLDivElement) => void;
|
|
697
713
|
/**
|
|
698
714
|
* Mounts a OAuth consent component at the target element.
|
|
699
715
|
*
|
|
@@ -978,7 +994,7 @@ interface Clerk {
|
|
|
978
994
|
*/
|
|
979
995
|
redirectToTasks(opts?: TasksRedirectOptions): Promise<unknown>;
|
|
980
996
|
/**
|
|
981
|
-
* Completes a Google One Tap redirection flow started by [`authenticateWithGoogleOneTap()`](https://clerk.com/docs/reference/objects/clerk#
|
|
997
|
+
* Completes a Google One Tap redirection flow started by [`authenticateWithGoogleOneTap()`](https://clerk.com/docs/reference/objects/clerk#authenticatewithgoogleonetap). This method should be called after the user is redirected back from visiting the Google One Tap prompt.
|
|
982
998
|
*
|
|
983
999
|
* @param signInOrUp - The resource returned from the initial `authenticateWithGoogleOneTap()` call (before redirect).
|
|
984
1000
|
* @param params - Additional props that define where the user will be redirected to at the end of a successful Google One Tap flow.
|
|
@@ -1711,7 +1727,7 @@ type __internal_EnableOrganizationsPromptProps = {
|
|
|
1711
1727
|
};
|
|
1712
1728
|
type __internal_AttemptToEnableEnvironmentSettingParams = {
|
|
1713
1729
|
for: 'organizations';
|
|
1714
|
-
caller: 'OrganizationSwitcher' | 'OrganizationProfile' | 'InviteMembers' | 'OrganizationList' | 'CreateOrganization' | 'TaskChooseOrganization' | 'ConfigureSSO' | 'useOrganizationList' | 'useOrganization';
|
|
1730
|
+
caller: 'OrganizationSwitcher' | 'OrganizationProfile' | 'InviteMembers' | 'OrganizationList' | 'CreateOrganization' | 'TaskChooseOrganization' | 'ConfigureSSO' | 'ConfigureDirectorySync' | 'useOrganizationList' | 'useOrganization';
|
|
1715
1731
|
onClose?: () => void;
|
|
1716
1732
|
};
|
|
1717
1733
|
type __internal_AttemptToEnableEnvironmentSettingResult = {
|
|
@@ -2773,7 +2789,7 @@ type IsomorphicClerkOptions = Without<ClerkOptions, 'isSatellite'> & {
|
|
|
2773
2789
|
*/
|
|
2774
2790
|
__internal_clerkUIVersion?: string;
|
|
2775
2791
|
/**
|
|
2776
|
-
* The Clerk Publishable Key for your instance. This can be found on the [API keys](https://dashboard.clerk.com
|
|
2792
|
+
* The Clerk Publishable Key for your instance. This can be found on the [API keys](https://dashboard.clerk.com/~/api-keys) page in the Clerk Dashboard.
|
|
2777
2793
|
*/
|
|
2778
2794
|
publishableKey: string;
|
|
2779
2795
|
/**
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { DeletedObjectResource } from "./deletedObject.mjs";
|
|
2
|
+
import { ClerkPaginatedResponse } from "./pagination.mjs";
|
|
3
|
+
import { ClerkResource } from "./resource.mjs";
|
|
4
|
+
import { ClerkResourceJSON } from "./json.mjs";
|
|
5
|
+
|
|
6
|
+
//#region src/types/directorySync.d.ts
|
|
7
|
+
/**
|
|
8
|
+
* The SCIM provider backing a Directory Sync directory. Derived server-side
|
|
9
|
+
* from the linked enterprise connection's identity provider.
|
|
10
|
+
*/
|
|
11
|
+
type DirectorySyncProvider = 'okta' | 'entra' | 'custom' | 'google';
|
|
12
|
+
interface DirectorySyncJSON extends ClerkResourceJSON {
|
|
13
|
+
object: 'directory';
|
|
14
|
+
name: string;
|
|
15
|
+
enterprise_connection_id: string;
|
|
16
|
+
endpoint_url: string;
|
|
17
|
+
provider: DirectorySyncProvider;
|
|
18
|
+
enabled: boolean;
|
|
19
|
+
group_role_mapping_enabled: boolean;
|
|
20
|
+
attribute_mapping: Record<string, string>;
|
|
21
|
+
/**
|
|
22
|
+
* The SCIM bearer token. Only present on create and rotate responses; it
|
|
23
|
+
* cannot be retrieved again afterwards.
|
|
24
|
+
*/
|
|
25
|
+
api_key?: string | null;
|
|
26
|
+
created_at: number;
|
|
27
|
+
updated_at: number;
|
|
28
|
+
}
|
|
29
|
+
type DirectorySyncJSONSnapshot = Omit<DirectorySyncJSON, 'api_key'> & {
|
|
30
|
+
api_key?: never;
|
|
31
|
+
};
|
|
32
|
+
interface DirectorySyncResource extends ClerkResource {
|
|
33
|
+
/** The directory ID. */
|
|
34
|
+
id: string;
|
|
35
|
+
/** The display name of the directory. */
|
|
36
|
+
name: string;
|
|
37
|
+
/** The ID of the organization that owns the directory. */
|
|
38
|
+
organizationId: string;
|
|
39
|
+
/** The ID of the enterprise connection the directory provisions through. */
|
|
40
|
+
enterpriseConnectionId: string;
|
|
41
|
+
/** The SCIM 2.0 endpoint URL the identity provider pushes to. */
|
|
42
|
+
endpointUrl: string;
|
|
43
|
+
/** The SCIM provider, derived from the linked enterprise connection. */
|
|
44
|
+
provider: DirectorySyncProvider;
|
|
45
|
+
/** Whether provisioning is active. */
|
|
46
|
+
enabled: boolean;
|
|
47
|
+
/** Whether directory groups are mapped to organization roles. */
|
|
48
|
+
groupRoleMappingEnabled: boolean;
|
|
49
|
+
/** The SCIM attribute paths mapped onto Clerk user attributes. */
|
|
50
|
+
attributeMapping: Record<string, string>;
|
|
51
|
+
/**
|
|
52
|
+
* The SCIM bearer token. Only populated on the resource returned by
|
|
53
|
+
* `Organization.createDirectorySync` and `rotateToken`; `null` everywhere
|
|
54
|
+
* else — generate a new token if it was lost.
|
|
55
|
+
*/
|
|
56
|
+
apiKey: string | null;
|
|
57
|
+
/** The date when the directory was created. */
|
|
58
|
+
createdAt: Date | null;
|
|
59
|
+
/** The date when the directory was last updated. */
|
|
60
|
+
updatedAt: Date | null;
|
|
61
|
+
/**
|
|
62
|
+
* Updates the directory, e.g. to activate or deactivate provisioning.
|
|
63
|
+
*/
|
|
64
|
+
update: (params: UpdateDirectorySyncParams) => Promise<DirectorySyncResource>;
|
|
65
|
+
/**
|
|
66
|
+
* Mints a new SCIM bearer token, expiring the previous one after a short grace period. The returned resource is
|
|
67
|
+
* the only place the new token is available.
|
|
68
|
+
*/
|
|
69
|
+
rotateToken: () => Promise<DirectorySyncResource>;
|
|
70
|
+
/**
|
|
71
|
+
* Deletes the directory and stops provisioning. Previously provisioned members keep their memberships.
|
|
72
|
+
*/
|
|
73
|
+
delete: () => Promise<DeletedObjectResource>;
|
|
74
|
+
/**
|
|
75
|
+
* Gets the users the identity provider has provisioned into the directory.
|
|
76
|
+
*/
|
|
77
|
+
getUsers: (params?: GetDirectorySyncUsersParams) => Promise<ClerkPaginatedResponse<DirectorySyncUserResource>>;
|
|
78
|
+
__internal_toSnapshot: () => DirectorySyncJSONSnapshot;
|
|
79
|
+
}
|
|
80
|
+
interface DirectorySyncUserJSON extends ClerkResourceJSON {
|
|
81
|
+
object: 'directory_user';
|
|
82
|
+
user_id: string;
|
|
83
|
+
first_name: string | null;
|
|
84
|
+
last_name: string | null;
|
|
85
|
+
identifier: string | null;
|
|
86
|
+
image_url: string;
|
|
87
|
+
has_image: boolean;
|
|
88
|
+
active: boolean;
|
|
89
|
+
provisioned_at: number;
|
|
90
|
+
updated_at: number;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* A user the identity provider has provisioned into the directory. Carries the same identifying fields as
|
|
94
|
+
* `PublicUserData`.
|
|
95
|
+
*/
|
|
96
|
+
interface DirectorySyncUserResource extends ClerkResource {
|
|
97
|
+
id: string;
|
|
98
|
+
userId: string;
|
|
99
|
+
firstName: string | null;
|
|
100
|
+
lastName: string | null;
|
|
101
|
+
/** The user's primary email address. */
|
|
102
|
+
identifier: string | null;
|
|
103
|
+
imageUrl: string;
|
|
104
|
+
hasImage: boolean;
|
|
105
|
+
/** `false` if the identity provider has deprovisioned the user. */
|
|
106
|
+
active: boolean;
|
|
107
|
+
/** The date the user was provisioned into the directory. */
|
|
108
|
+
provisionedAt: Date | null;
|
|
109
|
+
updatedAt: Date | null;
|
|
110
|
+
}
|
|
111
|
+
type UpdateDirectorySyncParams = {
|
|
112
|
+
/** Activates (`true`) or deactivates (`false`) provisioning. */enabled?: boolean; /** Partial attribute mapping to merge into the stored one; `null` values remove keys. */
|
|
113
|
+
attributeMapping?: Record<string, string | null>;
|
|
114
|
+
};
|
|
115
|
+
type CreateDirectorySyncParams = {
|
|
116
|
+
/** Optional display name; defaults to the enterprise connection's name. */name?: string;
|
|
117
|
+
};
|
|
118
|
+
type GetDirectorySyncUsersParams = {
|
|
119
|
+
initialPage?: number;
|
|
120
|
+
pageSize?: number;
|
|
121
|
+
};
|
|
122
|
+
//#endregion
|
|
123
|
+
export { CreateDirectorySyncParams, DirectorySyncJSON, DirectorySyncJSONSnapshot, DirectorySyncProvider, DirectorySyncResource, DirectorySyncUserJSON, DirectorySyncUserResource, GetDirectorySyncUsersParams, UpdateDirectorySyncParams };
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { DeletedObjectResource } from "./deletedObject.js";
|
|
2
|
+
import { ClerkPaginatedResponse } from "./pagination.js";
|
|
3
|
+
import { ClerkResource } from "./resource.js";
|
|
4
|
+
import { ClerkResourceJSON } from "./json.js";
|
|
5
|
+
|
|
6
|
+
//#region src/types/directorySync.d.ts
|
|
7
|
+
/**
|
|
8
|
+
* The SCIM provider backing a Directory Sync directory. Derived server-side
|
|
9
|
+
* from the linked enterprise connection's identity provider.
|
|
10
|
+
*/
|
|
11
|
+
type DirectorySyncProvider = 'okta' | 'entra' | 'custom' | 'google';
|
|
12
|
+
interface DirectorySyncJSON extends ClerkResourceJSON {
|
|
13
|
+
object: 'directory';
|
|
14
|
+
name: string;
|
|
15
|
+
enterprise_connection_id: string;
|
|
16
|
+
endpoint_url: string;
|
|
17
|
+
provider: DirectorySyncProvider;
|
|
18
|
+
enabled: boolean;
|
|
19
|
+
group_role_mapping_enabled: boolean;
|
|
20
|
+
attribute_mapping: Record<string, string>;
|
|
21
|
+
/**
|
|
22
|
+
* The SCIM bearer token. Only present on create and rotate responses; it
|
|
23
|
+
* cannot be retrieved again afterwards.
|
|
24
|
+
*/
|
|
25
|
+
api_key?: string | null;
|
|
26
|
+
created_at: number;
|
|
27
|
+
updated_at: number;
|
|
28
|
+
}
|
|
29
|
+
type DirectorySyncJSONSnapshot = Omit<DirectorySyncJSON, 'api_key'> & {
|
|
30
|
+
api_key?: never;
|
|
31
|
+
};
|
|
32
|
+
interface DirectorySyncResource extends ClerkResource {
|
|
33
|
+
/** The directory ID. */
|
|
34
|
+
id: string;
|
|
35
|
+
/** The display name of the directory. */
|
|
36
|
+
name: string;
|
|
37
|
+
/** The ID of the organization that owns the directory. */
|
|
38
|
+
organizationId: string;
|
|
39
|
+
/** The ID of the enterprise connection the directory provisions through. */
|
|
40
|
+
enterpriseConnectionId: string;
|
|
41
|
+
/** The SCIM 2.0 endpoint URL the identity provider pushes to. */
|
|
42
|
+
endpointUrl: string;
|
|
43
|
+
/** The SCIM provider, derived from the linked enterprise connection. */
|
|
44
|
+
provider: DirectorySyncProvider;
|
|
45
|
+
/** Whether provisioning is active. */
|
|
46
|
+
enabled: boolean;
|
|
47
|
+
/** Whether directory groups are mapped to organization roles. */
|
|
48
|
+
groupRoleMappingEnabled: boolean;
|
|
49
|
+
/** The SCIM attribute paths mapped onto Clerk user attributes. */
|
|
50
|
+
attributeMapping: Record<string, string>;
|
|
51
|
+
/**
|
|
52
|
+
* The SCIM bearer token. Only populated on the resource returned by
|
|
53
|
+
* `Organization.createDirectorySync` and `rotateToken`; `null` everywhere
|
|
54
|
+
* else — generate a new token if it was lost.
|
|
55
|
+
*/
|
|
56
|
+
apiKey: string | null;
|
|
57
|
+
/** The date when the directory was created. */
|
|
58
|
+
createdAt: Date | null;
|
|
59
|
+
/** The date when the directory was last updated. */
|
|
60
|
+
updatedAt: Date | null;
|
|
61
|
+
/**
|
|
62
|
+
* Updates the directory, e.g. to activate or deactivate provisioning.
|
|
63
|
+
*/
|
|
64
|
+
update: (params: UpdateDirectorySyncParams) => Promise<DirectorySyncResource>;
|
|
65
|
+
/**
|
|
66
|
+
* Mints a new SCIM bearer token, expiring the previous one after a short grace period. The returned resource is
|
|
67
|
+
* the only place the new token is available.
|
|
68
|
+
*/
|
|
69
|
+
rotateToken: () => Promise<DirectorySyncResource>;
|
|
70
|
+
/**
|
|
71
|
+
* Deletes the directory and stops provisioning. Previously provisioned members keep their memberships.
|
|
72
|
+
*/
|
|
73
|
+
delete: () => Promise<DeletedObjectResource>;
|
|
74
|
+
/**
|
|
75
|
+
* Gets the users the identity provider has provisioned into the directory.
|
|
76
|
+
*/
|
|
77
|
+
getUsers: (params?: GetDirectorySyncUsersParams) => Promise<ClerkPaginatedResponse<DirectorySyncUserResource>>;
|
|
78
|
+
__internal_toSnapshot: () => DirectorySyncJSONSnapshot;
|
|
79
|
+
}
|
|
80
|
+
interface DirectorySyncUserJSON extends ClerkResourceJSON {
|
|
81
|
+
object: 'directory_user';
|
|
82
|
+
user_id: string;
|
|
83
|
+
first_name: string | null;
|
|
84
|
+
last_name: string | null;
|
|
85
|
+
identifier: string | null;
|
|
86
|
+
image_url: string;
|
|
87
|
+
has_image: boolean;
|
|
88
|
+
active: boolean;
|
|
89
|
+
provisioned_at: number;
|
|
90
|
+
updated_at: number;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* A user the identity provider has provisioned into the directory. Carries the same identifying fields as
|
|
94
|
+
* `PublicUserData`.
|
|
95
|
+
*/
|
|
96
|
+
interface DirectorySyncUserResource extends ClerkResource {
|
|
97
|
+
id: string;
|
|
98
|
+
userId: string;
|
|
99
|
+
firstName: string | null;
|
|
100
|
+
lastName: string | null;
|
|
101
|
+
/** The user's primary email address. */
|
|
102
|
+
identifier: string | null;
|
|
103
|
+
imageUrl: string;
|
|
104
|
+
hasImage: boolean;
|
|
105
|
+
/** `false` if the identity provider has deprovisioned the user. */
|
|
106
|
+
active: boolean;
|
|
107
|
+
/** The date the user was provisioned into the directory. */
|
|
108
|
+
provisionedAt: Date | null;
|
|
109
|
+
updatedAt: Date | null;
|
|
110
|
+
}
|
|
111
|
+
type UpdateDirectorySyncParams = {
|
|
112
|
+
/** Activates (`true`) or deactivates (`false`) provisioning. */enabled?: boolean; /** Partial attribute mapping to merge into the stored one; `null` values remove keys. */
|
|
113
|
+
attributeMapping?: Record<string, string | null>;
|
|
114
|
+
};
|
|
115
|
+
type CreateDirectorySyncParams = {
|
|
116
|
+
/** Optional display name; defaults to the enterprise connection's name. */name?: string;
|
|
117
|
+
};
|
|
118
|
+
type GetDirectorySyncUsersParams = {
|
|
119
|
+
initialPage?: number;
|
|
120
|
+
pageSize?: number;
|
|
121
|
+
};
|
|
122
|
+
//#endregion
|
|
123
|
+
export { CreateDirectorySyncParams, DirectorySyncJSON, DirectorySyncJSONSnapshot, DirectorySyncProvider, DirectorySyncResource, DirectorySyncUserJSON, DirectorySyncUserResource, GetDirectorySyncUsersParams, UpdateDirectorySyncParams };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
//#region src/types/elementIds.d.ts
|
|
2
2
|
type AlertId = 'danger' | 'warning' | 'info';
|
|
3
3
|
type FieldId = 'firstName' | 'lastName' | 'name' | 'slug' | 'emailAddress' | 'phoneNumber' | 'currentPassword' | 'newPassword' | 'signOutOfOtherSessions' | 'passkeyName' | 'password' | 'confirmPassword' | 'identifier' | 'username' | 'code' | 'userCode' | 'role' | 'deleteConfirmation' | 'deleteOrganizationConfirmation' | 'enrollmentMode' | 'affiliationEmailAddress' | 'deleteExistingInvitationsSuggestions' | 'legalAccepted' | 'apiKeyDescription' | 'apiKeyExpirationDate' | 'apiKeyRevokeConfirmation' | 'apiKeySecret' | 'idpCertificate' | 'idpEntityId' | 'idpMetadata' | 'idpMetadataUrl' | 'idpSsoUrl' | 'discoveryUrl' | 'authUrl' | 'tokenUrl' | 'userInfoUrl' | 'clientId' | 'clientSecret' | 'redirectUri' | 'acsUrl' | 'spEntityId' | 'web3WalletName' | 'domain';
|
|
4
|
-
type ProfileSectionId = 'profile' | 'username' | 'emailAddresses' | 'phoneNumbers' | 'connectedAccounts' | 'enterpriseAccounts' | 'web3Wallets' | 'password' | 'passkeys' | 'mfa' | 'danger' | 'activeDevices' | 'organizationProfile' | 'organizationDanger' | 'organizationDomains' | 'manageVerifiedDomains' | 'subscriptionsList' | 'paymentMethods' | 'sso' | 'ssoStatus' | 'enableSso' | 'ssoDomain' | 'ssoConfiguration' | 'configureAgain' | 'resetSso' | 'testSsoUrl' | 'testResults' | 'accountCredits';
|
|
4
|
+
type ProfileSectionId = 'profile' | 'username' | 'emailAddresses' | 'phoneNumbers' | 'connectedAccounts' | 'enterpriseAccounts' | 'web3Wallets' | 'password' | 'passkeys' | 'mfa' | 'danger' | 'activeDevices' | 'organizationProfile' | 'organizationDanger' | 'organizationDomains' | 'manageVerifiedDomains' | 'subscriptionsList' | 'paymentMethods' | 'sso' | 'directorySync' | 'ssoStatus' | 'enableSso' | 'ssoDomain' | 'ssoConfiguration' | 'configureAgain' | 'resetSso' | 'testSsoUrl' | 'testResults' | 'accountCredits';
|
|
5
5
|
type ProfilePageId = 'account' | 'security' | 'organizationGeneral' | 'organizationMembers' | 'organizationSecurity' | 'billing';
|
|
6
6
|
type UserPreviewId = 'userButton' | 'personalWorkspace';
|
|
7
7
|
type OrganizationPreviewId = 'organizationSwitcherTrigger' | 'organizationList' | 'organizationSwitcherListedOrganization' | 'organizationSwitcherActiveOrganization' | 'taskChooseOrganization';
|
|
8
|
-
type CardActionId = 'havingTrouble' | 'alternativeMethods' | 'signUp' | 'signIn' | 'usePasskey' | 'waitlist' | 'signOut';
|
|
8
|
+
type CardActionId = 'havingTrouble' | 'alternativeMethods' | 'signUp' | 'signIn' | 'usePasskey' | 'waitlist' | 'signOut' | 'ssoFallback';
|
|
9
9
|
type MenuId = 'invitation' | 'member' | ProfileSectionId;
|
|
10
10
|
type SelectId = 'countryCode' | 'role' | 'paymentMethod' | 'apiKeyExpiration';
|
|
11
11
|
//#endregion
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
//#region src/types/elementIds.d.ts
|
|
2
2
|
type AlertId = 'danger' | 'warning' | 'info';
|
|
3
3
|
type FieldId = 'firstName' | 'lastName' | 'name' | 'slug' | 'emailAddress' | 'phoneNumber' | 'currentPassword' | 'newPassword' | 'signOutOfOtherSessions' | 'passkeyName' | 'password' | 'confirmPassword' | 'identifier' | 'username' | 'code' | 'userCode' | 'role' | 'deleteConfirmation' | 'deleteOrganizationConfirmation' | 'enrollmentMode' | 'affiliationEmailAddress' | 'deleteExistingInvitationsSuggestions' | 'legalAccepted' | 'apiKeyDescription' | 'apiKeyExpirationDate' | 'apiKeyRevokeConfirmation' | 'apiKeySecret' | 'idpCertificate' | 'idpEntityId' | 'idpMetadata' | 'idpMetadataUrl' | 'idpSsoUrl' | 'discoveryUrl' | 'authUrl' | 'tokenUrl' | 'userInfoUrl' | 'clientId' | 'clientSecret' | 'redirectUri' | 'acsUrl' | 'spEntityId' | 'web3WalletName' | 'domain';
|
|
4
|
-
type ProfileSectionId = 'profile' | 'username' | 'emailAddresses' | 'phoneNumbers' | 'connectedAccounts' | 'enterpriseAccounts' | 'web3Wallets' | 'password' | 'passkeys' | 'mfa' | 'danger' | 'activeDevices' | 'organizationProfile' | 'organizationDanger' | 'organizationDomains' | 'manageVerifiedDomains' | 'subscriptionsList' | 'paymentMethods' | 'sso' | 'ssoStatus' | 'enableSso' | 'ssoDomain' | 'ssoConfiguration' | 'configureAgain' | 'resetSso' | 'testSsoUrl' | 'testResults' | 'accountCredits';
|
|
4
|
+
type ProfileSectionId = 'profile' | 'username' | 'emailAddresses' | 'phoneNumbers' | 'connectedAccounts' | 'enterpriseAccounts' | 'web3Wallets' | 'password' | 'passkeys' | 'mfa' | 'danger' | 'activeDevices' | 'organizationProfile' | 'organizationDanger' | 'organizationDomains' | 'manageVerifiedDomains' | 'subscriptionsList' | 'paymentMethods' | 'sso' | 'directorySync' | 'ssoStatus' | 'enableSso' | 'ssoDomain' | 'ssoConfiguration' | 'configureAgain' | 'resetSso' | 'testSsoUrl' | 'testResults' | 'accountCredits';
|
|
5
5
|
type ProfilePageId = 'account' | 'security' | 'organizationGeneral' | 'organizationMembers' | 'organizationSecurity' | 'billing';
|
|
6
6
|
type UserPreviewId = 'userButton' | 'personalWorkspace';
|
|
7
7
|
type OrganizationPreviewId = 'organizationSwitcherTrigger' | 'organizationList' | 'organizationSwitcherListedOrganization' | 'organizationSwitcherActiveOrganization' | 'taskChooseOrganization';
|
|
8
|
-
type CardActionId = 'havingTrouble' | 'alternativeMethods' | 'signUp' | 'signIn' | 'usePasskey' | 'waitlist' | 'signOut';
|
|
8
|
+
type CardActionId = 'havingTrouble' | 'alternativeMethods' | 'signUp' | 'signIn' | 'usePasskey' | 'waitlist' | 'signOut' | 'ssoFallback';
|
|
9
9
|
type MenuId = 'invitation' | 'member' | ProfileSectionId;
|
|
10
10
|
type SelectId = 'countryCode' | 'role' | 'paymentMethod' | 'apiKeyExpiration';
|
|
11
11
|
//#endregion
|
package/dist/types/hooks.d.mts
CHANGED
|
@@ -20,7 +20,7 @@ type CheckAuthorizationSignedOut = CheckAuthorizationWithoutOrgOrUser;
|
|
|
20
20
|
*/
|
|
21
21
|
type UseAuthReturn = {
|
|
22
22
|
/**
|
|
23
|
-
* 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#
|
|
23
|
+
* 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)).
|
|
24
24
|
*/
|
|
25
25
|
isLoaded: false;
|
|
26
26
|
/**
|
|
@@ -60,11 +60,11 @@ type UseAuthReturn = {
|
|
|
60
60
|
*/
|
|
61
61
|
has: CheckAuthorizationSignedOut;
|
|
62
62
|
/**
|
|
63
|
-
* A function that signs out the current user. Returns a promise that resolves when complete. See the [reference doc](https://clerk.com/docs/reference/objects/clerk#
|
|
63
|
+
* A function that signs out the current user. Returns a promise that resolves when complete. See the [reference doc](https://clerk.com/docs/reference/objects/clerk#signout).
|
|
64
64
|
*/
|
|
65
65
|
signOut: SignOut;
|
|
66
66
|
/**
|
|
67
|
-
* A function that retrieves the current user's session token or a custom JWT template. Returns a promise that resolves to the token. See the [reference doc](https://clerk.com/docs/reference/objects/session#
|
|
67
|
+
* A function that retrieves the current user's session token or a custom JWT template. Returns a promise that resolves to the token. See the [reference doc](https://clerk.com/docs/reference/objects/session#gettoken).
|
|
68
68
|
*/
|
|
69
69
|
getToken: GetToken;
|
|
70
70
|
} | {
|
|
@@ -112,7 +112,7 @@ type UseAuthReturn = {
|
|
|
112
112
|
*/
|
|
113
113
|
type UseSignInReturn = {
|
|
114
114
|
/**
|
|
115
|
-
* 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#
|
|
115
|
+
* 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)).
|
|
116
116
|
*/
|
|
117
117
|
isLoaded: false;
|
|
118
118
|
/**
|
|
@@ -120,7 +120,7 @@ type UseSignInReturn = {
|
|
|
120
120
|
*/
|
|
121
121
|
signIn: undefined;
|
|
122
122
|
/**
|
|
123
|
-
* A function that sets the active session. See the [reference doc](https://clerk.com/docs/reference/objects/clerk#
|
|
123
|
+
* A function that sets the active session. See the [reference doc](https://clerk.com/docs/reference/objects/clerk#setactive).
|
|
124
124
|
*/
|
|
125
125
|
setActive: undefined;
|
|
126
126
|
} | {
|
|
@@ -133,7 +133,7 @@ type UseSignInReturn = {
|
|
|
133
133
|
*/
|
|
134
134
|
type UseSignUpReturn = {
|
|
135
135
|
/**
|
|
136
|
-
* 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#
|
|
136
|
+
* 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)).
|
|
137
137
|
*/
|
|
138
138
|
isLoaded: false;
|
|
139
139
|
/**
|
|
@@ -141,7 +141,7 @@ type UseSignUpReturn = {
|
|
|
141
141
|
*/
|
|
142
142
|
signUp: undefined;
|
|
143
143
|
/**
|
|
144
|
-
* A function that sets the active session. See the [reference doc](https://clerk.com/docs/reference/objects/clerk#
|
|
144
|
+
* A function that sets the active session. See the [reference doc](https://clerk.com/docs/reference/objects/clerk#setactive).
|
|
145
145
|
*/
|
|
146
146
|
setActive: undefined;
|
|
147
147
|
} | {
|
|
@@ -154,7 +154,7 @@ type UseSignUpReturn = {
|
|
|
154
154
|
*/
|
|
155
155
|
type UseSessionReturn = {
|
|
156
156
|
/**
|
|
157
|
-
* 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#
|
|
157
|
+
* 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)).
|
|
158
158
|
*/
|
|
159
159
|
isLoaded: false;
|
|
160
160
|
/**
|
|
@@ -179,7 +179,7 @@ type UseSessionReturn = {
|
|
|
179
179
|
*/
|
|
180
180
|
type UseSessionListReturn = {
|
|
181
181
|
/**
|
|
182
|
-
* 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#
|
|
182
|
+
* 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)).
|
|
183
183
|
*/
|
|
184
184
|
isLoaded: false;
|
|
185
185
|
/**
|
|
@@ -187,7 +187,7 @@ type UseSessionListReturn = {
|
|
|
187
187
|
*/
|
|
188
188
|
sessions: undefined;
|
|
189
189
|
/**
|
|
190
|
-
* A function that sets the active session and/or Organization. See the [reference doc](https://clerk.com/docs/reference/objects/clerk#
|
|
190
|
+
* A function that sets the active session and/or Organization. See the [reference doc](https://clerk.com/docs/reference/objects/clerk#setactive).
|
|
191
191
|
*/
|
|
192
192
|
setActive: undefined;
|
|
193
193
|
} | {
|
|
@@ -200,7 +200,7 @@ type UseSessionListReturn = {
|
|
|
200
200
|
*/
|
|
201
201
|
type UseUserReturn = {
|
|
202
202
|
/**
|
|
203
|
-
* 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#
|
|
203
|
+
* 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)).
|
|
204
204
|
*/
|
|
205
205
|
isLoaded: false;
|
|
206
206
|
/**
|
package/dist/types/hooks.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ type CheckAuthorizationSignedOut = CheckAuthorizationWithoutOrgOrUser;
|
|
|
20
20
|
*/
|
|
21
21
|
type UseAuthReturn = {
|
|
22
22
|
/**
|
|
23
|
-
* 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#
|
|
23
|
+
* 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)).
|
|
24
24
|
*/
|
|
25
25
|
isLoaded: false;
|
|
26
26
|
/**
|
|
@@ -60,11 +60,11 @@ type UseAuthReturn = {
|
|
|
60
60
|
*/
|
|
61
61
|
has: CheckAuthorizationSignedOut;
|
|
62
62
|
/**
|
|
63
|
-
* A function that signs out the current user. Returns a promise that resolves when complete. See the [reference doc](https://clerk.com/docs/reference/objects/clerk#
|
|
63
|
+
* A function that signs out the current user. Returns a promise that resolves when complete. See the [reference doc](https://clerk.com/docs/reference/objects/clerk#signout).
|
|
64
64
|
*/
|
|
65
65
|
signOut: SignOut;
|
|
66
66
|
/**
|
|
67
|
-
* A function that retrieves the current user's session token or a custom JWT template. Returns a promise that resolves to the token. See the [reference doc](https://clerk.com/docs/reference/objects/session#
|
|
67
|
+
* A function that retrieves the current user's session token or a custom JWT template. Returns a promise that resolves to the token. See the [reference doc](https://clerk.com/docs/reference/objects/session#gettoken).
|
|
68
68
|
*/
|
|
69
69
|
getToken: GetToken;
|
|
70
70
|
} | {
|
|
@@ -112,7 +112,7 @@ type UseAuthReturn = {
|
|
|
112
112
|
*/
|
|
113
113
|
type UseSignInReturn = {
|
|
114
114
|
/**
|
|
115
|
-
* 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#
|
|
115
|
+
* 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)).
|
|
116
116
|
*/
|
|
117
117
|
isLoaded: false;
|
|
118
118
|
/**
|
|
@@ -120,7 +120,7 @@ type UseSignInReturn = {
|
|
|
120
120
|
*/
|
|
121
121
|
signIn: undefined;
|
|
122
122
|
/**
|
|
123
|
-
* A function that sets the active session. See the [reference doc](https://clerk.com/docs/reference/objects/clerk#
|
|
123
|
+
* A function that sets the active session. See the [reference doc](https://clerk.com/docs/reference/objects/clerk#setactive).
|
|
124
124
|
*/
|
|
125
125
|
setActive: undefined;
|
|
126
126
|
} | {
|
|
@@ -133,7 +133,7 @@ type UseSignInReturn = {
|
|
|
133
133
|
*/
|
|
134
134
|
type UseSignUpReturn = {
|
|
135
135
|
/**
|
|
136
|
-
* 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#
|
|
136
|
+
* 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)).
|
|
137
137
|
*/
|
|
138
138
|
isLoaded: false;
|
|
139
139
|
/**
|
|
@@ -141,7 +141,7 @@ type UseSignUpReturn = {
|
|
|
141
141
|
*/
|
|
142
142
|
signUp: undefined;
|
|
143
143
|
/**
|
|
144
|
-
* A function that sets the active session. See the [reference doc](https://clerk.com/docs/reference/objects/clerk#
|
|
144
|
+
* A function that sets the active session. See the [reference doc](https://clerk.com/docs/reference/objects/clerk#setactive).
|
|
145
145
|
*/
|
|
146
146
|
setActive: undefined;
|
|
147
147
|
} | {
|
|
@@ -154,7 +154,7 @@ type UseSignUpReturn = {
|
|
|
154
154
|
*/
|
|
155
155
|
type UseSessionReturn = {
|
|
156
156
|
/**
|
|
157
|
-
* 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#
|
|
157
|
+
* 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)).
|
|
158
158
|
*/
|
|
159
159
|
isLoaded: false;
|
|
160
160
|
/**
|
|
@@ -179,7 +179,7 @@ type UseSessionReturn = {
|
|
|
179
179
|
*/
|
|
180
180
|
type UseSessionListReturn = {
|
|
181
181
|
/**
|
|
182
|
-
* 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#
|
|
182
|
+
* 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)).
|
|
183
183
|
*/
|
|
184
184
|
isLoaded: false;
|
|
185
185
|
/**
|
|
@@ -187,7 +187,7 @@ type UseSessionListReturn = {
|
|
|
187
187
|
*/
|
|
188
188
|
sessions: undefined;
|
|
189
189
|
/**
|
|
190
|
-
* A function that sets the active session and/or Organization. See the [reference doc](https://clerk.com/docs/reference/objects/clerk#
|
|
190
|
+
* A function that sets the active session and/or Organization. See the [reference doc](https://clerk.com/docs/reference/objects/clerk#setactive).
|
|
191
191
|
*/
|
|
192
192
|
setActive: undefined;
|
|
193
193
|
} | {
|
|
@@ -200,7 +200,7 @@ type UseSessionListReturn = {
|
|
|
200
200
|
*/
|
|
201
201
|
type UseUserReturn = {
|
|
202
202
|
/**
|
|
203
|
-
* 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#
|
|
203
|
+
* 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)).
|
|
204
204
|
*/
|
|
205
205
|
isLoaded: false;
|
|
206
206
|
/**
|