browsertrix/backend/btrixcloud
Ilya Kreymer 9a67e28f13
Adds Subscription API (#1914)
Fixes https://github.com/webrecorder/browsertrix/issues/1905

- adds a new top-level `/api/subscriptions` endpoint and SubOps handler on
the backend.
- enable subscriptions API endpoints available only if `billing_enabled` is
set in helm chart
- new POST /subscriptions/create, /subscriptions/update,
/subscriptions/cancel API endpoints
- Subscriptions mongo collection storing timestamped /subscription
API events
- GET /subscriptions/events API to get subscription events, support for filtering and sorting
- Subscription data model 
- Support for setting and handling readOnlyOnCancel on org
- /orgs/<id>/billing-portal to lookup portalUrl using external API
- subscription in org getter and list views
- mark org as readOnly for subscription status `paused_payment_failed`, clears it on status `active`

---------
Co-authored-by: Tessa Walsh <tessa@bitarchivist.net>
2024-07-10 17:41:16 -07:00
..
migrations Refactor Invites and Registration, Flatten Per-User Invites (#1902) 2024-07-02 15:13:27 -07:00
operator Remove Crawl Workflow Configmaps (#1894) 2024-06-28 15:25:23 -07:00
__init__.py
auth.py Adds Subscription API (#1914) 2024-07-10 17:41:16 -07:00
background_jobs.py Add API endpoint to delete org (#1448) 2024-07-03 16:00:11 -04:00
basecrawls.py Add superuser API endpoints to export and import org data (#1394) 2024-07-02 17:14:34 -04:00
colls.py QA Runs Initial Backend Implementation (#1586) 2024-03-20 22:42:16 -07:00
crawlconfigs.py Remove Crawl Workflow Configmaps (#1894) 2024-06-28 15:25:23 -07:00
crawlmanager.py Remove Crawl Workflow Configmaps (#1894) 2024-06-28 15:25:23 -07:00
crawls.py Add superuser API endpoints to export and import org data (#1394) 2024-07-02 17:14:34 -04:00
db.py Adds Subscription API (#1914) 2024-07-10 17:41:16 -07:00
emailsender.py Adds Subscription API (#1914) 2024-07-10 17:41:16 -07:00
invites.py Adds Subscription API (#1914) 2024-07-10 17:41:16 -07:00
k8sapi.py Remove Crawl Workflow Configmaps (#1894) 2024-06-28 15:25:23 -07:00
main_op.py Add superuser API endpoints to export and import org data (#1394) 2024-07-02 17:14:34 -04:00
main.py Adds Subscription API (#1914) 2024-07-10 17:41:16 -07:00
models.py Adds Subscription API (#1914) 2024-07-10 17:41:16 -07:00
orgs.py Adds Subscription API (#1914) 2024-07-10 17:41:16 -07:00
pages.py QA stats aggregation: exclude isFile / isError pages from stats (#1879) 2024-06-25 08:54:42 -07:00
pagination.py Format backend with Black 24 (#1507) 2024-02-07 11:35:34 -08:00
profiles.py Merge branch 'main' into frontend-org-manage-readonly 2024-07-03 11:15:47 -04:00
storages.py QA Runs Initial Backend Implementation (#1586) 2024-03-20 22:42:16 -07:00
subs.py Adds Subscription API (#1914) 2024-07-10 17:41:16 -07:00
uploads.py Disable uploading and creating browser profiles when org is read-only (#1907) 2024-07-01 23:15:38 -07:00
users.py Merge branch 'main' into frontend-org-manage-readonly 2024-07-03 11:15:47 -04:00
utils.py Add superuser API endpoints to export and import org data (#1394) 2024-07-02 17:14:34 -04:00
version.py version: bump to 1.10.2 2024-06-11 16:28:40 -07:00
webhooks.py QA Runs Initial Backend Implementation (#1586) 2024-03-20 22:42:16 -07:00