Граф коммитов

117 Коммитов

Автор SHA1 Сообщение Дата
Reino Muhl 275ecdb0b8
feat(next): reorg checkout pages
Because:

* Reorganize checkout pages to include intent and cartId in path, and
  allow for landing page.

This commit:

* Reorganizes checkout pages
* Add checkout landing page
* Add getLocaleFromRequest and update l10n locale logic

Closes #FXA-7804
2024-02-22 13:06:09 -05:00
Julian Poyourow 388e01e52d
feat(mysql): add AccountCustomers and PaypalCustomers 2024-02-21 10:34:05 -08:00
Lisa Chan 99f6e5e4c8
fix(payments): Return sorted capabilities 2024-02-16 10:58:26 -05:00
Julian Poyourow 5b03fa14e3
fix(type-cacheable): caching TTL 2024-02-14 10:26:26 -08:00
Julian Poyourow 573a18be60
feat(auth): type-cacheable firestore and networkfirst adapter 2024-02-14 09:01:30 -08:00
Reino Muhl 7e5e74236b
fix(auth): offering comparison upgrade fix
Because:

* Offering comparison in the eligibility manager incorrectly indicates
  a downgrade if the difference between the target and source index
  is greater than 1, which can happen for subgroups with multiple
  offerings.

This commit:

* During offering comparison, if the difference between target and
  source index is positive, return UPGRADE, for values that are the same
  return SAME, and negative values return DOWNGRADE.

Closes #
2024-02-13 19:32:35 -05:00
Lisa Chan 8cfa910972
feat(payments-paypal): Create PayPalManager 2024-02-13 15:54:07 -05:00
Lisa Chan f6bfe1e961
Merge pull request #16408 from mozilla/paypal_files
fix(payments-paypal): Rename PayPal library filenames
2024-02-13 14:49:49 -05:00
Lisa Chan 8119a0a910
Merge pull request #16407 from mozilla/create_stripeclient
feat(payments-stripe): Create StripeClient and StripeManager
2024-02-13 14:46:00 -05:00
dschom 6902ac3b03
task(shared, graphql): Record ip in security events 2024-02-12 18:21:15 -08:00
Lisa Chan de80c7f1bc
Merge pull request #16271 from mozilla/hackathon_bonus
chore(next): Hackathon bonus tasks
2024-02-12 14:06:24 -05:00
Lisa Chan ff7413d833
feat(payments-stripe): Create StripeManager 2024-02-12 13:44:40 -05:00
Lisa Chan 0056e3c812
feat(payments-stripe): Create StripeClient 2024-02-12 13:28:54 -05:00
Lisa Chan d8b074d5e7
fix(payments-paypal): Rename PayPal library filenames 2024-02-12 13:26:08 -05:00
Reino Muhl 40be842af4
Merge pull request #16390 from mozilla/nx-18-upgrade-v2
chore(nx): upgrade to nx 18
2024-02-12 11:34:26 -05:00
Reino Muhl bbcc07802a
feat(contentful): Add statsd metrics to contentful
Because:

* Want to track number of requests and timings of those requests made
  to contentful.

This commit:

* Adds event emitter to Contentful Client, similar to PayPal Client.
* Add statsd to Contentful Manager to to track requests timings on
  contentful client event.

Closes #FXA-9031
2024-02-12 09:42:21 -05:00
Reino Muhl 2df7ca494a
chore(nx): upgrade to nx 18
Because:

* Want to migrate Nx to latest

This commit:

* Migrate nx to 18 using nx cli migrate latest
* Readd a few dev dependancies back into packages/**/package.json
  * Behavior of `npx nx...` commands seems to have changed, resulting in
    multiple "command not found: <library>" errors, where <library>
    refers to libaries used in packages/**/package.json scripts, such as
    tailwindcss, tsc-alias, nx, etc.
* Updates nx cache location for Circle CI

Closes #FXA-8880
2024-02-12 09:01:00 -05:00
Lisa Chan c830f10f0e
chore(next): Bonus tasks - update Error page to include error mapping, update pages to include l10n 2024-02-08 10:23:54 -05:00
Meghan Sardesai 293347b191
Merge pull request #16348 from mozilla/update_Contentful_services_capabilities
fix(contentful): update field validation in capabilities and services
2024-02-07 09:40:35 -08:00
Reino Muhl 01a7d0be6b
feat(auth): partial firestore cleanup script
Because:

* Need to remove customers and related subcollections, from firestore,
  for customers already deleted in FxA.

This commit:

* Adds a script that parses through all Firestore customer records, and
  checks if the customer has a valid FxA account. If not, the uid is
  added to the delete account cloud task queue, for deletion.

Closes #FXA-8969
2024-02-07 11:22:16 -05:00
Meghan Sardesai 3f41a85ada
fix(contentful): update field validation in capabilities and services
Because:

* A mismatch was occurring between Stripe and Contentful capabilities due to the latter not being marked as required.

This commit:

* Updates Capability and Service to required to ensure items are populated before publishing.

Relates to FXA-9052
2024-02-06 14:50:55 -08:00
Lisa Chan 0b065c7d1d
Merge pull request #16335 from mozilla/update_newsletterLabelTextCode
fix(contentful): Remove 'default' from newsletterLabelTextCode
2024-02-06 17:08:56 -05:00
Meghan Sardesai 1683e7056a
fix(contentful): validate that items in planIdsToClientCapabilities are populated
Because:

* Sentry is throwing an undefined error when `items` are missing.

This commit:

* Validates that `capabilitiesCollection` items and `servicesCollection` items are populated or returns an empty array.
* Adds additional tests to check that both collections are populated.

Closes FXA-9052
2024-02-05 19:42:11 -08:00
Lisa Chan c843b11c55
fix(contentful): Remove 'default' from newsletterLabelTextCode 2024-02-05 09:43:51 -05:00
Valerie Pomerleau 1558bc05ff
feat(copy): Update references to Firefox Monitor with Mozilla Monitor
Because:

* Monitor is rebranding

This commit:

* Update all references and l10n strings and terms from Firefox Monitor to Mozilla Monitor
* Update link to monitor's site

Closes #FXA-9036
2024-01-24 14:06:29 -08:00
Valerie Pomerleau e6d5833e9a
feat(auth): Add atLeast18AtReg value to account
Because:

* Some RPs (currently only Moz Social) would like to know if users were at least 18 at time of account registration to prevent asking users a second time if we've already confirmed at COPPA check that they are at least 18

This commit:

* Adds a new atLeast18AtReg column in the account database, with default set to null for existing accounts
* At account registration via backbone or React, checks if the submitted age is at least 18 and store the response as a boolean value (we do not store the exact age)
* Makes this value available to RPs at the v1/profile endpoint via account/profile

Closes #FXA-8751
2024-01-22 22:13:41 -08:00
Reino Muhl 5090aa6887
fix(next): error on page refresh
Because:

* Async function in render logic caused hydration error on page refresh

This commit:

* Remove async from `getFormatedMsg` wrapper function

Closes #FXA-8852
2024-01-22 11:45:42 -05:00
dschom 00856bd974
PR Feedback - can just stub a v1 account 2024-01-18 10:20:39 -08:00
dschom dce3709678
PR Feedback - Don't set wrapWrapKb2 on stub account 2024-01-18 10:11:18 -08:00
dschom 447da5eaf6
PR Feedback
(will squash before merge!)
2024-01-17 09:16:58 -08:00
dschom 1d9b18b3fa
task(auth): Support V2 credential format
Because:
- We want to add support for up coming changes to key stretching in the auth server first
- We want to ensure all changes are backwards compatible

This Commit:
- Updates test to use approach for the client side stretch where:
   - Stretch uses 650k iterations
   - Client salt uses random value instead of user's original email
- Updates tests to run using both V1 and V2 credentials
- Updates database to support new  columns for housing V2 credentials
- Updates account models accordingly
- Adds statsd metrics to track use of v2 credentials
- Updates CI tests to run remote integration tests for V2 credentials
2024-01-17 09:16:57 -08:00
Reino Muhl 0a58cf823b
fix(auth): contentful comparison per product
Because:

* The Contentful content is fetched for only one locale, however the
  comparison logic was comparing it against all plan's for all "locales"
  configured for a product.

This commit:

* Updates the error reporting to only include 1 error message per ID.
  Typically this will be a Stripe product ID.
* Adds the request acceptLanguage to Sentry context, so that it is
  easier to identify which language the comparison was done for.

Closes #FXA-8856
2024-01-02 17:43:34 -05:00
Lisa Chan 3c34572801
fix(contentful): Fix Contentful errors around complexity - EligibilityContentByPlanIds 2023-12-22 16:51:25 -05:00
Reino Muhl 7c162af868
fix(contentful): add support for zero results
Because:

* Update ContentfulManager method to account for zero results returned
  by Contentful query.

This commit:

* Updates while loop condition

Closes #FXA-8865
2023-12-22 13:01:55 -05:00
Lisa Chan c76abb30df
fix(shared-contentful): Fix Contentful errors regarding query size 2023-12-19 16:55:21 -05:00
Meghan Sardesai a8803ba203
fix(contentful): Contentful errors around complexity
Because:

* Queries were exceeding complexity and throwing errors in Sentry.

This commit:

* Reduces complexity of the affected query.
* Adds `total` and pagination.

Closes FXA-8747
2023-12-15 11:52:41 -05:00
Lisa Chan 7dd8974a9a
chore(shared-contentful): Add support for Offering.stripeLegacyPlans 2023-12-07 16:11:06 -05:00
Meghan Sardesai 2403735dab
chore(lib): move unsorted queries into their own directories
Because:

* We want SP3 to have a soild foundation, consistency, and organization.

This commit:

* Moves `purchaseWithDetailsQuery` and 'offeringQuery' into their own directories.
* Moves related content into respective directories and updates paths.
* Updates types and factories where applicable.
2023-12-06 19:51:33 -05:00
Ben Bangert 3878034f0b
feat: add winston logger and nest helper
Because:

* We want to use winston for logging in new applications.

This commit:

* Adds winston logging and Nest helpers with a console monkey-patch.
2023-11-30 12:22:35 -08:00
Lauren Zugai 0cdee94037
chore(all): Upgrade GQL and dependencies
Because:
* We want to use the latest graphql dependency

This commit:
* Updates GQL dep and all packages relying on it
* Moves some dependencies to root package.json
* Removes a couple of deps we aren't using
* Addresses breaking changes, updates related tests and mocks
* Fixes type errors
* Prettifies contentful autogenerated files

closes FXA-8489

Co-authored-by: Ben Bangert <100193+bbangert@users.noreply.github.com>
Co-authored-by: Julian Poyourow <julianpoyo@gmail.com>
Co-authored-by: Reino Muhl <reino.muhl@gmail.com>
2023-11-30 11:47:57 -06:00
julianpoyourow fff34584f6
fix(contentful): switch to graphql-request for contentful client
Because:

* We've had numerous problems with Apollo Client server-side (it's intended as a frontend client, mostly for React).

This commit:

* Replaces Apollo Client with graphql-request for server-to-server graphql requests in the Contentful lib.

Closes FXA-8645
2023-11-20 10:56:49 -08:00
Reino Muhl bee0b2c3bc
Merge pull request #16047 from mozilla/fxa-8538-update-plans-with-contentful
fix(auth): add contentful to plans api
2023-11-17 11:48:13 -05:00
Reino Muhl a9259228ad
fix(auth): add contentful to plans api
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
2023-11-17 10:26:54 -05:00
Meghan Sardesai b5df8d8add
chore(l10n): update fxa-payments to use fxa-shared branding
Because:

* Branding should not have multiple translations and the same terms should be used across FxA and SubPlat.

This commit:

* This reduces clean up, potential translation duplication, and improves maintenance of branding.

Closes FXA-8403
2023-11-16 12:03:25 -05:00
Ben Bangert dc48fa8acf
Merge pull request #15928 from mozilla/FXA-8273-legacycapabilityservice-add-eligibilitymanager-ge
feat: add eligibility manager to capability service
2023-11-15 09:56:03 -08:00
Ben Bangert 5b6b9a0a8d
feat: add eligibility manager to capability service
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
2023-11-15 09:29:50 -08:00
Meghan Sardesai a54331a42f
chore(factories): move factories into their respective shared-contentful directories
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
2023-11-09 17:31:59 -05:00
Lisa Chan cfa6630009
fix(contentful): Add help text to fields and updated default locale 2023-11-08 13:37:43 -05:00
Meghan Sardesai c8a059e468
feat(contentful): add planIdsToClientCapabilities to capability manager
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
2023-11-06 13:39:44 -05:00
Reino Muhl 946397ab10
Merge pull request #16024 from mozilla/fxa-8537-add-query
feat(contentful): add purchase common query
2023-11-03 19:20:01 -04:00