refs https://github.com/TryGhost/Team/issues/3167
- Having paging metadata is part of every API response and was missing from initial implementation
- The getAll method has all of the values as "static" as there's nothing to page on.
refs https://github.com/TryGhost/Team/issues/3167
- The core client (API) needs a way to pass in information without an ID when creating a new entity, handling it on service/repository layer makes the most sense.
- Used "require" syntax to import tpl/errors modules, otherwise TS compiler was complaining about type compatibility issues, this works as a temporary workaround and is tracked and an issue to improve in the future.
refs https://github.com/TryGhost/Team/issues/3167
- This is scaffolding for collections API. Contains wiring for service wrapper, e2e test, and a browse endpoint
- Adds basic implementation of the GET /collections endpoint to build up upon
- Note, there are no permissions in this version as they will be added in later stages of development with migrations etc
refs https://github.com/TryGhost/Team/issues/3150
- wires Timezone setting to read list of timezones and allow editing/saving new value
- handles read/write of real timezone setting from settings context
- uses `@tryghost/timezone-data` to fetch list of all timezones
- adds typings.d.ts to handle missing types for @tryghost/timezone-data
refs TryGhost/Team#3229
- The issue we are observing that even though the returned amount of email recipients should not ever accede the max batch size (1000 in case of MailGun), there are rare glitches when this number is doubled and we fetch 2000 records instead.
- The fix takes it's best guess in de-duping data in the batch and then truncates it if the amount of records is still above the threshold. This ensures we at least end up sending the emails out to some of the recipients instead of none.
refs https://github.com/TryGhost/Team/issues/3234
The update check was failing to run due to recent changes in the tiers
service. This service now needs initialising before the update check can
be run.
refs TryGhost/Team#3247
- The feedback form UI is hidden by default
- Enabling “Lexical editor” doesn’t show the feedback form
- Disabling “Lexical editor” shows the feedback form below this lab item
and user can send the feedback
- Refreshing the page or navigating to some other page and then back to
Labs → the form is hidden again
refs https://github.com/TryGhost/Team/issues/1403
- currently, all tiers are grouped together in dropdowns with list of tiers
- this separates them into active and archived groups, so that the status of the tiers is clear when making choices
refs https://github.com/TryGhost/Team/issues/3248
- API queries for tiers are now using the TiersRepository with internal caching
- the repository had a bug with it's `toPrimitive()` method which meant the cached tier objects had very few properties
- the Tier object has all properties as private getters except for standard `events` property which meant the spread operator didn't have anything to spread into the object resulting in all tiers having a shape like `{events: [], active: true, type: 'paid', id: 'abcd'}`
- the `getAll()` method uses nql to match against the cached tier objects but with them not being fully populated it wasn't able to match and so returned an empty array
---
- changing the spread to use `tier.toJSON()` means we're populating all of the tier data properly allowing filter matches to work
refs. https://github.com/TryGhost/Team/issues/3150
There was an opportunity to make a reusable interaction within the Setting Group component so that switching between different states are implicitly handled. With this change it's possible to just add a Setting Group component without the need to build the logic over and over again. The component expects only the "contents" (ie. values in view state or input fields in edit state) as its children. There's a built in header with Edit/Cancel/Save buttons which is overridable with the `customButtons` parameter. A completely custom header can be used via the `customHeader` parameter.
See `TitleAndDescription.tsx` for a working example.
refs https://github.com/TryGhost/Team/issues/3224
When a product has a slug that is a single letter, checking if a user
had access to view a post associated with that product would cause a 500
error. The underlying cause of this issue is
https://github.com/TryGhost/NQL/issues/20 This fix circumvents this
issue by providing a value that the nql lexer will not error out on
refs https://github.com/TryGhost/Team/issues/3151
- adds new settings provider that fetches settings for a site and allows saving them
- adds new helpers for making admin api calls and fetching setting values