Because:
- we want to use OTPs to improve the UX of the password reset flow
This commit:
- adds a lib for generating and validating random numeric OTPs
- adds a new auth-server endpoint for requesting the OTP in an email
- this endpoint does not send an email yet; To Be Implemented
Because:
- We want to let RPs know when users opt out of metrics collection
- We want to let RPs know when users opt in to metrics collection
This Commit:
- Ports the notifier code over to nx libs from auth server
- Ports other supporting libraries from fxa-shared to nx libs
- MozLoggerService
- Sentry
- Metrics (ie statsd)
- Updates graphql to emit a 'metricsChange' event when users toggle their 'Help improve Mozilla accounts' option in settings.
- Adds support for the metricsChanged event to the fxa-event-broker
Because:
* Call CartService.setupCart from payments-next via server action.
This commit:
* Extracts fxa-geodb into libs/* library
* Updates CartService to include GeodbManager
* Call setupCart from payments-next
Closes #FXA-8892
Because:
* Ensure all localization strings can be localized in React Server
Components.
This commit:
* Removes LocalizerServer
* Adds LocalizerRSC to serve as a wrapper for ReactLocalization that can
be used by React Server Components, as well as a few other utility
methods.
* Adds LocalizerRscFactory that instantiates LocalizerRSC only with
bundles for a provided acceptLanguage string.
* Adds LocalizerRscFactoryProvider to be used with the NestApp to
instantiate and then intialize the LocalizerRscFactory. Initalization
will fetch all messages from disk and populate the bundles.
* Reorganize shared/l10n library to match Node style guide
* Removes demo l10n code
* Update purchase-details, terms-and-service components, and success and
error pages to use new LocalizerRSC class for localization.
* Adds temporary l10n-convert script to provide translation for existing
ftl strings.
Closes #FXA-8822
Because:
* Create a localizer class that can be used by payments next react
server components.
* Only generate fluent bundles once on startup.
This commit:
* Moves logic from Localizer class, defined in
`fxa-auth-server/lib/l10n/index.ts`, to a LocalizerBase class.
* Adds LocalizerServer class to be used by payments next.
* Moves nestapp from payments-next app to a library
Closes #FXA-8821
Because:
* We want to update to Node 20 LTS.
* We want to target the JS output of Node 20.
* We want to use the latest TypeScript 5.4
This commit:
* Updates the Node version to 20 LTS.
* Updates the TypeScript version and related TS libs
to 5.4.
* Updates tsconfig for the new Node 20 target.
Because:
- We want to delete accounts from the admin panel
This Commit:
- Adds cloud task emulator pm2 service
- Creates cloud-task nx lib for interacting with cloud tasks
- Creates PageDeleteAccount in admin panel
- Adds ability to delete accounts to admin server's account resolver
- Fixes broken admin panel configuration
- Fixes broken admin server configuration
Because:
* The GET /plans API is used in multiple places to retrieve the relying
party configuration data currently configured in Stripe.metadata
This commit:
* Updates the logic used by the GET /plans API to retrieve the relying
party configuration data from Contentful, with Stripe.metadata as a
fallback
* Reports a Sentry error when the Contentful configuration data does not
match the Stripe.metadata
Closes #FXA-8538
Because:
* we want to employ the factory pattern for mocking testing data
This commit:
* adds factory functions for several stripe objects
Closes #FXA-8311
Because:
* We want to use functions from fxa-shared/l10n in new libs/* libraries
including libs/shared/contentful.
This commit:
* Moves fxa-shared/l10n to libs/shared/l10n
* Updates all references in packages/*
Closes #FXA-8228
Because:
* Plan eligibility depends on a number of factors, including what plans the user is already subscribed to (in Stripe, Google IAP or Apple IAP) and available upgrade paths for those plans per product-specific config (in Stripe metadata currently but soon to live in Contentful).
* We want to break out eligibility checks and types into a separate library from the auth server's `CapabilityService.getPlanEligibility`, since it's not really capability-oriented.
This commit:
* Generates a new nx library in lib/payments/eligibility
Closes #FXA-7582
Because:
* Create the initial work for the Checkout page as a starting point and
example for the rest of the SP3 components and pages.
This commit:
* Adds the payments/next/ui Next.js library.
* Move Header JSX into layout.tsx and remove ExampleHeader component.
* Add RSC PurchaseDetails, using JSX from SP2.5 PlanDetails component.
* Add RSC TermsAndPrivacy component
* Add various stubs functions for illustration purposes. These will be
replaced with actual implementations in future tickets.
* Cart fetch
* Contentful fetch
* Translation using @fluent/bundle
Closes FXA-8133
Because:
* We want to include Storybook in 3.0.
This commit:
* Ensures Storybook component loads as expected.
* Ensures shared Tailwind styles can be used in payments-next and works with hot-reloading.
* Ensures the build script executes without any errors.
Closes FXA-7503
Because:
* We want to have a single place to manage account related operations in
the database layer.
This commit:
* Adds a new AccountManager class and account package.
Closes #FXA-6623
Because
- We need a reusable client for accessing contentful
This Commit
- Adds a contentful client with automated codegen
- Creates a reusable query system
Closes FXA-7501
Because:
* We want an error library to generalize error handling across all new integrated libraries.
This commit:
* Generates a new JS library with nx called shared-error that exports a few error classes.
* Ports the PayPalClientError to the new library as an example error (renamed to PayPalNVPError with PayPalClientError becoming a MultiError composed of one or more PayPalNVPErrors), refactoring the multiple error handling logic to a new helper.
Closes #FXA-7656
Because:
* Need a library to handle the cart db table and related functions
This commit:
* Add cart DB model
* Initializes the Cart library and creates factories and types
* Adds CartManager library
* Adds Cart related resolvers with basic Cart DB queries
Closes: #FXA-7508 #FXA-7505
Because:
* We want to use clean and well tested code for our new integrated
account database layer.
* We don't want to use stored procedures for new code.
This commit:
* Adds a new library that contains core mysql connection functionality.
* Duplicates core objection classes and setup from fxa-shared without
stored procedure functionality.
Closes FXA-6622
Because:
* Nx gives us the ability to break things up into smaller libraries with
individual responsibilities.
* Paypal logic can exist in a standalone library for reusability in SP3
This commit:
* Moves PayPalClient and associated utils/typings to a library named
`subs/paypal`. It can be imported via `@fxa/payments/paypal` in any
TypeScript code.
Closes FXA-7610
Because:
* We want to introduce nx to the repository
This commit:
* Adds nx with working builds
Closes: FXA-7341
Co-authored-by: dschom <dschomburg@mozilla.com>