Skip to content

Conversation

@lexiv0re
Copy link
Collaborator

@lexiv0re lexiv0re commented Oct 20, 2025

  • Adds subscription management

@lexiv0re lexiv0re requested review from aonnikov and Copilot October 20, 2025 06:50
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a subscription management system for the Huly Platform, adding support for tracking workspace subscriptions with billing provider integration. The implementation provides a provider-agnostic abstraction for managing subscription statuses, types, and billing periods.

Key changes:

  • Added comprehensive subscription type definitions and enums for status and types
  • Implemented service operations for upserting subscriptions (billing service only)
  • Added user operations for retrieving subscriptions with role-based access control

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
server/account/src/types.ts Defines subscription enums (SubscriptionStatus, SubscriptionType) and Subscription interface with provider-agnostic fields
server/account/src/serviceOperations.ts Implements upsertSubscription function for billing service to create/update subscriptions
server/account/src/operations.ts Adds getSubscriptions function with role-based access control for workspace owners/maintainers
server/account/src/collections/postgres/postgres.ts Integrates subscription collection into PostgreSQL database implementation
server/account/src/collections/postgres/migrations.ts Adds V19 migration to create subscription table with proper indexes and constraints
server/account/src/collections/mongo.ts Integrates subscription collection into MongoDB database implementation
server/account/src/tests/serviceOperations.test.ts Comprehensive test coverage for upsertSubscription function
server/account/src/tests/operations.test.ts Complete test coverage for getSubscriptions function including access control

@huly-github-staging
Copy link

Connected to Huly®: UBERF-13958

@lexiv0re lexiv0re force-pushed the subscriptions branch 2 times, most recently from 463c687 to 73d8518 Compare October 28, 2025 22:24
Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>

Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>

Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>

Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>

Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>

Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>

Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>

Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>

Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>

Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
lexiv0re and others added 10 commits October 30, 2025 01:19
Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>

Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>

Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>

Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>

Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
…ured

Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>

Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>

Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>

Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
…nceled sub

Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>

Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
@lexiv0re lexiv0re marked this pull request as ready for review October 29, 2025 21:48
Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
@lexiv0re lexiv0re requested a review from aonnikov October 29, 2025 22:51
@haiodo haiodo merged commit df50eab into develop Oct 30, 2025
15 checks passed
@haiodo haiodo deleted the subscriptions branch October 30, 2025 03:45
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.

4 participants