Commit Graph

41 Commits

Author SHA1 Message Date
Simon Gardner
8869dd5f32 Consistently import Stripe prices with interval: 12 monthly rather than yearly. (#33536)
* ensure imported annual prices are 12-monthly
* script to convert annual prices to 12-monthly

GitOrigin-RevId: b7af88156bde510ecdf080fc97384463fa77db13
2026-05-11 08:06:24 +00:00
Simon Gardner
feb4f49859 [fix] use Stripe productId rather planCode when adding prices (#33344)
GitOrigin-RevId: 6e24317a0086332145c88a9be3b700b96d7a1187
2026-05-04 08:05:50 +00:00
Kristina
9a670805c4 [scripts] handle creating custom prices (#32607)
GitOrigin-RevId: 3950698ca21de5d8ee87d0531e1e9f562aeb76f8
2026-05-04 08:05:46 +00:00
Jakob Ackermann
4ce5620b1d [web] add metrics for mongo access in split test system (#32920)
GitOrigin-RevId: cd93401bace60c003a63914e2898cf1f0defdabc
2026-04-21 08:05:14 +00:00
roo hutton
9197be0ec7 Merge pull request #32376 from overleaf/rh-cio-migrate-identifiers
Replace analytics id with user id as main identifier in customer.io

GitOrigin-RevId: 780671a51b652c73a940bc152d8fd6916dd611ce
2026-04-02 08:05:48 +00:00
Kristina
ad853d661a [migration] fix issues found in finalization script during stage 3b (#32472)
* accept taxInfoPending as tax id comparison point
* convert recurly unit amount to minor units correctly for no cent currencies
* Use original subscription currency in finalization check
* make it easier to spot migrated with tax info pending

---------

Co-authored-by: John Lees-Miller <jdleesmiller@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
GitOrigin-RevId: d3c74032bc06369fcf6bafb4cfaff85c49a3cfef
2026-03-30 08:05:28 +00:00
Anna Claire Fields
6113c6c291 Enable TS noImplicitAny in web (#31636)
GitOrigin-RevId: 18881694770f2476c475f8fef4c6a2678a2a12fe
2026-03-27 09:05:30 +00:00
Kristina
fe7dad5644 [migration scripts] detect account drift between Recurly and Stripe (#32315)
* add a script to detect drift between recurly and stripe
* only flag when Recurly updated since subscription created in Stripe
* add --comparison-date option instead of stripe subscription created time
* reduce API calls by checking Recurly update time earlier

GitOrigin-RevId: f0ecb5644f7445603da020a46e32622fcd2eebf4
2026-03-25 09:05:43 +00:00
Kristina
d6ec60017e [web] update scripts to release migration schedules once migrated (#32150)
GitOrigin-RevId: 2fcf773649d2f87764c0cb93bb5623a17647b07c
2026-03-18 09:06:48 +00:00
Kristina
6c6c807ca0 [web] add script for checking tax estimations (#31404)
* add script to query taxes
* Use full address to determine tax
* use all applied taxes
* include status in tax script output
* add warning to the script
* only normalize US and CA
* default to RoW if no countries specified
* use RateLimiter and pqueue
* only normalize US postal codes

---------

Co-authored-by: John Lees-Miller <jdleesmiller@gmail.com>
GitOrigin-RevId: 01ecc1b1461e955b6c6a798a3a568e5b5f6bbcdb
2026-03-11 09:06:02 +00:00
Andrew Rumble
de75ea6d3b Merge pull request #31818 from overleaf/ar-actually-dedupe
[monorepo] run npm dedupe

GitOrigin-RevId: 6133acd7b28b536b777962024fd318c9c4d6c091
2026-03-06 09:09:07 +00:00
Kristina
820adf568e [web] add support for migrating paypal subscriptions (#31607)
* support Paypal for migration
* remove sensitive payment info in logging
* add `resolveStripeCustomer`

GitOrigin-RevId: a8fc7de4a4bf3971c5221a0dec3fc279d8d2f67d
2026-02-20 09:06:43 +00:00
Kristina
8872d851ec [web] rm unnecessary scripts (#31631)
GitOrigin-RevId: c6388685bd9cd43d8d22e38f25db4ee579def808
2026-02-19 09:06:45 +00:00
Kristina
85066c6cb3 [web] various migration script improvements (#31538)
* make warnings more eye catching in clean up dry run
* only increment processedCount after processing
* always rm recurlyAccountCode
* check if existing Stripe customer already has a subscription
* ensure no other customer accounts share the user id
* set recurly_to_stripe_migration_status to cancelled in cancel script
* add script for updating metadata of canceled migrations

GitOrigin-RevId: 3331de480e99774679ff2649b90d41e981a8fdef
2026-02-18 09:05:34 +00:00
Kristina
8ecb575d06 [web] apply runtime improvements to migration cleanup scripts (#31488)
GitOrigin-RevId: bfd7a34ecc5ab0b89a0aebae3f7bec995d490b31
2026-02-12 09:05:56 +00:00
Kristina
21ccf42ae8 [web] add script to bulk cancel subscription schedules (#31469)
GitOrigin-RevId: 1b037eb1335dd14a302bf478c3a4b71e219b074e
2026-02-12 09:05:19 +00:00
Kristina
d6cda7f770 [web] throw an error if multiple active subscriptions found (#31458)
GitOrigin-RevId: e0c2fe9ab73b0f8800f419ac1a3ff78adce29c5c
2026-02-11 09:06:47 +00:00
Kristina
f8d74187e1 [web] prefer mongo email when sending data to customerio (#31378)
GitOrigin-RevId: 33e137239d505e7feb6f6e1b2a00d7b5e60d0880
2026-02-10 09:06:08 +00:00
Kristina
a184a0c32f [web] handle pending changes in finalization script (#31342)
GitOrigin-RevId: 3f17c32d897e818d0ae1b0e33e66350de8513a8a
2026-02-10 09:06:03 +00:00
Kristina
1f5fec628b [web] apply runtime improvements to the finalization script (#31360)
* extract RateLimiter
* remove unnecessary remapping and wrappers

GitOrigin-RevId: fda1cdefa15f2f3fa9a042346a5ba4243897b90a
2026-02-10 09:05:58 +00:00
Antoine Clausse
9e41d9afdb Add script to create Stripe prices from CSV (#31144)
* Extract currency conversion and rate limiting functions to helpers

* Add script to create prices from CSV for Stripe integration

* Add tests for create prices from CSV script

* Add usage documentation for create_prices_from_csv script

* Add `planCode` metadata

* Temp: Plans CSV example

* Revert "Temp: Plans CSV example"

This reverts commit 810b1ed67052f7a1a0deb20b70f14507a282fcf1.

* Various improvements to price and product creation script

---------

Co-authored-by: Tim Down <158919+timdown@users.noreply.github.com>
GitOrigin-RevId: c015c6dd904db3143781581db4210cef282a4070
2026-02-10 09:05:28 +00:00
Kristina
4decfd343d [web] update finalization scripts for phase 2 (#31293)
* handle group quantities & add-ons when detecting changes
* include analyticsId in output
* flag users in customer-io
* rely on customer metadata for tax info needing updating
* rollback customer.io data in rollback script
* refactor how we handle errors when migrating to avoid losing data for output

GitOrigin-RevId: f77430b0b366217ac85b72dde92e9364dc879023
2026-02-06 09:05:07 +00:00
Kristina
0cabc81d46 Merge pull request #31218 from overleaf/kh-update-assistant-prices
* update Stripe AI assist prices
* add soft archive option to the archiving prices script

GitOrigin-RevId: 3f0b66cf227e31e03fb3337b3cb4c1b6a82bd1db
2026-02-04 09:06:34 +00:00
Kristina
3000a9108d [web] fix source on analytics mapping in finalization script (#31143)
* fix source on analytics mapping in finalization script
* add script to redo mappings for finalized subscriptions

GitOrigin-RevId: a62af6c6c7ae11f9bea62ed643c8dfa7595ba99b
2026-01-30 09:06:17 +00:00
Kristina
d6fbed2a74 [web] check end state before terminating (#31136)
* check and log unexpected end states before terminating Recurly subscriptions
* update finalize and rollback scripts to only postpone active subscriptions

GitOrigin-RevId: 7fe6ffa56cb8ddf19133eb0cb59e39fd783430b7
2026-01-30 09:06:12 +00:00
Kristina
ac1a61cafa [web] remap customer.metadata.recurlyAccountCode in migration scripts (#31097)
* remap customer.metadata.recurlyAccountCode to customer.metadata.userId
* verify recurlyAccountCode is what we expect it to be before setting

GitOrigin-RevId: 8ab1d5e311dba34bb8c15d01096f6c31273a7506
2026-01-29 09:06:08 +00:00
Kristina
49591a5190 [web] add scripts to finalize recurly -> stripe migration (#30925)
GitOrigin-RevId: 2149aa516a00b18927fea46e9241496b74478152
2026-01-26 09:06:33 +00:00
Olzhas Askar
3f7555e5a0 Merge pull request #30674 from overleaf/oa-import-coupons
[web] Simplify and allow multiple promotion codes

GitOrigin-RevId: 6ac1115bcdf4298579df33b3896ee0b786720bac
2026-01-14 09:05:55 +00:00
Kristina
29f5026dda [web] fix import products script when tax code is null (#30605)
GitOrigin-RevId: 32ca603376db7f186283514067178d27038a865d
2026-01-12 09:07:16 +00:00
Liangjun Song
2706c91b25 Merge pull request #30285 from overleaf/ls-skip-webhook-event-for-admin-user-id-removal
Skip webhook event for admin user id removal

GitOrigin-RevId: f5b3b3543bf4efcbf0d99caa6325259132823c77
2025-12-12 09:06:36 +00:00
Kristina
c6fc921c11 [web] add script for updating prices for existing Stripe subscriptions (#30216)
GitOrigin-RevId: 8f20a6ba9c7a737bb304d8698c4fbcb06b6ddc8c
2025-12-12 09:06:32 +00:00
Kristina
eafef60b75 [web] update Stripe archive script to avoid archiving actively used prices (#29978)
* make Stripe export script only export active products and prices
* add a gitignore for the scripts/stripe/output

GitOrigin-RevId: 975d84077c3940d4f5af518e5f8292ea455e1c3a
2025-12-03 09:05:56 +00:00
Olzhas Askar
9ebab12049 Merge pull request #29826 from overleaf/oa-coupon-scripts
[web] Coupon scripts

GitOrigin-RevId: 9d98b65649326ebad7a41c55ebce009327c9c634
2025-12-01 09:05:54 +00:00
Andrew Rumble
07c827e9fd Merge pull request #29928 from overleaf/ar-last-infrastructure-conversions
[web] last infrastructure conversions

GitOrigin-RevId: ad1aff9b7df0610ed0303157d9e2c8032f32c02b
2025-11-28 09:05:56 +00:00
Andrew Rumble
385432e8f1 Merge pull request #29921 from overleaf/revert-29914-kh-fix-import-in-scripts
Revert "[web] fix bad import in new Stripe scripts"

GitOrigin-RevId: 8bcedb2543e161fb7ae95ba6bae361c5fee7a670
2025-11-27 09:05:59 +00:00
Andrew Rumble
18f44866e5 Merge pull request #29919 from overleaf/revert-29795-ar-last-infrastructure-conversions
Revert "[web] last infrastructure conversions"

GitOrigin-RevId: 48dc64553012afb5d2db4b2eb9c9898489b7e5ef
2025-11-27 09:05:54 +00:00
Kristina
832068c6e6 [web] fix bad import in new Stripe scripts (#29914)
GitOrigin-RevId: de3be4782ae5e5d0ee5b97e25c7103b5d1e88c9f
2025-11-27 09:05:40 +00:00
Kristina
731bf1d8b6 [web] add scripts for updating Stripe prices (#29858)
* update generate recurly prices script to skip stripe-only prices
* add script for creating new Stripe prices from a CSV
* add script to archive Stripe prices by version key
* add script for exporting Stripe products and prices
* add script to import Stripe products

GitOrigin-RevId: 3c9cf8037d956b9532c3efed5fe8d63f8be53a93
2025-11-27 09:05:35 +00:00
Andrew Rumble
d748d8d606 Merge pull request #29795 from overleaf/ar-last-infrastructure-conversions
[web] last infrastructure conversions

GitOrigin-RevId: 68aa11625a9bc6d0d5324ecd95bb5ac52af8ee96
2025-11-27 09:05:30 +00:00
Liangjun Song
b03b1e3bfc Fetch all the subscriptions when backfilling user ids (#29005)
GitOrigin-RevId: 07c091176e50cad250e6bb4dea94fa3424643fd2
2025-10-14 08:05:33 +00:00
Liangjun Song
f582a77de0 Merge pull request #28470 from overleaf/ls-script-to-migration-user-id-metadata
Add scripts to migrate userId metadata

GitOrigin-RevId: 2365afd7a6772f147d2a3eb2f3e033cab3a4e7dd
2025-09-29 08:05:52 +00:00