Commit Graph

72 Commits

Author SHA1 Message Date
e4ea49c05f add confirm-email router 2022-07-25 15:14:01 -07:00
9ea9bd9ea1 send confirmation email to pending user when login 2022-07-25 15:14:01 -07:00
abb1a414c1 remove login gql resolver 2022-07-25 15:13:58 -07:00
80639311d7 improve confirmation email format 2022-07-25 15:12:56 -07:00
068684d16b add test for failing to send confirmation email when signup 2022-07-25 15:12:56 -07:00
d284a3d302 fake sendMail in sign up test 2022-07-25 15:12:56 -07:00
01c4bbad00 delete pending user if failed to send confirmation email 2022-07-25 15:12:56 -07:00
d187c6c993 use general sender for confirmation email 2022-07-25 15:12:55 -07:00
b98f7c6ba2 reject with unknow reason if failed to send confirmation email 2022-07-25 15:12:55 -07:00
1ea34bde62 send confirmation email to pending user 2022-07-25 15:12:55 -07:00
ba73eec9e5 create pending user first 2022-07-25 15:12:55 -07:00
0bcb8a23c5 Use new API methods for saving 2022-07-16 12:17:58 -07:00
3136705a75 Handle errors when creating a page save request on savePage 2022-06-09 13:52:49 -07:00
85cbd4e9d0 Handle errors updating elastic when saving pages 2022-06-09 13:52:49 -07:00
eef3ee4114 Add getLabelsByIds service method 2022-06-08 14:59:27 +08:00
0cabd26344 Dont send the normalized URL to the content-fetch service
URLs need to be sent to contentFetch exactly as they
were received, this is because many apps will use signed URLs
for PDFs being served from GCP or AWS. A signed URL needs to
keep all its query params in the same order to validate.
2022-05-26 21:40:40 -07:00
93b095818d Linting fixes 2022-05-26 21:40:40 -07:00
a20ba60053 Add popular reads for onboarding 2022-05-24 15:31:55 -07:00
ea50f51644 Update to use image proxy URLs in parsed content 2022-05-24 13:43:57 -07:00
ed5dfde1a8 Linting fixes, remove debug 2022-05-24 13:06:40 -07:00
2b14d51ec6 API to add recommended (popular) reads to a users library
This API is used in onboarding
2022-05-24 12:05:39 -07:00
2d2495a10e Merge pull request #685 from omnivore-app/fix/pdf-api-simplification
Simplify the API to create pages from PDFs
2022-05-21 21:19:30 -07:00
e5bc68ca9e Simplify the API to create pages from PDFs
This creates a stub page when an upload is initiated, so the
SaveFile (or create article from file) APIs do not need to be
called.

The PDF uploaded trigger fired by GCS will mark the upload
as completed and update the page status.
2022-05-21 12:05:45 -07:00
17e6f4091d Merge pull request #638 from omnivore-app/feature/subscription-api
Feature/subscription api
2022-05-20 15:34:48 -07:00
444c21ad09 Fix labels test 2022-05-19 18:12:14 +08:00
d9d4deb14c Update Money Stuff sign up url 2022-05-18 11:50:43 +08:00
5b36f9270e Update milk road query params 2022-05-17 22:43:00 +08:00
13453e7b7f Register subscribe resolver 2022-05-17 21:26:46 +08:00
568472cc3c Calling HTTP requests to subscribe to these newsletters 2022-05-17 21:15:25 +08:00
1da8b75c81 Add a subscribeHandler 2022-05-17 18:46:44 +08:00
45213e7b54 Fix reminder trigger 2022-05-13 17:07:10 +08:00
adfaf6b8ce Use newsletter's title and author as page's ones 2022-05-12 18:08:38 +08:00
7c6b810522 Remove redundant JSDOM 2022-05-06 10:53:36 +08:00
9e3db0e053 Fix a bug to have multiple pages with the same url in lib 2022-05-04 19:12:22 +08:00
afe8b6e948 make savedAt a required field in page 2022-05-04 17:54:59 +08:00
9048ccbab3 Show failed pages in library 2022-05-04 12:46:57 +08:00
80d0146f72 Show unable to parse if page is failed to save within 30 seconds 2022-05-04 11:55:16 +08:00
2b70d480d2 Remove article saving request (#493)
* Add state and taskName in elastic page mappings

* Add state and taskName in elastic page interface

* Create page with PROCESSING state before scrapping

* Update createArticleRequest API

* Fix tests

* Add default state for pages

* Update createArticle API

* Update save page

* Update save file

* Update saving item description

* Show unable to parse content for failed page

* Fix date parsing

* Search for not failed pages

* Fix tests

* Add test for saveUrl

* Update get article saving request api

* Update get article test

* Add test for articleSavingRequest API

* Add test for failure

* Return new page id if clientRequestId empty

* Update clientRequestId in savePage

* Update clientRequestId in saveFile

* Replace article with slug in articleSavingRequest

* Add slug in articleSavingRequest response

* Depreciate article

* Use slug in web

* Remove article and highlight fragments

* Query article.slug on Prod

* Show unable to parse description for failed page

* Fix a bug having duplicate pages when saving the same url multiple times

* Add state in response

* Rename variables in removeArticle API

* Rename state

* Add state in response in web

* Make state an enum

* Open temporary page by link id

* Use an empty reader view as the background for loading pages

* Progressively load the article page as content is loaded

* Add includePending flag in getArticles API

* Set includePending = true in web

* Add elastic update mappings in migration script

* Add elastic mappings in docker image

* Move index_settings.json to migrate package

* Remove elastic index creation in api

* Move elastic migrations to a separate directory

* Remove index_settings from api docker image

Co-authored-by: Jackson Harper <jacksonh@gmail.com>
2022-04-29 13:41:06 +08:00
ccb79845bc Fix subscriptions issues (#501)
* Replace fetch with axios

* Add url in subscription

* Remove url in subscription

* Unsubscribe all newsletters before deleting that email

* Continue unsubscribing others if one got error
2022-04-29 11:16:46 +08:00
dca6461b62 Add unsubscribe resolver (#453)
* add unsubscribe resolver

* add subscription to articles api response

* revert yarn.lock changes
2022-04-21 13:18:15 +08:00
5c7f4a22bf Save subscriptions when saving newsletters (#447)
* parse unsub mailTo or httpUrl and send to pubsub

* save subscription from newsletter

* fix tests
2022-04-20 09:24:40 +08:00
ae0d1dd2ee Feature/search highlights backend (#395)
* add highlight mappings

* return highlight in resolvers

* temporarily skip highlight tests

* add test for getting highlights

* update merge highlight

* separate elastic methods

* roll back merge highlight test

* add highlight to elastic script

* update delete highlight in elastic

* migrate highlight data from postgres to elastic

* rescue not found exception when page is not found in the migration script

* exclude highlights in searching pages results

* search pages with highlights only with has:highlight query

* add search endpoint to search pages or highlights

* reduce code smell in search api

* fix rebase error

* fix tests

* add test for search highlight

* add test for new search endpoint

* add labels to search results

* update schema

* update search query

* fix update/share highlights

* fix rebase error

* fix tests

* add highlight model in elastic

* add savedAt and publishedAt date range in search query

* add sort by updated and recently read

* fix tests

* close db connection when tests are done

* test github action

* revert github action test

* fix rebase error

* add docker-compose for api-test

* remove unused env

* remove highlights with no page attached to

* allow get_articles resolver to search for query so we can merge it without web changes
2022-04-12 12:31:08 +08:00
d1269f815e identify a newsletter by checking both list-url and unsubscribe-url in headers and email sender address 2022-04-06 20:59:14 +08:00
7569e988bf upgrade typeorm to 3.0 (#359)
* upgrade typeorm to 3.0

* use new datasource object in typeorm 3

* fix tests

* fix tests

* migrate before creating connection

* fail the test if migration failed
2022-04-06 10:32:41 +08:00
9845a49040 Remove semicolon 2022-04-04 08:17:46 -07:00
c8ec7d636e Use require to import address parser function 2022-04-04 08:11:26 -07:00
da28998130 Pull ul list out of newsletter blurb
next/react doesnt want child elements of the paragraphs

Improve formatting

Improve wording

Use buttons in the subscribe directly blocks

Simplify docs on setting up forwarding rules

Add extra padding on bottom of help docs

Remove unused style

Add emails help page

Improve formatting

Prefetch page content on iOS

Reduce the reader overly length now that items are precached

Add invalidation when highlights are added to items

fix missing index_settings.json file in api dockerfile for creating elastic index (#363)

Handle full email address objects in the to param from sendgrid

These come in a format like:

"jacksonh-dfdf@inbox.omnivore.app" <jacksonh-dfdf@inbox-demo.omnivore.app>

New IDs for short highlights because they dont cascade delete now

Testing CI issues

Simplify test

CI test

Use promises for async tests

Temporarily remove test to debug CI

Re-enable

re-enable test, return error

Specify a userId when looking up saved email pages

create a unique url for newsletters without a URL

Use 500ms on page test timeouts

Increase timeout

Dont use deep equal to match newsletter label

Run just the labels API

Run against just the newsletter emails

Run without the page tests

Fix

Set the allow uncaught flag

Remove highlight tests

Remove newsletters tests

more resolver tests

Remove newsetter tests

Comment out resolver tests

Use nock for external requests in tests

Specify puppeteer url for tests

Comment out more tests

uncomment tests

re-enable

re-enable email test

Re-disable

Re-enable one pdf attachment test

Re-disable pdf attachment test

Use promises on setTimeout tests

rm label tests

mv label tests into a context

Comment out pdf tests

Comment out pdf tests

Async test

Async wrappers

Delay when creating test pages

More debugging

Unique short ids

Remove potentially problematic test

Fetch page before returning for test

handler in before block

more debugging

More debugging

Move errors checks into contexts

Use a context when saving newsletters to force index refresh

Prettier fix

Fix newsletter label check, remove setTimeout

Re-enable test

timeout on pdf router handler

Fix method call

comment out PDF test

Unique fake username

Comment out PDF test

Debugging signed urls

Re-enable

New email

pdf test

PDF tests

Comment out pdf test

Add nock stubs for email URLs

Use full address for PDF test

Remove debug

Use full email addresses
2022-04-02 16:56:24 -07:00
2bada0b9df Merge pull request #293 from omnivore-app/feature/priority-by-rate-limit
Use lower priority queue for large imports
2022-03-28 13:19:35 -07:00
b6c04f3508 fix saving report item by linking to elastic page 2022-03-28 20:38:54 +08:00
6597cc37b6 add created_at and updated_at to newsletter emails and sort by created_at desc 2022-03-22 18:43:47 +08:00