You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/backend/src/api/resources/CommercePlan.ts
+21-35Lines changed: 21 additions & 35 deletions
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,7 @@
1
1
import{Feature}from'./Feature';
2
2
importtype{CommercePlanJSON}from'./JSON';
3
3
4
-
/**
5
-
* The Backend `Organization` object is similar to the [`Organization`](https://clerk.com/docs/references/javascript/organization) object as it holds information about an organization, as well as methods for managing it. However, the Backend `Organization` object is different in that it is used in the [Backend API](https://clerk.com/docs/reference/backend-api/tag/Organizations#operation/ListOrganizations){{ target: '_blank' }} and is not directly accessible from the Frontend API.
6
-
*/
7
-
8
-
typeCommerceAmount={
4
+
typeCommerceFee={
9
5
amount: number;
10
6
amountFormatted: string;
11
7
currency: string;
@@ -15,65 +11,60 @@ type CommerceAmount = {
15
11
exportclassCommercePlan{
16
12
constructor(
17
13
/**
18
-
* The unique identifier for the organization.
14
+
* The unique identifier for the plan.
19
15
*/
20
16
readonlyid: string,
21
17
/**
22
-
* The name of the organization.
18
+
* The id of the product the plan belongs to.
23
19
*/
24
20
readonlyproductId: string,
25
21
/**
26
-
* The URL-friendly identifier of the user's active organization. If supplied, it must be unique for the instance.
22
+
* The name of the plan.
27
23
*/
28
24
readonlyname: string,
29
25
/**
30
-
* Holds the organization's logo. Compatible with Clerk's [Image Optimization](https://clerk.com/docs/guides/image-optimization).
26
+
* The URL-friendly identifier of the plan.
31
27
*/
32
28
readonlyslug: string,
33
29
/**
34
-
* Whether the organization has an image.
30
+
* The description of the plan.
35
31
*/
36
32
readonlydescription: string|undefined,
37
33
/**
38
-
* The date when the organization was first created.
34
+
* Whether the plan is the default plan.
39
35
*/
40
36
readonlyisDefault: boolean,
41
37
/**
42
-
* The date when the organization was last updated.
38
+
* Whether the plan is recurring.
43
39
*/
44
40
readonlyisRecurring: boolean,
45
41
/**
46
-
* Metadata that can be read from the Frontend API and [Backend API](https://clerk.com/docs/reference/backend-api){{ target: '_blank' }} and can be set only from the Backend API.
42
+
* Whether the plan has a base fee.
47
43
*/
48
-
readonlyamount: number,
44
+
readonlyhasBaseFee: boolean,
49
45
/**
50
-
* Metadata that can be read and set only from the [Backend API](https://clerk.com/docs/reference/backend-api){{ target: '_blank' }}.
46
+
* Whether the plan is displayed in the `<PriceTable/>` component.
51
47
*/
52
-
readonlyperiod: 'month'|'annual',
48
+
readonlypubliclyVisible: boolean,
53
49
/**
54
-
* The maximum number of memberships allowed in the organization.
50
+
* The monthly fee of the plan.
55
51
*/
56
-
readonlyinterval: number,
52
+
readonlyfee: CommerceFee,
57
53
/**
58
-
* Whether the organization allows admins to delete users.
54
+
* The annual fee of the plan.
59
55
*/
60
-
readonlyhasBaseFee: boolean,
56
+
readonlyannualFee: CommerceFee,
61
57
/**
62
-
* The number of members in the organization.
58
+
* The annual fee of the plan on a monthly basis.
63
59
*/
64
-
readonlycurrency: string,
60
+
readonlyannualMonthlyFee: CommerceFee,
65
61
/**
66
-
* The ID of the user who created the organization.
62
+
* The type of payer for the plan.
67
63
*/
68
-
readonlyannualMonthlyAmount: number,
64
+
readonlyforPayerType: 'org'|'user',
69
65
/**
70
-
* Whether the organization allows admins to delete users.
0 commit comments