Skip to content

Commit f42c4fe

Browse files
authored
chore(types): Add jsdoc for payer_type (#6257)
1 parent ec207dc commit f42c4fe

File tree

3 files changed

+37
-0
lines changed

3 files changed

+37
-0
lines changed

.changeset/bumpy-jobs-flow.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@clerk/types': patch
3+
---
4+
5+
Add jsdoc comments for `payerType` in `CommercePlanResource`.

packages/types/src/commerce.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,22 @@ export interface CommercePlanResource extends ClerkResource {
5757
isDefault: boolean;
5858
isRecurring: boolean;
5959
hasBaseFee: boolean;
60+
/**
61+
* Specifies the subscriber type this plan is designed for.
62+
*
63+
* Each plan is exclusively created for either individual users or organizations,
64+
* and cannot be used interchangeably.
65+
*
66+
* @type {['user'] | ['org']}
67+
* @example
68+
* ```ts
69+
* // For a user plan
70+
* payerType: ['user']
71+
*
72+
* // For an organization plan
73+
* payerType: ['org']
74+
* ```
75+
*/
6076
payerType: string[];
6177
publiclyVisible: boolean;
6278
slug: string;

packages/types/src/json.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,22 @@ export interface CommercePlanJSON extends ClerkResourceJSON {
626626
is_default: boolean;
627627
is_recurring: boolean;
628628
has_base_fee: boolean;
629+
/**
630+
* Specifies the subscriber type this plan is designed for.
631+
*
632+
* Each plan is exclusively created for either individual users or organizations,
633+
* and cannot be used interchangeably.
634+
*
635+
* @type {['user'] | ['org']}
636+
* @example
637+
* ```ts
638+
* // For a user plan
639+
* payer_type: ['user']
640+
*
641+
* // For an organization plan
642+
* payer_type: ['org']
643+
* ```
644+
*/
629645
payer_type: string[];
630646
publicly_visible: boolean;
631647
slug: string;

0 commit comments

Comments
 (0)