From 59975bb926baa5ac6c370b536be2e8a8453fa955 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 10 Dec 2025 18:41:41 +0000 Subject: [PATCH] docs: update TypeDoc documentation from clerk/javascript@8da0107 --- clerk-typedoc/backend/auth-object.mdx | 4 +- .../backend/authenticate-request-options.mdx | 49 ++++++------- clerk-typedoc/backend/billing-plan.mdx | 28 ++++---- .../backend/billing-subscription-item.mdx | 6 +- clerk-typedoc/backend/feature.mdx | 12 ++-- .../backend/get-auth-fn-no-request.mdx | 8 +-- clerk-typedoc/backend/get-auth-fn.mdx | 6 +- .../backend/organization-invitation.mdx | 8 +-- .../backend/organization-membership.mdx | 8 +-- .../backend/organization-sync-options.mdx | 8 +-- .../backend/organization-sync-target.mdx | 2 +- clerk-typedoc/backend/organization.mdx | 24 +++---- .../backend/public-organization-data-json.mdx | 8 +-- clerk-typedoc/backend/saml-account.mdx | 17 ----- clerk-typedoc/backend/saml-connection.mdx | 4 +- clerk-typedoc/backend/session.mdx | 2 +- clerk-typedoc/backend/user.mdx | 5 +- .../backend/verify-machine-auth-token.mdx | 29 ++++---- .../backend/verify-token-options.mdx | 1 + clerk-typedoc/backend/verify-token.mdx | 28 ++++---- clerk-typedoc/clerk-react/api-keys-params.mdx | 5 -- clerk-typedoc/clerk-react/api-keys-return.mdx | 7 -- .../clerk-react/checkout-button-params.mdx | 5 -- .../clerk-react/checkout-button-return.mdx | 7 -- .../experimental_use-checkout-params.mdx | 5 -- .../experimental_use-checkout-return.mdx | 3 - .../plan-details-button-params.mdx | 5 -- .../plan-details-button-return.mdx | 7 -- clerk-typedoc/clerk-react/protect-params.mdx | 5 -- clerk-typedoc/clerk-react/protect-return.mdx | 3 - ...redirect-to-create-organization-params.mdx | 5 -- ...redirect-to-create-organization-return.mdx | 3 - ...edirect-to-organization-profile-params.mdx | 5 -- ...edirect-to-organization-profile-return.mdx | 3 - .../redirect-to-user-profile-params.mdx | 5 -- .../redirect-to-user-profile-return.mdx | 3 - .../subscription-details-button-params.mdx | 5 -- .../subscription-details-button-return.mdx | 7 -- clerk-typedoc/clerk-react/use-auth-params.mdx | 5 -- clerk-typedoc/clerk-react/use-auth-return.mdx | 70 ------------------- .../clerk-react/use-clerk-return.mdx | 3 - .../use-organization-list-params.mdx | 5 -- .../use-organization-list-return.mdx | 3 - .../clerk-react/use-organization-params.mdx | 5 -- .../clerk-react/use-organization-return.mdx | 3 - .../clerk-react/use-reverification-params.mdx | 6 -- .../clerk-react/use-reverification-return.mdx | 3 - .../clerk-react/use-session-list-return.mdx | 20 ------ .../clerk-react/use-session-return.mdx | 27 ------- .../clerk-react/use-sign-in-return.mdx | 20 ------ .../clerk-react/use-sign-in-signal-return.mdx | 3 - .../clerk-react/use-sign-up-return.mdx | 20 ------ .../clerk-react/use-sign-up-signal-return.mdx | 3 - clerk-typedoc/clerk-react/use-user-return.mdx | 27 ------- .../nextjs/clerk-middleware-auth-object.mdx | 3 - .../nextjs/clerk-middleware-options.mdx | 51 +++++++------- .../{clerk-react => react}/api-keys.mdx | 0 clerk-typedoc/react/checkout-button-props.mdx | 7 ++ .../checkout-button.mdx | 4 +- .../clerk-provider-props.mdx | 15 ++-- .../experimental_use-checkout.mdx | 2 +- .../react/plan-details-button-props.mdx | 4 ++ .../plan-details-button.mdx | 4 +- .../{clerk-react => react}/protect.mdx | 0 .../redirect-to-create-organization.mdx | 0 .../redirect-to-organization-profile.mdx | 0 .../redirect-to-user-profile.mdx | 0 .../subscription-details-button-props.mdx | 7 ++ .../subscription-details-button.mdx | 8 +-- .../{clerk-react => react}/use-auth.mdx | 34 ++++----- .../{clerk-react => react}/use-clerk.mdx | 2 +- .../use-organization-list.mdx | 6 +- .../use-organization.mdx | 10 +-- .../use-reverification.mdx | 6 +- .../use-session-list.mdx | 6 +- .../{clerk-react => react}/use-session.mdx | 2 +- .../use-sign-in-1.mdx} | 4 +- .../use-sign-in.mdx} | 2 +- .../use-sign-up-1.mdx} | 4 +- .../use-sign-up.mdx} | 2 +- .../{clerk-react => react}/use-user.mdx | 6 +- .../shared/api-url-from-publishable-key.mdx | 11 --- .../shared/billing-checkout-resource.mdx | 8 +-- .../shared/billing-checkout-totals.mdx | 2 +- .../shared/billing-payer-resource.mdx | 4 +- .../billing-payment-method-resource.mdx | 4 +- .../shared/billing-payment-resource.mdx | 2 +- .../shared/billing-plan-resource.mdx | 34 ++++----- .../shared/billing-statement-resource.mdx | 2 +- .../shared/billing-statement-totals.mdx | 2 +- .../billing-subscription-item-resource.mdx | 4 +- .../billing-subscription-plan-period.mdx | 2 +- .../build-clerk-js-script-attributes.mdx | 11 --- .../shared/build-publishable-key.mdx | 11 --- clerk-typedoc/shared/camel-to-snake.mdx | 11 --- ...heck-authorization-from-session-claims.mdx | 2 +- ...thorization-params-from-session-claims.mdx | 8 +-- .../shared/checkout-flow-resource.mdx | 2 + .../shared/checkout-signal-value.mdx | 9 +++ clerk-typedoc/shared/clerk-api-error-1.mdx | 24 ------- clerk-typedoc/shared/clerk-api-error.mdx | 32 ++++++--- .../shared/clerk-appearance-theme.mdx | 3 + clerk-typedoc/shared/clerk-js-script-url.mdx | 18 ----- clerk-typedoc/shared/clerk-jwt-claims.mdx | 6 +- clerk-typedoc/shared/clerk-runtime-error.mdx | 15 ---- clerk-typedoc/shared/clerk.mdx | 24 ++++--- .../shared/create-clerk-global-hook-error.mdx | 13 ---- .../create-dev-or-staging-url-cache.mdx | 10 --- .../shared/create-organization-params.mdx | 4 +- clerk-typedoc/shared/create-path-matcher.mdx | 21 ------ clerk-typedoc/shared/deep-camel-to-snake.mdx | 13 ---- clerk-typedoc/shared/deep-snake-to-camel.mdx | 13 ---- .../shared/deprecated-object-property.mdx | 21 ------ clerk-typedoc/shared/derive-state.mdx | 29 -------- clerk-typedoc/shared/element-object-key.mdx | 1 - clerk-typedoc/shared/elements-config.mdx | 3 - ...experimental_plan-details-button-props.mdx | 8 +-- ...ntal_subscription-details-button-props.mdx | 2 +- .../extract-dev-browser-jwt-from-url.mdx | 13 ---- .../shared/fast-deep-merge-and-replace.mdx | 14 ---- clerk-typedoc/shared/feature-resource.mdx | 12 ++-- clerk-typedoc/shared/force-null.mdx | 1 + .../get-clerk-js-major-version-or-tag.mdx | 14 ---- clerk-typedoc/shared/get-cookie-suffix.mdx | 13 ---- clerk-typedoc/shared/get-env-variable.mdx | 12 ---- .../shared/get-non-undefined-values.mdx | 11 --- clerk-typedoc/shared/get-script-url.mdx | 14 ---- .../shared/get-suffixed-cookie-name.mdx | 13 ---- clerk-typedoc/shared/hook-params.mdx | 2 +- clerk-typedoc/shared/icon-image-url.mdx | 13 ---- clerk-typedoc/shared/id-selectors.mdx | 1 - clerk-typedoc/shared/in-browser.mdx | 5 -- .../shared/internal_plan-details-props.mdx | 2 +- .../internal_subscription-details-props.mdx | 2 +- clerk-typedoc/shared/is-browser-online.mdx | 5 -- .../shared/is-clerk-runtime-error.mdx | 24 ------- .../is-development-from-publishable-key.mdx | 12 ---- .../shared/is-development-from-secret-key.mdx | 12 ---- clerk-typedoc/shared/is-ipv4-address.mdx | 11 --- .../is-production-from-publishable-key.mdx | 12 ---- .../shared/is-production-from-secret-key.mdx | 12 ---- clerk-typedoc/shared/is-publishable-key.mdx | 11 --- clerk-typedoc/shared/is-staging.mdx | 11 --- clerk-typedoc/shared/is-truthy.mdx | 11 --- .../shared/is-valid-browser-online.mdx | 5 -- clerk-typedoc/shared/is-valid-browser.mdx | 5 -- clerk-typedoc/shared/isomorphic-atob.mdx | 12 ---- clerk-typedoc/shared/jwt-claims.mdx | 6 +- .../shared/legacy-redirect-props.mdx | 13 ---- clerk-typedoc/shared/load-clerk-js-script.mdx | 26 ------- .../local-storage-broadcast-channel.mdx | 4 -- .../shared/localization-resource.mdx | 2 +- .../shared/organization-custom-role-key.mdx | 4 +- .../organization-invitation-resource.mdx | 2 +- .../shared/organization-permission-key.mdx | 4 +- .../shared/organization-resource.mdx | 4 +- .../shared/parse-publishable-key.mdx | 47 ------------- .../shared/payment-element-provider-props.mdx | 12 ++-- clerk-typedoc/shared/protect-props.mdx | 12 ++-- clerk-typedoc/shared/read-json-file.mdx | 14 ---- clerk-typedoc/shared/remove-functions.mdx | 1 + clerk-typedoc/shared/saml-strategy.mdx | 3 - clerk-typedoc/shared/set-active-params.mdx | 5 +- ...et-clerk-js-loading-error-package-name.mdx | 17 ----- clerk-typedoc/shared/snake-to-camel.mdx | 11 --- clerk-typedoc/shared/state-selectors.mdx | 1 - clerk-typedoc/shared/titleize.mdx | 17 ----- clerk-typedoc/shared/to-sentence.mdx | 11 --- clerk-typedoc/shared/use-auth-return.mdx | 8 +-- clerk-typedoc/shared/use-checkout-options.mdx | 6 +- clerk-typedoc/shared/use-checkout-return.mdx | 23 ------ clerk-typedoc/shared/use-checkout.mdx | 2 +- clerk-typedoc/shared/use-clerk.mdx | 2 +- .../shared/use-organization-list-return.mdx | 8 +-- .../shared/use-organization-list.mdx | 6 +- .../shared/use-organization-params.mdx | 2 +- .../shared/use-organization-return.mdx | 12 ++-- clerk-typedoc/shared/use-organization.mdx | 10 +-- clerk-typedoc/shared/use-reverification.mdx | 6 +- .../shared/use-session-list-return.mdx | 2 +- clerk-typedoc/shared/use-session-list.mdx | 6 +- clerk-typedoc/shared/use-session.mdx | 2 +- .../shared/use-subscription-params.mdx | 2 +- clerk-typedoc/shared/use-user.mdx | 6 +- clerk-typedoc/shared/user-agent-is-robot.mdx | 11 --- clerk-typedoc/shared/user-resource.mdx | 15 ++-- clerk-typedoc/shared/version-selector.mdx | 17 ----- 187 files changed, 402 insertions(+), 1391 deletions(-) delete mode 100644 clerk-typedoc/backend/saml-account.mdx delete mode 100644 clerk-typedoc/clerk-react/api-keys-params.mdx delete mode 100644 clerk-typedoc/clerk-react/api-keys-return.mdx delete mode 100644 clerk-typedoc/clerk-react/checkout-button-params.mdx delete mode 100644 clerk-typedoc/clerk-react/checkout-button-return.mdx delete mode 100644 clerk-typedoc/clerk-react/experimental_use-checkout-params.mdx delete mode 100644 clerk-typedoc/clerk-react/experimental_use-checkout-return.mdx delete mode 100644 clerk-typedoc/clerk-react/plan-details-button-params.mdx delete mode 100644 clerk-typedoc/clerk-react/plan-details-button-return.mdx delete mode 100644 clerk-typedoc/clerk-react/protect-params.mdx delete mode 100644 clerk-typedoc/clerk-react/protect-return.mdx delete mode 100644 clerk-typedoc/clerk-react/redirect-to-create-organization-params.mdx delete mode 100644 clerk-typedoc/clerk-react/redirect-to-create-organization-return.mdx delete mode 100644 clerk-typedoc/clerk-react/redirect-to-organization-profile-params.mdx delete mode 100644 clerk-typedoc/clerk-react/redirect-to-organization-profile-return.mdx delete mode 100644 clerk-typedoc/clerk-react/redirect-to-user-profile-params.mdx delete mode 100644 clerk-typedoc/clerk-react/redirect-to-user-profile-return.mdx delete mode 100644 clerk-typedoc/clerk-react/subscription-details-button-params.mdx delete mode 100644 clerk-typedoc/clerk-react/subscription-details-button-return.mdx delete mode 100644 clerk-typedoc/clerk-react/use-auth-params.mdx delete mode 100644 clerk-typedoc/clerk-react/use-auth-return.mdx delete mode 100644 clerk-typedoc/clerk-react/use-clerk-return.mdx delete mode 100644 clerk-typedoc/clerk-react/use-organization-list-params.mdx delete mode 100644 clerk-typedoc/clerk-react/use-organization-list-return.mdx delete mode 100644 clerk-typedoc/clerk-react/use-organization-params.mdx delete mode 100644 clerk-typedoc/clerk-react/use-organization-return.mdx delete mode 100644 clerk-typedoc/clerk-react/use-reverification-params.mdx delete mode 100644 clerk-typedoc/clerk-react/use-reverification-return.mdx delete mode 100644 clerk-typedoc/clerk-react/use-session-list-return.mdx delete mode 100644 clerk-typedoc/clerk-react/use-session-return.mdx delete mode 100644 clerk-typedoc/clerk-react/use-sign-in-return.mdx delete mode 100644 clerk-typedoc/clerk-react/use-sign-in-signal-return.mdx delete mode 100644 clerk-typedoc/clerk-react/use-sign-up-return.mdx delete mode 100644 clerk-typedoc/clerk-react/use-sign-up-signal-return.mdx delete mode 100644 clerk-typedoc/clerk-react/use-user-return.mdx delete mode 100644 clerk-typedoc/nextjs/clerk-middleware-auth-object.mdx rename clerk-typedoc/{clerk-react => react}/api-keys.mdx (100%) create mode 100644 clerk-typedoc/react/checkout-button-props.mdx rename clerk-typedoc/{clerk-react => react}/checkout-button.mdx (91%) rename clerk-typedoc/{clerk-react => react}/clerk-provider-props.mdx (95%) rename clerk-typedoc/{clerk-react => react}/experimental_use-checkout.mdx (95%) create mode 100644 clerk-typedoc/react/plan-details-button-props.mdx rename clerk-typedoc/{clerk-react => react}/plan-details-button.mdx (90%) rename clerk-typedoc/{clerk-react => react}/protect.mdx (100%) rename clerk-typedoc/{clerk-react => react}/redirect-to-create-organization.mdx (100%) rename clerk-typedoc/{clerk-react => react}/redirect-to-organization-profile.mdx (100%) rename clerk-typedoc/{clerk-react => react}/redirect-to-user-profile.mdx (100%) create mode 100644 clerk-typedoc/react/subscription-details-button-props.mdx rename clerk-typedoc/{clerk-react => react}/subscription-details-button.mdx (81%) rename clerk-typedoc/{clerk-react => react}/use-auth.mdx (91%) rename clerk-typedoc/{clerk-react => react}/use-clerk.mdx (96%) rename clerk-typedoc/{clerk-react => react}/use-organization-list.mdx (95%) rename clerk-typedoc/{clerk-react => react}/use-organization.mdx (93%) rename clerk-typedoc/{clerk-react => react}/use-reverification.mdx (90%) rename clerk-typedoc/{clerk-react => react}/use-session-list.mdx (92%) rename clerk-typedoc/{clerk-react => react}/use-session.mdx (98%) rename clerk-typedoc/{clerk-react/use-sign-in.mdx => react/use-sign-in-1.mdx} (97%) rename clerk-typedoc/{clerk-react/use-sign-in-signal.mdx => react/use-sign-in.mdx} (76%) rename clerk-typedoc/{clerk-react/use-sign-up.mdx => react/use-sign-up-1.mdx} (97%) rename clerk-typedoc/{clerk-react/use-sign-up-signal.mdx => react/use-sign-up.mdx} (76%) rename clerk-typedoc/{clerk-react => react}/use-user.mdx (97%) delete mode 100644 clerk-typedoc/shared/api-url-from-publishable-key.mdx delete mode 100644 clerk-typedoc/shared/build-clerk-js-script-attributes.mdx delete mode 100644 clerk-typedoc/shared/build-publishable-key.mdx delete mode 100644 clerk-typedoc/shared/camel-to-snake.mdx create mode 100644 clerk-typedoc/shared/checkout-flow-resource.mdx create mode 100644 clerk-typedoc/shared/checkout-signal-value.mdx delete mode 100644 clerk-typedoc/shared/clerk-api-error-1.mdx create mode 100644 clerk-typedoc/shared/clerk-appearance-theme.mdx delete mode 100644 clerk-typedoc/shared/clerk-js-script-url.mdx delete mode 100644 clerk-typedoc/shared/clerk-runtime-error.mdx delete mode 100644 clerk-typedoc/shared/create-clerk-global-hook-error.mdx delete mode 100644 clerk-typedoc/shared/create-dev-or-staging-url-cache.mdx delete mode 100644 clerk-typedoc/shared/create-path-matcher.mdx delete mode 100644 clerk-typedoc/shared/deep-camel-to-snake.mdx delete mode 100644 clerk-typedoc/shared/deep-snake-to-camel.mdx delete mode 100644 clerk-typedoc/shared/deprecated-object-property.mdx delete mode 100644 clerk-typedoc/shared/derive-state.mdx delete mode 100644 clerk-typedoc/shared/element-object-key.mdx delete mode 100644 clerk-typedoc/shared/elements-config.mdx delete mode 100644 clerk-typedoc/shared/extract-dev-browser-jwt-from-url.mdx delete mode 100644 clerk-typedoc/shared/fast-deep-merge-and-replace.mdx create mode 100644 clerk-typedoc/shared/force-null.mdx delete mode 100644 clerk-typedoc/shared/get-clerk-js-major-version-or-tag.mdx delete mode 100644 clerk-typedoc/shared/get-cookie-suffix.mdx delete mode 100644 clerk-typedoc/shared/get-env-variable.mdx delete mode 100644 clerk-typedoc/shared/get-non-undefined-values.mdx delete mode 100644 clerk-typedoc/shared/get-script-url.mdx delete mode 100644 clerk-typedoc/shared/get-suffixed-cookie-name.mdx delete mode 100644 clerk-typedoc/shared/icon-image-url.mdx delete mode 100644 clerk-typedoc/shared/id-selectors.mdx delete mode 100644 clerk-typedoc/shared/in-browser.mdx delete mode 100644 clerk-typedoc/shared/is-browser-online.mdx delete mode 100644 clerk-typedoc/shared/is-clerk-runtime-error.mdx delete mode 100644 clerk-typedoc/shared/is-development-from-publishable-key.mdx delete mode 100644 clerk-typedoc/shared/is-development-from-secret-key.mdx delete mode 100644 clerk-typedoc/shared/is-ipv4-address.mdx delete mode 100644 clerk-typedoc/shared/is-production-from-publishable-key.mdx delete mode 100644 clerk-typedoc/shared/is-production-from-secret-key.mdx delete mode 100644 clerk-typedoc/shared/is-publishable-key.mdx delete mode 100644 clerk-typedoc/shared/is-staging.mdx delete mode 100644 clerk-typedoc/shared/is-truthy.mdx delete mode 100644 clerk-typedoc/shared/is-valid-browser-online.mdx delete mode 100644 clerk-typedoc/shared/is-valid-browser.mdx delete mode 100644 clerk-typedoc/shared/isomorphic-atob.mdx delete mode 100644 clerk-typedoc/shared/legacy-redirect-props.mdx delete mode 100644 clerk-typedoc/shared/load-clerk-js-script.mdx delete mode 100644 clerk-typedoc/shared/local-storage-broadcast-channel.mdx delete mode 100644 clerk-typedoc/shared/parse-publishable-key.mdx delete mode 100644 clerk-typedoc/shared/read-json-file.mdx create mode 100644 clerk-typedoc/shared/remove-functions.mdx delete mode 100644 clerk-typedoc/shared/saml-strategy.mdx delete mode 100644 clerk-typedoc/shared/set-clerk-js-loading-error-package-name.mdx delete mode 100644 clerk-typedoc/shared/snake-to-camel.mdx delete mode 100644 clerk-typedoc/shared/state-selectors.mdx delete mode 100644 clerk-typedoc/shared/titleize.mdx delete mode 100644 clerk-typedoc/shared/to-sentence.mdx delete mode 100644 clerk-typedoc/shared/use-checkout-return.mdx delete mode 100644 clerk-typedoc/shared/user-agent-is-robot.mdx delete mode 100644 clerk-typedoc/shared/version-selector.mdx diff --git a/clerk-typedoc/backend/auth-object.mdx b/clerk-typedoc/backend/auth-object.mdx index 4f392c755d..8f368f7d47 100644 --- a/clerk-typedoc/backend/auth-object.mdx +++ b/clerk-typedoc/backend/auth-object.mdx @@ -4,5 +4,5 @@ | ---------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `debug` | () => \{ [key: string]: any; \} | Used to help debug issues when using Clerk in development. | | `getToken` | () => Promise\ \| () => Promise\ \| ServerGetToken \| () => Promise\ | A function that gets the current user's [session token](/docs/guides/sessions/session-tokens) or a [custom JWT template](/docs/guides/sessions/jwt-templates). | -| `has` | CheckAuthorizationFromSessionClaims \| () => false | A function that checks if the user has an organization role or custom permission. | -| `tokenType` | null \| "api_key" \| "session_token" \| "m2m_token" \| "oauth_token" | The allowed token type. | +| `has` | CheckAuthorizationFromSessionClaims \| () => false | A function that checks if the user has an Organization Role or Custom Permission. | +| `tokenType` | null \| "api_key" \| "oauth_token" \| "session_token" \| "m2m_token" | The allowed token type. | diff --git a/clerk-typedoc/backend/authenticate-request-options.mdx b/clerk-typedoc/backend/authenticate-request-options.mdx index 4561aafece..f5debf39cb 100644 --- a/clerk-typedoc/backend/authenticate-request-options.mdx +++ b/clerk-typedoc/backend/authenticate-request-options.mdx @@ -1,24 +1,25 @@ -| Property | Type | Description | -| --------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `acceptsToken?` | "api_key" \| "session_token" \| "m2m_token" \| "oauth_token" \| ("api_key" \| "session_token" \| "m2m_token" \| "oauth_token")[] \| "any" | The type of token to accept. Defaults to `'session_token'`. | -| `afterSignInUrl?` | `string` | Full URL or path to navigate to after successful sign in. Defaults to `'/'`. | -| `afterSignUpUrl?` | `string` | Full URL or path to navigate to after successful sign up. Defaults to `'/'`. | -| `apiUrl?` | `string` | The [Clerk Backend API](/docs/reference/backend-api){{ target: '_blank' }} endpoint. Defaults to `'https://api.clerk.com'`. | -| `apiVersion?` | `string` | The version passed to the Clerk API. Defaults to `'v1'`. | -| `audience?` | string \| string[] | A string or list of [audiences](https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.3). If passed, it is checked against the `aud` claim in the token. | -| `authorizedParties?` | string[] | An allowlist of origins to verify against, to protect your application from the subdomain cookie leaking attack. Example: `['http://localhost:3000', 'https://example.com']`. | -| `clockSkewInMs?` | `number` | Specifies the allowed time difference (in milliseconds) between the Clerk server (which generates the token) and the clock of the user's application server when validating a token. Defaults to `5000`. | -| `domain?` | `string` | The domain of a [satellite application](/docs/guides/dashboard/dns-domains/satellite-domains) in a multi-domain setup. | -| `isSatellite?` | `boolean` | Whether the instance is a satellite domain in a multi-domain setup. Defaults to `false`. | -| ~~`jwksCacheTtlInMs?`~~ | `number` | **Deprecated.** This cache TTL will be removed in the next major version. Specifying a cache TTL is a no-op. | -| `jwtKey?` | `string` | Used to verify the session token in a networkless manner. Supply the PEM public key from the **[**API keys**](https://dashboard.clerk.com/last-active?path=api-keys) page -> Show JWT public key -> PEM Public Key** section in the Clerk Dashboard. **It's recommended to use [the environment variable](/docs/guides/development/clerk-environment-variables) instead.** For more information, refer to [Manual JWT verification](/docs/guides/sessions/manual-jwt-verification). | -| `machineSecretKey?` | `string` | The machine secret key to use when verifying machine-to-machine tokens. This will override the Clerk secret key. | -| `organizationSyncOptions?` | \{ organizationPatterns?: string[]; personalAccountPatterns?: string[]; \} | Used to activate a specific [organization](/docs/guides/organizations/overview) or [personal account](/docs/guides/dashboard/overview) based on URL path parameters. If there's a mismatch between the active organization in the session (e.g., as reported by `auth()`) and the organization indicated by the URL, an attempt to activate the organization specified in the URL will be made. If the activation can't be performed, either because an organization doesn't exist or the user lacks access, the active organization in the session won't be changed. Ultimately, it's the responsibility of the page to verify that the resources are appropriate to render given the URL and handle mismatches appropriately (e.g., by returning a 404). | -| `organizationSyncOptions.organizationPatterns?` | string[] | Specifies URL patterns that are organization-specific, containing an organization ID or slug as a path parameter. If a request matches this path, the organization identifier will be used to set that org as active. If the route also matches the `personalAccountPatterns` prop, this prop takes precedence. Patterns must have a path parameter named either `:id` (to match a Clerk organization ID) or `:slug` (to match a Clerk organization slug). If the organization can't be activated—either because it doesn't exist or the user lacks access—the previously active organization will remain unchanged. Components must detect this case and provide an appropriate error and/or resolution pathway, such as calling `notFound()` or displaying an [``](/docs/reference/components/organization/organization-switcher). Examples: `["/orgs/:slug",, "/orgs/:slug/(.*)"]`, `["/orgs/:id",, "/orgs/:id/(.*)"]`, `["/app/:any/orgs/:slug",, "/app/:any/orgs/:slug/(.*)"]`. | -| `organizationSyncOptions.personalAccountPatterns?` | string[] | URL patterns for resources that exist within the context of a [Clerk Personal Account](/docs/guides/dashboard/overview) (user-specific, outside any organization). If the route also matches the `organizationPattern` prop, the `organizationPattern` prop takes precedence. Examples: `["/user",, "/user/(.*)"]`, `["/user/:any",, "/user/:any/(.*)"]`. | -| `proxyUrl?` | `string` | The proxy URL from a multi-domain setup. | -| `publishableKey?` | `string` | The Clerk Publishable Key from the [**API keys**](https://dashboard.clerk.com/last-active?path=api-keys) page in the Clerk Dashboard. | -| `secretKey?` | `string` | The Clerk Secret Key from the [**API keys**](https://dashboard.clerk.com/last-active?path=api-keys) page in the Clerk Dashboard. | -| `signInUrl?` | `string` | The sign-in URL from a multi-domain setup. | -| `signUpUrl?` | `string` | The sign-up URL from a multi-domain setup. | -| `skipJwksCache?` | `boolean` | A flag to ignore the JWKS cache and always fetch JWKS before each JWT verification. | +| Property | Type | Description | +| --------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `acceptsToken?` | "api_key" \| "oauth_token" \| "session_token" \| "m2m_token" \| ("api_key" \| "oauth_token" \| "session_token" \| "m2m_token")[] \| "any" | The type of token to accept. Defaults to `'session_token'`. | +| `afterSignInUrl?` | `string` | Full URL or path to navigate to after successful sign in. Defaults to `'/'`. | +| `afterSignUpUrl?` | `string` | Full URL or path to navigate to after successful sign up. Defaults to `'/'`. | +| `apiUrl?` | `string` | The [Clerk Backend API](/docs/reference/backend-api){{ target: '_blank' }} endpoint. Defaults to `'https://api.clerk.com'`. | +| `apiVersion?` | `string` | The version passed to the Clerk API. Defaults to `'v1'`. | +| `audience?` | string \| string[] | A string or list of [audiences](https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.3). If passed, it is checked against the `aud` claim in the token. | +| `authorizedParties?` | string[] | An allowlist of origins to verify against, to protect your application from the subdomain cookie leaking attack. Example: `['http://localhost:3000', 'https://example.com']`. | +| `clockSkewInMs?` | `number` | Specifies the allowed time difference (in milliseconds) between the Clerk server (which generates the token) and the clock of the user's application server when validating a token. Defaults to `5000`. | +| `domain?` | `string` | The domain of a [satellite application](/docs/guides/dashboard/dns-domains/satellite-domains) in a multi-domain setup. | +| `headerType?` | string \| string[] | A string or list of allowed [header types](https://datatracker.ietf.org/doc/html/rfc7515#section-4.1.9). Defaults to `'JWT'`. | +| `isSatellite?` | `boolean` | Whether the instance is a satellite domain in a multi-domain setup. Defaults to `false`. | +| ~~`jwksCacheTtlInMs?`~~ | `number` | **Deprecated.** This cache TTL will be removed in the next major version. Specifying a cache TTL is a no-op. | +| `jwtKey?` | `string` | Used to verify the session token in a networkless manner. Supply the PEM public key from the **[**API keys**](https://dashboard.clerk.com/last-active?path=api-keys) page -> Show JWT public key -> PEM Public Key** section in the Clerk Dashboard. **It's recommended to use [the environment variable](/docs/guides/development/clerk-environment-variables) instead.** For more information, refer to [Manual JWT verification](/docs/guides/sessions/manual-jwt-verification). | +| `machineSecretKey?` | `string` | The machine secret key to use when verifying machine-to-machine tokens. This will override the Clerk secret key. | +| `organizationSyncOptions?` | \{ organizationPatterns?: string[]; personalAccountPatterns?: string[]; \} | Used to activate a specific [Organization](/docs/guides/organizations/overview) or [Personal Account](/docs/guides/dashboard/overview) based on URL path parameters. If there's a mismatch between the Active Organization in the session (e.g., as reported by `auth()`) and the Organization indicated by the URL, an attempt to activate the Organization specified in the URL will be made. If the activation can't be performed, either because an Organization doesn't exist or the user lacks access, the Active Organization in the session won't be changed. Ultimately, it's the responsibility of the page to verify that the resources are appropriate to render given the URL and handle mismatches appropriately (e.g., by returning a 404). | +| `organizationSyncOptions.organizationPatterns?` | string[] | Specifies URL patterns that are Organization-specific, containing an Organization ID or slug as a path parameter. If a request matches this path, the Organization identifier will be used to set that Organization as active. If the route also matches the `personalAccountPatterns` prop, this prop takes precedence. Patterns must have a path parameter named either `:id` (to match a Clerk Organization ID) or `:slug` (to match a Clerk Organization slug). If the Organization can't be activated—either because it doesn't exist or the user lacks access—the previously active Organization will remain unchanged. Components must detect this case and provide an appropriate error and/or resolution pathway, such as calling `notFound()` or displaying an [``](/docs/reference/components/organization/organization-switcher). Examples: `["/orgs/:slug",, "/orgs/:slug/(.*)"]`, `["/orgs/:id",, "/orgs/:id/(.*)"]`, `["/app/:any/orgs/:slug",, "/app/:any/orgs/:slug/(.*)"]`. | +| `organizationSyncOptions.personalAccountPatterns?` | string[] | URL patterns for resources that exist within the context of a [Clerk Personal Account](/docs/guides/dashboard/overview) (user-specific, outside any Organization). If the route also matches the `organizationPattern` prop, the `organizationPattern` prop takes precedence. Examples: `["/user",, "/user/(.*)"]`, `["/user/:any",, "/user/:any/(.*)"]`. | +| `proxyUrl?` | `string` | The proxy URL from a multi-domain setup. | +| `publishableKey?` | `string` | The Clerk Publishable Key from the [**API keys**](https://dashboard.clerk.com/last-active?path=api-keys) page in the Clerk Dashboard. | +| `secretKey?` | `string` | The Clerk Secret Key from the [**API keys**](https://dashboard.clerk.com/last-active?path=api-keys) page in the Clerk Dashboard. | +| `signInUrl?` | `string` | The sign-in URL from a multi-domain setup. | +| `signUpUrl?` | `string` | The sign-up URL from a multi-domain setup. | +| `skipJwksCache?` | `boolean` | A flag to ignore the JWKS cache and always fetch JWKS before each JWT verification. | diff --git a/clerk-typedoc/backend/billing-plan.mdx b/clerk-typedoc/backend/billing-plan.mdx index c016afebf8..44494f39b8 100644 --- a/clerk-typedoc/backend/billing-plan.mdx +++ b/clerk-typedoc/backend/billing-plan.mdx @@ -1,19 +1,19 @@ -The `BillingPlan` object is similar to the [`BillingPlanResource`](/docs/reference/javascript/types/billing-plan-resource) object as it holds information about a plan, as well as methods for managing it. However, the `BillingPlan` object is different in that it is used in the [Backend API](/docs/reference/backend-api/tag/commerce/get/commerce/plans) and is not directly accessible from the Frontend API. +The `BillingPlan` object is similar to the [`BillingPlanResource`](/docs/reference/javascript/types/billing-plan-resource) object as it holds information about a Plan, as well as methods for managing it. However, the `BillingPlan` object is different in that it is used in the [Backend API](/docs/reference/backend-api/tag/commerce/get/commerce/plans) and is not directly accessible from the Frontend API. ## Properties | Property | Type | Description | | ------------------------------------------------ | --------------------------------------- | --------------------------------------------------------------- | -| `annualFee` | null \| BillingMoneyAmount | The annual fee of the plan. | -| `annualMonthlyFee` | null \| BillingMoneyAmount | The annual fee of the plan on a monthly basis. | -| `description` | null \| string | The description of the plan. | -| `features` | [Feature](feature.mdx)[] | The features the plan offers. | -| `fee` | `BillingMoneyAmount` | The monthly fee of the plan. | -| `forPayerType` | "user" \| "org" | The type of payer for the plan. | -| `hasBaseFee` | `boolean` | Whether the plan has a base fee. | -| `id` | `string` | The unique identifier for the plan. | -| `isDefault` | `boolean` | Whether the plan is the default plan. | -| `isRecurring` | `boolean` | Whether the plan is recurring. | -| `name` | `string` | The name of the plan. | -| `publiclyVisible` | `boolean` | Whether the plan is displayed in the `` component. | -| `slug` | `string` | The URL-friendly identifier of the plan. | +| `annualFee` | null \| BillingMoneyAmount | The annual fee of the Plan. | +| `annualMonthlyFee` | null \| BillingMoneyAmount | The annual fee of the Plan on a monthly basis. | +| `description` | null \| string | The description of the Plan. | +| `features` | [Feature](feature.mdx)[] | The features the Plan offers. | +| `fee` | `BillingMoneyAmount` | The monthly fee of the Plan. | +| `forPayerType` | "user" \| "org" | The type of payer for the Plan. | +| `hasBaseFee` | `boolean` | Whether the Plan has a base fee. | +| `id` | `string` | The unique identifier for the Plan. | +| `isDefault` | `boolean` | Whether the Plan is the default Plan. | +| `isRecurring` | `boolean` | Whether the Plan is recurring. | +| `name` | `string` | The name of the Plan. | +| `publiclyVisible` | `boolean` | Whether the Plan is displayed in the `` component. | +| `slug` | `string` | The URL-friendly identifier of the Plan. | diff --git a/clerk-typedoc/backend/billing-subscription-item.mdx b/clerk-typedoc/backend/billing-subscription-item.mdx index 644bb54afb..05cf7d6e08 100644 --- a/clerk-typedoc/backend/billing-subscription-item.mdx +++ b/clerk-typedoc/backend/billing-subscription-item.mdx @@ -16,8 +16,8 @@ The `BillingSubscriptionItem` object is similar to the [`BillingSubscriptionItem | `payerId` | undefined \| string | The payer ID. | | `periodEnd` | null \| number | Unix timestamp (milliseconds) of when the current period ends. | | `periodStart` | `number` | Unix timestamp (milliseconds) of when the current period starts. | -| `plan` | null \| [BillingPlan](billing-plan.mdx) | The plan associated with this subscription item. | -| `planId` | null \| string | The plan ID. | -| `planPeriod` | "month" \| "annual" | The plan period for the subscription item. | +| `plan` | null \| [BillingPlan](billing-plan.mdx) | The Plan associated with this subscription item. | +| `planId` | null \| string | The Plan ID. | +| `planPeriod` | "month" \| "annual" | The Plan period for the subscription item. | | `status` | `BillingSubscriptionItemStatus` | The status of the subscription item. | | `updatedAt` | `number` | Unix timestamp (milliseconds) of when the subscription item was last updated. | diff --git a/clerk-typedoc/backend/feature.mdx b/clerk-typedoc/backend/feature.mdx index 26fa030f05..1007b72a5f 100644 --- a/clerk-typedoc/backend/feature.mdx +++ b/clerk-typedoc/backend/feature.mdx @@ -1,11 +1,11 @@ -The `Feature` object represents a feature of a subscription plan. +The `Feature` object represents a Feature of a Subscription Plan. ## Properties | Property | Type | Description | | -------------------------------------- | --------------------------- | ------------------------------------------- | -| `avatarUrl` | null \| string | The URL of the feature's avatar image. | -| `description` | null \| string | The description of the feature. | -| `id` | `string` | The unique identifier for the feature. | -| `name` | `string` | The name of the feature. | -| `slug` | `string` | The URL-friendly identifier of the feature. | +| `avatarUrl` | null \| string | The URL of the Feature's avatar image. | +| `description` | null \| string | The description of the Feature. | +| `id` | `string` | The unique identifier for the Feature. | +| `name` | `string` | The name of the Feature. | +| `slug` | `string` | The URL-friendly identifier of the Feature. | diff --git a/clerk-typedoc/backend/get-auth-fn-no-request.mdx b/clerk-typedoc/backend/get-auth-fn-no-request.mdx index 0111bb1b7f..6bfa46a659 100644 --- a/clerk-typedoc/backend/get-auth-fn-no-request.mdx +++ b/clerk-typedoc/backend/get-auth-fn-no-request.mdx @@ -14,7 +14,7 @@ Shared generic overload type for auth() or getAuth() helpers that don't require | Parameter | Type | | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `options` | \{ treatPendingAsSignedOut?: boolean; \} & \{ acceptsToken?: "api_key" \| "session_token" \| "m2m_token" \| "oauth_token" \| ("api_key" \| "session_token" \| "m2m_token" \| "oauth_token")[] \| "any"; \} & \{ acceptsToken: T; \} | +| `options` | \{ treatPendingAsSignedOut?: boolean; \} & \{ acceptsToken?: "api_key" \| "oauth_token" \| "session_token" \| "m2m_token" \| ("api_key" \| "oauth_token" \| "session_token" \| "m2m_token")[] \| "any"; \} & \{ acceptsToken: T; \} | ### Returns @@ -37,7 +37,7 @@ Shared generic overload type for auth() or getAuth() helpers that don't require | Parameter | Type | | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `options` | \{ treatPendingAsSignedOut?: boolean; \} & \{ acceptsToken?: "api_key" \| "session_token" \| "m2m_token" \| "oauth_token" \| ("api_key" \| "session_token" \| "m2m_token" \| "oauth_token")[] \| "any"; \} & \{ acceptsToken: T; \} | +| `options` | \{ treatPendingAsSignedOut?: boolean; \} & \{ acceptsToken?: "api_key" \| "oauth_token" \| "session_token" \| "m2m_token" \| ("api_key" \| "oauth_token" \| "session_token" \| "m2m_token")[] \| "any"; \} & \{ acceptsToken: T; \} | ### Returns @@ -60,11 +60,11 @@ Shared generic overload type for auth() or getAuth() helpers that don't require | Parameter | Type | | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `options` | \{ treatPendingAsSignedOut?: boolean; \} & \{ acceptsToken?: "api_key" \| "session_token" \| "m2m_token" \| "oauth_token" \| ("api_key" \| "session_token" \| "m2m_token" \| "oauth_token")[] \| "any"; \} & \{ acceptsToken: "any"; \} | +| `options` | \{ treatPendingAsSignedOut?: boolean; \} & \{ acceptsToken?: "api_key" \| "oauth_token" \| "session_token" \| "m2m_token" \| ("api_key" \| "oauth_token" \| "session_token" \| "m2m_token")[] \| "any"; \} & \{ acceptsToken: "any"; \} | ### Returns -`MaybePromise`\<InvalidTokenAuthObject \| \{ debug: () => \{ [key: string]: any; \}; getToken: () => Promise\; has: CheckAuthorizationFromSessionClaims; id: null; isAuthenticated: false; scopes: null; subject: null; tokenType: "api_key"; \} & \{ claims: null; name: null; orgId: null; userId: null; \} \| \{ debug: () => \{ [key: string]: any; \}; getToken: () => Promise\; has: CheckAuthorizationFromSessionClaims; id: null; isAuthenticated: false; scopes: null; subject: null; tokenType: "m2m_token"; \} & \{ claims: null; machineId: null; \} \| \{ debug: () => \{ [key: string]: any; \}; getToken: () => Promise\; has: CheckAuthorizationFromSessionClaims; id: null; isAuthenticated: false; scopes: null; subject: null; tokenType: "oauth_token"; \} & \{ clientId: null; userId: null; \} \| \{ id: string; subject: string; scopes: string\[\]; getToken: () =\> Promise\; has: CheckAuthorizationFromSessionClaims; debug: AuthObjectDebug; tokenType: "api_key"; isAuthenticated: true; \} & (\{ ...; \} \| \{ ...; \}) \| \{ debug: () => \{ [key: string]: any; \}; getToken: () => Promise\; has: CheckAuthorizationFromSessionClaims; id: string; isAuthenticated: true; scopes: string[]; subject: string; tokenType: "m2m_token"; \} & \{ claims: null \| Claims; machineId: string; \} \| \{ debug: () => \{ [key: string]: any; \}; getToken: () => Promise\; has: CheckAuthorizationFromSessionClaims; id: string; isAuthenticated: true; scopes: string[]; subject: string; tokenType: "oauth_token"; \} & \{ clientId: string; userId: string; \} \| SessionAuthType, `ReturnsPromise`\> +`MaybePromise`\<InvalidTokenAuthObject \| \{ debug: () => \{ [key: string]: any; \}; getToken: () => Promise\; has: CheckAuthorizationFromSessionClaims; id: null; isAuthenticated: false; scopes: null; subject: null; tokenType: "api_key"; \} & \{ claims: null; name: null; orgId: null; userId: null; \} \| \{ debug: () => \{ [key: string]: any; \}; getToken: () => Promise\; has: CheckAuthorizationFromSessionClaims; id: null; isAuthenticated: false; scopes: null; subject: null; tokenType: "oauth_token"; \} & \{ clientId: null; userId: null; \} \| \{ debug: () => \{ [key: string]: any; \}; getToken: () => Promise\; has: CheckAuthorizationFromSessionClaims; id: null; isAuthenticated: false; scopes: null; subject: null; tokenType: "m2m_token"; \} & \{ claims: null; machineId: null; \} \| \{ id: string; subject: string; scopes: string\[\]; getToken: () =\> Promise\; has: CheckAuthorizationFromSessionClaims; debug: AuthObjectDebug; tokenType: "api_key"; isAuthenticated: true; \} & (\{ ...; \} \| \{ ...; \}) \| \{ debug: () => \{ [key: string]: any; \}; getToken: () => Promise\; has: CheckAuthorizationFromSessionClaims; id: string; isAuthenticated: true; scopes: string[]; subject: string; tokenType: "oauth_token"; \} & \{ clientId: string; userId: string; \} \| \{ debug: () => \{ [key: string]: any; \}; getToken: () => Promise\; has: CheckAuthorizationFromSessionClaims; id: string; isAuthenticated: true; scopes: string[]; subject: string; tokenType: "m2m_token"; \} & \{ claims: null \| Claims; machineId: string; \} \| SessionAuthType, `ReturnsPromise`\> ### Example diff --git a/clerk-typedoc/backend/get-auth-fn.mdx b/clerk-typedoc/backend/get-auth-fn.mdx index 6e939c0d46..c324d0a21c 100644 --- a/clerk-typedoc/backend/get-auth-fn.mdx +++ b/clerk-typedoc/backend/get-auth-fn.mdx @@ -13,7 +13,7 @@ Shared generic overload type for getAuth() helpers across SDKs. | Parameter | Type | | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `req` | `RequestType` | -| `options` | \{ treatPendingAsSignedOut?: boolean; \} & \{ acceptsToken?: "api_key" \| "session_token" \| "m2m_token" \| "oauth_token" \| ("api_key" \| "session_token" \| "m2m_token" \| "oauth_token")[] \| "any"; \} & \{ acceptsToken: T; \} | +| `options` | \{ treatPendingAsSignedOut?: boolean; \} & \{ acceptsToken?: "api_key" \| "oauth_token" \| "session_token" \| "m2m_token" \| ("api_key" \| "oauth_token" \| "session_token" \| "m2m_token")[] \| "any"; \} & \{ acceptsToken: T; \} | ### Returns @@ -36,7 +36,7 @@ Shared generic overload type for getAuth() helpers across SDKs. | Parameter | Type | | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `req` | `RequestType` | -| `options` | \{ treatPendingAsSignedOut?: boolean; \} & \{ acceptsToken?: "api_key" \| "session_token" \| "m2m_token" \| "oauth_token" \| ("api_key" \| "session_token" \| "m2m_token" \| "oauth_token")[] \| "any"; \} & \{ acceptsToken: T; \} | +| `options` | \{ treatPendingAsSignedOut?: boolean; \} & \{ acceptsToken?: "api_key" \| "oauth_token" \| "session_token" \| "m2m_token" \| ("api_key" \| "oauth_token" \| "session_token" \| "m2m_token")[] \| "any"; \} & \{ acceptsToken: T; \} | ### Returns @@ -59,7 +59,7 @@ Shared generic overload type for getAuth() helpers across SDKs. | Parameter | Type | | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `req` | `RequestType` | -| `options` | \{ treatPendingAsSignedOut?: boolean; \} & \{ acceptsToken?: "api_key" \| "session_token" \| "m2m_token" \| "oauth_token" \| ("api_key" \| "session_token" \| "m2m_token" \| "oauth_token")[] \| "any"; \} & \{ acceptsToken: "any"; \} | +| `options` | \{ treatPendingAsSignedOut?: boolean; \} & \{ acceptsToken?: "api_key" \| "oauth_token" \| "session_token" \| "m2m_token" \| ("api_key" \| "oauth_token" \| "session_token" \| "m2m_token")[] \| "any"; \} & \{ acceptsToken: "any"; \} | ### Returns diff --git a/clerk-typedoc/backend/organization-invitation.mdx b/clerk-typedoc/backend/organization-invitation.mdx index f4a6066f82..48fed5f945 100644 --- a/clerk-typedoc/backend/organization-invitation.mdx +++ b/clerk-typedoc/backend/organization-invitation.mdx @@ -1,4 +1,4 @@ -The Backend `OrganizationInvitation` object is similar to the [`OrganizationInvitation`](/docs/reference/javascript/types/organization-invitation) object as it's the model around an organization invitation. However, the Backend `OrganizationInvitation` object is different in that it's used in the [Backend API](/docs/reference/backend-api/tag/Organization-Invitations#operation/CreateOrganizationInvitation){{ target: '_blank' }} and is not directly accessible from the Frontend API. +The Backend `OrganizationInvitation` object is similar to the [`OrganizationInvitation`](/docs/reference/javascript/types/organization-invitation) object as it's the model around an Organization invitation. However, the Backend `OrganizationInvitation` object is different in that it's used in the [Backend API](/docs/reference/backend-api/tag/Organization-Invitations#operation/CreateOrganizationInvitation){{ target: '_blank' }} and is not directly accessible from the Frontend API. ## Properties @@ -11,9 +11,9 @@ The Backend `OrganizationInvitation` object is similar to the [`OrganizationInvi | `organizationId` | `string` | The ID of the [`Organization`](/docs/reference/backend/types/backend-organization) that the user is invited to. | | `privateMetadata` | [`OrganizationInvitationPrivateMetadata`](/docs/reference/javascript/types/metadata#organization-invitation-private-metadata) | Metadata that can be read and set only from the [Backend API](/docs/reference/backend-api){{ target: '_blank' }}. | | `publicMetadata` | [`OrganizationInvitationPublicMetadata`](/docs/reference/javascript/types/metadata#organization-invitation-public-metadata) | Metadata that can be read from the Frontend API and [Backend API](/docs/reference/backend-api){{ target: '_blank' }} and can be set only from the Backend API. | -| `publicOrganizationData?` | null \| [PublicOrganizationDataJSON](#public-organization-data-json) | Public data about the organization that the user is invited to. | -| `role` | `string` | The role of the invited user. | -| `roleName` | `string` | The name of the role of the invited user. | +| `publicOrganizationData?` | null \| [PublicOrganizationDataJSON](#public-organization-data-json) | Public data about the Organization that the user is invited to. | +| `role` | `string` | The Role of the invited user. | +| `roleName` | `string` | The name of the Role of the invited user. | | `status?` | "revoked" \| "pending" \| "accepted" | The status of the invitation. | | `updatedAt` | `number` | The date when the invitation was last updated. | | `url` | null \| string | The URL that the user can use to accept the invitation. | diff --git a/clerk-typedoc/backend/organization-membership.mdx b/clerk-typedoc/backend/organization-membership.mdx index 254ee05eab..4636e0566e 100644 --- a/clerk-typedoc/backend/organization-membership.mdx +++ b/clerk-typedoc/backend/organization-membership.mdx @@ -1,4 +1,4 @@ -The Backend `OrganizationMembership` object is similar to the [`OrganizationMembership`](/docs/reference/javascript/types/organization-membership) object as it's the model around an organization membership entity and describes the relationship between users and organizations. However, the Backend `OrganizationMembership` object is different in that it's used in the [Backend API](/docs/reference/backend-api/tag/Organization-Memberships#operation/CreateOrganizationMembership){{ target: '_blank' }} and is not directly accessible from the Frontend API. +The Backend `OrganizationMembership` object is similar to the [`OrganizationMembership`](/docs/reference/javascript/types/organization-membership) object as it's the model around an Organization membership entity and describes the relationship between users and Organizations. However, the Backend `OrganizationMembership` object is different in that it's used in the [Backend API](/docs/reference/backend-api/tag/Organization-Memberships#operation/CreateOrganizationMembership){{ target: '_blank' }} and is not directly accessible from the Frontend API. ## Properties @@ -6,10 +6,10 @@ The Backend `OrganizationMembership` object is similar to the [`OrganizationMemb | ---------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `createdAt` | `number` | The date when the membership was first created. | | `id` | `string` | The unique identifier for the membership. | -| `organization` | [`Organization`](/docs/reference/backend/types/backend-organization) | The organization that the user is a member of. | -| `permissions` | string[] | The permissions granted to the user in the organization. | +| `organization` | [`Organization`](/docs/reference/backend/types/backend-organization) | The Organization that the user is a member of. | +| `permissions` | string[] | The Permissions granted to the user in the Organization. | | `privateMetadata` | [`OrganizationMembershipPrivateMetadata`](/docs/reference/javascript/types/metadata#organization-membership-private-metadata) | Metadata that can be read and set only from the [Backend API](/docs/reference/backend-api){{ target: '_blank' }}. | | `publicMetadata` | [`OrganizationMembershipPublicMetadata`](/docs/reference/javascript/types/metadata#organization-membership-public-metadata) | Metadata that can be read from the Frontend API and [Backend API](/docs/reference/backend-api){{ target: '_blank' }} and can be set only from the Backend API. | | `publicUserData?` | null \| [OrganizationMembershipPublicUserData](#organization-membership-public-user-data) | Public information about the user that this membership belongs to. | -| `role` | `string` | The role of the user. | +| `role` | `string` | The Role of the user. | | `updatedAt` | `number` | The date when the membership was last updated. | diff --git a/clerk-typedoc/backend/organization-sync-options.mdx b/clerk-typedoc/backend/organization-sync-options.mdx index 9d64ebb933..b69cc87996 100644 --- a/clerk-typedoc/backend/organization-sync-options.mdx +++ b/clerk-typedoc/backend/organization-sync-options.mdx @@ -2,7 +2,7 @@ ## Properties -| Property | Type | Description | -| --------------------------------------------------------------- | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `organizationPatterns?` | Pattern[] | Specifies URL patterns that are organization-specific, containing an organization ID or slug as a path parameter. If a request matches this path, the organization identifier will be used to set that org as active. If the route also matches the `personalAccountPatterns` prop, this prop takes precedence. Patterns must have a path parameter named either `:id` (to match a Clerk organization ID) or `:slug` (to match a Clerk organization slug). If the organization can't be activated—either because it doesn't exist or the user lacks access—the previously active organization will remain unchanged. Components must detect this case and provide an appropriate error and/or resolution pathway, such as calling `notFound()` or displaying an [``](/docs/reference/components/organization/organization-switcher). Examples: `["/orgs/:slug",, "/orgs/:slug/(.*)"]`, `["/orgs/:id",, "/orgs/:id/(.*)"]`, `["/app/:any/orgs/:slug",, "/app/:any/orgs/:slug/(.*)"]`. | -| `personalAccountPatterns?` | Pattern[] | URL patterns for resources that exist within the context of a [Clerk Personal Account](/docs/guides/dashboard/overview) (user-specific, outside any organization). If the route also matches the `organizationPattern` prop, the `organizationPattern` prop takes precedence. Examples: `["/user",, "/user/(.*)"]`, `["/user/:any",, "/user/:any/(.*)"]`. | +| Property | Type | Description | +| --------------------------------------------------------------- | ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `organizationPatterns?` | Pattern[] | Specifies URL patterns that are Organization-specific, containing an Organization ID or slug as a path parameter. If a request matches this path, the Organization identifier will be used to set that Organization as active. If the route also matches the `personalAccountPatterns` prop, this prop takes precedence. Patterns must have a path parameter named either `:id` (to match a Clerk Organization ID) or `:slug` (to match a Clerk Organization slug). If the Organization can't be activated—either because it doesn't exist or the user lacks access—the previously active Organization will remain unchanged. Components must detect this case and provide an appropriate error and/or resolution pathway, such as calling `notFound()` or displaying an [``](/docs/reference/components/organization/organization-switcher). Examples: `["/orgs/:slug",, "/orgs/:slug/(.*)"]`, `["/orgs/:id",, "/orgs/:id/(.*)"]`, `["/app/:any/orgs/:slug",, "/app/:any/orgs/:slug/(.*)"]`. | +| `personalAccountPatterns?` | Pattern[] | URL patterns for resources that exist within the context of a [Clerk Personal Account](/docs/guides/dashboard/overview) (user-specific, outside any Organization). If the route also matches the `organizationPattern` prop, the `organizationPattern` prop takes precedence. Examples: `["/user",, "/user/(.*)"]`, `["/user/:any",, "/user/:any/(.*)"]`. | diff --git a/clerk-typedoc/backend/organization-sync-target.mdx b/clerk-typedoc/backend/organization-sync-target.mdx index 42fb0f448b..29819fe2c1 100644 --- a/clerk-typedoc/backend/organization-sync-target.mdx +++ b/clerk-typedoc/backend/organization-sync-target.mdx @@ -1,2 +1,2 @@ -Represents an organization or a personal account - e.g. an +Represents an Organization or a Personal Account - e.g. an entity that can be activated by the handshake API. diff --git a/clerk-typedoc/backend/organization.mdx b/clerk-typedoc/backend/organization.mdx index b89ba57d2e..dae600f329 100644 --- a/clerk-typedoc/backend/organization.mdx +++ b/clerk-typedoc/backend/organization.mdx @@ -1,19 +1,19 @@ -The Backend `Organization` object is similar to the [`Organization`](/docs/reference/javascript/organization) object as it holds information about an organization, as well as methods for managing it. However, the Backend `Organization` object is different in that it is used in the [Backend API](/docs/reference/backend-api/tag/Organizations#operation/ListOrganizations){{ target: '_blank' }} and is not directly accessible from the Frontend API. +The Backend `Organization` object is similar to the [`Organization`](/docs/reference/javascript/organization) object as it holds information about an Organization, as well as methods for managing it. However, the Backend `Organization` object is different in that it is used in the [Backend API](/docs/reference/backend-api/tag/Organizations#operation/ListOrganizations){{ target: '_blank' }} and is not directly accessible from the Frontend API. ## Properties | Property | Type | Description | | ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `adminDeleteEnabled` | `boolean` | Whether the organization allows admins to delete users. | -| `createdAt` | `number` | The date when the organization was first created. | -| `createdBy?` | `string` | The ID of the user who created the organization. | -| `hasImage` | `boolean` | Whether the organization has an image. | -| `id` | `string` | The unique identifier for the organization. | -| `imageUrl` | `string` | Holds the organization's logo. Compatible with Clerk's [Image Optimization](/docs/guides/development/image-optimization). | -| `maxAllowedMemberships` | `number` | The maximum number of memberships allowed in the organization. | -| `membersCount?` | `number` | The number of members in the organization. | -| `name` | `string` | The name of the organization. | +| `adminDeleteEnabled` | `boolean` | Whether the Organization allows admins to delete users. | +| `createdAt` | `number` | The date when the Organization was first created. | +| `createdBy?` | `string` | The ID of the user who created the Organization. | +| `hasImage` | `boolean` | Whether the Organization has an image. | +| `id` | `string` | The unique identifier for the Organization. | +| `imageUrl` | `string` | Holds the Organization's logo. Compatible with Clerk's [Image Optimization](/docs/guides/development/image-optimization). | +| `maxAllowedMemberships` | `number` | The maximum number of memberships allowed in the Organization. | +| `membersCount?` | `number` | The number of members in the Organization. | +| `name` | `string` | The name of the Organization. | | `privateMetadata` | [`OrganizationPrivateMetadata`](/docs/reference/javascript/types/metadata#organization-private-metadata) | Metadata that can be read and set only from the [Backend API](/docs/reference/backend-api){{ target: '_blank' }}. | | `publicMetadata` | null \| [OrganizationPublicMetadata](/docs/reference/javascript/types/metadata#organization-public-metadata) | Metadata that can be read from the Frontend API and [Backend API](/docs/reference/backend-api){{ target: '_blank' }} and can be set only from the Backend API. | -| `slug` | `string` | The URL-friendly identifier of the user's active organization. If supplied, it must be unique for the instance. | -| `updatedAt` | `number` | The date when the organization was last updated. | +| `slug` | `string` | The URL-friendly identifier of the user's active Organization. If supplied, it must be unique for the instance. | +| `updatedAt` | `number` | The date when the Organization was last updated. | diff --git a/clerk-typedoc/backend/public-organization-data-json.mdx b/clerk-typedoc/backend/public-organization-data-json.mdx index 344a038d98..209165cad0 100644 --- a/clerk-typedoc/backend/public-organization-data-json.mdx +++ b/clerk-typedoc/backend/public-organization-data-json.mdx @@ -1,8 +1,8 @@ | Property | Type | Description | | ----------------------------------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------- | -| `has_image` | `boolean` | Whether the organization has a profile image. | +| `has_image` | `boolean` | Whether the Organization has a profile image. | | `id` | `string` | The unique identifier for the resource. | -| `image_url?` | `string` | Holds the default organization profile image. Compatible with Clerk's [Image Optimization](/docs/guides/development/image-optimization). | -| `name` | `string` | The name of the organization. | +| `image_url?` | `string` | Holds the default Organization profile image. Compatible with Clerk's [Image Optimization](/docs/guides/development/image-optimization). | +| `name` | `string` | The name of the Organization. | | `object` | `ObjectType` | The type of the resource. | -| `slug` | `string` | The slug of the organization. | +| `slug` | `string` | The slug of the Organization. | diff --git a/clerk-typedoc/backend/saml-account.mdx b/clerk-typedoc/backend/saml-account.mdx deleted file mode 100644 index aa1c8e366c..0000000000 --- a/clerk-typedoc/backend/saml-account.mdx +++ /dev/null @@ -1,17 +0,0 @@ -The Backend `SamlAccount` object describes a SAML account. - -## Properties - -| Property | Type | Description | -| ------------------------------------------------------------ | --------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- | -| `active` | `boolean` | A boolean that indicates whether the SAML account is active. | -| `emailAddress` | `string` | The email address of the SAML account. | -| `enterpriseConnectionId` | null \| string | The ID of the enterprise connection associated with this SAML account. | -| `firstName` | `string` | The first name of the SAML account. | -| `id` | `string` | The unique identifier for the SAML account. | -| `lastAuthenticatedAt` | null \| number | The date when the SAML account was last authenticated. | -| `lastName` | `string` | The last name of the SAML account. | -| `provider` | `string` | The provider of the SAML account. | -| `providerUserId` | null \| string | The user's ID as used in the provider. | -| `samlConnection` | null \| SamlAccountConnection | The SAML connection of the SAML account. | -| `verification` | null \| [Verification](/docs/reference/backend/types/backend-verification) | The verification of the SAML account. | diff --git a/clerk-typedoc/backend/saml-connection.mdx b/clerk-typedoc/backend/saml-connection.mdx index 3c1b3377c1..0db45cd1f3 100644 --- a/clerk-typedoc/backend/saml-connection.mdx +++ b/clerk-typedoc/backend/saml-connection.mdx @@ -10,7 +10,7 @@ The Backend `SamlConnection` object holds information about a SAML connection fo | `allowSubdomains` | `boolean` | Indicates whether users with an email address subdomain are allowed to use this connection in order to authenticate or not. | | `attributeMapping` | `AttributeMapping` | Defines the attribute name mapping between the Identity Provider (IdP) and Clerk's [`User`](/docs/reference/javascript/user) properties. | | `createdAt` | `number` | The date when the connection was first created. | -| `domain` | `string` | The domain of your organization. Sign in flows using an email with this domain will use the connection. | +| `domain` | `string` | The domain of your Organization. Sign in flows using an email with this domain will use the connection. | | `id` | `string` | The unique identifier for the connection. | | `idpCertificate` | null \| string | The X.509 certificate as provided by the Identity Provider (IdP). | | `idpEntityId` | null \| string | The Entity ID as provided by the Identity Provider (IdP). | @@ -18,7 +18,7 @@ The Backend `SamlConnection` object holds information about a SAML connection fo | `idpMetadataUrl` | null \| string | The URL which serves the Identity Provider (IdP) metadata. If present, it takes priority over the corresponding individual properties. | | `idpSsoUrl` | null \| string | The Single-Sign On URL as provided by the Identity Provider (IdP). | | `name` | `string` | The name to use as a label for the connection. | -| `organizationId` | null \| string | The organization ID of the organization. | +| `organizationId` | null \| string | The Organization ID of the Organization. | | `provider` | `string` | The Identity Provider (IdP) of the connection. | | `spEntityId` | `string` | The Entity ID as provided by the Service Provider (Clerk). | | `spMetadataUrl` | `string` | The metadata URL as provided by the Service Provider (Clerk). | diff --git a/clerk-typedoc/backend/session.mdx b/clerk-typedoc/backend/session.mdx index 1d5309969d..5fe0a00dcd 100644 --- a/clerk-typedoc/backend/session.mdx +++ b/clerk-typedoc/backend/session.mdx @@ -11,7 +11,7 @@ The Backend `Session` object is similar to the [`Session`](/docs/reference/javas | `expireAt` | `number` | The date when the `Session` will expire. | | `id` | `string` | The unique identifier for the `Session`. | | `lastActiveAt` | `number` | The time the session was last active on the [`Client`](/docs/reference/backend/types/backend-client). | -| `lastActiveOrganizationId?` | `string` | The ID of the last active organization. | +| `lastActiveOrganizationId?` | `string` | The ID of the last active Organization. | | `latestActivity?` | [`SessionActivity`](/docs/reference/backend/types/backend-session-activity) | An object that provides additional information about this session, focused around user activity data. | | `status` | `string` | The current state of the `Session`. | | `updatedAt` | `number` | The date when the `Session` was last updated. | diff --git a/clerk-typedoc/backend/user.mdx b/clerk-typedoc/backend/user.mdx index b0f6defef5..250a4321fb 100644 --- a/clerk-typedoc/backend/user.mdx +++ b/clerk-typedoc/backend/user.mdx @@ -7,8 +7,8 @@ The Backend `User` object is similar to the `User` object as it holds informatio | `backupCodeEnabled` | `boolean` | A boolean indicating whether the user has enabled Backup codes. | | `banned` | `boolean` | A boolean indicating whether the user is banned or not. | | `createdAt` | `number` | The date when the user was first created. | -| `createOrganizationEnabled` | `boolean` | A boolean indicating whether the organization creation is enabled for the user or not. | -| `createOrganizationsLimit` | null \| number | An integer indicating the number of organizations that can be created by the user. If the value is `0`, then the user can create unlimited organizations. Default is `null`. | +| `createOrganizationEnabled` | `boolean` | A boolean indicating whether the Organization creation is enabled for the user or not. | +| `createOrganizationsLimit` | null \| number | An integer indicating the number of Organizations that can be created by the user. If the value is `0`, then the user can create unlimited Organizations. Default is `null`. | | `deleteSelfEnabled` | `boolean` | A boolean indicating whether the user can delete their own account. | | `emailAddresses` | [EmailAddress](/docs/reference/backend/types/backend-email-address)[] | An array of all the `EmailAddress` objects associated with the user. Includes the primary. | | `externalAccounts` | [ExternalAccount](/docs/reference/backend/types/backend-external-account)[] | An array of all the `ExternalAccount` objects associated with the user via OAuth. **Note**: This includes both verified & unverified external accounts. | @@ -30,7 +30,6 @@ The Backend `User` object is similar to the `User` object as it holds informatio | `primaryWeb3WalletId` | null \| string | The ID for the [`Web3Wallet`](/docs/reference/backend/types/backend-web3-wallet) that the user signed up with. | | `privateMetadata` | `UserPrivateMetadata` | Metadata that can be read and set only from the [Backend API](/docs/reference/backend-api){{ target: '_blank' }}. | | `publicMetadata` | `UserPublicMetadata` | Metadata that can be read from the Frontend API and [Backend API](/docs/reference/backend-api){{ target: '_blank' }} and can be set only from the Backend API. | -| `samlAccounts` | [SamlAccount](/docs/reference/backend/types/backend-saml-account)[] | An array of all the `SamlAccount` objects associated with the user via SAML. | | `totpEnabled` | `boolean` | A boolean indicating whether the user has enabled TOTP by generating a TOTP secret and verifying it via an authenticator app. | | `twoFactorEnabled` | `boolean` | A boolean indicating whether the user has enabled two-factor authentication. | | `unsafeMetadata` | `UserUnsafeMetadata` | Metadata that can be read and set from the Frontend API. It's considered unsafe because it can be modified from the frontend. | diff --git a/clerk-typedoc/backend/verify-machine-auth-token.mdx b/clerk-typedoc/backend/verify-machine-auth-token.mdx index 003154b7b8..dc2bad9cb9 100644 --- a/clerk-typedoc/backend/verify-machine-auth-token.mdx +++ b/clerk-typedoc/backend/verify-machine-auth-token.mdx @@ -2,20 +2,21 @@ Verifies any type of machine token by detecting its type from the prefix. ## Parameters -| Parameter | Type | Description | -| ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `token` | `string` | The token to verify (e.g. starts with "m2m*", "oauth*", "api*key*", etc.) | -| `options` | \{ apiUrl?: string; apiVersion?: string; audience?: string \| string[]; authorizedParties?: string[]; clockSkewInMs?: number; jwksCacheTtlInMs?: number; jwtKey?: string; secretKey?: string; skipJwksCache?: boolean; \} | Options including secretKey for BAPI authorization | -| `options.apiUrl?` | `string` | The [Clerk Backend API](/docs/reference/backend-api){{ target: '_blank' }} endpoint. Defaults to `'https://api.clerk.com'`. | -| `options.apiVersion?` | `string` | The version passed to the Clerk API. Defaults to `'v1'`. | -| `options.audience?` | string \| string[] | A string or list of [audiences](https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.3). If passed, it is checked against the `aud` claim in the token. | -| `options.authorizedParties?` | string[] | An allowlist of origins to verify against, to protect your application from the subdomain cookie leaking attack. Example: `['http://localhost:3000', 'https://example.com']`. | -| `options.clockSkewInMs?` | `number` | Specifies the allowed time difference (in milliseconds) between the Clerk server (which generates the token) and the clock of the user's application server when validating a token. Defaults to `5000`. | -| `options.jwksCacheTtlInMs?` | `number` | **Deprecated.** This cache TTL will be removed in the next major version. Specifying a cache TTL is a no-op. | -| `options.jwtKey?` | `string` | Used to verify the session token in a networkless manner. Supply the PEM public key from the **[**API keys**](https://dashboard.clerk.com/last-active?path=api-keys) page -> Show JWT public key -> PEM Public Key** section in the Clerk Dashboard. **It's recommended to use [the environment variable](/docs/guides/development/clerk-environment-variables) instead.** For more information, refer to [Manual JWT verification](/docs/guides/sessions/manual-jwt-verification). | -| `options.secretKey?` | `string` | The Clerk Secret Key from the [**API keys**](https://dashboard.clerk.com/last-active?path=api-keys) page in the Clerk Dashboard. | -| `options.skipJwksCache?` | `boolean` | A flag to ignore the JWKS cache and always fetch JWKS before each JWT verification. | +| Parameter | Type | Description | +| ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `token` | `string` | The token to verify (e.g. starts with "m2m*", "oauth*", "api*key*", etc.) | +| `options` | \{ apiUrl?: string; apiVersion?: string; audience?: string \| string[]; authorizedParties?: string[]; clockSkewInMs?: number; headerType?: string \| string[]; jwksCacheTtlInMs?: number; jwtKey?: string; secretKey?: string; skipJwksCache?: boolean; \} | Options including secretKey for BAPI authorization | +| `options.apiUrl?` | `string` | The [Clerk Backend API](/docs/reference/backend-api){{ target: '_blank' }} endpoint. Defaults to `'https://api.clerk.com'`. | +| `options.apiVersion?` | `string` | The version passed to the Clerk API. Defaults to `'v1'`. | +| `options.audience?` | string \| string[] | A string or list of [audiences](https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.3). If passed, it is checked against the `aud` claim in the token. | +| `options.authorizedParties?` | string[] | An allowlist of origins to verify against, to protect your application from the subdomain cookie leaking attack. Example: `['http://localhost:3000', 'https://example.com']`. | +| `options.clockSkewInMs?` | `number` | Specifies the allowed time difference (in milliseconds) between the Clerk server (which generates the token) and the clock of the user's application server when validating a token. Defaults to `5000`. | +| `options.headerType?` | string \| string[] | A string or list of allowed [header types](https://datatracker.ietf.org/doc/html/rfc7515#section-4.1.9). Defaults to `'JWT'`. | +| `options.jwksCacheTtlInMs?` | `number` | **Deprecated.** This cache TTL will be removed in the next major version. Specifying a cache TTL is a no-op. | +| `options.jwtKey?` | `string` | Used to verify the session token in a networkless manner. Supply the PEM public key from the **[**API keys**](https://dashboard.clerk.com/last-active?path=api-keys) page -> Show JWT public key -> PEM Public Key** section in the Clerk Dashboard. **It's recommended to use [the environment variable](/docs/guides/development/clerk-environment-variables) instead.** For more information, refer to [Manual JWT verification](/docs/guides/sessions/manual-jwt-verification). | +| `options.secretKey?` | `string` | The Clerk Secret Key from the [**API keys**](https://dashboard.clerk.com/last-active?path=api-keys) page in the Clerk Dashboard. | +| `options.skipJwksCache?` | `boolean` | A flag to ignore the JWKS cache and always fetch JWKS before each JWT verification. | ## Returns -`Promise`\<\{ data?: undefined; errors: \[MachineTokenVerificationError\]; tokenType: "api_key" \| "m2m_token" \| "oauth_token"; \} \| \{ data: [M2MToken](m2-m-token.mdx); errors?: undefined; tokenType: "api_key" \| "m2m_token" \| "oauth_token"; \} \| \{ data: IdPOAuthAccessToken; errors?: undefined; tokenType: "api_key" \| "m2m_token" \| "oauth_token"; \} \| \{ data: APIKey; errors?: undefined; tokenType: "api_key" \| "m2m_token" \| "oauth_token"; \}\> +`Promise`\<\{ data?: undefined; errors: \[MachineTokenVerificationError\]; tokenType: "api_key" \| "oauth_token" \| "m2m_token"; \} \| \{ data: [M2MToken](m2-m-token.mdx); errors?: undefined; tokenType: "api_key" \| "oauth_token" \| "m2m_token"; \} \| \{ data: IdPOAuthAccessToken; errors?: undefined; tokenType: "api_key" \| "oauth_token" \| "m2m_token"; \} \| \{ data: APIKey; errors?: undefined; tokenType: "api_key" \| "oauth_token" \| "m2m_token"; \}\> diff --git a/clerk-typedoc/backend/verify-token-options.mdx b/clerk-typedoc/backend/verify-token-options.mdx index 72aa995da9..93c0b34c16 100644 --- a/clerk-typedoc/backend/verify-token-options.mdx +++ b/clerk-typedoc/backend/verify-token-options.mdx @@ -5,6 +5,7 @@ | `audience?` | string \| string[] | A string or list of [audiences](https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.3). If passed, it is checked against the `aud` claim in the token. | | `authorizedParties?` | string[] | An allowlist of origins to verify against, to protect your application from the subdomain cookie leaking attack. Example: `['http://localhost:3000', 'https://example.com']`. | | `clockSkewInMs?` | `number` | Specifies the allowed time difference (in milliseconds) between the Clerk server (which generates the token) and the clock of the user's application server when validating a token. Defaults to `5000`. | +| `headerType?` | string \| string[] | A string or list of allowed [header types](https://datatracker.ietf.org/doc/html/rfc7515#section-4.1.9). Defaults to `'JWT'`. | | ~~`jwksCacheTtlInMs?`~~ | `number` | **Deprecated.** This cache TTL will be removed in the next major version. Specifying a cache TTL is a no-op. | | `jwtKey?` | `string` | Used to verify the session token in a networkless manner. Supply the PEM public key from the **[**API keys**](https://dashboard.clerk.com/last-active?path=api-keys) page -> Show JWT public key -> PEM Public Key** section in the Clerk Dashboard. **It's recommended to use [the environment variable](/docs/guides/development/clerk-environment-variables) instead.** For more information, refer to [Manual JWT verification](/docs/guides/sessions/manual-jwt-verification). | | `secretKey?` | `string` | The Clerk Secret Key from the [**API keys**](https://dashboard.clerk.com/last-active?path=api-keys) page in the Clerk Dashboard. | diff --git a/clerk-typedoc/backend/verify-token.mdx b/clerk-typedoc/backend/verify-token.mdx index edd9340ec9..eac8c0f991 100644 --- a/clerk-typedoc/backend/verify-token.mdx +++ b/clerk-typedoc/backend/verify-token.mdx @@ -10,6 +10,7 @@ function verifyToken( audience?: string | string[]; authorizedParties?: string[]; clockSkewInMs?: number; + headerType?: string | string[]; jwksCacheTtlInMs?: number; jwtKey?: string; secretKey?: string; @@ -22,19 +23,20 @@ Verifies a Clerk-generated token signature. Networkless if the `jwtKey` is provi ## Parameters -| Parameter | Type | Description | -| ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `token` | `string` | The token to verify. | -| `options` | \{ apiUrl?: string; apiVersion?: string; audience?: string \| string[]; authorizedParties?: string[]; clockSkewInMs?: number; jwksCacheTtlInMs?: number; jwtKey?: string; secretKey?: string; skipJwksCache?: boolean; \} | Options for verifying the token. It is recommended to set these options as [environment variables](/docs/guides/development/clerk-environment-variables#api-and-sdk-configuration) where possible, and then pass them to the function. For example, you can set the `secretKey` option using the `CLERK_SECRET_KEY` environment variable, and then pass it to the function like this: `verifyToken(token, { secretKey: process.env.CLERK_SECRET_KEY })`. | -| `options.apiUrl?` | `string` | The [Clerk Backend API](/docs/reference/backend-api){{ target: '_blank' }} endpoint. Defaults to `'https://api.clerk.com'`. | -| `options.apiVersion?` | `string` | The version passed to the Clerk API. Defaults to `'v1'`. | -| `options.audience?` | string \| string[] | A string or list of [audiences](https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.3). If passed, it is checked against the `aud` claim in the token. | -| `options.authorizedParties?` | string[] | An allowlist of origins to verify against, to protect your application from the subdomain cookie leaking attack. Example: `['http://localhost:3000', 'https://example.com']`. | -| `options.clockSkewInMs?` | `number` | Specifies the allowed time difference (in milliseconds) between the Clerk server (which generates the token) and the clock of the user's application server when validating a token. Defaults to `5000`. | -| `options.jwksCacheTtlInMs?` | `number` | **Deprecated.** This cache TTL will be removed in the next major version. Specifying a cache TTL is a no-op. | -| `options.jwtKey?` | `string` | Used to verify the session token in a networkless manner. Supply the PEM public key from the **[**API keys**](https://dashboard.clerk.com/last-active?path=api-keys) page -> Show JWT public key -> PEM Public Key** section in the Clerk Dashboard. **It's recommended to use [the environment variable](/docs/guides/development/clerk-environment-variables) instead.** For more information, refer to [Manual JWT verification](/docs/guides/sessions/manual-jwt-verification). | -| `options.secretKey?` | `string` | The Clerk Secret Key from the [**API keys**](https://dashboard.clerk.com/last-active?path=api-keys) page in the Clerk Dashboard. | -| `options.skipJwksCache?` | `boolean` | A flag to ignore the JWKS cache and always fetch JWKS before each JWT verification. | +| Parameter | Type | Description | +| ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `token` | `string` | The token to verify. | +| `options` | \{ apiUrl?: string; apiVersion?: string; audience?: string \| string[]; authorizedParties?: string[]; clockSkewInMs?: number; headerType?: string \| string[]; jwksCacheTtlInMs?: number; jwtKey?: string; secretKey?: string; skipJwksCache?: boolean; \} | Options for verifying the token. It is recommended to set these options as [environment variables](/docs/guides/development/clerk-environment-variables#api-and-sdk-configuration) where possible, and then pass them to the function. For example, you can set the `secretKey` option using the `CLERK_SECRET_KEY` environment variable, and then pass it to the function like this: `verifyToken(token, { secretKey: process.env.CLERK_SECRET_KEY })`. | +| `options.apiUrl?` | `string` | The [Clerk Backend API](/docs/reference/backend-api){{ target: '_blank' }} endpoint. Defaults to `'https://api.clerk.com'`. | +| `options.apiVersion?` | `string` | The version passed to the Clerk API. Defaults to `'v1'`. | +| `options.audience?` | string \| string[] | A string or list of [audiences](https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.3). If passed, it is checked against the `aud` claim in the token. | +| `options.authorizedParties?` | string[] | An allowlist of origins to verify against, to protect your application from the subdomain cookie leaking attack. Example: `['http://localhost:3000', 'https://example.com']`. | +| `options.clockSkewInMs?` | `number` | Specifies the allowed time difference (in milliseconds) between the Clerk server (which generates the token) and the clock of the user's application server when validating a token. Defaults to `5000`. | +| `options.headerType?` | string \| string[] | A string or list of allowed [header types](https://datatracker.ietf.org/doc/html/rfc7515#section-4.1.9). Defaults to `'JWT'`. | +| `options.jwksCacheTtlInMs?` | `number` | **Deprecated.** This cache TTL will be removed in the next major version. Specifying a cache TTL is a no-op. | +| `options.jwtKey?` | `string` | Used to verify the session token in a networkless manner. Supply the PEM public key from the **[**API keys**](https://dashboard.clerk.com/last-active?path=api-keys) page -> Show JWT public key -> PEM Public Key** section in the Clerk Dashboard. **It's recommended to use [the environment variable](/docs/guides/development/clerk-environment-variables) instead.** For more information, refer to [Manual JWT verification](/docs/guides/sessions/manual-jwt-verification). | +| `options.secretKey?` | `string` | The Clerk Secret Key from the [**API keys**](https://dashboard.clerk.com/last-active?path=api-keys) page in the Clerk Dashboard. | +| `options.skipJwksCache?` | `boolean` | A flag to ignore the JWKS cache and always fetch JWKS before each JWT verification. | ## Example diff --git a/clerk-typedoc/clerk-react/api-keys-params.mdx b/clerk-typedoc/clerk-react/api-keys-params.mdx deleted file mode 100644 index 30caf5e222..0000000000 --- a/clerk-typedoc/clerk-react/api-keys-params.mdx +++ /dev/null @@ -1,5 +0,0 @@ -## Parameters - -| Parameter | Type | -| --------- | --------------------------- | -| `props` | `Without`\<`P`, `"clerk"`\> | \ No newline at end of file diff --git a/clerk-typedoc/clerk-react/api-keys-return.mdx b/clerk-typedoc/clerk-react/api-keys-return.mdx deleted file mode 100644 index 15f19e09d6..0000000000 --- a/clerk-typedoc/clerk-react/api-keys-return.mdx +++ /dev/null @@ -1,7 +0,0 @@ -## Returns - -null \| Element - -| Name | Type | -| -------------------------------------- | -------- | -| `displayName` | `string` | \ No newline at end of file diff --git a/clerk-typedoc/clerk-react/checkout-button-params.mdx b/clerk-typedoc/clerk-react/checkout-button-params.mdx deleted file mode 100644 index 30caf5e222..0000000000 --- a/clerk-typedoc/clerk-react/checkout-button-params.mdx +++ /dev/null @@ -1,5 +0,0 @@ -## Parameters - -| Parameter | Type | -| --------- | --------------------------- | -| `props` | `Without`\<`P`, `"clerk"`\> | \ No newline at end of file diff --git a/clerk-typedoc/clerk-react/checkout-button-return.mdx b/clerk-typedoc/clerk-react/checkout-button-return.mdx deleted file mode 100644 index 15f19e09d6..0000000000 --- a/clerk-typedoc/clerk-react/checkout-button-return.mdx +++ /dev/null @@ -1,7 +0,0 @@ -## Returns - -null \| Element - -| Name | Type | -| -------------------------------------- | -------- | -| `displayName` | `string` | \ No newline at end of file diff --git a/clerk-typedoc/clerk-react/experimental_use-checkout-params.mdx b/clerk-typedoc/clerk-react/experimental_use-checkout-params.mdx deleted file mode 100644 index 736b5910e0..0000000000 --- a/clerk-typedoc/clerk-react/experimental_use-checkout-params.mdx +++ /dev/null @@ -1,5 +0,0 @@ -## Parameters - -| Parameter | Type | Description | -| ---------- | ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `options?` | `PropsWithChildren`\<`UseCheckoutOptions`\> | An object containing the configuration for the checkout flow. **Required** if the hook is used without a `` wrapping the component tree. | \ No newline at end of file diff --git a/clerk-typedoc/clerk-react/experimental_use-checkout-return.mdx b/clerk-typedoc/clerk-react/experimental_use-checkout-return.mdx deleted file mode 100644 index be42b0b52e..0000000000 --- a/clerk-typedoc/clerk-react/experimental_use-checkout-return.mdx +++ /dev/null @@ -1,3 +0,0 @@ -## Returns - -`__experimental_UseCheckoutReturn` \ No newline at end of file diff --git a/clerk-typedoc/clerk-react/plan-details-button-params.mdx b/clerk-typedoc/clerk-react/plan-details-button-params.mdx deleted file mode 100644 index 4526c7e73f..0000000000 --- a/clerk-typedoc/clerk-react/plan-details-button-params.mdx +++ /dev/null @@ -1,5 +0,0 @@ -## Parameters - -| Parameter | Type | -| --------- | --------------------------------------------------------------------------------------------------------------------------- | -| `props` | `Without`\<`WithClerkProp`\<`PropsWithChildren`\<[`PlanDetailsButtonProps`](plan-details-button-props.mdx)\>\>, `"clerk"`\> | \ No newline at end of file diff --git a/clerk-typedoc/clerk-react/plan-details-button-return.mdx b/clerk-typedoc/clerk-react/plan-details-button-return.mdx deleted file mode 100644 index 15f19e09d6..0000000000 --- a/clerk-typedoc/clerk-react/plan-details-button-return.mdx +++ /dev/null @@ -1,7 +0,0 @@ -## Returns - -null \| Element - -| Name | Type | -| -------------------------------------- | -------- | -| `displayName` | `string` | \ No newline at end of file diff --git a/clerk-typedoc/clerk-react/protect-params.mdx b/clerk-typedoc/clerk-react/protect-params.mdx deleted file mode 100644 index 0f652016a2..0000000000 --- a/clerk-typedoc/clerk-react/protect-params.mdx +++ /dev/null @@ -1,5 +0,0 @@ -## Parameters - -| Parameter | Type | -| ------------------- | -------------- | -| `__namedParameters` | `ProtectProps` | \ No newline at end of file diff --git a/clerk-typedoc/clerk-react/protect-return.mdx b/clerk-typedoc/clerk-react/protect-return.mdx deleted file mode 100644 index f68aff6680..0000000000 --- a/clerk-typedoc/clerk-react/protect-return.mdx +++ /dev/null @@ -1,3 +0,0 @@ -## Returns - -`ReactNode` \ No newline at end of file diff --git a/clerk-typedoc/clerk-react/redirect-to-create-organization-params.mdx b/clerk-typedoc/clerk-react/redirect-to-create-organization-params.mdx deleted file mode 100644 index 30caf5e222..0000000000 --- a/clerk-typedoc/clerk-react/redirect-to-create-organization-params.mdx +++ /dev/null @@ -1,5 +0,0 @@ -## Parameters - -| Parameter | Type | -| --------- | --------------------------- | -| `props` | `Without`\<`P`, `"clerk"`\> | \ No newline at end of file diff --git a/clerk-typedoc/clerk-react/redirect-to-create-organization-return.mdx b/clerk-typedoc/clerk-react/redirect-to-create-organization-return.mdx deleted file mode 100644 index 5ae18d22c1..0000000000 --- a/clerk-typedoc/clerk-react/redirect-to-create-organization-return.mdx +++ /dev/null @@ -1,3 +0,0 @@ -## Returns - -null \| Element \ No newline at end of file diff --git a/clerk-typedoc/clerk-react/redirect-to-organization-profile-params.mdx b/clerk-typedoc/clerk-react/redirect-to-organization-profile-params.mdx deleted file mode 100644 index 30caf5e222..0000000000 --- a/clerk-typedoc/clerk-react/redirect-to-organization-profile-params.mdx +++ /dev/null @@ -1,5 +0,0 @@ -## Parameters - -| Parameter | Type | -| --------- | --------------------------- | -| `props` | `Without`\<`P`, `"clerk"`\> | \ No newline at end of file diff --git a/clerk-typedoc/clerk-react/redirect-to-organization-profile-return.mdx b/clerk-typedoc/clerk-react/redirect-to-organization-profile-return.mdx deleted file mode 100644 index 5ae18d22c1..0000000000 --- a/clerk-typedoc/clerk-react/redirect-to-organization-profile-return.mdx +++ /dev/null @@ -1,3 +0,0 @@ -## Returns - -null \| Element \ No newline at end of file diff --git a/clerk-typedoc/clerk-react/redirect-to-user-profile-params.mdx b/clerk-typedoc/clerk-react/redirect-to-user-profile-params.mdx deleted file mode 100644 index 30caf5e222..0000000000 --- a/clerk-typedoc/clerk-react/redirect-to-user-profile-params.mdx +++ /dev/null @@ -1,5 +0,0 @@ -## Parameters - -| Parameter | Type | -| --------- | --------------------------- | -| `props` | `Without`\<`P`, `"clerk"`\> | \ No newline at end of file diff --git a/clerk-typedoc/clerk-react/redirect-to-user-profile-return.mdx b/clerk-typedoc/clerk-react/redirect-to-user-profile-return.mdx deleted file mode 100644 index 5ae18d22c1..0000000000 --- a/clerk-typedoc/clerk-react/redirect-to-user-profile-return.mdx +++ /dev/null @@ -1,3 +0,0 @@ -## Returns - -null \| Element \ No newline at end of file diff --git a/clerk-typedoc/clerk-react/subscription-details-button-params.mdx b/clerk-typedoc/clerk-react/subscription-details-button-params.mdx deleted file mode 100644 index 30caf5e222..0000000000 --- a/clerk-typedoc/clerk-react/subscription-details-button-params.mdx +++ /dev/null @@ -1,5 +0,0 @@ -## Parameters - -| Parameter | Type | -| --------- | --------------------------- | -| `props` | `Without`\<`P`, `"clerk"`\> | \ No newline at end of file diff --git a/clerk-typedoc/clerk-react/subscription-details-button-return.mdx b/clerk-typedoc/clerk-react/subscription-details-button-return.mdx deleted file mode 100644 index 15f19e09d6..0000000000 --- a/clerk-typedoc/clerk-react/subscription-details-button-return.mdx +++ /dev/null @@ -1,7 +0,0 @@ -## Returns - -null \| Element - -| Name | Type | -| -------------------------------------- | -------- | -| `displayName` | `string` | \ No newline at end of file diff --git a/clerk-typedoc/clerk-react/use-auth-params.mdx b/clerk-typedoc/clerk-react/use-auth-params.mdx deleted file mode 100644 index c7d373bcec..0000000000 --- a/clerk-typedoc/clerk-react/use-auth-params.mdx +++ /dev/null @@ -1,5 +0,0 @@ -## Parameters - -| Parameter | Type | Description | -| ---------------------------- | -------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `initialAuthStateOrOptions?` | null \| Record\ \| \{ treatPendingAsSignedOut?: boolean; \} | An object containing the initial authentication state or options for the `useAuth()` hook. If not provided, the hook will attempt to derive the state from the context. `treatPendingAsSignedOut` is a boolean that indicates whether pending sessions are considered as signed out or not. Defaults to `true`. | \ No newline at end of file diff --git a/clerk-typedoc/clerk-react/use-auth-return.mdx b/clerk-typedoc/clerk-react/use-auth-return.mdx deleted file mode 100644 index 0ed833ecb6..0000000000 --- a/clerk-typedoc/clerk-react/use-auth-return.mdx +++ /dev/null @@ -1,70 +0,0 @@ -## Returns - -There are multiple variants of this type available which you can select by clicking on one of the tabs. - - - -| Name | Type | Description | -| ------ | ------ | ------ | -| `actor` | `undefined` | The JWT actor for the session. Holds identifier for the user that is impersonating the current user. Read more about [impersonation](/docs/guides/users/impersonation). | -| `getToken()` | (options?: GetTokenOptions) => Promise\ | 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](/docs/reference/javascript/session#get-token). | -| `has` | `undefined` | A function that checks if the user has specific permissions or roles. See the [reference doc](/docs/reference/backend/types/auth-object#has). | -| `isLoaded` | `false` | A boolean that indicates whether Clerk has completed initialization. Initially `false`, becomes `true` once Clerk loads. | -| `isSignedIn` | `undefined` | A boolean that indicates whether a user is currently signed in. | -| `orgId` | `undefined` | The ID of the user's active organization. | -| `orgRole` | `undefined` | The current user's role in their active organization. | -| `orgSlug` | `undefined` | The URL-friendly identifier of the user's active organization. | -| `sessionClaims` | `undefined` | The current user's [session claims](/docs/guides/sessions/session-tokens). | -| `sessionId` | `undefined` | The ID for the current session. | -| `signOut()` | \{ (options?: SignOutOptions): Promise\; (signOutCallback?: SignOutCallback, options?: SignOutOptions): Promise\; \} | A function that signs out the current user. Returns a promise that resolves when complete. See the [reference doc](/docs/reference/javascript/clerk#sign-out). | -| `userId` | `undefined` | The ID of the current user. | - - -| Name | Type | Description | -| ------ | ------ | ------ | -| `actor` | `null` | The JWT actor for the session. Holds identifier for the user that is impersonating the current user. Read more about [impersonation](/docs/guides/users/impersonation). | -| `getToken()` | (options?: GetTokenOptions) => Promise\ | 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](/docs/reference/javascript/session#get-token). | -| `has()` | (params: CheckAuthorizationParamsWithCustomPermissions) => false | A function that checks if the user has specific permissions or roles. See the [reference doc](/docs/reference/backend/types/auth-object#has). | -| `isLoaded` | `true` | A boolean that indicates whether Clerk has completed initialization. Initially `false`, becomes `true` once Clerk loads. | -| `isSignedIn` | `false` | A boolean that indicates whether a user is currently signed in. | -| `orgId` | `null` | The ID of the user's active organization. | -| `orgRole` | `null` | The current user's role in their active organization. | -| `orgSlug` | `null` | The URL-friendly identifier of the user's active organization. | -| `sessionClaims` | `null` | The current user's [session claims](/docs/guides/sessions/session-tokens). | -| `sessionId` | `null` | The ID for the current session. | -| `signOut()` | \{ (options?: SignOutOptions): Promise\; (signOutCallback?: SignOutCallback, options?: SignOutOptions): Promise\; \} | A function that signs out the current user. Returns a promise that resolves when complete. See the [reference doc](/docs/reference/javascript/clerk#sign-out). | -| `userId` | `null` | The ID of the current user. | - - -| Name | Type | Description | -| ------ | ------ | ------ | -| `actor` | null \| \{ [x: string]: unknown; sub: string; \} | The JWT actor for the session. Holds identifier for the user that is impersonating the current user. Read more about [impersonation](/docs/guides/users/impersonation). | -| `getToken()` | (options?: GetTokenOptions) => Promise\ | 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](/docs/reference/javascript/session#get-token). | -| `has()` | (isAuthorizedParams: CheckAuthorizationParamsWithCustomPermissions) => boolean | A function that checks if the user has specific permissions or roles. See the [reference doc](/docs/reference/backend/types/auth-object#has). | -| `isLoaded` | `true` | A boolean that indicates whether Clerk has completed initialization. Initially `false`, becomes `true` once Clerk loads. | -| `isSignedIn` | `true` | A boolean that indicates whether a user is currently signed in. | -| `orgId` | `null` | The ID of the user's active organization. | -| `orgRole` | `null` | The current user's role in their active organization. | -| `orgSlug` | `null` | The URL-friendly identifier of the user's active organization. | -| `sessionClaims` | `JwtPayload` | The current user's [session claims](/docs/guides/sessions/session-tokens). | -| `sessionId` | `string` | The ID for the current session. | -| `signOut()` | \{ (options?: SignOutOptions): Promise\; (signOutCallback?: SignOutCallback, options?: SignOutOptions): Promise\; \} | A function that signs out the current user. Returns a promise that resolves when complete. See the [reference doc](/docs/reference/javascript/clerk#sign-out). | -| `userId` | `string` | The ID of the current user. | - - -| Name | Type | Description | -| ------ | ------ | ------ | -| `actor` | null \| \{ [x: string]: unknown; sub: string; \} | The JWT actor for the session. Holds identifier for the user that is impersonating the current user. Read more about [impersonation](/docs/guides/users/impersonation). | -| `getToken()` | (options?: GetTokenOptions) => Promise\ | 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](/docs/reference/javascript/session#get-token). | -| `has()` | (isAuthorizedParams: CheckAuthorizationParamsWithCustomPermissions) => boolean | A function that checks if the user has specific permissions or roles. See the [reference doc](/docs/reference/backend/types/auth-object#has). | -| `isLoaded` | `true` | A boolean that indicates whether Clerk has completed initialization. Initially `false`, becomes `true` once Clerk loads. | -| `isSignedIn` | `true` | A boolean that indicates whether a user is currently signed in. | -| `orgId` | `string` | The ID of the user's active organization. | -| `orgRole` | `string` | The current user's role in their active organization. | -| `orgSlug` | null \| string | The URL-friendly identifier of the user's active organization. | -| `sessionClaims` | `JwtPayload` | The current user's [session claims](/docs/guides/sessions/session-tokens). | -| `sessionId` | `string` | The ID for the current session. | -| `signOut()` | \{ (options?: SignOutOptions): Promise\; (signOutCallback?: SignOutCallback, options?: SignOutOptions): Promise\; \} | A function that signs out the current user. Returns a promise that resolves when complete. See the [reference doc](/docs/reference/javascript/clerk#sign-out). | -| `userId` | `string` | The ID of the current user. | - - \ No newline at end of file diff --git a/clerk-typedoc/clerk-react/use-clerk-return.mdx b/clerk-typedoc/clerk-react/use-clerk-return.mdx deleted file mode 100644 index ba9104d188..0000000000 --- a/clerk-typedoc/clerk-react/use-clerk-return.mdx +++ /dev/null @@ -1,3 +0,0 @@ -## Returns - -[Clerk](/docs/reference/javascript/clerk) — The `useClerk()` hook returns the `Clerk` object, which includes all the methods and properties listed in the [`Clerk` reference](/docs/reference/javascript/clerk). \ No newline at end of file diff --git a/clerk-typedoc/clerk-react/use-organization-list-params.mdx b/clerk-typedoc/clerk-react/use-organization-list-params.mdx deleted file mode 100644 index f51c627e8c..0000000000 --- a/clerk-typedoc/clerk-react/use-organization-list-params.mdx +++ /dev/null @@ -1,5 +0,0 @@ -## Parameters - -| Parameter | Type | -| --------- | ----- | -| `params?` | `T$1` | \ No newline at end of file diff --git a/clerk-typedoc/clerk-react/use-organization-list-return.mdx b/clerk-typedoc/clerk-react/use-organization-list-return.mdx deleted file mode 100644 index 34100d2043..0000000000 --- a/clerk-typedoc/clerk-react/use-organization-list-return.mdx +++ /dev/null @@ -1,3 +0,0 @@ -## Returns - -`UseOrganizationListReturn`\<`T$1`\> \ No newline at end of file diff --git a/clerk-typedoc/clerk-react/use-organization-params.mdx b/clerk-typedoc/clerk-react/use-organization-params.mdx deleted file mode 100644 index f51c627e8c..0000000000 --- a/clerk-typedoc/clerk-react/use-organization-params.mdx +++ /dev/null @@ -1,5 +0,0 @@ -## Parameters - -| Parameter | Type | -| --------- | ----- | -| `params?` | `T$1` | \ No newline at end of file diff --git a/clerk-typedoc/clerk-react/use-organization-return.mdx b/clerk-typedoc/clerk-react/use-organization-return.mdx deleted file mode 100644 index 915c962714..0000000000 --- a/clerk-typedoc/clerk-react/use-organization-return.mdx +++ /dev/null @@ -1,3 +0,0 @@ -## Returns - -`UseOrganizationReturn`\<`T$1`\> \ No newline at end of file diff --git a/clerk-typedoc/clerk-react/use-reverification-params.mdx b/clerk-typedoc/clerk-react/use-reverification-params.mdx deleted file mode 100644 index 912f20bb06..0000000000 --- a/clerk-typedoc/clerk-react/use-reverification-params.mdx +++ /dev/null @@ -1,6 +0,0 @@ -## Parameters - -| Parameter | Type | Description | -| ---------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------ | -| `fetcher` | `Fetcher extends (...args: any[]) => Promise` | A function that returns a promise. | -| `options?` | `Options` | Optional configuration object extending [`UseReverificationOptions`](/docs/reference/hooks/use-reverification#use-reverification-options). | \ No newline at end of file diff --git a/clerk-typedoc/clerk-react/use-reverification-return.mdx b/clerk-typedoc/clerk-react/use-reverification-return.mdx deleted file mode 100644 index 69128fb6af..0000000000 --- a/clerk-typedoc/clerk-react/use-reverification-return.mdx +++ /dev/null @@ -1,3 +0,0 @@ -## Returns - -`UseReverificationResult`\<`Fetcher`\> — The `useReverification()` hook returns an array with the "enhanced" fetcher. \ No newline at end of file diff --git a/clerk-typedoc/clerk-react/use-session-list-return.mdx b/clerk-typedoc/clerk-react/use-session-list-return.mdx deleted file mode 100644 index a1a7a2348d..0000000000 --- a/clerk-typedoc/clerk-react/use-session-list-return.mdx +++ /dev/null @@ -1,20 +0,0 @@ -## Returns - -There are multiple variants of this type available which you can select by clicking on one of the tabs. - - - -| Name | Type | Description | -| ------ | ------ | ------ | -| `isLoaded` | `false` | A boolean that indicates whether Clerk has completed initialization. Initially `false`, becomes `true` once Clerk loads. | -| `sessions` | `undefined` | A list of sessions that have been registered on the client device. | -| `setActive` | `undefined` | A function that sets the active session and/or organization. See the [reference doc](/docs/reference/javascript/clerk#set-active). | - - -| Name | Type | Description | -| ------ | ------ | ------ | -| `isLoaded` | `true` | A boolean that indicates whether Clerk has completed initialization. Initially `false`, becomes `true` once Clerk loads. | -| `sessions` | [`SessionResource`](/docs/reference/javascript/session)[] | A list of sessions that have been registered on the client device. | -| `setActive()` | (setActiveParams: [SetActiveParams](/docs/reference/javascript/types/set-active-params)) => Promise\ | A function that sets the active session and/or organization. See the [reference doc](/docs/reference/javascript/clerk#set-active). | - - \ No newline at end of file diff --git a/clerk-typedoc/clerk-react/use-session-return.mdx b/clerk-typedoc/clerk-react/use-session-return.mdx deleted file mode 100644 index b77b214257..0000000000 --- a/clerk-typedoc/clerk-react/use-session-return.mdx +++ /dev/null @@ -1,27 +0,0 @@ -## Returns - -There are multiple variants of this type available which you can select by clicking on one of the tabs. - - - -| Name | Type | Description | -| ------ | ------ | ------ | -| `isLoaded` | `false` | A boolean that indicates whether Clerk has completed initialization. Initially `false`, becomes `true` once Clerk loads. | -| `isSignedIn` | `undefined` | A boolean that indicates whether a user is currently signed in. | -| `session` | `undefined` | The current session for the user. | - - -| Name | Type | Description | -| ------ | ------ | ------ | -| `isLoaded` | `true` | A boolean that indicates whether Clerk has completed initialization. Initially `false`, becomes `true` once Clerk loads. | -| `isSignedIn` | `false` | A boolean that indicates whether a user is currently signed in. | -| `session` | `null` | The current session for the user. | - - -| Name | Type | Description | -| ------ | ------ | ------ | -| `isLoaded` | `true` | A boolean that indicates whether Clerk has completed initialization. Initially `false`, becomes `true` once Clerk loads. | -| `isSignedIn` | `boolean` | A boolean that indicates whether a user is currently signed in. | -| `session` | [`SignedInSessionResource`](/docs/reference/javascript/session) | The current session for the user. | - - \ No newline at end of file diff --git a/clerk-typedoc/clerk-react/use-sign-in-return.mdx b/clerk-typedoc/clerk-react/use-sign-in-return.mdx deleted file mode 100644 index e15a687549..0000000000 --- a/clerk-typedoc/clerk-react/use-sign-in-return.mdx +++ /dev/null @@ -1,20 +0,0 @@ -## Returns - -There are multiple variants of this type available which you can select by clicking on one of the tabs. - - - -| Name | Type | Description | -| ------ | ------ | ------ | -| `isLoaded` | `false` | A boolean that indicates whether Clerk has completed initialization. Initially `false`, becomes `true` once Clerk loads. | -| `setActive` | `undefined` | A function that sets the active session. See the [reference doc](/docs/reference/javascript/clerk#set-active). | -| `signIn` | `undefined` | An object that contains the current sign-in attempt status and methods to create a new sign-in attempt. | - - -| Name | Type | Description | -| ------ | ------ | ------ | -| `isLoaded` | `true` | A boolean that indicates whether Clerk has completed initialization. Initially `false`, becomes `true` once Clerk loads. | -| `setActive()` | (setActiveParams: [SetActiveParams](/docs/reference/javascript/types/set-active-params)) => Promise\ | A function that sets the active session. See the [reference doc](/docs/reference/javascript/clerk#set-active). | -| `signIn` | [`SignInResource`](/docs/reference/javascript/sign-in) | An object that contains the current sign-in attempt status and methods to create a new sign-in attempt. | - - \ No newline at end of file diff --git a/clerk-typedoc/clerk-react/use-sign-in-signal-return.mdx b/clerk-typedoc/clerk-react/use-sign-in-signal-return.mdx deleted file mode 100644 index 0f35acb66f..0000000000 --- a/clerk-typedoc/clerk-react/use-sign-in-signal-return.mdx +++ /dev/null @@ -1,3 +0,0 @@ -## Returns - -`SignInSignalValue` \ No newline at end of file diff --git a/clerk-typedoc/clerk-react/use-sign-up-return.mdx b/clerk-typedoc/clerk-react/use-sign-up-return.mdx deleted file mode 100644 index 0462e262c4..0000000000 --- a/clerk-typedoc/clerk-react/use-sign-up-return.mdx +++ /dev/null @@ -1,20 +0,0 @@ -## Returns - -There are multiple variants of this type available which you can select by clicking on one of the tabs. - - - -| Name | Type | Description | -| ------ | ------ | ------ | -| `isLoaded` | `false` | A boolean that indicates whether Clerk has completed initialization. Initially `false`, becomes `true` once Clerk loads. | -| `setActive` | `undefined` | A function that sets the active session. See the [reference doc](/docs/reference/javascript/clerk#set-active). | -| `signUp` | `undefined` | An object that contains the current sign-up attempt status and methods to create a new sign-up attempt. | - - -| Name | Type | Description | -| ------ | ------ | ------ | -| `isLoaded` | `true` | A boolean that indicates whether Clerk has completed initialization. Initially `false`, becomes `true` once Clerk loads. | -| `setActive()` | (setActiveParams: [SetActiveParams](/docs/reference/javascript/types/set-active-params)) => Promise\ | A function that sets the active session. See the [reference doc](/docs/reference/javascript/clerk#set-active). | -| `signUp` | [`SignUpResource`](/docs/reference/javascript/sign-up) | An object that contains the current sign-up attempt status and methods to create a new sign-up attempt. | - - \ No newline at end of file diff --git a/clerk-typedoc/clerk-react/use-sign-up-signal-return.mdx b/clerk-typedoc/clerk-react/use-sign-up-signal-return.mdx deleted file mode 100644 index 1181922038..0000000000 --- a/clerk-typedoc/clerk-react/use-sign-up-signal-return.mdx +++ /dev/null @@ -1,3 +0,0 @@ -## Returns - -`SignUpSignalValue` \ No newline at end of file diff --git a/clerk-typedoc/clerk-react/use-user-return.mdx b/clerk-typedoc/clerk-react/use-user-return.mdx deleted file mode 100644 index 8594f055c2..0000000000 --- a/clerk-typedoc/clerk-react/use-user-return.mdx +++ /dev/null @@ -1,27 +0,0 @@ -## Returns - -There are multiple variants of this type available which you can select by clicking on one of the tabs. - - - -| Name | Type | Description | -| ------ | ------ | ------ | -| `isLoaded` | `false` | A boolean that indicates whether Clerk has completed initialization. Initially `false`, becomes `true` once Clerk loads. | -| `isSignedIn` | `undefined` | A boolean that returns `true` if the user is signed in. | -| `user` | `undefined` | The `User` object for the current user. | - - -| Name | Type | Description | -| ------ | ------ | ------ | -| `isLoaded` | `true` | A boolean that indicates whether Clerk has completed initialization. Initially `false`, becomes `true` once Clerk loads. | -| `isSignedIn` | `false` | A boolean that returns `true` if the user is signed in. | -| `user` | `null` | The `User` object for the current user. | - - -| Name | Type | Description | -| ------ | ------ | ------ | -| `isLoaded` | `true` | A boolean that indicates whether Clerk has completed initialization. Initially `false`, becomes `true` once Clerk loads. | -| `isSignedIn` | `true` | A boolean that returns `true` if the user is signed in. | -| `user` | [`UserResource`](/docs/reference/javascript/user) | The `User` object for the current user. | - - \ No newline at end of file diff --git a/clerk-typedoc/nextjs/clerk-middleware-auth-object.mdx b/clerk-typedoc/nextjs/clerk-middleware-auth-object.mdx deleted file mode 100644 index c66ae2fec8..0000000000 --- a/clerk-typedoc/nextjs/clerk-middleware-auth-object.mdx +++ /dev/null @@ -1,3 +0,0 @@ -## Deprecated - -Use `ClerkMiddlewareSessionAuthObject` instead. diff --git a/clerk-typedoc/nextjs/clerk-middleware-options.mdx b/clerk-typedoc/nextjs/clerk-middleware-options.mdx index 9f86eb7923..f54ba70dad 100644 --- a/clerk-typedoc/nextjs/clerk-middleware-options.mdx +++ b/clerk-typedoc/nextjs/clerk-middleware-options.mdx @@ -2,28 +2,29 @@ The `clerkMiddleware()` function accepts an optional object. The following optio ## Properties -| Property | Type | Description | -| --------------------------------------------------------------- | --------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `afterSignInUrl?` | `string` | Full URL or path to navigate to after successful sign in. Defaults to `'/'`. | -| `afterSignUpUrl?` | `string` | Full URL or path to navigate to after successful sign up. Defaults to `'/'`. | -| `apiUrl?` | `string` | The [Clerk Backend API](/docs/reference/backend-api){{ target: '_blank' }} endpoint. Defaults to `'https://api.clerk.com'`. | -| `apiVersion?` | `string` | The version passed to the Clerk API. Defaults to `'v1'`. | -| `audience?` | string \| string[] | A string or list of [audiences](https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.3). If passed, it is checked against the `aud` claim in the token. | -| `authorizedParties?` | string[] | An allowlist of origins to verify against, to protect your application from the subdomain cookie leaking attack. Example: `['http://localhost:3000', 'https://example.com']`. | -| `clockSkewInMs?` | `number` | Specifies the allowed time difference (in milliseconds) between the Clerk server (which generates the token) and the clock of the user's application server when validating a token. Defaults to `5000`. | -| `contentSecurityPolicy?` | `ContentSecurityPolicyOptions` | When set, automatically injects a Content-Security-Policy header(s) compatible with Clerk. | -| `debug?` | `boolean` | If true, additional debug information will be logged to the console. | -| `domain?` | `string` | The domain of a [satellite application](/docs/guides/dashboard/dns-domains/satellite-domains) in a multi-domain setup. | -| `isSatellite?` | `boolean` | Whether the instance is a satellite domain in a multi-domain setup. Defaults to `false`. | -| ~~`jwksCacheTtlInMs?`~~ | `number` | **Deprecated.** This cache TTL will be removed in the next major version. Specifying a cache TTL is a no-op. | -| `jwtKey?` | `string` | Used to verify the session token in a networkless manner. Supply the PEM public key from the **[**API keys**](https://dashboard.clerk.com/last-active?path=api-keys) page -> Show JWT public key -> PEM Public Key** section in the Clerk Dashboard. **It's recommended to use [the environment variable](/docs/guides/development/clerk-environment-variables) instead.** For more information, refer to [Manual JWT verification](/docs/guides/sessions/manual-jwt-verification). | -| `machineSecretKey?` | `string` | The machine secret key to use when verifying machine-to-machine tokens. This will override the Clerk secret key. | -| `organizationSyncOptions?` | \{ organizationPatterns?: string[]; personalAccountPatterns?: string[]; \} | Used to activate a specific [organization](/docs/guides/organizations/overview) or [personal account](/docs/guides/dashboard/overview) based on URL path parameters. If there's a mismatch between the active organization in the session (e.g., as reported by `auth()`) and the organization indicated by the URL, an attempt to activate the organization specified in the URL will be made. If the activation can't be performed, either because an organization doesn't exist or the user lacks access, the active organization in the session won't be changed. Ultimately, it's the responsibility of the page to verify that the resources are appropriate to render given the URL and handle mismatches appropriately (e.g., by returning a 404). | -| `organizationSyncOptions.organizationPatterns?` | string[] | Specifies URL patterns that are organization-specific, containing an organization ID or slug as a path parameter. If a request matches this path, the organization identifier will be used to set that org as active. If the route also matches the `personalAccountPatterns` prop, this prop takes precedence. Patterns must have a path parameter named either `:id` (to match a Clerk organization ID) or `:slug` (to match a Clerk organization slug). If the organization can't be activated—either because it doesn't exist or the user lacks access—the previously active organization will remain unchanged. Components must detect this case and provide an appropriate error and/or resolution pathway, such as calling `notFound()` or displaying an [``](/docs/reference/components/organization/organization-switcher). Examples: `["/orgs/:slug",, "/orgs/:slug/(.*)"]`, `["/orgs/:id",, "/orgs/:id/(.*)"]`, `["/app/:any/orgs/:slug",, "/app/:any/orgs/:slug/(.*)"]`. | -| `organizationSyncOptions.personalAccountPatterns?` | string[] | URL patterns for resources that exist within the context of a [Clerk Personal Account](/docs/guides/dashboard/overview) (user-specific, outside any organization). If the route also matches the `organizationPattern` prop, the `organizationPattern` prop takes precedence. Examples: `["/user",, "/user/(.*)"]`, `["/user/:any",, "/user/:any/(.*)"]`. | -| `proxyUrl?` | `string` | The proxy URL from a multi-domain setup. | -| `publishableKey?` | `string` | The Clerk Publishable Key from the [**API keys**](https://dashboard.clerk.com/last-active?path=api-keys) page in the Clerk Dashboard. | -| `secretKey?` | `string` | The Clerk Secret Key from the [**API keys**](https://dashboard.clerk.com/last-active?path=api-keys) page in the Clerk Dashboard. | -| `signInUrl?` | `string` | The sign-in URL from a multi-domain setup. | -| `signUpUrl?` | `string` | The sign-up URL from a multi-domain setup. | -| `skipJwksCache?` | `boolean` | A flag to ignore the JWKS cache and always fetch JWKS before each JWT verification. | +| Property | Type | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `afterSignInUrl?` | `string` | Full URL or path to navigate to after successful sign in. Defaults to `'/'`. | +| `afterSignUpUrl?` | `string` | Full URL or path to navigate to after successful sign up. Defaults to `'/'`. | +| `apiUrl?` | `string` | The [Clerk Backend API](/docs/reference/backend-api){{ target: '_blank' }} endpoint. Defaults to `'https://api.clerk.com'`. | +| `apiVersion?` | `string` | The version passed to the Clerk API. Defaults to `'v1'`. | +| `audience?` | string \| string[] | A string or list of [audiences](https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.3). If passed, it is checked against the `aud` claim in the token. | +| `authorizedParties?` | string[] | An allowlist of origins to verify against, to protect your application from the subdomain cookie leaking attack. Example: `['http://localhost:3000', 'https://example.com']`. | +| `clockSkewInMs?` | `number` | Specifies the allowed time difference (in milliseconds) between the Clerk server (which generates the token) and the clock of the user's application server when validating a token. Defaults to `5000`. | +| `contentSecurityPolicy?` | `ContentSecurityPolicyOptions` | When set, automatically injects a Content-Security-Policy header(s) compatible with Clerk. | +| `debug?` | `boolean` | If true, additional debug information will be logged to the console. | +| `domain?` | `string` | The domain of a [satellite application](/docs/guides/dashboard/dns-domains/satellite-domains) in a multi-domain setup. | +| `headerType?` | string \| string[] | A string or list of allowed [header types](https://datatracker.ietf.org/doc/html/rfc7515#section-4.1.9). Defaults to `'JWT'`. | +| `isSatellite?` | `boolean` | Whether the instance is a satellite domain in a multi-domain setup. Defaults to `false`. | +| ~~`jwksCacheTtlInMs?`~~ | `number` | **Deprecated.** This cache TTL will be removed in the next major version. Specifying a cache TTL is a no-op. | +| `jwtKey?` | `string` | Used to verify the session token in a networkless manner. Supply the PEM public key from the **[**API keys**](https://dashboard.clerk.com/last-active?path=api-keys) page -> Show JWT public key -> PEM Public Key** section in the Clerk Dashboard. **It's recommended to use [the environment variable](/docs/guides/development/clerk-environment-variables) instead.** For more information, refer to [Manual JWT verification](/docs/guides/sessions/manual-jwt-verification). | +| `machineSecretKey?` | `string` | The machine secret key to use when verifying machine-to-machine tokens. This will override the Clerk secret key. | +| `organizationSyncOptions?` | \{ organizationPatterns?: string[]; personalAccountPatterns?: string[]; \} | Used to activate a specific [Organization](/docs/guides/organizations/overview) or [Personal Account](/docs/guides/dashboard/overview) based on URL path parameters. If there's a mismatch between the Active Organization in the session (e.g., as reported by `auth()`) and the Organization indicated by the URL, an attempt to activate the Organization specified in the URL will be made. If the activation can't be performed, either because an Organization doesn't exist or the user lacks access, the Active Organization in the session won't be changed. Ultimately, it's the responsibility of the page to verify that the resources are appropriate to render given the URL and handle mismatches appropriately (e.g., by returning a 404). | +| `organizationSyncOptions.organizationPatterns?` | string[] | Specifies URL patterns that are Organization-specific, containing an Organization ID or slug as a path parameter. If a request matches this path, the Organization identifier will be used to set that Organization as active. If the route also matches the `personalAccountPatterns` prop, this prop takes precedence. Patterns must have a path parameter named either `:id` (to match a Clerk Organization ID) or `:slug` (to match a Clerk Organization slug). If the Organization can't be activated—either because it doesn't exist or the user lacks access—the previously active Organization will remain unchanged. Components must detect this case and provide an appropriate error and/or resolution pathway, such as calling `notFound()` or displaying an [``](/docs/reference/components/organization/organization-switcher). Examples: `["/orgs/:slug",, "/orgs/:slug/(.*)"]`, `["/orgs/:id",, "/orgs/:id/(.*)"]`, `["/app/:any/orgs/:slug",, "/app/:any/orgs/:slug/(.*)"]`. | +| `organizationSyncOptions.personalAccountPatterns?` | string[] | URL patterns for resources that exist within the context of a [Clerk Personal Account](/docs/guides/dashboard/overview) (user-specific, outside any Organization). If the route also matches the `organizationPattern` prop, the `organizationPattern` prop takes precedence. Examples: `["/user",, "/user/(.*)"]`, `["/user/:any",, "/user/:any/(.*)"]`. | +| `proxyUrl?` | `string` | The proxy URL from a multi-domain setup. | +| `publishableKey?` | `string` | The Clerk Publishable Key from the [**API keys**](https://dashboard.clerk.com/last-active?path=api-keys) page in the Clerk Dashboard. | +| `secretKey?` | `string` | The Clerk Secret Key from the [**API keys**](https://dashboard.clerk.com/last-active?path=api-keys) page in the Clerk Dashboard. | +| `signInUrl?` | `string` | The sign-in URL from a multi-domain setup. | +| `signUpUrl?` | `string` | The sign-up URL from a multi-domain setup. | +| `skipJwksCache?` | `boolean` | A flag to ignore the JWKS cache and always fetch JWKS before each JWT verification. | diff --git a/clerk-typedoc/clerk-react/api-keys.mdx b/clerk-typedoc/react/api-keys.mdx similarity index 100% rename from clerk-typedoc/clerk-react/api-keys.mdx rename to clerk-typedoc/react/api-keys.mdx diff --git a/clerk-typedoc/react/checkout-button-props.mdx b/clerk-typedoc/react/checkout-button-props.mdx new file mode 100644 index 0000000000..8cf566be18 --- /dev/null +++ b/clerk-typedoc/react/checkout-button-props.mdx @@ -0,0 +1,7 @@ +> **CheckoutButtonProps** = \{ newSubscriptionRedirectUrl?: string; \} + +## Properties + +| Property | Type | Description | +| --------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ | +| `newSubscriptionRedirectUrl?` | `string` | Full URL or path to navigate to after checkout is complete and the user clicks the "Continue" button. Defaults to `undefined`. | diff --git a/clerk-typedoc/clerk-react/checkout-button.mdx b/clerk-typedoc/react/checkout-button.mdx similarity index 91% rename from clerk-typedoc/clerk-react/checkout-button.mdx rename to clerk-typedoc/react/checkout-button.mdx index 5ce1c27be6..dd548ad354 100644 --- a/clerk-typedoc/clerk-react/checkout-button.mdx +++ b/clerk-typedoc/react/checkout-button.mdx @@ -18,8 +18,8 @@ inside a `` component to ensure the user is authenticated. ## Example ```tsx -import { SignedIn } from "@clerk/clerk-react"; -import { CheckoutButton } from "@clerk/clerk-react/experimental"; +import { SignedIn } from "@clerk/react"; +import { CheckoutButton } from "@clerk/react/experimental"; // Basic usage with default "Checkout" text function BasicCheckout() { diff --git a/clerk-typedoc/clerk-react/clerk-provider-props.mdx b/clerk-typedoc/react/clerk-provider-props.mdx similarity index 95% rename from clerk-typedoc/clerk-react/clerk-provider-props.mdx rename to clerk-typedoc/react/clerk-provider-props.mdx index 4c21a2b66e..f69aed3298 100644 --- a/clerk-typedoc/clerk-react/clerk-provider-props.mdx +++ b/clerk-typedoc/react/clerk-provider-props.mdx @@ -3,25 +3,24 @@ | Property | Type | Description | | ----------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `afterMultiSessionSingleSignOutUrl?` | null \| string | The full URL or path to navigate to after signing out the current user is complete. This option applies to [multi-session applications](/docs/guides/secure/session-options#multi-session-applications). | -| ~~`afterSignInUrl?`~~ | null \| string | **Deprecated.** Use `signInFallbackRedirectUrl` or `signInForceRedirectUrl` instead. | | `afterSignOutUrl?` | null \| string | Full URL or path to navigate to after successful sign out. | -| ~~`afterSignUpUrl?`~~ | null \| string | **Deprecated.** Use `signUpFallbackRedirectUrl` or `signUpForceRedirectUrl` instead. | | `allowedRedirectOrigins?` | (string \| RegExp)[] | An optional array of domains to validate user-provided redirect URLs against. If no match is made, the redirect is considered unsafe and the default redirect will be used with a warning logged in the console. | | `allowedRedirectProtocols?` | string[] | An optional array of protocols to validate user-provided redirect URLs against. If no match is made, the redirect is considered unsafe and the default redirect will be used with a warning logged in the console. | -| `appearance?` | [`Appearance`](/docs/guides/customizing-clerk/appearance-prop/overview) | Optional object to style your components. Will only affect [Clerk Components](/docs/reference/components/overview) and not [Account Portal](/docs/guides/customizing-clerk/account-portal) pages. | +| `appearance?` | `ExtractAppearanceType`\<`TUi`, `Appearance`\> | Optional object to style your components. Will only affect [Clerk Components](/docs/reference/components/overview) and not [Account Portal](/docs/guides/customizing-clerk/account-portal) pages. | | `clerkJSUrl?` | `string` | The URL that `@clerk/clerk-js` should be hot-loaded from. | | `clerkJSVariant?` | "" \| "headless" | If your web application only uses [Control Components](/docs/reference/components/overview#control-components), you can set this value to `'headless'` and load a minimal ClerkJS bundle for optimal page performance. | | `clerkJSVersion?` | `string` | The npm version for `@clerk/clerk-js`. | +| `clerkUiCtor?` | ClerkUiConstructor \| Promise\ | Clerk UI entrypoint. | +| `clerkUiUrl?` | `string` | The URL that `@clerk/ui` should be hot-loaded from. | | `domain?` | string \| (url: URL) => string | **Required if your application is a satellite application**. Sets the domain of the satellite application. | | `experimental?` | `Autocomplete`\<\{ commerce: boolean; persistClient: boolean; rethrowOfflineNetworkErrors: boolean; \}, `Record`\<`string`, `any`\>\> | Enable experimental flags to gain access to new features. These flags are not guaranteed to be stable and may change drastically in between patch or minor versions. | | `initialState?` | `Serializable`\<\{ actor: undefined \| \{ [x: string]: unknown; sub: string; \}; factorVerificationAge: \[number, number\]; organization: undefined \| [`OrganizationResource`](/docs/reference/javascript/organization); orgId: undefined \| string; orgPermissions: undefined \| string[]; orgRole: undefined \| string; orgSlug: undefined \| string; session: undefined \| [`SessionResource`](/docs/reference/javascript/session); sessionClaims: JwtPayload; sessionId: undefined \| string; sessionStatus: [`SessionStatusClaim`](/docs/reference/javascript/types/session-status); user: undefined \| [`UserResource`](/docs/reference/javascript/user); userId: undefined \| string; \}\> | Provide an initial state of the Clerk client during server-side rendering. You don't need to set this value yourself unless you're [developing an SDK](/docs/guides/development/sdk-development/overview). | | `isSatellite?` | boolean \| (url: URL) => boolean | A boolean that indicates whether the application is a satellite application. | -| `localization?` | [`LocalizationResource`](/docs/guides/customizing-clerk/localization) | Optional object to localize your components. Will only affect [Clerk Components](/docs/reference/components/overview) and not [Account Portal](/docs/guides/customizing-clerk/account-portal) pages. | +| `localization?` | [`LocalizationResource`](/docs/guides/customizing-clerk/localization) | Optional object to localize your components. Will only affect [Clerk Components](/docs/reference/components/overview) and not [Account Portal](/docs/guides/account-portal/overview) pages. | | `newSubscriptionRedirectUrl?` | null \| string | The URL to navigate to after the user completes the checkout and clicks the "Continue" button. | | `nonce?` | `string` | This nonce value will be passed through to the `@clerk/clerk-js` script tag. Use it to implement a [strict-dynamic CSP](/docs/guides/secure/best-practices/csp-headers#implementing-a-strict-dynamic-csp). Requires the `dynamic` prop to also be set. | | `proxyUrl?` | string \| (url: URL) => string \| (url: URL) => string | **Required for applications that run behind a reverse proxy**. The URL that Clerk will proxy requests to. Can be either a relative path (`/__clerk`) or a full URL (`https:///__clerk`). | | `publishableKey` | `string` | The Clerk Publishable Key for your instance. This can be found on the [API keys](https://dashboard.clerk.com/last-active?path=api-keys) page in the Clerk Dashboard. | -| ~~`redirectUrl?`~~ | null \| string | **Deprecated.** Use `signInFallbackRedirectUrl`, `signInForceRedirectUrl`, `signUpFallbackRedirectUrl`, or `signUpForceRedirectUrl` instead. | | `routerPush?` | (to: string, metadata?: \{ windowNavigate: (to: string \| URL) => void; \}) => unknown | A function which takes the destination path as an argument and performs a "push" navigation. | | `routerReplace?` | (to: string, metadata?: \{ windowNavigate: (to: string \| URL) => void; \}) => unknown | A function which takes the destination path as an argument and performs a "replace" navigation. | | `sdkMetadata?` | \{ environment?: string; name: string; version: string; \} | Contains information about the SDK that the host application is using. You don't need to set this value yourself unless you're [developing an SDK](/docs/guides/development/sdk-development/overview). | @@ -36,8 +35,8 @@ | `signUpForceRedirectUrl?` | null \| string | This URL will always be redirected to after the user signs up. It's recommended to use the [environment variable](/docs/guides/development/clerk-environment-variables#sign-in-and-sign-up-redirects) instead. | | `signUpUrl?` | `string` | This URL will be used for any redirects that might happen and needs to point to your primary application on the client-side. This option is optional for production instances but **must be set for a satellite application in a development instance**. It's recommended to use [the environment variable](/docs/guides/development/clerk-environment-variables#sign-in-and-sign-up-redirects) instead. | | `standardBrowser?` | `boolean` | By default, ClerkJS is loaded with the assumption that cookies can be set (browser setup). On native platforms this value must be set to `false`. | -| `supportEmail?` | `string` | Optional support email for display in authentication screens. Will only affect [Clerk Components](/docs/reference/components/overview) and not [Account Portal](/docs/guides/customizing-clerk/account-portal) pages. | -| `taskUrls?` | `Record`\<"choose-organization" \| "reset-password", `string`\> | Customize the URL paths users are redirected to after sign-in or sign-up when specific session tasks need to be completed. When `undefined`, it uses Clerk's default task flow URLs. Defaults to `undefined`. | +| `supportEmail?` | `string` | Optional support email for display in authentication screens. Will only affect [Clerk Components](/docs/reference/components/overview) and not [Account Portal](/docs/guides/account-portal/overview) pages. | +| `taskUrls?` | `Partial`\<`Record`\<"choose-organization" \| "reset-password", `string`\>\> | Customize the URL paths users are redirected to after sign-in or sign-up when specific session tasks need to be completed. When `undefined`, it uses Clerk's default task flow URLs. Defaults to `undefined`. | | `telemetry?` | false \| \{ debug?: boolean; disabled?: boolean; perEventSampling?: boolean; \} | Controls whether or not Clerk will collect [telemetry data](/docs/guides/how-clerk-works/security/clerk-telemetry). If set to `debug`, telemetry events are only logged to the console and not sent to Clerk. | | `touchSession?` | `boolean` | By default, the [Clerk Frontend API `touch` endpoint](/docs/reference/frontend-api/tag/Sessions#operation/touchSession) is called during page focus to keep the last active session alive. This option allows you to disable this behavior. | -| `waitlistUrl?` | `string` | The full URL or path to the waitlist page. If `undefined`, will redirect to the [Account Portal waitlist page](/docs/guides/customizing-clerk/account-portal#waitlist). | +| `waitlistUrl?` | `string` | The full URL or path to the waitlist page. If `undefined`, will redirect to the [Account Portal waitlist page](/docs/guides/account-portal/overview#waitlist). | diff --git a/clerk-typedoc/clerk-react/experimental_use-checkout.mdx b/clerk-typedoc/react/experimental_use-checkout.mdx similarity index 95% rename from clerk-typedoc/clerk-react/experimental_use-checkout.mdx rename to clerk-typedoc/react/experimental_use-checkout.mdx index dded8f2231..544a15b141 100644 --- a/clerk-typedoc/clerk-react/experimental_use-checkout.mdx +++ b/clerk-typedoc/react/experimental_use-checkout.mdx @@ -6,4 +6,4 @@ ## Returns -`__experimental_UseCheckoutReturn` +`CheckoutSignalValue` diff --git a/clerk-typedoc/react/plan-details-button-props.mdx b/clerk-typedoc/react/plan-details-button-props.mdx new file mode 100644 index 0000000000..b1a804df73 --- /dev/null +++ b/clerk-typedoc/react/plan-details-button-props.mdx @@ -0,0 +1,4 @@ +| Name | Type | +| -------------------- | ------------------------------------------------------------------------------------------------- | +| `initialPlanPeriod?` | "month" \| "annual" | +| `planDetailsProps?` | \{ appearance?: ClerkAppearanceTheme; portalId?: string; portalRoot?: PortalRoot; \} | diff --git a/clerk-typedoc/clerk-react/plan-details-button.mdx b/clerk-typedoc/react/plan-details-button.mdx similarity index 90% rename from clerk-typedoc/clerk-react/plan-details-button.mdx rename to clerk-typedoc/react/plan-details-button.mdx index 83fcb66250..4c570cb37a 100644 --- a/clerk-typedoc/clerk-react/plan-details-button.mdx +++ b/clerk-typedoc/react/plan-details-button.mdx @@ -18,8 +18,8 @@ Clerk's Billing feature which is available under a public beta. ## Example ```tsx -import { SignedIn } from "@clerk/clerk-react"; -import { PlanDetailsButton } from "@clerk/clerk-react/experimental"; +import { SignedIn } from "@clerk/react"; +import { PlanDetailsButton } from "@clerk/react/experimental"; // Basic usage with default "Plan details" text function BasicPlanDetails() { diff --git a/clerk-typedoc/clerk-react/protect.mdx b/clerk-typedoc/react/protect.mdx similarity index 100% rename from clerk-typedoc/clerk-react/protect.mdx rename to clerk-typedoc/react/protect.mdx diff --git a/clerk-typedoc/clerk-react/redirect-to-create-organization.mdx b/clerk-typedoc/react/redirect-to-create-organization.mdx similarity index 100% rename from clerk-typedoc/clerk-react/redirect-to-create-organization.mdx rename to clerk-typedoc/react/redirect-to-create-organization.mdx diff --git a/clerk-typedoc/clerk-react/redirect-to-organization-profile.mdx b/clerk-typedoc/react/redirect-to-organization-profile.mdx similarity index 100% rename from clerk-typedoc/clerk-react/redirect-to-organization-profile.mdx rename to clerk-typedoc/react/redirect-to-organization-profile.mdx diff --git a/clerk-typedoc/clerk-react/redirect-to-user-profile.mdx b/clerk-typedoc/react/redirect-to-user-profile.mdx similarity index 100% rename from clerk-typedoc/clerk-react/redirect-to-user-profile.mdx rename to clerk-typedoc/react/redirect-to-user-profile.mdx diff --git a/clerk-typedoc/react/subscription-details-button-props.mdx b/clerk-typedoc/react/subscription-details-button-props.mdx new file mode 100644 index 0000000000..1b2cb39cde --- /dev/null +++ b/clerk-typedoc/react/subscription-details-button-props.mdx @@ -0,0 +1,7 @@ +> **SubscriptionDetailsButtonProps** = \{ for?: "organization" \| "user"; \} + +## Properties + +| Property | Type | Description | +| ----------------------- | ------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `for?` | "organization" \| "user" | The subscriber type to display the subscription details for. If `organization` is provided, the subscription details will be displayed for the Active Organization. Defaults to `'user'`. | diff --git a/clerk-typedoc/clerk-react/subscription-details-button.mdx b/clerk-typedoc/react/subscription-details-button.mdx similarity index 81% rename from clerk-typedoc/clerk-react/subscription-details-button.mdx rename to clerk-typedoc/react/subscription-details-button.mdx index efc3931a1d..0f9b8e88d6 100644 --- a/clerk-typedoc/clerk-react/subscription-details-button.mdx +++ b/clerk-typedoc/react/subscription-details-button.mdx @@ -17,15 +17,15 @@ A button component that opens the Clerk Subscription Details drawer when clicked ## Example ```tsx -import { SignedIn } from "@clerk/clerk-react"; -import { SubscriptionDetailsButton } from "@clerk/clerk-react/experimental"; +import { SignedIn } from "@clerk/react"; +import { SubscriptionDetailsButton } from "@clerk/react/experimental"; // Basic usage with default "Subscription details" text function BasicSubscriptionDetails() { return ; } -// Custom button with organization subscription +// Custom button with Organization Subscription function OrganizationSubscriptionDetails() { return ( ` component ## Throws -When `for="organization"` is used without an active organization context +When `for="organization"` is used without an Active Organization context diff --git a/clerk-typedoc/clerk-react/use-auth.mdx b/clerk-typedoc/react/use-auth.mdx similarity index 91% rename from clerk-typedoc/clerk-react/use-auth.mdx rename to clerk-typedoc/react/use-auth.mdx index 806411ffcf..d6ebf71a6f 100644 --- a/clerk-typedoc/clerk-react/use-auth.mdx +++ b/clerk-typedoc/react/use-auth.mdx @@ -23,12 +23,12 @@ There are multiple variants of this type available which you can select by click | ------ | ------ | ------ | | `actor` | `undefined` | The JWT actor for the session. Holds identifier for the user that is impersonating the current user. Read more about [impersonation](/docs/guides/users/impersonation). | | `getToken()` | (options?: GetTokenOptions) => Promise\ | 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](/docs/reference/javascript/session#get-token). | -| `has` | `undefined` | A function that checks if the user has specific permissions or roles. See the [reference doc](/docs/reference/backend/types/auth-object#has). | +| `has` | `undefined` | A function that checks if the user has specific Permissions or Roles. See the [reference doc](/docs/reference/backend/types/auth-object#has). | | `isLoaded` | `false` | A boolean that indicates whether Clerk has completed initialization. Initially `false`, becomes `true` once Clerk loads. | | `isSignedIn` | `undefined` | A boolean that indicates whether a user is currently signed in. | -| `orgId` | `undefined` | The ID of the user's active organization. | -| `orgRole` | `undefined` | The current user's role in their active organization. | -| `orgSlug` | `undefined` | The URL-friendly identifier of the user's active organization. | +| `orgId` | `undefined` | The ID of the user's active Organization. | +| `orgRole` | `undefined` | The current user's Role in their active Organization. | +| `orgSlug` | `undefined` | The URL-friendly identifier of the user's Active Organization. | | `sessionClaims` | `undefined` | The current user's [session claims](/docs/guides/sessions/session-tokens). | | `sessionId` | `undefined` | The ID for the current session. | | `signOut()` | \{ (options?: SignOutOptions): Promise\; (signOutCallback?: SignOutCallback, options?: SignOutOptions): Promise\; \} | A function that signs out the current user. Returns a promise that resolves when complete. See the [reference doc](/docs/reference/javascript/clerk#sign-out). | @@ -39,12 +39,12 @@ There are multiple variants of this type available which you can select by click | ------ | ------ | ------ | | `actor` | `null` | The JWT actor for the session. Holds identifier for the user that is impersonating the current user. Read more about [impersonation](/docs/guides/users/impersonation). | | `getToken()` | (options?: GetTokenOptions) => Promise\ | 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](/docs/reference/javascript/session#get-token). | -| `has()` | (params: CheckAuthorizationParamsWithCustomPermissions) => false | A function that checks if the user has specific permissions or roles. See the [reference doc](/docs/reference/backend/types/auth-object#has). | +| `has()` | (params: CheckAuthorizationParamsWithCustomPermissions) => false | A function that checks if the user has specific Permissions or Roles. See the [reference doc](/docs/reference/backend/types/auth-object#has). | | `isLoaded` | `true` | A boolean that indicates whether Clerk has completed initialization. Initially `false`, becomes `true` once Clerk loads. | | `isSignedIn` | `false` | A boolean that indicates whether a user is currently signed in. | -| `orgId` | `null` | The ID of the user's active organization. | -| `orgRole` | `null` | The current user's role in their active organization. | -| `orgSlug` | `null` | The URL-friendly identifier of the user's active organization. | +| `orgId` | `null` | The ID of the user's active Organization. | +| `orgRole` | `null` | The current user's Role in their active Organization. | +| `orgSlug` | `null` | The URL-friendly identifier of the user's Active Organization. | | `sessionClaims` | `null` | The current user's [session claims](/docs/guides/sessions/session-tokens). | | `sessionId` | `null` | The ID for the current session. | | `signOut()` | \{ (options?: SignOutOptions): Promise\; (signOutCallback?: SignOutCallback, options?: SignOutOptions): Promise\; \} | A function that signs out the current user. Returns a promise that resolves when complete. See the [reference doc](/docs/reference/javascript/clerk#sign-out). | @@ -55,12 +55,12 @@ There are multiple variants of this type available which you can select by click | ------ | ------ | ------ | | `actor` | null \| \{ [x: string]: unknown; sub: string; \} | The JWT actor for the session. Holds identifier for the user that is impersonating the current user. Read more about [impersonation](/docs/guides/users/impersonation). | | `getToken()` | (options?: GetTokenOptions) => Promise\ | 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](/docs/reference/javascript/session#get-token). | -| `has()` | (isAuthorizedParams: CheckAuthorizationParamsWithCustomPermissions) => boolean | A function that checks if the user has specific permissions or roles. See the [reference doc](/docs/reference/backend/types/auth-object#has). | +| `has()` | (isAuthorizedParams: CheckAuthorizationParamsWithCustomPermissions) => boolean | A function that checks if the user has specific Permissions or Roles. See the [reference doc](/docs/reference/backend/types/auth-object#has). | | `isLoaded` | `true` | A boolean that indicates whether Clerk has completed initialization. Initially `false`, becomes `true` once Clerk loads. | | `isSignedIn` | `true` | A boolean that indicates whether a user is currently signed in. | -| `orgId` | `null` | The ID of the user's active organization. | -| `orgRole` | `null` | The current user's role in their active organization. | -| `orgSlug` | `null` | The URL-friendly identifier of the user's active organization. | +| `orgId` | `null` | The ID of the user's active Organization. | +| `orgRole` | `null` | The current user's Role in their active Organization. | +| `orgSlug` | `null` | The URL-friendly identifier of the user's Active Organization. | | `sessionClaims` | `JwtPayload` | The current user's [session claims](/docs/guides/sessions/session-tokens). | | `sessionId` | `string` | The ID for the current session. | | `signOut()` | \{ (options?: SignOutOptions): Promise\; (signOutCallback?: SignOutCallback, options?: SignOutOptions): Promise\; \} | A function that signs out the current user. Returns a promise that resolves when complete. See the [reference doc](/docs/reference/javascript/clerk#sign-out). | @@ -71,12 +71,12 @@ There are multiple variants of this type available which you can select by click | ------ | ------ | ------ | | `actor` | null \| \{ [x: string]: unknown; sub: string; \} | The JWT actor for the session. Holds identifier for the user that is impersonating the current user. Read more about [impersonation](/docs/guides/users/impersonation). | | `getToken()` | (options?: GetTokenOptions) => Promise\ | 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](/docs/reference/javascript/session#get-token). | -| `has()` | (isAuthorizedParams: CheckAuthorizationParamsWithCustomPermissions) => boolean | A function that checks if the user has specific permissions or roles. See the [reference doc](/docs/reference/backend/types/auth-object#has). | +| `has()` | (isAuthorizedParams: CheckAuthorizationParamsWithCustomPermissions) => boolean | A function that checks if the user has specific Permissions or Roles. See the [reference doc](/docs/reference/backend/types/auth-object#has). | | `isLoaded` | `true` | A boolean that indicates whether Clerk has completed initialization. Initially `false`, becomes `true` once Clerk loads. | | `isSignedIn` | `true` | A boolean that indicates whether a user is currently signed in. | -| `orgId` | `string` | The ID of the user's active organization. | -| `orgRole` | `string` | The current user's role in their active organization. | -| `orgSlug` | null \| string | The URL-friendly identifier of the user's active organization. | +| `orgId` | `string` | The ID of the user's active Organization. | +| `orgRole` | `string` | The current user's Role in their active Organization. | +| `orgSlug` | null \| string | The URL-friendly identifier of the user's Active Organization. | | `sessionClaims` | `JwtPayload` | The current user's [session claims](/docs/guides/sessions/session-tokens). | | `sessionId` | `string` | The ID for the current session. | | `signOut()` | \{ (options?: SignOutOptions): Promise\; (signOutCallback?: SignOutCallback, options?: SignOutOptions): Promise\; \} | A function that signs out the current user. Returns a promise that resolves when complete. See the [reference doc](/docs/reference/javascript/clerk#sign-out). | @@ -92,7 +92,7 @@ The following example demonstrates how to use the `useAuth()` hook to access the ```tsx {{ filename: 'src/pages/ExternalDataPage.tsx' }} -import { useAuth } from "@clerk/clerk-react"; +import { useAuth } from "@clerk/react"; export default function ExternalDataPage() { const { userId, sessionId, getToken, isLoaded, isSignedIn } = useAuth(); diff --git a/clerk-typedoc/clerk-react/use-clerk.mdx b/clerk-typedoc/react/use-clerk.mdx similarity index 96% rename from clerk-typedoc/clerk-react/use-clerk.mdx rename to clerk-typedoc/react/use-clerk.mdx index 1643c1ace9..4b49837457 100644 --- a/clerk-typedoc/clerk-react/use-clerk.mdx +++ b/clerk-typedoc/react/use-clerk.mdx @@ -15,7 +15,7 @@ The following example uses the `useClerk()` hook to access the `clerk` object. T ```tsx {{ filename: 'src/Home.tsx' }} -import { useClerk } from "@clerk/clerk-react"; +import { useClerk } from "@clerk/react"; export default function Home() { const clerk = useClerk(); diff --git a/clerk-typedoc/clerk-react/use-organization-list.mdx b/clerk-typedoc/react/use-organization-list.mdx similarity index 95% rename from clerk-typedoc/clerk-react/use-organization-list.mdx rename to clerk-typedoc/react/use-organization-list.mdx index 4f8e3b688e..88d88c4357 100644 --- a/clerk-typedoc/clerk-react/use-organization-list.mdx +++ b/clerk-typedoc/react/use-organization-list.mdx @@ -43,10 +43,10 @@ const { userMemberships } = useOrganizationList({ ### Infinite pagination -The following example demonstrates how to use the `infinite` property to fetch and append new data to the existing list. The `userMemberships` attribute will be populated with the first page of the user's organization memberships. When the "Load more" button is clicked, the `fetchNext` helper function will be called to append the next page of memberships to the list. +The following example demonstrates how to use the `infinite` property to fetch and append new data to the existing list. The `userMemberships` attribute will be populated with the first page of the user's Organization memberships. When the "Load more" button is clicked, the `fetchNext` helper function will be called to append the next page of memberships to the list. ```tsx {{ filename: 'src/components/JoinedOrganizations.tsx' }} -import { useOrganizationList } from "@clerk/clerk-react"; +import { useOrganizationList } from "@clerk/react"; import React from "react"; const JoinedOrganizations = () => { @@ -95,7 +95,7 @@ The following example demonstrates how to use the `fetchPrevious` and `fetchNext Notice the difference between this example's pagination and the infinite pagination example above. ```tsx {{ filename: 'src/components/UserInvitationsTable.tsx' }} -import { useOrganizationList } from "@clerk/clerk-react"; +import { useOrganizationList } from "@clerk/react"; import React from "react"; const UserInvitationsTable = () => { diff --git a/clerk-typedoc/clerk-react/use-organization.mdx b/clerk-typedoc/react/use-organization.mdx similarity index 93% rename from clerk-typedoc/clerk-react/use-organization.mdx rename to clerk-typedoc/react/use-organization.mdx index 0a8561401c..a54df84736 100644 --- a/clerk-typedoc/clerk-react/use-organization.mdx +++ b/clerk-typedoc/react/use-organization.mdx @@ -1,4 +1,4 @@ -The `useOrganization()` hook retrieves attributes of the currently active organization. +The `useOrganization()` hook retrieves attributes of the currently Active Organization. ## Parameters @@ -43,10 +43,10 @@ const { invitations } = useOrganization({ ### Infinite pagination -The following example demonstrates how to use the `infinite` property to fetch and append new data to the existing list. The `memberships` attribute will be populated with the first page of the organization's memberships. When the "Load more" button is clicked, the `fetchNext` helper function will be called to append the next page of memberships to the list. +The following example demonstrates how to use the `infinite` property to fetch and append new data to the existing list. The `memberships` attribute will be populated with the first page of the Organization's memberships. When the "Load more" button is clicked, the `fetchNext` helper function will be called to append the next page of memberships to the list. ```tsx -import { useOrganization } from '@clerk/clerk-react' +import { useOrganization } from '@clerk/react' export default function MemberList() { const { memberships } = useOrganization({ @@ -86,12 +86,12 @@ export default function MemberList() { ### Simple pagination -The following example demonstrates how to use the `fetchPrevious` and `fetchNext` helper functions to paginate through the data. The `memberships` attribute will be populated with the first page of the organization's memberships. When the "Previous page" or "Next page" button is clicked, the `fetchPrevious` or `fetchNext` helper function will be called to fetch the previous or next page of memberships. +The following example demonstrates how to use the `fetchPrevious` and `fetchNext` helper functions to paginate through the data. The `memberships` attribute will be populated with the first page of the Organization's memberships. When the "Previous page" or "Next page" button is clicked, the `fetchPrevious` or `fetchNext` helper function will be called to fetch the previous or next page of memberships. Notice the difference between this example's pagination and the infinite pagination example above. ```tsx -import { useOrganization } from '@clerk/clerk-react' +import { useOrganization } from '@clerk/react' export default function MemberList() { const { memberships } = useOrganization({ diff --git a/clerk-typedoc/clerk-react/use-reverification.mdx b/clerk-typedoc/react/use-reverification.mdx similarity index 90% rename from clerk-typedoc/clerk-react/use-reverification.mdx rename to clerk-typedoc/react/use-reverification.mdx index a8ec720e85..a0626147b2 100644 --- a/clerk-typedoc/clerk-react/use-reverification.mdx +++ b/clerk-typedoc/react/use-reverification.mdx @@ -1,6 +1,6 @@ > [!WARNING] > -> Depending on the SDK you're using, this feature requires `@clerk/nextjs@6.12.7` or later, `@clerk/clerk-react@5.25.1` or later, and `@clerk/clerk-js@5.57.1` or later. +> Depending on the SDK you're using, this feature requires `@clerk/nextjs@6.12.7` or later, `@clerk/react@5.25.1` or later, and `@clerk/clerk-js@5.57.1` or later. The `useReverification()` hook is used to handle a session's reverification flow. If a request requires reverification, a modal will display, prompting the user to verify their credentials. Upon successful verification, the original request will automatically retry. @@ -24,8 +24,8 @@ The following example demonstrates how to handle scenarios where a user cancels In the following example, `myFetcher` would be a function in your backend that fetches data from the route that requires reverification. See the [guide on how to require reverification](/docs/guides/secure/reverification) for more information. ```tsx {{ filename: 'src/components/MyButton.tsx' }} -import { useReverification } from "@clerk/clerk-react"; -import { isReverificationCancelledError } from "@clerk/clerk-react/error"; +import { useReverification } from "@clerk/react"; +import { isReverificationCancelledError } from "@clerk/react/error"; type MyData = { balance: number; diff --git a/clerk-typedoc/clerk-react/use-session-list.mdx b/clerk-typedoc/react/use-session-list.mdx similarity index 92% rename from clerk-typedoc/clerk-react/use-session-list.mdx rename to clerk-typedoc/react/use-session-list.mdx index 231664d787..5e52cd8a77 100644 --- a/clerk-typedoc/clerk-react/use-session-list.mdx +++ b/clerk-typedoc/react/use-session-list.mdx @@ -10,14 +10,14 @@ There are multiple variants of this type available which you can select by click | ------ | ------ | ------ | | `isLoaded` | `false` | A boolean that indicates whether Clerk has completed initialization. Initially `false`, becomes `true` once Clerk loads. | | `sessions` | `undefined` | A list of sessions that have been registered on the client device. | -| `setActive` | `undefined` | A function that sets the active session and/or organization. See the [reference doc](/docs/reference/javascript/clerk#set-active). | +| `setActive` | `undefined` | A function that sets the active session and/or Organization. See the [reference doc](/docs/reference/javascript/clerk#set-active). | | Name | Type | Description | | ------ | ------ | ------ | | `isLoaded` | `true` | A boolean that indicates whether Clerk has completed initialization. Initially `false`, becomes `true` once Clerk loads. | | `sessions` | [`SessionResource`](/docs/reference/javascript/session)[] | A list of sessions that have been registered on the client device. | -| `setActive()` | (setActiveParams: [SetActiveParams](/docs/reference/javascript/types/set-active-params)) => Promise\ | A function that sets the active session and/or organization. See the [reference doc](/docs/reference/javascript/clerk#set-active). | +| `setActive()` | (setActiveParams: [SetActiveParams](/docs/reference/javascript/types/set-active-params)) => Promise\ | A function that sets the active session and/or Organization. See the [reference doc](/docs/reference/javascript/clerk#set-active). | @@ -31,7 +31,7 @@ The following example uses `useSessionList()` to get a list of sessions that hav ```tsx {{ filename: 'src/Home.tsx' }} -import { useSessionList } from "@clerk/clerk-react"; +import { useSessionList } from "@clerk/react"; export default function Home() { const { isLoaded, sessions } = useSessionList(); diff --git a/clerk-typedoc/clerk-react/use-session.mdx b/clerk-typedoc/react/use-session.mdx similarity index 98% rename from clerk-typedoc/clerk-react/use-session.mdx rename to clerk-typedoc/react/use-session.mdx index 86492af39d..b59fdc28df 100644 --- a/clerk-typedoc/clerk-react/use-session.mdx +++ b/clerk-typedoc/react/use-session.mdx @@ -38,7 +38,7 @@ The following example uses the `useSession()` hook to access the `Session` objec ```tsx {{ filename: 'src/Home.tsx' }} -import { useSession } from "@clerk/clerk-react"; +import { useSession } from "@clerk/react"; export default function Home() { const { isLoaded, session, isSignedIn } = useSession(); diff --git a/clerk-typedoc/clerk-react/use-sign-in.mdx b/clerk-typedoc/react/use-sign-in-1.mdx similarity index 97% rename from clerk-typedoc/clerk-react/use-sign-in.mdx rename to clerk-typedoc/react/use-sign-in-1.mdx index f00ac47ce9..5f1a5daf82 100644 --- a/clerk-typedoc/clerk-react/use-sign-in.mdx +++ b/clerk-typedoc/react/use-sign-in-1.mdx @@ -31,7 +31,7 @@ The following example uses the `useSignIn()` hook to access the [`SignIn`](/docs ```tsx {{ filename: 'src/pages/SignInPage.tsx' }} -import { useSignIn } from "@clerk/clerk-react"; +import { useSignIn } from "@clerk/react"; export default function SignInPage() { const { isLoaded, signIn } = useSignIn(); @@ -51,7 +51,7 @@ export default function SignInPage() { ```tsx {{ filename: 'app/sign-in/page.tsx' }} "use client"; -import { useSignIn } from "@clerk/nextjs"; +import { useSignIn } from "@clerk/nextjs/legacy"; export default function SignInPage() { const { isLoaded, signIn } = useSignIn(); diff --git a/clerk-typedoc/clerk-react/use-sign-in-signal.mdx b/clerk-typedoc/react/use-sign-in.mdx similarity index 76% rename from clerk-typedoc/clerk-react/use-sign-in-signal.mdx rename to clerk-typedoc/react/use-sign-in.mdx index 4b120d0af1..50b79e0f44 100644 --- a/clerk-typedoc/clerk-react/use-sign-in-signal.mdx +++ b/clerk-typedoc/react/use-sign-in.mdx @@ -7,7 +7,7 @@ This hook allows you to access the Signal-based `SignIn` resource. ## Example ```ts -import { useSignInSignal } from "@clerk/clerk-react/experimental"; +import { useSignInSignal } from "@clerk/react/experimental"; function SignInForm() { const { signIn, errors, fetchStatus } = useSignInSignal(); diff --git a/clerk-typedoc/clerk-react/use-sign-up.mdx b/clerk-typedoc/react/use-sign-up-1.mdx similarity index 97% rename from clerk-typedoc/clerk-react/use-sign-up.mdx rename to clerk-typedoc/react/use-sign-up-1.mdx index 26ff444dec..d588a1da77 100644 --- a/clerk-typedoc/clerk-react/use-sign-up.mdx +++ b/clerk-typedoc/react/use-sign-up-1.mdx @@ -31,7 +31,7 @@ The following example uses the `useSignUp()` hook to access the [`SignUp`](/docs ```tsx {{ filename: 'src/pages/SignUpPage.tsx' }} -import { useSignUp } from "@clerk/clerk-react"; +import { useSignUp } from "@clerk/react"; export default function SignUpPage() { const { isLoaded, signUp } = useSignUp(); @@ -51,7 +51,7 @@ export default function SignUpPage() { ```tsx {{ filename: 'app/sign-up/page.tsx' }} "use client"; -import { useSignUp } from "@clerk/nextjs"; +import { useSignUp } from "@clerk/nextjs/legacy"; export default function SignUpPage() { const { isLoaded, signUp } = useSignUp(); diff --git a/clerk-typedoc/clerk-react/use-sign-up-signal.mdx b/clerk-typedoc/react/use-sign-up.mdx similarity index 76% rename from clerk-typedoc/clerk-react/use-sign-up-signal.mdx rename to clerk-typedoc/react/use-sign-up.mdx index 800224b5d5..dbdbdd636d 100644 --- a/clerk-typedoc/clerk-react/use-sign-up-signal.mdx +++ b/clerk-typedoc/react/use-sign-up.mdx @@ -7,7 +7,7 @@ This hook allows you to access the Signal-based `SignUp` resource. ## Example ```ts -import { useSignUpSignal } from "@clerk/clerk-react/experimental"; +import { useSignUpSignal } from "@clerk/react/experimental"; function SignUpForm() { const { signUp, errors, fetchStatus } = useSignUpSignal(); diff --git a/clerk-typedoc/clerk-react/use-user.mdx b/clerk-typedoc/react/use-user.mdx similarity index 97% rename from clerk-typedoc/clerk-react/use-user.mdx rename to clerk-typedoc/react/use-user.mdx index 4fb9fccef7..158ed34804 100644 --- a/clerk-typedoc/clerk-react/use-user.mdx +++ b/clerk-typedoc/react/use-user.mdx @@ -35,7 +35,7 @@ There are multiple variants of this type available which you can select by click The following example uses the `useUser()` hook to access the [`User`](/docs/reference/javascript/user) object, which contains the current user's data such as their full name. The `isLoaded` and `isSignedIn` properties are used to handle the loading state and to check if the user is signed in, respectively. ```tsx {{ filename: 'src/Example.tsx' }} -import { useUser } from "@clerk/clerk-react"; +import { useUser } from "@clerk/react"; export default function Example() { const { isSignedIn, user, isLoaded } = useUser(); @@ -60,7 +60,7 @@ The following example uses the `useUser()` hook to access the [`User`](/docs/ref ```tsx {{ filename: 'src/Home.tsx' }} -import { useUser } from "@clerk/clerk-react"; +import { useUser } from "@clerk/react"; export default function Home() { const { isSignedIn, isLoaded, user } = useUser(); @@ -135,7 +135,7 @@ The following example uses the `useUser()` hook to access the [`User`](/docs/ref ```tsx {{ filename: 'src/Home.tsx' }} -import { useUser } from "@clerk/clerk-react"; +import { useUser } from "@clerk/react"; export default function Home() { const { isSignedIn, isLoaded, user } = useUser(); diff --git a/clerk-typedoc/shared/api-url-from-publishable-key.mdx b/clerk-typedoc/shared/api-url-from-publishable-key.mdx deleted file mode 100644 index 0bb0c86f12..0000000000 --- a/clerk-typedoc/shared/api-url-from-publishable-key.mdx +++ /dev/null @@ -1,11 +0,0 @@ -Get the correct API url based on the publishable key. - -## Parameters - -| Parameter | Type | Description | -| ---------------- | -------- | ----------------------------- | -| `publishableKey` | `string` | The publishable key to parse. | - -## Returns - -"https://api.lclclerk.com" \| "https://api.clerkstage.dev" \| "https://api.clerk.com" — One of Clerk's API URLs. diff --git a/clerk-typedoc/shared/billing-checkout-resource.mdx b/clerk-typedoc/shared/billing-checkout-resource.mdx index 0971e31ebd..1f6c827f64 100644 --- a/clerk-typedoc/shared/billing-checkout-resource.mdx +++ b/clerk-typedoc/shared/billing-checkout-resource.mdx @@ -9,13 +9,13 @@ The `BillingCheckoutResource` type represents information about a checkout sessi | `externalGatewayId` | `string` | The identifier for the external payment gateway used for this checkout session. | | `freeTrialEndsAt?` | `Date` | Unix timestamp (milliseconds) of when the free trial ends. | | `id` | `string` | The unique identifier for the checkout session. | -| `isImmediatePlanChange` | `boolean` | Whether the plan change will take effect immediately after checkout. | +| `isImmediatePlanChange` | `boolean` | Whether the Plan change will take effect immediately after checkout. | | `needsPaymentMethod` | `boolean` | Whether a payment method is required for this checkout. | | `pathRoot` | `string` | The root path of the resource. | | `payer` | [`BillingPayerResource`](/docs/reference/javascript/types/billing-payer-resource) | The payer associated with the checkout. | | `paymentMethod?` | [`BillingPaymentMethodResource`](/docs/reference/javascript/types/billing-payment-method-resource) | The payment method being used for the checkout, such as a credit card or bank account. | -| `plan` | [`BillingPlanResource`](/docs/reference/javascript/types/billing-plan-resource) | The subscription plan details for the checkout. | -| `planPeriod` | "month" \| "annual" | The billing period for the plan. | -| `planPeriodStart?` | `number` | The start date of the plan period, represented as a Unix timestamp. | +| `plan` | [`BillingPlanResource`](/docs/reference/javascript/types/billing-plan-resource) | The Subscription Plan details for the checkout. | +| `planPeriod` | "month" \| "annual" | The billing period for the Plan. | +| `planPeriodStart?` | `number` | The start date of the Plan period, represented as a Unix timestamp. | | `status` | "needs_confirmation" \| "completed" | The current status of the checkout session. | | `totals` | [`BillingCheckoutTotals`](/docs/reference/javascript/types/billing-checkout-totals) | The total costs, taxes, and other pricing details for the checkout. | diff --git a/clerk-typedoc/shared/billing-checkout-totals.mdx b/clerk-typedoc/shared/billing-checkout-totals.mdx index d03e9b0cf1..a3a284c059 100644 --- a/clerk-typedoc/shared/billing-checkout-totals.mdx +++ b/clerk-typedoc/shared/billing-checkout-totals.mdx @@ -7,7 +7,7 @@ The `BillingCheckoutTotals` type represents the total costs, taxes, and other pr | `credit` | null \| [BillingMoneyAmount](/docs/reference/javascript/types/billing-money-amount) | Any credits (like account balance or promo credits) that are being applied to the checkout. | | `grandTotal` | [`BillingMoneyAmount`](/docs/reference/javascript/types/billing-money-amount) | The total amount for the checkout, including taxes and after credits/discounts are applied. This is the final amount due. | | `pastDue` | null \| [BillingMoneyAmount](/docs/reference/javascript/types/billing-money-amount) | Any outstanding amount from previous unpaid invoices that is being collected as part of the checkout. | -| `subtotal` | [`BillingMoneyAmount`](/docs/reference/javascript/types/billing-money-amount) | The price of the items or plan before taxes, credits, or discounts are applied. | +| `subtotal` | [`BillingMoneyAmount`](/docs/reference/javascript/types/billing-money-amount) | The price of the items or Plan before taxes, credits, or discounts are applied. | | `taxTotal` | [`BillingMoneyAmount`](/docs/reference/javascript/types/billing-money-amount) | The amount of tax included in the checkout. | | `totalDueAfterFreeTrial` | null \| [BillingMoneyAmount](/docs/reference/javascript/types/billing-money-amount) | The amount that becomes due after a free trial ends. | | `totalDueNow` | [`BillingMoneyAmount`](/docs/reference/javascript/types/billing-money-amount) | The amount that needs to be immediately paid to complete the checkout. | diff --git a/clerk-typedoc/shared/billing-payer-resource.mdx b/clerk-typedoc/shared/billing-payer-resource.mdx index ff8d1688f1..e1ec666ea2 100644 --- a/clerk-typedoc/shared/billing-payer-resource.mdx +++ b/clerk-typedoc/shared/billing-payer-resource.mdx @@ -10,8 +10,8 @@ The `BillingPayerResource` type represents a payer associated with a billing sub | `id` | `string` | The unique identifier for the payer. | | `imageUrl?` | `string` | The URL of the payer's avatar image. | | `lastName?` | null \| string | The last name of the payer. | -| `organizationId` | null \| string | The unique identifier for the organization that the payer belongs to. | -| `organizationName?` | null \| string | The name of the organization that the payer belongs to. | +| `organizationId` | null \| string | The unique identifier for the Organization that the payer belongs to. | +| `organizationName?` | null \| string | The name of the Organization that the payer belongs to. | | `pathRoot` | `string` | The root path of the resource. | | `updatedAt?` | `Date` | The date and time when the payer was last updated. | | `userId` | null \| string | The unique identifier for the payer. | diff --git a/clerk-typedoc/shared/billing-payment-method-resource.mdx b/clerk-typedoc/shared/billing-payment-method-resource.mdx index 29fe158a2c..d39d1f3548 100644 --- a/clerk-typedoc/shared/billing-payment-method-resource.mdx +++ b/clerk-typedoc/shared/billing-payment-method-resource.mdx @@ -12,10 +12,10 @@ The `BillingPaymentMethodResource` type represents a payment method for a checko | `isDefault?` | `boolean` | Whether the payment method is set as the default for the account. | | `isRemovable?` | `boolean` | Whether the payment method can be removed by the user. | | `last4` | null \| string | The last four digits of the payment method. | -| `makeDefault` | (params?: \{ orgId?: string; \}) => Promise\ | A function that sets this payment method as the default for the account. Accepts the following parameters:
  • `orgId?` (`string`): The ID of the organization to set as the default.
| +| `makeDefault` | (params?: \{ orgId?: string; \}) => Promise\ | A function that sets this payment method as the default for the account. Accepts the following parameters:
  • `orgId?` (`string`): The ID of the Organization to set as the default.
| | `pathRoot` | `string` | The root path of the resource. | | `paymentType?` | `"card"` | The type of payment method. For example, `'card'`. | -| `remove` | (params?: \{ orgId?: string; \}) => Promise\<[DeletedObjectResource](/docs/reference/javascript/types/deleted-object-resource)\> | A function that removes this payment method from the account. Accepts the following parameters:
  • `orgId?` (`string`): The ID of the organization to remove the payment method from.
| +| `remove` | (params?: \{ orgId?: string; \}) => Promise\<[DeletedObjectResource](/docs/reference/javascript/types/deleted-object-resource)\> | A function that removes this payment method from the account. Accepts the following parameters:
  • `orgId?` (`string`): The ID of the Organization to remove the payment method from.
| | `status` | "active" \| "expired" \| "disconnected" | The current status of the payment method. | | `updatedAt?` | null \| Date | The date the payment method was last updated, if available. | | `walletType?` | null \| string | The type of digital wallet, if applicable. For example, `'apple_pay'`, or `'google_pay'`. | diff --git a/clerk-typedoc/shared/billing-payment-resource.mdx b/clerk-typedoc/shared/billing-payment-resource.mdx index ca7964df19..c3aa465df5 100644 --- a/clerk-typedoc/shared/billing-payment-resource.mdx +++ b/clerk-typedoc/shared/billing-payment-resource.mdx @@ -1,4 +1,4 @@ -The `BillingPaymentResource` type represents a payment attempt for a user or organization. +The `BillingPaymentResource` type represents a payment attempt for a user or Organization. ## Properties diff --git a/clerk-typedoc/shared/billing-plan-resource.mdx b/clerk-typedoc/shared/billing-plan-resource.mdx index 6bc7a49ce6..faaf37363a 100644 --- a/clerk-typedoc/shared/billing-plan-resource.mdx +++ b/clerk-typedoc/shared/billing-plan-resource.mdx @@ -1,23 +1,23 @@ -The `BillingPlanResource` type represents a subscription plan with its details. +The `BillingPlanResource` type represents a Subscription Plan with its details. ## Properties | Property | Type | Description | | ------------------------------------------------ | ------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `annualFee` | null \| [BillingMoneyAmount](/docs/reference/javascript/types/billing-money-amount) | The annual price of the plan or `null` if the plan is not annual. | -| `annualMonthlyFee` | null \| [BillingMoneyAmount](/docs/reference/javascript/types/billing-money-amount) | The effective monthly price when billed annually or `null` if the plan is not annual. | -| `avatarUrl` | null \| string | The URL of the plan's avatar image, or `null` if not set. | -| `description` | null \| string | A short description of what the plan offers, or `null` if no description is provided. | -| `features` | [FeatureResource](/docs/reference/javascript/types/feature-resource)[] | The features the plan offers. | -| `fee` | [`BillingMoneyAmount`](/docs/reference/javascript/types/billing-money-amount) | The monthly price of the plan. | -| `forPayerType` | "org" \| "user" | Specifies the subscriber type this plan is designed for. Each plan is exclusively created for either individual users or organizations, and cannot be used interchangeably. | -| `freeTrialDays` | null \| number | The number of days of the free trial for the plan. `null` if the plan does not have a free trial. | -| `freeTrialEnabled` | `boolean` | Whether the plan has a free trial. | -| `hasBaseFee` | `boolean` | Whether the plan has a base fee. | -| `id` | `string` | The unique identifier for the plan. | -| `isDefault` | `boolean` | Whether the plan is the default plan. | -| `isRecurring` | `boolean` | Whether the plan is recurring. | -| `name` | `string` | The name of the plan. | +| `annualFee` | null \| [BillingMoneyAmount](/docs/reference/javascript/types/billing-money-amount) | The annual price of the Plan or `null` if the Plan is not annual. | +| `annualMonthlyFee` | null \| [BillingMoneyAmount](/docs/reference/javascript/types/billing-money-amount) | The effective monthly price when billed annually or `null` if the Plan is not annual. | +| `avatarUrl` | null \| string | The URL of the Plan's avatar image, or `null` if not set. | +| `description` | null \| string | A short description of what the Plan offers, or `null` if no description is provided. | +| `features` | [FeatureResource](/docs/reference/javascript/types/feature-resource)[] | The Features the Plan offers. | +| `fee` | [`BillingMoneyAmount`](/docs/reference/javascript/types/billing-money-amount) | The monthly price of the Plan. | +| `forPayerType` | "org" \| "user" | Specifies the subscriber type this Plan is designed for. Each Plan is exclusively created for either individual users or Organizations, and cannot be used interchangeably. | +| `freeTrialDays` | null \| number | The number of days of the free trial for the Plan. `null` if the Plan does not have a free trial. | +| `freeTrialEnabled` | `boolean` | Whether the Plan has a free trial. | +| `hasBaseFee` | `boolean` | Whether the Plan has a base fee. | +| `id` | `string` | The unique identifier for the Plan. | +| `isDefault` | `boolean` | Whether the Plan is the default Plan. | +| `isRecurring` | `boolean` | Whether the Plan is recurring. | +| `name` | `string` | The name of the Plan. | | `pathRoot` | `string` | The root path of the resource. | -| `publiclyVisible` | `boolean` | Whether the plan is visible to the public. | -| `slug` | `string` | The URL-friendly identifier of the plan. | +| `publiclyVisible` | `boolean` | Whether the Plan is visible to the public. | +| `slug` | `string` | The URL-friendly identifier of the Plan. | diff --git a/clerk-typedoc/shared/billing-statement-resource.mdx b/clerk-typedoc/shared/billing-statement-resource.mdx index 49909acd1b..ca4533205a 100644 --- a/clerk-typedoc/shared/billing-statement-resource.mdx +++ b/clerk-typedoc/shared/billing-statement-resource.mdx @@ -1,4 +1,4 @@ -The `BillingStatementResource` type represents a billing statement for a user or organization. +The `BillingStatementResource` type represents a billing statement for a user or Organization. ## Properties diff --git a/clerk-typedoc/shared/billing-statement-totals.mdx b/clerk-typedoc/shared/billing-statement-totals.mdx index bc174d67d9..6fd5e8ecfc 100644 --- a/clerk-typedoc/shared/billing-statement-totals.mdx +++ b/clerk-typedoc/shared/billing-statement-totals.mdx @@ -5,5 +5,5 @@ The `BillingStatementTotals` type represents the total costs, taxes, and other p | Property | Type | Description | | ------------------------------------ | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | | `grandTotal` | [`BillingMoneyAmount`](/docs/reference/javascript/types/billing-money-amount) | The total amount for the checkout, including taxes and after credits/discounts are applied. This is the final amount due. | -| `subtotal` | [`BillingMoneyAmount`](/docs/reference/javascript/types/billing-money-amount) | The price of the items or plan before taxes, credits, or discounts are applied. | +| `subtotal` | [`BillingMoneyAmount`](/docs/reference/javascript/types/billing-money-amount) | The price of the items or Plan before taxes, credits, or discounts are applied. | | `taxTotal` | [`BillingMoneyAmount`](/docs/reference/javascript/types/billing-money-amount) | The amount of tax included in the checkout. | diff --git a/clerk-typedoc/shared/billing-subscription-item-resource.mdx b/clerk-typedoc/shared/billing-subscription-item-resource.mdx index 271787e001..50e3d193f8 100644 --- a/clerk-typedoc/shared/billing-subscription-item-resource.mdx +++ b/clerk-typedoc/shared/billing-subscription-item-resource.mdx @@ -5,7 +5,7 @@ The `BillingSubscriptionItemResource` type represents an item in a subscription. | Property | Type | Description | | -------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `amount?` | [`BillingMoneyAmount`](/docs/reference/javascript/types/billing-money-amount) | The amount charged for the subscription item. | -| `cancel` | (params: \{ orgId?: string; \}) => Promise\<[DeletedObjectResource](/docs/reference/javascript/types/deleted-object-resource)\> | A function to cancel the subscription item. Accepts the following parameters:
  • `orgId?` (`string`): The ID of the organization to cancel the subscription item from.
| +| `cancel` | (params: \{ orgId?: string; \}) => Promise\<[DeletedObjectResource](/docs/reference/javascript/types/deleted-object-resource)\> | A function to cancel the subscription item. Accepts the following parameters:
  • `orgId?` (`string`): The ID of the Organization to cancel the subscription item from.
| | `canceledAt` | null \| Date | The date and time when the subscription item was canceled. `null` if the subscription item is not canceled. | | `createdAt` | `Date` | The date and time when the subscription item was created. | | `credit?` | \{ amount: [BillingMoneyAmount](/docs/reference/javascript/types/billing-money-amount); \} | The credit from a previous purchase that is being applied to the subscription item. | @@ -16,6 +16,6 @@ The `BillingSubscriptionItemResource` type represents an item in a subscription. | `pathRoot` | `string` | The root path of the resource. | | `periodEnd` | null \| Date | The date and time when the current billing period ends. `null` if not set. | | `periodStart` | `Date` | The date and time when the current billing period starts. | -| `plan` | [`BillingPlanResource`](/docs/reference/javascript/types/billing-plan-resource) | The plan associated with the subscription item. | +| `plan` | [`BillingPlanResource`](/docs/reference/javascript/types/billing-plan-resource) | The Plan associated with the subscription item. | | `planPeriod` | "month" \| "annual" | The billing period for the subscription item. | | `status` | "active" \| "ended" \| "upcoming" \| "past_due" | The status of the subscription item. | diff --git a/clerk-typedoc/shared/billing-subscription-plan-period.mdx b/clerk-typedoc/shared/billing-subscription-plan-period.mdx index 637fd2faa6..51d46bed3e 100644 --- a/clerk-typedoc/shared/billing-subscription-plan-period.mdx +++ b/clerk-typedoc/shared/billing-subscription-plan-period.mdx @@ -1 +1 @@ -The billing period for the plan. +The billing period for the Plan. diff --git a/clerk-typedoc/shared/build-clerk-js-script-attributes.mdx b/clerk-typedoc/shared/build-clerk-js-script-attributes.mdx deleted file mode 100644 index eb0fbc9ae7..0000000000 --- a/clerk-typedoc/shared/build-clerk-js-script-attributes.mdx +++ /dev/null @@ -1,11 +0,0 @@ -Builds an object of Clerk JS script attributes based on the provided options. - -## Parameters - -| Parameter | Type | Description | -| --------- | -------------------------- | -------------------------------------------------------- | -| `options` | `LoadClerkJsScriptOptions` | The options containing the values for script attributes. | - -## Returns - -`Record`\<`string`, `string`\> — An object containing data attributes to be applied to the script element. diff --git a/clerk-typedoc/shared/build-publishable-key.mdx b/clerk-typedoc/shared/build-publishable-key.mdx deleted file mode 100644 index 2cd1ea56cb..0000000000 --- a/clerk-typedoc/shared/build-publishable-key.mdx +++ /dev/null @@ -1,11 +0,0 @@ -Converts a frontend API URL into a base64-encoded publishable key. - -## Parameters - -| Parameter | Type | Description | -| ------------- | -------- | ------------------------------------------------- | -| `frontendApi` | `string` | The frontend API URL (e.g., 'clerk.example.com'). | - -## Returns - -`string` — A base64-encoded publishable key with appropriate prefix (pk*live* or pk*test*). diff --git a/clerk-typedoc/shared/camel-to-snake.mdx b/clerk-typedoc/shared/camel-to-snake.mdx deleted file mode 100644 index 8164e16a4d..0000000000 --- a/clerk-typedoc/shared/camel-to-snake.mdx +++ /dev/null @@ -1,11 +0,0 @@ -Converts a string from camelCase to snake_case. - -## Parameters - -| Parameter | Type | -| --------- | -------------------------------- | -| `str` | undefined \| string | - -## Returns - -`string` diff --git a/clerk-typedoc/shared/check-authorization-from-session-claims.mdx b/clerk-typedoc/shared/check-authorization-from-session-claims.mdx index f7357cd71c..53032a25bc 100644 --- a/clerk-typedoc/shared/check-authorization-from-session-claims.mdx +++ b/clerk-typedoc/shared/check-authorization-from-session-claims.mdx @@ -1,5 +1,5 @@ Type guard for server-side authorization checks using session claims. -System permissions are not allowed since they are not included +System Permissions are not allowed since they are not included in session claims and cannot be verified on the server side. ## Parameters diff --git a/clerk-typedoc/shared/check-authorization-params-from-session-claims.mdx b/clerk-typedoc/shared/check-authorization-params-from-session-claims.mdx index 24a67f0074..2dc689ec48 100644 --- a/clerk-typedoc/shared/check-authorization-params-from-session-claims.mdx +++ b/clerk-typedoc/shared/check-authorization-params-from-session-claims.mdx @@ -2,8 +2,8 @@ | Property | Type | Description | | --------------------------------------------- | ---------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -| `feature?` | `Autocomplete`\< user:${string} \| org:${string} \> | The [feature](/docs/guides/billing/overview) to check for. | -| `permission?` | `DisallowSystemPermissions`\<`P`\> | The [permission](/docs/guides/organizations/roles-and-permissions) to check for. | -| `plan?` | `Autocomplete`\< user:${string} \| org:${string} \> | The [plan](/docs/guides/billing/overview) to check for. | +| `feature?` | `Autocomplete`\< user:${string} \| org:${string} \> | The [Feature](/docs/guides/billing/overview) to check for. | +| `permission?` | `DisallowSystemPermissions`\<`P`\> | The [Permission](/docs/guides/organizations/control-access/roles-and-permissions) to check for. | +| `plan?` | `Autocomplete`\< user:${string} \| org:${string} \> | The [Plan](/docs/guides/billing/overview) to check for. | | `reverification?` | [`ReverificationConfig`](reverification-config.mdx) | The reverification configuration to check for. This feature is currently in public beta. **It is not recommended for production use.** | -| `role?` | `string` | The [role](/docs/guides/organizations/roles-and-permissions) to check for. | +| `role?` | `string` | The [Role](/docs/guides/organizations/control-access/roles-and-permissions) to check for. | diff --git a/clerk-typedoc/shared/checkout-flow-resource.mdx b/clerk-typedoc/shared/checkout-flow-resource.mdx new file mode 100644 index 0000000000..ecb3bdaf04 --- /dev/null +++ b/clerk-typedoc/shared/checkout-flow-resource.mdx @@ -0,0 +1,2 @@ +Public API type for checkout flow. Properties are null when status is 'needs_initialization' +and present when status is 'needs_confirmation' or 'completed'. diff --git a/clerk-typedoc/shared/checkout-signal-value.mdx b/clerk-typedoc/shared/checkout-signal-value.mdx new file mode 100644 index 0000000000..e37a147dbb --- /dev/null +++ b/clerk-typedoc/shared/checkout-signal-value.mdx @@ -0,0 +1,9 @@ +The value returned by the `useCheckout` hook. + +## Properties + +| Property | Type | Description | +| -------------------------------------- | ---------------------------------------------------- | --------------------------------------------------------------------------------- | +| `checkout` | [`CheckoutFlowResource`](checkout-flow-resource.mdx) | An instance representing the currently active `Checkout`. | +| `errors` | `CheckoutErrors` | Represents the errors that occurred during the last fetch of the parent resource. | +| `fetchStatus` | "idle" \| "fetching" | The fetch status of the underlying `Checkout` resource. | diff --git a/clerk-typedoc/shared/clerk-api-error-1.mdx b/clerk-typedoc/shared/clerk-api-error-1.mdx deleted file mode 100644 index 63a5b74ea7..0000000000 --- a/clerk-typedoc/shared/clerk-api-error-1.mdx +++ /dev/null @@ -1,24 +0,0 @@ -An interface that represents an error returned by the Clerk API. - -## Properties - -| Property | Type | Description | -| ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ | -| `code` | `string` | A string code that represents the error, such as `username_exists_code`. | -| `longMessage?` | `string` | A more detailed message that describes the error. | -| `message` | `string` | A message that describes the error. | -| `meta?` | \{ emailAddresses?: string[]; identifiers?: string[]; isPlanUpgradePossible?: boolean; paramName?: string; permissions?: string[]; plan?: \{ amount_formatted: string; annual_monthly_amount_formatted: string; currency_symbol: string; id: string; name: string; \}; sessionId?: string; zxcvbn?: \{ suggestions: \{ code: string; message: string; \}[]; \}; \} | Additional information about the error. | -| `meta.emailAddresses?` | string[] | - | -| `meta.identifiers?` | string[] | - | -| `meta.isPlanUpgradePossible?` | `boolean` | - | -| `meta.paramName?` | `string` | - | -| `meta.permissions?` | string[] | - | -| `meta.plan?` | \{ amount_formatted: string; annual_monthly_amount_formatted: string; currency_symbol: string; id: string; name: string; \} | - | -| `meta.plan.amount_formatted` | `string` | - | -| `meta.plan.annual_monthly_amount_formatted` | `string` | - | -| `meta.plan.currency_symbol` | `string` | - | -| `meta.plan.id` | `string` | - | -| `meta.plan.name` | `string` | - | -| `meta.sessionId?` | `string` | - | -| `meta.zxcvbn?` | \{ suggestions: \{ code: string; message: string; \}[]; \} | - | -| `meta.zxcvbn.suggestions` | \{ code: string; message: string; \}[] | - | diff --git a/clerk-typedoc/shared/clerk-api-error.mdx b/clerk-typedoc/shared/clerk-api-error.mdx index 766884ce7b..63a5b74ea7 100644 --- a/clerk-typedoc/shared/clerk-api-error.mdx +++ b/clerk-typedoc/shared/clerk-api-error.mdx @@ -1,14 +1,24 @@ -This error contains the specific error message, code, and any additional metadata that was returned by the Clerk API. - -## Implements - -- [`ClerkAPIError`](clerk-api-error-1.mdx) +An interface that represents an error returned by the Clerk API. ## Properties -| Property | Type | Description | -| -------------------------------------- | -------------------------------- | ------------------------------------------------------------------------ | -| `code` | `string` | A string code that represents the error, such as `username_exists_code`. | -| `longMessage` | undefined \| string | A more detailed message that describes the error. | -| `message` | `string` | A message that describes the error. | -| `meta` | `Meta` | Additional information about the error. | +| Property | Type | Description | +| ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ | +| `code` | `string` | A string code that represents the error, such as `username_exists_code`. | +| `longMessage?` | `string` | A more detailed message that describes the error. | +| `message` | `string` | A message that describes the error. | +| `meta?` | \{ emailAddresses?: string[]; identifiers?: string[]; isPlanUpgradePossible?: boolean; paramName?: string; permissions?: string[]; plan?: \{ amount_formatted: string; annual_monthly_amount_formatted: string; currency_symbol: string; id: string; name: string; \}; sessionId?: string; zxcvbn?: \{ suggestions: \{ code: string; message: string; \}[]; \}; \} | Additional information about the error. | +| `meta.emailAddresses?` | string[] | - | +| `meta.identifiers?` | string[] | - | +| `meta.isPlanUpgradePossible?` | `boolean` | - | +| `meta.paramName?` | `string` | - | +| `meta.permissions?` | string[] | - | +| `meta.plan?` | \{ amount_formatted: string; annual_monthly_amount_formatted: string; currency_symbol: string; id: string; name: string; \} | - | +| `meta.plan.amount_formatted` | `string` | - | +| `meta.plan.annual_monthly_amount_formatted` | `string` | - | +| `meta.plan.currency_symbol` | `string` | - | +| `meta.plan.id` | `string` | - | +| `meta.plan.name` | `string` | - | +| `meta.sessionId?` | `string` | - | +| `meta.zxcvbn?` | \{ suggestions: \{ code: string; message: string; \}[]; \} | - | +| `meta.zxcvbn.suggestions` | \{ code: string; message: string; \}[] | - | diff --git a/clerk-typedoc/shared/clerk-appearance-theme.mdx b/clerk-typedoc/shared/clerk-appearance-theme.mdx new file mode 100644 index 0000000000..2c0507a308 --- /dev/null +++ b/clerk-typedoc/shared/clerk-appearance-theme.mdx @@ -0,0 +1,3 @@ +Appearance theme type that gets overridden by framework packages. +Defaults to `any` in @clerk/shared. +Becomes fully typed when a framework package augments ClerkAppearanceRegistry with Theme. diff --git a/clerk-typedoc/shared/clerk-js-script-url.mdx b/clerk-typedoc/shared/clerk-js-script-url.mdx deleted file mode 100644 index abbd4d3b37..0000000000 --- a/clerk-typedoc/shared/clerk-js-script-url.mdx +++ /dev/null @@ -1,18 +0,0 @@ -Generates a Clerk JS script URL based on the provided options. - -## Parameters - -| Parameter | Type | Description | -| --------- | -------------------------- | --------------------------------------------------------- | -| `opts` | `LoadClerkJsScriptOptions` | The options to use when building the Clerk JS script URL. | - -## Returns - -`string` — The complete URL to the Clerk JS script. - -## Example - -```typescript -const url = clerkJsScriptUrl({ publishableKey: "pk_test_..." }); -// Returns: "https://example.clerk.accounts.dev/npm/@clerk/clerk-js@5/dist/clerk.browser.js" -``` diff --git a/clerk-typedoc/shared/clerk-jwt-claims.mdx b/clerk-typedoc/shared/clerk-jwt-claims.mdx index 4aab45ad6c..29eb4b6907 100644 --- a/clerk-typedoc/shared/clerk-jwt-claims.mdx +++ b/clerk-typedoc/shared/clerk-jwt-claims.mdx @@ -21,8 +21,8 @@ Any other JWT Claim Set member. | ~~`iat`~~ | `number` | JWT Issued At - [RFC7519#section-4.1.6](https://tools.ietf.org/html/rfc7519#section-4.1.6). | | ~~`iss`~~ | `string` | JWT Issuer - [RFC7519#section-4.1.1](https://tools.ietf.org/html/rfc7519#section-4.1.1). | | ~~`nbf`~~ | `number` | JWT Not Before - [RFC7519#section-4.1.5](https://tools.ietf.org/html/rfc7519#section-4.1.5). | -| ~~`org_id?`~~ | `string` | Active organization ID. | -| ~~`org_role?`~~ | `string` | Active organization role. | -| ~~`org_slug?`~~ | `string` | Active organization slug. | +| ~~`org_id?`~~ | `string` | Active Organization ID. | +| ~~`org_role?`~~ | `string` | Active Organization Role. | +| ~~`org_slug?`~~ | `string` | Active Organization Slug. | | ~~`sid`~~ | `string` | Session ID | | ~~`sub`~~ | `string` | JWT Subject - [RFC7519#section-4.1.2](https://tools.ietf.org/html/rfc7519#section-4.1.2). | diff --git a/clerk-typedoc/shared/clerk-runtime-error.mdx b/clerk-typedoc/shared/clerk-runtime-error.mdx deleted file mode 100644 index 2d15ac3964..0000000000 --- a/clerk-typedoc/shared/clerk-runtime-error.mdx +++ /dev/null @@ -1,15 +0,0 @@ -Custom error class for representing Clerk runtime errors. - -ClerkRuntimeError - -## Example - -```ts -throw new ClerkRuntimeError("An error occurred", { code: "password_invalid" }); -``` - -## Properties - -| Property | Type | Description | -| ------------------------------------------------------ | ------ | ---------------------------------------------------------------------------------------------------------- | -| ~~`clerkRuntimeError`~~ | `true` | **Deprecated.** Use `clerkError` property instead. This property is maintained for backward compatibility. | diff --git a/clerk-typedoc/shared/clerk.mdx b/clerk-typedoc/shared/clerk.mdx index 9ac28fed2c..fdb7633590 100644 --- a/clerk-typedoc/shared/clerk.mdx +++ b/clerk-typedoc/shared/clerk.mdx @@ -5,7 +5,7 @@ Main Clerk SDK object. | Property | Type | Description | | -------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `__experimental_checkout` | `__experimental_CheckoutFunction` | Checkout API | -| `__experimental_prefetchOrganizationSwitcher` | () => void | Prefetches the data displayed by an organization switcher. It can be used when `mountOrganizationSwitcher({ asStandalone: true})`, to avoid unwanted loading states. | +| `__experimental_prefetchOrganizationSwitcher` | () => void | Prefetches the data displayed by an Organization switcher. It can be used when `mountOrganizationSwitcher({ asStandalone: true})`, to avoid unwanted loading states. | | `__internal_attemptToEnableEnvironmentSetting` | (options: **internal_AttemptToEnableEnvironmentSettingParams) => **internal_AttemptToEnableEnvironmentSettingResult | Attempts to enable a environment setting from a development instance, prompting if disabled. | | `__internal_closeCheckout` | () => void | Closes the Clerk Checkout drawer. | | `__internal_closeEnableOrganizationsPrompt` | () => void | Closes the Clerk Enable Organizations modal. | @@ -38,9 +38,9 @@ Main Clerk SDK object. | `closeSignUp` | () => void | Closes the Clerk SignUp modal. | | `closeUserProfile` | () => void | Closes the Clerk UserProfile modal. | | `closeWaitlist` | () => void | Closes the Clerk Waitlist modal. | -| `createOrganization` | (params: [CreateOrganizationParams](#create-organization-params)) => Promise\<[OrganizationResource](/docs/reference/javascript/organization)\> | Creates an organization, adding the current user as admin. | +| `createOrganization` | (params: [CreateOrganizationParams](#create-organization-params)) => Promise\<[OrganizationResource](/docs/reference/javascript/organization)\> | Creates an Organization, adding the current user as admin. | | `domain` | `string` | Clerk Satellite Frontend API string. | -| `getOrganization` | (organizationId: string) => Promise\<[OrganizationResource](/docs/reference/javascript/organization)\> | Retrieves a single organization by id. | +| `getOrganization` | (organizationId: string) => Promise\<[OrganizationResource](/docs/reference/javascript/organization)\> | Retrieves a single Organization by ID. | | `handleEmailLinkVerification` | (params: HandleEmailLinkVerificationParams, customNavigate?: (to: string) => Promise\) => Promise\ | Completes a Email Link flow started by Clerk.client.signIn.createEmailLinkFlow or Clerk.client.signUp.createEmailLinkFlow | | `handleGoogleOneTapCallback` | (signInOrUp: [SignInResource](/docs/reference/javascript/sign-in) \| [SignUpResource](/docs/reference/javascript/sign-up), params: HandleOAuthCallbackParams, customNavigate?: (to: string) => Promise\) => Promise\ | Completes a Google One Tap redirection flow started by [Clerk.authenticateWithGoogleOneTap](#authenticatewithgoogleonetap) | | `handleRedirectCallback` | (params: HandleOAuthCallbackParams, customNavigate?: (to: string) => Promise\) => Promise\ | Completes an OAuth or SAML redirection flow started by Clerk.client.signIn.authenticateWithRedirect or Clerk.client.signUp.authenticateWithRedirect | @@ -52,13 +52,14 @@ Main Clerk SDK object. | `loaded` | `boolean` | If true the bootstrapping of Clerk.load() has completed successfully. | | `mountAPIKeys` | (targetNode: HTMLDivElement, props?: APIKeysProps) => void | This API is in early access and may change in future releases. Mount a api keys component at the target element. | | `mountCreateOrganization` | (targetNode: HTMLDivElement, props?: CreateOrganizationProps) => void | Mount a CreateOrganization component at the target element. | -| `mountOrganizationList` | (targetNode: HTMLDivElement, props?: OrganizationListProps) => void | Mount an organization list component at the target element. | -| `mountOrganizationProfile` | (targetNode: HTMLDivElement, props?: OrganizationProfileProps) => void | Mount an organization profile component at the target element. | -| `mountOrganizationSwitcher` | (targetNode: HTMLDivElement, props?: OrganizationSwitcherProps) => void | Mount an organization switcher component at the target element. | +| `mountOrganizationList` | (targetNode: HTMLDivElement, props?: OrganizationListProps) => void | Mount an Organization list component at the target element. | +| `mountOrganizationProfile` | (targetNode: HTMLDivElement, props?: OrganizationProfileProps) => void | Mount an Organization profile component at the target element. | +| `mountOrganizationSwitcher` | (targetNode: HTMLDivElement, props?: OrganizationSwitcherProps) => void | Mount an Organization switcher component at the target element. | | `mountPricingTable` | (targetNode: HTMLDivElement, props?: PricingTableProps) => void | Mounts a pricing table component at the target element. | | `mountSignIn` | (targetNode: HTMLDivElement, signInProps?: SignInProps) => void | Mounts a sign in flow component at the target element. | | `mountSignUp` | (targetNode: HTMLDivElement, signUpProps?: SignUpProps) => void | Mounts a sign up flow component at the target element. | | `mountTaskChooseOrganization` | (targetNode: HTMLDivElement, props?: TaskChooseOrganizationProps) => void | Mounts a TaskChooseOrganization component at the target element. | +| `mountTaskResetPassword` | (targetNode: HTMLDivElement, props?: TaskResetPasswordProps) => void | Mounts a TaskResetPassword component at the target element. | | `mountUserAvatar` | (targetNode: HTMLDivElement, userAvatarProps?: UserAvatarProps) => void | Mount a user avatar component at the target element. | | `mountUserButton` | (targetNode: HTMLDivElement, userButtonProps?: UserButtonProps) => void | Mount a user button component at the target element. | | `mountUserProfile` | (targetNode: HTMLDivElement, userProfileProps?: UserProfileProps) => void | Mount a user profile component at the target element. | @@ -85,18 +86,19 @@ Main Clerk SDK object. | `redirectToWaitlist` | () => void | Redirects to the configured URL where `` is mounted. | | `sdkMetadata` | undefined \| \{ environment?: string; name: string; version: string; \} | If present, contains information about the SDK that the host application is using. For example, if Clerk is loaded through `@clerk/nextjs`, this would be `{ name: '@clerk/nextjs', version: '1.0.0' }` | | `session` | undefined \| null \| [SignedInSessionResource](/docs/reference/javascript/session) | Current Session. | -| `setActive` | (setActiveParams: [SetActiveParams](/docs/reference/javascript/types/set-active-params)) => Promise\ | Set the active session and organization explicitly. If the session param is `null`, the active session is deleted. In a similar fashion, if the organization param is `null`, the current organization is removed as active. | +| `setActive` | (setActiveParams: [SetActiveParams](/docs/reference/javascript/types/set-active-params)) => Promise\ | Set the active session and Organization explicitly. If the session param is `null`, the active session is deleted. In a similar fashion, if the organization param is `null`, the current organization is removed as active. | | `signOut` | \{ (options?: SignOutOptions): Promise\; (signOutCallback?: SignOutCallback, options?: SignOutOptions): Promise\; \} | Signs out the current user on single-session instances, or all users on multi-session instances **Param** Optional A callback that runs after sign out completes. **Param** Optional Configuration options, see SignOutOptions | -| `status` | "error" \| "loading" \| "degraded" \| "ready" | Describes the state the clerk singleton operates in: - `"error"`: Clerk failed to initialize. - `"loading"`: Clerk is still attempting to load. - `"ready"`: Clerk singleton is fully operational. - `"degraded"`: Clerk singleton is partially operational. | +| `status` | "error" \| "degraded" \| "loading" \| "ready" | Describes the state the clerk singleton operates in: - `"error"`: Clerk failed to initialize. - `"loading"`: Clerk is still attempting to load. - `"ready"`: Clerk singleton is fully operational. - `"degraded"`: Clerk singleton is partially operational. | | `unmountAPIKeys` | (targetNode: HTMLDivElement) => void | This API is in early access and may change in future releases. Unmount a api keys component from the target element. If there is no component mounted at the target node, results in a noop. | | `unmountCreateOrganization` | (targetNode: HTMLDivElement) => void | Unmount the CreateOrganization component from the target node. | -| `unmountOrganizationList` | (targetNode: HTMLDivElement) => void | Unmount the organization list component from the target node.\* | -| `unmountOrganizationProfile` | (targetNode: HTMLDivElement) => void | Unmount the organization profile component from the target node. | -| `unmountOrganizationSwitcher` | (targetNode: HTMLDivElement) => void | Unmount the organization profile component from the target node.\* | +| `unmountOrganizationList` | (targetNode: HTMLDivElement) => void | Unmount the Organization list component from the target node.\* | +| `unmountOrganizationProfile` | (targetNode: HTMLDivElement) => void | Unmount the Organization profile component from the target node. | +| `unmountOrganizationSwitcher` | (targetNode: HTMLDivElement) => void | Unmount the Organization switcher component from the target node.\* | | `unmountPricingTable` | (targetNode: HTMLDivElement) => void | Unmount a pricing table component from the target element. If there is no component mounted at the target node, results in a noop. | | `unmountSignIn` | (targetNode: HTMLDivElement) => void | Unmount a sign in flow component from the target element. If there is no component mounted at the target node, results in a noop. | | `unmountSignUp` | (targetNode: HTMLDivElement) => void | Unmount a sign up flow component from the target element. If there is no component mounted at the target node, results in a noop. | | `unmountTaskChooseOrganization` | (targetNode: HTMLDivElement) => void | Unmount a TaskChooseOrganization component from the target element. If there is no component mounted at the target node, results in a noop. | +| `unmountTaskResetPassword` | (targetNode: HTMLDivElement) => void | Unmount a TaskResetPassword component from the target element. If there is no component mounted at the target node, results in a noop. | | `unmountUserAvatar` | (targetNode: HTMLDivElement) => void | Unmount a user avatar component at the target element. If there is no component mounted at the target node, results in a noop. | | `unmountUserButton` | (targetNode: HTMLDivElement) => void | Unmount a user button component at the target element. If there is no component mounted at the target node, results in a noop. | | `unmountUserProfile` | (targetNode: HTMLDivElement) => void | Unmount a user profile component at the target element. If there is no component mounted at the target node, results in a noop. | diff --git a/clerk-typedoc/shared/create-clerk-global-hook-error.mdx b/clerk-typedoc/shared/create-clerk-global-hook-error.mdx deleted file mode 100644 index 76bbbe94c4..0000000000 --- a/clerk-typedoc/shared/create-clerk-global-hook-error.mdx +++ /dev/null @@ -1,13 +0,0 @@ -Creates a ClerkGlobalHookError object from a ClerkError instance. -It's a wrapper for all the different instances of Clerk errors that can -be returned when using Clerk hooks. - -## Parameters - -| Parameter | Type | -| --------- | ------------ | -| `error` | `ClerkError` | - -## Returns - -`ClerkError` & \{ isClerkApiResponseError: \{ (error: unknown): error is ClerkAPIResponseError; (this: unknown): this is ClerkAPIResponseError; \}; isClerkRuntimeError: \{ (error: unknown): error is ClerkRuntimeError; (this: unknown): this is ClerkRuntimeError; \}; \} diff --git a/clerk-typedoc/shared/create-dev-or-staging-url-cache.mdx b/clerk-typedoc/shared/create-dev-or-staging-url-cache.mdx deleted file mode 100644 index a2bf114c5f..0000000000 --- a/clerk-typedoc/shared/create-dev-or-staging-url-cache.mdx +++ /dev/null @@ -1,10 +0,0 @@ -Creates a memoized cache for checking if URLs are development or staging environments. -Uses a Map to cache results for better performance on repeated checks. - -## Returns - -An object with an isDevOrStagingUrl method that checks if a URL is dev/staging. - -| Name | Type | Description | -| --------------------- | -------------------------------------------- | -------------------------------------------------------- | -| `isDevOrStagingUrl()` | (url: string \| URL) => boolean | Checks if a URL is a development or staging environment. | diff --git a/clerk-typedoc/shared/create-organization-params.mdx b/clerk-typedoc/shared/create-organization-params.mdx index 77db98c597..36163a4b9b 100644 --- a/clerk-typedoc/shared/create-organization-params.mdx +++ b/clerk-typedoc/shared/create-organization-params.mdx @@ -1,4 +1,4 @@ | Property | Type | Description | | ------------------------- | -------- | ----------------------------- | -| `name` | `string` | The name of the organization. | -| `slug?` | `string` | The slug of the organization. | +| `name` | `string` | The name of the Organization. | +| `slug?` | `string` | The slug of the Organization. | diff --git a/clerk-typedoc/shared/create-path-matcher.mdx b/clerk-typedoc/shared/create-path-matcher.mdx deleted file mode 100644 index 5fcfc7fed7..0000000000 --- a/clerk-typedoc/shared/create-path-matcher.mdx +++ /dev/null @@ -1,21 +0,0 @@ -Creates a function that matches paths against a set of patterns. - -## Parameters - -| Parameter | Type | Description | -| ---------- | ------------------ | ------------------------------------------------------- | -| `patterns` | `PathMatcherParam` | A string, RegExp, or array of patterns to match against | - -## Returns - -A function that takes a pathname and returns true if it matches any of the patterns - -### Parameters - -| Parameter | Type | -| ---------- | -------- | -| `pathname` | `string` | - -### Returns - -`boolean` diff --git a/clerk-typedoc/shared/deep-camel-to-snake.mdx b/clerk-typedoc/shared/deep-camel-to-snake.mdx deleted file mode 100644 index 08cd236e03..0000000000 --- a/clerk-typedoc/shared/deep-camel-to-snake.mdx +++ /dev/null @@ -1,13 +0,0 @@ -Transforms camelCased objects/ arrays to snake_cased. -This function recursively traverses all objects and arrays of the passed value -camelCased keys are removed. - -## Parameters - -| Parameter | Type | -| --------- | ----- | -| `obj` | `any` | - -## Returns - -`any` diff --git a/clerk-typedoc/shared/deep-snake-to-camel.mdx b/clerk-typedoc/shared/deep-snake-to-camel.mdx deleted file mode 100644 index 3ad646a85b..0000000000 --- a/clerk-typedoc/shared/deep-snake-to-camel.mdx +++ /dev/null @@ -1,13 +0,0 @@ -Transforms snake_cased objects/ arrays to camelCased. -This function recursively traverses all objects and arrays of the passed value -camelCased keys are removed. - -## Parameters - -| Parameter | Type | -| --------- | ----- | -| `obj` | `any` | - -## Returns - -`any` diff --git a/clerk-typedoc/shared/deprecated-object-property.mdx b/clerk-typedoc/shared/deprecated-object-property.mdx deleted file mode 100644 index 611635bfb0..0000000000 --- a/clerk-typedoc/shared/deprecated-object-property.mdx +++ /dev/null @@ -1,21 +0,0 @@ -Mark object property as deprecated. - -A console WARNING will be displayed when object property is being accessed. - -1. Deprecate object property - const obj = { something: 'aloha' }; - -deprecatedObjectProperty(obj, 'something', 'Use `somethingElse` instead.'); - -## Parameters - -| Parameter | Type | -| ---------- | --------------------------- | -| `obj` | `Record`\<`string`, `any`\> | -| `propName` | `string` | -| `warning` | `string` | -| `key?` | `string` | - -## Returns - -`void` diff --git a/clerk-typedoc/shared/derive-state.mdx b/clerk-typedoc/shared/derive-state.mdx deleted file mode 100644 index e1568a4b56..0000000000 --- a/clerk-typedoc/shared/derive-state.mdx +++ /dev/null @@ -1,29 +0,0 @@ -Derives authentication state based on the current rendering context (SSR or client-side). - -## Parameters - -| Parameter | Type | -| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `clerkOperational` | `boolean` | -| `state` | `Resources` | -| `initialState` | undefined \| Serializable\<\{ actor: undefined \| \{ [x: string]: unknown; sub: string; \}; factorVerificationAge: \[number, number\]; organization: undefined \| [OrganizationResource](/docs/reference/javascript/organization); orgId: undefined \| string; orgPermissions: undefined \| string[]; orgRole: undefined \| string; orgSlug: undefined \| string; session: undefined \| [SessionResource](/docs/reference/javascript/session); sessionClaims: JwtPayload; sessionId: undefined \| string; sessionStatus: [SessionStatusClaim](/docs/reference/javascript/types/session-status); user: undefined \| [UserResource](/docs/reference/javascript/user); userId: undefined \| string; \}\> | - -## Returns - -\{ actor: undefined \| null \| \{ [x: string]: unknown; sub: string; \}; factorVerificationAge: null \| \[number, number\]; organization: undefined \| null \| [OrganizationResource](/docs/reference/javascript/organization); orgId: undefined \| null \| string; orgPermissions: undefined \| null \| Autocomplete\[]; orgRole: undefined \| null \| string; orgSlug: undefined \| null \| string; session: undefined \| null \| [SignedInSessionResource](/docs/reference/javascript/session); sessionClaims: undefined \| null \| JwtPayload; sessionId: undefined \| null \| string; sessionStatus: undefined \| "active" \| "pending"; user: undefined \| null \| [UserResource](/docs/reference/javascript/user); userId: undefined \| null \| string; \} - -| Name | Type | -| ----------------------- | ------------------------------------------------------------------------------------------------- | -| `actor` | undefined \| null \| \{ [x: string]: unknown; sub: string; \} | -| `factorVerificationAge` | null \| \[number, number\] | -| `organization` | undefined \| null \| [OrganizationResource](/docs/reference/javascript/organization) | -| `orgId` | undefined \| null \| string | -| `orgPermissions` | undefined \| null \| Autocomplete\[] | -| `orgRole` | undefined \| null \| string | -| `orgSlug` | undefined \| null \| string | -| `session` | undefined \| null \| [SignedInSessionResource](/docs/reference/javascript/session) | -| `sessionClaims` | undefined \| null \| JwtPayload | -| `sessionId` | undefined \| null \| string | -| `sessionStatus` | undefined \| "active" \| "pending" | -| `user` | undefined \| null \| [UserResource](/docs/reference/javascript/user) | -| `userId` | undefined \| null \| string | diff --git a/clerk-typedoc/shared/element-object-key.mdx b/clerk-typedoc/shared/element-object-key.mdx deleted file mode 100644 index f5fec84468..0000000000 --- a/clerk-typedoc/shared/element-object-key.mdx +++ /dev/null @@ -1 +0,0 @@ -Convert a kebab-cased key from ElementsConfig into a camelCased Elements key diff --git a/clerk-typedoc/shared/elements-config.mdx b/clerk-typedoc/shared/elements-config.mdx deleted file mode 100644 index 603ae040f4..0000000000 --- a/clerk-typedoc/shared/elements-config.mdx +++ /dev/null @@ -1,3 +0,0 @@ -A map that describes the possible combinations we need to generate -for each unique base element -Kebab-case is used to differentiate between the container and child elements diff --git a/clerk-typedoc/shared/experimental_plan-details-button-props.mdx b/clerk-typedoc/shared/experimental_plan-details-button-props.mdx index 5c1e8862f2..7961f976da 100644 --- a/clerk-typedoc/shared/experimental_plan-details-button-props.mdx +++ b/clerk-typedoc/shared/experimental_plan-details-button-props.mdx @@ -1,4 +1,4 @@ -| Name | Type | -| -------------------- | -------------------------------------------------------------------------------------------- | -| `initialPlanPeriod?` | [`BillingSubscriptionPlanPeriod`](billing-subscription-plan-period.mdx) | -| `planDetailsProps?` | \{ appearance?: PlanDetailTheme; portalId?: string; portalRoot?: PortalRoot; \} | +| Name | Type | +| -------------------- | ------------------------------------------------------------------------------------------------------------------------------- | +| `initialPlanPeriod?` | [`BillingSubscriptionPlanPeriod`](billing-subscription-plan-period.mdx) | +| `planDetailsProps?` | \{ appearance?: [ClerkAppearanceTheme](clerk-appearance-theme.mdx); portalId?: string; portalRoot?: PortalRoot; \} | diff --git a/clerk-typedoc/shared/experimental_subscription-details-button-props.mdx b/clerk-typedoc/shared/experimental_subscription-details-button-props.mdx index b1d5c05866..ee450083ac 100644 --- a/clerk-typedoc/shared/experimental_subscription-details-button-props.mdx +++ b/clerk-typedoc/shared/experimental_subscription-details-button-props.mdx @@ -4,4 +4,4 @@ | Property | Type | Description | | ----------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `for?` | [`ForPayerType`](for-payer-type.mdx) | The subscriber type to display the subscription details for. If `organization` is provided, the subscription details will be displayed for the active organization. Defaults to `'user'`. | +| `for?` | [`ForPayerType`](for-payer-type.mdx) | The subscriber type to display the subscription details for. If `organization` is provided, the subscription details will be displayed for the Active Organization. Defaults to `'user'`. | diff --git a/clerk-typedoc/shared/extract-dev-browser-jwt-from-url.mdx b/clerk-typedoc/shared/extract-dev-browser-jwt-from-url.mdx deleted file mode 100644 index 3f8f20906e..0000000000 --- a/clerk-typedoc/shared/extract-dev-browser-jwt-from-url.mdx +++ /dev/null @@ -1,13 +0,0 @@ -Gets the **clerk_db_jwt JWT from either the hash or the search -Side effect: -Removes **clerk_db_jwt JWT from the URL (hash and searchParams) and updates the browser history - -## Parameters - -| Parameter | Type | -| --------- | ----- | -| `url` | `URL` | - -## Returns - -`string` diff --git a/clerk-typedoc/shared/fast-deep-merge-and-replace.mdx b/clerk-typedoc/shared/fast-deep-merge-and-replace.mdx deleted file mode 100644 index b07891dbf5..0000000000 --- a/clerk-typedoc/shared/fast-deep-merge-and-replace.mdx +++ /dev/null @@ -1,14 +0,0 @@ -Merges 2 objects without creating new object references -The merged props will appear on the `target` object -If `target` already has a value for a given key it will not be overwritten - -## Parameters - -| Parameter | Type | -| --------- | ---------------------------------------------------- | -| `source` | undefined \| null \| Record\ | -| `target` | undefined \| null \| Record\ | - -## Returns - -`void` diff --git a/clerk-typedoc/shared/feature-resource.mdx b/clerk-typedoc/shared/feature-resource.mdx index c24c1f4f58..43eeced04e 100644 --- a/clerk-typedoc/shared/feature-resource.mdx +++ b/clerk-typedoc/shared/feature-resource.mdx @@ -1,12 +1,12 @@ -The `FeatureResource` type represents a feature of a plan. +The `FeatureResource` type represents a Feature of a Plan. ## Properties | Property | Type | Description | | -------------------------------------- | --------------------------- | ---------------------------------------------------------------------------- | -| `avatarUrl` | null \| string | The URL of the feature's avatar image, or `null` if not set. | -| `description` | null \| string | A short description of what the feature provides, or `null` if not provided. | -| `id` | `string` | The unique identifier for the feature. | -| `name` | `string` | The display name of the feature. | +| `avatarUrl` | null \| string | The URL of the Feature's avatar image, or `null` if not set. | +| `description` | null \| string | A short description of what the Feature provides, or `null` if not provided. | +| `id` | `string` | The unique identifier for the Feature. | +| `name` | `string` | The display name of the Feature. | | `pathRoot` | `string` | The root path of the resource. | -| `slug` | `string` | A unique, URL-friendly identifier for the feature. | +| `slug` | `string` | A unique, URL-friendly identifier for the Feature. | diff --git a/clerk-typedoc/shared/force-null.mdx b/clerk-typedoc/shared/force-null.mdx new file mode 100644 index 0000000000..cc314e032e --- /dev/null +++ b/clerk-typedoc/shared/force-null.mdx @@ -0,0 +1 @@ +Utility type that makes all properties `null`. diff --git a/clerk-typedoc/shared/get-clerk-js-major-version-or-tag.mdx b/clerk-typedoc/shared/get-clerk-js-major-version-or-tag.mdx deleted file mode 100644 index 4c846eea8c..0000000000 --- a/clerk-typedoc/shared/get-clerk-js-major-version-or-tag.mdx +++ /dev/null @@ -1,14 +0,0 @@ -Retrieve the clerk-js major tag using the major version from the pkgVersion -param or use the frontendApi to determine if the canary tag should be used. -The default tag is `latest`. - -## Parameters - -| Parameter | Type | -| ------------- | -------- | -| `frontendApi` | `string` | -| `version?` | `string` | - -## Returns - -`string` diff --git a/clerk-typedoc/shared/get-cookie-suffix.mdx b/clerk-typedoc/shared/get-cookie-suffix.mdx deleted file mode 100644 index ac115fcc8b..0000000000 --- a/clerk-typedoc/shared/get-cookie-suffix.mdx +++ /dev/null @@ -1,13 +0,0 @@ -Generates a unique cookie suffix based on the publishable key using SHA-1 hashing. -The suffix is base64-encoded and URL-safe (+ and / characters are replaced). - -## Parameters - -| Parameter | Type | Description | -| ---------------- | -------------- | ------------------------------------------------------------------------------------- | -| `publishableKey` | `string` | The publishable key to generate suffix from. | -| `subtle` | `SubtleCrypto` | The SubtleCrypto interface to use for hashing (defaults to globalThis.crypto.subtle). | - -## Returns - -`Promise`\<`string`\> — A promise that resolves to an 8-character URL-safe base64 string. diff --git a/clerk-typedoc/shared/get-env-variable.mdx b/clerk-typedoc/shared/get-env-variable.mdx deleted file mode 100644 index a60f14161b..0000000000 --- a/clerk-typedoc/shared/get-env-variable.mdx +++ /dev/null @@ -1,12 +0,0 @@ -Retrieves an environment variable across runtime environments. - -## Parameters - -| Parameter | Type | Description | -| ---------- | --------------------------- | ------------------------------------------------------------ | -| `name` | `string` | The environment variable name to retrieve. | -| `context?` | `Record`\<`string`, `any`\> | Optional context object that may contain environment values. | - -## Returns - -`string` — The environment variable value or empty string if not found. diff --git a/clerk-typedoc/shared/get-non-undefined-values.mdx b/clerk-typedoc/shared/get-non-undefined-values.mdx deleted file mode 100644 index 0d051136c4..0000000000 --- a/clerk-typedoc/shared/get-non-undefined-values.mdx +++ /dev/null @@ -1,11 +0,0 @@ -Get all non-undefined values from an object. - -## Parameters - -| Parameter | Type | -| --------- | ---- | -| `obj` | `T` | - -## Returns - -`Partial`\<`T`\> diff --git a/clerk-typedoc/shared/get-script-url.mdx b/clerk-typedoc/shared/get-script-url.mdx deleted file mode 100644 index 66218a1414..0000000000 --- a/clerk-typedoc/shared/get-script-url.mdx +++ /dev/null @@ -1,14 +0,0 @@ -Retrieve the clerk-js script url from the frontendApi and the major tag -using the [getClerkJsMajorVersionOrTag](get-clerk-js-major-version-or-tag.mdx) or a provided clerkJSVersion tag. - -## Parameters - -| Parameter | Type | -| ----------------------------------- | ------------------------------------------- | -| `frontendApi` | `string` | -| `__namedParameters` | \{ clerkJSVersion?: string; \} | -| `__namedParameters.clerkJSVersion?` | `string` | - -## Returns - -`string` diff --git a/clerk-typedoc/shared/get-suffixed-cookie-name.mdx b/clerk-typedoc/shared/get-suffixed-cookie-name.mdx deleted file mode 100644 index f4f707d155..0000000000 --- a/clerk-typedoc/shared/get-suffixed-cookie-name.mdx +++ /dev/null @@ -1,13 +0,0 @@ -Creates a suffixed cookie name by appending the cookie suffix to the base name. -Used to create unique cookie names based on the publishable key. - -## Parameters - -| Parameter | Type | Description | -| -------------- | -------- | -------------------------------------------------------------- | -| `cookieName` | `string` | The base cookie name. | -| `cookieSuffix` | `string` | The suffix to append (typically generated by getCookieSuffix). | - -## Returns - -`string` — The suffixed cookie name in format: `${cookieName}_${cookieSuffix}`. diff --git a/clerk-typedoc/shared/hook-params.mdx b/clerk-typedoc/shared/hook-params.mdx index 3e3fcfc7ef..0a6700a101 100644 --- a/clerk-typedoc/shared/hook-params.mdx +++ b/clerk-typedoc/shared/hook-params.mdx @@ -1,7 +1,7 @@ | Property | Type | Description | | ------------------------------------------------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `enabled?` | `boolean` | If `true`, a request will be triggered when the hook is mounted. Defaults to `true`. | -| `for?` | "user" \| "organization" | Specifies whether to fetch for the current user or organization. Defaults to `'user'`. | +| `for?` | "user" \| "organization" | Specifies whether to fetch for the current user or Organization. Defaults to `'user'`. | | `infinite?` | `boolean` | If `true`, newly fetched data will be appended to the existing list rather than replacing it. Useful for implementing infinite scroll functionality. Defaults to `false`. | | `initialPage?` | `number` | A number that specifies which page to fetch. For example, if `initialPage` is set to 10, it will skip the first 9 pages and fetch the 10th page. Defaults to `1`. | | `keepPreviousData?` | `boolean` | If `true`, the previous data will be kept in the cache until new data is fetched. Defaults to `false`. | diff --git a/clerk-typedoc/shared/icon-image-url.mdx b/clerk-typedoc/shared/icon-image-url.mdx deleted file mode 100644 index e0e3fbde62..0000000000 --- a/clerk-typedoc/shared/icon-image-url.mdx +++ /dev/null @@ -1,13 +0,0 @@ -Returns the URL for a static image -using the new img.clerk.com service - -## Parameters - -| Parameter | Type | -| --------- | ---------------------------- | -| `id` | `string` | -| `format` | "svg" \| "jpeg" | - -## Returns - -`string` diff --git a/clerk-typedoc/shared/id-selectors.mdx b/clerk-typedoc/shared/id-selectors.mdx deleted file mode 100644 index 29c20772b8..0000000000 --- a/clerk-typedoc/shared/id-selectors.mdx +++ /dev/null @@ -1 +0,0 @@ -Create a type union consisting of the base element with all valid ids appended diff --git a/clerk-typedoc/shared/in-browser.mdx b/clerk-typedoc/shared/in-browser.mdx deleted file mode 100644 index e08842d793..0000000000 --- a/clerk-typedoc/shared/in-browser.mdx +++ /dev/null @@ -1,5 +0,0 @@ -Checks if the window object is defined. You can also use this to check if something is happening on the client side. - -## Returns - -`boolean` diff --git a/clerk-typedoc/shared/internal_plan-details-props.mdx b/clerk-typedoc/shared/internal_plan-details-props.mdx index 909d67d1d7..a1e9f47531 100644 --- a/clerk-typedoc/shared/internal_plan-details-props.mdx +++ b/clerk-typedoc/shared/internal_plan-details-props.mdx @@ -1,6 +1,6 @@ | Name | Type | | -------------------- | ----------------------------------------------------------------------- | -| `appearance?` | `PlanDetailTheme` | +| `appearance?` | [`ClerkAppearanceTheme`](clerk-appearance-theme.mdx) | | `initialPlanPeriod?` | [`BillingSubscriptionPlanPeriod`](billing-subscription-plan-period.mdx) | | `portalId?` | `string` | | `portalRoot?` | `PortalRoot` | diff --git a/clerk-typedoc/shared/internal_subscription-details-props.mdx b/clerk-typedoc/shared/internal_subscription-details-props.mdx index 5e902c097d..af4bb54535 100644 --- a/clerk-typedoc/shared/internal_subscription-details-props.mdx +++ b/clerk-typedoc/shared/internal_subscription-details-props.mdx @@ -4,4 +4,4 @@ | Property | Type | Description | | ----------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `for?` | [`ForPayerType`](for-payer-type.mdx) | The subscriber type to display the subscription details for. If `organization` is provided, the subscription details will be displayed for the active organization. Defaults to `'user'`. | +| `for?` | [`ForPayerType`](for-payer-type.mdx) | The subscriber type to display the subscription details for. If `organization` is provided, the subscription details will be displayed for the Active Organization. Defaults to `'user'`. | diff --git a/clerk-typedoc/shared/is-browser-online.mdx b/clerk-typedoc/shared/is-browser-online.mdx deleted file mode 100644 index a4f7d95040..0000000000 --- a/clerk-typedoc/shared/is-browser-online.mdx +++ /dev/null @@ -1,5 +0,0 @@ -Checks if the current environment is a browser and if the navigator is online. - -## Returns - -`boolean` diff --git a/clerk-typedoc/shared/is-clerk-runtime-error.mdx b/clerk-typedoc/shared/is-clerk-runtime-error.mdx deleted file mode 100644 index c5c725edb7..0000000000 --- a/clerk-typedoc/shared/is-clerk-runtime-error.mdx +++ /dev/null @@ -1,24 +0,0 @@ -Checks if the provided error object is an instance of ClerkRuntimeError. - -## Parameters - -| Parameter | Type | Description | -| --------- | ----- | -------------------------- | -| `err` | `any` | The error object to check. | - -## Returns - -`err is ClerkRuntimeError` — True if the error is a ClerkRuntimeError, false otherwise. - -## Example - -```ts -const error = new ClerkRuntimeError("An error occurred"); -if (isClerkRuntimeError(error)) { - // Handle ClerkRuntimeError - console.error("ClerkRuntimeError:", error.message); -} else { - // Handle other errors - console.error("Other error:", error.message); -} -``` diff --git a/clerk-typedoc/shared/is-development-from-publishable-key.mdx b/clerk-typedoc/shared/is-development-from-publishable-key.mdx deleted file mode 100644 index 6d17f30a7d..0000000000 --- a/clerk-typedoc/shared/is-development-from-publishable-key.mdx +++ /dev/null @@ -1,12 +0,0 @@ -Checks if a publishable key is for a development environment. -Supports both legacy format (test*) and new format (pk_test*). - -## Parameters - -| Parameter | Type | Description | -| --------- | -------- | --------------------- | -| `apiKey` | `string` | The API key to check. | - -## Returns - -`boolean` — `true` if the key is for development, `false` otherwise. diff --git a/clerk-typedoc/shared/is-development-from-secret-key.mdx b/clerk-typedoc/shared/is-development-from-secret-key.mdx deleted file mode 100644 index 6d2785217a..0000000000 --- a/clerk-typedoc/shared/is-development-from-secret-key.mdx +++ /dev/null @@ -1,12 +0,0 @@ -Checks if a secret key is for a development environment. -Supports both legacy format (test*) and new format (sk_test*). - -## Parameters - -| Parameter | Type | Description | -| --------- | -------- | ------------------------ | -| `apiKey` | `string` | The secret key to check. | - -## Returns - -`boolean` — `true` if the key is for development, `false` otherwise. diff --git a/clerk-typedoc/shared/is-ipv4-address.mdx b/clerk-typedoc/shared/is-ipv4-address.mdx deleted file mode 100644 index ae9f762026..0000000000 --- a/clerk-typedoc/shared/is-ipv4-address.mdx +++ /dev/null @@ -1,11 +0,0 @@ -Checks if a string is a valid IPv4 address. - -## Parameters - -| Parameter | Type | -| --------- | ---------------------------------------- | -| `str` | undefined \| null \| string | - -## Returns - -`boolean` — True if the string is a valid IPv4 address, false otherwise. diff --git a/clerk-typedoc/shared/is-production-from-publishable-key.mdx b/clerk-typedoc/shared/is-production-from-publishable-key.mdx deleted file mode 100644 index 8aa8847074..0000000000 --- a/clerk-typedoc/shared/is-production-from-publishable-key.mdx +++ /dev/null @@ -1,12 +0,0 @@ -Checks if a publishable key is for a production environment. -Supports both legacy format (live*) and new format (pk_live*). - -## Parameters - -| Parameter | Type | Description | -| --------- | -------- | --------------------- | -| `apiKey` | `string` | The API key to check. | - -## Returns - -`boolean` — `true` if the key is for production, `false` otherwise. diff --git a/clerk-typedoc/shared/is-production-from-secret-key.mdx b/clerk-typedoc/shared/is-production-from-secret-key.mdx deleted file mode 100644 index 289067ce0d..0000000000 --- a/clerk-typedoc/shared/is-production-from-secret-key.mdx +++ /dev/null @@ -1,12 +0,0 @@ -Checks if a secret key is for a production environment. -Supports both legacy format (live*) and new format (sk_live*). - -## Parameters - -| Parameter | Type | Description | -| --------- | -------- | ------------------------ | -| `apiKey` | `string` | The secret key to check. | - -## Returns - -`boolean` — `true` if the key is for production, `false` otherwise. diff --git a/clerk-typedoc/shared/is-publishable-key.mdx b/clerk-typedoc/shared/is-publishable-key.mdx deleted file mode 100644 index b45694915b..0000000000 --- a/clerk-typedoc/shared/is-publishable-key.mdx +++ /dev/null @@ -1,11 +0,0 @@ -Checks if the provided key is a valid publishable key. - -## Parameters - -| Parameter | Type | Description | -| --------- | -------- | ------------------------------------------------------------------- | -| `key` | `string` | The key to be checked. Defaults to an empty string if not provided. | - -## Returns - -`boolean` — `true` if 'key' is a valid publishable key, `false` otherwise. diff --git a/clerk-typedoc/shared/is-staging.mdx b/clerk-typedoc/shared/is-staging.mdx deleted file mode 100644 index 1491f1c970..0000000000 --- a/clerk-typedoc/shared/is-staging.mdx +++ /dev/null @@ -1,11 +0,0 @@ -Check if the frontendApi ends with a staging domain - -## Parameters - -| Parameter | Type | -| ------------- | -------- | -| `frontendApi` | `string` | - -## Returns - -`boolean` diff --git a/clerk-typedoc/shared/is-truthy.mdx b/clerk-typedoc/shared/is-truthy.mdx deleted file mode 100644 index 9c9ea5413b..0000000000 --- a/clerk-typedoc/shared/is-truthy.mdx +++ /dev/null @@ -1,11 +0,0 @@ -A function to determine if a value is truthy. - -## Parameters - -| Parameter | Type | -| --------- | --------- | -| `value` | `unknown` | - -## Returns - -`boolean` — True for `true`, true, positive numbers. False for `false`, false, 0, negative integers and anything else. diff --git a/clerk-typedoc/shared/is-valid-browser-online.mdx b/clerk-typedoc/shared/is-valid-browser-online.mdx deleted file mode 100644 index cbc8b34052..0000000000 --- a/clerk-typedoc/shared/is-valid-browser-online.mdx +++ /dev/null @@ -1,5 +0,0 @@ -Runs `isBrowserOnline` and `isValidBrowser` to check if the current environment is a valid browser and if the navigator is online. - -## Returns - -`boolean` diff --git a/clerk-typedoc/shared/is-valid-browser.mdx b/clerk-typedoc/shared/is-valid-browser.mdx deleted file mode 100644 index 5d89b5b376..0000000000 --- a/clerk-typedoc/shared/is-valid-browser.mdx +++ /dev/null @@ -1,5 +0,0 @@ -Checks if the current environment is a browser and the user agent is not a bot. - -## Returns - -`boolean` diff --git a/clerk-typedoc/shared/isomorphic-atob.mdx b/clerk-typedoc/shared/isomorphic-atob.mdx deleted file mode 100644 index ed412ce663..0000000000 --- a/clerk-typedoc/shared/isomorphic-atob.mdx +++ /dev/null @@ -1,12 +0,0 @@ -A function that decodes a string of data which has been encoded using base-64 encoding. -Uses `atob` if available, otherwise uses `Buffer` from `global`. If neither are available, returns the data as-is. - -## Parameters - -| Parameter | Type | -| --------- | -------- | -| `data` | `string` | - -## Returns - -`string` diff --git a/clerk-typedoc/shared/jwt-claims.mdx b/clerk-typedoc/shared/jwt-claims.mdx index 16182c2435..3ab94c90f2 100644 --- a/clerk-typedoc/shared/jwt-claims.mdx +++ b/clerk-typedoc/shared/jwt-claims.mdx @@ -20,8 +20,8 @@ Any other JWT Claim Set member. | ~~`iat`~~ | `number` | JWT Issued At - [RFC7519#section-4.1.6](https://tools.ietf.org/html/rfc7519#section-4.1.6). | | ~~`iss`~~ | `string` | JWT Issuer - [RFC7519#section-4.1.1](https://tools.ietf.org/html/rfc7519#section-4.1.1). | | ~~`nbf`~~ | `number` | JWT Not Before - [RFC7519#section-4.1.5](https://tools.ietf.org/html/rfc7519#section-4.1.5). | -| ~~`org_id?`~~ | `string` | Active organization ID. | -| ~~`org_role?`~~ | `string` | Active organization role. | -| ~~`org_slug?`~~ | `string` | Active organization slug. | +| ~~`org_id?`~~ | `string` | Active Organization ID. | +| ~~`org_role?`~~ | `string` | Active Organization Role. | +| ~~`org_slug?`~~ | `string` | Active Organization Slug. | | ~~`sid`~~ | `string` | Session ID | | ~~`sub`~~ | `string` | JWT Subject - [RFC7519#section-4.1.2](https://tools.ietf.org/html/rfc7519#section-4.1.2). | diff --git a/clerk-typedoc/shared/legacy-redirect-props.mdx b/clerk-typedoc/shared/legacy-redirect-props.mdx deleted file mode 100644 index 62b50d2039..0000000000 --- a/clerk-typedoc/shared/legacy-redirect-props.mdx +++ /dev/null @@ -1,13 +0,0 @@ -> **LegacyRedirectProps** = \{ afterSignInUrl?: string \| null; afterSignUpUrl?: string \| null; redirectUrl?: string \| null; \} - -## Deprecated - -This will be removed in a future release. - -## Properties - -| Property | Type | Description | -| ------------------------------------------------- | --------------------------- | ------------------------------------------------------------------------ | -| ~~`afterSignInUrl?`~~ | string \| null | **Deprecated.** Use `fallbackRedirectUrl` or `forceRedirectUrl` instead. | -| ~~`afterSignUpUrl?`~~ | string \| null | **Deprecated.** Use `fallbackRedirectUrl` or `forceRedirectUrl` instead. | -| ~~`redirectUrl?`~~ | string \| null | **Deprecated.** Use `fallbackRedirectUrl` or `forceRedirectUrl` instead. | diff --git a/clerk-typedoc/shared/load-clerk-js-script.mdx b/clerk-typedoc/shared/load-clerk-js-script.mdx deleted file mode 100644 index 8efc3db1bc..0000000000 --- a/clerk-typedoc/shared/load-clerk-js-script.mdx +++ /dev/null @@ -1,26 +0,0 @@ -Hotloads the Clerk JS script with robust failure detection. - -Uses a timeout-based approach to ensure absolute certainty about load success/failure. -If the script fails to load within the timeout period, or loads but doesn't create -a proper Clerk instance, the promise rejects with an error. - -## Parameters - -| Parameter | Type | Description | -| --------- | -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -| `opts?` | `LoadClerkJsScriptOptions` | The options used to build the Clerk JS script URL and load the script. Must include a `publishableKey` if no existing script is found. | - -## Returns - -`Promise`\<null \| HTMLScriptElement\> — Promise that resolves with null if Clerk loads successfully, or rejects with an error. - -## Example - -```typescript -try { - await loadClerkJsScript({ publishableKey: "pk_test_..." }); - console.log("Clerk loaded successfully"); -} catch (error) { - console.error("Failed to load Clerk:", error.message); -} -``` diff --git a/clerk-typedoc/shared/local-storage-broadcast-channel.mdx b/clerk-typedoc/shared/local-storage-broadcast-channel.mdx deleted file mode 100644 index c6b0ceb419..0000000000 --- a/clerk-typedoc/shared/local-storage-broadcast-channel.mdx +++ /dev/null @@ -1,4 +0,0 @@ -## Deprecated - -This class will be completely removed in the next major version. -Use the native BroadcastChannel API directly instead. diff --git a/clerk-typedoc/shared/localization-resource.mdx b/clerk-typedoc/shared/localization-resource.mdx index 55e3447b4a..d0df080583 100644 --- a/clerk-typedoc/shared/localization-resource.mdx +++ b/clerk-typedoc/shared/localization-resource.mdx @@ -10,5 +10,5 @@ as a starting point. | Property | Type | Description | | ------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `lastAuthenticationStrategy?` | `string` | Label for the “Last used” badge on authentication strategies. | -| `roles?` | `DeepPartial`\<`DeepLocalizationWithoutObjects`\<\{ [r: string]: string; \}\>\> | Add role keys and their localized values, e.g. `roles: { 'org:teacher': 'Teacher'}`. | +| `roles?` | `DeepPartial`\<`DeepLocalizationWithoutObjects`\<\{ [r: string]: string; \}\>\> | Add Role keys and their localized values, e.g. `roles: { 'org:teacher': 'Teacher'}`. | | `socialButtonsBlockButtonManyInView?` | `DeepPartial`\<\`$\{string\}\{\{provider\|titleize\}\}$\{string\}\` & \{ \_\_params: UnionToRecordWithPrimitives\; \}\> | It should be used to provide a shorter variation of `socialButtonsBlockButton`. It is explicitly typed, in order to avoid contributions that use LLM tools to generate translations that misinterpret the correct usage of this property. | diff --git a/clerk-typedoc/shared/organization-custom-role-key.mdx b/clerk-typedoc/shared/organization-custom-role-key.mdx index 5a0af4dce8..44203987b7 100644 --- a/clerk-typedoc/shared/organization-custom-role-key.mdx +++ b/clerk-typedoc/shared/organization-custom-role-key.mdx @@ -1,3 +1,3 @@ -`OrganizationCustomRoleKey` is a type that represents the user's role in an organization. It will be string unless the developer has provided their own types through [`ClerkAuthorization`](/docs/guides/development/override-clerk-types-interfaces#example-custom-roles-and-permissions). +`OrganizationCustomRoleKey` is a type that represents the user's Role in an Organization. It will be string unless the developer has provided their own types through [`ClerkAuthorization`](/docs/guides/development/override-clerk-types-interfaces#example-custom-roles-and-permissions). -Clerk provides the [default roles](/docs/guides/organizations/roles-and-permissions#default-roles) `org:admin` and `org:member`. However, you can create [custom roles](/docs/guides/organizations/roles-and-permissions#custom-roles) as well. +Clerk provides the [default Roles](/docs/guides/organizations/control-access/roles-and-permissions#default-roles) `org:admin` and `org:member`. However, you can create [Custom Roles](/docs/guides/organizations/control-access/roles-and-permissions#custom-roles) as well. diff --git a/clerk-typedoc/shared/organization-invitation-resource.mdx b/clerk-typedoc/shared/organization-invitation-resource.mdx index e948d20de9..2aeaadff83 100644 --- a/clerk-typedoc/shared/organization-invitation-resource.mdx +++ b/clerk-typedoc/shared/organization-invitation-resource.mdx @@ -1,4 +1,4 @@ -The `OrganizationInvitation` object is the model around an organization invitation. +The `OrganizationInvitation` object is the model around an Organization invitation. ## Properties diff --git a/clerk-typedoc/shared/organization-permission-key.mdx b/clerk-typedoc/shared/organization-permission-key.mdx index 32332de64d..e454f6ef7b 100644 --- a/clerk-typedoc/shared/organization-permission-key.mdx +++ b/clerk-typedoc/shared/organization-permission-key.mdx @@ -1,2 +1,2 @@ -OrganizationPermissionKey is a combination of system and custom permissions. -System permissions are only accessible from FAPI and client-side operations/utils +OrganizationPermissionKey is a combination of System and Custom Permissions. +System Permissions are only accessible from FAPI and client-side operations/utils diff --git a/clerk-typedoc/shared/organization-resource.mdx b/clerk-typedoc/shared/organization-resource.mdx index b5128e2f6a..bc122c527e 100644 --- a/clerk-typedoc/shared/organization-resource.mdx +++ b/clerk-typedoc/shared/organization-resource.mdx @@ -1,6 +1,6 @@ -The `Organization` object holds information about an organization, as well as methods for managing it. +The `Organization` object holds information about an Organization, as well as methods for managing it. -To use these methods, you must have the **Organizations** feature [enabled in your app's settings in the Clerk Dashboard](/docs/guides/organizations/overview#enable-organizations-in-your-application). +To use these methods, you must have the **Organizations** feature [enabled in your app's settings in the Clerk Dashboard](/docs/guides/organizations/configure#enable-organizations). ## Properties diff --git a/clerk-typedoc/shared/parse-publishable-key.mdx b/clerk-typedoc/shared/parse-publishable-key.mdx deleted file mode 100644 index 2c9e088ff7..0000000000 --- a/clerk-typedoc/shared/parse-publishable-key.mdx +++ /dev/null @@ -1,47 +0,0 @@ -Parses and validates a publishable key, extracting the frontend API and instance type. - -## Param - -The publishable key to parse. - -## Param - -Configuration options for parsing. - -## Param - -## Param - -## Param - -## Param - -## Throws - -When options.fatal is true and key is missing or invalid. - -## Call Signature - -### Parameters - -| Parameter | Type | -| --------- | -------------------------------------------------------------- | -| `key` | undefined \| string | -| `options` | `ParsePublishableKeyOptions` & \{ fatal: true; \} | - -### Returns - -`PublishableKey` - -## Call Signature - -### Parameters - -| Parameter | Type | -| ---------- | -------------------------------- | -| `key` | undefined \| string | -| `options?` | `ParsePublishableKeyOptions` | - -### Returns - -null \| PublishableKey diff --git a/clerk-typedoc/shared/payment-element-provider-props.mdx b/clerk-typedoc/shared/payment-element-provider-props.mdx index 016818df2f..406a95569a 100644 --- a/clerk-typedoc/shared/payment-element-provider-props.mdx +++ b/clerk-typedoc/shared/payment-element-provider-props.mdx @@ -1,6 +1,6 @@ -| Property | Type | Description | -| ----------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `checkout?` | [BillingCheckoutResource](/docs/reference/javascript/types/billing-checkout-resource) \| [UseCheckoutReturn](/docs/reference/hooks/use-checkout#returns) | An optional checkout resource object. When provided, the payment element is scoped to the specific checkout session. | -| `for?` | "user" \| "organization" | Specifies whether to fetch for the current user or organization. Defaults to `'user'`. | -| `paymentDescription?` | `string` | An optional description to display to the user within the payment element UI. | -| `stripeAppearance?` | `internalStripeAppearance` | An optional object to customize the appearance of the Stripe Payment Element. This allows you to match the form's styling to your application's theme. | +| Property | Type | Description | +| ----------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `checkout?` | [BillingCheckoutResource](/docs/reference/javascript/types/billing-checkout-resource) \| [CheckoutFlowResource](checkout-flow-resource.mdx) | An optional checkout resource object. When provided, the payment element is scoped to the specific checkout session. | +| `for?` | "user" \| "organization" | Specifies whether to fetch for the current user or Organization. Defaults to `'user'`. | +| `paymentDescription?` | `string` | An optional description to display to the user within the payment element UI. | +| `stripeAppearance?` | `internalStripeAppearance` | An optional object to customize the appearance of the Stripe Payment Element. This allows you to match the form's styling to your application's theme. | diff --git a/clerk-typedoc/shared/protect-props.mdx b/clerk-typedoc/shared/protect-props.mdx index caa5998e83..2cbaa97f67 100644 --- a/clerk-typedoc/shared/protect-props.mdx +++ b/clerk-typedoc/shared/protect-props.mdx @@ -1,22 +1,22 @@ Props for the `` component, which restricts access to its children based on authentication and authorization. -Use `ProtectProps` to specify the required role, permission, feature, or plan for access. +Use `ProtectProps` to specify the required Role, Permission, Feature, or Plan for access. ## Example ```tsx -// Require a specific permission +// Require a specific Permission -// Require a specific role +// Require a specific Role // Use a custom condition callback has({ permission: "a_permission_key" })} /> -// Require a specific feature +// Require a specific Feature -// Require a specific plan - +// Require a specific Plan + ``` diff --git a/clerk-typedoc/shared/read-json-file.mdx b/clerk-typedoc/shared/read-json-file.mdx deleted file mode 100644 index f97f1f5a6b..0000000000 --- a/clerk-typedoc/shared/read-json-file.mdx +++ /dev/null @@ -1,14 +0,0 @@ -Read an expected JSON type File. - -Probably paired with: - - -## Parameters - -| Parameter | Type | -| --------- | ------ | -| `file` | `File` | - -## Returns - -`Promise`\<`unknown`\> diff --git a/clerk-typedoc/shared/remove-functions.mdx b/clerk-typedoc/shared/remove-functions.mdx new file mode 100644 index 0000000000..a87f04a7a2 --- /dev/null +++ b/clerk-typedoc/shared/remove-functions.mdx @@ -0,0 +1 @@ +Utility type that removes function properties from a type. diff --git a/clerk-typedoc/shared/saml-strategy.mdx b/clerk-typedoc/shared/saml-strategy.mdx deleted file mode 100644 index a8f26d96d3..0000000000 --- a/clerk-typedoc/shared/saml-strategy.mdx +++ /dev/null @@ -1,3 +0,0 @@ -## Deprecated - -Use `EnterpriseSSOStrategy` instead. diff --git a/clerk-typedoc/shared/set-active-params.mdx b/clerk-typedoc/shared/set-active-params.mdx index 9f78b7a35d..e080076827 100644 --- a/clerk-typedoc/shared/set-active-params.mdx +++ b/clerk-typedoc/shared/set-active-params.mdx @@ -4,8 +4,7 @@ The parameters for the `setActive()` method. | Property | Type | Description | | ----------------------------------------- | ---------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| ~~`beforeEmit?`~~ | `BeforeEmitCallback` | **Deprecated.** Use `redirectUrl` instead. Callback run just before the active session and/or organization is set to the passed object. Can be used to set up for pre-navigation actions. | -| `navigate?` | `SetActiveNavigate` | A custom navigation function to be called just before the session and/or organization is set. When provided, it takes precedence over the `redirectUrl` parameter for navigation. Example: `await clerk.setActive({ session, navigate: async ({ session }) => { const currentTask = session.currentTask; if (currentTask) { await router.push(`./onboarding/${currentTask.key}`) return } router.push('/dashboard'); } });` | -| `organization?` | null \| string \| [OrganizationResource](/docs/reference/javascript/organization) | The organization resource or organization ID/slug (string version) to be set as active in the current session. If `null`, the currently active organization is removed as active. | +| `navigate?` | `SetActiveNavigate` | A custom navigation function to be called just before the session and/or Organization is set. When provided, it takes precedence over the `redirectUrl` parameter for navigation. Example: `await clerk.setActive({ session, navigate: async ({ session }) => { const currentTask = session.currentTask; if (currentTask) { await router.push(`./onboarding/${currentTask.key}`) return } router.push('/dashboard'); } });` | +| `organization?` | null \| string \| [OrganizationResource](/docs/reference/javascript/organization) | The Organization resource or Organization ID/slug (string version) to be set as active in the current session. If `null`, the currently Active Organization is removed as active. | | `redirectUrl?` | `string` | The full URL or path to redirect to just before the session and/or organization is set. | | `session?` | null \| string \| [SignedInSessionResource](/docs/reference/javascript/session) | The session resource or session ID (string version) to be set as active. If `null`, the current session is deleted. | diff --git a/clerk-typedoc/shared/set-clerk-js-loading-error-package-name.mdx b/clerk-typedoc/shared/set-clerk-js-loading-error-package-name.mdx deleted file mode 100644 index c0d014ec37..0000000000 --- a/clerk-typedoc/shared/set-clerk-js-loading-error-package-name.mdx +++ /dev/null @@ -1,17 +0,0 @@ -Sets the package name for error messages during ClerkJS script loading. - -## Parameters - -| Parameter | Type | Description | -| ------------- | -------- | ------------------------------------------------------------------------------ | -| `packageName` | `string` | The name of the package to use in error messages (e.g., '@clerk/clerk-react'). | - -## Returns - -`void` - -## Example - -```typescript -setClerkJsLoadingErrorPackageName("@clerk/clerk-react"); -``` diff --git a/clerk-typedoc/shared/snake-to-camel.mdx b/clerk-typedoc/shared/snake-to-camel.mdx deleted file mode 100644 index b860d97abe..0000000000 --- a/clerk-typedoc/shared/snake-to-camel.mdx +++ /dev/null @@ -1,11 +0,0 @@ -Converts a string from snake_case to camelCase. - -## Parameters - -| Parameter | Type | -| --------- | -------------------------------- | -| `str` | undefined \| string | - -## Returns - -`string` diff --git a/clerk-typedoc/shared/state-selectors.mdx b/clerk-typedoc/shared/state-selectors.mdx deleted file mode 100644 index cecc110aac..0000000000 --- a/clerk-typedoc/shared/state-selectors.mdx +++ /dev/null @@ -1 +0,0 @@ -Create a type union of all state + id combinations diff --git a/clerk-typedoc/shared/titleize.mdx b/clerk-typedoc/shared/titleize.mdx deleted file mode 100644 index 0a38d19591..0000000000 --- a/clerk-typedoc/shared/titleize.mdx +++ /dev/null @@ -1,17 +0,0 @@ -Converts the first character of a string to uppercase. - -## Parameters - -| Parameter | Type | Description | -| --------- | ---------------------------------------- | --------------------------- | -| `str` | undefined \| null \| string | The string to be converted. | - -## Returns - -`string` — The modified string with the rest of the string unchanged. - -## Example - -```ts -titleize("hello world"); // 'Hello world' -``` diff --git a/clerk-typedoc/shared/to-sentence.mdx b/clerk-typedoc/shared/to-sentence.mdx deleted file mode 100644 index ad4d413ed9..0000000000 --- a/clerk-typedoc/shared/to-sentence.mdx +++ /dev/null @@ -1,11 +0,0 @@ -Convert words to a sentence. - -## Parameters - -| Parameter | Type | Description | -| --------- | --------------------- | ------------------------------- | -| `items` | string[] | An array of words to be joined. | - -## Returns - -`string` — A string with the items joined by a comma and the last item joined by ", or". diff --git a/clerk-typedoc/shared/use-auth-return.mdx b/clerk-typedoc/shared/use-auth-return.mdx index 30878bfb36..38f6972d1c 100644 --- a/clerk-typedoc/shared/use-auth-return.mdx +++ b/clerk-typedoc/shared/use-auth-return.mdx @@ -2,12 +2,12 @@ | --------------- | --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `actor` | `undefined` | The JWT actor for the session. Holds identifier for the user that is impersonating the current user. Read more about [impersonation](/docs/guides/users/impersonation). | | `getToken` | [`GetToken`](get-token.mdx) | 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](/docs/reference/javascript/session#get-token). | -| `has` | \{ \} | A function that checks if the user has specific permissions or roles. See the [reference doc](/docs/reference/backend/types/auth-object#has). | +| `has` | \{ \} | A function that checks if the user has specific Permissions or Roles. See the [reference doc](/docs/reference/backend/types/auth-object#has). | | `isLoaded` | `false` | A boolean that indicates whether Clerk has completed initialization. Initially `false`, becomes `true` once Clerk loads. | | `isSignedIn` | `undefined` | A boolean that indicates whether a user is currently signed in. | -| `orgId` | `undefined` | The ID of the user's active organization. | -| `orgRole` | `undefined` | The current user's role in their active organization. | -| `orgSlug` | `undefined` | The URL-friendly identifier of the user's active organization. | +| `orgId` | `undefined` | The ID of the user's active Organization. | +| `orgRole` | `undefined` | The current user's Role in their active Organization. | +| `orgSlug` | `undefined` | The URL-friendly identifier of the user's Active Organization. | | `sessionClaims` | `undefined` | The current user's [session claims](/docs/guides/sessions/session-tokens). | | `sessionId` | `undefined` | The ID for the current session. | | `signOut` | [`SignOut`](sign-out.mdx) | A function that signs out the current user. Returns a promise that resolves when complete. See the [reference doc](/docs/reference/javascript/clerk#sign-out). | diff --git a/clerk-typedoc/shared/use-checkout-options.mdx b/clerk-typedoc/shared/use-checkout-options.mdx index 949d2c2fa0..f6e8487587 100644 --- a/clerk-typedoc/shared/use-checkout-options.mdx +++ b/clerk-typedoc/shared/use-checkout-options.mdx @@ -1,5 +1,5 @@ | Property | Type | Description | | ------------------------------------ | ------------------------------------- | ----------------------------------------------------------------------- | -| `for?` | "user" \| "organization" | Specifies if the checkout is for an organization. Defaults to `'user'`. | -| `planId` | `string` | The ID of the subscription plan to check out (e.g. `cplan_xxx`). | -| `planPeriod` | "month" \| "annual" | The billing period for the plan. | +| `for?` | "user" \| "organization" | Specifies if the checkout is for an Organization. Defaults to `'user'`. | +| `planId` | `string` | The ID of the Subscription Plan to check out (e.g. `cplan_xxx`). | +| `planPeriod` | "month" \| "annual" | The billing period for the Plan. | diff --git a/clerk-typedoc/shared/use-checkout-return.mdx b/clerk-typedoc/shared/use-checkout-return.mdx deleted file mode 100644 index 505faca13f..0000000000 --- a/clerk-typedoc/shared/use-checkout-return.mdx +++ /dev/null @@ -1,23 +0,0 @@ -| Property | Type | Description | -| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `clear` | () => void | A function that clears the current checkout state from the cache. | -| `confirm` | (params: [ConfirmCheckoutParams](/docs/reference/javascript/types/billing-checkout-resource#parameters)) => Promise\<\{ data: [BillingCheckoutResource](/docs/reference/javascript/types/billing-checkout-resource); error: null; \} \| \{ data: null; error: [ClerkAPIResponseError](/docs/reference/javascript/types/clerk-api-response-error); \}\> | A function that confirms and finalizes the checkout process, usually after the user has provided and validated payment information. | -| `error` | null \| ClerkAPIResponseError | Returns an error object if any part of the checkout process fails. | -| `externalClientSecret` | null \| string | A client secret from an external payment provider (such as Stripe) used to complete the payment on the client-side. | -| `externalGatewayId` | null \| string | The identifier for the external payment gateway used for this checkout session. | -| `fetchStatus` | "error" \| "idle" \| "fetching" | The data fetching status. | -| `finalize` | (params?: \{ navigate?: SetActiveNavigate; \}) => void | A function that finalizes the checkout process. Can optionally accept a `navigate()` function to redirect the user after completion. | -| `freeTrialEndsAt?` | null \| Date | Unix timestamp (milliseconds) of when the free trial ends. | -| `id` | null \| string | The unique identifier for the checkout session. | -| `isConfirming` | `boolean` | A boolean that indicates if the `confirm()` method is in progress. | -| `isImmediatePlanChange` | null \| boolean | Whether the plan change will take effect immediately after checkout. | -| `isStarting` | `boolean` | A boolean that indicates if the `start()` method is in progress. | -| `needsPaymentMethod` | null \| boolean | Whether a payment method is required for this checkout. | -| `payer` | null \| [BillingPayerResource](/docs/reference/javascript/types/billing-payer-resource) | The payer associated with the checkout. | -| `paymentMethod?` | null \| [BillingPaymentMethodResource](/docs/reference/javascript/types/billing-payment-method-resource) | The payment method being used for the checkout, such as a credit card or bank account. | -| `plan` | null \| [BillingPlanResource](/docs/reference/javascript/types/billing-plan-resource) | The subscription plan details for the checkout. | -| `planPeriod` | null \| "month" \| "annual" | The billing period for the plan. | -| `planPeriodStart?` | null \| number | The start date of the plan period, represented as a Unix timestamp. | -| `start` | () => Promise\<\{ data: [BillingCheckoutResource](/docs/reference/javascript/types/billing-checkout-resource); error: null; \} \| \{ data: null; error: [ClerkAPIResponseError](/docs/reference/javascript/types/clerk-api-response-error); \}\> | A function that initializes the checkout process by creating a checkout resource on the server. | -| `status` | "needs_confirmation" \| "completed" \| "needs_initialization" | The current status of the checkout session. The following statuses are possible:
  • `needs_initialization`: The checkout hasn't started but the hook is mounted. Call `start()` to continue.
  • `needs_confirmation`: The checkout has been initialized and is awaiting confirmation. Call `confirm()` to continue.
  • `completed`: The checkout has been successfully confirmed. Call `finalize()` to complete the checkout.
| -| `totals` | null \| [BillingCheckoutTotals](/docs/reference/javascript/types/billing-checkout-totals) | The total costs, taxes, and other pricing details for the checkout. | diff --git a/clerk-typedoc/shared/use-checkout.mdx b/clerk-typedoc/shared/use-checkout.mdx index e8583fa9cb..58cbdfcc25 100644 --- a/clerk-typedoc/shared/use-checkout.mdx +++ b/clerk-typedoc/shared/use-checkout.mdx @@ -6,4 +6,4 @@ ## Returns -`__experimental_UseCheckoutReturn` +[`CheckoutSignalValue`](checkout-signal-value.mdx) diff --git a/clerk-typedoc/shared/use-clerk.mdx b/clerk-typedoc/shared/use-clerk.mdx index 1643c1ace9..4b49837457 100644 --- a/clerk-typedoc/shared/use-clerk.mdx +++ b/clerk-typedoc/shared/use-clerk.mdx @@ -15,7 +15,7 @@ The following example uses the `useClerk()` hook to access the `clerk` object. T ```tsx {{ filename: 'src/Home.tsx' }} -import { useClerk } from "@clerk/clerk-react"; +import { useClerk } from "@clerk/react"; export default function Home() { const clerk = useClerk(); diff --git a/clerk-typedoc/shared/use-organization-list-return.mdx b/clerk-typedoc/shared/use-organization-list-return.mdx index cf66cea9ce..499c1f7578 100644 --- a/clerk-typedoc/shared/use-organization-list-return.mdx +++ b/clerk-typedoc/shared/use-organization-list-return.mdx @@ -2,7 +2,7 @@ | ---------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `createOrganization` | undefined \| (CreateOrganizationParams: [CreateOrganizationParams](#create-organization-params)) => Promise\<[OrganizationResource](/docs/reference/javascript/organization)\> | A function that returns a `Promise` which resolves to the newly created `Organization`. | | `isLoaded` | `boolean` | A boolean that indicates whether Clerk has completed initialization and there is an authenticated user. Initially `false`, becomes `true` once Clerk loads with a user. | -| `setActive` | undefined \| (setActiveParams: [SetActiveParams](/docs/reference/javascript/types/set-active-params)) => Promise\ | A function that sets the active session and/or organization. | -| `userInvitations` | PaginatedResourcesWithDefault\<[UserOrganizationInvitationResource](/docs/reference/javascript/types/user-organization-invitation)\> \| [PaginatedResources](#paginated-resources)\<[UserOrganizationInvitationResource](/docs/reference/javascript/types/user-organization-invitation), T\["userInvitations"\] _extends_ \{ infinite: true; \} ? true : false\> | Returns `PaginatedResources` which includes a list of the user's organization invitations. | -| `userMemberships` | PaginatedResourcesWithDefault\<[OrganizationMembershipResource](/docs/reference/javascript/types/organization-membership)\> \| [PaginatedResources](#paginated-resources)\<[OrganizationMembershipResource](/docs/reference/javascript/types/organization-membership), T\["userMemberships"\] _extends_ \{ infinite: true; \} ? true : false\> | Returns `PaginatedResources` which includes a list of the user's organization memberships. | -| `userSuggestions` | PaginatedResourcesWithDefault\<[OrganizationSuggestionResource](/docs/reference/javascript/types/organization-suggestion)\> \| [PaginatedResources](#paginated-resources)\<[OrganizationSuggestionResource](/docs/reference/javascript/types/organization-suggestion), T\["userSuggestions"\] _extends_ \{ infinite: true; \} ? true : false\> | Returns `PaginatedResources` which includes a list of suggestions for organizations that the user can join. | +| `setActive` | undefined \| (setActiveParams: [SetActiveParams](/docs/reference/javascript/types/set-active-params)) => Promise\ | A function that sets the active session and/or Organization. | +| `userInvitations` | PaginatedResourcesWithDefault\<[UserOrganizationInvitationResource](/docs/reference/javascript/types/user-organization-invitation)\> \| [PaginatedResources](#paginated-resources)\<[UserOrganizationInvitationResource](/docs/reference/javascript/types/user-organization-invitation), T\["userInvitations"\] _extends_ \{ infinite: true; \} ? true : false\> | Returns `PaginatedResources` which includes a list of the user's Organization invitations. | +| `userMemberships` | PaginatedResourcesWithDefault\<[OrganizationMembershipResource](/docs/reference/javascript/types/organization-membership)\> \| [PaginatedResources](#paginated-resources)\<[OrganizationMembershipResource](/docs/reference/javascript/types/organization-membership), T\["userMemberships"\] _extends_ \{ infinite: true; \} ? true : false\> | Returns `PaginatedResources` which includes a list of the user's Organization memberships. | +| `userSuggestions` | PaginatedResourcesWithDefault\<[OrganizationSuggestionResource](/docs/reference/javascript/types/organization-suggestion)\> \| [PaginatedResources](#paginated-resources)\<[OrganizationSuggestionResource](/docs/reference/javascript/types/organization-suggestion), T\["userSuggestions"\] _extends_ \{ infinite: true; \} ? true : false\> | Returns `PaginatedResources` which includes a list of suggestions for Organizations that the user can join. | diff --git a/clerk-typedoc/shared/use-organization-list.mdx b/clerk-typedoc/shared/use-organization-list.mdx index ed93deaad0..c59e02737d 100644 --- a/clerk-typedoc/shared/use-organization-list.mdx +++ b/clerk-typedoc/shared/use-organization-list.mdx @@ -43,10 +43,10 @@ const { userMemberships } = useOrganizationList({ ### Infinite pagination -The following example demonstrates how to use the `infinite` property to fetch and append new data to the existing list. The `userMemberships` attribute will be populated with the first page of the user's organization memberships. When the "Load more" button is clicked, the `fetchNext` helper function will be called to append the next page of memberships to the list. +The following example demonstrates how to use the `infinite` property to fetch and append new data to the existing list. The `userMemberships` attribute will be populated with the first page of the user's Organization memberships. When the "Load more" button is clicked, the `fetchNext` helper function will be called to append the next page of memberships to the list. ```tsx {{ filename: 'src/components/JoinedOrganizations.tsx' }} -import { useOrganizationList } from "@clerk/clerk-react"; +import { useOrganizationList } from "@clerk/react"; import React from "react"; const JoinedOrganizations = () => { @@ -95,7 +95,7 @@ The following example demonstrates how to use the `fetchPrevious` and `fetchNext Notice the difference between this example's pagination and the infinite pagination example above. ```tsx {{ filename: 'src/components/UserInvitationsTable.tsx' }} -import { useOrganizationList } from "@clerk/clerk-react"; +import { useOrganizationList } from "@clerk/react"; import React from "react"; const UserInvitationsTable = () => { diff --git a/clerk-typedoc/shared/use-organization-params.mdx b/clerk-typedoc/shared/use-organization-params.mdx index ec4a103d7c..a971efcfd6 100644 --- a/clerk-typedoc/shared/use-organization-params.mdx +++ b/clerk-typedoc/shared/use-organization-params.mdx @@ -1,6 +1,6 @@ | Property | Type | Description | | ----------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `domains?` | true \| \{ initialPage?: number; pageSize?: number; \} & \{ enrollmentMode?: "manual_invitation" \| "automatic_invitation" \| "automatic_suggestion"; \} & \{ infinite?: boolean; keepPreviousData?: boolean; \} | If set to `true`, all default properties will be used.
Otherwise, accepts an object with the following optional properties:
  • `enrollmentMode`: A string that filters the domains by the provided [enrollment mode](/docs/guides/organizations/verified-domains#enable-verified-domains).
  • Any of the properties described in [Shared properties](#shared-properties).
| +| `domains?` | true \| \{ initialPage?: number; pageSize?: number; \} & \{ enrollmentMode?: "manual_invitation" \| "automatic_invitation" \| "automatic_suggestion"; \} & \{ infinite?: boolean; keepPreviousData?: boolean; \} | If set to `true`, all default properties will be used.
Otherwise, accepts an object with the following optional properties:
  • `enrollmentMode`: A string that filters the domains by the provided [enrollment mode](/docs/guides/organizations/add-members/verified-domains#enable-verified-domains).
  • Any of the properties described in [Shared properties](#shared-properties).
| | `invitations?` | true \| \{ initialPage?: number; pageSize?: number; \} & \{ status?: ("expired" \| "pending" \| "accepted" \| "revoked")[]; \} & \{ infinite?: boolean; keepPreviousData?: boolean; \} | If set to `true`, all default properties will be used.
Otherwise, accepts an object with the following optional properties:
  • `status`: A string that filters the invitations by the provided status.
  • Any of the properties described in [Shared properties](#shared-properties).
| | `membershipRequests?` | true \| \{ initialPage?: number; pageSize?: number; \} & \{ status?: "expired" \| "pending" \| "accepted" \| "revoked"; \} & \{ infinite?: boolean; keepPreviousData?: boolean; \} | If set to `true`, all default properties will be used.
Otherwise, accepts an object with the following optional properties:
  • `status`: A string that filters the membership requests by the provided status.
  • Any of the properties described in [Shared properties](#shared-properties).
| | `memberships?` | true \| \{ initialPage?: number; pageSize?: number; \} & \{ query?: string; role?: string[]; \} & \{ infinite?: boolean; keepPreviousData?: boolean; \} | If set to `true`, all default properties will be used.
Otherwise, accepts an object with the following optional properties:
  • `role`: An array of [`OrganizationCustomRoleKey`](/docs/reference/javascript/types/organization-custom-role-key).
  • `query`: A string that filters the memberships by the provided string.
  • Any of the properties described in [Shared properties](#shared-properties).
| diff --git a/clerk-typedoc/shared/use-organization-return.mdx b/clerk-typedoc/shared/use-organization-return.mdx index 25bf1d0b7c..60257389a2 100644 --- a/clerk-typedoc/shared/use-organization-return.mdx +++ b/clerk-typedoc/shared/use-organization-return.mdx @@ -1,9 +1,9 @@ | Property | Type | Description | | ---------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| `domains` | null \| PaginatedResourcesWithDefault\<[OrganizationDomainResource](/docs/reference/javascript/types/organization-domain)\> \| [PaginatedResources](#paginated-resources)\<[OrganizationDomainResource](/docs/reference/javascript/types/organization-domain), T\["membershipRequests"\] _extends_ \{ infinite: true; \} ? true : false\> | Includes a paginated list of the organization's domains. | -| `invitations` | null \| PaginatedResourcesWithDefault\<[OrganizationInvitationResource](/docs/reference/javascript/types/organization-invitation)\> \| [PaginatedResources](#paginated-resources)\<[OrganizationInvitationResource](/docs/reference/javascript/types/organization-invitation), T\["invitations"\] _extends_ \{ infinite: true; \} ? true : false\> | Includes a paginated list of the organization's invitations. | +| `domains` | null \| PaginatedResourcesWithDefault\<[OrganizationDomainResource](/docs/reference/javascript/types/organization-domain)\> \| [PaginatedResources](#paginated-resources)\<[OrganizationDomainResource](/docs/reference/javascript/types/organization-domain), T\["membershipRequests"\] _extends_ \{ infinite: true; \} ? true : false\> | Includes a paginated list of the Organization's domains. | +| `invitations` | null \| PaginatedResourcesWithDefault\<[OrganizationInvitationResource](/docs/reference/javascript/types/organization-invitation)\> \| [PaginatedResources](#paginated-resources)\<[OrganizationInvitationResource](/docs/reference/javascript/types/organization-invitation), T\["invitations"\] _extends_ \{ infinite: true; \} ? true : false\> | Includes a paginated list of the Organization's invitations. | | `isLoaded` | `boolean` | A boolean that indicates whether Clerk has completed initialization. Initially `false`, becomes `true` once Clerk loads. | -| `membership` | undefined \| null \| [OrganizationMembershipResource](/docs/reference/javascript/types/organization-membership) | The current organization membership. | -| `membershipRequests` | null \| PaginatedResourcesWithDefault\<[OrganizationMembershipRequestResource](/docs/reference/javascript/types/organization-membership-request)\> \| [PaginatedResources](#paginated-resources)\<[OrganizationMembershipRequestResource](/docs/reference/javascript/types/organization-membership-request), T\["membershipRequests"\] _extends_ \{ infinite: true; \} ? true : false\> | Includes a paginated list of the organization's membership requests. | -| `memberships` | null \| PaginatedResourcesWithDefault\<[OrganizationMembershipResource](/docs/reference/javascript/types/organization-membership)\> \| [PaginatedResources](#paginated-resources)\<[OrganizationMembershipResource](/docs/reference/javascript/types/organization-membership), T\["memberships"\] _extends_ \{ infinite: true; \} ? true : false\> | Includes a paginated list of the organization's memberships. | -| `organization` | undefined \| null \| [OrganizationResource](/docs/reference/javascript/organization) | The currently active organization. | +| `membership` | undefined \| null \| [OrganizationMembershipResource](/docs/reference/javascript/types/organization-membership) | The current Organization membership. | +| `membershipRequests` | null \| PaginatedResourcesWithDefault\<[OrganizationMembershipRequestResource](/docs/reference/javascript/types/organization-membership-request)\> \| [PaginatedResources](#paginated-resources)\<[OrganizationMembershipRequestResource](/docs/reference/javascript/types/organization-membership-request), T\["membershipRequests"\] _extends_ \{ infinite: true; \} ? true : false\> | Includes a paginated list of the Organization's membership requests. | +| `memberships` | null \| PaginatedResourcesWithDefault\<[OrganizationMembershipResource](/docs/reference/javascript/types/organization-membership)\> \| [PaginatedResources](#paginated-resources)\<[OrganizationMembershipResource](/docs/reference/javascript/types/organization-membership), T\["memberships"\] _extends_ \{ infinite: true; \} ? true : false\> | Includes a paginated list of the Organization's memberships. | +| `organization` | undefined \| null \| [OrganizationResource](/docs/reference/javascript/organization) | The currently Active Organization. | diff --git a/clerk-typedoc/shared/use-organization.mdx b/clerk-typedoc/shared/use-organization.mdx index bb92bf5524..8a170db90e 100644 --- a/clerk-typedoc/shared/use-organization.mdx +++ b/clerk-typedoc/shared/use-organization.mdx @@ -1,4 +1,4 @@ -The `useOrganization()` hook retrieves attributes of the currently active organization. +The `useOrganization()` hook retrieves attributes of the currently Active Organization. ## Parameters @@ -43,10 +43,10 @@ const { invitations } = useOrganization({ ### Infinite pagination -The following example demonstrates how to use the `infinite` property to fetch and append new data to the existing list. The `memberships` attribute will be populated with the first page of the organization's memberships. When the "Load more" button is clicked, the `fetchNext` helper function will be called to append the next page of memberships to the list. +The following example demonstrates how to use the `infinite` property to fetch and append new data to the existing list. The `memberships` attribute will be populated with the first page of the Organization's memberships. When the "Load more" button is clicked, the `fetchNext` helper function will be called to append the next page of memberships to the list. ```tsx -import { useOrganization } from '@clerk/clerk-react' +import { useOrganization } from '@clerk/react' export default function MemberList() { const { memberships } = useOrganization({ @@ -86,12 +86,12 @@ export default function MemberList() { ### Simple pagination -The following example demonstrates how to use the `fetchPrevious` and `fetchNext` helper functions to paginate through the data. The `memberships` attribute will be populated with the first page of the organization's memberships. When the "Previous page" or "Next page" button is clicked, the `fetchPrevious` or `fetchNext` helper function will be called to fetch the previous or next page of memberships. +The following example demonstrates how to use the `fetchPrevious` and `fetchNext` helper functions to paginate through the data. The `memberships` attribute will be populated with the first page of the Organization's memberships. When the "Previous page" or "Next page" button is clicked, the `fetchPrevious` or `fetchNext` helper function will be called to fetch the previous or next page of memberships. Notice the difference between this example's pagination and the infinite pagination example above. ```tsx -import { useOrganization } from '@clerk/clerk-react' +import { useOrganization } from '@clerk/react' export default function MemberList() { const { memberships } = useOrganization({ diff --git a/clerk-typedoc/shared/use-reverification.mdx b/clerk-typedoc/shared/use-reverification.mdx index a8ec720e85..a0626147b2 100644 --- a/clerk-typedoc/shared/use-reverification.mdx +++ b/clerk-typedoc/shared/use-reverification.mdx @@ -1,6 +1,6 @@ > [!WARNING] > -> Depending on the SDK you're using, this feature requires `@clerk/nextjs@6.12.7` or later, `@clerk/clerk-react@5.25.1` or later, and `@clerk/clerk-js@5.57.1` or later. +> Depending on the SDK you're using, this feature requires `@clerk/nextjs@6.12.7` or later, `@clerk/react@5.25.1` or later, and `@clerk/clerk-js@5.57.1` or later. The `useReverification()` hook is used to handle a session's reverification flow. If a request requires reverification, a modal will display, prompting the user to verify their credentials. Upon successful verification, the original request will automatically retry. @@ -24,8 +24,8 @@ The following example demonstrates how to handle scenarios where a user cancels In the following example, `myFetcher` would be a function in your backend that fetches data from the route that requires reverification. See the [guide on how to require reverification](/docs/guides/secure/reverification) for more information. ```tsx {{ filename: 'src/components/MyButton.tsx' }} -import { useReverification } from "@clerk/clerk-react"; -import { isReverificationCancelledError } from "@clerk/clerk-react/error"; +import { useReverification } from "@clerk/react"; +import { isReverificationCancelledError } from "@clerk/react/error"; type MyData = { balance: number; diff --git a/clerk-typedoc/shared/use-session-list-return.mdx b/clerk-typedoc/shared/use-session-list-return.mdx index 2f319ab413..4007ca9590 100644 --- a/clerk-typedoc/shared/use-session-list-return.mdx +++ b/clerk-typedoc/shared/use-session-list-return.mdx @@ -2,7 +2,7 @@ | ----------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------- | | `isLoaded` | `false` | A boolean that indicates whether Clerk has completed initialization. Initially `false`, becomes `true` once Clerk loads. | | `sessions` | `undefined` | A list of sessions that have been registered on the client device. | -| `setActive` | `undefined` | A function that sets the active session and/or organization. See the [reference doc](/docs/reference/javascript/clerk#set-active). | +| `setActive` | `undefined` | A function that sets the active session and/or Organization. See the [reference doc](/docs/reference/javascript/clerk#set-active). | | Name | Type | | ----------- | -------------------------------------------------------------------- | diff --git a/clerk-typedoc/shared/use-session-list.mdx b/clerk-typedoc/shared/use-session-list.mdx index 75aa725eb2..75548ea17e 100644 --- a/clerk-typedoc/shared/use-session-list.mdx +++ b/clerk-typedoc/shared/use-session-list.mdx @@ -10,14 +10,14 @@ There are multiple variants of this type available which you can select by click | ------ | ------ | ------ | | `isLoaded` | `false` | A boolean that indicates whether Clerk has completed initialization. Initially `false`, becomes `true` once Clerk loads. | | `sessions` | `undefined` | A list of sessions that have been registered on the client device. | -| `setActive` | `undefined` | A function that sets the active session and/or organization. See the [reference doc](/docs/reference/javascript/clerk#set-active). | +| `setActive` | `undefined` | A function that sets the active session and/or Organization. See the [reference doc](/docs/reference/javascript/clerk#set-active). |
| Name | Type | Description | | ------ | ------ | ------ | | `isLoaded` | `true` | A boolean that indicates whether Clerk has completed initialization. Initially `false`, becomes `true` once Clerk loads. | | `sessions` | [SessionResource](/docs/reference/javascript/session)[] | A list of sessions that have been registered on the client device. | -| `setActive()` | (setActiveParams: [SetActiveParams](/docs/reference/javascript/types/set-active-params)) => Promise\ | A function that sets the active session and/or organization. See the [reference doc](/docs/reference/javascript/clerk#set-active). | +| `setActive()` | (setActiveParams: [SetActiveParams](/docs/reference/javascript/types/set-active-params)) => Promise\ | A function that sets the active session and/or Organization. See the [reference doc](/docs/reference/javascript/clerk#set-active). | @@ -31,7 +31,7 @@ The following example uses `useSessionList()` to get a list of sessions that hav ```tsx {{ filename: 'src/Home.tsx' }} -import { useSessionList } from "@clerk/clerk-react"; +import { useSessionList } from "@clerk/react"; export default function Home() { const { isLoaded, sessions } = useSessionList(); diff --git a/clerk-typedoc/shared/use-session.mdx b/clerk-typedoc/shared/use-session.mdx index 86492af39d..b59fdc28df 100644 --- a/clerk-typedoc/shared/use-session.mdx +++ b/clerk-typedoc/shared/use-session.mdx @@ -38,7 +38,7 @@ The following example uses the `useSession()` hook to access the `Session` objec ```tsx {{ filename: 'src/Home.tsx' }} -import { useSession } from "@clerk/clerk-react"; +import { useSession } from "@clerk/react"; export default function Home() { const { isLoaded, session, isSignedIn } = useSession(); diff --git a/clerk-typedoc/shared/use-subscription-params.mdx b/clerk-typedoc/shared/use-subscription-params.mdx index 6ec5c0f92c..a118aca031 100644 --- a/clerk-typedoc/shared/use-subscription-params.mdx +++ b/clerk-typedoc/shared/use-subscription-params.mdx @@ -1,5 +1,5 @@ | Property | Type | Description | | ------------------------------------------------- | ------------------------------------- | ---------------------------------------------------------------------------------------------------- | | `enabled?` | `boolean` | If `true`, a request will be triggered when the hook is mounted. Defaults to `true`. | -| `for?` | "user" \| "organization" | Specifies whether to fetch the subscription for an organization or a user. Defaults to `'user'`. | +| `for?` | "user" \| "organization" | Specifies whether to fetch the Subscription for an Organization or a user. Defaults to `'user'`. | | `keepPreviousData?` | `boolean` | If true, the previous data will be kept in the cache until new data is fetched. Defaults to `false`. | diff --git a/clerk-typedoc/shared/use-user.mdx b/clerk-typedoc/shared/use-user.mdx index 4fb9fccef7..158ed34804 100644 --- a/clerk-typedoc/shared/use-user.mdx +++ b/clerk-typedoc/shared/use-user.mdx @@ -35,7 +35,7 @@ There are multiple variants of this type available which you can select by click The following example uses the `useUser()` hook to access the [`User`](/docs/reference/javascript/user) object, which contains the current user's data such as their full name. The `isLoaded` and `isSignedIn` properties are used to handle the loading state and to check if the user is signed in, respectively. ```tsx {{ filename: 'src/Example.tsx' }} -import { useUser } from "@clerk/clerk-react"; +import { useUser } from "@clerk/react"; export default function Example() { const { isSignedIn, user, isLoaded } = useUser(); @@ -60,7 +60,7 @@ The following example uses the `useUser()` hook to access the [`User`](/docs/ref ```tsx {{ filename: 'src/Home.tsx' }} -import { useUser } from "@clerk/clerk-react"; +import { useUser } from "@clerk/react"; export default function Home() { const { isSignedIn, isLoaded, user } = useUser(); @@ -135,7 +135,7 @@ The following example uses the `useUser()` hook to access the [`User`](/docs/ref ```tsx {{ filename: 'src/Home.tsx' }} -import { useUser } from "@clerk/clerk-react"; +import { useUser } from "@clerk/react"; export default function Home() { const { isSignedIn, isLoaded, user } = useUser(); diff --git a/clerk-typedoc/shared/user-agent-is-robot.mdx b/clerk-typedoc/shared/user-agent-is-robot.mdx deleted file mode 100644 index fada624f70..0000000000 --- a/clerk-typedoc/shared/user-agent-is-robot.mdx +++ /dev/null @@ -1,11 +0,0 @@ -Checks if the user agent is a bot. - -## Parameters - -| Parameter | Type | Description | -| ----------- | -------- | --------------------- | -| `userAgent` | `string` | Any user agent string | - -## Returns - -`boolean` diff --git a/clerk-typedoc/shared/user-resource.mdx b/clerk-typedoc/shared/user-resource.mdx index efe5b80a36..b7bcbb7655 100644 --- a/clerk-typedoc/shared/user-resource.mdx +++ b/clerk-typedoc/shared/user-resource.mdx @@ -8,11 +8,10 @@ The ClerkJS SDK provides some helper [methods](#methods) on the `User` object to ## Properties -| Property | Type | Description | -| -------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------- | -| `addPaymentMethod` | (params: [AddPaymentMethodParams](add-payment-method-params.mdx)) => Promise\<[BillingPaymentMethodResource](/docs/reference/javascript/types/billing-payment-method-resource)\> | - | -| `getPaymentMethods` | (params?: [GetPaymentMethodsParams](get-payment-methods-params.mdx)) => Promise\<[ClerkPaginatedResponse](/docs/reference/javascript/types/clerk-paginated-response)\<[BillingPaymentMethodResource](/docs/reference/javascript/types/billing-payment-method-resource)\>\> | - | -| `id` | `string` | The unique identifier of the resource. | -| `initializePaymentMethod` | (params: [InitializePaymentMethodParams](initialize-payment-method-params.mdx)) => Promise\<[BillingInitializedPaymentMethodResource](billing-initialized-payment-method-resource.mdx)\> | - | -| `pathRoot` | `string` | The root path of the resource. | -| ~~`samlAccounts`~~ | SamlAccountResource[] | **Deprecated.** Use `enterpriseAccounts` instead. | +| Property | Type | Description | +| -------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------- | +| `addPaymentMethod` | (params: [AddPaymentMethodParams](add-payment-method-params.mdx)) => Promise\<[BillingPaymentMethodResource](/docs/reference/javascript/types/billing-payment-method-resource)\> | - | +| `getPaymentMethods` | (params?: [GetPaymentMethodsParams](get-payment-methods-params.mdx)) => Promise\<[ClerkPaginatedResponse](/docs/reference/javascript/types/clerk-paginated-response)\<[BillingPaymentMethodResource](/docs/reference/javascript/types/billing-payment-method-resource)\>\> | - | +| `id` | `string` | The unique identifier of the resource. | +| `initializePaymentMethod` | (params: [InitializePaymentMethodParams](initialize-payment-method-params.mdx)) => Promise\<[BillingInitializedPaymentMethodResource](billing-initialized-payment-method-resource.mdx)\> | - | +| `pathRoot` | `string` | The root path of the resource. | diff --git a/clerk-typedoc/shared/version-selector.mdx b/clerk-typedoc/shared/version-selector.mdx deleted file mode 100644 index f40c7058ab..0000000000 --- a/clerk-typedoc/shared/version-selector.mdx +++ /dev/null @@ -1,17 +0,0 @@ -This version selector is a bit complicated, so here is the flow: - -1. Use the clerkJSVersion prop on the provider -2. Use the exact `@clerk/clerk-js` version if it is a `@snapshot` prerelease -3. Use the prerelease tag of `@clerk/clerk-js` or the packageVersion provided -4. Fallback to the major version of `@clerk/clerk-js` or the packageVersion provided - -## Parameters - -| Parameter | Type | Description | -| ---------------- | -------------------------------- | ----------------------------------------------------------------------------------------- | -| `clerkJSVersion` | undefined \| string | The optional clerkJSVersion prop on the provider | -| `packageVersion` | `string` | The version of `@clerk/clerk-js` that will be used if an explicit version is not provided | - -## Returns - -`string` — The npm tag, version or major version to use