feat(server): refresh subscription (#13670)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Added an on-demand mutation to refresh the current user's
subscriptions, syncing with RevenueCat when applicable and handling
Stripe-only cases.
* Subscription variant normalization for clearer plan information and
consistent results.

* **Tests**
* Added tests for refresh behavior: empty state, RevenueCat-backed
multi-step sync, and Stripe-only scenarios.

* **Client**
* New client operation to invoke the refresh mutation and retrieve
updated subscription fields.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
DarkSky
2025-09-29 20:35:18 +08:00
committed by GitHub
parent 8006812bc0
commit 2d1caff45c
6 changed files with 240 additions and 14 deletions
+3
View File
@@ -1299,6 +1299,9 @@ type Mutation {
"""mark notification as read"""
readNotification(id: String!): Boolean!
recoverDoc(guid: String!, timestamp: DateTime!, workspaceId: String!): DateTime!
"""Refresh current user subscriptions and return latest."""
refreshUserSubscriptions: [SubscriptionType!]!
releaseDeletedBlobs(workspaceId: String!): Boolean!
"""Remove user avatar"""