File tree Expand file tree Collapse file tree 3 files changed +14
-9
lines changed
packages/backend/src/api/resources Expand file tree Collapse file tree 3 files changed +14
-9
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @clerk/backend ' : minor
3+ ---
4+
5+ [ Billing Beta] Update subscription item ` plan ` and ` planId ` properties to be ` null ` .
Original file line number Diff line number Diff line change @@ -46,11 +46,11 @@ export class BillingSubscriptionItem {
4646 /**
4747 * The plan associated with this subscription item.
4848 */
49- readonly plan : BillingPlan ,
49+ readonly plan : BillingPlan | null ,
5050 /**
5151 * The plan ID.
5252 */
53- readonly planId : string ,
53+ readonly planId : string | null ,
5454 /**
5555 * Unix timestamp (milliseconds) of when the subscription item was created.
5656 */
@@ -112,8 +112,8 @@ export class BillingSubscriptionItem {
112112 data . period_start ,
113113 data . next_payment ,
114114 formatAmountJSON ( data . amount ) ,
115- BillingPlan . fromJSON ( data . plan ) ,
116- data . plan_id ,
115+ data . plan ? BillingPlan . fromJSON ( data . plan ) : null ,
116+ data . plan_id ?? null ,
117117 data . created_at ,
118118 data . updated_at ,
119119 data . period_end ,
Original file line number Diff line number Diff line change @@ -880,8 +880,8 @@ export interface BillingSubscriptionItemJSON extends ClerkResourceJSON {
880880 date : number ;
881881 } | null ;
882882 amount : BillingMoneyAmountJSON | null ;
883- plan : BillingPlanJSON ;
884- plan_id : string ;
883+ plan ? : BillingPlanJSON | null ;
884+ plan_id ? : string | null ;
885885}
886886
887887/**
@@ -906,7 +906,7 @@ export interface BillingSubscriptionItemWebhookEventJSON extends ClerkResourceJS
906906 next_payment_amount : number ;
907907 next_payment_date : number ;
908908 amount : BillingMoneyAmountJSON ;
909- plan : {
909+ plan ? : {
910910 id : string ;
911911 instance_id : string ;
912912 product_id : string ;
@@ -922,8 +922,8 @@ export interface BillingSubscriptionItemWebhookEventJSON extends ClerkResourceJS
922922 currency : string ;
923923 annual_monthly_amount : number ;
924924 publicly_visible : boolean ;
925- } ;
926- plan_id : string ;
925+ } | null ;
926+ plan_id ? : string | null ;
927927}
928928
929929/**
You can’t perform that action at this time.
0 commit comments