From 658eaa0641f8cb32f985f095d29008b5951e0c80 Mon Sep 17 00:00:00 2001 From: Alexis Aguilar <98043211+alexisintech@users.noreply.github.com> Date: Fri, 31 Oct 2025 14:27:57 -0400 Subject: [PATCH 1/3] docs(backend/shared): Update typedoc comments --- packages/backend/src/api/endpoints/InstanceApi.ts | 2 +- packages/shared/src/react/hooks/useOrganization.tsx | 2 +- packages/shared/src/types/organization.ts | 2 +- packages/shared/src/types/organizationMembership.ts | 2 +- packages/shared/src/types/session.ts | 12 ++++++------ 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/backend/src/api/endpoints/InstanceApi.ts b/packages/backend/src/api/endpoints/InstanceApi.ts index 850c43dffa5..b970b5ab114 100644 --- a/packages/backend/src/api/endpoints/InstanceApi.ts +++ b/packages/backend/src/api/endpoints/InstanceApi.ts @@ -52,7 +52,7 @@ type UpdateOrganizationSettingsParams = { adminDeleteEnabled?: boolean | null | undefined; domainsEnabled?: boolean | null | undefined; /** - * Specifies which [enrollment modes](https://clerk.com/docs/guides/organizations/verified-domains#enrollment-mode) to enable for your Organization Domains. + * Specifies which [enrollment modes](https://clerk.com/docs/guides/organizations/add-members/verified-domains#enrollment-mode) to enable for your Organization Domains. * * @remarks Supported modes are 'automatic_invitation' & 'automatic_suggestion'. */ diff --git a/packages/shared/src/react/hooks/useOrganization.tsx b/packages/shared/src/react/hooks/useOrganization.tsx index ff3a7d3c0b9..dd149b220a7 100644 --- a/packages/shared/src/react/hooks/useOrganization.tsx +++ b/packages/shared/src/react/hooks/useOrganization.tsx @@ -29,7 +29,7 @@ export type UseOrganizationParams = { * If set to `true`, all default properties will be used.
* Otherwise, accepts an object with the following optional properties: * */ diff --git a/packages/shared/src/types/organization.ts b/packages/shared/src/types/organization.ts index 7d1693438d9..9ebc8843c11 100644 --- a/packages/shared/src/types/organization.ts +++ b/packages/shared/src/types/organization.ts @@ -31,7 +31,7 @@ declare global { /** * 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](https://clerk.com/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](https://clerk.com/docs/guides/organizations/configure#enable-organizations). * * @interface */ diff --git a/packages/shared/src/types/organizationMembership.ts b/packages/shared/src/types/organizationMembership.ts index f9d645e4401..9aae352b909 100644 --- a/packages/shared/src/types/organizationMembership.ts +++ b/packages/shared/src/types/organizationMembership.ts @@ -70,7 +70,7 @@ export type OrganizationCustomPermissionKey = ClerkAuthorization extends Placeho /** * `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`](https://clerk.com/docs/guides/development/override-clerk-types-interfaces#example-custom-roles-and-permissions). * - * Clerk provides the [default roles](https://clerk.com/docs/guides/organizations/roles-and-permissions#default-roles) `org:admin` and `org:member`. However, you can create [custom roles](https://clerk.com/docs/guides/organizations/roles-and-permissions#custom-roles) as well. + * Clerk provides the [default roles](https://clerk.com/docs/guides/organizations/control-access/roles-and-permissions#default-roles) `org:admin` and `org:member`. However, you can create [custom roles](https://clerk.com/docs/guides/organizations/control-access/roles-and-permissions#custom-roles) as well. * * @interface */ diff --git a/packages/shared/src/types/session.ts b/packages/shared/src/types/session.ts index 11629a838d4..bb75ecd08a7 100644 --- a/packages/shared/src/types/session.ts +++ b/packages/shared/src/types/session.ts @@ -61,11 +61,11 @@ type WithReverification = T & { export type CheckAuthorizationParamsWithCustomPermissions = WithReverification< | { /** - * The [role](https://clerk.com/docs/guides/organizations/roles-and-permissions) to check for. + * The [role](https://clerk.com/docs/guides/organizations/control-access/roles-and-permissions) to check for. */ role: OrganizationCustomRoleKey; /** - * The [permission](https://clerk.com/docs/guides/organizations/roles-and-permissions) to check for. + * The [permission](https://clerk.com/docs/guides/organizations/control-access/roles-and-permissions) to check for. */ permission?: never; /** @@ -103,11 +103,11 @@ export type CheckAuthorization = CheckAuthorizationFn; type CheckAuthorizationParams = WithReverification< | { /** - * The [role](https://clerk.com/docs/guides/organizations/roles-and-permissions) to check for. + * The [role](https://clerk.com/docs/guides/organizations/control-access/roles-and-permissions) to check for. */ role: OrganizationCustomRoleKey; /** - * The [permission](https://clerk.com/docs/guides/organizations/roles-and-permissions) to check for. + * The [permission](https://clerk.com/docs/guides/organizations/control-access/roles-and-permissions) to check for. */ permission?: never; /** @@ -155,11 +155,11 @@ export type CheckAuthorizationFromSessionClaims =

= WithReverification< | { /** - * The [role](https://clerk.com/docs/guides/organizations/roles-and-permissions) to check for. + * The [role](https://clerk.com/docs/guides/organizations/control-access/roles-and-permissions) to check for. */ role: OrganizationCustomRoleKey; /** - * The [permission](https://clerk.com/docs/guides/organizations/roles-and-permissions) to check for. + * The [permission](https://clerk.com/docs/guides/organizations/control-access/roles-and-permissions) to check for. */ permission?: never; /** From f95a30c9a6f9566f7d995a8fb61a0626f5ffcf15 Mon Sep 17 00:00:00 2001 From: Sarah Soutoul Date: Tue, 11 Nov 2025 11:42:24 -0600 Subject: [PATCH 2/3] Update links --- packages/backend/src/api/endpoints/InstanceApi.ts | 2 +- packages/shared/src/react/hooks/useOrganization.tsx | 2 +- packages/shared/src/types/organizationMembership.ts | 2 +- packages/shared/src/types/session.ts | 12 ++++++------ 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/backend/src/api/endpoints/InstanceApi.ts b/packages/backend/src/api/endpoints/InstanceApi.ts index b970b5ab114..850c43dffa5 100644 --- a/packages/backend/src/api/endpoints/InstanceApi.ts +++ b/packages/backend/src/api/endpoints/InstanceApi.ts @@ -52,7 +52,7 @@ type UpdateOrganizationSettingsParams = { adminDeleteEnabled?: boolean | null | undefined; domainsEnabled?: boolean | null | undefined; /** - * Specifies which [enrollment modes](https://clerk.com/docs/guides/organizations/add-members/verified-domains#enrollment-mode) to enable for your Organization Domains. + * Specifies which [enrollment modes](https://clerk.com/docs/guides/organizations/verified-domains#enrollment-mode) to enable for your Organization Domains. * * @remarks Supported modes are 'automatic_invitation' & 'automatic_suggestion'. */ diff --git a/packages/shared/src/react/hooks/useOrganization.tsx b/packages/shared/src/react/hooks/useOrganization.tsx index dd149b220a7..ff3a7d3c0b9 100644 --- a/packages/shared/src/react/hooks/useOrganization.tsx +++ b/packages/shared/src/react/hooks/useOrganization.tsx @@ -29,7 +29,7 @@ export type UseOrganizationParams = { * If set to `true`, all default properties will be used.
* Otherwise, accepts an object with the following optional properties: *

*/ diff --git a/packages/shared/src/types/organizationMembership.ts b/packages/shared/src/types/organizationMembership.ts index 9aae352b909..f9d645e4401 100644 --- a/packages/shared/src/types/organizationMembership.ts +++ b/packages/shared/src/types/organizationMembership.ts @@ -70,7 +70,7 @@ export type OrganizationCustomPermissionKey = ClerkAuthorization extends Placeho /** * `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`](https://clerk.com/docs/guides/development/override-clerk-types-interfaces#example-custom-roles-and-permissions). * - * Clerk provides the [default roles](https://clerk.com/docs/guides/organizations/control-access/roles-and-permissions#default-roles) `org:admin` and `org:member`. However, you can create [custom roles](https://clerk.com/docs/guides/organizations/control-access/roles-and-permissions#custom-roles) as well. + * Clerk provides the [default roles](https://clerk.com/docs/guides/organizations/roles-and-permissions#default-roles) `org:admin` and `org:member`. However, you can create [custom roles](https://clerk.com/docs/guides/organizations/roles-and-permissions#custom-roles) as well. * * @interface */ diff --git a/packages/shared/src/types/session.ts b/packages/shared/src/types/session.ts index bb75ecd08a7..11629a838d4 100644 --- a/packages/shared/src/types/session.ts +++ b/packages/shared/src/types/session.ts @@ -61,11 +61,11 @@ type WithReverification = T & { export type CheckAuthorizationParamsWithCustomPermissions = WithReverification< | { /** - * The [role](https://clerk.com/docs/guides/organizations/control-access/roles-and-permissions) to check for. + * The [role](https://clerk.com/docs/guides/organizations/roles-and-permissions) to check for. */ role: OrganizationCustomRoleKey; /** - * The [permission](https://clerk.com/docs/guides/organizations/control-access/roles-and-permissions) to check for. + * The [permission](https://clerk.com/docs/guides/organizations/roles-and-permissions) to check for. */ permission?: never; /** @@ -103,11 +103,11 @@ export type CheckAuthorization = CheckAuthorizationFn; type CheckAuthorizationParams = WithReverification< | { /** - * The [role](https://clerk.com/docs/guides/organizations/control-access/roles-and-permissions) to check for. + * The [role](https://clerk.com/docs/guides/organizations/roles-and-permissions) to check for. */ role: OrganizationCustomRoleKey; /** - * The [permission](https://clerk.com/docs/guides/organizations/control-access/roles-and-permissions) to check for. + * The [permission](https://clerk.com/docs/guides/organizations/roles-and-permissions) to check for. */ permission?: never; /** @@ -155,11 +155,11 @@ export type CheckAuthorizationFromSessionClaims =

= WithReverification< | { /** - * The [role](https://clerk.com/docs/guides/organizations/control-access/roles-and-permissions) to check for. + * The [role](https://clerk.com/docs/guides/organizations/roles-and-permissions) to check for. */ role: OrganizationCustomRoleKey; /** - * The [permission](https://clerk.com/docs/guides/organizations/control-access/roles-and-permissions) to check for. + * The [permission](https://clerk.com/docs/guides/organizations/roles-and-permissions) to check for. */ permission?: never; /** From 1ce099036339239cf4769f2e5f9eb667e891b31b Mon Sep 17 00:00:00 2001 From: Alexis Aguilar <98043211+alexisintech@users.noreply.github.com> Date: Fri, 21 Nov 2025 18:27:57 -0500 Subject: [PATCH 3/3] update links and capitalizaitons --- packages/agent-toolkit/src/lib/tools/index.ts | 2 +- packages/astro/src/stores/external.ts | 2 +- .../backend/src/api/endpoints/APIKeysApi.ts | 4 +- .../backend/src/api/endpoints/InstanceApi.ts | 6 +- .../src/api/endpoints/OrganizationApi.ts | 6 +- .../src/api/endpoints/SamlConnectionApi.ts | 6 +- packages/backend/src/api/endpoints/UserApi.ts | 4 +- .../backend/src/api/resources/CommercePlan.ts | 28 +++--- .../api/resources/CommerceSubscriptionItem.ts | 6 +- packages/backend/src/api/resources/Feature.ts | 12 +-- packages/backend/src/api/resources/JSON.ts | 8 +- .../backend/src/api/resources/Organization.ts | 24 +++--- .../api/resources/OrganizationInvitation.ts | 8 +- .../api/resources/OrganizationMembership.ts | 8 +- .../src/api/resources/SamlConnection.ts | 4 +- packages/backend/src/api/resources/Session.ts | 2 +- packages/backend/src/api/resources/User.ts | 4 +- packages/backend/src/tokens/authObjects.ts | 2 +- packages/backend/src/tokens/types.ts | 14 +-- .../CreateOrganizationForm.tsx | 2 +- .../OrganizationProfile/InviteMembersForm.tsx | 4 +- .../OrganizationProfile/MembersSearch.tsx | 2 +- .../clerk-js/src/ui/hooks/useFetchRoles.ts | 4 +- packages/clerk-js/src/utils/organization.ts | 2 +- packages/react-router/src/server/types.ts | 4 +- .../components/SubscriptionDetailsButton.tsx | 4 +- packages/react/src/hooks/useAuth.ts | 2 +- packages/shared/src/authorization.ts | 6 +- packages/shared/src/organization.ts | 8 +- packages/shared/src/react/commerce.tsx | 2 +- packages/shared/src/react/contexts.tsx | 6 +- .../hooks/createBillingPaginatedHook.tsx | 4 +- .../src/react/hooks/useOrganization.tsx | 20 ++--- .../src/react/hooks/useOrganizationList.tsx | 10 +-- .../src/react/hooks/useSubscription.types.ts | 2 +- packages/shared/src/types/authObject.ts | 8 +- packages/shared/src/types/billing.ts | 86 +++++++++---------- packages/shared/src/types/clerk.ts | 84 +++++++++--------- packages/shared/src/types/hooks.ts | 10 +-- packages/shared/src/types/jwt.ts | 6 +- packages/shared/src/types/jwtv2.ts | 18 ++-- packages/shared/src/types/localization.ts | 2 +- packages/shared/src/types/organization.ts | 6 +- .../shared/src/types/organizationDomain.ts | 2 +- .../src/types/organizationInvitation.ts | 4 +- .../src/types/organizationMembership.ts | 14 +-- packages/shared/src/types/protect.ts | 10 +-- packages/shared/src/types/session.ts | 26 +++--- 48 files changed, 254 insertions(+), 254 deletions(-) diff --git a/packages/agent-toolkit/src/lib/tools/index.ts b/packages/agent-toolkit/src/lib/tools/index.ts index bc5ee5874c1..ce086731719 100644 --- a/packages/agent-toolkit/src/lib/tools/index.ts +++ b/packages/agent-toolkit/src/lib/tools/index.ts @@ -11,7 +11,7 @@ export const tools = { users, /** - * Tools for interacting with organizations. + * Tools for interacting with Organizations. * This is a wrapper around the `clerkClient.organizations` API. * For more information, see the [Clerk API documentation](https://clerk.com/docs/reference/backend-api/tag/Organizations). */ diff --git a/packages/astro/src/stores/external.ts b/packages/astro/src/stores/external.ts index c5516fd5da1..bdebe805116 100644 --- a/packages/astro/src/stores/external.ts +++ b/packages/astro/src/stores/external.ts @@ -56,7 +56,7 @@ export const $sessionStore = computed([$authStore], auth => auth.session as Sign /** * A client side store that is populated after clerk-js has loaded. - * The store returns the active organization of the authenticated user or `null`. + * The store returns the Active Organization of the authenticated user or `null`. * It is a nanostore, for instructions on how to use nanostores please review the [documentation](https://github.com/nanostores/nanostores) * * @example diff --git a/packages/backend/src/api/endpoints/APIKeysApi.ts b/packages/backend/src/api/endpoints/APIKeysApi.ts index 1b9b1d6ddb4..4612601d3d2 100644 --- a/packages/backend/src/api/endpoints/APIKeysApi.ts +++ b/packages/backend/src/api/endpoints/APIKeysApi.ts @@ -9,7 +9,7 @@ const basePath = '/api_keys'; type GetAPIKeyListParams = ClerkPaginationRequest<{ /** - * The user or organization ID to query API keys by + * The user or Organization ID to query API keys by */ subject: string; /** @@ -26,7 +26,7 @@ type CreateAPIKeyParams = { */ name: string; /** - * The user or organization ID to associate the API key with + * The user or Organization ID to associate the API key with */ subject: string; /** diff --git a/packages/backend/src/api/endpoints/InstanceApi.ts b/packages/backend/src/api/endpoints/InstanceApi.ts index 850c43dffa5..2cb29c052f3 100644 --- a/packages/backend/src/api/endpoints/InstanceApi.ts +++ b/packages/backend/src/api/endpoints/InstanceApi.ts @@ -52,17 +52,17 @@ type UpdateOrganizationSettingsParams = { adminDeleteEnabled?: boolean | null | undefined; domainsEnabled?: boolean | null | undefined; /** - * Specifies which [enrollment modes](https://clerk.com/docs/guides/organizations/verified-domains#enrollment-mode) to enable for your Organization Domains. + * Specifies which [enrollment modes](https://clerk.com/docs/guides/organizations/add-members/verified-domains#enrollment-mode) to enable for your Organization Domains. * * @remarks Supported modes are 'automatic_invitation' & 'automatic_suggestion'. */ domainsEnrollmentModes?: Array | undefined; /** - * Specifies what the default organization role is for an organization creator. + * Specifies what the default Organization Role is for an Organization creator. */ creatorRoleId?: string | null | undefined; /** - * Specifies what the default organization role is for the organization domains. + * Specifies what the default Organization Role is for the Organization Domains. */ domainsDefaultRoleId?: string | null | undefined; }; diff --git a/packages/backend/src/api/endpoints/OrganizationApi.ts b/packages/backend/src/api/endpoints/OrganizationApi.ts index 3d89bd27905..5f2a0ea9c8b 100644 --- a/packages/backend/src/api/endpoints/OrganizationApi.ts +++ b/packages/backend/src/api/endpoints/OrganizationApi.ts @@ -58,7 +58,7 @@ type GetOrganizationMembershipListParams = ClerkPaginationRequest<{ organizationId: string; /** - * Sorts organizations memberships by phone_number, email_address, created_at, first_name, last_name or username. + * Sorts Organization memberships by phone_number, email_address, created_at, first_name, last_name or username. * By prepending one of those values with + or -, we can choose to sort in ascending (ASC) or descending (DESC) order. */ orderBy?: WithSign<'phone_number' | 'email_address' | 'created_at' | 'first_name' | 'last_name' | 'username'>; @@ -82,7 +82,7 @@ type GetOrganizationMembershipListParams = ClerkPaginationRequest<{ /* Returns users with the specified web3 wallet addresses. Accepts up to 100 web3 wallet addresses. Any web3 wallet addressed not found are ignored. */ web3Wallet?: string[]; - /* Returns users with the specified roles. Accepts up to 100 roles. Any roles not found are ignored. */ + /* Returns users with the specified Roles. Accepts up to 100 Roles. Any Roles not found are ignored. */ role?: OrganizationMembershipRole[]; /** @@ -139,7 +139,7 @@ type GetOrganizationMembershipListParams = ClerkPaginationRequest<{ type GetInstanceOrganizationMembershipListParams = ClerkPaginationRequest<{ /** - * Sorts organizations memberships by phone_number, email_address, created_at, first_name, last_name or username. + * Sorts Organization memberships by phone_number, email_address, created_at, first_name, last_name or username. * By prepending one of those values with + or -, we can choose to sort in ascending (ASC) or descending (DESC) order. */ orderBy?: WithSign<'phone_number' | 'email_address' | 'created_at' | 'first_name' | 'last_name' | 'username'>; diff --git a/packages/backend/src/api/endpoints/SamlConnectionApi.ts b/packages/backend/src/api/endpoints/SamlConnectionApi.ts index 9224995add4..69e6ac120a5 100644 --- a/packages/backend/src/api/endpoints/SamlConnectionApi.ts +++ b/packages/backend/src/api/endpoints/SamlConnectionApi.ts @@ -21,9 +21,9 @@ type SamlConnectionListParams = ClerkPaginationRequest<{ orderBy?: WithSign<'phone_number' | 'email_address' | 'created_at' | 'first_name' | 'last_name' | 'username'>; /** - * Returns SAML connections that have an associated organization ID to the given organizations. - * For each organization id, the + and - can be prepended to the id, which denote whether the - * respective organization should be included or excluded from the result set. Accepts up to 100 organization ids. + * Returns SAML connections that have an associated Organization ID to the given Organizations. + * For each Organization ID, the + and - can be prepended to the ID, which denote whether the + * respective Organization should be included or excluded from the result set. Accepts up to 100 Organization IDs. */ organizationId?: WithSign[]; }>; diff --git a/packages/backend/src/api/endpoints/UserApi.ts b/packages/backend/src/api/endpoints/UserApi.ts index 06c8ae8e974..fc850bd3cc2 100644 --- a/packages/backend/src/api/endpoints/UserApi.ts +++ b/packages/backend/src/api/endpoints/UserApi.ts @@ -157,10 +157,10 @@ type UpdateUserParams = { /** If true, the user can delete themselves with the Frontend API. */ deleteSelfEnabled?: boolean; - /** If true, the user can create organizations with the Frontend API. */ + /** If true, the user can create Organizations with the Frontend API. */ createOrganizationEnabled?: boolean; - /** The maximum number of organizations the user can create. 0 means unlimited. */ + /** The maximum number of Organizations the user can create. 0 means unlimited. */ createOrganizationsLimit?: number; } & UserMetadataParams & (UserPasswordHashingParams | object); diff --git a/packages/backend/src/api/resources/CommercePlan.ts b/packages/backend/src/api/resources/CommercePlan.ts index 64bd9b5fd73..1aaa31fb02b 100644 --- a/packages/backend/src/api/resources/CommercePlan.ts +++ b/packages/backend/src/api/resources/CommercePlan.ts @@ -4,62 +4,62 @@ import { Feature } from './Feature'; import type { BillingPlanJSON } from './JSON'; /** - * 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](https://clerk.com/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](https://clerk.com/docs/reference/backend-api/tag/commerce/get/commerce/plans) and is not directly accessible from the Frontend API. * * @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. */ export class BillingPlan { constructor( /** - * The unique identifier for the plan. + * The unique identifier for the Plan. */ readonly id: string, /** - * The name of the plan. + * The name of the Plan. */ readonly name: string, /** - * The URL-friendly identifier of the plan. + * The URL-friendly identifier of the Plan. */ readonly slug: string, /** - * The description of the plan. + * The description of the Plan. */ readonly description: string | null, /** - * Whether the plan is the default plan. + * Whether the Plan is the default Plan. */ readonly isDefault: boolean, /** - * Whether the plan is recurring. + * Whether the Plan is recurring. */ readonly isRecurring: boolean, /** - * Whether the plan has a base fee. + * Whether the Plan has a base fee. */ readonly hasBaseFee: boolean, /** - * Whether the plan is displayed in the `` component. + * Whether the Plan is displayed in the `` component. */ readonly publiclyVisible: boolean, /** - * The monthly fee of the plan. + * The monthly fee of the Plan. */ readonly fee: BillingMoneyAmount, /** - * The annual fee of the plan. + * The annual fee of the Plan. */ readonly annualFee: BillingMoneyAmount | null, /** - * The annual fee of the plan on a monthly basis. + * The annual fee of the Plan on a monthly basis. */ readonly annualMonthlyFee: BillingMoneyAmount | null, /** - * The type of payer for the plan. + * The type of payer for the Plan. */ readonly forPayerType: 'org' | 'user', /** - * The features the plan offers. + * The features the Plan offers. */ readonly features: Feature[], ) {} diff --git a/packages/backend/src/api/resources/CommerceSubscriptionItem.ts b/packages/backend/src/api/resources/CommerceSubscriptionItem.ts index e1e477e0605..6d312c5675f 100644 --- a/packages/backend/src/api/resources/CommerceSubscriptionItem.ts +++ b/packages/backend/src/api/resources/CommerceSubscriptionItem.ts @@ -19,7 +19,7 @@ export class BillingSubscriptionItem { */ readonly status: BillingSubscriptionItemJSON['status'], /** - * The plan period for the subscription item. + * The Plan period for the subscription item. */ readonly planPeriod: 'month' | 'annual', /** @@ -47,11 +47,11 @@ export class BillingSubscriptionItem { */ readonly amount: BillingMoneyAmount | undefined, /** - * The plan associated with this subscription item. + * The Plan associated with this subscription item. */ readonly plan: BillingPlan | null, /** - * The plan ID. + * The Plan ID. */ readonly planId: string | null, /** diff --git a/packages/backend/src/api/resources/Feature.ts b/packages/backend/src/api/resources/Feature.ts index 819f2b4ee63..51d20c694b3 100644 --- a/packages/backend/src/api/resources/Feature.ts +++ b/packages/backend/src/api/resources/Feature.ts @@ -1,30 +1,30 @@ import type { FeatureJSON } from './JSON'; /** - * The `Feature` object represents a feature of a subscription plan. + * The `Feature` object represents a Feature of a Subscription 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. */ export class Feature { constructor( /** - * The unique identifier for the feature. + * The unique identifier for the Feature. */ readonly id: string, /** - * The name of the feature. + * The name of the Feature. */ readonly name: string, /** - * The description of the feature. + * The description of the Feature. */ readonly description: string | null, /** - * The URL-friendly identifier of the feature. + * The URL-friendly identifier of the Feature. */ readonly slug: string, /** - * The URL of the feature's avatar image. + * The URL of the Feature's avatar image. */ readonly avatarUrl: string | null, ) {} diff --git a/packages/backend/src/api/resources/JSON.ts b/packages/backend/src/api/resources/JSON.ts index 2c9ce9d30bb..4aee90821ea 100644 --- a/packages/backend/src/api/resources/JSON.ts +++ b/packages/backend/src/api/resources/JSON.ts @@ -405,19 +405,19 @@ export interface OrganizationInvitationAcceptedJSON extends OrganizationInvitati */ export interface PublicOrganizationDataJSON extends ClerkResourceJSON { /** - * The name of the organization. + * The name of the Organization. */ name: string; /** - * The slug of the organization. + * The slug of the Organization. */ slug: string; /** - * Holds the default organization profile image. Compatible with Clerk's [Image Optimization](https://clerk.com/docs/guides/development/image-optimization). + * Holds the default Organization profile image. Compatible with Clerk's [Image Optimization](https://clerk.com/docs/guides/development/image-optimization). */ image_url?: string; /** - * Whether the organization has a profile image. + * Whether the Organization has a profile image. */ has_image: boolean; } diff --git a/packages/backend/src/api/resources/Organization.ts b/packages/backend/src/api/resources/Organization.ts index 20ce86cffea..b9802082c2f 100644 --- a/packages/backend/src/api/resources/Organization.ts +++ b/packages/backend/src/api/resources/Organization.ts @@ -1,7 +1,7 @@ import type { OrganizationJSON } from './JSON'; /** - * The Backend `Organization` object is similar to the [`Organization`](https://clerk.com/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](https://clerk.com/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`](https://clerk.com/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](https://clerk.com/docs/reference/backend-api/tag/Organizations#operation/ListOrganizations){{ target: '_blank' }} and is not directly accessible from the Frontend API. */ export class Organization { private _raw: OrganizationJSON | null = null; @@ -12,31 +12,31 @@ export class Organization { constructor( /** - * The unique identifier for the organization. + * The unique identifier for the Organization. */ readonly id: string, /** - * The name of the organization. + * The name of the Organization. */ readonly name: string, /** - * The URL-friendly identifier of the user's active organization. If supplied, it must be unique for the instance. + * The URL-friendly identifier of the user's active Organization. If supplied, it must be unique for the instance. */ readonly slug: string, /** - * Holds the organization's logo. Compatible with Clerk's [Image Optimization](https://clerk.com/docs/guides/development/image-optimization). + * Holds the Organization's logo. Compatible with Clerk's [Image Optimization](https://clerk.com/docs/guides/development/image-optimization). */ readonly imageUrl: string, /** - * Whether the organization has an image. + * Whether the Organization has an image. */ readonly hasImage: boolean, /** - * The date when the organization was first created. + * The date when the Organization was first created. */ readonly createdAt: number, /** - * The date when the organization was last updated. + * The date when the Organization was last updated. */ readonly updatedAt: number, /** @@ -48,19 +48,19 @@ export class Organization { */ readonly privateMetadata: OrganizationPrivateMetadata = {}, /** - * The maximum number of memberships allowed in the organization. + * The maximum number of memberships allowed in the Organization. */ readonly maxAllowedMemberships: number, /** - * Whether the organization allows admins to delete users. + * Whether the Organization allows admins to delete users. */ readonly adminDeleteEnabled: boolean, /** - * The number of members in the organization. + * The number of members in the Organization. */ readonly membersCount?: number, /** - * The ID of the user who created the organization. + * The ID of the user who created the Organization. */ readonly createdBy?: string, ) {} diff --git a/packages/backend/src/api/resources/OrganizationInvitation.ts b/packages/backend/src/api/resources/OrganizationInvitation.ts index 60fea7cd4b4..171fd9cbeca 100644 --- a/packages/backend/src/api/resources/OrganizationInvitation.ts +++ b/packages/backend/src/api/resources/OrganizationInvitation.ts @@ -2,7 +2,7 @@ import type { OrganizationInvitationStatus, OrganizationMembershipRole } from '. import type { OrganizationInvitationJSON, PublicOrganizationDataJSON } from './JSON'; /** - * The Backend `OrganizationInvitation` object is similar to the [`OrganizationInvitation`](https://clerk.com/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](https://clerk.com/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`](https://clerk.com/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](https://clerk.com/docs/reference/backend-api/tag/Organization-Invitations#operation/CreateOrganizationInvitation){{ target: '_blank' }} and is not directly accessible from the Frontend API. */ export class OrganizationInvitation { private _raw: OrganizationInvitationJSON | null = null; @@ -21,11 +21,11 @@ export class OrganizationInvitation { */ readonly emailAddress: string, /** - * The role of the invited user. + * The Role of the invited user. */ readonly role: OrganizationMembershipRole, /** - * The name of the role of the invited user. + * The name of the Role of the invited user. */ readonly roleName: string, /** @@ -61,7 +61,7 @@ export class OrganizationInvitation { */ readonly privateMetadata: OrganizationInvitationPrivateMetadata = {}, /** - * Public data about the organization that the user is invited to. + * Public data about the Organization that the user is invited to. */ readonly publicOrganizationData?: PublicOrganizationDataJSON | null, ) {} diff --git a/packages/backend/src/api/resources/OrganizationMembership.ts b/packages/backend/src/api/resources/OrganizationMembership.ts index 9ebf11e5111..7a78240b559 100644 --- a/packages/backend/src/api/resources/OrganizationMembership.ts +++ b/packages/backend/src/api/resources/OrganizationMembership.ts @@ -3,7 +3,7 @@ import type { OrganizationMembershipRole } from './Enums'; import type { OrganizationMembershipJSON, OrganizationMembershipPublicUserDataJSON } from './JSON'; /** - * The Backend `OrganizationMembership` object is similar to the [`OrganizationMembership`](https://clerk.com/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](https://clerk.com/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`](https://clerk.com/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](https://clerk.com/docs/reference/backend-api/tag/Organization-Memberships#operation/CreateOrganizationMembership){{ target: '_blank' }} and is not directly accessible from the Frontend API. */ export class OrganizationMembership { private _raw: OrganizationMembershipJSON | null = null; @@ -18,11 +18,11 @@ export class OrganizationMembership { */ readonly id: string, /** - * The role of the user. + * The Role of the user. */ readonly role: OrganizationMembershipRole, /** - * The permissions granted to the user in the organization. + * The Permissions granted to the user in the Organization. */ readonly permissions: string[], /** @@ -42,7 +42,7 @@ export class OrganizationMembership { */ readonly updatedAt: number, /** - * The organization that the user is a member of. + * The Organization that the user is a member of. */ readonly organization: Organization, /** diff --git a/packages/backend/src/api/resources/SamlConnection.ts b/packages/backend/src/api/resources/SamlConnection.ts index 60e87bbb3d8..dafb4bd79f7 100644 --- a/packages/backend/src/api/resources/SamlConnection.ts +++ b/packages/backend/src/api/resources/SamlConnection.ts @@ -14,11 +14,11 @@ export class SamlConnection { */ readonly name: string, /** - * The domain of your organization. Sign in flows using an email with this domain will use the connection. + * The domain of your Organization. Sign in flows using an email with this domain will use the connection. */ readonly domain: string, /** - * The organization ID of the organization. + * The Organization ID of the Organization. */ readonly organizationId: string | null, /** diff --git a/packages/backend/src/api/resources/Session.ts b/packages/backend/src/api/resources/Session.ts index 95586d232da..3334ab72c22 100644 --- a/packages/backend/src/api/resources/Session.ts +++ b/packages/backend/src/api/resources/Session.ts @@ -95,7 +95,7 @@ export class Session { */ readonly updatedAt: number, /** - * The ID of the last active organization. + * The ID of the last active Organization. */ readonly lastActiveOrganizationId?: string, /** diff --git a/packages/backend/src/api/resources/User.ts b/packages/backend/src/api/resources/User.ts index df05ef53466..8cef33ca06d 100644 --- a/packages/backend/src/api/resources/User.ts +++ b/packages/backend/src/api/resources/User.ts @@ -129,11 +129,11 @@ export class User { */ readonly lastActiveAt: number | null, /** - * A boolean indicating whether the organization creation is enabled for the user or not. + * A boolean indicating whether the Organization creation is enabled for the user or not. */ readonly createOrganizationEnabled: boolean, /** - * 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`. + * 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`. */ readonly createOrganizationsLimit: number | null = null, /** diff --git a/packages/backend/src/tokens/authObjects.ts b/packages/backend/src/tokens/authObjects.ts index 5f359d73ca3..a7ce48ca0f3 100644 --- a/packages/backend/src/tokens/authObjects.ts +++ b/packages/backend/src/tokens/authObjects.ts @@ -51,7 +51,7 @@ export type SignedInAuthObject = SharedSignedInAuthObjectProperties & { */ getToken: ServerGetToken; /** - * A function that checks if the user has an organization role or custom permission. + * A function that checks if the user has an Organization Role or Custom Permission. */ has: CheckAuthorizationFromSessionClaims; /** diff --git a/packages/backend/src/tokens/types.ts b/packages/backend/src/tokens/types.ts index dab308d6d94..cc34f1bfbda 100644 --- a/packages/backend/src/tokens/types.ts +++ b/packages/backend/src/tokens/types.ts @@ -53,9 +53,9 @@ export type AuthenticateRequestOptions = { */ afterSignUpUrl?: string; /** - * Used to activate a specific [organization](https://clerk.com/docs/guides/organizations/overview) or [personal account](https://clerk.com/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. + * Used to activate a specific [Organization](https://clerk.com/docs/guides/organizations/overview) or [Personal Account](https://clerk.com/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). + * 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?: OrganizationSyncOptions; /** @@ -79,13 +79,13 @@ export type AuthenticateRequestOptions = { */ export type OrganizationSyncOptions = { /** - * 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. + * 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). + * 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 [``](https://clerk.com/docs/reference/components/organization/organization-switcher). + * 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 [``](https://clerk.com/docs/reference/components/organization/organization-switcher). * * @example * ["/orgs/:slug", "/orgs/:slug/(.*)"] @@ -97,7 +97,7 @@ export type OrganizationSyncOptions = { organizationPatterns?: Pattern[]; /** - * URL patterns for resources that exist within the context of a [Clerk Personal Account](https://clerk.com/docs/guides/dashboard/overview) (user-specific, outside any organization). + * URL patterns for resources that exist within the context of a [Clerk Personal Account](https://clerk.com/docs/guides/dashboard/overview) (user-specific, outside any Organization). * * If the route also matches the `organizationPattern` prop, the `organizationPattern` prop takes precedence. * @@ -149,7 +149,7 @@ export type OrganizationSyncTargetMatchers = { }; /** - * 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. */ export type OrganizationSyncTarget = diff --git a/packages/clerk-js/src/ui/components/CreateOrganization/CreateOrganizationForm.tsx b/packages/clerk-js/src/ui/components/CreateOrganization/CreateOrganizationForm.tsx index 2be4066ea4d..d870a0c65e5 100644 --- a/packages/clerk-js/src/ui/components/CreateOrganization/CreateOrganizationForm.tsx +++ b/packages/clerk-js/src/ui/components/CreateOrganization/CreateOrganizationForm.tsx @@ -37,7 +37,7 @@ type CreateOrganizationFormProps = { /** * @deprecated * This prop will be removed in a future version. - * Configure whether organization slug is enabled via the Clerk Dashboard under Organization Settings. + * Configure whether Organization slug is enabled via the Clerk Dashboard under Organization Settings. */ hideSlug?: boolean; }; diff --git a/packages/clerk-js/src/ui/components/OrganizationProfile/InviteMembersForm.tsx b/packages/clerk-js/src/ui/components/OrganizationProfile/InviteMembersForm.tsx index 2a1d0dad1a5..ff3f967ba87 100644 --- a/packages/clerk-js/src/ui/components/OrganizationProfile/InviteMembersForm.tsx +++ b/packages/clerk-js/src/ui/components/OrganizationProfile/InviteMembersForm.tsx @@ -224,8 +224,8 @@ const AsyncRoleSelect = (field: ReturnType>) => { }; /** - * Determines default role from the organization settings or fallback to - * the only available role. + * Determines default Role from the Organization settings or fallback to + * the only available Role. */ const useDefaultRole = () => { const { options } = useFetchRoles(); diff --git a/packages/clerk-js/src/ui/components/OrganizationProfile/MembersSearch.tsx b/packages/clerk-js/src/ui/components/OrganizationProfile/MembersSearch.tsx index 845c521e693..0a78ae704e9 100644 --- a/packages/clerk-js/src/ui/components/OrganizationProfile/MembersSearch.tsx +++ b/packages/clerk-js/src/ui/components/OrganizationProfile/MembersSearch.tsx @@ -21,7 +21,7 @@ type MembersSearchProps = { */ value: string; /** - * Paginated organization memberships + * Paginated Organization memberships */ memberships: ReturnType['memberships']; /** diff --git a/packages/clerk-js/src/ui/hooks/useFetchRoles.ts b/packages/clerk-js/src/ui/hooks/useFetchRoles.ts index 5e572365840..4e50dfd4dc8 100644 --- a/packages/clerk-js/src/ui/hooks/useFetchRoles.ts +++ b/packages/clerk-js/src/ui/hooks/useFetchRoles.ts @@ -8,8 +8,8 @@ import { useFetch } from './useFetch'; const getRolesParams = { /** - * Fetch at most 20 roles, it is not expected for an app to have more. - * We also prevent the creation of more than 20 roles in dashboard. + * Fetch at most 20 Roles, it is not expected for an app to have more. + * We also prevent the creation of more than 20 Roles in dashboard. */ pageSize: 20, }; diff --git a/packages/clerk-js/src/utils/organization.ts b/packages/clerk-js/src/utils/organization.ts index 5106fb93d9f..045f04ecafb 100644 --- a/packages/clerk-js/src/utils/organization.ts +++ b/packages/clerk-js/src/utils/organization.ts @@ -1,5 +1,5 @@ /** - * Checks and assumes a string is an organization ID if it starts with 'org_', specifically for + * Checks and assumes a string is an Organization ID if it starts with 'org_', specifically for * disambiguating with slugs. `_` is a disallowed character in slug names, so slugs cannot * start with `org_`. */ diff --git a/packages/react-router/src/server/types.ts b/packages/react-router/src/server/types.ts index 9c4725a9689..4bda2cb5d9f 100644 --- a/packages/react-router/src/server/types.ts +++ b/packages/react-router/src/server/types.ts @@ -37,9 +37,9 @@ export type ClerkMiddlewareOptions = { signInUrl?: string; signUpUrl?: string; /** - * Used to activate a specific [organization](https://clerk.com/docs/guides/organizations/overview) or [personal account](https://clerk.com/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. + * Used to activate a specific [Organization](https://clerk.com/docs/guides/organizations/overview) or [Personal Account](https://clerk.com/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). + * 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?: OrganizationSyncOptions; } & Pick & diff --git a/packages/react/src/components/SubscriptionDetailsButton.tsx b/packages/react/src/components/SubscriptionDetailsButton.tsx index 56baa0eaed1..6bc06fdd3b6 100644 --- a/packages/react/src/components/SubscriptionDetailsButton.tsx +++ b/packages/react/src/components/SubscriptionDetailsButton.tsx @@ -21,7 +21,7 @@ import { withClerk } from './withClerk'; * ); * } * - * // Custom button with organization subscription + * // Custom button with Organization Subscription * function OrganizationSubscriptionDetails() { * return ( * ` component - * @throws {Error} When `for="organization"` is used without an active organization context + * @throws {Error} When `for="organization"` is used without an Active Organization context * * @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. */ diff --git a/packages/react/src/hooks/useAuth.ts b/packages/react/src/hooks/useAuth.ts index ba0da72f9cf..43f65a6d53f 100644 --- a/packages/react/src/hooks/useAuth.ts +++ b/packages/react/src/hooks/useAuth.ts @@ -133,7 +133,7 @@ export const useAuth = (initialAuthStateOrOptions: UseAuthOptions = {}): UseAuth * @remarks * This hook inspects session, user, and organization information to determine the current authentication state. * It returns an object that includes various properties such as whether the state is loaded, if a user is signed in, - * session and user identifiers, organization roles, and a `has` function for authorization checks. + * session and user identifiers, Organization Roles, and a `has` function for authorization checks. * Additionally, it provides `signOut` and `getToken` functions if applicable. * * @example diff --git a/packages/shared/src/authorization.ts b/packages/shared/src/authorization.ts index 6eec50565e6..2ed3abbdce1 100644 --- a/packages/shared/src/authorization.ts +++ b/packages/shared/src/authorization.ts @@ -73,9 +73,9 @@ const isValidVerificationType = (type: any) => ALLOWED_TYPES.has(type); const prefixWithOrg = (value: string) => value.replace(/^(org:)*/, 'org:'); /** - * Checks if a user has the required organization-level authorization. - * Verifies if the user has the specified role or permission within their organization. - * @returns null, if unable to determine due to missing data or unspecified role/permission. + * Checks if a user has the required Organization-level authorization. + * Verifies if the user has the specified Role or Permission within their Organization. + * @returns null, if unable to determine due to missing data or unspecified Role/Permission. */ const checkOrgAuthorization: CheckOrgAuthorization = (params, options) => { const { orgId, orgRole, orgPermissions } = options; diff --git a/packages/shared/src/organization.ts b/packages/shared/src/organization.ts index 12d8ea0689e..04071635de4 100644 --- a/packages/shared/src/organization.ts +++ b/packages/shared/src/organization.ts @@ -1,10 +1,10 @@ import type { OrganizationMembershipResource } from './types'; /** - * Finds the organization membership for a given organization ID from a list of memberships - * @param organizationMemberships - Array of organization memberships to search through - * @param organizationId - ID of the organization to find the membership for - * @returns The matching organization membership or undefined if not found + * Finds the Organization membership for a given Organization ID from a list of memberships + * @param organizationMemberships - Array of Organization memberships to search through + * @param organizationId - ID of the Organization to find the membership for + * @returns The matching Organization membership or undefined if not found */ export function getCurrentOrganizationMembership( organizationMemberships: OrganizationMembershipResource[], diff --git a/packages/shared/src/react/commerce.tsx b/packages/shared/src/react/commerce.tsx index 5d5e59e0906..faeecabb2ff 100644 --- a/packages/shared/src/react/commerce.tsx +++ b/packages/shared/src/react/commerce.tsx @@ -169,7 +169,7 @@ export type PaymentElementProviderProps = { */ stripeAppearance?: internalStripeAppearance; /** - * Specifies whether to fetch for the current user or organization. + * Specifies whether to fetch for the current user or Organization. * * @default 'user' */ diff --git a/packages/shared/src/react/contexts.tsx b/packages/shared/src/react/contexts.tsx index 8e9e11a75c8..65abac89866 100644 --- a/packages/shared/src/react/contexts.tsx +++ b/packages/shared/src/react/contexts.tsx @@ -30,17 +30,17 @@ const OptionsContext = React.createContext({}); */ export type UseCheckoutOptions = { /** - * Specifies if the checkout is for an organization. + * Specifies if the checkout is for an Organization. * * @default 'user' */ for?: ForPayerType; /** - * The billing period for the plan. + * The billing period for the Plan. */ 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/createBillingPaginatedHook.tsx b/packages/shared/src/react/hooks/createBillingPaginatedHook.tsx index 8af8b6c3956..a00983889e0 100644 --- a/packages/shared/src/react/hooks/createBillingPaginatedHook.tsx +++ b/packages/shared/src/react/hooks/createBillingPaginatedHook.tsx @@ -49,7 +49,7 @@ export interface HookParams } > { /** - * Specifies whether to fetch for the current user or organization. + * Specifies whether to fetch for the current user or Organization. * * @default 'user' */ @@ -58,7 +58,7 @@ export interface HookParams /** * A hook factory that creates paginated data fetching hooks for commerce-related resources. - * It provides a standardized way to create hooks that can fetch either user or organization resources + * It provides a standardized way to create hooks that can fetch either user or Organization resources * with built-in pagination support. * * The generated hooks handle: diff --git a/packages/shared/src/react/hooks/useOrganization.tsx b/packages/shared/src/react/hooks/useOrganization.tsx index 3def03a8a6c..48be42320fb 100644 --- a/packages/shared/src/react/hooks/useOrganization.tsx +++ b/packages/shared/src/react/hooks/useOrganization.tsx @@ -29,7 +29,7 @@ export type UseOrganizationParams = { * 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](https://clerk.com/docs/guides/organizations/verified-domains#enrollment-mode).
  • + *
  • `enrollmentMode`: A string that filters the domains by the provided [enrollment mode](https://clerk.com/docs/guides/organizations/add-members/verified-domains#enrollment-mode).
  • *
  • Any of the properties described in [Shared properties](#shared-properties).
  • *
*/ @@ -74,27 +74,27 @@ export type UseOrganizationReturn = */ isLoaded: false; /** - * The currently active organization. + * The currently Active Organization. */ organization: undefined; /** - * The current organization membership. + * The current Organization membership. */ membership: undefined; /** - * Includes a paginated list of the organization's domains. + * Includes a paginated list of the Organization's domains. */ domains: PaginatedResourcesWithDefault; /** - * Includes a paginated list of the organization's membership requests. + * Includes a paginated list of the Organization's membership requests. */ membershipRequests: PaginatedResourcesWithDefault; /** - * Includes a paginated list of the organization's memberships. + * Includes a paginated list of the Organization's memberships. */ memberships: PaginatedResourcesWithDefault; /** - * Includes a paginated list of the organization's invitations. + * Includes a paginated list of the Organization's invitations. */ invitations: PaginatedResourcesWithDefault; } @@ -148,7 +148,7 @@ const undefinedPaginatedResource = { } as const; /** - * The `useOrganization()` hook retrieves attributes of the currently active organization. + * The `useOrganization()` hook retrieves attributes of the currently Active Organization. * * @example * ### Expand and paginate attributes @@ -183,7 +183,7 @@ const undefinedPaginatedResource = { * @example * ### 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' @@ -227,7 +227,7 @@ const undefinedPaginatedResource = { * @example * ### 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. * diff --git a/packages/shared/src/react/hooks/useOrganizationList.tsx b/packages/shared/src/react/hooks/useOrganizationList.tsx index acf587991a7..5f575606798 100644 --- a/packages/shared/src/react/hooks/useOrganizationList.tsx +++ b/packages/shared/src/react/hooks/useOrganizationList.tsx @@ -82,19 +82,19 @@ export type UseOrganizationListReturn = */ createOrganization: undefined; /** - * A function that sets the active session and/or organization. + * A function that sets the active session and/or Organization. */ setActive: undefined; /** - * Returns `PaginatedResources` which includes a list of the user's organization memberships. + * Returns `PaginatedResources` which includes a list of the user's Organization memberships. */ userMemberships: PaginatedResourcesWithDefault; /** - * Returns `PaginatedResources` which includes a list of the user's organization invitations. + * Returns `PaginatedResources` which includes a list of the user's Organization invitations. */ userInvitations: PaginatedResourcesWithDefault; /** - * Returns `PaginatedResources` which includes a list of suggestions for organizations that the user can join. + * Returns `PaginatedResources` which includes a list of suggestions for Organizations that the user can join. */ userSuggestions: PaginatedResourcesWithDefault; } @@ -152,7 +152,7 @@ export type UseOrganizationListReturn = * @example * ### 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' diff --git a/packages/shared/src/react/hooks/useSubscription.types.ts b/packages/shared/src/react/hooks/useSubscription.types.ts index d6c1ab2834e..462509b1632 100644 --- a/packages/shared/src/react/hooks/useSubscription.types.ts +++ b/packages/shared/src/react/hooks/useSubscription.types.ts @@ -5,7 +5,7 @@ import type { BillingSubscriptionResource, ForPayerType } from '../../types'; */ export type UseSubscriptionParams = { /** - * Specifies whether to fetch the subscription for an organization or a user. + * Specifies whether to fetch the Subscription for an Organization or a user. * * @default 'user' */ diff --git a/packages/shared/src/types/authObject.ts b/packages/shared/src/types/authObject.ts index 116c4f177bf..4d7658a3271 100644 --- a/packages/shared/src/types/authObject.ts +++ b/packages/shared/src/types/authObject.ts @@ -26,19 +26,19 @@ export type SharedSignedInAuthObjectProperties = { */ userId: string; /** - * The ID of the user's active organization. + * The ID of the user's Active Organization. */ orgId: string | undefined; /** - * The current user's role in their active organization. + * The current user's Role in their Active Organization. */ orgRole: OrganizationCustomRoleKey | undefined; /** - * The URL-friendly identifier of the user's active organization. + * The URL-friendly identifier of the user's Active Organization. */ orgSlug: string | undefined; /** - * The current user's active organization permissions. + * The current user's Organization Permissions. */ orgPermissions: OrganizationCustomPermissionKey[] | undefined; /** diff --git a/packages/shared/src/types/billing.ts b/packages/shared/src/types/billing.ts index 33e1238a045..26f11f7e4ea 100644 --- a/packages/shared/src/types/billing.ts +++ b/packages/shared/src/types/billing.ts @@ -4,7 +4,7 @@ import type { ClerkResource } from './resource'; type WithOptionalOrgType = T & { /** - * The organization ID to perform the request on. + * The Organization ID to perform the request on. */ orgId?: string; }; @@ -76,7 +76,7 @@ export type ForPayerType = 'organization' | 'user'; export type BillingSubscriptionStatus = 'active' | 'ended' | 'upcoming' | 'past_due'; /** - * The billing period for the plan. + * The billing period for the Plan. * * @inline */ @@ -107,109 +107,109 @@ export interface BillingPayerMethods { */ export type GetPlansParams = ClerkPaginationParams<{ /** - * The type of payer for the plans. + * The type of payer for the Plans. */ for?: ForPayerType; }>; /** - * The `BillingPlanResource` type represents a subscription plan with its details. + * The `BillingPlanResource` type represents a Subscription Plan with its details. * * @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. */ export interface BillingPlanResource extends ClerkResource { /** - * The unique identifier for the plan. + * The unique identifier for the Plan. */ id: string; /** - * The name of the plan. + * The name of the Plan. */ name: string; /** - * The monthly price of the plan. + * The monthly price of the Plan. */ fee: BillingMoneyAmount; /** - * The annual price of the plan or `null` if the plan is not annual. + * The annual price of the Plan or `null` if the Plan is not annual. */ annualFee: BillingMoneyAmount | null; /** - * The effective monthly price when billed annually or `null` if the plan is not annual. + * The effective monthly price when billed annually or `null` if the Plan is not annual. */ annualMonthlyFee: BillingMoneyAmount | null; /** - * A short description of what the plan offers, or `null` if no description is provided. + * A short description of what the Plan offers, or `null` if no description is provided. */ description: string | null; /** - * Whether the plan is the default plan. + * Whether the Plan is the default Plan. */ isDefault: boolean; /** - * Whether the plan is recurring. + * Whether the Plan is recurring. */ isRecurring: boolean; /** - * Whether the plan has a base fee. + * Whether the Plan has a base fee. */ hasBaseFee: boolean; /** - * Specifies the subscriber type this plan is designed for. + * 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. + * Each Plan is exclusively created for either individual users or Organizations, and cannot be used interchangeably. */ forPayerType: BillingPayerResourceType; /** - * Whether the plan is visible to the public. + * Whether the Plan is visible to the public. */ publiclyVisible: boolean; /** - * The URL-friendly identifier of the plan. + * The URL-friendly identifier of the Plan. */ slug: string; /** - * The URL of the plan's avatar image, or `null` if not set. + * The URL of the Plan's avatar image, or `null` if not set. */ avatarUrl: string | null; /** - * The features the plan offers. + * The Features the Plan offers. */ features: FeatureResource[]; /** - * The number of days of the free trial for the plan. `null` if the plan does not have a free trial. + * The number of days of the free trial for the Plan. `null` if the Plan does not have a free trial. */ freeTrialDays: number | null; /** - * Whether the plan has a free trial. + * Whether the Plan has a free trial. */ freeTrialEnabled: boolean; } /** - * The `FeatureResource` type represents a feature of a plan. + * The `FeatureResource` type represents a Feature of 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. */ export interface FeatureResource extends ClerkResource { /** - * The unique identifier for the feature. + * The unique identifier for the Feature. */ id: string; /** - * The display name of the feature. + * The display name of the Feature. */ name: string; /** - * A short description of what the feature provides, or `null` if not provided. + * A short description of what the Feature provides, or `null` if not provided. */ description: string | null; /** - * A unique, URL-friendly identifier for the feature. + * A unique, URL-friendly identifier for the Feature. */ slug: string; /** - * The URL of the feature's avatar image, or `null` if not set. + * The URL of the Feature's avatar image, or `null` if not set. */ avatarUrl: string | null; } @@ -324,7 +324,7 @@ export interface BillingPaymentMethodResource extends ClerkResource { /** * 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.
  • + *
  • `orgId?` (`string`): The ID of the Organization to remove the payment method from.
  • *
* * @param params - The parameters for the remove operation. @@ -334,7 +334,7 @@ export interface BillingPaymentMethodResource extends ClerkResource { /** * 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.
  • + *
  • `orgId?` (`string`): The ID of the Organization to set as the default.
  • *
* * @param params - The parameters for the make default operation. @@ -376,7 +376,7 @@ export type BillingPaymentChargeType = 'checkout' | 'recurring'; export type BillingPaymentStatus = 'pending' | 'paid' | 'failed'; /** - * The `BillingPaymentResource` type represents a payment attempt for a user or organization. + * The `BillingPaymentResource` type represents a payment attempt for a user or Organization. * * @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. */ @@ -438,7 +438,7 @@ export type GetStatementsParams = WithOptionalOrgType; export type BillingStatementStatus = 'open' | 'closed'; /** - * The `BillingStatementResource` type represents a billing statement for a user or organization. + * The `BillingStatementResource` type represents a billing statement for a user or Organization. * * @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. */ @@ -504,7 +504,7 @@ export interface BillingSubscriptionItemResource extends ClerkResource { */ id: string; /** - * The plan associated with the subscription item. + * The Plan associated with the subscription item. */ plan: BillingPlanResource; /** @@ -551,7 +551,7 @@ export interface BillingSubscriptionItemResource extends ClerkResource { /** * A function to cancel the subscription item. Accepts the following parameters: *
    - *
  • `orgId?` (`string`): The ID of the organization to cancel the subscription item from.
  • + *
  • `orgId?` (`string`): The ID of the Organization to cancel the subscription item from.
  • *
* * @param params - The parameters for the cancel operation. @@ -652,7 +652,7 @@ export interface BillingMoneyAmount { */ export interface BillingCheckoutTotals { /** - * The price of the items or plan before taxes, credits, or discounts are applied. + * The price of the items or Plan before taxes, credits, or discounts are applied. */ subtotal: BillingMoneyAmount; /** @@ -688,7 +688,7 @@ export interface BillingCheckoutTotals { */ export interface BillingStatementTotals { /** - * The price of the items or plan before taxes, credits, or discounts are applied. + * The price of the items or Plan before taxes, credits, or discounts are applied. */ subtotal: BillingMoneyAmount; /** @@ -708,11 +708,11 @@ export interface BillingStatementTotals { */ export type CreateCheckoutParams = WithOptionalOrgType<{ /** - * The unique identifier for the plan. + * The unique identifier for the Plan. */ planId: string; /** - * The billing period for the plan. + * The billing period for the Plan. */ planPeriod: BillingSubscriptionPlanPeriod; }>; @@ -776,15 +776,15 @@ export interface BillingCheckoutResource extends ClerkResource { */ paymentMethod?: BillingPaymentMethodResource; /** - * The subscription plan details for the checkout. + * The Subscription Plan details for the checkout. */ plan: BillingPlanResource; /** - * The billing period for the plan. + * The billing period for the Plan. */ planPeriod: BillingSubscriptionPlanPeriod; /** - * The start date of the plan period, represented as a Unix timestamp. + * The start date of the Plan period, represented as a Unix timestamp. */ planPeriodStart?: number; /** @@ -800,7 +800,7 @@ export interface BillingCheckoutResource extends ClerkResource { */ confirm: (params: ConfirmCheckoutParams) => Promise; /** - * Whether the plan change will take effect immediately after checkout. + * Whether the Plan change will take effect immediately after checkout. */ isImmediatePlanChange: boolean; /** @@ -856,11 +856,11 @@ export interface BillingPayerResource extends ClerkResource { */ lastName?: string | null; /** - * The unique identifier for the organization that the payer belongs to. + * The unique identifier for the Organization that the payer belongs to. */ organizationId: string | null; /** - * The name of the organization that the payer belongs to. + * The name of the Organization that the payer belongs to. */ organizationName?: string | null; } diff --git a/packages/shared/src/types/clerk.ts b/packages/shared/src/types/clerk.ts index b37e7d0a8a8..be979582c91 100644 --- a/packages/shared/src/types/clerk.ts +++ b/packages/shared/src/types/clerk.ts @@ -473,7 +473,7 @@ export interface Clerk { unmountUserProfile: (targetNode: HTMLDivElement) => void; /** - * Mount an organization profile component at the target element. + * Mount an Organization profile component at the target element. * * @param targetNode - Target to mount the OrganizationProfile component. * @param props - Configuration parameters. @@ -481,7 +481,7 @@ export interface Clerk { mountOrganizationProfile: (targetNode: HTMLDivElement, props?: OrganizationProfileProps) => void; /** - * Unmount the organization profile component from the target node. + * Unmount the Organization profile component from the target node. * * @param targetNode - Target node to unmount the OrganizationProfile component from. */ @@ -503,7 +503,7 @@ export interface Clerk { unmountCreateOrganization: (targetNode: HTMLDivElement) => void; /** - * Mount an organization switcher component at the target element. + * Mount an Organization switcher component at the target element. * * @param targetNode - Target to mount the OrganizationSwitcher component. * @param props - Configuration parameters. @@ -511,14 +511,14 @@ export interface Clerk { mountOrganizationSwitcher: (targetNode: HTMLDivElement, props?: OrganizationSwitcherProps) => void; /** - * Unmount the organization profile component from the target node.* + * Unmount the Organization switcher component from the target node.* * * @param targetNode - Target node to unmount the OrganizationSwitcher component from. */ unmountOrganizationSwitcher: (targetNode: HTMLDivElement) => void; /** - * Prefetches the data displayed by an organization switcher. + * Prefetches the data displayed by an Organization switcher. * It can be used when `mountOrganizationSwitcher({ asStandalone: true})`, to avoid unwanted loading states. * * @experimental This experimental API is subject to change. @@ -528,7 +528,7 @@ export interface Clerk { __experimental_prefetchOrganizationSwitcher: () => void; /** - * Mount an organization list component at the target element. + * Mount an Organization list component at the target element. * * @param targetNode - Target to mount the OrganizationList component. * @param props - Configuration parameters. @@ -536,7 +536,7 @@ export interface Clerk { mountOrganizationList: (targetNode: HTMLDivElement, props?: OrganizationListProps) => void; /** - * Unmount the organization list component from the target node.* + * Unmount the Organization list component from the target node.* * * @param targetNode - Target node to unmount the OrganizationList component from. */ @@ -675,7 +675,7 @@ export interface Clerk { __internal_addNavigationListener: (callback: () => void) => UnsubscribeCallback; /** - * Set the active session and organization explicitly. + * 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. @@ -882,12 +882,12 @@ export interface Clerk { ) => Promise; /** - * Creates an organization, adding the current user as admin. + * Creates an Organization, adding the current user as admin. */ createOrganization: (params: CreateOrganizationParams) => Promise; /** - * Retrieves a single organization by id. + * Retrieves a single Organization by ID. */ getOrganization: (organizationId: string) => Promise; @@ -1272,24 +1272,24 @@ export type SetActiveParams = { session?: SignedInSessionResource | string | null; /** - * 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. + * 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. */ organization?: OrganizationResource | string | null; /** * @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. + * 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. */ beforeEmit?: BeforeEmitCallback; /** - * The full URL or path to redirect to just before the session and/or organization is set. + * The full URL or path to redirect to just before the session and/or Organization is set. */ redirectUrl?: string; /** - * A custom navigation function to be called just before the session and/or organization is set. + * 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. * @@ -1581,7 +1581,7 @@ export type UserProfileModalProps = WithoutRouting; export type OrganizationProfileProps = RoutingOptions & { /** - * Full URL or path to navigate to after the user leaves the currently active organization. + * Full URL or path to navigate to after the user leaves the currently Active Organization. * * @default undefined */ @@ -1597,7 +1597,7 @@ export type OrganizationProfileProps = RoutingOptions & { */ customPages?: CustomPage[]; /** - * Specify on which page the organization profile modal will open. + * Specify on which page the Organization profile modal will open. * * @example __experimental_startPath: '/organization-members' * @@ -1624,7 +1624,7 @@ export type OrganizationProfileModalProps = WithoutRouting string) | LooseExtractedParams>; /** - * Hides the screen for sending invitations after an organization is created. + * Hides the screen for sending invitations after an Organization is created. * * @default undefined When left undefined Clerk will automatically hide the screen if * the number of max allowed members is equal to 1 @@ -1764,16 +1764,16 @@ export type OrganizationSwitcherProps = CreateOrganizationMode & __experimental_asStandalone?: boolean | ((opened: boolean) => void); /** - * By default, users can switch between organization and their personal account. + * By default, users can switch between Organization and their personal account. * This option controls whether OrganizationSwitcher will include the user's personal account - * in the organization list. Setting this to `false` will hide the personal account entry, - * and users will only be able to switch between organizations. + * in the Organization list. Setting this to `false` will hide the personal account entry, + * and users will only be able to switch between Organizations. * * @default true */ hidePersonal?: boolean; /** - * Full URL or path to navigate to after a successful organization switch. + * Full URL or path to navigate to after a successful Organization switch. * * @default undefined * @@ -1781,7 +1781,7 @@ export type OrganizationSwitcherProps = CreateOrganizationMode & */ afterSwitchOrganizationUrl?: string; /** - * Full URL or path to navigate to after creating a new organization. + * Full URL or path to navigate to after creating a new Organization. * * @default undefined */ @@ -1789,7 +1789,7 @@ export type OrganizationSwitcherProps = CreateOrganizationMode & | ((organization: OrganizationResource) => string) | LooseExtractedParams>; /** - * Full URL or path to navigate to after a successful organization selection. + * Full URL or path to navigate to after a successful Organization selection. * Accepts a function that returns URL or path * * @default undefined` @@ -1805,13 +1805,13 @@ export type OrganizationSwitcherProps = CreateOrganizationMode & */ afterSelectPersonalUrl?: ((user: UserResource) => string) | LooseExtractedParams>; /** - * Full URL or path to navigate to after the user leaves the currently active organization. + * Full URL or path to navigate to after the user leaves the currently Active Organization. * * @default undefined */ afterLeaveOrganizationUrl?: string; /** - * Hides the screen for sending invitations after an organization is created. + * Hides the screen for sending invitations after an Organization is created. * * @default undefined When left undefined Clerk will automatically hide the screen if * the number of max allowed members is equal to 1 @@ -1820,7 +1820,7 @@ export type OrganizationSwitcherProps = CreateOrganizationMode & /** * @deprecated * This prop will be removed in a future version. - * Configure whether organization slug is enabled via the Clerk Dashboard under Organization Settings. + * Configure whether Organization slug is enabled via the Clerk Dashboard under Organization Settings. */ hideSlug?: boolean; /** @@ -1838,7 +1838,7 @@ export type OrganizationSwitcherProps = CreateOrganizationMode & export type OrganizationListProps = { /** - * Full URL or path to navigate to after creating a new organization. + * Full URL or path to navigate to after creating a new Organization. * * @default undefined */ @@ -1846,7 +1846,7 @@ export type OrganizationListProps = { | ((organization: OrganizationResource) => string) | LooseExtractedParams>; /** - * Full URL or path to navigate to after a successful organization selection. + * Full URL or path to navigate to after a successful Organization selection. * Accepts a function that returns URL or path * * @default undefined` @@ -1861,17 +1861,17 @@ export type OrganizationListProps = { */ appearance?: OrganizationListTheme; /** - * Hides the screen for sending invitations after an organization is created. + * Hides the screen for sending invitations after an Organization is created. * * @default undefined When left undefined Clerk will automatically hide the screen if * the number of max allowed members is equal to 1 */ skipInvitationScreen?: boolean; /** - * By default, users can switch between organization and their personal account. + * By default, users can switch between Organization and their personal account. * This option controls whether OrganizationList will include the user's personal account - * in the organization list. Setting this to `false` will hide the personal account entry, - * and users will only be able to switch between organizations. + * in the Organization list. Setting this to `false` will hide the personal account entry, + * and users will only be able to switch between Organizations. * * @default true */ @@ -1886,7 +1886,7 @@ export type OrganizationListProps = { /** * @deprecated * This prop will be removed in a future version. - * Configure whether organization slug is enabled via the Clerk Dashboard under Organization Settings. + * Configure whether Organization slug is enabled via the Clerk Dashboard under Organization Settings. */ hideSlug?: boolean; }; @@ -1918,7 +1918,7 @@ type PricingTableDefaultProps = { */ ctaPosition?: 'top' | 'bottom'; /** - * Whether to collapse features on the pricing table. + * Whether to collapse Features on the pricing table. * * @default false */ @@ -1934,7 +1934,7 @@ type PricingTableDefaultProps = { type PricingTableBaseProps = { /** * The subscriber type to display plans for. - * If `organization`, show plans for the active organization; otherwise for the user. + * If `organization`, show Plans for the Active Organization; otherwise for the user. * * @default 'user' */ @@ -2046,7 +2046,7 @@ export type __internal_PlanDetailsProps = ( } | { /** - * The plan object will be used as initial data until the plan is fetched from the server. + * The Plan object will be used as initial data until the Plan is fetched from the server. */ plan: BillingPlanResource; planId?: never; @@ -2068,7 +2068,7 @@ export type __experimental_PlanDetailsButtonProps = ( } | { /** - * The plan object will be used as initial data until the plan is fetched from the server. + * The Plan object will be used as initial data until the Plan is fetched from the server. */ plan: BillingPlanResource; planId?: never; @@ -2088,7 +2088,7 @@ export type __experimental_PlanDetailsButtonProps = ( export type __internal_SubscriptionDetailsProps = { /** * The subscriber type to display the subscription details for. - * If `organization` is provided, the subscription details will be displayed for the active organization. + * If `organization` is provided, the subscription details will be displayed for the Active Organization. * * @default 'user' */ @@ -2105,7 +2105,7 @@ export type __internal_SubscriptionDetailsProps = { export type __experimental_SubscriptionDetailsButtonProps = { /** * The subscriber type to display the subscription details for. - * If `organization` is provided, the subscription details will be displayed for the active organization. + * If `organization` is provided, the subscription details will be displayed for the Active Organization. * * @default 'user' */ @@ -2233,11 +2233,11 @@ export type CreateBulkOrganizationInvitationParams = { */ export interface CreateOrganizationParams { /** - * The name of the organization. + * The name of the Organization. */ name: string; /** - * The slug of the organization. + * The slug of the Organization. */ slug?: string; } diff --git a/packages/shared/src/types/hooks.ts b/packages/shared/src/types/hooks.ts index 6c814689fe3..d0927ec8738 100644 --- a/packages/shared/src/types/hooks.ts +++ b/packages/shared/src/types/hooks.ts @@ -50,19 +50,19 @@ export type UseAuthReturn = */ actor: undefined; /** - * The ID of the user's active organization. + * The ID of the user's active Organization. */ orgId: undefined; /** - * The current user's role in their active organization. + * The current user's Role in their active Organization. */ orgRole: undefined; /** - * The URL-friendly identifier of the user's active organization. + * The URL-friendly identifier of the user's Active Organization. */ orgSlug: undefined; /** - * A function that checks if the user has specific permissions or roles. See the [reference doc](https://clerk.com/docs/reference/backend/types/auth-object#has). + * A function that checks if the user has specific Permissions or Roles. See the [reference doc](https://clerk.com/docs/reference/backend/types/auth-object#has). */ has: CheckAuthorizationSignedOut; /** @@ -208,7 +208,7 @@ export type UseSessionListReturn = */ sessions: undefined; /** - * A function that sets the active session and/or organization. See the [reference doc](https://clerk.com/docs/reference/javascript/clerk#set-active). + * A function that sets the active session and/or Organization. See the [reference doc](https://clerk.com/docs/reference/javascript/clerk#set-active). */ setActive: undefined; } diff --git a/packages/shared/src/types/jwt.ts b/packages/shared/src/types/jwt.ts index e2dcc9f2b83..87712d979dd 100644 --- a/packages/shared/src/types/jwt.ts +++ b/packages/shared/src/types/jwt.ts @@ -82,17 +82,17 @@ export interface ClerkJWTClaims { act?: ActClaim; /** - * Active organization ID. + * Active Organization ID. */ org_id?: string; /** - * Active organization slug. + * Active Organization Slug. */ org_slug?: string; /** - * Active organization role. + * Active Organization Role. */ org_role?: OrganizationCustomRoleKey; diff --git a/packages/shared/src/types/jwtv2.ts b/packages/shared/src/types/jwtv2.ts index ce475d9f5ca..88f6b94c5c6 100644 --- a/packages/shared/src/types/jwtv2.ts +++ b/packages/shared/src/types/jwtv2.ts @@ -107,22 +107,22 @@ export type VersionedJwtPayload = /** * - * Active organization permissions. + * Active Organization Permissions. */ org_permissions?: OrganizationCustomPermissionKey[]; /** - * Active organization ID. + * Active Organization ID. */ org_id?: string; /** - * Active organization slug. + * Active Organization slug. */ org_slug?: string; /** - * Active organization role. + * Active Organization Role. */ org_role?: OrganizationCustomRoleKey; } @@ -145,28 +145,28 @@ export type VersionedJwtPayload = pla?: string; /** - * Active organization information. + * Active Organization information. * * @experimental This structure is subject to change. */ o?: { /** - * Active organization ID. + * Active Organization ID. */ id: string; /** - * Active organization slug. + * Active Organization slug. */ slg?: string; /** - * Active organization role. + * Active Organization role. */ rol?: OrganizationCustomRoleKey; /** - * Active organization permissions. + * Active Organization permissions. */ per?: string; diff --git a/packages/shared/src/types/localization.ts b/packages/shared/src/types/localization.ts index 0906135f765..5ba5f8a9a80 100644 --- a/packages/shared/src/types/localization.ts +++ b/packages/shared/src/types/localization.ts @@ -69,7 +69,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/organization.ts b/packages/shared/src/types/organization.ts index 9ebc8843c11..28114128076 100644 --- a/packages/shared/src/types/organization.ts +++ b/packages/shared/src/types/organization.ts @@ -12,7 +12,7 @@ declare global { /** * If you want to provide custom types for the organization.publicMetadata object, * simply redeclare this rule in the global namespace. - * Every organization object will use the provided type. + * Every Organization object will use the provided type. */ interface OrganizationPublicMetadata { [k: string]: unknown; @@ -21,7 +21,7 @@ declare global { /** * If you want to provide custom types for the organization.privateMetadata object, * simply redeclare this rule in the global namespace. - * Every organization object will use the provided type. + * Every Organization object will use the provided type. */ interface OrganizationPrivateMetadata { [k: string]: unknown; @@ -29,7 +29,7 @@ declare global { } /** - * 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](https://clerk.com/docs/guides/organizations/configure#enable-organizations). * diff --git a/packages/shared/src/types/organizationDomain.ts b/packages/shared/src/types/organizationDomain.ts index 0a74b312f6b..872fa8d3403 100644 --- a/packages/shared/src/types/organizationDomain.ts +++ b/packages/shared/src/types/organizationDomain.ts @@ -18,7 +18,7 @@ export type OrganizationDomainVerificationStatus = 'unverified' | 'verified'; export type OrganizationEnrollmentMode = 'manual_invitation' | 'automatic_invitation' | 'automatic_suggestion'; /** - * The `OrganizationDomain` object is the model around an organization domain. + * The `OrganizationDomain` object is the model around an Organization domain. * @interface */ export interface OrganizationDomainResource extends ClerkResource { diff --git a/packages/shared/src/types/organizationInvitation.ts b/packages/shared/src/types/organizationInvitation.ts index cc4f91eea04..61581a28e37 100644 --- a/packages/shared/src/types/organizationInvitation.ts +++ b/packages/shared/src/types/organizationInvitation.ts @@ -5,7 +5,7 @@ declare global { /** * If you want to provide custom types for the organizationInvitation.publicMetadata * object, simply redeclare this rule in the global namespace. - * Every organizationInvitation object will use the provided type. + * Every OrganizationInvitation object will use the provided type. */ interface OrganizationInvitationPublicMetadata { [k: string]: unknown; @@ -17,7 +17,7 @@ declare global { } /** - * The `OrganizationInvitation` object is the model around an organization invitation. + * The `OrganizationInvitation` object is the model around an Organization invitation. * * @interface */ diff --git a/packages/shared/src/types/organizationMembership.ts b/packages/shared/src/types/organizationMembership.ts index f9d645e4401..95816a783d8 100644 --- a/packages/shared/src/types/organizationMembership.ts +++ b/packages/shared/src/types/organizationMembership.ts @@ -23,7 +23,7 @@ declare global { /** * If you want to provide custom types for the organizationMembership.publicMetadata * object, simply redeclare this rule in the global namespace. - * Every organizationMembership object will use the provided type. + * Every OrganizationMembership object will use the provided type. */ interface OrganizationMembershipPublicMetadata { [k: string]: unknown; @@ -32,7 +32,7 @@ declare global { /** * If you want to provide custom types for the organizationMembership.publicMetadata * object, simply redeclare this rule in the global namespace. - * Every organizationMembership object will use the provided type. + * Every OrganizationMembership object will use the provided type. */ interface OrganizationMembershipPrivateMetadata { [k: string]: unknown; @@ -40,7 +40,7 @@ declare global { } /** - * The `OrganizationMembership` object is the model around an organization membership entity and describes the relationship between users and organizations. + * The `OrganizationMembership` object is the model around an Organization membership entity and describes the relationship between users and Organizations. * @interface */ export interface OrganizationMembershipResource extends ClerkResource { @@ -68,9 +68,9 @@ export type OrganizationCustomPermissionKey = ClerkAuthorization extends Placeho : Base['permission']; /** - * `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`](https://clerk.com/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`](https://clerk.com/docs/guides/development/override-clerk-types-interfaces#example-custom-roles-and-permissions). * - * Clerk provides the [default roles](https://clerk.com/docs/guides/organizations/roles-and-permissions#default-roles) `org:admin` and `org:member`. However, you can create [custom roles](https://clerk.com/docs/guides/organizations/roles-and-permissions#custom-roles) as well. + * Clerk provides the [default Roles](https://clerk.com/docs/guides/organizations/control-access/roles-and-permissions#default-roles) `org:admin` and `org:member`. However, you can create [Custom Roles](https://clerk.com/docs/guides/organizations/control-access/roles-and-permissions#custom-roles) as well. * * @interface */ @@ -90,8 +90,8 @@ export type OrganizationSystemPermissionKey = | `${OrganizationSystemPermissionPrefix}domains:read`; /** - * 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 */ export type OrganizationPermissionKey = ClerkAuthorization extends Placeholder ? ClerkAuthorization['permission'] extends string diff --git a/packages/shared/src/types/protect.ts b/packages/shared/src/types/protect.ts index e96df803046..045787b0dcc 100644 --- a/packages/shared/src/types/protect.ts +++ b/packages/shared/src/types/protect.ts @@ -5,23 +5,23 @@ import type { Autocomplete } from './utils'; /** * 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/packages/shared/src/types/session.ts b/packages/shared/src/types/session.ts index 11629a838d4..f575cf32b3f 100644 --- a/packages/shared/src/types/session.ts +++ b/packages/shared/src/types/session.ts @@ -61,19 +61,19 @@ type WithReverification = T & { export type CheckAuthorizationParamsWithCustomPermissions = WithReverification< | { /** - * The [role](https://clerk.com/docs/guides/organizations/roles-and-permissions) to check for. + * The [Role](https://clerk.com/docs/guides/organizations/control-access/roles-and-permissions) to check for. */ role: OrganizationCustomRoleKey; /** - * The [permission](https://clerk.com/docs/guides/organizations/roles-and-permissions) to check for. + * The [Permission](https://clerk.com/docs/guides/organizations/control-access/roles-and-permissions) to check for. */ permission?: never; /** - * The [feature](https://clerk.com/docs/guides/billing/overview) to check for. + * The [Feature](https://clerk.com/docs/guides/billing/overview) to check for. */ feature?: never; /** - * The [plan](https://clerk.com/docs/guides/billing/overview) to check for. + * The [Plan](https://clerk.com/docs/guides/billing/overview) to check for. */ plan?: never; } @@ -103,19 +103,19 @@ export type CheckAuthorization = CheckAuthorizationFn; type CheckAuthorizationParams = WithReverification< | { /** - * The [role](https://clerk.com/docs/guides/organizations/roles-and-permissions) to check for. + * The [Role](https://clerk.com/docs/guides/organizations/control-access/roles-and-permissions) to check for. */ role: OrganizationCustomRoleKey; /** - * The [permission](https://clerk.com/docs/guides/organizations/roles-and-permissions) to check for. + * The [Permission](https://clerk.com/docs/guides/organizations/control-access/roles-and-permissions) to check for. */ permission?: never; /** - * The [feature](https://clerk.com/docs/guides/billing/overview) to check for. + * The [Feature](https://clerk.com/docs/guides/billing/overview) to check for. */ feature?: never; /** - * The [plan](https://clerk.com/docs/guides/billing/overview) to check for. + * The [Plan](https://clerk.com/docs/guides/billing/overview) to check for. */ plan?: never; } @@ -142,7 +142,7 @@ type CheckAuthorizationParams = WithReverification< /** * 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. */ export type CheckAuthorizationFromSessionClaims =

( @@ -155,19 +155,19 @@ export type CheckAuthorizationFromSessionClaims =

= WithReverification< | { /** - * The [role](https://clerk.com/docs/guides/organizations/roles-and-permissions) to check for. + * The [Role](https://clerk.com/docs/guides/organizations/control-access/roles-and-permissions) to check for. */ role: OrganizationCustomRoleKey; /** - * The [permission](https://clerk.com/docs/guides/organizations/roles-and-permissions) to check for. + * The [Permission](https://clerk.com/docs/guides/organizations/control-access/roles-and-permissions) to check for. */ permission?: never; /** - * The [feature](https://clerk.com/docs/guides/billing/overview) to check for. + * The [Feature](https://clerk.com/docs/guides/billing/overview) to check for. */ feature?: never; /** - * The [plan](https://clerk.com/docs/guides/billing/overview) to check for. + * The [Plan](https://clerk.com/docs/guides/billing/overview) to check for. */ plan?: never; }