Because:
* We want to use the new eligibilitymanager in the capability service
and compare its results to the existing check, reporting any
differences in the eligibility comparison.
This commit:
* Adds the eligibility manager to the capability service.
* Adds a wrapper to the results of the elgibility call to verify it
matches the existing comparison, and report to Sentry if it doesn't.
Closes FXA-8273
Because:
* The main factories file was getting a bit out of hand and separating them keeps everything more organized.
This commit:
* Moves eligibility and services factories into their own directories.
* Updates factories that include more than the single override parameter.
* Updates paths where applicable.
* Updates tests where applicable.
* Adds missing tests for planIdsToClientCapabilities
Closes FXA-8621
Because:
* We want to fetch the list of capabilities for the given plan ids.
This commit:
* Adds planIdsToClientCapabilities method to the capability manager.
Closes FXA-8240
Because:
* Need to query Purchase Details and Common Content for an array of
stripe plan ids.
This commit:
* Adds PurchaseWithDetailsOfferingContentUtil to retrieve the necessary
data from Contentful for a specific locale.
Closes #FXA-8537
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:
* Apollo client provides no means of setting a cache TTL
This commit:
* Sets up cache busting on a 5 minute interval by default, configurable via optional Nestjs config option.
Because:
* Settings and payments were not automatically displayed in RTL for languages such as Hebrew
This commit:
* Set lang and dir with react helmet
* Add method to determine locale dir, with unit tests
* Add list of rtl locales
Closes #FXA-6234
Because:
- We want to Mozilla branding in content server
This Commit:
- Activates the l10n strings fro Mozilla branding
- Updates css to be inline with branding
- Creates 'Old L10N' strings that will be removed. These are placeholders just in case we need to roll something back.
- Moves the mozilla logo out of the footer and to the top left
Because:
* Manual changes were needed to all nx libraries to ensure expected
TypeScript build and development intellisense behavior.
This commit:
* Removes the "rootDir" build option added to all libraries, to allow
for relative paths. This is no longer necessary since issues using
TypeScript path aliases have been resolved.
* Removes changes to "main" build option, which ensured the built
version of package.json had the correct path to the main index.js.
Closes #
Because:
* We want to determine whether a customer is eligible for a plan
offering, and if so, which offering they are eligible for.
This commit:
* Adds the getOfferingOverlap method to the eligibility manager.
Closes FXA-8241
Because:
* Nest app config loader needs to support uppercase env vars
This commit:
* Adds support for uppercase env vars to Nest app config loader
* Update MySQLConfig to handle normalization
* Fixes issue loading l10n ftl files
Closes #
Co-authored-by: Ben Bangert <ben@groovie.org>
Because:
* Need to determine a valid locale configured in Contentful.
This commit:
* Add getLocale method to ContentfulClient to determine locale using
locales available in Contentful and defaulting to 'en' as a fallback.
Closes #FXA-8225
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:
* We want to easily expose complete type-safe query methods to callers
of the contentful client.
This commit:
* Adds a contentful manager class that exposes an eleigibility helper
method along with appropriate types.
Closes FXA-8405
Co-authored-by: Julian Poyourow <7751154+julianpoy@users.noreply.github.com>
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:
* We will be using the Contentful hCMS (specifically their GraphQL Content API) to replace Stripe metadata for RP-provided content in SubPlat 3.0.
This commit:
* Updates `CONTENTFUL_API_KEY` to `CONTENTFUL_GRAPHQL_API_KEY`.
* Adds additional properties — `CONTENTFUL_GRAPHQL_SPACE_ID` and `CONTENTFUL_GRAPHQL_ENVIRONMENT`.
* Updates `ContentfulClientConfig` to include `spaceId` and `environment` properties.
* Updates `ContentfulClient` to build the Contentful GraphQL URL from those properties.
* Updates GraphQL codegen after addition (2) and update (1) of aforementioned properties.
Closes FXA-8211
Because:
* With components split into libraries, we don't want to include styles
in components that are defined/provided by the application consuming
the components
* Split common JSX into smaller components where it makes sense
* Continue down the div reduction path
This commit:
* Removes non-global CSS files
* Where applicable, replace divs with landmarks that add more value
for example lists and sections.
* Added <ListLabelItem> to PurchaseDetails component
* Remove unused styles
* Replace non-reused tailwind utility classes with inline declerations
Closes #
Because:
* We want to load/cache the NestJS services on the first request to the
app, so that the first request is not slow.
* We should use proper NextJS project organization.
This commit:
* Adds a new route to the app that the loadbalancers utilize, to ensure
that the NestJS services are loaded before the first request to the
app.
* Moves internal implementation that shouldn't be routed to, behind the
underscore directory prefix.
Because:
* We want to be able to call server-side logic with our business classes
directly from the nextJS app before rendering on the server.
This pull request:
* Adds a NestJS application context to the NextJS app that can be used
to load services and call methods on them.
Because:
* Purchase was previously only queriable via `linkedFrom`, which
increased query complexity and was a little cumbersome.
This commit:
* Updates the Contentful typings for the schema change
* Uses the offering directly from the Purchase
* Renames a few things for standardization
Closes FXA-8314
Because:
* We need a starter for a cart service as described in FXA-8130
This commit:
* Adds a skeleton for a cart service with the methods described in
FXA-8130
Closes FXA-8130
Co-authored-by: Ben Bangert <100193+bbangert@users.noreply.github.com>
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 need to be able to fetch a list of capability slugs and client IDs
based on a list of priceIds.
This commit:
* Adds a query to fetch that information from Contentful via a GraphQL
query, along with updated typings.
Closes FXA-8178
Because:
* We need to fetch purchase details with many other joined fields from
contentful.
This commit:
* Adds a query that joins in all dependent data.
Closes FXA-8179
Co-authored-by: Meghan Sardesai <104124653+sardesam@users.noreply.github.com>
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'd like to be able to use Nest-Typed-Config with a structured config file that can be validated at runtime if desired.
This commit:
* Adds a typed config class for the Contentful client.
* Reference PR: https://github.com/mozilla/fxa/pull/15724
Closes #No ticket
Because:
- Not all CI operations where taking advantage of NX caches
This Commit:
- Adjusts nx.json config to ensure correct caching behavior
- Adjusts nx.json config to ensure proper target chains. ie build is dependent on pre-build
- Uses nx to directly run integration tests
- Uses nx to directly run unit tests
- Phases out dependency on generated .list files
- Ensures 'start up' for services for functional tests is done with nx and uses nx caches.
- Creates nx tags to facilitate test commands
- Fixes linter errors encountered
- Updates docker images to nx for builds
- Updates nx ignore files
Because:
* The paypal client config is a basic interface, and we'd like to be
able to use Nest-Typed-Config with a structured config file.
This commit:
* Adds a typed config class for the paypal client.
Because:
* We want to easily be able to consume library classes within NestJS.
Adding the injectable decorator to all library classes means we can do
so with ease, but also doesn't prevent us from using the class outside
of the NestJS DI system.
* We want all dependencies (such as nest) centralized to the main
package.json
This commit:
* Adds the injectable decorator to every library class.
* Centralizes the NestJS dependency to the root package.json.
Closes: no relevant issue - polish PR.
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:
- Refactor the Cart Manager to serve as higher level logic for the
cart db model.
This commit:
- Removes service level logic.
- Adds common methods to be used by Cart Manager consumers.
- Adds checks for valid state by action and valid state transitions.
- Reverts playwright tests back to xlarge instance size
Closes FXA-8128
Because:
- Allow for optimistic locking for the carts table
This commit:
- Adds migrations to add version field to carts table.
- Updates patchById with version logic
- Updates cart model and test scripts
Closes FXA-8132
Because:
- we want to be able to use packagename based imports, defined in
tsconfig.base.json paths, throughout the repo.
This commit:
- Adds a workaround fix to libs/**/project.json > main properties to
ensure that the built dist/libs/**/.package.json has the correct
main property.
- Upgrades esbuild-register to latest version, which includes
tsconfig path resolution.
- Adds tsconfig-paths to auth-server mocha based tests.
- Adds various workarounds to fxa-graphql-api including the following
- Adds paths from `tsconfig.base.json` to `tsconfig.build.json`
excluding the extension.
- Add pathToModuleNameMapper to all jest*.config.js
- Add build step before tests are run
Because:
- The CI already targets test-unit
- We want to draw a distinction between unit and integration tests.
This Commit:
- Renames "test" to "test-unit" in lib packages.
- Sets up CI to run integration tests on 'libs' folder packages
- Adds tags to nx projects in libs folder
Because:
* Some items were identified not to meet code organization standards
the team is implementing with Nx.
* Nx identified some circular dependencies that need resolving.
This commit:
* Resolves circular dependencies.
* More to do
Because:
* We had some last minute tweaks to the error arrangement.
This commit:
* Moves the error class to the library using it and inherits from a
shared base error.
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:
* The circular dependency between account and core was causing
problems with the build.
This commit:
* Moves the setup function from core to account.
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:
* objectToNVP converts object properties with undefined values to a
string with value undefined. PayPal expects undefined values to be
an empty string param.
This commit:
* Converts object properties with an undefined value to empty string.
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