Skip to content

Commit 2be6a53

Browse files
authored
chore(types): Add notice for experimental commerce apis (#6285)
1 parent 8fdb209 commit 2be6a53

File tree

5 files changed

+1320
-1
lines changed

5 files changed

+1320
-1
lines changed

.changeset/curly-rules-fall.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 notice for upcoming/possible breaking changes in commerce related APIs.

.typedoc/__tests__/__snapshots__/file-structure.test.ts.snap

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ exports[`Typedoc output > should have a deliberate file structure 1`] = `
55
"types/act-claim.mdx",
66
"types/act-jwt-claim.mdx",
77
"types/active-session-resource.mdx",
8+
"types/add-payment-source-params.mdx",
9+
"types/cancel-subscription-params.mdx",
810
"types/check-authorization-fn.mdx",
911
"types/check-authorization-from-session-claims.mdx",
1012
"types/check-authorization-params-from-session-claims.mdx",
@@ -19,15 +21,61 @@ exports[`Typedoc output > should have a deliberate file structure 1`] = `
1921
"types/clerk-resource.mdx",
2022
"types/clerk-status.mdx",
2123
"types/clerk.mdx",
24+
"types/commerce-billing-namespace.mdx",
25+
"types/commerce-checkout-json.mdx",
26+
"types/commerce-checkout-resource.mdx",
27+
"types/commerce-checkout-totals-json.mdx",
28+
"types/commerce-checkout-totals.mdx",
29+
"types/commerce-feature-json.mdx",
30+
"types/commerce-feature-resource.mdx",
31+
"types/commerce-initialized-payment-source-json.mdx",
32+
"types/commerce-initialized-payment-source-resource.mdx",
33+
"types/commerce-money-json.mdx",
34+
"types/commerce-money.mdx",
35+
"types/commerce-payment-charge-type.mdx",
36+
"types/commerce-payment-json.mdx",
37+
"types/commerce-payment-resource.mdx",
38+
"types/commerce-payment-source-json.mdx",
39+
"types/commerce-payment-source-methods.mdx",
40+
"types/commerce-payment-source-resource.mdx",
41+
"types/commerce-payment-source-status.mdx",
42+
"types/commerce-payment-status.mdx",
43+
"types/commerce-plan-json.mdx",
44+
"types/commerce-plan-resource.mdx",
45+
"types/commerce-product-json.mdx",
46+
"types/commerce-product-resource.mdx",
47+
"types/commerce-statement-group-json.mdx",
48+
"types/commerce-statement-group.mdx",
49+
"types/commerce-statement-json.mdx",
50+
"types/commerce-statement-resource.mdx",
51+
"types/commerce-statement-status.mdx",
52+
"types/commerce-statement-totals-json.mdx",
53+
"types/commerce-statement-totals.mdx",
54+
"types/commerce-subscriber-type.mdx",
55+
"types/commerce-subscription-json.mdx",
56+
"types/commerce-subscription-plan-period.mdx",
57+
"types/commerce-subscription-resource.mdx",
58+
"types/commerce-subscription-status.mdx",
59+
"types/confirm-checkout-params.mdx",
60+
"types/create-checkout-params.mdx",
2261
"types/create-organization-params.mdx",
2362
"types/element-object-key.mdx",
2463
"types/elements-config.mdx",
64+
"types/get-payment-attempts-params.mdx",
65+
"types/get-payment-sources-params.mdx",
66+
"types/get-plans-params.mdx",
67+
"types/get-statements-params.mdx",
68+
"types/get-subscriptions-params.mdx",
2569
"types/get-token.mdx",
2670
"types/id-selectors.mdx",
71+
"types/initialize-payment-source-params.mdx",
72+
"types/internal_checkout-props.mdx",
73+
"types/internal_plan-details-props.mdx",
2774
"types/jwt-claims.mdx",
2875
"types/jwt-header.mdx",
2976
"types/legacy-redirect-props.mdx",
3077
"types/localization-resource.mdx",
78+
"types/make-default-payment-source-params.mdx",
3179
"types/multi-domain-and-or-proxy.mdx",
3280
"types/organization-custom-role-key.mdx",
3381
"types/organization-domain-resource.mdx",
@@ -44,11 +92,13 @@ exports[`Typedoc output > should have a deliberate file structure 1`] = `
4492
"types/organizations-jwt-claim.mdx",
4593
"types/override.mdx",
4694
"types/path-value.mdx",
95+
"types/payment-gateway.mdx",
4796
"types/pending-session-options.mdx",
4897
"types/pending-session-resource.mdx",
4998
"types/protect-props.mdx",
5099
"types/record-to-path.mdx",
51100
"types/redirect-options.mdx",
101+
"types/remove-payment-source-params.mdx",
52102
"types/reverification-config.mdx",
53103
"types/saml-strategy.mdx",
54104
"types/sdk-metadata.mdx",

packages/types/src/clerk.ts

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,16 @@ export interface Clerk {
184184
/** Current User. */
185185
user: UserResource | null | undefined;
186186

187-
/** Billing Object */
187+
/**
188+
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change.
189+
* @see https://clerk.com/docs/billing/overview
190+
*
191+
* It is advised to pin the SDK version and the clerk-js version to a specific version to avoid breaking changes.
192+
* @example
193+
* ```tsx
194+
* <ClerkProvider clerkJsVersion="x.x.x" />
195+
* ```
196+
*/
188197
billing: CommerceBillingNamespace;
189198

190199
telemetry: TelemetryCollector | undefined;
@@ -1724,6 +1733,16 @@ export type RevokeAPIKeyParams = {
17241733
revocationReason?: string;
17251734
};
17261735

1736+
/**
1737+
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change.
1738+
* @see https://clerk.com/docs/billing/overview
1739+
*
1740+
* It is advised to pin the SDK version and the clerk-js version to a specific version to avoid breaking changes.
1741+
* @example
1742+
* ```tsx
1743+
* <ClerkProvider clerkJsVersion="x.x.x" />
1744+
* ```
1745+
*/
17271746
export type __internal_CheckoutProps = {
17281747
appearance?: CheckoutTheme;
17291748
planId?: string;
@@ -1740,6 +1759,16 @@ export type __internal_CheckoutProps = {
17401759
onClose?: () => void;
17411760
};
17421761

1762+
/**
1763+
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change.
1764+
* @see https://clerk.com/docs/billing/overview
1765+
*
1766+
* It is advised to pin the SDK version and the clerk-js version to a specific version to avoid breaking changes.
1767+
* @example
1768+
* ```tsx
1769+
* <ClerkProvider clerkJsVersion="x.x.x" />
1770+
* ```
1771+
*/
17431772
export type __internal_PlanDetailsProps = {
17441773
appearance?: PlanDetailTheme;
17451774
plan?: CommercePlanResource;

0 commit comments

Comments
 (0)