Skip to content
Merged
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
5 changes: 5 additions & 0 deletions .changeset/bumpy-jobs-flow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@clerk/types': patch
---

Add jsdoc comments for `payerType` in `CommercePlanResource`.
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