Skip to content

chore(types): Add jsdoc for payer_type #6257

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
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
16 changes: 16 additions & 0 deletions packages/types/src/commerce.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,22 @@ export interface CommercePlanResource extends ClerkResource {
isDefault: boolean;
isRecurring: boolean;
hasBaseFee: boolean;
/**
* 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.
*
* @type {['user'] | ['org']}
* @example
* ```ts
* // For a user plan
* payerType: ['user']
*
* // For an organization plan
* payerType: ['org']
* ```
*/
payerType: string[];
publiclyVisible: boolean;
slug: string;
Expand Down
16 changes: 16 additions & 0 deletions packages/types/src/json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,22 @@ export interface CommercePlanJSON extends ClerkResourceJSON {
is_default: boolean;
is_recurring: boolean;
has_base_fee: boolean;
/**
* 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.
*
* @type {['user'] | ['org']}
* @example
* ```ts
* // For a user plan
* payer_type: ['user']
*
* // For an organization plan
* payer_type: ['org']
* ```
*/
payer_type: string[];
publicly_visible: boolean;
slug: string;
Expand Down
Loading