Skip to content

Conversation

@engfragui
Copy link
Contributor

@engfragui engfragui commented Nov 7, 2025

As part of our current "Pro Legacy" effort (as in: we'll move some old Pro users to a new limited plan called Pro Legacy, which will have limited features, i.e. it won't have access to our AI Assistant extension), I need/want to make our AI Assistant extension aware of a more granular attribute based on which to determine if the user should have access to the AI Assistant extension: premium_status.

In fact, looking at premium_status, we'll be able to make sure that we only allow users when premium_status is either current_personal_plan or teams_business_member but not if it's legacy_personal_plan or not_premium. The AI Assistant change is drafted in https://github.com/Doist/event-integrations/pull/2269 but needs todoist-api-typescript to start returning premiumStatus, which it's what this current PR does.

Backend refs:

Refs:

@engfragui engfragui self-assigned this Nov 7, 2025
avatarSmall: z.string().nullish(),
businessAccountId: z.string().nullable(),
isPremium: z.boolean(),
premiumStatus: z.string(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we already know what all the values will be, could we not make this an enum type?

Copy link
Contributor Author

@engfragui engfragui Nov 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was about to say that we don't use enums in this schema anywhere, but that's not true because we do that for workspace role, workspace plan, workspace plan status, upload status, etc.

The only downside is that if we ever want to add some enum values for this field we'd have to open a PR against this repo to add the new field, however 1. I don't think that'll be very often, 2. it's not that much work 😅

Hence, I'll update this PR now to switch to the enum type 👍

@scottlovegrove scottlovegrove force-pushed the francesca/expose-premium-status branch from 43f92bf to 5b48ca5 Compare November 8, 2025 14:27
@engfragui engfragui merged commit 4c66fed into main Nov 10, 2025
2 checks passed
@engfragui engfragui deleted the francesca/expose-premium-status branch November 10, 2025 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants