Commit Graph

1282 Commits

Author SHA1 Message Date
renovate[bot]
d3dbc81bd3 Update dependency @types/jsonwebtoken to v8.5.8 (#287)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-21 15:57:51 +02:00
Thibaut Patel
1bcfe04384 Published new versions
- @tryghost/members-api@4.4.1
2022-01-21 14:04:35 +01:00
Thibaut Patel
5ff5301b1d Fixed the getEventTimeline filtering in case there is no defined filter
refs https://github.com/TryGhost/Team/issues/1277

- `(undefined)` isn't valid NQL so we make sure options.filter is defined
2022-01-21 14:03:33 +01:00
Fabien "egg" O'Carroll
57c865ab82 Published new versions
- @tryghost/members-api@4.4.0
2022-01-21 14:09:45 +02:00
Fabien "egg" O'Carroll
5a9cb1ab83 Restricted changing Subscription to archived Tier
refs https://github.com/TryGhost/Team/issues/1252
2022-01-21 14:08:31 +02:00
Thibaut Patel
2a1fe514cf Published new versions
- @tryghost/members-api@4.3.0
2022-01-21 11:16:58 +01:00
Thibaut Patel
3ad8d9ab8b Added the option to filter events from getEventTimeline
refs https://github.com/TryGhost/Team/issues/1277

- Added the pre-existing framework filters to each event query.
- Made sure we aren't modifying the original `options.filter` to avoid side-effects between event queries.
2022-01-21 11:16:24 +01:00
Fabien "egg" O'Carroll
2661ddcde2 Restricted signing up with archived Tiers
refs https://github.com/TryGhost/Team/issues/1252
2022-01-21 11:13:23 +02:00
Fabien "egg" O'Carroll
883945886c Published new versions
- @tryghost/domain-events@0.1.5
 - @tryghost/express-dynamic-redirects@0.2.4
 - @tryghost/magic-link@1.0.16
 - @tryghost/member-analytics-service@0.1.6
 - @tryghost/member-events@0.3.3
 - @tryghost/members-analytics-ingress@0.1.7
 - @tryghost/members-api@4.2.0
 - @tryghost/members-csv@1.2.3
 - @tryghost/members-importer@0.4.1
 - @tryghost/members-ssr@1.0.18
 - @tryghost/members-offers@0.10.5
 - @tryghost/members-payments@0.1.7
 - @tryghost/members-stripe-service@0.6.3
2022-01-20 17:49:29 +02:00
Fabien "egg" O'Carroll
f7a1aac926 Removed stripe_prices from Products API
refs https://github.com/TryGhost/Team/issues/713

This is a hangover from the multiple products feature and is no longer used.
2022-01-20 17:47:50 +02:00
Fabien "egg" O'Carroll
c59a42c87b Added support for the active flag to Products API
refs https://github.com/TryGhost/Team/issues/1252

This will be used to archive and unarchive Tiers. There is a restriction
on archiving "free" Tiers because our current system expects only one,
and it should always be active.
2022-01-20 17:47:50 +02:00
Renovate Bot
233bb828fa Pin dependencies 2022-01-20 15:42:33 +00:00
Renovate Bot
10b1f62807 Update dependency nock to v13.2.2 2022-01-20 14:30:17 +00:00
Renovate Bot
a2bcff314f Update dependency c8 to v7.11.0 2022-01-20 14:30:04 +00:00
Fabien "egg" O'Carroll
aa8dca50eb Published new versions
- @tryghost/members-api@4.1.4
 - @tryghost/members-stripe-service@0.6.2
2022-01-20 11:00:25 +02:00
Fabien "egg" O'Carroll
ab215fb96a Added missing default parameter for opts
no-issue

The `opts` parameter is optional but there was no default defined, this
was causing errors when trying to read the forceCreate property if opts
was not passed.
2022-01-20 10:58:34 +02:00
Thibaut Patel
49fe3cf84b Published new versions
- @tryghost/members-api@4.1.3
2022-01-19 11:48:22 +01:00
Thibaut Patel
de0dc7a9a0 Added the full related email in email recipient events
refs https://github.com/TryGhost/Team/issues/1277

- Prevents the admin from doing extra api calls to retrieve the email records
2022-01-19 11:47:35 +01:00
Thibaut Patel
f22efd5abc Published new versions
- @tryghost/members-api@4.1.2
2022-01-19 09:56:29 +01:00
Thibaut Patel
83fe60cb66 🐛 Fixed the email recipient events in getEventTimeline
refs https://github.com/TryGhost/Team/issues/1277

- The members weren't included in the serialized version of the new events
- Some properties weren't using the bookshelf `get` method as they should have
2022-01-19 09:55:02 +01:00
Thibaut Patel
182a5ed993 Published new versions
- @tryghost/members-api@4.1.1
2022-01-18 19:03:12 +01:00
Thibaut Patel
a7098aee46 Added members to all member events in getEventTimeline
refs https://github.com/TryGhost/Team/issues/1277

- This makes the three new email recipient events similar to the preexisting events
2022-01-18 19:02:44 +01:00
Thibaut Patel
682cdb8c2d Published new versions
- @tryghost/members-api@4.1.0
2022-01-18 15:54:57 +01:00
Thibaut Patel
ae967c449c Added EmailRecipient events to getEventTimeline
refs https://github.com/TryGhost/Team/issues/1277

- Adds 3 new requests to the `email_recipients` table in the `getEventTimeline` method
- This allows to extract new member events from the table: `email_delivered_event`, `email_opened_event`, `email_failed_event`
2022-01-18 15:53:51 +01:00
Fabien "egg" O'Carroll
f11e1e411d Published new versions
- @tryghost/members-api@4.0.1
 - @tryghost/members-stripe-service@0.6.1
2022-01-18 11:20:09 +02:00
Fabien "egg" O'Carroll
f488438ad0 Added check for Stripe config before migrations
no-issue

This stops us from attempting to run the migrations if Stripe has not
been configured.
2022-01-18 11:18:08 +02:00
Fabien "egg" O'Carroll
0e955fc84f Published new versions
- @tryghost/members-api@4.0.0
 - @tryghost/members-stripe-service@0.6.0
2022-01-18 10:40:05 +02:00
Fabien "egg" O'Carroll
74225779a2 Moved webhook handling into Stripe service
no-issue

Handling Stripe webhooks is a Stripe concern and so we're moving it into
the Stripe module.
2022-01-18 10:37:47 +02:00
Fabien "egg" O'Carroll
94d97d1168 Removed Migrations&disconnectStripe
no-issue

These have been moved the the @tryghost/members-stripe-service
2022-01-18 10:37:47 +02:00
Fabien "egg" O'Carroll
635aa8aa3f Added WebhookManager and StripeService modules
no-issue
2022-01-18 10:37:47 +02:00
Fabien "egg" O'Carroll
3a1c51672c Used @babel/eslint-parser for stripe package
no-issue

This allows us to use static members on classes.
2022-01-18 10:37:47 +02:00
Fabien "egg" O'Carroll
344102f1aa Cleaned up StripeAPI
no-issue

- Removed unused types
- Removed configure on creation feature (unused)
- Explicitly handled configuration with no config
2022-01-18 10:37:47 +02:00
Fabien "egg" O'Carroll
1b837b8ed0 Updated internals of Migrations module
no-issue

This simplifies the dependency structure.
2022-01-18 10:37:47 +02:00
Fabien "egg" O'Carroll
8dee8752d3 Moved Stripe migrations into Stripe package
refs https://github.com/TryGhost/Team/issues/1257

This will allow us to run the Stripe migrations without rebooting the
Members service.
2022-01-18 10:25:37 +02:00
Fabien "egg" O'Carroll
00ec7157a6 Renamed StripeService -> StripeAPI
no-issue

This module is going to encapsulate all of the Stripe related logic, so
I'm renaming this file to be a little more specific about what it
relates to. Essentially this module will export a Stripe Service, and
this file is just one part of that.
2022-01-18 10:25:37 +02:00
Fabien "egg" O'Carroll
c120490a00 Moved members-stripe-service -> stripe
no-issue

We are already in the Members repository so there's no need for members
in the directory name. The NPM package name however is unchanged and
still requires specificity as it is scoped to @tryghost as a whole
rather than the Members feature.
2022-01-18 10:25:37 +02:00
Rishabh
3832352c5a Published new versions
- @tryghost/members-api@3.1.0
 - @tryghost/members-importer@0.4.0
2022-01-17 23:06:21 +05:30
Rishabh Garg
ca18f140c4 Handled new type column for tiers (#356)
refs https://github.com/TryGhost/Team/issues/1037

Tiers have a new `type` column to differentiate between `free` and `paid` tiers. This change -

- sets type as paid for all new tiers created, as `free` tier is created by default
- excludes any price/stripe data change for free tier
- updates all usages of default product to fetch the first paid product from the products list in DB instead of just the first product it finds.
2022-01-17 23:02:02 +05:30
Fabien "egg" O'Carroll
fb3010384b Published new versions
- @tryghost/members-api@3.0.1
2022-01-14 12:25:34 +02:00
Fabien "egg" O'Carroll
cacc74f3b4 Added "api" source to MemberSubscribedEvents
refs https://github.com/TryGhost/Team/issues/1275

We want to be able to track where member subscriptions came from, so
that we can use the information to reduce spam imports of members.

We were missing information when members were uploaded via the Admin
API, and setting the source to 'member' be default - this fixes that
both when creating members and when updating their subscription status.
2022-01-14 12:19:43 +02:00
Fabien "egg" O'Carroll
5652f1169f Published new versions
- @tryghost/members-csv@1.2.2
 - @tryghost/members-importer@0.3.7
2022-01-11 16:28:23 +02:00
Fabien "egg" O'Carroll
b1cc2a8ea8 Fixed CSV unparsing for subscribed flag
no-issue

We have a special mapping for subscribed_to_emails -> subscribed in the
parse method, but were not mapping it in the unparse method, which meant
we were losing information during CSV imports.
2022-01-11 16:26:11 +02:00
Fabien "egg" O'Carroll
379fbc7f13 Published new versions
- @tryghost/domain-events@0.1.4
 - @tryghost/express-dynamic-redirects@0.2.3
 - @tryghost/magic-link@1.0.15
 - @tryghost/member-analytics-service@0.1.5
 - @tryghost/member-events@0.3.2
 - @tryghost/members-analytics-ingress@0.1.6
 - @tryghost/members-api@3.0.0
 - @tryghost/members-csv@1.2.1
 - @tryghost/members-importer@0.3.6
 - @tryghost/members-ssr@1.0.17
 - @tryghost/members-stripe-service@0.5.2
 - @tryghost/members-offers@0.10.4
 - @tryghost/members-payments@0.1.6
2022-01-10 17:56:12 +02:00
Fabien "egg" O'Carroll
a7588e3c6b Fixed transactions for linkSubscription
no-issue

This was missed when transactions were implemented for this method.
2022-01-10 17:53:30 +02:00
Fabien "egg" O'Carroll
1c108bce95 Updated migrations to run in transactions
no-issue

Running these in a transaction ensures that they do not partially execute or run
into race conditions with simultaneous operations via the API.
2022-01-10 17:53:30 +02:00
Fabien "egg" O'Carroll
69df4b7c05 Added support for dynamic allowSelfSignup config
refs https://github.com/TryGhost/Team/issues/1257

This gets us closer to not having to reload the MembersAPI when config
is changed which will help stop bugs arising from multiple instances of
the MembersAPI being created.
2022-01-10 17:53:30 +02:00
John O'Nolan
b7cd251d5c 2022 2022-01-06 10:09:25 +00:00
Kevin Ansfield
2c447b483b Published new versions
- @tryghost/members-api@2.8.8
2022-01-04 14:51:03 +00:00
Kevin Ansfield
381e0c1f2a Removed membersAutoLogin labs flag
refs https://github.com/TryGhost/Team/issues/1258

- feature is GA so conditionals are no longer needed
2022-01-04 14:50:24 +00:00
Fabien egg O'Carroll
e37caa3f65 Published new versions
- @tryghost/members-api@2.8.7
2021-12-16 09:27:45 +02:00