diff --git a/.changeset/eg-ie-trailing-comma-jsdoc.md b/.changeset/eg-ie-trailing-comma-jsdoc.md new file mode 100644 index 00000000000..cd376d0bef0 --- /dev/null +++ b/.changeset/eg-ie-trailing-comma-jsdoc.md @@ -0,0 +1,6 @@ +--- +'@clerk/backend': patch +'@clerk/shared': patch +--- + +Standardize JSDoc punctuation to always follow `e.g.` and `i.e.` with a comma (`e.g.,` / `i.e.,`), matching the docs style guide. Comment-only change; no runtime behavior is affected. This keeps the generated Typedoc reference output consistent. diff --git a/.typedoc/__tests__/__snapshots__/clerk-properties.mdx b/.typedoc/__tests__/__snapshots__/clerk-properties.mdx index 571d450cf7a..2a9ba670c16 100644 --- a/.typedoc/__tests__/__snapshots__/clerk-properties.mdx +++ b/.typedoc/__tests__/__snapshots__/clerk-properties.mdx @@ -9,7 +9,7 @@ | `isSignedIn` | `boolean` | Indicates whether the current user has a valid signed-in client session. | | `isStandardBrowser` | undefined \| boolean | Indicates whether the instance is being loaded in a standard browser environment. Set to `false` on native platforms where cookies cannot be set. When `undefined`, Clerk assumes a standard browser. | | `loaded` | `boolean` | Indicates whether the `Clerk` object is ready for use. Set to `false` when the `status` is `"loading"`. Set to `true` when the `status` is `"ready"` or `"degraded"`. | -| `oauthApplication` | [`OAuthApplicationNamespace`](/docs/reference/types/oauth-application) | OAuth application helpers (e.g. consent metadata for custom consent UIs). | +| `oauthApplication` | [`OAuthApplicationNamespace`](/docs/reference/types/oauth-application) | OAuth application helpers (e.g., consent metadata for custom consent UIs). | | `organization` | undefined \| null \| [OrganizationResource](/docs/reference/objects/organization) | A shortcut to the last active `Session.user.organizationMemberships` which holds an instance of a `Organization` object. If the session is `null` or `undefined`, the user field will match. | | `proxyUrl` | undefined \| string | **Required for applications that run behind a reverse proxy**. Your Clerk app's proxy URL. Can be either a relative path (`/__clerk`) or a full URL (`https:///__clerk`). | | `publishableKey` | `string` | Your Clerk [Publishable Key](!publishable-key). | diff --git a/packages/backend/src/api/endpoints/AgentTaskApi.ts b/packages/backend/src/api/endpoints/AgentTaskApi.ts index 2df65bf5b1a..ccdc51ab18e 100644 --- a/packages/backend/src/api/endpoints/AgentTaskApi.ts +++ b/packages/backend/src/api/endpoints/AgentTaskApi.ts @@ -4,7 +4,7 @@ import { AbstractAPI } from './AbstractApi'; /** @generateWithEmptyComment */ export type CreateAgentTaskParams = { - /** The user to create an Agent Task for. Provide either a `userId` or an `identifier` (e.g. an email address, phone number, or username). */ + /** The user to create an Agent Task for. Provide either a `userId` or an `identifier` (e.g., an email address, phone number, or username). */ onBehalfOf: | { /** The identifier of the user to create an Agent Task for. */ diff --git a/packages/backend/src/api/endpoints/AllowlistIdentifierApi.ts b/packages/backend/src/api/endpoints/AllowlistIdentifierApi.ts index a3bca9c28d9..b9477fa2a60 100644 --- a/packages/backend/src/api/endpoints/AllowlistIdentifierApi.ts +++ b/packages/backend/src/api/endpoints/AllowlistIdentifierApi.ts @@ -10,7 +10,7 @@ const basePath = '/allowlist_identifiers'; /** @generateWithEmptyComment */ export type AllowlistIdentifierCreateParams = { - /** The identifier to add to the allowlist. Can be an email address, a domain in wildcard email format (e.g. `*@example.com`), a phone number in international E.164 format (e.g. `+15555555555`), or a Web3 wallet address. */ + /** The identifier to add to the allowlist. Can be an email address, a domain in wildcard email format (e.g., `*@example.com`), a phone number in international E.164 format (e.g., `+15555555555`), or a Web3 wallet address. */ identifier: string; /** Whether to notify the user that their identifier has been added to the allowlist. Notifies the user if the `identifier` is an email address or phone number. */ notify: boolean; diff --git a/packages/backend/src/api/endpoints/DomainApi.ts b/packages/backend/src/api/endpoints/DomainApi.ts index 865b881ba07..4e66223048b 100644 --- a/packages/backend/src/api/endpoints/DomainApi.ts +++ b/packages/backend/src/api/endpoints/DomainApi.ts @@ -9,7 +9,7 @@ const basePath = '/domains'; /** @generateWithEmptyComment */ export type AddDomainParams = { /** - * The new domain name. For development instances, can contain the port, e.g. `myhostname:3000`. For production instances, must be a valid FQDN, e.g. `mysite.com`. Cannot contain protocol scheme. + * The new domain name. For development instances, can contain the port, e.g., `myhostname:3000`. For production instances, must be a valid FQDN, e.g., `mysite.com`. Cannot contain protocol scheme. */ name: string; /** Whether the new domain is a satellite domain. Only `true` is accepted at the moment. */ diff --git a/packages/backend/src/api/endpoints/InstanceApi.ts b/packages/backend/src/api/endpoints/InstanceApi.ts index d725f98883d..c304ddf0c5c 100644 --- a/packages/backend/src/api/endpoints/InstanceApi.ts +++ b/packages/backend/src/api/endpoints/InstanceApi.ts @@ -22,7 +22,7 @@ export type UpdateParams = { developmentOrigin?: string | null | undefined; /** For browser-like stacks such as browser extensions, Electron, or Capacitor.js, the instance allowed origins need to be updated with the request origin value. For Chrome extensions popup, background, or service worker pages the origin is `chrome-extension://extension_uiid`. For Electron apps the default origin is `http://localhost:3000`. For Capacitor.js, the origin is `capacitor://localhost`. */ allowedOrigins?: Array | undefined; - /** Whether the instance should use URL-based session syncing in development mode (i.e. without third-party cookies). */ + /** Whether the instance should use URL-based session syncing in development mode (i.e., without third-party cookies). */ urlBasedSessionSyncing?: boolean | null | undefined; /** Overrides the sign-in strategy that is preferred when a password is required. The value is only consulted when a password is required, and is dormant otherwise. Pass an empty string to clear the override. Passing `null` or `undefined` leaves the current value unchanged. */ preferredSignInStrategyWhenPasswordRequired?: 'password' | 'otp' | '' | null | undefined; diff --git a/packages/backend/src/api/endpoints/InvitationApi.ts b/packages/backend/src/api/endpoints/InvitationApi.ts index 64f2f6221fc..45b4e2c9976 100644 --- a/packages/backend/src/api/endpoints/InvitationApi.ts +++ b/packages/backend/src/api/endpoints/InvitationApi.ts @@ -121,7 +121,7 @@ export class InvitationAPI extends AbstractAPI { * * Revoking an invitation makes the invitation email link unusable. However, it doesn't prevent the user from signing up if they follow the sign up flow. * - * Only active (i.e. non-revoked) invitations can be revoked. + * Only active (i.e., non-revoked) invitations can be revoked. * @param invitationId - The ID of the invitation to revoke. * @returns The revoked [`Invitation`](https://clerk.com/docs/reference/backend/types/backend-invitation). */ diff --git a/packages/backend/src/api/endpoints/UserApi.ts b/packages/backend/src/api/endpoints/UserApi.ts index d3053261556..e4f9f485678 100644 --- a/packages/backend/src/api/endpoints/UserApi.ts +++ b/packages/backend/src/api/endpoints/UserApi.ts @@ -245,7 +245,7 @@ export type CreateUserParams = { firstName?: string; /** The last name to assign to the user. */ lastName?: string; - /** The locale of the user in BCP-47 format (e.g. `'en-US'`, `'fr-FR'`). */ + /** The locale of the user in BCP-47 format (e.g., `'en-US'`, `'fr-FR'`). */ locale?: string; /** When set to `true`, all password checks are skipped. It is recommended to use this method only when migrating plaintext passwords to Clerk. Upon migration the user base should be prompted to pick stronger password. */ skipPasswordChecks?: boolean; @@ -253,7 +253,7 @@ export type CreateUserParams = { skipPasswordRequirement?: boolean; /** When set to `true`, all legal checks are skipped. It is not recommended to skip legal checks unless you are migrating a user to Clerk. */ skipLegalChecks?: boolean; - /** A custom timestamp denoting when the user accepted legal requirements, specified in RFC3339 format (e.g. `'2012-10-20T07:15:20.902Z'`). */ + /** A custom timestamp denoting when the user accepted legal requirements, specified in RFC3339 format (e.g., `'2012-10-20T07:15:20.902Z'`). */ legalAcceptedAt?: Date; /** * If TOTP is enabled on the instance, you can provide the secret to enable it on the newly created user without the need to reset it. Currently, the supported options are: @@ -266,7 +266,7 @@ export type CreateUserParams = { totpSecret?: string; /** If backup codes are enabled on the instance, you can provide them to enable it on the newly created user without the need to reset them. You must provide the backup codes in plain format or the corresponding bcrypt digest. */ backupCodes?: string[]; - /** A custom timestamp denoting when the user signed up to the application, specified in RFC3339 format (e.g. `'2012-10-20T07:15:20.902Z'`). */ + /** A custom timestamp denoting when the user signed up to the application, specified in RFC3339 format (e.g., `'2012-10-20T07:15:20.902Z'`). */ createdAt?: Date; /** When set to `true`, the user is created already banned and cannot sign in. */ banned?: boolean; @@ -312,13 +312,13 @@ export type UpdateUserParams = { backupCodes?: string[]; /** The ID of the user as used in your external systems or your previous authentication solution. Must be unique across your entire instance. */ externalId?: string; - /** A custom timestamp denoting when the user signed up to the application, specified in RFC3339 format (e.g. `'2012-10-20T07:15:20.902Z'`). */ + /** A custom timestamp denoting when the user signed up to the application, specified in RFC3339 format (e.g., `'2012-10-20T07:15:20.902Z'`). */ createdAt?: Date; /** When set to `true`, all legal checks are skipped. It is not recommended to skip legal checks unless you are migrating a user to Clerk. */ skipLegalChecks?: boolean; - /** A custom timestamp denoting when the user accepted legal requirements, specified in RFC3339 format (e.g. `'2012-10-20T07:15:20.902Z'`). */ + /** A custom timestamp denoting when the user accepted legal requirements, specified in RFC3339 format (e.g., `'2012-10-20T07:15:20.902Z'`). */ legalAcceptedAt?: Date; - /** The locale of the user in BCP-47 format (e.g. `'en-US'`). */ + /** The locale of the user in BCP-47 format (e.g., `'en-US'`). */ locale?: string; /** If `true`, the user can delete themselves with the Frontend API. */ deleteSelfEnabled?: boolean; @@ -620,7 +620,7 @@ export class UserAPI extends AbstractAPI { /** * Gets the corresponding [OAuth access token](!oauth-access-token) for a user that has previously authenticated with the given OAuth provider. * @param userId - The ID of the user to get the OAuth access tokens for. - * @param provider - The OAuth provider to get the access tokens for. If using a custom OAuth provider, prefix the provider name with `custom_` (e.g. `oauth_custom_google`). + * @param provider - The OAuth provider to get the access tokens for. If using a custom OAuth provider, prefix the provider name with `custom_` (e.g., `oauth_custom_google`). * @returns A [`PaginatedResourceResponse`](https://clerk.com/docs/reference/backend/types/paginated-resource-response) object with a `data` property that contains an array of [`OauthAccessToken`](https://clerk.com/docs/reference/backend/types/backend-oauth-access-token) objects, and a `totalCount` property that indicates the total number of OAuth access tokens for the specified user and provider. */ public async getUserOauthAccessToken( @@ -652,7 +652,7 @@ export class UserAPI extends AbstractAPI { } /** - * Disable all of a user's MFA methods (e.g. [OTP](!otp) sent via SMS, TOTP on their authenticator app) at once. + * Disable all of a user's MFA methods (e.g., [OTP](!otp) sent via SMS, TOTP on their authenticator app) at once. * @param userId - The ID of the user to disable MFA for. */ public async disableUserMFA(userId: string) { @@ -705,7 +705,7 @@ export class UserAPI extends AbstractAPI { }); } - /** Verify that the provided TOTP or backup code is valid for the user. Verifying a backup code will result it in being consumed (i.e. it will become invalid). Useful for custom auth flows and re-verification. */ + /** Verify that the provided TOTP or backup code is valid for the user. Verifying a backup code will result it in being consumed (i.e., it will become invalid). Useful for custom auth flows and re-verification. */ public async verifyTOTP(params: VerifyTOTPParams) { const { userId, code } = params; this.requireId(userId); diff --git a/packages/backend/src/api/resources/ExternalAccount.ts b/packages/backend/src/api/resources/ExternalAccount.ts index 8c745da1590..53928bfd9ca 100644 --- a/packages/backend/src/api/resources/ExternalAccount.ts +++ b/packages/backend/src/api/resources/ExternalAccount.ts @@ -2,7 +2,7 @@ import type { ExternalAccountJSON } from './JSON'; import { Verification } from './Verification'; /** - * The Backend `ExternalAccount` object is a model around an identification obtained by an external provider (e.g. a social provider such as Google). + * The Backend `ExternalAccount` object is a model around an identification obtained by an external provider (e.g., a social provider such as Google). * * External account must be verified, so that you can make sure they can be assigned to their rightful owners. The `ExternalAccount` object holds all necessary state around the verification process. */ diff --git a/packages/backend/src/api/resources/RedirectUrl.ts b/packages/backend/src/api/resources/RedirectUrl.ts index 4cabc07bb8e..c528ff670e8 100644 --- a/packages/backend/src/api/resources/RedirectUrl.ts +++ b/packages/backend/src/api/resources/RedirectUrl.ts @@ -1,7 +1,7 @@ import type { RedirectUrlJSON } from './JSON'; /** - * Redirect URLs are whitelisted URLs that facilitate secure authentication flows in native applications (e.g. React Native, Expo). In these contexts, Clerk ensures that security-critical nonces are passed only to the whitelisted URLs. + * Redirect URLs are whitelisted URLs that facilitate secure authentication flows in native applications (e.g., React Native, Expo). In these contexts, Clerk ensures that security-critical nonces are passed only to the whitelisted URLs. The Backend `RedirectUrl` object represents a redirect URL in your application. This object is used in the Backend API. */ diff --git a/packages/backend/src/tokens/types.ts b/packages/backend/src/tokens/types.ts index c927d3c5ba7..823503a4aba 100644 --- a/packages/backend/src/tokens/types.ts +++ b/packages/backend/src/tokens/types.ts @@ -163,7 +163,7 @@ export type OrganizationSyncTargetMatchers = { }; /** - * Represents an Organization or a Personal Account - e.g. an + * Represents an Organization or a Personal Account - i.e., an * entity that can be activated by the handshake API. */ export type OrganizationSyncTarget = diff --git a/packages/backend/src/tokens/verify.ts b/packages/backend/src/tokens/verify.ts index 6dbcc335e77..a255ef3c565 100644 --- a/packages/backend/src/tokens/verify.ts +++ b/packages/backend/src/tokens/verify.ts @@ -251,7 +251,7 @@ async function verifyAPIKey( * Verifies any type of machine token by detecting its type from the prefix or JWT claims. * For JWTs, decodes once and routes based on claims to avoid redundant decoding. * - * @param token - The token to verify (e.g. starts with "mt_", "oat_", "ak_", or a JWT) + * @param token - The token to verify (e.g., starts with "mt_", "oat_", "ak_", or a JWT) * @param options - Options including secretKey for BAPI authorization */ export async function verifyMachineAuthToken(token: string, options: VerifyTokenOptions) { diff --git a/packages/shared/src/react/billing/payment-element.tsx b/packages/shared/src/react/billing/payment-element.tsx index ea63015df5c..b63cb161614 100644 --- a/packages/shared/src/react/billing/payment-element.tsx +++ b/packages/shared/src/react/billing/payment-element.tsx @@ -307,7 +307,7 @@ export type UsePaymentElementReturn = { name: 'stripe'; }; /** - * Indicates whether the underlying payment provider (e.g. Stripe) has been fully initialized. + * Indicates whether the underlying payment provider (e.g., Stripe) has been fully initialized. */ isProviderReady: true; } diff --git a/packages/shared/src/react/contexts.tsx b/packages/shared/src/react/contexts.tsx index 0b35abc54e2..57ae37ad4ae 100644 --- a/packages/shared/src/react/contexts.tsx +++ b/packages/shared/src/react/contexts.tsx @@ -70,7 +70,7 @@ export type UseCheckoutOptions = { */ planPeriod: BillingSubscriptionPlanPeriod; /** - * The ID of the Subscription Plan to check out (e.g. `cplan_xxx`). + * The ID of the Subscription Plan to check out (e.g., `cplan_xxx`). */ planId: string; /** diff --git a/packages/shared/src/react/hooks/useOAuthConsent.tsx b/packages/shared/src/react/hooks/useOAuthConsent.tsx index c7a7513f494..bd4bcd4f04e 100644 --- a/packages/shared/src/react/hooks/useOAuthConsent.tsx +++ b/packages/shared/src/react/hooks/useOAuthConsent.tsx @@ -12,7 +12,7 @@ const HOOK_NAME = 'useOAuthConsent'; /** * The `useOAuthConsent()` hook loads OAuth application consent metadata for the **signed-in** user * (`GET /me/oauth/consent/{oauthClientId}`). Ensure the user is authenticated before relying on this hook - * (for example, redirect to sign-in on your custom consent route). + * (e.g., redirect to sign-in on your custom consent route). * * @example * ```tsx diff --git a/packages/shared/src/react/hooks/useOrganization.tsx b/packages/shared/src/react/hooks/useOrganization.tsx index 127c622cc54..619230df9b2 100644 --- a/packages/shared/src/react/hooks/useOrganization.tsx +++ b/packages/shared/src/react/hooks/useOrganization.tsx @@ -69,7 +69,7 @@ export type UseOrganizationParams = { export type UseOrganizationReturn = | { /** - * Indicates whether Clerk has loaded the current authentication state. Initially `false`, becomes `true` once Clerk loads, and can revert to `false` while auth state is updating (for example, when switching organizations via [`setActive()`](https://clerk.com/docs/reference/objects/clerk#set-active)). + * Indicates whether Clerk has loaded the current authentication state. Initially `false`, becomes `true` once Clerk loads, and can revert to `false` while auth state is updating (e.g., when switching organizations via [`setActive()`](https://clerk.com/docs/reference/objects/clerk#set-active)). */ isLoaded: false; /** diff --git a/packages/shared/src/react/hooks/useOrganizationList.tsx b/packages/shared/src/react/hooks/useOrganizationList.tsx index 38eb4176b86..e50fab1e88e 100644 --- a/packages/shared/src/react/hooks/useOrganizationList.tsx +++ b/packages/shared/src/react/hooks/useOrganizationList.tsx @@ -77,7 +77,7 @@ const undefinedPaginatedResource = { export type UseOrganizationListReturn = | { /** - * Indicates whether Clerk has loaded the current authentication state and there is an authenticated user. Initially `false`, becomes `true` once Clerk loads with a user, and can revert to `false` while auth state is updating (for example, when switching organizations via [`setActive()`](https://clerk.com/docs/reference/objects/clerk#set-active)). + * Indicates whether Clerk has loaded the current authentication state and there is an authenticated user. Initially `false`, becomes `true` once Clerk loads with a user, and can revert to `false` while auth state is updating (e.g., when switching organizations via [`setActive()`](https://clerk.com/docs/reference/objects/clerk#set-active)). */ isLoaded: false; /** diff --git a/packages/shared/src/types/billing.ts b/packages/shared/src/types/billing.ts index 1db27d37140..73de14061d9 100644 --- a/packages/shared/src/types/billing.ts +++ b/packages/shared/src/types/billing.ts @@ -249,7 +249,7 @@ export interface BillingPlanResource extends ClerkResource { */ features: FeatureResource[]; /** - * Per-unit pricing tiers for this Plan (for example, seats). + * Per-unit pricing tiers for this Plan (e.g., seats). */ unitPrices?: BillingPlanUnitPrice[]; /** @@ -308,7 +308,7 @@ export interface BillingPlanUnitPriceTier { } /** - * The `BillingPlanUnitPrice` type represents unit pricing for a specific unit type (for example, seats) on a plan. + * The `BillingPlanUnitPrice` type represents unit pricing for a specific unit type (e.g., seats) on a plan. * * @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to [pin](https://clerk.com/docs/pinning) the SDK version and the clerk-js version to avoid breaking changes. */ @@ -556,7 +556,7 @@ export type BillingPaymentStatus = 'pending' | 'paid' | 'failed'; /** * The `BillingPaymentTotals` type represents the per-payment cost breakdown, including any base fee - * and per-unit (for example, seats) subtotals. + * and per-unit (e.g., seats) subtotals. * * @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to [pin](https://clerk.com/docs/pinning) the SDK version and the clerk-js version to avoid breaking changes. */ @@ -578,7 +578,7 @@ export interface BillingPaymentTotals { */ baseFee?: BillingMoneyAmount | null; /** - * Per-unit cost breakdown for this payment (for example, seats). + * Per-unit cost breakdown for this payment (e.g., seats). */ perUnitTotals?: BillingPerUnitTotal[]; /** @@ -630,7 +630,7 @@ export interface BillingPaymentResource extends ClerkResource { */ status: BillingPaymentStatus; /** - * Per-payment breakdown with optional base fee and per-unit (for example, seats) subtotals. + * Per-payment breakdown with optional base fee and per-unit (e.g., seats) subtotals. * Absent on older responses. */ totals?: BillingPaymentTotals | null; @@ -748,7 +748,7 @@ export interface BillingSubscriptionNextPayment { */ date: Date; /** - * Per-unit cost breakdown for the next payment (for example, seats). + * Per-unit cost breakdown for the next payment (e.g., seats). */ perUnitTotals?: BillingPerUnitTotal[]; /** @@ -772,7 +772,7 @@ export interface BillingSubscriptionItemNextPayment { */ date: Date; /** - * Per-unit cost breakdown for the next payment (for example, seats). + * Per-unit cost breakdown for the next payment (e.g., seats). */ perUnitTotals?: BillingPerUnitTotal[]; /** @@ -1122,7 +1122,7 @@ export interface BillingTotals { */ totalDueNow?: BillingMoneyAmount; /** - * Per-unit total breakdown (for example, seats) + * Per-unit total breakdown (e.g., seats) */ perUnitTotals?: BillingPerUnitTotal[]; /** @@ -1160,7 +1160,7 @@ export interface BillingCheckoutTotals { */ taxTotal: BillingMoneyAmount; /** - * Per-unit cost breakdown for items actively being purchased in this checkout (for example, seats being added). + * Per-unit cost breakdown for items actively being purchased in this checkout (e.g., seats being added). * When only adding seats mid-cycle, this only covers the seats being added, not seats already paid for. */ perUnitTotals?: BillingPerUnitTotal[]; diff --git a/packages/shared/src/types/clerk.ts b/packages/shared/src/types/clerk.ts index c5476095bff..d27b3210b05 100644 --- a/packages/shared/src/types/clerk.ts +++ b/packages/shared/src/types/clerk.ts @@ -1044,7 +1044,7 @@ export interface Clerk { /** * Redirects to the configured URL where [session tasks](https://clerk.com/docs/reference/objects/session) are mounted. * - * @param opts - Options to control the redirect (e.g. redirect URL after tasks are complete). + * @param opts - Options to control the redirect (e.g., redirect URL after tasks are complete). */ redirectToTasks(opts?: TasksRedirectOptions): Promise; @@ -1201,7 +1201,7 @@ export interface Clerk { apiKeys: APIKeysNamespace; /** - * OAuth application helpers (e.g. consent metadata for custom consent UIs). + * OAuth application helpers (e.g., consent metadata for custom consent UIs). */ oauthApplication: OAuthApplicationNamespace; @@ -1389,7 +1389,7 @@ export type ClerkOptions = ClerkOptionsNavigation & */ polling?: boolean; /** - * By default, the last signed-in session is used during client initialization. This option allows you to override that behavior, e.g. by selecting a specific session. + * By default, the last signed-in session is used during client initialization. This option allows you to override that behavior, e.g., by selecting a specific session. */ selectInitialSession?: (client: ClientResource) => SignedInSessionResource | null; /** @@ -1952,7 +1952,7 @@ export type UserProfileProps = RoutingOptions & { appearance?: ClerkAppearanceTheme; /* * Specify additional scopes per OAuth provider that your users would like to provide if not already approved. - * e.g. + * e.g., */ additionalOAuthScopes?: Partial>; /* @@ -1969,7 +1969,7 @@ export type UserProfileProps = RoutingOptions & { __experimental_startPath?: string; /** * Specify options for the underlying component. - * e.g. + * e.g., * * @experimental */ @@ -2018,7 +2018,7 @@ export type OrganizationProfileProps = RoutingOptions & { __experimental_startPath?: string; /** * Specify options for the underlying component. - * e.g. + * e.g., * * @experimental */ @@ -2125,7 +2125,7 @@ export type UserButtonProps = UserButtonProfileMode & { /** * Specify options for the underlying component. - * e.g. + * e.g., */ userProfileProps?: Pick; @@ -2227,7 +2227,7 @@ export type OrganizationSwitcherProps = CreateOrganizationMode & appearance?: ClerkAppearanceTheme; /* * Specify options for the underlying component. - * e.g. + * e.g., */ organizationProfileProps?: Pick; }; @@ -2347,7 +2347,7 @@ type PricingTableBaseProps = { appearance?: ClerkAppearanceTheme; /* * Specify options for the underlying component. - * e.g. + * e.g., */ checkoutProps?: Pick<__internal_CheckoutProps, 'appearance'>; }; diff --git a/packages/shared/src/types/enterpriseConnection.ts b/packages/shared/src/types/enterpriseConnection.ts index 35a3f8a336f..f3e17fc9367 100644 --- a/packages/shared/src/types/enterpriseConnection.ts +++ b/packages/shared/src/types/enterpriseConnection.ts @@ -28,7 +28,7 @@ export interface EnterpriseConnectionResource extends ClerkResource { name: string; /** Whether the enterprise connection is active. */ active: boolean; - /** The identity provider the connection uses (e.g. `saml_okta`, `oidc_custom`). */ + /** The identity provider the connection uses (e.g., `saml_okta`, `oidc_custom`). */ provider: string; /** The public URL of the identity provider's logo, or `null` when none is set. */ logoPublicUrl: string | null; diff --git a/packages/shared/src/types/hooks.ts b/packages/shared/src/types/hooks.ts index 9e377663e44..68026706d28 100644 --- a/packages/shared/src/types/hooks.ts +++ b/packages/shared/src/types/hooks.ts @@ -26,7 +26,7 @@ type CheckAuthorizationSignedOut = CheckAuthorizationWithoutOrgOrUser; export type UseAuthReturn = | { /** - * Indicates whether Clerk has loaded the current authentication state. Initially `false`, becomes `true` once Clerk loads, and can revert to `false` while auth state is updating (for example, when switching organizations via [`setActive()`](https://clerk.com/docs/reference/objects/clerk#set-active)). + * Indicates whether Clerk has loaded the current authentication state. Initially `false`, becomes `true` once Clerk loads, and can revert to `false` while auth state is updating (e.g., when switching organizations via [`setActive()`](https://clerk.com/docs/reference/objects/clerk#set-active)). */ isLoaded: false; /** @@ -123,7 +123,7 @@ export type UseAuthReturn = export type UseSignInReturn = | { /** - * Indicates whether Clerk has loaded the current authentication state. Initially `false`, becomes `true` once Clerk loads, and can revert to `false` while auth state is updating (for example, when switching organizations via [`setActive()`](https://clerk.com/docs/reference/objects/clerk#set-active)). + * Indicates whether Clerk has loaded the current authentication state. Initially `false`, becomes `true` once Clerk loads, and can revert to `false` while auth state is updating (e.g., when switching organizations via [`setActive()`](https://clerk.com/docs/reference/objects/clerk#set-active)). */ isLoaded: false; /** @@ -147,7 +147,7 @@ export type UseSignInReturn = export type UseSignUpReturn = | { /** - * Indicates whether Clerk has loaded the current authentication state. Initially `false`, becomes `true` once Clerk loads, and can revert to `false` while auth state is updating (for example, when switching organizations via [`setActive()`](https://clerk.com/docs/reference/objects/clerk#set-active)). + * Indicates whether Clerk has loaded the current authentication state. Initially `false`, becomes `true` once Clerk loads, and can revert to `false` while auth state is updating (e.g., when switching organizations via [`setActive()`](https://clerk.com/docs/reference/objects/clerk#set-active)). */ isLoaded: false; /** @@ -171,7 +171,7 @@ export type UseSignUpReturn = export type UseSessionReturn = | { /** - * Indicates whether Clerk has loaded the current authentication state. Initially `false`, becomes `true` once Clerk loads, and can revert to `false` while auth state is updating (for example, when switching organizations via [`setActive()`](https://clerk.com/docs/reference/objects/clerk#set-active)). + * Indicates whether Clerk has loaded the current authentication state. Initially `false`, becomes `true` once Clerk loads, and can revert to `false` while auth state is updating (e.g., when switching organizations via [`setActive()`](https://clerk.com/docs/reference/objects/clerk#set-active)). */ isLoaded: false; /** @@ -200,7 +200,7 @@ export type UseSessionReturn = export type UseSessionListReturn = | { /** - * Indicates whether Clerk has loaded the current authentication state. Initially `false`, becomes `true` once Clerk loads, and can revert to `false` while auth state is updating (for example, when switching organizations via [`setActive()`](https://clerk.com/docs/reference/objects/clerk#set-active)). + * Indicates whether Clerk has loaded the current authentication state. Initially `false`, becomes `true` once Clerk loads, and can revert to `false` while auth state is updating (e.g., when switching organizations via [`setActive()`](https://clerk.com/docs/reference/objects/clerk#set-active)). */ isLoaded: false; /** @@ -224,7 +224,7 @@ export type UseSessionListReturn = export type UseUserReturn = | { /** - * Indicates whether Clerk has loaded the current authentication state. Initially `false`, becomes `true` once Clerk loads, and can revert to `false` while auth state is updating (for example, when switching organizations via [`setActive()`](https://clerk.com/docs/reference/objects/clerk#set-active)). + * Indicates whether Clerk has loaded the current authentication state. Initially `false`, becomes `true` once Clerk loads, and can revert to `false` while auth state is updating (e.g., when switching organizations via [`setActive()`](https://clerk.com/docs/reference/objects/clerk#set-active)). */ isLoaded: false; /** diff --git a/packages/shared/src/types/json.ts b/packages/shared/src/types/json.ts index ff99b123d39..a7282b05df9 100644 --- a/packages/shared/src/types/json.ts +++ b/packages/shared/src/types/json.ts @@ -702,7 +702,7 @@ export interface BillingPlanUnitPriceTierJSON extends ClerkResourceJSON { /** * @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to [pin](https://clerk.com/docs/pinning) the SDK version and the clerk-js version to avoid breaking changes. * - * Represents unit pricing for a specific unit type (for example, seats) on a plan. + * Represents unit pricing for a specific unit type (e.g., seats) on a plan. */ export interface BillingPlanUnitPriceJSON { name: string; @@ -765,7 +765,7 @@ export interface BillingPlanJSON extends ClerkResourceJSON { free_trial_days?: number | null; free_trial_enabled?: boolean; /** - * Per-unit pricing tiers for this plan (for example, seats). + * Per-unit pricing tiers for this plan (e.g., seats). */ unit_prices?: BillingPlanUnitPriceJSON[]; available_prices?: BillingPriceJSON[]; @@ -824,7 +824,7 @@ export interface BillingStatementGroupJSON extends ClerkResourceJSON { /** * @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to [pin](https://clerk.com/docs/pinning) the SDK version and the clerk-js version to avoid breaking changes. * - * Per-payment cost breakdown including optional base fee and per-unit (for example, seats) subtotals. + * Per-payment cost breakdown including optional base fee and per-unit (e.g., seats) subtotals. */ export interface BillingPaymentTotalsJSON { subtotal: BillingMoneyAmountJSON; @@ -853,7 +853,7 @@ export interface BillingPaymentJSON extends ClerkResourceJSON { charge_type: BillingPaymentChargeType; status: BillingPaymentStatus; /** - * Per-payment breakdown with optional base fee and per-unit (for example, seats) + * Per-payment breakdown with optional base fee and per-unit (e.g., seats) * subtotals. Absent on older responses. */ totals?: BillingPaymentTotalsJSON | null; @@ -1065,7 +1065,7 @@ export interface BillingCheckoutTotalsJSON { base_fee: BillingMoneyAmountJSON; tax_total: BillingMoneyAmountJSON; /** - * Per-unit cost breakdown for items actively being purchased in this checkout (for example, seats being added). + * Per-unit cost breakdown for items actively being purchased in this checkout (e.g., seats being added). * When only adding seats mid-cycle, this only covers the seats being added, not seats already paid for. * Omitted when the checkout is not seat-based. */ diff --git a/packages/shared/src/types/localization.ts b/packages/shared/src/types/localization.ts index 9ca7ecee35e..19074bdbae5 100644 --- a/packages/shared/src/types/localization.ts +++ b/packages/shared/src/types/localization.ts @@ -70,7 +70,7 @@ export type __internal_LocalizationResource = { locale: string; maintenanceMode: LocalizationValue; /** - * Add Role keys and their localized values, e.g. `roles: { 'org:teacher': 'Teacher'}`. + * Add Role keys and their localized values, e.g., `roles: { 'org:teacher': 'Teacher'}`. * * @experimental */ diff --git a/packages/shared/src/types/organizationDomain.ts b/packages/shared/src/types/organizationDomain.ts index e5a48634084..109bb193c7f 100644 --- a/packages/shared/src/types/organizationDomain.ts +++ b/packages/shared/src/types/organizationDomain.ts @@ -81,7 +81,7 @@ export interface OrganizationDomainOwnershipVerification { */ strategy: OrganizationDomainOwnershipVerificationStrategy; /** - * The number of verification attempts that have been made for the current ownership verification, or `null` when ownership was not established through a per-attempt flow (for example, the `legacy` strategy). + * The number of verification attempts that have been made for the current ownership verification, or `null` when ownership was not established through a per-attempt flow (e.g., the `legacy` strategy). */ attempts: number | null; /** diff --git a/packages/shared/src/types/redirects.ts b/packages/shared/src/types/redirects.ts index 1223d21ffc7..2fb281c9b90 100644 --- a/packages/shared/src/types/redirects.ts +++ b/packages/shared/src/types/redirects.ts @@ -42,7 +42,7 @@ export type AuthenticateWithRedirectParams = { redirectUrlComplete: string; /** - * Whether to continue (i.e. PATCH) an existing SignUp (if present) or create a new SignUp. + * Whether to continue (i.e., PATCH) an existing SignUp (if present) or create a new SignUp. */ continueSignUp?: boolean; diff --git a/packages/shared/src/types/session.ts b/packages/shared/src/types/session.ts index 5e148977474..4db4e97bb34 100644 --- a/packages/shared/src/types/session.ts +++ b/packages/shared/src/types/session.ts @@ -282,7 +282,7 @@ export interface SessionResource extends ClerkResource { /** * Gets the current user's [session token](https://clerk.com/docs/guides/sessions/session-tokens) or a [custom JWT template](https://clerk.com/docs/guides/sessions/jwt-templates). * - * This method uses a cache so a network request will only be made if the token in memory has expired. The TTL for a Clerk token is one minute. It retries on transient failures (e.g. network errors); when the browser is offline and retries are exhausted, it throws `ClerkOfflineError`. + * This method uses a cache so a network request will only be made if the token in memory has expired. The TTL for a Clerk token is one minute. It retries on transient failures (e.g., network errors); when the browser is offline and retries are exhausted, it throws `ClerkOfflineError`. * * Tokens can only be generated if the user is signed in. */ @@ -500,11 +500,11 @@ export type GetTokenOptions = { */ organizationId?: string; /** - * Whether to skip the cache lookup and force a call to the server instead, even within the TTL. Useful if the token claims are time-sensitive or depend on data that can be updated (e.g. user fields). Defaults to `false`. + * Whether to skip the cache lookup and force a call to the server instead, even within the TTL. Useful if the token claims are time-sensitive or depend on data that can be updated (e.g., user fields). Defaults to `false`. */ skipCache?: boolean; /** - * The name of the JWT template from the [Clerk Dashboard](https://dashboard.clerk.com/~/jwt-templates) to generate a new token from. E.g. 'firebase', 'grafbase', or your custom template's name. + * The name of the JWT template from the [Clerk Dashboard](https://dashboard.clerk.com/~/jwt-templates) to generate a new token from. E.g., 'firebase', 'grafbase', or your custom template's name. */ template?: string; };