Skip to content

Commit 1ef84c3

Browse files
authored
fix(backend,shared): fix generated TypeDoc references (#9340)
1 parent 4717aab commit 1ef84c3

6 files changed

Lines changed: 37 additions & 7 deletions

File tree

‎.changeset/clean-typedoc-links.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@clerk/backend': patch
3+
'@clerk/shared': patch
4+
---
5+
6+
Improve generated API reference links, expose `BillingSubscriptionItemStatus`, and clarify the `createUser()` identification status documentation.

‎.typedoc/custom-plugin.mjs‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,19 @@ const LINK_REPLACEMENTS = [
8787
['enterprise-account', '/docs/reference/backend/types/backend-enterprise-account'],
8888
['enterprise-account-connection', '/docs/reference/backend/types/backend-enterprise-account-connection'],
8989
['enterprise-connection', '/docs/reference/backend/types/backend-enterprise-connection'],
90+
[
91+
'enterprise-connection-custom-attribute',
92+
'/docs/reference/backend/types/backend-enterprise-connection-custom-attribute',
93+
],
9094
['enterprise-connection-oauth-config', '/docs/reference/backend/types/backend-enterprise-connection-oauth-config'],
9195
[
9296
'enterprise-connection-saml-connection',
9397
'/docs/reference/backend/types/backend-enterprise-connection-saml-connection',
9498
],
99+
[
100+
'enterprise-connection-saml-connection-login-hint',
101+
'/docs/reference/backend/types/backend-enterprise-connection-saml-connection-login-hint',
102+
],
95103
['external-account', '/docs/reference/backend/types/backend-external-account'],
96104
['phone-number', '/docs/reference/backend/types/backend-phone-number'],
97105
['protect-check-resource', '/docs/reference/types/protect-check-resource'],
@@ -114,9 +122,11 @@ const LINK_REPLACEMENTS = [
114122
['billing-per-unit-total-tier', '/docs/reference/types/billing-per-unit-total-tier'],
115123
['billing-subscription-item-resource', '/docs/reference/types/billing-subscription-item-resource'],
116124
['billing-subscription-item-seats', '/docs/reference/types/billing-subscription-item-seats'],
125+
['billing-subscription-item-status', '/docs/reference/backend/types/billing-subscription-item-status'],
117126
['feature-resource', '/docs/reference/types/feature-resource'],
118127
['billing-statement-group', '/docs/reference/types/billing-statement-group'],
119128
['billing-statement-resource', '/docs/reference/types/billing-statement-resource'],
129+
['billing-totals', '/docs/reference/types/billing-totals'],
120130
['billing-subscription-resource', '/docs/reference/types/billing-subscription-resource'],
121131
['clerk-api-response-error', '/docs/reference/types/clerk-api-response-error'],
122132
['clerk-api-error', '/docs/reference/types/clerk-api-error'],

‎packages/backend/src/api/endpoints/UserApi.ts‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -233,13 +233,13 @@ export type UserPasswordHashingParams = {
233233
export type CreateUserParams = {
234234
/** The ID of the user as used in your external systems or your previous authentication solution. Must be unique across your instance. */
235235
externalId?: string;
236-
/** The email address(es) to assign to the user. Must be unique across your instance. The first email address will be set as the users primary email address. Created verified by default; see `emailAddressIdentificationStatus` to create them reserved. */
236+
/** The email addresses to assign to the user. Each address must be unique across your instance. The first email address becomes the user's primary email address. Addresses are created as verified by default; use `emailAddressIdentificationStatus` to create reserved addresses. */
237237
emailAddress?: string[];
238-
/** Controls the status each email address is created with. Runs parallel to `emailAddress`: when provided, it must contain exactly one item per email address, applied by position. When omitted or empty, every email address is created `'verified'`. Set an item to `'reserved'` to create the corresponding email address reserved instead (unverified but usable for sign-in and locked so no other user can claim it). */
238+
/** Sets the creation status of each email address. Entries correspond by index to `emailAddress`, and the array must contain exactly one entry per email address. If omitted, every email address is created as `'verified'`. Use `'reserved'` to create an unverified address that can still be used for sign-in and cannot be claimed by another user. */
239239
emailAddressIdentificationStatus?: ('verified' | 'reserved')[];
240-
/** The phone number(s) to assign to the user. Must be unique across your instance. The first phone number will be set as the users primary phone number. Created verified by default; see `phoneNumberIdentificationStatus` to create them reserved. */
240+
/** The phone numbers to assign to the user. Each number must be unique across your instance. The first phone number becomes the user's primary phone number. Numbers are created as verified by default; use `phoneNumberIdentificationStatus` to create reserved numbers. */
241241
phoneNumber?: string[];
242-
/** Controls the status each phone number is created with. Runs parallel to `phoneNumber`: when provided, it must contain exactly one item per phone number, applied by position. When omitted or empty, every phone number is created `'verified'`. Set an item to `'reserved'` to create the corresponding phone number reserved instead (unverified but usable for sign-in and locked so no other user can claim it). */
242+
/** Sets the creation status of each phone number. Entries correspond by index to `phoneNumber`, and the array must contain exactly one entry per phone number. If omitted, every phone number is created as `'verified'`. Use `'reserved'` to create an unverified number that can still be used for sign-in and cannot be claimed by another user. */
243243
phoneNumberIdentificationStatus?: ('verified' | 'reserved')[];
244244
/** The username to assign to the user. Must be unique across your instance. */
245245
username?: string;
@@ -457,7 +457,7 @@ export class UserAPI extends AbstractAPI {
457457
*
458458
* Your settings in the [Clerk Dashboard](https://dashboard.clerk.com) determine how you should setup your user model. Anything **Required** will need to be provided when creating a user. Trying to add a field that isn't enabled will result in an error.
459459
*
460-
* By default, any email address and phone number created using this method is automatically verified. Use `emailAddressIdentificationStatus` and `phoneNumberIdentificationStatus` to instead create some or all of them as reserved (unverified but usable for sign-in and locked so no other user can claim them).
460+
* By default, email addresses and phone numbers created using this method are verified automatically. Use `emailAddressIdentificationStatus` and `phoneNumberIdentificationStatus` to create any of them as reserved. Reserved identifiers are unverified, but they can still be used for sign-in and cannot be claimed by another user.
461461
*
462462
* > [!CAUTION]
463463
* >

‎packages/backend/src/api/resources/JSON.ts‎

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1029,14 +1029,27 @@ export interface BillingPlanJSON extends ClerkResourceJSON {
10291029
avatar_url: string | null;
10301030
}
10311031

1032-
type BillingSubscriptionItemStatus =
1032+
/**
1033+
* The possible lifecycle states of a Backend `BillingSubscriptionItem`.
1034+
*
1035+
* @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.
1036+
*/
1037+
export type BillingSubscriptionItemStatus =
1038+
/** The Subscription Item is in the abandoned state. */
10331039
| 'abandoned'
1040+
/** The Subscription Item is active. */
10341041
| 'active'
1042+
/** The Subscription Item is canceled. */
10351043
| 'canceled'
1044+
/** The Subscription Item has ended. */
10361045
| 'ended'
1046+
/** The Subscription Item has expired. */
10371047
| 'expired'
1048+
/** The Subscription Item is incomplete. */
10381049
| 'incomplete'
1050+
/** The Subscription Item has a past-due payment. */
10391051
| 'past_due'
1052+
/** The Subscription Item is upcoming. */
10401053
| 'upcoming';
10411054

10421055
/**

‎packages/backend/src/index.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ export type {
113113
BillingPlanJSON,
114114
BillingSubscriptionJSON,
115115
BillingSubscriptionItemJSON,
116+
BillingSubscriptionItemStatus,
116117
} from './api/resources/JSON';
117118

118119
/**

‎packages/shared/src/types/clerk.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1445,7 +1445,7 @@ export type ClerkOptions = ClerkOptionsNavigation &
14451445
*/
14461446
supportEmail?: string;
14471447
/**
1448-
* By default, the [Clerk Frontend API `touch` endpoint](https://clerk.com/docs/reference/frontend-api/tag/Sessions#operation/touchSession){{ target: '_blank' }} is called during page focus to keep the last active session alive. This option allows you to disable this behavior.
1448+
* By default, the [Clerk Frontend API `touch` endpoint](https://clerk.com/docs/reference/frontend-api/tag/sessions/POST/v1/client/sessions/%7Bsession_id%7D/touch){{ target: '_blank' }} is called during page focus to keep the last active session alive. This option allows you to disable this behavior.
14491449
*/
14501450
touchSession?: boolean;
14511451
/**

0 commit comments

Comments
 (0)