Commit Graph

1182 Commits

Author SHA1 Message Date
Rishabh
972d29cae6 Fixed incorrect id passed while updating setting
no refs

- a typo led to whole setting object passed to setting update method instead of just the id
2022-02-04 18:23:24 +05:30
Sam Lord
1466e9c1c6 Published new versions
- @tryghost/verification-trigger@0.1.3
2022-02-04 12:04:55 +00:00
Sam Lord
865b77b115 Fixed verification trigger test
no issue
2022-02-04 12:03:59 +00:00
Sam Lord
20a37bdcd6 Verification trigger: Wrap values in NQL in single quotes
no issue
2022-02-04 11:54:48 +00:00
Sam Lord
771fa0988b Published new versions
- @tryghost/members-api@4.8.12
 - @tryghost/verification-trigger@0.1.2
2022-02-03 16:17:13 +00:00
Sam Lord
dbad2fc0a6 Add API source when verification triggered from API events
no issue

This allows the message to be changed when sending an email to the host administrator about an increase in API usage to add members.
2022-02-03 15:03:47 +00:00
Sam Lord
bf9070f945 Add API verification trigger with new filter
no issue

Previous API verification trigger didn't work because the way filters work also changed. Re-implemented with a new filter.
2022-02-03 15:02:33 +00:00
Fabien "egg" O'Carroll
4fde1d2667 Published new versions
- @tryghost/verification-trigger@0.1.1
2022-02-02 17:07:43 +02:00
Fabien 'egg' O'Carroll
96cd96a4f6 Removed API verification logic (#362)
no-issue

There is a bug in the event repository code where filters are not
correctly applied, this results in the api verification being extremely
trigger happy. For now we're removing the logic, with the plan to revert
this commit once the event repository is fixed.
2022-02-02 17:06:31 +02:00
Thibaut Patel
d9928795de Published new versions
- @tryghost/members-api@4.8.11
2022-02-02 13:08:42 +01:00
Thibaut Patel
90faa71cfe 🐛 Fixed typo in getEventTimeline
refs 13a9962ade

- The typo was half-fixed in the commit 13a9962ade
- This fixes the call, restoring the feature
2022-02-02 13:08:15 +01:00
Fabien "egg" O'Carroll
cc5d33dfcd Published new versions
- @tryghost/members-api@4.8.10
2022-02-01 17:06:29 +02:00
Fabien 'egg' O'Carroll
73418e8749 Ran Comped subscriptions in transaction (#360)
no-issue

We were incorrectly mixing transactional and non-transactional
operations. An e2e test in Ghost will be merged shortly which caught
this problem.
2022-02-01 17:05:22 +02:00
Thibaut Patel
40035c99bf Published new versions
- @tryghost/members-api@4.8.9
2022-02-01 15:55:48 +01:00
Thibaut Patel
13a9962ade 🐛 Fixed the order of events returned by getEventTimeline
refs https://github.com/TryGhost/Team/issues/1299

- Convert `created_at` to the right column in each function query
- Renamed the misspelled `getEmailDeliveredEvents` function
- Updated existing unit tests to cover the order
2022-02-01 15:47:15 +01:00
Fabien "egg" O'Carroll
012d42a129 Published new versions
- @tryghost/members-api@4.8.8
 - @tryghost/members-stripe-service@0.7.0
2022-02-01 13:16:48 +02:00
Fabien "egg" O'Carroll
8915d15a1d Added migration to update Default Tier name
refs https://github.com/TryGhost/Team/issues/1289

This ensures that we set the default tier's name to the title of the
site - which looks a lot better than "Default Product".
2022-02-01 13:16:06 +02:00
Thibaut Patel
594df729e1 Published new versions
- @tryghost/members-api@4.8.7
2022-02-01 11:16:19 +01:00
Thibaut Patel
da22b31302 🐛 Added the missing payment_event event in getEventTimeline
refs https://github.com/TryGhost/Team/issues/1297

- The function querying for this event type was simply never called.
2022-02-01 11:14:48 +01:00
Fabien "egg" O'Carroll
d47b178b42 Published new versions
- @tryghost/members-api@4.8.6
 - @tryghost/members-stripe-service@0.6.7
2022-02-01 11:59:02 +02:00
Fabien "egg" O'Carroll
7698729375 Updated email handler for webhooks
refs https://github.com/TryGhost/Team/issues/1168

This ensures that the correct email type is sent
2022-02-01 11:54:16 +02:00
Fabien "egg" O'Carroll
5d7c63aeec Published new versions
- @tryghost/members-api@4.8.5
 - @tryghost/members-stripe-service@0.6.6
2022-02-01 11:42:55 +02:00
Fabien "egg" O'Carroll
7b5c248541 Added tier property to subscriptions
refs https://github.com/TryGhost/Team/issues/1168

This allows Tiers to be read from subscriptions for the purposes or
redirecting to the welcome_page_url
2022-02-01 11:42:15 +02:00
Fabien 'egg' O'Carroll
67713832f6 Updated README
no-issue

- Corrects the package name
- Removes the run section as it's not applicable
2022-01-31 18:17:45 +02:00
Fabien "egg" O'Carroll
5baaddb81e Published new versions
- @tryghost/members-api@4.8.4
2022-01-31 12:55:05 +02:00
Fabien "egg" O'Carroll
f1cb661094 Revert "Removed stripe_prices from Products API"
This reverts commit f7a1aac926.

The stripe_prices was nto used by the HTTP API, but it was used for
Complimentary subscriptions.
2022-01-31 12:52:12 +02:00
Fabien "egg" O'Carroll
72d57c7645 Allowed welcome_page_url to be set on Tier creation
refs https://github.com/TryGhost/Team/issues/1168
2022-01-27 16:35:23 +02:00
Fabien "egg" O'Carroll
c50e6358dc Allow welcome_page_url to be set on Tiers
refs https://github.com/TryGhost/Team/issues/1168
2022-01-27 16:33:17 +02:00
Sam Lord
5e11a2e5c0 Published new versions
- @tryghost/member-analytics-service@0.1.8
 - @tryghost/member-events@0.3.4
 - @tryghost/members-analytics-ingress@0.1.9
 - @tryghost/members-api@4.8.3
 - @tryghost/members-importer@0.5.0
 - @tryghost/verification-trigger@0.1.0
2022-01-27 11:06:21 +00:00
Sam Lord
3c5cf21274 Added email verification trigger package
refs: https://github.com/TryGhost/Toolbox/issues/166

New package handles the email verification workflow to prevent spammers. It currently handles MembersSubscribeEvent to detect potential abuse of the API to add members, and exposes methods for checking the threshold / starting the verification process for use by other areas of the code (at the moment - just member imports).

The import package no longer needs to handle anything related to verification since it can be handled in the wrapper function in Ghost, and the API package doesn't need to do anything other than dispatch the new event.
2022-01-27 10:57:51 +00:00
Fabien "egg" O'Carroll
65543b4e8f Published new versions
- @tryghost/members-api@4.8.2
 - @tryghost/members-stripe-service@0.6.5
2022-01-26 22:26:58 +02:00
Fabien "egg" O'Carroll
fc5ff5c9e4 Fixed sending emails to paid signups
refs https://github.com/TryGhost/Team/issues/1293

We were referencing the incorrect method from the members-api which
would fail to send the email.
2022-01-26 22:25:07 +02:00
Thibaut Patel
bde49ccb0c Published new versions
- @tryghost/members-api@4.8.1
2022-01-25 16:44:55 +01:00
Thibaut Patel
0acf2f060c Fixed eslint warnings in events.js
no ref

- There were 12 `no-shadow` warnings, renaming the right variables fixed them.
2022-01-25 16:44:29 +01:00
Thibaut Patel
b76c056d33 Removed de-duplication of events in getEventTimeline
refs https://github.com/TryGhost/Team/issues/1277

- When a user signs-up, two events are created, the code was only keeping one of these events.
- This was introduce in commit 58c9c1c649 when the only usage of the function was to extract the 5 most recent events. Any duplication was creating too much noise.
- This was creating issues now that we introduce event filtering. Some `newsletter_event` events would appear from nowhere we we were filtering-out `signup_event` events.
- We removed the deduplication when the `membersActivityFeed` flag is enabled.
2022-01-25 16:38:25 +01:00
Thibaut Patel
18f095d2fb Published new versions
- @tryghost/members-api@4.8.0
2022-01-25 12:21:15 +01:00
Thibaut Patel
d7673bb1ef Moved the event filtering to the database queries
refs https://github.com/TryGhost/Team/issues/1277

- In `getEventTimeline` we filter to only perform the relevant queries, passing to each query function the filters (subset of NQL)
- In each query function, we rewrite the filters to adapt them to the internal data shape.
- We need to do this rewrite to allow API consumers to create filters based on the output on the API instead of the internal data structure.
- Added partial unit tests as there is a lot of repetition between the query functions.
2022-01-25 12:20:34 +01:00
Thibaut Patel
1370682a60 Added a function to parse a NQL subset
refs https://github.com/TryGhost/Team/issues/1277

- This will allow to filter events within `getEventTimeline`
- The subset of NQL has the following rules:
  - Only one level of filters, now parenthesis allowed
  - Only three filter keys allowed
  - No `or` allowed outside of the bracket notation (this is allowed: `type:-[email_opened_event,email_failed_event]` but this isn't: `type:1,data.created_at:1`)
- The return is an object with a NQL filter by allowed filter key
2022-01-24 18:53:14 +01:00
Fabien "egg" O'Carroll
e4e28aae3d Published new versions
- @tryghost/members-api@4.7.1
 - @tryghost/members-stripe-service@0.6.4
2022-01-24 17:37:08 +02:00
Fabien "egg" O'Carroll
560d1f72d8 Fixed reference to sendMagicLink
no-issue

This was referencing the wrong object to get the sendMagicLink method.
2022-01-24 17:35:51 +02:00
Fabien "egg" O'Carroll
d9c571b76b Published new versions
- @tryghost/members-api@4.7.0
2022-01-24 13:14:22 +02:00
Fabien "egg" O'Carroll
7950de49ac Removed archived Tiers from Portal display
refs https://github.com/TryGhost/Team/issues/1252

Although we filter out archived tiers from being shown in Portal - we
must also persist this information, so that when they are unarchived,
they continue to not be shown in Portal.

Unfortunately this information is stored in a setting, rather than on
the Tier object itself, two things to consider for the future are:
1. Representing the display value on the Tier object in the API
2. Updating the DB tables to allow storing the display value on the Tier
2022-01-24 13:13:48 +02:00
Fabien "egg" O'Carroll
3eed15d21a Published new versions
- @tryghost/members-api@4.6.0
2022-01-24 11:47:09 +02:00
Fabien "egg" O'Carroll
73f8db0e37 Restricted Members from being given archived Tiers
refs https://github.com/TryGhost/Team/issues/1252
2022-01-24 11:45:54 +02:00
Thibaut Patel
bb1d5de381 Published new versions
- @tryghost/domain-events@0.1.6
 - @tryghost/magic-link@1.0.17
 - @tryghost/member-analytics-service@0.1.7
 - @tryghost/members-analytics-ingress@0.1.8
 - @tryghost/members-api@4.5.0
 - @tryghost/members-ssr@1.0.19
 - @tryghost/members-offers@0.10.6
 - @tryghost/members-payments@0.1.8
2022-01-21 17:57:25 +01:00
Thibaut Patel
c65a9e0bb2 Moved the getEventTimeline filtering in memory
refs https://github.com/TryGhost/Team/issues/1277

- Doing a filtered DB query wasn't a good solution because we query several tables with different shapes.
- Filtering in memory is done with the NQL library
- Removed the side-effect of changing options.filter for each query, now that options.filter will already contain NQL
- The filtering is done in the reduce function to avoid looping one more time over the in-memory events
2022-01-21 17:56:15 +01:00
renovate[bot]
90efe73e5b Update dependency keypair to v1.0.4 [SECURITY] (#339)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-21 16:00:22 +02:00
renovate[bot]
3b30c71235 Update dependency @babel/eslint-parser to v7.16.5 (#331)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-21 15:59:03 +02:00
renovate[bot]
4d77c41858 Update dependency @types/cookies to v0.7.7 (#293)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-21 15:58:23 +02:00
renovate[bot]
01eea3a81e Update dependency @types/node-jose to v1.1.8 (#290)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-21 15:58:07 +02:00