mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-03 07:10:46 +08:00
feat(core): adjust subscription related mixpanel (#7536)
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
import type { PlanChangeStartedEvent } from './plan-change-started';
|
||||
import type { PlanChangeSucceededEvent } from './plan-change-succeed';
|
||||
|
||||
export interface MixpanelEvents {
|
||||
PlanChangeStarted: PlanChangeStartedEvent;
|
||||
PlanChangeSucceeded: PlanChangeSucceededEvent;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
import type { SubscriptionPlan, SubscriptionRecurring } from '@affine/graphql';
|
||||
|
||||
/**
|
||||
* Before subscription plan changed
|
||||
*/
|
||||
export interface PlanChangeStartedEvent {
|
||||
segment: 'settings panel';
|
||||
module: 'pricing plan list' | 'billing subscription list';
|
||||
control:
|
||||
| 'new subscription' // no subscription before
|
||||
| 'cancel'
|
||||
| 'paying'; // resume: subscribed before
|
||||
type: SubscriptionPlan;
|
||||
category: SubscriptionRecurring;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import type { PlanChangeStartedEvent } from './plan-change-started';
|
||||
|
||||
/**
|
||||
* Subscription plan changed successfully
|
||||
*/
|
||||
export type PlanChangeSucceededEvent = Pick<
|
||||
PlanChangeStartedEvent,
|
||||
'control' | 'type' | 'category'
|
||||
>;
|
||||
Reference in New Issue
Block a user