Skip to content

Commit c9f0d77

Browse files
authored
docs(shared): Update JSDoc comments for BillingNamespace (#7554)
1 parent b4e2906 commit c9f0d77

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

.changeset/bumpy-symbols-train.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@clerk/shared': patch
3+
---
4+
5+
Add JSDoc comments to BillingNamespace methods

packages/shared/src/types/billing.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,41 +18,57 @@ type WithOptionalOrgType<T> = T & {
1818
*/
1919
export interface BillingNamespace {
2020
/**
21+
* Returns a list of payment attempts for the current user or supplied organization.
22+
*
2123
* @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.
2224
*/
2325
getPaymentAttempts: (params: GetPaymentAttemptsParams) => Promise<ClerkPaginatedResponse<BillingPaymentResource>>;
2426

2527
/**
28+
* Returns details of a specific payment attempt for the current user or supplied organization.
29+
*
2630
* @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.
2731
*/
2832
getPaymentAttempt: (params: { id: string; orgId?: string }) => Promise<BillingPaymentResource>;
2933

3034
/**
35+
* Returns a list of all publically visible billing plans.
36+
*
3137
* @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.
3238
*/
3339
getPlans: (params?: GetPlansParams) => Promise<ClerkPaginatedResponse<BillingPlanResource>>;
3440

3541
/**
42+
* Returns a billing plan by ID.
43+
*
3644
* @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.
3745
*/
3846
getPlan: (params: { id: string }) => Promise<BillingPlanResource>;
3947

4048
/**
49+
* Returns the main billing subscription for the current user or supplied organization.
50+
*
4151
* @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.
4252
*/
4353
getSubscription: (params: GetSubscriptionParams) => Promise<BillingSubscriptionResource>;
4454

4555
/**
56+
* Returns a list of billing statements for the current user or supplied organization.
57+
*
4658
* @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.
4759
*/
4860
getStatements: (params: GetStatementsParams) => Promise<ClerkPaginatedResponse<BillingStatementResource>>;
4961

5062
/**
63+
* Returns a billing statement by ID.
64+
*
5165
* @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.
5266
*/
5367
getStatement: (params: { id: string; orgId?: string }) => Promise<BillingStatementResource>;
5468

5569
/**
70+
* Creates a new billing checkout for the current user or supplied organization.
71+
*
5672
* @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.
5773
*/
5874
startCheckout: (params: CreateCheckoutParams) => Promise<BillingCheckoutResource>;

0 commit comments

Comments
 (0)