Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions clerk-typedoc/backend/auth-object.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
| ---------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <a id="debug"></a> `debug` | <code>() => \{ [key: string]: any; \}</code> | Used to help debug issues when using Clerk in development. |
| <a id="gettoken"></a> `getToken` | <code>() => Promise\<null\> \| () => Promise\<string\> \| ServerGetToken \| () => Promise\<null\></code> | A function that gets the current user's [session token](/docs/guides/sessions/session-tokens) or a [custom JWT template](/docs/guides/sessions/jwt-templates). |
| <a id="has"></a> `has` | <code>CheckAuthorizationFromSessionClaims \| () => false</code> | A function that checks if the user has an organization role or custom permission. |
| <a id="tokentype"></a> `tokenType` | <code>null \| "api_key" \| "session_token" \| "m2m_token" \| "oauth_token"</code> | The allowed token type. |
| <a id="has"></a> `has` | <code>CheckAuthorizationFromSessionClaims \| () => false</code> | A function that checks if the user has an Organization Role or Custom Permission. |
| <a id="tokentype"></a> `tokenType` | <code>null \| "api_key" \| "oauth_token" \| "session_token" \| "m2m_token"</code> | The allowed token type. |
49 changes: 25 additions & 24 deletions clerk-typedoc/backend/authenticate-request-options.mdx

Large diffs are not rendered by default.

28 changes: 14 additions & 14 deletions clerk-typedoc/backend/billing-plan.mdx
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
The `BillingPlan` object is similar to the [`BillingPlanResource`](/docs/reference/javascript/types/billing-plan-resource) object as it holds information about a plan, as well as methods for managing it. However, the `BillingPlan` object is different in that it is used in the [Backend API](/docs/reference/backend-api/tag/commerce/get/commerce/plans) and is not directly accessible from the Frontend API.
The `BillingPlan` object is similar to the [`BillingPlanResource`](/docs/reference/javascript/types/billing-plan-resource) object as it holds information about a Plan, as well as methods for managing it. However, the `BillingPlan` object is different in that it is used in the [Backend API](/docs/reference/backend-api/tag/commerce/get/commerce/plans) and is not directly accessible from the Frontend API.

## Properties

| Property | Type | Description |
| ------------------------------------------------ | --------------------------------------- | --------------------------------------------------------------- |
| <a id="annualfee"></a> `annualFee` | <code>null \| BillingMoneyAmount</code> | The annual fee of the plan. |
| <a id="annualmonthlyfee"></a> `annualMonthlyFee` | <code>null \| BillingMoneyAmount</code> | The annual fee of the plan on a monthly basis. |
| <a id="description"></a> `description` | <code>null \| string</code> | The description of the plan. |
| <a id="features"></a> `features` | <code>[Feature](feature.mdx)[]</code> | The features the plan offers. |
| <a id="fee"></a> `fee` | `BillingMoneyAmount` | The monthly fee of the plan. |
| <a id="forpayertype"></a> `forPayerType` | <code>"user" \| "org"</code> | The type of payer for the plan. |
| <a id="hasbasefee"></a> `hasBaseFee` | `boolean` | Whether the plan has a base fee. |
| <a id="id"></a> `id` | `string` | The unique identifier for the plan. |
| <a id="isdefault"></a> `isDefault` | `boolean` | Whether the plan is the default plan. |
| <a id="isrecurring"></a> `isRecurring` | `boolean` | Whether the plan is recurring. |
| <a id="name"></a> `name` | `string` | The name of the plan. |
| <a id="publiclyvisible"></a> `publiclyVisible` | `boolean` | Whether the plan is displayed in the `<PriceTable/>` component. |
| <a id="slug"></a> `slug` | `string` | The URL-friendly identifier of the plan. |
| <a id="annualfee"></a> `annualFee` | <code>null \| BillingMoneyAmount</code> | The annual fee of the Plan. |
| <a id="annualmonthlyfee"></a> `annualMonthlyFee` | <code>null \| BillingMoneyAmount</code> | The annual fee of the Plan on a monthly basis. |
| <a id="description"></a> `description` | <code>null \| string</code> | The description of the Plan. |
| <a id="features"></a> `features` | <code>[Feature](feature.mdx)[]</code> | The features the Plan offers. |
| <a id="fee"></a> `fee` | `BillingMoneyAmount` | The monthly fee of the Plan. |
| <a id="forpayertype"></a> `forPayerType` | <code>"user" \| "org"</code> | The type of payer for the Plan. |
| <a id="hasbasefee"></a> `hasBaseFee` | `boolean` | Whether the Plan has a base fee. |
| <a id="id"></a> `id` | `string` | The unique identifier for the Plan. |
| <a id="isdefault"></a> `isDefault` | `boolean` | Whether the Plan is the default Plan. |
| <a id="isrecurring"></a> `isRecurring` | `boolean` | Whether the Plan is recurring. |
| <a id="name"></a> `name` | `string` | The name of the Plan. |
| <a id="publiclyvisible"></a> `publiclyVisible` | `boolean` | Whether the Plan is displayed in the `<PriceTable/>` component. |
| <a id="slug"></a> `slug` | `string` | The URL-friendly identifier of the Plan. |
6 changes: 3 additions & 3 deletions clerk-typedoc/backend/billing-subscription-item.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ The `BillingSubscriptionItem` object is similar to the [`BillingSubscriptionItem
| <a id="payerid"></a> `payerId` | <code>undefined \| string</code> | The payer ID. |
| <a id="periodend"></a> `periodEnd` | <code>null \| number</code> | Unix timestamp (milliseconds) of when the current period ends. |
| <a id="periodstart"></a> `periodStart` | `number` | Unix timestamp (milliseconds) of when the current period starts. |
| <a id="plan"></a> `plan` | <code>null \| [BillingPlan](billing-plan.mdx)</code> | The plan associated with this subscription item. |
| <a id="planid"></a> `planId` | <code>null \| string</code> | The plan ID. |
| <a id="planperiod"></a> `planPeriod` | <code>"month" \| "annual"</code> | The plan period for the subscription item. |
| <a id="plan"></a> `plan` | <code>null \| [BillingPlan](billing-plan.mdx)</code> | The Plan associated with this subscription item. |
| <a id="planid"></a> `planId` | <code>null \| string</code> | The Plan ID. |
| <a id="planperiod"></a> `planPeriod` | <code>"month" \| "annual"</code> | The Plan period for the subscription item. |
| <a id="status"></a> `status` | `BillingSubscriptionItemStatus` | The status of the subscription item. |
| <a id="updatedat"></a> `updatedAt` | `number` | Unix timestamp (milliseconds) of when the subscription item was last updated. |
12 changes: 6 additions & 6 deletions clerk-typedoc/backend/feature.mdx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
The `Feature` object represents a feature of a subscription plan.
The `Feature` object represents a Feature of a Subscription Plan.

## Properties

| Property | Type | Description |
| -------------------------------------- | --------------------------- | ------------------------------------------- |
| <a id="avatarurl"></a> `avatarUrl` | <code>null \| string</code> | The URL of the feature's avatar image. |
| <a id="description"></a> `description` | <code>null \| string</code> | The description of the feature. |
| <a id="id"></a> `id` | `string` | The unique identifier for the feature. |
| <a id="name"></a> `name` | `string` | The name of the feature. |
| <a id="slug"></a> `slug` | `string` | The URL-friendly identifier of the feature. |
| <a id="avatarurl"></a> `avatarUrl` | <code>null \| string</code> | The URL of the Feature's avatar image. |
| <a id="description"></a> `description` | <code>null \| string</code> | The description of the Feature. |
| <a id="id"></a> `id` | `string` | The unique identifier for the Feature. |
| <a id="name"></a> `name` | `string` | The name of the Feature. |
| <a id="slug"></a> `slug` | `string` | The URL-friendly identifier of the Feature. |
8 changes: 4 additions & 4 deletions clerk-typedoc/backend/get-auth-fn-no-request.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Shared generic overload type for auth() or getAuth() helpers that don't require

| Parameter | Type |
| --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `options` | <code>\{ treatPendingAsSignedOut?: boolean; \}</code> & <code>\{ acceptsToken?: "api_key" \| "session_token" \| "m2m_token" \| "oauth_token" \| ("api_key" \| "session_token" \| "m2m_token" \| "oauth_token")[] \| "any"; \}</code> & <code>\{ acceptsToken: T; \}</code> |
| `options` | <code>\{ treatPendingAsSignedOut?: boolean; \}</code> & <code>\{ acceptsToken?: "api_key" \| "oauth_token" \| "session_token" \| "m2m_token" \| ("api_key" \| "oauth_token" \| "session_token" \| "m2m_token")[] \| "any"; \}</code> & <code>\{ acceptsToken: T; \}</code> |

### Returns

Expand All @@ -37,7 +37,7 @@ Shared generic overload type for auth() or getAuth() helpers that don't require

| Parameter | Type |
| --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `options` | <code>\{ treatPendingAsSignedOut?: boolean; \}</code> & <code>\{ acceptsToken?: "api_key" \| "session_token" \| "m2m_token" \| "oauth_token" \| ("api_key" \| "session_token" \| "m2m_token" \| "oauth_token")[] \| "any"; \}</code> & <code>\{ acceptsToken: T; \}</code> |
| `options` | <code>\{ treatPendingAsSignedOut?: boolean; \}</code> & <code>\{ acceptsToken?: "api_key" \| "oauth_token" \| "session_token" \| "m2m_token" \| ("api_key" \| "oauth_token" \| "session_token" \| "m2m_token")[] \| "any"; \}</code> & <code>\{ acceptsToken: T; \}</code> |

### Returns

Expand All @@ -60,11 +60,11 @@ Shared generic overload type for auth() or getAuth() helpers that don't require

| Parameter | Type |
| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `options` | <code>\{ treatPendingAsSignedOut?: boolean; \}</code> & <code>\{ acceptsToken?: "api_key" \| "session_token" \| "m2m_token" \| "oauth_token" \| ("api_key" \| "session_token" \| "m2m_token" \| "oauth_token")[] \| "any"; \}</code> & <code>\{ acceptsToken: "any"; \}</code> |
| `options` | <code>\{ treatPendingAsSignedOut?: boolean; \}</code> & <code>\{ acceptsToken?: "api_key" \| "oauth_token" \| "session_token" \| "m2m_token" \| ("api_key" \| "oauth_token" \| "session_token" \| "m2m_token")[] \| "any"; \}</code> & <code>\{ acceptsToken: "any"; \}</code> |

### Returns

`MaybePromise`\<<code>InvalidTokenAuthObject \| \{ debug: () => \{ [key: string]: any; \}; getToken: () => Promise\<null\>; has: CheckAuthorizationFromSessionClaims; id: null; isAuthenticated: false; scopes: null; subject: null; tokenType: "api_key"; \} & \{ claims: null; name: null; orgId: null; userId: null; \} \| \{ debug: () => \{ [key: string]: any; \}; getToken: () => Promise\<null\>; has: CheckAuthorizationFromSessionClaims; id: null; isAuthenticated: false; scopes: null; subject: null; tokenType: "m2m_token"; \} & \{ claims: null; machineId: null; \} \| \{ debug: () => \{ [key: string]: any; \}; getToken: () => Promise\<null\>; has: CheckAuthorizationFromSessionClaims; id: null; isAuthenticated: false; scopes: null; subject: null; tokenType: "oauth_token"; \} & \{ clientId: null; userId: null; \} \| \{ id: string; subject: string; scopes: string\[\]; getToken: () =\> Promise\<string\>; has: CheckAuthorizationFromSessionClaims; debug: AuthObjectDebug; tokenType: "api_key"; isAuthenticated: true; \} & (\{ ...; \} \| \{ ...; \}) \| \{ debug: () => \{ [key: string]: any; \}; getToken: () => Promise\<string\>; has: CheckAuthorizationFromSessionClaims; id: string; isAuthenticated: true; scopes: string[]; subject: string; tokenType: "m2m_token"; \} & \{ claims: null \| Claims; machineId: string; \} \| \{ debug: () => \{ [key: string]: any; \}; getToken: () => Promise\<string\>; has: CheckAuthorizationFromSessionClaims; id: string; isAuthenticated: true; scopes: string[]; subject: string; tokenType: "oauth_token"; \} & \{ clientId: string; userId: string; \} \| SessionAuthType</code>, `ReturnsPromise`\>
`MaybePromise`\<<code>InvalidTokenAuthObject \| \{ debug: () => \{ [key: string]: any; \}; getToken: () => Promise\<null\>; has: CheckAuthorizationFromSessionClaims; id: null; isAuthenticated: false; scopes: null; subject: null; tokenType: "api_key"; \} & \{ claims: null; name: null; orgId: null; userId: null; \} \| \{ debug: () => \{ [key: string]: any; \}; getToken: () => Promise\<null\>; has: CheckAuthorizationFromSessionClaims; id: null; isAuthenticated: false; scopes: null; subject: null; tokenType: "oauth_token"; \} & \{ clientId: null; userId: null; \} \| \{ debug: () => \{ [key: string]: any; \}; getToken: () => Promise\<null\>; has: CheckAuthorizationFromSessionClaims; id: null; isAuthenticated: false; scopes: null; subject: null; tokenType: "m2m_token"; \} & \{ claims: null; machineId: null; \} \| \{ id: string; subject: string; scopes: string\[\]; getToken: () =\> Promise\<string\>; has: CheckAuthorizationFromSessionClaims; debug: AuthObjectDebug; tokenType: "api_key"; isAuthenticated: true; \} & (\{ ...; \} \| \{ ...; \}) \| \{ debug: () => \{ [key: string]: any; \}; getToken: () => Promise\<string\>; has: CheckAuthorizationFromSessionClaims; id: string; isAuthenticated: true; scopes: string[]; subject: string; tokenType: "oauth_token"; \} & \{ clientId: string; userId: string; \} \| \{ debug: () => \{ [key: string]: any; \}; getToken: () => Promise\<string\>; has: CheckAuthorizationFromSessionClaims; id: string; isAuthenticated: true; scopes: string[]; subject: string; tokenType: "m2m_token"; \} & \{ claims: null \| Claims; machineId: string; \} \| SessionAuthType</code>, `ReturnsPromise`\>

### Example

Expand Down
Loading