-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature(admin-panel): Add nestjs subscription service
Because: - We want to display account subscription data in the admin panel. This Commit: - Hooks up the Account React component to real subscription data. - Fixes a long standing issue with Knex in the admin panel! Knex instance is now bound to BaseAuthModel and repurposed across derived classes. - Introduces a subscription module that provides the nestjs services necessary to retrieve subscription data. - Introduces a subscription service that acts as the primary point of request for subscription data. - Introduces stripe service so that stripe can be dependency injected. - Introduces firestore service so that firestore can be dependency injected. - Introduces play store service so that play store accessor can be dependency injected. - Introduces app store service so that app store accessor can be dependency injected. - Introduces subscription formatters that unify subscription dtos into standard response format. - Improves config setup to allow for local.json and secrets.json files to be used. - Introduces configuration settings so that underlying services can be accessed. - Introduces feature flags to disable queries to underlying stripe, google or apple apis. - Hoists a couple joi validators up to fxa-shared for reuse. - Breaks out an auxiliary method that can determine product ids given iapType and a plan. This exists in in stripe.ts in fxa-shared. (The previous code had zero dependence on the stripe class, which made this possible. This was primarily done for testing purposes.) - Exposes a couple more fields on AppStoreSubscriptionPurchase to support subscription formatting. - Fixes typing on MozSubscription.endedAt. Value is allowed to be null | undefined. - Adds tests and achieves 90+ percent test coverage on all new code. - Adds reusable mocks for standard services to facilitate testing. - Updates readme with info about subscriptions, configuration, feature flags, and testing. - Updates pm2.js with better defaults to support subscription service.
- Loading branch information
Showing
38 changed files
with
2,417 additions
and
298 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.